codefoxcore 0.0.2 → 0.0.3

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,35 @@
1
+ import { inject, Injectable } from "@angular/core";
2
+ import { LoggerService } from "../services";
3
+ import { InterceptorsService } from "../services/interceptors.service";
4
+ import { InterceptorType } from "../interfaces";
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "../interfaces";
7
+ export class BaseInterceptor {
8
+ skipInterceptor() {
9
+ if (this.type !== null && this.interceptorsService.skip.indexOf(InterceptorType.ALL) !== -1) {
10
+ this.loggerService.warn('Interceptor skipped, reason is ALL skipped: ' + this.type);
11
+ return true;
12
+ }
13
+ const skip = this.type !== null && this.interceptorsService.skip.indexOf(this.type) !== -1;
14
+ if (skip) {
15
+ this.loggerService.warn('Interceptor skipped, reason is [' + this.interceptorsService.skip.join(', ') + '] skipped');
16
+ }
17
+ return skip;
18
+ }
19
+ constructor(type) {
20
+ this.type = null;
21
+ this.interceptorsService = inject(InterceptorsService);
22
+ this.loggerService = inject(LoggerService);
23
+ this.type = type;
24
+ this.loggerService.info('Interceptor initialized: ' + this.type);
25
+ }
26
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseInterceptor, deps: [{ token: i1.InterceptorType }], target: i0.ɵɵFactoryTarget.Injectable }); }
27
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseInterceptor, providedIn: 'root' }); }
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseInterceptor, decorators: [{
30
+ type: Injectable,
31
+ args: [{
32
+ providedIn: 'root'
33
+ }]
34
+ }], ctorParameters: function () { return [{ type: i1.InterceptorType }]; } });
35
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoi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clxuXHRcdHRoaXMubG9nZ2VyU2VydmljZS5pbmZvKCdJbnRlcmNlcHRvciBpbml0aWFsaXplZDogJyArIHRoaXMudHlwZSk7XHJcblx0fVxyXG59XHJcbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export * from './token.interceptor';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2RlZm94Y29yZS9zcmMvbGliL2ludGVyY2VwdG9ycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi90b2tlbi5pbnRlcmNlcHRvcic7XHJcbiJdfQ==
@@ -0,0 +1,34 @@
1
+ import { inject, Injectable } from '@angular/core';
2
+ import { TokenService } from '../services';
3
+ import { BaseInterceptor } from './base.interceptor';
4
+ import { InterceptorType } from '../interfaces';
5
+ import * as i0 from "@angular/core";
6
+ export class TokenInterceptor extends BaseInterceptor {
7
+ intercept(request, next) {
8
+ if (this.skipInterceptor()) {
9
+ return next.handle(request);
10
+ }
11
+ const accessToken = this.tokenService.accessToken;
12
+ if (accessToken !== null) {
13
+ request = request.clone({
14
+ setHeaders: {
15
+ Token: accessToken
16
+ }
17
+ });
18
+ }
19
+ return next.handle(request);
20
+ }
21
+ constructor() {
22
+ super(InterceptorType.TOKEN);
23
+ this.tokenService = inject(TokenService);
24
+ }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TokenInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
26
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TokenInterceptor, providedIn: 'root' }); }
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TokenInterceptor, decorators: [{
29
+ type: Injectable,
30
+ args: [{
31
+ providedIn: 'root'
32
+ }]
33
+ }], ctorParameters: function () { return []; } });
34
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW4uaW50ZXJjZXB0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2RlZm94Y29yZS9zcmMvbGliL2ludGVyY2VwdG9ycy90b2tlbi5pbnRlcmNlcHRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUduRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sYUFBYSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUNyRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUtoRCxNQUFNLE9BQU8sZ0JBQWlCLFNBQVEsZUFBZTtJQUlwRCxTQUFTLENBQUMsT0FBeUIsRUFBRSxJQUFpQjtRQUNyRCxJQUFJLElBQUksQ0FBQyxlQUFlLEVBQUUsRUFBRTtZQUMzQixPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUM7U0FDNUI7UUFDRCxNQUFNLFdBQVcsR0FBa0IsSUFBSSxDQUFDLFlBQVksQ0FBQyxXQUFXLENBQUM7UUFDakUsSUFBSSxXQUFXLEtBQUssSUFBSSxFQUFFO1lBQ3pCLE9BQU8sR0FBRyxPQUFPLENBQUMsS0FBSyxDQUFDO2dCQUN2QixVQUFVLEVBQUU7b0JBQ1gsS0FBSyxFQUFFLFdBQVc7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cml2YXRlIHRva2VuU2VydmljZTogVG9rZW5TZXJ2aWNlID0gaW5qZWN0KFRva2VuU2VydmljZSk7XHJcblxyXG5cdGludGVyY2VwdChyZXF1ZXN0OiBIdHRwUmVxdWVzdDxhbnk+LCBuZXh0OiBIdHRwSGFuZGxlcik6IE9ic2VydmFibGU8SHR0cEV2ZW50PGFueT4+IHtcclxuXHRcdGlmICh0aGlzLnNraXBJbnRlcmNlcHRvcigpKSB7XHJcblx0XHRcdHJldHVybiBuZXh0LmhhbmRsZShyZXF1ZXN0KTtcclxuXHRcdH1cclxuXHRcdGNvbnN0IGFjY2Vzc1Rva2VuOiBzdHJpbmcgfCBudWxsID0gdGhpcy50b2tlblNlcnZpY2UuYWNjZXNzVG9rZW47XHJcblx0XHRpZiAoYWNjZXNzVG9rZW4gIT09IG51bGwpIHtcclxuXHRcdFx0cmVxdWVzdCA9IHJlcXVlc3QuY2xvbmUoe1xyXG5cdFx0XHRcdHNldEhlYWRlcnM6IHtcclxuXHRcdFx0XHRcdFRva2VuOiBhY2Nlc3NUb2tlblxyXG5cdFx0XHRcdH1cclxuXHRcdFx0fSk7XHJcblx0XHR9XHJcblx0XHRyZXR1cm4gbmV4dC5oYW5kbGUocmVxdWVzdCk7XHJcblx0fVxyXG5cclxuXHRjb25zdHJ1Y3RvcigpIHtcclxuXHRcdHN1cGVyKEludGVyY2VwdG9yVHlwZS5UT0tFTik7XHJcblx0fVxyXG59XHJcbiJdfQ==
@@ -31,4 +31,20 @@ export var TokenServiceMode;
31
31
  TokenServiceMode[TokenServiceMode["SESSIONSTORAGE"] = 1] = "SESSIONSTORAGE";
32
32
  TokenServiceMode[TokenServiceMode["COOKIE"] = 2] = "COOKIE";
33
33
  })(TokenServiceMode || (TokenServiceMode = {}));
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4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biB7XHJcbiAgICB0aXRsZTogc3RyaW5nO1xyXG4gICAgbWVzc2FnZTogc3RyaW5nO1xyXG59XHJcblxyXG5leHBvcnQgZW51bSBMb2dMZXZlbCB7XHJcbiAgICBBbGwgPSAwLFxyXG4gICAgRGVidWcgPSAxLFxyXG4gICAgSW5mbyA9IDIsXHJcbiAgICBXYXJuID0gMyxcclxuICAgIEVycm9yID0gNCxcclxuICAgIEZhdGFsID0gNSxcclxuICAgIE9mZiA9IDZcclxufVxyXG5cclxuZXhwb3J0IGVudW0gVG9rZW5TZXJ2aWNlTW9kZSB7XHJcbiAgICBMT0NBTFNUT1JBR0UgPSAwLFxyXG4gICAgU0VTU0lPTlNUT1JBR0UgPSAxLFxyXG4gICAgQ09PS0lFID0gMlxyXG59Il19
34
+ export var InterceptorType;
35
+ (function (InterceptorType) {
36
+ InterceptorType["ALL"] = "ALL";
37
+ InterceptorType["ERROR"] = "ERROR";
38
+ InterceptorType["LOADER"] = "LOADER";
39
+ InterceptorType["MOCK"] = "MOCK";
40
+ InterceptorType["TOKEN"] = "TOKEN";
41
+ InterceptorType["PRECHECK"] = "PRECHECK";
42
+ InterceptorType["LOCK"] = "LOCK";
43
+ InterceptorType["REQUESTID"] = "REQUESTID";
44
+ })(InterceptorType || (InterceptorType = {}));
45
+ export var Precheck;
46
+ (function (Precheck) {
47
+ Precheck["ERROR"] = "ERROR";
48
+ Precheck["WARNING"] = "WARNING";
49
+ })(Precheck || (Precheck = {}));
50
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2NvZGVmb3hjb3JlL3NyYy9saWIvaW50ZXJmYWNlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFrREEsTUFBTSxDQUFOLElBQVksb0JBR1g7QUFIRCxXQUFZLG9CQUFvQj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xyXG4gICAgRVJST1IgPSBcIkVSUk9SXCIsXHJcbiAgICBXQVJOSU5HID0gXCJXQVJOSU5HXCJcclxufVxyXG5cclxuZXhwb3J0IHR5cGUgUHJlY2hlY2tOdWxsYWJsZSA9IFByZWNoZWNrIHwgbnVsbDtcclxuIl19
@@ -0,0 +1,11 @@
1
+ import { HTTP_INTERCEPTORS } from "@angular/common/http";
2
+ import { makeEnvironmentProviders } from "@angular/core";
3
+ import { TokenInterceptor } from "./interceptors/token.interceptor";
4
+ export function provideTokenInterceptor() {
5
+ return makeEnvironmentProviders([{
6
+ provide: HTTP_INTERCEPTORS,
7
+ useClass: TokenInterceptor,
8
+ multi: true
9
+ }]);
10
+ }
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdmlkZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvY29kZWZveGNvcmUvc3JjL2xpYi9wcm92aWRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDekQsT0FBTyxFQUF3Qix3QkFBd0IsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMvRSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQztBQUVwRSxNQUFNLFVBQVUsdUJBQXVCO0lBQ25DLE9BQU8sd0JBQXdCLENBQUMsQ0FBQztZQUM3QixPQUFPLEVBQUUsaUJBQWlCO1lBQzFCLFFBQVEsRUFBRSxnQkFBZ0I7WUFDMUIsS0FBSyxFQUFFLElBQUk7U0FDZCxDQUFDLENBQUMsQ0FBQztBQUNSLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIVFRQX0lOVEVSQ0VQVE9SUyB9IGZyb20gXCJAYW5ndWxhci9jb21tb24vaHR0cFwiO1xyXG5pbXBvcnQgeyBFbnZpcm9ubWVudFByb3ZpZGVycywgbWFrZUVudmlyb25tZW50UHJvdmlkZXJzIH0gZnJvbSBcIkBhbmd1bGFyL2NvcmVcIjtcclxuaW1wb3J0IHsgVG9rZW5JbnRlcmNlcHRvciB9IGZyb20gXCIuL2ludGVyY2VwdG9ycy90b2tlbi5pbnRlcmNlcHRvclwiO1xyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIHByb3ZpZGVUb2tlbkludGVyY2VwdG9yKCk6IEVudmlyb25tZW50UHJvdmlkZXJzIHtcclxuICAgIHJldHVybiBtYWtlRW52aXJvbm1lbnRQcm92aWRlcnMoW3tcclxuICAgICAgICBwcm92aWRlOiBIVFRQX0lOVEVSQ0VQVE9SUyxcclxuICAgICAgICB1c2VDbGFzczogVG9rZW5JbnRlcmNlcHRvcixcclxuICAgICAgICBtdWx0aTogdHJ1ZVxyXG4gICAgfV0pO1xyXG59Il19
@@ -0,0 +1,73 @@
1
+ import { Injectable } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ export class InterceptorsService {
4
+ constructor() {
5
+ /**
6
+ * Skip
7
+ *
8
+ * Skip interceptors from next http requests
9
+ */
10
+ this.skip = [];
11
+ /**
12
+ * ResetSkip
13
+ *
14
+ * Resets to `skip` to empty array after first http request
15
+ */
16
+ this.resetSkip = true;
17
+ /**
18
+ * Precheck
19
+ *
20
+ * Tells the `PrecheckInterceptor` to set a header with the given value
21
+ */
22
+ this.precheck = null;
23
+ /**
24
+ * ResetPrecheck
25
+ *
26
+ * Clear `precheck` after first http request
27
+ */
28
+ this.resetPrecheck = true;
29
+ /**
30
+ * Error callback function
31
+ *
32
+ * Function to call after every http error
33
+ */
34
+ this.errorCallbackfunction = null;
35
+ /**
36
+ * Error skip status codes
37
+ *
38
+ * Skips the given status codes from `errorCallbackfunction`
39
+ */
40
+ this.errorSkipStatusCodes = [];
41
+ /**
42
+ * Mock callback function
43
+ *
44
+ * Function to call to mock an http request
45
+ */
46
+ this.mockCallbackFunction = null;
47
+ /**
48
+ * RequestId HTTP Header name
49
+ */
50
+ this.requestIdHttpHeaderName = 'Request-Id';
51
+ /**
52
+ * RequestId repeat
53
+ */
54
+ this.requestIdRepeat = false;
55
+ /**
56
+ * RequestId repeat delay
57
+ */
58
+ this.requestIdRepeatDelay = 0;
59
+ /**
60
+ * RequestId repeat statuscodes
61
+ */
62
+ this.requestIdRepeatStatusCodes = [];
63
+ }
64
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InterceptorsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
65
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InterceptorsService, providedIn: 'root' }); }
66
+ }
67
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InterceptorsService, decorators: [{
68
+ type: Injectable,
69
+ args: [{
70
+ providedIn: 'root'
71
+ }]
72
+ }] });
73
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJjZXB0b3JzLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb2RlZm94Y29yZS9zcmMvbGliL3NlcnZpY2VzL2ludGVyY2VwdG9ycy5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTzNDLE1BQU0sT0FBTyxtQkFBbUI7SUFIaEM7UUFLSTs7OztXQUlHO1FBQ04sU0FBSSxHQUFzQixFQUFFLENBQUM7UUFFMUI7Ozs7V0FJRztRQUNILGNBQVMsR0FBWSxJQUFJLENBQUM7UUFHMUI7Ozs7V0FJRztRQUNILGFBQ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lc1xyXG4gICAgICovXHJcblx0cmVxdWVzdElkUmVwZWF0U3RhdHVzQ29kZXM6IG51bWJlcltdID0gW107XHJcbn0iXX0=
@@ -2,4 +2,7 @@ export * from './lib/classes';
2
2
  export * from './lib/services';
3
3
  export * from './lib/tokens';
4
4
  export * from './lib/interfaces';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NvZGVmb3hjb3JlL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxrQkFBa0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliL2NsYXNzZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvc2VydmljZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdG9rZW5zJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ludGVyZmFjZXMnO1xuIl19
5
+ export * from './lib/interceptors';
6
+ export * from './lib/providers';
7
+ export * from './lib/helpers';
8
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NvZGVmb3hjb3JlL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLG9CQUFvQixDQUFDO0FBQ25DLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxlQUFlLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2xpYi9jbGFzc2VzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3NlcnZpY2VzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3Rva2Vucyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9pbnRlcmZhY2VzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2ludGVyY2VwdG9ycyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9wcm92aWRlcnMnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvaGVscGVycyc7XG4iXX0=
@@ -1,9 +1,9 @@
1
1
  import { Subject, filter, Observable, takeUntil, timer } from 'rxjs';
2
2
  import { isPlatformBrowser, DOCUMENT } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, inject, Injector, PLATFORM_ID, ApplicationRef, createComponent, Injectable } from '@angular/core';
4
+ import { InjectionToken, inject, Injector, PLATFORM_ID, ApplicationRef, createComponent, Injectable, makeEnvironmentProviders } from '@angular/core';
5
5
  import { Title } from '@angular/platform-browser';
6
- import { HttpClient } from '@angular/common/http';
6
+ import { HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http';
7
7
 
8
8
  class DialogRef {
9
9
  constructor() {
@@ -176,6 +176,22 @@ var TokenServiceMode;
176
176
  TokenServiceMode[TokenServiceMode["SESSIONSTORAGE"] = 1] = "SESSIONSTORAGE";
177
177
  TokenServiceMode[TokenServiceMode["COOKIE"] = 2] = "COOKIE";
178
178
  })(TokenServiceMode || (TokenServiceMode = {}));
179
+ var InterceptorType;
180
+ (function (InterceptorType) {
181
+ InterceptorType["ALL"] = "ALL";
182
+ InterceptorType["ERROR"] = "ERROR";
183
+ InterceptorType["LOADER"] = "LOADER";
184
+ InterceptorType["MOCK"] = "MOCK";
185
+ InterceptorType["TOKEN"] = "TOKEN";
186
+ InterceptorType["PRECHECK"] = "PRECHECK";
187
+ InterceptorType["LOCK"] = "LOCK";
188
+ InterceptorType["REQUESTID"] = "REQUESTID";
189
+ })(InterceptorType || (InterceptorType = {}));
190
+ var Precheck;
191
+ (function (Precheck) {
192
+ Precheck["ERROR"] = "ERROR";
193
+ Precheck["WARNING"] = "WARNING";
194
+ })(Precheck || (Precheck = {}));
179
195
 
180
196
  const MESSAGE_DEFAULT_CONFIGURATION = new InjectionToken('Message default configuration', {
181
197
  factory: () => {
@@ -1046,9 +1062,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1046
1062
  }]
1047
1063
  }] });
1048
1064
 
1065
+ class InterceptorsService {
1066
+ constructor() {
1067
+ /**
1068
+ * Skip
1069
+ *
1070
+ * Skip interceptors from next http requests
1071
+ */
1072
+ this.skip = [];
1073
+ /**
1074
+ * ResetSkip
1075
+ *
1076
+ * Resets to `skip` to empty array after first http request
1077
+ */
1078
+ this.resetSkip = true;
1079
+ /**
1080
+ * Precheck
1081
+ *
1082
+ * Tells the `PrecheckInterceptor` to set a header with the given value
1083
+ */
1084
+ this.precheck = null;
1085
+ /**
1086
+ * ResetPrecheck
1087
+ *
1088
+ * Clear `precheck` after first http request
1089
+ */
1090
+ this.resetPrecheck = true;
1091
+ /**
1092
+ * Error callback function
1093
+ *
1094
+ * Function to call after every http error
1095
+ */
1096
+ this.errorCallbackfunction = null;
1097
+ /**
1098
+ * Error skip status codes
1099
+ *
1100
+ * Skips the given status codes from `errorCallbackfunction`
1101
+ */
1102
+ this.errorSkipStatusCodes = [];
1103
+ /**
1104
+ * Mock callback function
1105
+ *
1106
+ * Function to call to mock an http request
1107
+ */
1108
+ this.mockCallbackFunction = null;
1109
+ /**
1110
+ * RequestId HTTP Header name
1111
+ */
1112
+ this.requestIdHttpHeaderName = 'Request-Id';
1113
+ /**
1114
+ * RequestId repeat
1115
+ */
1116
+ this.requestIdRepeat = false;
1117
+ /**
1118
+ * RequestId repeat delay
1119
+ */
1120
+ this.requestIdRepeatDelay = 0;
1121
+ /**
1122
+ * RequestId repeat statuscodes
1123
+ */
1124
+ this.requestIdRepeatStatusCodes = [];
1125
+ }
1126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InterceptorsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1127
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InterceptorsService, providedIn: 'root' }); }
1128
+ }
1129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InterceptorsService, decorators: [{
1130
+ type: Injectable,
1131
+ args: [{
1132
+ providedIn: 'root'
1133
+ }]
1134
+ }] });
1135
+
1136
+ class BaseInterceptor {
1137
+ skipInterceptor() {
1138
+ if (this.type !== null && this.interceptorsService.skip.indexOf(InterceptorType.ALL) !== -1) {
1139
+ this.loggerService.warn('Interceptor skipped, reason is ALL skipped: ' + this.type);
1140
+ return true;
1141
+ }
1142
+ const skip = this.type !== null && this.interceptorsService.skip.indexOf(this.type) !== -1;
1143
+ if (skip) {
1144
+ this.loggerService.warn('Interceptor skipped, reason is [' + this.interceptorsService.skip.join(', ') + '] skipped');
1145
+ }
1146
+ return skip;
1147
+ }
1148
+ constructor(type) {
1149
+ this.type = null;
1150
+ this.interceptorsService = inject(InterceptorsService);
1151
+ this.loggerService = inject(LoggerService);
1152
+ this.type = type;
1153
+ this.loggerService.info('Interceptor initialized: ' + this.type);
1154
+ }
1155
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseInterceptor, deps: [{ token: InterceptorType }], target: i0.ɵɵFactoryTarget.Injectable }); }
1156
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseInterceptor, providedIn: 'root' }); }
1157
+ }
1158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BaseInterceptor, decorators: [{
1159
+ type: Injectable,
1160
+ args: [{
1161
+ providedIn: 'root'
1162
+ }]
1163
+ }], ctorParameters: function () { return [{ type: InterceptorType }]; } });
1164
+
1165
+ class TokenInterceptor extends BaseInterceptor {
1166
+ intercept(request, next) {
1167
+ if (this.skipInterceptor()) {
1168
+ return next.handle(request);
1169
+ }
1170
+ const accessToken = this.tokenService.accessToken;
1171
+ if (accessToken !== null) {
1172
+ request = request.clone({
1173
+ setHeaders: {
1174
+ Token: accessToken
1175
+ }
1176
+ });
1177
+ }
1178
+ return next.handle(request);
1179
+ }
1180
+ constructor() {
1181
+ super(InterceptorType.TOKEN);
1182
+ this.tokenService = inject(TokenService);
1183
+ }
1184
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TokenInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1185
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TokenInterceptor, providedIn: 'root' }); }
1186
+ }
1187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TokenInterceptor, decorators: [{
1188
+ type: Injectable,
1189
+ args: [{
1190
+ providedIn: 'root'
1191
+ }]
1192
+ }], ctorParameters: function () { return []; } });
1193
+
1194
+ function provideTokenInterceptor() {
1195
+ return makeEnvironmentProviders([{
1196
+ provide: HTTP_INTERCEPTORS,
1197
+ useClass: TokenInterceptor,
1198
+ multi: true
1199
+ }]);
1200
+ }
1201
+
1049
1202
  /**
1050
1203
  * Generated bundle index. Do not edit.
1051
1204
  */
1052
1205
 
1053
- export { ALERT_CONFIGURATIONS, ALERT_DEFAULT_BUTTON_CONFIGURATION, AcceptValidationMode, ApiService, CF_PREDEFINED_DIALOGS, CONFIRM_CONFIGURATIONS, CookieService, DialogConfig, DialogInjector, DialogRef, DialogService, LOG_LEVEL, LogLevel, LoggerService, MESSAGE_DEFAULT_CONFIGURATION, MessagePosition, MessageService, MessageSeverity, TokenService, TokenServiceMode };
1206
+ export { ALERT_CONFIGURATIONS, ALERT_DEFAULT_BUTTON_CONFIGURATION, AcceptValidationMode, ApiService, CF_PREDEFINED_DIALOGS, CONFIRM_CONFIGURATIONS, CookieService, DialogConfig, DialogInjector, DialogRef, DialogService, InterceptorType, LOG_LEVEL, LogLevel, LoggerService, MESSAGE_DEFAULT_CONFIGURATION, MessagePosition, MessageService, MessageSeverity, Precheck, TokenInterceptor, TokenService, TokenServiceMode, isBrowser, localStorage, provideTokenInterceptor, sessionStorage };
1054
1207
  //# sourceMappingURL=codefoxcore.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"codefoxcore.mjs","sources":["../../../projects/codefoxcore/src/lib/classes/dialog.ref.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.config.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.injector.class.ts","../../../projects/codefoxcore/src/lib/tokens/alert.token.ts","../../../projects/codefoxcore/src/lib/tokens/dialog.token.ts","../../../projects/codefoxcore/src/lib/tokens/confirm.token.ts","../../../projects/codefoxcore/src/lib/interfaces.ts","../../../projects/codefoxcore/src/lib/tokens/message.token.ts","../../../projects/codefoxcore/src/lib/tokens/loglevel.token.ts","../../../projects/codefoxcore/src/lib/services/dialog.service.ts","../../../projects/codefoxcore/src/lib/services/message.service.ts","../../../projects/codefoxcore/src/lib/services/logger.service.ts","../../../projects/codefoxcore/src/lib/services/api.service.ts","../../../projects/codefoxcore/src/lib/helpers.ts","../../../projects/codefoxcore/src/lib/services/cookie.service.ts","../../../projects/codefoxcore/src/lib/services/token.service.ts","../../../projects/codefoxcore/src/codefoxcore.ts"],"sourcesContent":["import { filter, Observable, Subject, takeUntil } from \"rxjs\";\r\nimport { CfDialogCloseParams } from \"../interfaces\";\r\nimport { MessageService } from \"../services\";\r\nimport { DialogConfig } from \"../classes\";\r\n\r\nexport class DialogRef<T = any> {\r\n\tmessageService: MessageService | null = null;\r\n dialogConfig: DialogConfig | null = null;\r\n\tprivate readonly _onClose: Subject<any> = new Subject<any>();\r\n onClose: Observable<T | undefined> = this._onClose.asObservable();\r\n onCloseValue: Observable<T> = this._onClose.pipe(filter(result => result !== undefined && result !== null));\r\n onCloseOnValue: (value: any) => Observable<any> = (value: any) => this._onClose.pipe(filter(result => result === value));\r\n private readonly _onMessage: Subject<any> = new Subject<any>();\r\n\tonMessage: Observable<any> = this._onMessage.asObservable();\r\n private readonly _onDestroy = new Subject<any>();\r\n onDestroy: Observable<any> = this._onDestroy.asObservable();\r\n\tsavedTitle: string = '';\r\n\ttitle: string | null = null;\r\n\topened: Date = new Date();\r\n\tprivate doClose(result?: any, params: CfDialogCloseParams = {}): void {\r\n\t\tif (params.message !== undefined && this.messageService !== null) {\r\n\t\t\tthis.messageService.show(params.message.title, params.message.message, params.message);\r\n\t\t}\r\n\t\tthis._onClose.next(result); \r\n\t}\r\n close(result?: any, params: CfDialogCloseParams = {}): void { \r\n\t\tif (this.dialogConfig === null || this.dialogConfig.beforeClose === null) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.dialogConfig.beforeClose instanceof Promise) {\r\n\t\t\tthis.dialogConfig.beforeClose.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.dialogConfig.beforeClose instanceof Observable) {\r\n\t\t\tthis.dialogConfig.beforeClose.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tconst beforeCloseResult: boolean | Observable<boolean> | Promise<boolean> = this.dialogConfig.beforeClose();\r\n\r\n\t\tif (beforeCloseResult instanceof Promise) {\r\n\t\t\tbeforeCloseResult.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult instanceof Observable) {\r\n\t\t\tbeforeCloseResult.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t}\r\n\t}\r\n forceClose(result?: any): void {\r\n this.doClose(result);\r\n }\r\n\tmessage(message: any): void { this._onMessage.next(message); }\r\n destroy(): void { this._onDestroy.next(undefined); }\r\n}\r\n","import { ResolveData } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogConfiguration } from \"../interfaces\";\r\n\r\nexport class DialogConfig implements DialogConfiguration {\r\n showCloseIcon: boolean = true;\r\n\tbeforeClose: null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean> = null;\r\n\tignoreKeyUp: boolean = false;\r\n data: {[key: (string | number)]: any} = {};\r\n noPadding: boolean = false;\r\n\tkeepActiveElement: boolean = false;\r\n\tcontainerClasses: string[] = [];\r\n\tdialogClasses: string[] = [];\r\n resolve: ResolveData = {};\r\n\ttitle: string | null = null;\r\n contentElement: Element | null = null;\r\n single: boolean = false;\r\n width: string | null = null;\r\n\theight: string | null = null;\r\n getData(key: string | number, defaultOnUndefined: any = null): any {\r\n return this.data[key] !== undefined ? this.data[key] : defaultOnUndefined;\r\n }\r\n}\r\n","import { InjectionToken, Injector, Type } from \"@angular/core\";\r\n\r\nexport class DialogInjector implements Injector {\r\n constructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: {}): T;\r\n get(token: any, notFoundValue?: any): any;\r\n get(token: any, notFoundValue?: any, _?: any): any {\r\n const value = this._additionalTokens.get(token);\r\n if (value) { return value; }\r\n return this._parentInjector.get<any>(token, notFoundValue);\r\n }\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { AlertButtonConfiguration, AlertConfiguration } from \"../interfaces\";\r\n\r\nexport const ALERT_DEFAULT_BUTTON_CONFIGURATION: InjectionToken<AlertButtonConfiguration> = new InjectionToken('Alert default button', {\r\n\tfactory: (): AlertButtonConfiguration => {\r\n\t\treturn {\r\n\t\t\tlabel: 'alert.ok',\r\n\t\t\tseverity: 'success',\r\n\t\t\tcallback: ({ dialogRef }) => {\r\n\t\t\t\tdialogRef.close();\r\n\t\t\t},\r\n\t\t\tfocus: true,\r\n\t\t\ttranslateLabel: true\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport const ALERT_CONFIGURATIONS: InjectionToken<{[key: string]: AlertConfiguration}> = new InjectionToken('Alert configurations predefined', {\r\n factory: (): {[key: string]: AlertConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { PredefinedDialogs } from \"../interfaces\";\r\n\r\nexport const CF_PREDEFINED_DIALOGS: InjectionToken<PredefinedDialogs> = new InjectionToken('Predefined dialogs', {\r\n factory: () => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { ConfirmConfiguration } from \"../interfaces\";\r\n\r\nexport const CONFIRM_CONFIGURATIONS: InjectionToken<{[key: string]: ConfirmConfiguration}> = new InjectionToken('Confirm configurations predefined', {\r\n factory: (): {[key: string]: ConfirmConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { ComponentRef, Type } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogRef } from \"./classes/dialog.ref.class\";\r\n\r\nexport interface DialogComponentRefContainer {\r\n componentRef: ComponentRef<any>;\r\n container: HTMLDivElement;\r\n\topenIndex: number;\r\n}\r\n\r\nexport type PredefinedDialogs = {[key: string]: (() => Promise<Type<any>>) | {component: () => Promise<Type<any>>, configuration: DialogConfiguration}};\r\n\r\nexport interface DialogConfiguration {\r\n showCloseIcon?: boolean;\r\n\tbeforeClose?: CfDialogConfigurationBeforeClose;\r\n\tignoreKeyUp?: boolean;\r\n data?: any;\r\n noPadding?: boolean;\r\n\tkeepActiveElement?: boolean;\r\n\tcontainerClasses?: string[];\r\n\tdialogClasses?: string[];\r\n\ttitle?: string | null;\r\n contentElement?: Element | null;\r\n single?: boolean;\r\n width?: string | null;\r\n\theight?: string | null;\r\n}\r\n\r\nexport type CfDialogConfigurationBeforeClose = null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean>;\r\n\r\nexport interface ConfirmConfiguration {\r\n title: string;\r\n text: string;\r\n acceptText: string;\r\n declineText: string;\r\n\thideDeclineButton?: boolean;\r\n switchButtonColors?: boolean;\r\n acceptTimeout?: number;\r\n acceptValidationText?: string;\r\n acceptValidationMode?: AcceptValidationMode;\r\n acceptValidationLabel?: string;\r\n}\r\n\r\nexport interface AlertConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbutton?: Partial<AlertButtonConfiguration>;\r\n}\r\n\r\nexport enum AcceptValidationMode {\r\n PATTERN = 'PATTERN',\r\n TEXT = 'TEXT'\r\n}\r\n\r\nexport interface AlertButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback: (params: {dialogRef: DialogRef}) => void;\r\n\ttranslateLabel: boolean;\r\n\tfocus: boolean;\r\n}\r\n\r\nexport interface CfDialogCloseParams {\r\n message?: MessagePartial;\r\n}\r\n\r\nexport interface MessagePartial extends Partial<MessageConfiguration> {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport interface MessageConfiguration {\r\n closeable: boolean;\r\n position: MessagePosition;\r\n lifetime: number | null;\r\n severity: MessageSeverity;\r\n\tkeepOnHover: boolean;\r\n}\r\nexport enum MessagePosition {\r\n TOP = 'top',\r\n BOTTOM = 'bottom'\r\n}\r\n\r\nexport enum MessageSeverity {\r\n SUCCESS = 'success',\r\n WARNING = 'warning',\r\n DANGER = 'danger',\r\n INFO = 'info'\r\n}\r\n\r\nexport interface LoadingConfiguration {\r\n title: string;\r\n text: string;\r\n\tloadingIcon?: string;\r\n iconSize?: number;\r\n}\r\n\r\nexport interface ModalWithButtonsConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbuttons: ButtonConfiguration[];\r\n}\r\n\r\nexport interface ButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback?: (params: {dialogRef: DialogRef}) => void;\r\n\trouterLink?: any;\r\n\tfocus?: boolean;\r\n\tpermission?: string | string[];\r\n\ttranslateLabel?: boolean;\r\n}\r\n\r\nexport interface Message extends MessageConfiguration {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport enum LogLevel {\r\n All = 0,\r\n Debug = 1,\r\n Info = 2,\r\n Warn = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n Off = 6\r\n}\r\n\r\nexport enum TokenServiceMode {\r\n LOCALSTORAGE = 0,\r\n SESSIONSTORAGE = 1,\r\n COOKIE = 2\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { MessageConfiguration, MessagePosition, MessageSeverity } from \"../interfaces\";\r\n\r\nexport const MESSAGE_DEFAULT_CONFIGURATION: InjectionToken<MessageConfiguration> = new InjectionToken('Message default configuration', {\r\n\tfactory: (): MessageConfiguration => {\r\n\t\treturn {\r\n\t\t\tcloseable: true,\r\n\t\t\tlifetime: 3000,\r\n\t\t\tposition: MessagePosition.TOP,\r\n\t\t\tseverity: MessageSeverity.SUCCESS,\r\n\t\t\tkeepOnHover: false\r\n\t\t};\r\n\t}\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { LogLevel } from \"../interfaces\";\r\n\r\nexport const LOG_LEVEL: InjectionToken<LogLevel> = new InjectionToken('Log level', {\r\n factory: (): LogLevel => {\r\n return LogLevel.All;\r\n }\r\n});\r\n","import { isPlatformBrowser } from '@angular/common';\r\nimport {\r\n ApplicationRef,\r\n ComponentRef,\r\n createComponent,\r\n EmbeddedViewRef,\r\n inject,\r\n Injectable,\r\n Injector,\r\n PLATFORM_ID,\r\n Type\r\n} from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { filter, Subscription } from 'rxjs';\r\nimport { AlertConfiguration, DialogConfiguration, ConfirmConfiguration, LoadingConfiguration, ModalWithButtonsConfiguration, PredefinedDialogs, DialogComponentRefContainer } from '../interfaces';\r\nimport { DialogConfig, DialogInjector, DialogRef } from '../classes';\r\nimport { ALERT_CONFIGURATIONS, CF_PREDEFINED_DIALOGS, CONFIRM_CONFIGURATIONS } from '../tokens';\r\nimport { MessageService } from '../services';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DialogService {\r\n\r\n\tprivate injector: Injector = inject(Injector);\r\n\tprivate predefinedConfirmConfigurations: {[key: string]: ConfirmConfiguration} = inject(CONFIRM_CONFIGURATIONS);\r\n\tprivate predefinedAlertConfigurations: {[key: string]: AlertConfiguration} = inject(ALERT_CONFIGURATIONS);\r\n\tprivate predefinedDialogs: PredefinedDialogs = inject(CF_PREDEFINED_DIALOGS);\r\n\r\n\ttitle: Title = inject(Title);\r\n\tmessageService: MessageService = inject(MessageService);\r\n\r\n\tdialogs: Map<DialogRef, DialogComponentRefContainer> = new Map();\r\n\topenIndex: number = 1;\r\n\tplatformId: Object = inject(PLATFORM_ID);\r\n\r\n constructor() {\r\n\t\tif (isPlatformBrowser(this.platformId)) {\r\n\t\t\tdocument.addEventListener(\"keyup\", (keyboardEvent: KeyboardEvent) => {\r\n\t\t\t\tif (keyboardEvent.key.toLowerCase() === 'escape') {\r\n\t\t\t\t\tlet lastOpenIndex: number = 0;\r\n\t\t\t\t\tlet lastOpenedDialogRef: DialogRef | null = null;\r\n\t\t\t\t\tfor (const [dialogRef, cfDialogComponentRefContainer] of this.dialogs.entries()) {\r\n\t\t\t\t\t\tif (cfDialogComponentRefContainer.openIndex > lastOpenIndex) {\r\n\t\t\t\t\t\t\tlastOpenIndex = cfDialogComponentRefContainer.openIndex;\r\n\t\t\t\t\t\t\tlastOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif (lastOpenedDialogRef !== null && lastOpenedDialogRef.dialogConfig !== null) {\r\n\t\t\t\t\t\tif (lastOpenedDialogRef.dialogConfig.ignoreKeyUp || document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tlastOpenedDialogRef.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tasync openPredefined<T = any>(name: string, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\tif (this.predefinedDialogs[name] === undefined) {\r\n\t\t\tthrow Error('Dialog with name \"' + name + '\" not found!');\r\n\t\t}\r\n\t\tconst predefinedDialog = this.predefinedDialogs[name];\r\n\t\tif (typeof predefinedDialog === 'function') {\r\n\t\t\treturn this.openImport(predefinedDialog, dialogConfiguration);\r\n\t\t}\r\n\t\treturn this.openImport(predefinedDialog.component, {...predefinedDialog.configuration, ...dialogConfiguration});\r\n\t}\r\n\r\n\tasync openImport<T = any>(component: () => Promise<Type<any>>, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\treturn new Promise(async (resolve) => {\r\n\t\t\tresolve(this.open<T>(await component(), dialogConfiguration));\r\n\t\t});\r\n\t}\r\n\r\n open<T = any>(component: Type<any>, dialogConfiguration: DialogConfiguration = {}): DialogRef<T> {\r\n\r\n\t\tfor (let dialog of this.dialogs.entries()) {\r\n\t\t\tif (\r\n\t\t\t\t(dialogConfiguration.single && dialog[1].componentRef.componentType.name === component.name) ||\r\n\t\t\t\t(dialog[0].dialogConfig !== null && dialog[0].dialogConfig.single && dialog[1].componentRef.componentType.name === component.name)\r\n\t\t\t) {\r\n\t\t\t\treturn dialog[0];\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogConfig: DialogConfig = this.createDialogConfig(dialogConfiguration);\r\n\r\n\t\tif (!dialogConfig.keepActiveElement) {\r\n\t\t\tif (document.activeElement instanceof HTMLElement) {\r\n\t\t\t\tdocument.activeElement.blur();\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogRef: DialogRef<T> = this.appendToBody(component, dialogConfig);\r\n\t\tdialogRef.messageService = this.messageService;\r\n\t\tdialogRef.dialogConfig = dialogConfig;\r\n\r\n\t\tthis.changeAndStoreTitle(dialogRef);\r\n\r\n return dialogRef;\r\n }\r\n\r\n\tchangeAndStoreTitle(dialogRef: DialogRef): void {\r\n\t\tdialogRef.savedTitle = this.title.getTitle();\r\n\t\tif (dialogRef.dialogConfig !== null && dialogRef.dialogConfig.title !== null) {\r\n\t\t\tthis.title.setTitle(dialogRef.dialogConfig.title);\r\n\t\t}\r\n\t}\r\n\r\n createDialogConfig(dialogConfiguration: DialogConfiguration): DialogConfig {\r\n const dialogConfig: DialogConfig = new DialogConfig();\r\n if (dialogConfiguration.showCloseIcon !== undefined) {\r\n dialogConfig.showCloseIcon = dialogConfiguration.showCloseIcon;\r\n }\r\n\t\tif (dialogConfiguration.beforeClose !== undefined) {\r\n dialogConfig.beforeClose = dialogConfiguration.beforeClose;\r\n }\r\n\t\tif (dialogConfiguration.ignoreKeyUp !== undefined) {\r\n dialogConfig.ignoreKeyUp = dialogConfiguration.ignoreKeyUp;\r\n }\r\n if (dialogConfiguration.data !== undefined) {\r\n dialogConfig.data = dialogConfiguration.data;\r\n }\r\n if (dialogConfiguration.noPadding !== undefined) {\r\n dialogConfig.noPadding = dialogConfiguration.noPadding;\r\n }\r\n\t\tif (dialogConfiguration.keepActiveElement !== undefined) {\r\n\t\t\tdialogConfig.keepActiveElement = dialogConfiguration.keepActiveElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.containerClasses !== undefined) {\r\n\t\t\tdialogConfig.containerClasses = dialogConfiguration.containerClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.dialogClasses !== undefined) {\r\n\t\t\tdialogConfig.dialogClasses = dialogConfiguration.dialogClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.title !== undefined) {\r\n\t\t\tdialogConfig.title = dialogConfiguration.title;\r\n\t\t}\r\n\t\tif (dialogConfiguration.contentElement !== undefined) {\r\n\t\t\tdialogConfig.contentElement = dialogConfiguration.contentElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.single !== undefined) {\r\n\t\t\tdialogConfig.single = dialogConfiguration.single;\r\n\t\t}\r\n\t\tif (dialogConfiguration.width !== undefined) {\r\n\t\t\tdialogConfig.width = dialogConfiguration.width;\r\n\t\t}\r\n\t\tif (dialogConfiguration.height !== undefined) {\r\n\t\t\tdialogConfig.height = dialogConfiguration.height;\r\n\t\t}\r\n return dialogConfig;\r\n }\r\n\r\n appendToBody(component: Type<any>, dialogConfig: DialogConfig): DialogRef {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n // CREATE INJECTION TOKENS\r\n const tokens: WeakMap<any, any> = new WeakMap();\r\n\r\n // CREATE DIALOG CONFIGURATION CLASS\r\n tokens.set(DialogConfig, dialogConfig);\r\n\r\n // CREATE DIALOG REFERENCE CLASS\r\n const dialogRef: DialogRef = new DialogRef();\r\n tokens.set(DialogRef, dialogRef);\r\n\r\n // LISTEN ON DIALOG CLOSE\r\n const closeSub: Subscription = dialogRef.onClose.subscribe(() => {\r\n this.removeFromBody(dialogRef);\r\n closeSub.unsubscribe();\r\n });\r\n\r\n // CREATE COMPONENT REF\r\n const componentRef: ComponentRef<any> = createComponent(component, {\r\n\t\t\tenvironmentInjector: appRef.injector,\r\n\t\t\telementInjector: new DialogInjector(this.injector, tokens)\r\n\t\t});\r\n\r\n // ATTACH VIEW TO ANGULAR\r\n appRef.attachView(componentRef.hostView);\r\n\r\n // CREATE DIALOG CONTAINER ELEMENT\r\n const dialogContainer: HTMLDivElement = document.createElement('div');\r\n dialogContainer.classList.add('cf-dialog-container');\r\n\t\tif (dialogConfig.containerClasses.length > 0) {\r\n\t\t\tdialogContainer.classList.add(...dialogConfig.containerClasses);\r\n\t\t}\r\n\r\n\t\t// APPEND DOM ELEMENT TO DIALOG\r\n\t\tconst childDomElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n\t\tchildDomElem.classList.add('cf-dialog');\r\n\t\t\r\n\t\tif (dialogConfig.width !== null) {\r\n\t\t\tchildDomElem.style.width = dialogConfig.width;\r\n\t\t}\r\n\t\tif (dialogConfig.height !== null) {\r\n\t\t\tchildDomElem.style.height = dialogConfig.height;\r\n\t\t}\r\n\t\tif (dialogConfig.noPadding) {\r\n childDomElem.classList.add('no-padding');\r\n }\r\n\t\tif (dialogConfig.dialogClasses.length > 0) {\r\n\t\t\tchildDomElem.classList.add(...dialogConfig.dialogClasses);\r\n\t\t}\r\n\r\n\t\tif (dialogConfig.contentElement !== null) {\r\n\t\t\tchildDomElem.appendChild(dialogConfig.contentElement);\r\n\t\t}\r\n\r\n\t\tdialogContainer.appendChild(childDomElem);\r\n\r\n // CLOSEABLE? APPEND BUTTON\r\n if (dialogConfig.showCloseIcon) {\r\n const closeElement: HTMLDivElement = document.createElement('div');\r\n closeElement.classList.add(...['cf-dialog-close', 'remixicon', 'close-line']);\r\n closeElement.onclick = () => {\r\n dialogRef.close();\r\n };\r\n childDomElem.appendChild(closeElement);\r\n }\r\n\r\n // APPEND DIALOG CONTAINER TO BODY\r\n document.body.appendChild(dialogContainer);\r\n\r\n this.dialogs.set(dialogRef, {\r\n componentRef,\r\n container: dialogContainer,\r\n\t\t\topenIndex: this.openIndex \r\n });\r\n\r\n\t\tthis.openIndex++;\r\n\r\n return dialogRef;\r\n }\r\n\r\n removeFromBody(dialogRef: DialogRef): void {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n if (!dialogRef || !this.dialogs.has(dialogRef)) {\r\n return;\r\n }\r\n const dialogComponentRefContainer: DialogComponentRefContainer | undefined = this.dialogs.get(dialogRef);\r\n if (dialogComponentRefContainer == undefined) {\r\n return;\r\n }\r\n\t\t\r\n appRef.detachView(dialogComponentRefContainer.componentRef.hostView);\r\n\r\n if (dialogComponentRefContainer.container !== null) {\r\n dialogComponentRefContainer.container.remove();\r\n }\r\n dialogComponentRefContainer.componentRef.destroy();\r\n this.dialogs.delete(dialogRef);\r\n\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.openIndex = 1;\r\n\t\t}\r\n\r\n\t\t// Restore title\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t} else {\r\n\t\t\tlet latestOpenedDialogRef: DialogRef | null = null;\r\n\t\t\tthis.dialogs.forEach((_, dialogRef: DialogRef) => {\r\n\t\t\t\tif (latestOpenedDialogRef === null) {\r\n\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (latestOpenedDialogRef.opened < dialogRef.opened) {\r\n\t\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tif (latestOpenedDialogRef !== null) {\r\n\t\t\t\t//this.title.setTitle(latestOpenedDialogRef.savedTitle);\r\n\t\t\t} else {\r\n\t\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n\tconfirm(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedConfirmConfiguration: ConfirmConfiguration | undefined = this.predefinedConfirmConfigurations[configuration];\r\n\t\t\tif (predefinedConfirmConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined confirm configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedConfirmConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.pipe(filter(value => value !== undefined)).subscribe((accepted: boolean) => {\r\n\t\t\t\tif (accepted) {\r\n\t\t\t\t\tresolve(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treject(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n async confirmAsync(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n return await new Promise((resolve) => {\r\n this.confirm(configuration, dialogConfiguration, component).then(() => {\r\n resolve(true);\r\n }).catch(() => {\r\n resolve(false);\r\n });\r\n });\r\n }\r\n\t\r\n\tconfirmAccept(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => resolve(true)).catch(() => {});\r\n\t\t});\r\n\t}\r\n\t\r\n\tconfirmDecline(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => {}).catch(() => resolve(true));\r\n\t\t});\r\n\t}\r\n\r\n\tshowLoading(\r\n\t\tconfiguration: LoadingConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tshowCloseIcon: false,\r\n\t\t\tignoreKeyUp: true,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tshowAlert(\r\n\t\tconfiguration: AlertConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<void> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedAlertConfiguration: AlertConfiguration | undefined = this.predefinedAlertConfigurations[configuration];\r\n\t\t\tif (predefinedAlertConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined alert configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedAlertConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\treturn this.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.subscribe(() => {\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tshowModalWithButtons(\r\n\t\tconfiguration: ModalWithButtonsConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { Subject, Subscription, timer } from 'rxjs';\r\nimport { Message, MessageConfiguration, MessageSeverity } from '../interfaces';\r\nimport { MESSAGE_DEFAULT_CONFIGURATION } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class MessageService {\r\n\r\n /**\r\n * Default configuration\r\n * \r\n * Can be changed if you overwrite it or use the `MESSAGE_DEFAULT_CONFIGURATION` InjectionToken\r\n */\r\n public defaultConfiguration: MessageConfiguration = inject(MESSAGE_DEFAULT_CONFIGURATION);\r\n \r\n /**\r\n * Message subject\r\n */\r\n private messageSubject: Subject<Message> = new Subject();\r\n\r\n /**\r\n * Show\r\n * \r\n * Displays message with the given configuration\r\n * \r\n * @param messageConfiguration `Partial<MessageConfiguration>`\r\n */\r\n public show(title: string, message: string, configuration?: Partial<MessageConfiguration>): void {\r\n this.messageSubject.next({\r\n\t\t\t...this.defaultConfiguration,\r\n ...configuration,\r\n\t\t\ttitle,\r\n\t\t\tmessage\r\n });\r\n }\r\n\r\n /**\r\n * Show success message\r\n * \r\n * Display a message with default success severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showSuccessMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.SUCCESS\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show danger message\r\n * \r\n * Display a message with default danger severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showDangerMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.DANGER,\r\n\t\t\tkeepOnHover: true\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show warning message\r\n * \r\n * Display a message with default warning severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showWarningMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.WARNING\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show info message\r\n * \r\n * Display a message with default info severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showInfoMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.INFO\r\n\t\t});\r\n\t}\r\n\r\n private showMessage(message: Message): void {\r\n let container: HTMLElement | null = document.getElementById('cf-toasts-' + message.position + '-container');\r\n if (container === null) {\r\n container = document.createElement('div');\r\n container.id = 'cf-toasts-' + message.position + '-container';\r\n document.body.appendChild(container);\r\n }\r\n\r\n const div: HTMLElement = this.createMessageHtmlElement(message);\r\n\r\n container.appendChild(div);\r\n\r\n if (message.lifetime !== null) {\r\n\r\n\t\t\tlet disposeTimerSubscription: Subscription | null = timer(message.lifetime + 500).subscribe(() => {\r\n\t\t\t\tthis.hideMessage(div);\r\n\t\t\t});\r\n\r\n\t\t\tif (message.keepOnHover) {\r\n\t\t\t\tdiv.addEventListener('mouseenter', () => {\r\n\t\t\t\t\tif (disposeTimerSubscription !== null) {\r\n\t\t\t\t\t\tdisposeTimerSubscription.unsubscribe();\r\n\t\t\t\t\t\tdisposeTimerSubscription = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n }\r\n }\r\n\r\n private createMessageHtmlElement(message: Message): HTMLElement {\r\n const div: HTMLElement = document.createElement('div');\r\n div.classList.add('cf-toast', 'cf-' + message.severity + '-toast');\r\n const titleDiv: HTMLElement = document.createElement('div');\r\n titleDiv.classList.add('cf-toast-title');\r\n titleDiv.innerText = message.title;\r\n const messageDiv: HTMLElement = document.createElement('div');\r\n messageDiv.classList.add('cf-toast-message');\r\n messageDiv.innerText = message.message;\r\n div.appendChild(titleDiv);\r\n div.appendChild(messageDiv);\r\n if (message.closeable) {\r\n const closeIcon: HTMLElement = document.createElement('i');\r\n closeIcon.classList.add('close-icon', 'remixicon', 'close-line');\r\n closeIcon.onclick = () => {\r\n this.hideMessage(div, true);\r\n };\r\n div.appendChild(closeIcon);\r\n }\r\n return div;\r\n }\r\n\r\n private hideMessage(messageElement: HTMLElement, forceClose: boolean = false): void {\r\n messageElement.classList.add('hidden-toast');\r\n\r\n let remainOpen = false;\r\n messageElement.addEventListener('mouseenter', (() => {\r\n remainOpen = true;\r\n }));\r\n\r\n timer(500).subscribe(() => {\r\n if (remainOpen && !forceClose) {\r\n messageElement.classList.remove('hidden-toast');\r\n return;\r\n }\r\n messageElement.removeEventListener('mouseenter', (() => {}));\r\n messageElement.remove();\r\n });\r\n }\r\n\r\n constructor() {\r\n this.messageSubject.subscribe((message: Message) => {\r\n this.showMessage(message);\r\n });\r\n }\r\n\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { LogLevel } from '../interfaces';\r\nimport { LOG_LEVEL } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class LoggerService {\r\n\r\n\tprivate _logLevel: LogLevel | null = inject(LOG_LEVEL);\r\n\r\n\tprivate logLevelColors: string[] = [\r\n\t\t'',\r\n\t\t'background-color: #D2BDF3; padding: 5px 10px;',\r\n\t\t'background-color: #A2DDFF; padding: 5px 10px;',\r\n\t\t'background-color: #FFD5C5; padding: 5px 10px;',\r\n\t\t'background-color: #EA4331; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t'background-color: #F71900; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t''\r\n\t];\r\n\r\n\tpublic debug(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Debug, group });\r\n\t}\r\n\r\n\tpublic info(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Info, group });\r\n\t}\r\n\r\n\tpublic warn(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Warn, group });\r\n\t}\r\n\r\n\tpublic error(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Error, group });\r\n\t}\r\n\r\n\tpublic fatal(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Fatal, group });\r\n\t}\r\n\r\n\tpublic groupEnd(): void {\r\n\t\tconsole.groupEnd();\r\n\t}\r\n\r\n\tprivate log(configuration: {\r\n\t\tlog: any,\r\n\t\tlogLevel: LogLevel,\r\n\t\tgroup: boolean\r\n\t}): void {\r\n\t\tif (this._logLevel === null || this._logLevel === LogLevel.Off || this._logLevel > configuration.logLevel) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (configuration.group) {\r\n\t\t\tconsole.group(configuration.log);\r\n\t\t} else {\r\n\t\t\tconsole.log('%c' + configuration.log, this.logLevelColors[configuration.logLevel]);\r\n\t\t}\r\n\t}\r\n\r\n\tset logLevel(logLevel: LogLevel | null) {\r\n\t\tthis._logLevel = logLevel;\r\n\t}\r\n\r\n\tget logLevel(): LogLevel | null {\r\n\t\treturn this._logLevel;\r\n\t}\r\n}\r\n","import { HttpClient, HttpParams } from \"@angular/common/http\";\r\nimport { inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { LoggerService } from \"./logger.service\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApiService {\r\n\r\n\thttpClient: HttpClient = inject(HttpClient);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\tprivate _apiBaseUrl: string | null = null;\r\n\r\n\tpublic post<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.post<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic get<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic getFileArrayBuffer(endPoint: (string|number)[]): Observable<ArrayBuffer> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'arraybuffer'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getFileText(endPoint: (string|number)[]): Observable<string> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'text'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getWithHttpParams<T>(endPoint: (string|number)[], params: HttpParams | null = null): Observable<any> {\r\n\t\tif (params === null) {\r\n\t\t\treturn this.get(endPoint);\r\n\t\t} else {\r\n\t\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint), {\r\n\t\t\t\tparams\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tpublic delete<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.delete<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic patch<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.patch<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic head<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.head<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic options<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.options<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic put<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.put<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic generateUrl(endPoint: (string|number)[]): string {\r\n\t\tif (this._apiBaseUrl === null) {\r\n\t\t\tthrow new Error('No API base url set in generateUrl call!');\r\n\t\t}\r\n if (endPoint.length === 0) {\r\n return this._apiBaseUrl;\r\n }\r\n\t\tif (typeof endPoint[0] === 'string' && endPoint[0].startsWith('#')) {\r\n endPoint[0] = endPoint[0].slice(1);\r\n\t\t\treturn endPoint.map((v, i) => i === 0 ? v : encodeURIComponent(v)).join('/');\r\n\t\t}\r\n\t\treturn [this._apiBaseUrl, ...endPoint.map((v) => encodeURIComponent(v))].join('/');\r\n\t}\r\n\r\n\tset apiBaseUrl(apiBaseUrl: string) {\r\n\t\tthis.loggerService.info('Api Service base url set to: ' + apiBaseUrl);\r\n\t\tif (apiBaseUrl[apiBaseUrl.length - 1] === '/') {\r\n\t\t\tapiBaseUrl = apiBaseUrl.slice(0, apiBaseUrl.length - 1);\r\n\t\t}\r\n\t\tthis._apiBaseUrl = apiBaseUrl;\r\n\t}\r\n\r\n\tget apiBaseUrl(): string | null {\r\n\t\treturn this._apiBaseUrl;\r\n\t}\r\n}\r\n","import { DOCUMENT, isPlatformBrowser } from \"@angular/common\";\r\nimport { inject, PLATFORM_ID } from \"@angular/core\";\r\n\r\nexport function isBrowser(): boolean {\r\n\tconst platformId: Object = inject(PLATFORM_ID);\r\n\treturn isPlatformBrowser(platformId);\r\n}\r\n\r\nexport function localStorage(): Storage | null {\r\n\tconst document: Document = inject(DOCUMENT);\r\n\tif (document.defaultView !== null) {\r\n\t\treturn document.defaultView.window.localStorage;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nexport function sessionStorage(): Storage | null {\r\n\tconst document: Document = inject(DOCUMENT);\r\n\tif (document.defaultView !== null) {\r\n\t\treturn document.defaultView.window.sessionStorage;\r\n\t}\r\n\treturn null;\r\n}","import { DOCUMENT } from \"@angular/common\";\r\nimport { Injectable, inject } from \"@angular/core\";\r\nimport { isBrowser } from \"../helpers\";\r\nimport { LoggerService } from \"./logger.service\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class CookieService {\r\n\r\n\tbrowser: boolean = isBrowser();\r\n\tdocument: Document = inject(DOCUMENT);\r\n\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\t/**\r\n\t * Get the value of a cookie by name, returns `null` if the cookie is not set\r\n\t * \r\n\t * @param name name of the cookie\r\n\t * @returns value of the cookie\r\n\t */\r\n\tget(name: string): string | null {\r\n\t\tif (!this.browser) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst cookies: {[key: string]: string} = this.cookies;\r\n\t\treturn cookies[name] || null;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the value of a cookie with the given name\r\n\t * \r\n\t * @param name name of the cookie\r\n\t * @param value value of the cookie\r\n\t * @param expire expire of the cookie in seconds, if null, it will never expire\r\n\t * @param path path of the cookie, default is '/'\r\n\t * @param config optional configuration values (expire in seconds, path of cookie)\r\n\t */\r\n\tset(name: string, value: string, expire: number | null = null, path: string | null = '/'): void {\r\n\r\n\t\tif (!this.browser) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (path === null) {\r\n\t\t\tpath = '/';\r\n\t\t}\r\n\r\n\t\t// Default cookie informations\r\n\t\tlet cookie: string = `${name}=${value};`;\r\n\r\n\t\t// If we have an expire date, we need to set\r\n\t\tif (expire !== null) {\r\n\t\t\tlet d: Date = new Date();\r\n\t\t\td.setTime(d.getTime() + (expire * 1000));\r\n\t\t\tcookie += `expires=${d.toUTCString()};`;\r\n\t\t}\r\n\r\n\t\t// Set path\r\n\t\tcookie += `path=${path};`;\r\n\r\n\t\t// Log\r\n\t\tthis.loggerService.info('Cookie data to set: ' + cookie);\r\n\r\n\t\t// Set the cookie\r\n\t\tthis.document.cookie = cookie;\r\n\t}\r\n\r\n\t/**\r\n\t * Delete a cookie by its name\r\n\t * \r\n\t * @param name name of the cookie\r\n\t */\r\n\tdelete(name: string): void {\r\n\t\tif (!this.browser) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.set(name, '', -1);\r\n\t}\r\n\r\n\tget cookies(): {[key: string]: string} {\r\n\r\n\t\tif (!this.browser) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\r\n\t\tconst cookies: string = this.document.cookie;\r\n\t\tif (cookies.length === 0) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\t\tconst cookiesArray: string[] = cookies.split(';');\r\n\t\tconst cookiesObject: {[key: string]: string} = {};\r\n\t\tcookiesArray.forEach((cookiesArrayItem: string) => {\r\n\t\t\tconst cookiesArrayItemSplit: string[] = cookiesArrayItem.split('=');\r\n\t\t\tcookiesObject[cookiesArrayItemSplit[0].trim()] = cookiesArrayItemSplit[1];\r\n\t\t})\r\n\t\treturn cookiesObject;\r\n\t}\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { TokenServiceMode } from '../interfaces';\r\nimport { isBrowser, localStorage, sessionStorage } from '../helpers';\r\nimport { CookieService } from './cookie.service';\r\nimport { LoggerService } from './logger.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenService {\r\n\r\n\tcookieService: CookieService = inject(CookieService);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\tlocalStorage: Storage | null = localStorage();\r\n\tsessionStorage: Storage | null = sessionStorage();\r\n\tisBrowser: boolean = isBrowser();\r\n\r\n\tcookiePath: string | null = null;\r\n\taccessToken: string | null = null;\r\n\taccessTokenKey = 'acccessToken';\r\n\taccessTokenCookieExpireDays = 30;\r\n\r\n\tpublic write(mode: TokenServiceMode | null): void {\r\n\t\tif (this.accessToken === null) {\r\n\t\t\tthis.loggerService.error('No accessToken set to write!');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token write!');\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.localStorage !== null) {\r\n\t\t\t\t\tthis.localStorage.setItem(this.accessTokenKey, this.accessToken);\r\n\t\t\t\t\tthis.loggerService.debug('Token set to local storage: ' + this.accessToken);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to set localStorage on not a browser platform!');\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.sessionStorage.setItem(this.accessTokenKey, this.accessToken);\r\n\t\t\t\t\tthis.loggerService.debug('Token set to session storage: ' + this.accessToken);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to set sessionStorage on not a browser platform!');\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.COOKIE:\r\n\t\t\t\tthis.cookieService.set(this.accessTokenKey, this.accessToken, this.accessTokenCookieExpireDays * 24 * 60 * 60, this.cookiePath);\r\n\t\t\t\tthis.loggerService.debug('Token set to cookie: ' + this.accessToken);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t}\r\n\r\n\tpublic read(mode: TokenServiceMode | null): string | null {\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token read!');\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tthis.loggerService.debug('Trying to read token from local storage');\r\n\t\t\t\tif (this.isBrowser && this.localStorage !== null) {\r\n\t\t\t\t\tconst tokenLocalStorage: string | null = this.localStorage.getItem(this.accessTokenKey);\r\n\t\t\t\t\tif (tokenLocalStorage !== null) {\r\n\t\t\t\t\t\tthis.loggerService.debug('Token read from local storage: ' + tokenLocalStorage);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tokenLocalStorage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to read from localStorage on not a browser platform!');\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Trying to read token from session storage');\r\n\t\t\t\t\tconst tokenSessionStorage: string | null = this.sessionStorage.getItem(this.accessTokenKey);\r\n\t\t\t\t\tif (tokenSessionStorage !== null) {\r\n\t\t\t\t\t\tthis.loggerService.debug('Token read from session storage: ' + tokenSessionStorage);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tokenSessionStorage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to read from sessionStorage on not a browser platform!');\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\tcase TokenServiceMode.COOKIE: {\r\n\t\t\t\tthis.loggerService.debug('Trying to read token from session cookie');\r\n\t\t\t\tconst cookieAccessToken: string | null = this.cookieService.get(this.accessTokenKey);\r\n\t\t\t\tif (cookieAccessToken !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token read from cookie: ' + cookieAccessToken);\r\n\t\t\t\t}\r\n\t\t\t\treturn cookieAccessToken;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic delete(mode: TokenServiceMode | null): void {\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token delete!');\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tif (this.localStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token deleted from local storage');\r\n\t\t\t\t\tthis.localStorage.removeItem(this.accessTokenKey);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token deleted from session storage');\r\n\t\t\t\t\tthis.sessionStorage.removeItem(this.accessTokenKey);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.COOKIE: {\r\n\t\t\t\tthis.loggerService.debug('Token deleted from cookie');\r\n\t\t\t\tthis.cookieService.delete(this.accessTokenKey);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.accessToken = null;\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,SAAS,CAAA;AAAtB,IAAA,WAAA,GAAA;QACC,IAAc,CAAA,cAAA,GAA0B,IAAI,CAAC;QAC1C,IAAY,CAAA,YAAA,GAAwB,IAAI,CAAC;AAC3B,QAAA,IAAA,CAAA,QAAQ,GAAiB,IAAI,OAAO,EAAO,CAAC;AAC1D,QAAA,IAAA,CAAA,OAAO,GAA8B,IAAI,CAAC,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lib/classes/dialog.ref.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.config.class.ts","../../../projects/codefoxcore/src/lib/classes/dialog.injector.class.ts","../../../projects/codefoxcore/src/lib/tokens/alert.token.ts","../../../projects/codefoxcore/src/lib/tokens/dialog.token.ts","../../../projects/codefoxcore/src/lib/tokens/confirm.token.ts","../../../projects/codefoxcore/src/lib/interfaces.ts","../../../projects/codefoxcore/src/lib/tokens/message.token.ts","../../../projects/codefoxcore/src/lib/tokens/loglevel.token.ts","../../../projects/codefoxcore/src/lib/services/dialog.service.ts","../../../projects/codefoxcore/src/lib/services/message.service.ts","../../../projects/codefoxcore/src/lib/services/logger.service.ts","../../../projects/codefoxcore/src/lib/services/api.service.ts","../../../projects/codefoxcore/src/lib/helpers.ts","../../../projects/codefoxcore/src/lib/services/cookie.service.ts","../../../projects/codefoxcore/src/lib/services/token.service.ts","../../../projects/codefoxcore/src/lib/services/interceptors.service.ts","../../../projects/codefoxcore/src/lib/interceptors/base.interceptor.ts","../../../projects/codefoxcore/src/lib/interceptors/token.interceptor.ts","../../../projects/codefoxcore/src/lib/providers.ts","../../../projects/codefoxcore/src/codefoxcore.ts"],"sourcesContent":["import { filter, Observable, Subject, takeUntil } from \"rxjs\";\r\nimport { CfDialogCloseParams } from \"../interfaces\";\r\nimport { MessageService } from \"../services\";\r\nimport { DialogConfig } from \"../classes\";\r\n\r\nexport class DialogRef<T = any> {\r\n\tmessageService: MessageService | null = null;\r\n dialogConfig: DialogConfig | null = null;\r\n\tprivate readonly _onClose: Subject<any> = new Subject<any>();\r\n onClose: Observable<T | undefined> = this._onClose.asObservable();\r\n onCloseValue: Observable<T> = this._onClose.pipe(filter(result => result !== undefined && result !== null));\r\n onCloseOnValue: (value: any) => Observable<any> = (value: any) => this._onClose.pipe(filter(result => result === value));\r\n private readonly _onMessage: Subject<any> = new Subject<any>();\r\n\tonMessage: Observable<any> = this._onMessage.asObservable();\r\n private readonly _onDestroy = new Subject<any>();\r\n onDestroy: Observable<any> = this._onDestroy.asObservable();\r\n\tsavedTitle: string = '';\r\n\ttitle: string | null = null;\r\n\topened: Date = new Date();\r\n\tprivate doClose(result?: any, params: CfDialogCloseParams = {}): void {\r\n\t\tif (params.message !== undefined && this.messageService !== null) {\r\n\t\t\tthis.messageService.show(params.message.title, params.message.message, params.message);\r\n\t\t}\r\n\t\tthis._onClose.next(result); \r\n\t}\r\n close(result?: any, params: CfDialogCloseParams = {}): void { \r\n\t\tif (this.dialogConfig === null || this.dialogConfig.beforeClose === null) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (this.dialogConfig.beforeClose instanceof Promise) {\r\n\t\t\tthis.dialogConfig.beforeClose.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this.dialogConfig.beforeClose instanceof Observable) {\r\n\t\t\tthis.dialogConfig.beforeClose.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tconst beforeCloseResult: boolean | Observable<boolean> | Promise<boolean> = this.dialogConfig.beforeClose();\r\n\r\n\t\tif (beforeCloseResult instanceof Promise) {\r\n\t\t\tbeforeCloseResult.then((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t}).catch(() => {});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult instanceof Observable) {\r\n\t\t\tbeforeCloseResult.pipe(takeUntil(this._onClose)).subscribe((value: boolean) => {\r\n\t\t\t\tif (value) {\r\n\t\t\t\t\tthis.doClose(result, params);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (beforeCloseResult) {\r\n\t\t\tthis.doClose(result, params);\r\n\t\t}\r\n\t}\r\n forceClose(result?: any): void {\r\n this.doClose(result);\r\n }\r\n\tmessage(message: any): void { this._onMessage.next(message); }\r\n destroy(): void { this._onDestroy.next(undefined); }\r\n}\r\n","import { ResolveData } from \"@angular/router\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogConfiguration } from \"../interfaces\";\r\n\r\nexport class DialogConfig implements DialogConfiguration {\r\n showCloseIcon: boolean = true;\r\n\tbeforeClose: null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean> = null;\r\n\tignoreKeyUp: boolean = false;\r\n data: {[key: (string | number)]: any} = {};\r\n noPadding: boolean = false;\r\n\tkeepActiveElement: boolean = false;\r\n\tcontainerClasses: string[] = [];\r\n\tdialogClasses: string[] = [];\r\n resolve: ResolveData = {};\r\n\ttitle: string | null = null;\r\n contentElement: Element | null = null;\r\n single: boolean = false;\r\n width: string | null = null;\r\n\theight: string | null = null;\r\n getData(key: string | number, defaultOnUndefined: any = null): any {\r\n return this.data[key] !== undefined ? this.data[key] : defaultOnUndefined;\r\n }\r\n}\r\n","import { InjectionToken, Injector, Type } from \"@angular/core\";\r\n\r\nexport class DialogInjector implements Injector {\r\n constructor(private _parentInjector: Injector, private _additionalTokens: WeakMap<any, any>) { }\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: {}): T;\r\n get(token: any, notFoundValue?: any): any;\r\n get(token: any, notFoundValue?: any, _?: any): any {\r\n const value = this._additionalTokens.get(token);\r\n if (value) { return value; }\r\n return this._parentInjector.get<any>(token, notFoundValue);\r\n }\r\n}","import { InjectionToken } from \"@angular/core\";\r\nimport { AlertButtonConfiguration, AlertConfiguration } from \"../interfaces\";\r\n\r\nexport const ALERT_DEFAULT_BUTTON_CONFIGURATION: InjectionToken<AlertButtonConfiguration> = new InjectionToken('Alert default button', {\r\n\tfactory: (): AlertButtonConfiguration => {\r\n\t\treturn {\r\n\t\t\tlabel: 'alert.ok',\r\n\t\t\tseverity: 'success',\r\n\t\t\tcallback: ({ dialogRef }) => {\r\n\t\t\t\tdialogRef.close();\r\n\t\t\t},\r\n\t\t\tfocus: true,\r\n\t\t\ttranslateLabel: true\r\n\t\t}\r\n\t}\r\n});\r\n\r\nexport const ALERT_CONFIGURATIONS: InjectionToken<{[key: string]: AlertConfiguration}> = new InjectionToken('Alert configurations predefined', {\r\n factory: (): {[key: string]: AlertConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { PredefinedDialogs } from \"../interfaces\";\r\n\r\nexport const CF_PREDEFINED_DIALOGS: InjectionToken<PredefinedDialogs> = new InjectionToken('Predefined dialogs', {\r\n factory: () => {\r\n return {};\r\n }\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { ConfirmConfiguration } from \"../interfaces\";\r\n\r\nexport const CONFIRM_CONFIGURATIONS: InjectionToken<{[key: string]: ConfirmConfiguration}> = new InjectionToken('Confirm configurations predefined', {\r\n factory: (): {[key: string]: ConfirmConfiguration} => {\r\n return {};\r\n }\r\n});\r\n","import { ComponentRef, Type } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { DialogRef } from \"./classes/dialog.ref.class\";\r\n\r\nexport interface DialogComponentRefContainer {\r\n componentRef: ComponentRef<any>;\r\n container: HTMLDivElement;\r\n\topenIndex: number;\r\n}\r\n\r\nexport type PredefinedDialogs = {[key: string]: (() => Promise<Type<any>>) | {component: () => Promise<Type<any>>, configuration: DialogConfiguration}};\r\n\r\nexport interface DialogConfiguration {\r\n showCloseIcon?: boolean;\r\n\tbeforeClose?: CfDialogConfigurationBeforeClose;\r\n\tignoreKeyUp?: boolean;\r\n data?: any;\r\n noPadding?: boolean;\r\n\tkeepActiveElement?: boolean;\r\n\tcontainerClasses?: string[];\r\n\tdialogClasses?: string[];\r\n\ttitle?: string | null;\r\n contentElement?: Element | null;\r\n single?: boolean;\r\n width?: string | null;\r\n\theight?: string | null;\r\n}\r\n\r\nexport type CfDialogConfigurationBeforeClose = null | (() => boolean | Observable<boolean> | Promise<boolean>) | Observable<boolean> | Promise<boolean>;\r\n\r\nexport interface ConfirmConfiguration {\r\n title: string;\r\n text: string;\r\n acceptText: string;\r\n declineText: string;\r\n\thideDeclineButton?: boolean;\r\n switchButtonColors?: boolean;\r\n acceptTimeout?: number;\r\n acceptValidationText?: string;\r\n acceptValidationMode?: AcceptValidationMode;\r\n acceptValidationLabel?: string;\r\n}\r\n\r\nexport interface AlertConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbutton?: Partial<AlertButtonConfiguration>;\r\n}\r\n\r\nexport enum AcceptValidationMode {\r\n PATTERN = 'PATTERN',\r\n TEXT = 'TEXT'\r\n}\r\n\r\nexport interface AlertButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback: (params: {dialogRef: DialogRef}) => void;\r\n\ttranslateLabel: boolean;\r\n\tfocus: boolean;\r\n}\r\n\r\nexport interface CfDialogCloseParams {\r\n message?: MessagePartial;\r\n}\r\n\r\nexport interface MessagePartial extends Partial<MessageConfiguration> {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport interface MessageConfiguration {\r\n closeable: boolean;\r\n position: MessagePosition;\r\n lifetime: number | null;\r\n severity: MessageSeverity;\r\n\tkeepOnHover: boolean;\r\n}\r\nexport enum MessagePosition {\r\n TOP = 'top',\r\n BOTTOM = 'bottom'\r\n}\r\n\r\nexport enum MessageSeverity {\r\n SUCCESS = 'success',\r\n WARNING = 'warning',\r\n DANGER = 'danger',\r\n INFO = 'info'\r\n}\r\n\r\nexport interface LoadingConfiguration {\r\n title: string;\r\n text: string;\r\n\tloadingIcon?: string;\r\n iconSize?: number;\r\n}\r\n\r\nexport interface ModalWithButtonsConfiguration {\r\n title: string;\r\n text: string;\r\n\tshowCloseIcon?: boolean;\r\n\tbuttons: ButtonConfiguration[];\r\n}\r\n\r\nexport interface ButtonConfiguration {\r\n\tlabel: string;\r\n\tseverity: string;\r\n\tcallback?: (params: {dialogRef: DialogRef}) => void;\r\n\trouterLink?: any;\r\n\tfocus?: boolean;\r\n\tpermission?: string | string[];\r\n\ttranslateLabel?: boolean;\r\n}\r\n\r\nexport interface Message extends MessageConfiguration {\r\n title: string;\r\n message: string;\r\n}\r\n\r\nexport enum LogLevel {\r\n All = 0,\r\n Debug = 1,\r\n Info = 2,\r\n Warn = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n Off = 6\r\n}\r\n\r\nexport enum TokenServiceMode {\r\n LOCALSTORAGE = 0,\r\n SESSIONSTORAGE = 1,\r\n COOKIE = 2\r\n}\r\n\r\nexport enum InterceptorType {\r\n ALL = 'ALL',\r\n ERROR = 'ERROR',\r\n LOADER = 'LOADER',\r\n MOCK = 'MOCK',\r\n TOKEN = 'TOKEN',\r\n PRECHECK = 'PRECHECK',\r\n LOCK = 'LOCK',\r\n\tREQUESTID = 'REQUESTID'\r\n}\r\n\r\nexport enum Precheck {\r\n ERROR = \"ERROR\",\r\n WARNING = \"WARNING\"\r\n}\r\n\r\nexport type PrecheckNullable = Precheck | null;\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { MessageConfiguration, MessagePosition, MessageSeverity } from \"../interfaces\";\r\n\r\nexport const MESSAGE_DEFAULT_CONFIGURATION: InjectionToken<MessageConfiguration> = new InjectionToken('Message default configuration', {\r\n\tfactory: (): MessageConfiguration => {\r\n\t\treturn {\r\n\t\t\tcloseable: true,\r\n\t\t\tlifetime: 3000,\r\n\t\t\tposition: MessagePosition.TOP,\r\n\t\t\tseverity: MessageSeverity.SUCCESS,\r\n\t\t\tkeepOnHover: false\r\n\t\t};\r\n\t}\r\n});\r\n","import { InjectionToken } from \"@angular/core\";\r\nimport { LogLevel } from \"../interfaces\";\r\n\r\nexport const LOG_LEVEL: InjectionToken<LogLevel> = new InjectionToken('Log level', {\r\n factory: (): LogLevel => {\r\n return LogLevel.All;\r\n }\r\n});\r\n","import { isPlatformBrowser } from '@angular/common';\r\nimport {\r\n ApplicationRef,\r\n ComponentRef,\r\n createComponent,\r\n EmbeddedViewRef,\r\n inject,\r\n Injectable,\r\n Injector,\r\n PLATFORM_ID,\r\n Type\r\n} from '@angular/core';\r\nimport { Title } from '@angular/platform-browser';\r\nimport { filter, Subscription } from 'rxjs';\r\nimport { AlertConfiguration, DialogConfiguration, ConfirmConfiguration, LoadingConfiguration, ModalWithButtonsConfiguration, PredefinedDialogs, DialogComponentRefContainer } from '../interfaces';\r\nimport { DialogConfig, DialogInjector, DialogRef } from '../classes';\r\nimport { ALERT_CONFIGURATIONS, CF_PREDEFINED_DIALOGS, CONFIRM_CONFIGURATIONS } from '../tokens';\r\nimport { MessageService } from '../services';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DialogService {\r\n\r\n\tprivate injector: Injector = inject(Injector);\r\n\tprivate predefinedConfirmConfigurations: {[key: string]: ConfirmConfiguration} = inject(CONFIRM_CONFIGURATIONS);\r\n\tprivate predefinedAlertConfigurations: {[key: string]: AlertConfiguration} = inject(ALERT_CONFIGURATIONS);\r\n\tprivate predefinedDialogs: PredefinedDialogs = inject(CF_PREDEFINED_DIALOGS);\r\n\r\n\ttitle: Title = inject(Title);\r\n\tmessageService: MessageService = inject(MessageService);\r\n\r\n\tdialogs: Map<DialogRef, DialogComponentRefContainer> = new Map();\r\n\topenIndex: number = 1;\r\n\tplatformId: Object = inject(PLATFORM_ID);\r\n\r\n constructor() {\r\n\t\tif (isPlatformBrowser(this.platformId)) {\r\n\t\t\tdocument.addEventListener(\"keyup\", (keyboardEvent: KeyboardEvent) => {\r\n\t\t\t\tif (keyboardEvent.key.toLowerCase() === 'escape') {\r\n\t\t\t\t\tlet lastOpenIndex: number = 0;\r\n\t\t\t\t\tlet lastOpenedDialogRef: DialogRef | null = null;\r\n\t\t\t\t\tfor (const [dialogRef, cfDialogComponentRefContainer] of this.dialogs.entries()) {\r\n\t\t\t\t\t\tif (cfDialogComponentRefContainer.openIndex > lastOpenIndex) {\r\n\t\t\t\t\t\t\tlastOpenIndex = cfDialogComponentRefContainer.openIndex;\r\n\t\t\t\t\t\t\tlastOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif (lastOpenedDialogRef !== null && lastOpenedDialogRef.dialogConfig !== null) {\r\n\t\t\t\t\t\tif (lastOpenedDialogRef.dialogConfig.ignoreKeyUp || document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tlastOpenedDialogRef.close();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tasync openPredefined<T = any>(name: string, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\tif (this.predefinedDialogs[name] === undefined) {\r\n\t\t\tthrow Error('Dialog with name \"' + name + '\" not found!');\r\n\t\t}\r\n\t\tconst predefinedDialog = this.predefinedDialogs[name];\r\n\t\tif (typeof predefinedDialog === 'function') {\r\n\t\t\treturn this.openImport(predefinedDialog, dialogConfiguration);\r\n\t\t}\r\n\t\treturn this.openImport(predefinedDialog.component, {...predefinedDialog.configuration, ...dialogConfiguration});\r\n\t}\r\n\r\n\tasync openImport<T = any>(component: () => Promise<Type<any>>, dialogConfiguration: DialogConfiguration = {}): Promise<DialogRef<T>> {\r\n\t\treturn new Promise(async (resolve) => {\r\n\t\t\tresolve(this.open<T>(await component(), dialogConfiguration));\r\n\t\t});\r\n\t}\r\n\r\n open<T = any>(component: Type<any>, dialogConfiguration: DialogConfiguration = {}): DialogRef<T> {\r\n\r\n\t\tfor (let dialog of this.dialogs.entries()) {\r\n\t\t\tif (\r\n\t\t\t\t(dialogConfiguration.single && dialog[1].componentRef.componentType.name === component.name) ||\r\n\t\t\t\t(dialog[0].dialogConfig !== null && dialog[0].dialogConfig.single && dialog[1].componentRef.componentType.name === component.name)\r\n\t\t\t) {\r\n\t\t\t\treturn dialog[0];\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogConfig: DialogConfig = this.createDialogConfig(dialogConfiguration);\r\n\r\n\t\tif (!dialogConfig.keepActiveElement) {\r\n\t\t\tif (document.activeElement instanceof HTMLElement) {\r\n\t\t\t\tdocument.activeElement.blur();\r\n\t\t\t}\r\n\t\t}\r\n\r\n const dialogRef: DialogRef<T> = this.appendToBody(component, dialogConfig);\r\n\t\tdialogRef.messageService = this.messageService;\r\n\t\tdialogRef.dialogConfig = dialogConfig;\r\n\r\n\t\tthis.changeAndStoreTitle(dialogRef);\r\n\r\n return dialogRef;\r\n }\r\n\r\n\tchangeAndStoreTitle(dialogRef: DialogRef): void {\r\n\t\tdialogRef.savedTitle = this.title.getTitle();\r\n\t\tif (dialogRef.dialogConfig !== null && dialogRef.dialogConfig.title !== null) {\r\n\t\t\tthis.title.setTitle(dialogRef.dialogConfig.title);\r\n\t\t}\r\n\t}\r\n\r\n createDialogConfig(dialogConfiguration: DialogConfiguration): DialogConfig {\r\n const dialogConfig: DialogConfig = new DialogConfig();\r\n if (dialogConfiguration.showCloseIcon !== undefined) {\r\n dialogConfig.showCloseIcon = dialogConfiguration.showCloseIcon;\r\n }\r\n\t\tif (dialogConfiguration.beforeClose !== undefined) {\r\n dialogConfig.beforeClose = dialogConfiguration.beforeClose;\r\n }\r\n\t\tif (dialogConfiguration.ignoreKeyUp !== undefined) {\r\n dialogConfig.ignoreKeyUp = dialogConfiguration.ignoreKeyUp;\r\n }\r\n if (dialogConfiguration.data !== undefined) {\r\n dialogConfig.data = dialogConfiguration.data;\r\n }\r\n if (dialogConfiguration.noPadding !== undefined) {\r\n dialogConfig.noPadding = dialogConfiguration.noPadding;\r\n }\r\n\t\tif (dialogConfiguration.keepActiveElement !== undefined) {\r\n\t\t\tdialogConfig.keepActiveElement = dialogConfiguration.keepActiveElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.containerClasses !== undefined) {\r\n\t\t\tdialogConfig.containerClasses = dialogConfiguration.containerClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.dialogClasses !== undefined) {\r\n\t\t\tdialogConfig.dialogClasses = dialogConfiguration.dialogClasses;\r\n\t\t}\r\n\t\tif (dialogConfiguration.title !== undefined) {\r\n\t\t\tdialogConfig.title = dialogConfiguration.title;\r\n\t\t}\r\n\t\tif (dialogConfiguration.contentElement !== undefined) {\r\n\t\t\tdialogConfig.contentElement = dialogConfiguration.contentElement;\r\n\t\t}\r\n\t\tif (dialogConfiguration.single !== undefined) {\r\n\t\t\tdialogConfig.single = dialogConfiguration.single;\r\n\t\t}\r\n\t\tif (dialogConfiguration.width !== undefined) {\r\n\t\t\tdialogConfig.width = dialogConfiguration.width;\r\n\t\t}\r\n\t\tif (dialogConfiguration.height !== undefined) {\r\n\t\t\tdialogConfig.height = dialogConfiguration.height;\r\n\t\t}\r\n return dialogConfig;\r\n }\r\n\r\n appendToBody(component: Type<any>, dialogConfig: DialogConfig): DialogRef {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n // CREATE INJECTION TOKENS\r\n const tokens: WeakMap<any, any> = new WeakMap();\r\n\r\n // CREATE DIALOG CONFIGURATION CLASS\r\n tokens.set(DialogConfig, dialogConfig);\r\n\r\n // CREATE DIALOG REFERENCE CLASS\r\n const dialogRef: DialogRef = new DialogRef();\r\n tokens.set(DialogRef, dialogRef);\r\n\r\n // LISTEN ON DIALOG CLOSE\r\n const closeSub: Subscription = dialogRef.onClose.subscribe(() => {\r\n this.removeFromBody(dialogRef);\r\n closeSub.unsubscribe();\r\n });\r\n\r\n // CREATE COMPONENT REF\r\n const componentRef: ComponentRef<any> = createComponent(component, {\r\n\t\t\tenvironmentInjector: appRef.injector,\r\n\t\t\telementInjector: new DialogInjector(this.injector, tokens)\r\n\t\t});\r\n\r\n // ATTACH VIEW TO ANGULAR\r\n appRef.attachView(componentRef.hostView);\r\n\r\n // CREATE DIALOG CONTAINER ELEMENT\r\n const dialogContainer: HTMLDivElement = document.createElement('div');\r\n dialogContainer.classList.add('cf-dialog-container');\r\n\t\tif (dialogConfig.containerClasses.length > 0) {\r\n\t\t\tdialogContainer.classList.add(...dialogConfig.containerClasses);\r\n\t\t}\r\n\r\n\t\t// APPEND DOM ELEMENT TO DIALOG\r\n\t\tconst childDomElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\r\n\t\tchildDomElem.classList.add('cf-dialog');\r\n\t\t\r\n\t\tif (dialogConfig.width !== null) {\r\n\t\t\tchildDomElem.style.width = dialogConfig.width;\r\n\t\t}\r\n\t\tif (dialogConfig.height !== null) {\r\n\t\t\tchildDomElem.style.height = dialogConfig.height;\r\n\t\t}\r\n\t\tif (dialogConfig.noPadding) {\r\n childDomElem.classList.add('no-padding');\r\n }\r\n\t\tif (dialogConfig.dialogClasses.length > 0) {\r\n\t\t\tchildDomElem.classList.add(...dialogConfig.dialogClasses);\r\n\t\t}\r\n\r\n\t\tif (dialogConfig.contentElement !== null) {\r\n\t\t\tchildDomElem.appendChild(dialogConfig.contentElement);\r\n\t\t}\r\n\r\n\t\tdialogContainer.appendChild(childDomElem);\r\n\r\n // CLOSEABLE? APPEND BUTTON\r\n if (dialogConfig.showCloseIcon) {\r\n const closeElement: HTMLDivElement = document.createElement('div');\r\n closeElement.classList.add(...['cf-dialog-close', 'remixicon', 'close-line']);\r\n closeElement.onclick = () => {\r\n dialogRef.close();\r\n };\r\n childDomElem.appendChild(closeElement);\r\n }\r\n\r\n // APPEND DIALOG CONTAINER TO BODY\r\n document.body.appendChild(dialogContainer);\r\n\r\n this.dialogs.set(dialogRef, {\r\n componentRef,\r\n container: dialogContainer,\r\n\t\t\topenIndex: this.openIndex \r\n });\r\n\r\n\t\tthis.openIndex++;\r\n\r\n return dialogRef;\r\n }\r\n\r\n removeFromBody(dialogRef: DialogRef): void {\r\n\r\n\t\tconst appRef: ApplicationRef = this.injector.get(ApplicationRef);\r\n\r\n if (!dialogRef || !this.dialogs.has(dialogRef)) {\r\n return;\r\n }\r\n const dialogComponentRefContainer: DialogComponentRefContainer | undefined = this.dialogs.get(dialogRef);\r\n if (dialogComponentRefContainer == undefined) {\r\n return;\r\n }\r\n\t\t\r\n appRef.detachView(dialogComponentRefContainer.componentRef.hostView);\r\n\r\n if (dialogComponentRefContainer.container !== null) {\r\n dialogComponentRefContainer.container.remove();\r\n }\r\n dialogComponentRefContainer.componentRef.destroy();\r\n this.dialogs.delete(dialogRef);\r\n\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.openIndex = 1;\r\n\t\t}\r\n\r\n\t\t// Restore title\r\n\t\tif (this.dialogs.size === 0) {\r\n\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t} else {\r\n\t\t\tlet latestOpenedDialogRef: DialogRef | null = null;\r\n\t\t\tthis.dialogs.forEach((_, dialogRef: DialogRef) => {\r\n\t\t\t\tif (latestOpenedDialogRef === null) {\r\n\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (latestOpenedDialogRef.opened < dialogRef.opened) {\r\n\t\t\t\t\t\tlatestOpenedDialogRef = dialogRef;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tif (latestOpenedDialogRef !== null) {\r\n\t\t\t\t//this.title.setTitle(latestOpenedDialogRef.savedTitle);\r\n\t\t\t} else {\r\n\t\t\t\tthis.title.setTitle(dialogRef.savedTitle);\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n\tconfirm(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedConfirmConfiguration: ConfirmConfiguration | undefined = this.predefinedConfirmConfigurations[configuration];\r\n\t\t\tif (predefinedConfirmConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined confirm configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedConfirmConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve, reject) => {\r\n\t\t\tthis.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.pipe(filter(value => value !== undefined)).subscribe((accepted: boolean) => {\r\n\t\t\t\tif (accepted) {\r\n\t\t\t\t\tresolve(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treject(true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n async confirmAsync(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n return await new Promise((resolve) => {\r\n this.confirm(configuration, dialogConfiguration, component).then(() => {\r\n resolve(true);\r\n }).catch(() => {\r\n resolve(false);\r\n });\r\n });\r\n }\r\n\t\r\n\tconfirmAccept(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => resolve(true)).catch(() => {});\r\n\t\t});\r\n\t}\r\n\t\r\n\tconfirmDecline(\r\n\t\tconfiguration: ConfirmConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<boolean> {\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\tthis.confirm(configuration, dialogConfiguration, component).then(() => {}).catch(() => resolve(true));\r\n\t\t});\r\n\t}\r\n\r\n\tshowLoading(\r\n\t\tconfiguration: LoadingConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tshowCloseIcon: false,\r\n\t\t\tignoreKeyUp: true,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tshowAlert(\r\n\t\tconfiguration: AlertConfiguration | string,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): Promise<void> {\r\n\t\tif (typeof configuration === 'string') {\r\n\t\t\tconst predefinedAlertConfiguration: AlertConfiguration | undefined = this.predefinedAlertConfigurations[configuration];\r\n\t\t\tif (predefinedAlertConfiguration === undefined) {\r\n\t\t\t\tthrow new Error('Predefined alert configuration not found for: ' + configuration);\r\n\t\t\t}\r\n\t\t\tconfiguration = predefinedAlertConfiguration;\r\n\t\t}\r\n\t\treturn new Promise((resolve) => {\r\n\t\t\treturn this.open(component, {\r\n\t\t\t\t...dialogConfiguration,\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tconfiguration\r\n\t\t\t\t},\r\n\t\t\t\tignoreKeyUp: true,\r\n\t\t\t\tshowCloseIcon: false\r\n\t\t\t}).onClose.subscribe(() => {\r\n\t\t\t\tresolve();\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tshowModalWithButtons(\r\n\t\tconfiguration: ModalWithButtonsConfiguration,\r\n\t\tdialogConfiguration: DialogConfiguration = {},\r\n\t\tcomponent: Type<any>\r\n\t): DialogRef {\r\n\t\treturn this.open(component, {\r\n\t\t\t...dialogConfiguration,\r\n\t\t\tdata: {\r\n\t\t\t\tconfiguration\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { Subject, Subscription, timer } from 'rxjs';\r\nimport { Message, MessageConfiguration, MessageSeverity } from '../interfaces';\r\nimport { MESSAGE_DEFAULT_CONFIGURATION } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class MessageService {\r\n\r\n /**\r\n * Default configuration\r\n * \r\n * Can be changed if you overwrite it or use the `MESSAGE_DEFAULT_CONFIGURATION` InjectionToken\r\n */\r\n public defaultConfiguration: MessageConfiguration = inject(MESSAGE_DEFAULT_CONFIGURATION);\r\n \r\n /**\r\n * Message subject\r\n */\r\n private messageSubject: Subject<Message> = new Subject();\r\n\r\n /**\r\n * Show\r\n * \r\n * Displays message with the given configuration\r\n * \r\n * @param messageConfiguration `Partial<MessageConfiguration>`\r\n */\r\n public show(title: string, message: string, configuration?: Partial<MessageConfiguration>): void {\r\n this.messageSubject.next({\r\n\t\t\t...this.defaultConfiguration,\r\n ...configuration,\r\n\t\t\ttitle,\r\n\t\t\tmessage\r\n });\r\n }\r\n\r\n /**\r\n * Show success message\r\n * \r\n * Display a message with default success severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showSuccessMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.SUCCESS\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show danger message\r\n * \r\n * Display a message with default danger severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showDangerMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.DANGER,\r\n\t\t\tkeepOnHover: true\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show warning message\r\n * \r\n * Display a message with default warning severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showWarningMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.WARNING\r\n\t\t});\r\n\t}\r\n\r\n /**\r\n * Show info message\r\n * \r\n * Display a message with default info severity\r\n * \r\n * @param title `string`, required\r\n * @param message `string`, required\r\n * @param lifetime `number`, optional, default is `this.defaultLifetime`\r\n * @param position `MessagePosition`, optional, default is `this.defaultPosition`\r\n * @param closeable `boolean`, optional, default is `this.defaultClosable`\r\n */\r\n\tpublic showInfoMessage(\r\n\t\ttitle: string,\r\n\t\tmessage: string,\r\n\t\tconfiguration?: Partial<Omit<MessageConfiguration, 'severity'>>\r\n\t): void {\r\n\t\tthis.show(title, message, {\r\n\t\t\t...configuration,\r\n\t\t\tseverity: MessageSeverity.INFO\r\n\t\t});\r\n\t}\r\n\r\n private showMessage(message: Message): void {\r\n let container: HTMLElement | null = document.getElementById('cf-toasts-' + message.position + '-container');\r\n if (container === null) {\r\n container = document.createElement('div');\r\n container.id = 'cf-toasts-' + message.position + '-container';\r\n document.body.appendChild(container);\r\n }\r\n\r\n const div: HTMLElement = this.createMessageHtmlElement(message);\r\n\r\n container.appendChild(div);\r\n\r\n if (message.lifetime !== null) {\r\n\r\n\t\t\tlet disposeTimerSubscription: Subscription | null = timer(message.lifetime + 500).subscribe(() => {\r\n\t\t\t\tthis.hideMessage(div);\r\n\t\t\t});\r\n\r\n\t\t\tif (message.keepOnHover) {\r\n\t\t\t\tdiv.addEventListener('mouseenter', () => {\r\n\t\t\t\t\tif (disposeTimerSubscription !== null) {\r\n\t\t\t\t\t\tdisposeTimerSubscription.unsubscribe();\r\n\t\t\t\t\t\tdisposeTimerSubscription = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n }\r\n }\r\n\r\n private createMessageHtmlElement(message: Message): HTMLElement {\r\n const div: HTMLElement = document.createElement('div');\r\n div.classList.add('cf-toast', 'cf-' + message.severity + '-toast');\r\n const titleDiv: HTMLElement = document.createElement('div');\r\n titleDiv.classList.add('cf-toast-title');\r\n titleDiv.innerText = message.title;\r\n const messageDiv: HTMLElement = document.createElement('div');\r\n messageDiv.classList.add('cf-toast-message');\r\n messageDiv.innerText = message.message;\r\n div.appendChild(titleDiv);\r\n div.appendChild(messageDiv);\r\n if (message.closeable) {\r\n const closeIcon: HTMLElement = document.createElement('i');\r\n closeIcon.classList.add('close-icon', 'remixicon', 'close-line');\r\n closeIcon.onclick = () => {\r\n this.hideMessage(div, true);\r\n };\r\n div.appendChild(closeIcon);\r\n }\r\n return div;\r\n }\r\n\r\n private hideMessage(messageElement: HTMLElement, forceClose: boolean = false): void {\r\n messageElement.classList.add('hidden-toast');\r\n\r\n let remainOpen = false;\r\n messageElement.addEventListener('mouseenter', (() => {\r\n remainOpen = true;\r\n }));\r\n\r\n timer(500).subscribe(() => {\r\n if (remainOpen && !forceClose) {\r\n messageElement.classList.remove('hidden-toast');\r\n return;\r\n }\r\n messageElement.removeEventListener('mouseenter', (() => {}));\r\n messageElement.remove();\r\n });\r\n }\r\n\r\n constructor() {\r\n this.messageSubject.subscribe((message: Message) => {\r\n this.showMessage(message);\r\n });\r\n }\r\n\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { LogLevel } from '../interfaces';\r\nimport { LOG_LEVEL } from '../tokens';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class LoggerService {\r\n\r\n\tprivate _logLevel: LogLevel | null = inject(LOG_LEVEL);\r\n\r\n\tprivate logLevelColors: string[] = [\r\n\t\t'',\r\n\t\t'background-color: #D2BDF3; padding: 5px 10px;',\r\n\t\t'background-color: #A2DDFF; padding: 5px 10px;',\r\n\t\t'background-color: #FFD5C5; padding: 5px 10px;',\r\n\t\t'background-color: #EA4331; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t'background-color: #F71900; color: #FFFFFF; padding: 5px 10px;',\r\n\t\t''\r\n\t];\r\n\r\n\tpublic debug(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Debug, group });\r\n\t}\r\n\r\n\tpublic info(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Info, group });\r\n\t}\r\n\r\n\tpublic warn(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Warn, group });\r\n\t}\r\n\r\n\tpublic error(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Error, group });\r\n\t}\r\n\r\n\tpublic fatal(log: any, group: boolean = false): void {\r\n\t\tthis.log({ log, logLevel: LogLevel.Fatal, group });\r\n\t}\r\n\r\n\tpublic groupEnd(): void {\r\n\t\tconsole.groupEnd();\r\n\t}\r\n\r\n\tprivate log(configuration: {\r\n\t\tlog: any,\r\n\t\tlogLevel: LogLevel,\r\n\t\tgroup: boolean\r\n\t}): void {\r\n\t\tif (this._logLevel === null || this._logLevel === LogLevel.Off || this._logLevel > configuration.logLevel) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (configuration.group) {\r\n\t\t\tconsole.group(configuration.log);\r\n\t\t} else {\r\n\t\t\tconsole.log('%c' + configuration.log, this.logLevelColors[configuration.logLevel]);\r\n\t\t}\r\n\t}\r\n\r\n\tset logLevel(logLevel: LogLevel | null) {\r\n\t\tthis._logLevel = logLevel;\r\n\t}\r\n\r\n\tget logLevel(): LogLevel | null {\r\n\t\treturn this._logLevel;\r\n\t}\r\n}\r\n","import { HttpClient, HttpParams } from \"@angular/common/http\";\r\nimport { inject, Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { LoggerService } from \"./logger.service\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class ApiService {\r\n\r\n\thttpClient: HttpClient = inject(HttpClient);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\tprivate _apiBaseUrl: string | null = null;\r\n\r\n\tpublic post<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.post<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic get<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic getFileArrayBuffer(endPoint: (string|number)[]): Observable<ArrayBuffer> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'arraybuffer'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getFileText(endPoint: (string|number)[]): Observable<string> {\r\n\t\treturn this.httpClient.get(this.generateUrl(endPoint), {\r\n\t\t\tresponseType: 'text'\r\n\t\t});\r\n\t}\r\n\r\n\tpublic getWithHttpParams<T>(endPoint: (string|number)[], params: HttpParams | null = null): Observable<any> {\r\n\t\tif (params === null) {\r\n\t\t\treturn this.get(endPoint);\r\n\t\t} else {\r\n\t\t\treturn this.httpClient.get<T>(this.generateUrl(endPoint), {\r\n\t\t\t\tparams\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tpublic delete<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.delete<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic patch<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.patch<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic head<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.head<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic options<T>(endPoint: (string|number)[]): Observable<any> {\r\n\t\treturn this.httpClient.options<T>(this.generateUrl(endPoint));\r\n\t}\r\n\r\n\tpublic put<T>(endPoint: (string|number)[], body: any): Observable<any> {\r\n\t\treturn this.httpClient.put<T>(this.generateUrl(endPoint), body);\r\n\t}\r\n\r\n\tpublic generateUrl(endPoint: (string|number)[]): string {\r\n\t\tif (this._apiBaseUrl === null) {\r\n\t\t\tthrow new Error('No API base url set in generateUrl call!');\r\n\t\t}\r\n if (endPoint.length === 0) {\r\n return this._apiBaseUrl;\r\n }\r\n\t\tif (typeof endPoint[0] === 'string' && endPoint[0].startsWith('#')) {\r\n endPoint[0] = endPoint[0].slice(1);\r\n\t\t\treturn endPoint.map((v, i) => i === 0 ? v : encodeURIComponent(v)).join('/');\r\n\t\t}\r\n\t\treturn [this._apiBaseUrl, ...endPoint.map((v) => encodeURIComponent(v))].join('/');\r\n\t}\r\n\r\n\tset apiBaseUrl(apiBaseUrl: string) {\r\n\t\tthis.loggerService.info('Api Service base url set to: ' + apiBaseUrl);\r\n\t\tif (apiBaseUrl[apiBaseUrl.length - 1] === '/') {\r\n\t\t\tapiBaseUrl = apiBaseUrl.slice(0, apiBaseUrl.length - 1);\r\n\t\t}\r\n\t\tthis._apiBaseUrl = apiBaseUrl;\r\n\t}\r\n\r\n\tget apiBaseUrl(): string | null {\r\n\t\treturn this._apiBaseUrl;\r\n\t}\r\n}\r\n","import { DOCUMENT, isPlatformBrowser } from \"@angular/common\";\r\nimport { inject, PLATFORM_ID } from \"@angular/core\";\r\n\r\nexport function isBrowser(): boolean {\r\n\tconst platformId: Object = inject(PLATFORM_ID);\r\n\treturn isPlatformBrowser(platformId);\r\n}\r\n\r\nexport function localStorage(): Storage | null {\r\n\tconst document: Document = inject(DOCUMENT);\r\n\tif (document.defaultView !== null) {\r\n\t\treturn document.defaultView.window.localStorage;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nexport function sessionStorage(): Storage | null {\r\n\tconst document: Document = inject(DOCUMENT);\r\n\tif (document.defaultView !== null) {\r\n\t\treturn document.defaultView.window.sessionStorage;\r\n\t}\r\n\treturn null;\r\n}","import { DOCUMENT } from \"@angular/common\";\r\nimport { Injectable, inject } from \"@angular/core\";\r\nimport { isBrowser } from \"../helpers\";\r\nimport { LoggerService } from \"./logger.service\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class CookieService {\r\n\r\n\tbrowser: boolean = isBrowser();\r\n\tdocument: Document = inject(DOCUMENT);\r\n\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\t/**\r\n\t * Get the value of a cookie by name, returns `null` if the cookie is not set\r\n\t * \r\n\t * @param name name of the cookie\r\n\t * @returns value of the cookie\r\n\t */\r\n\tget(name: string): string | null {\r\n\t\tif (!this.browser) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst cookies: {[key: string]: string} = this.cookies;\r\n\t\treturn cookies[name] || null;\r\n\t}\r\n\r\n\t/**\r\n\t * Set the value of a cookie with the given name\r\n\t * \r\n\t * @param name name of the cookie\r\n\t * @param value value of the cookie\r\n\t * @param expire expire of the cookie in seconds, if null, it will never expire\r\n\t * @param path path of the cookie, default is '/'\r\n\t * @param config optional configuration values (expire in seconds, path of cookie)\r\n\t */\r\n\tset(name: string, value: string, expire: number | null = null, path: string | null = '/'): void {\r\n\r\n\t\tif (!this.browser) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (path === null) {\r\n\t\t\tpath = '/';\r\n\t\t}\r\n\r\n\t\t// Default cookie informations\r\n\t\tlet cookie: string = `${name}=${value};`;\r\n\r\n\t\t// If we have an expire date, we need to set\r\n\t\tif (expire !== null) {\r\n\t\t\tlet d: Date = new Date();\r\n\t\t\td.setTime(d.getTime() + (expire * 1000));\r\n\t\t\tcookie += `expires=${d.toUTCString()};`;\r\n\t\t}\r\n\r\n\t\t// Set path\r\n\t\tcookie += `path=${path};`;\r\n\r\n\t\t// Log\r\n\t\tthis.loggerService.info('Cookie data to set: ' + cookie);\r\n\r\n\t\t// Set the cookie\r\n\t\tthis.document.cookie = cookie;\r\n\t}\r\n\r\n\t/**\r\n\t * Delete a cookie by its name\r\n\t * \r\n\t * @param name name of the cookie\r\n\t */\r\n\tdelete(name: string): void {\r\n\t\tif (!this.browser) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.set(name, '', -1);\r\n\t}\r\n\r\n\tget cookies(): {[key: string]: string} {\r\n\r\n\t\tif (!this.browser) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\r\n\t\tconst cookies: string = this.document.cookie;\r\n\t\tif (cookies.length === 0) {\r\n\t\t\treturn {};\r\n\t\t}\r\n\t\tconst cookiesArray: string[] = cookies.split(';');\r\n\t\tconst cookiesObject: {[key: string]: string} = {};\r\n\t\tcookiesArray.forEach((cookiesArrayItem: string) => {\r\n\t\t\tconst cookiesArrayItemSplit: string[] = cookiesArrayItem.split('=');\r\n\t\t\tcookiesObject[cookiesArrayItemSplit[0].trim()] = cookiesArrayItemSplit[1];\r\n\t\t})\r\n\t\treturn cookiesObject;\r\n\t}\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { TokenServiceMode } from '../interfaces';\r\nimport { isBrowser, localStorage, sessionStorage } from '../helpers';\r\nimport { CookieService } from './cookie.service';\r\nimport { LoggerService } from './logger.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenService {\r\n\r\n\tcookieService: CookieService = inject(CookieService);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\tlocalStorage: Storage | null = localStorage();\r\n\tsessionStorage: Storage | null = sessionStorage();\r\n\tisBrowser: boolean = isBrowser();\r\n\r\n\tcookiePath: string | null = null;\r\n\taccessToken: string | null = null;\r\n\taccessTokenKey = 'acccessToken';\r\n\taccessTokenCookieExpireDays = 30;\r\n\r\n\tpublic write(mode: TokenServiceMode | null): void {\r\n\t\tif (this.accessToken === null) {\r\n\t\t\tthis.loggerService.error('No accessToken set to write!');\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token write!');\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.localStorage !== null) {\r\n\t\t\t\t\tthis.localStorage.setItem(this.accessTokenKey, this.accessToken);\r\n\t\t\t\t\tthis.loggerService.debug('Token set to local storage: ' + this.accessToken);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to set localStorage on not a browser platform!');\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.sessionStorage.setItem(this.accessTokenKey, this.accessToken);\r\n\t\t\t\t\tthis.loggerService.debug('Token set to session storage: ' + this.accessToken);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to set sessionStorage on not a browser platform!');\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.COOKIE:\r\n\t\t\t\tthis.cookieService.set(this.accessTokenKey, this.accessToken, this.accessTokenCookieExpireDays * 24 * 60 * 60, this.cookiePath);\r\n\t\t\t\tthis.loggerService.debug('Token set to cookie: ' + this.accessToken);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t}\r\n\r\n\tpublic read(mode: TokenServiceMode | null): string | null {\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token read!');\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tthis.loggerService.debug('Trying to read token from local storage');\r\n\t\t\t\tif (this.isBrowser && this.localStorage !== null) {\r\n\t\t\t\t\tconst tokenLocalStorage: string | null = this.localStorage.getItem(this.accessTokenKey);\r\n\t\t\t\t\tif (tokenLocalStorage !== null) {\r\n\t\t\t\t\t\tthis.loggerService.debug('Token read from local storage: ' + tokenLocalStorage);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tokenLocalStorage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to read from localStorage on not a browser platform!');\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.isBrowser && this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Trying to read token from session storage');\r\n\t\t\t\t\tconst tokenSessionStorage: string | null = this.sessionStorage.getItem(this.accessTokenKey);\r\n\t\t\t\t\tif (tokenSessionStorage !== null) {\r\n\t\t\t\t\t\tthis.loggerService.debug('Token read from session storage: ' + tokenSessionStorage);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn tokenSessionStorage;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.loggerService.error('Trying to read from sessionStorage on not a browser platform!');\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\tcase TokenServiceMode.COOKIE: {\r\n\t\t\t\tthis.loggerService.debug('Trying to read token from session cookie');\r\n\t\t\t\tconst cookieAccessToken: string | null = this.cookieService.get(this.accessTokenKey);\r\n\t\t\t\tif (cookieAccessToken !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token read from cookie: ' + cookieAccessToken);\r\n\t\t\t\t}\r\n\t\t\t\treturn cookieAccessToken;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tpublic delete(mode: TokenServiceMode | null): void {\r\n\t\tif (mode === null) {\r\n\t\t\tthis.loggerService.error('Invalid mode for token delete!');\r\n\t\t}\r\n\t\tswitch (mode) {\r\n\t\t\tcase TokenServiceMode.LOCALSTORAGE:\r\n\t\t\t\tif (this.localStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token deleted from local storage');\r\n\t\t\t\t\tthis.localStorage.removeItem(this.accessTokenKey);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.SESSIONSTORAGE:\r\n\t\t\t\tif (this.sessionStorage !== null) {\r\n\t\t\t\t\tthis.loggerService.debug('Token deleted from session storage');\r\n\t\t\t\t\tthis.sessionStorage.removeItem(this.accessTokenKey);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase TokenServiceMode.COOKIE: {\r\n\t\t\t\tthis.loggerService.debug('Token deleted from cookie');\r\n\t\t\t\tthis.cookieService.delete(this.accessTokenKey);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.accessToken = null;\r\n\t}\r\n}\r\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpRequest } from \"@angular/common/http\";\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Observable } from \"rxjs\";\r\nimport { InterceptorType, PrecheckNullable } from \"../interfaces\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class InterceptorsService {\r\n\r\n /**\r\n * Skip\r\n * \r\n * Skip interceptors from next http requests\r\n */\r\n\tskip: InterceptorType[] = [];\r\n\r\n /**\r\n * ResetSkip\r\n * \r\n * Resets to `skip` to empty array after first http request\r\n */\r\n resetSkip: boolean = true;\r\n\r\n\r\n /**\r\n * Precheck\r\n * \r\n * Tells the `PrecheckInterceptor` to set a header with the given value\r\n */\r\n precheck: PrecheckNullable = null;\r\n\r\n /**\r\n * ResetPrecheck\r\n * \r\n * Clear `precheck` after first http request \r\n */\r\n resetPrecheck: boolean = true;\r\n\r\n /**\r\n * Error callback function\r\n * \r\n * Function to call after every http error\r\n */\r\n\terrorCallbackfunction: ((httpErrorResponse: HttpErrorResponse) => void) | null = null;\r\n\r\n /**\r\n * Error skip status codes\r\n * \r\n * Skips the given status codes from `errorCallbackfunction`\r\n */\r\n\terrorSkipStatusCodes: number[] = [];\r\n\r\n /**\r\n * Mock callback function\r\n * \r\n * Function to call to mock an http request\r\n */\r\n\tmockCallbackFunction: ((request: HttpRequest<any>, requestUrl: URL, next: HttpHandler) => Observable<HttpEvent<any>>) | null = null;\r\n\r\n /**\r\n * RequestId HTTP Header name\r\n */\r\n\trequestIdHttpHeaderName: string = 'Request-Id';\r\n\r\n /**\r\n * RequestId repeat\r\n */\r\n\trequestIdRepeat: boolean = false;\r\n\r\n /**\r\n * RequestId repeat delay\r\n */\r\n\trequestIdRepeatDelay: number = 0;\r\n\r\n /**\r\n * RequestId repeat statuscodes\r\n */\r\n\trequestIdRepeatStatusCodes: number[] = [];\r\n}","import { inject, Injectable } from \"@angular/core\";\r\nimport { LoggerService } from \"../services\";\r\nimport { InterceptorsService } from \"../services/interceptors.service\";\r\nimport { InterceptorType } from \"../interfaces\";\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class BaseInterceptor {\r\n\r\n\ttype: InterceptorType | null = null;\r\n\r\n\tinterceptorsService: InterceptorsService = inject(InterceptorsService);\r\n\tloggerService: LoggerService = inject(LoggerService);\r\n\r\n\tskipInterceptor(): boolean {\r\n\t\tif (this.type !== null && this.interceptorsService.skip.indexOf(InterceptorType.ALL) !== -1) {\r\n\t\t\tthis.loggerService.warn('Interceptor skipped, reason is ALL skipped: ' + this.type);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst skip: boolean = this.type !== null && this.interceptorsService.skip.indexOf(this.type) !== -1;\r\n\t\tif (skip) {\r\n\t\t\tthis.loggerService.warn('Interceptor skipped, reason is [' + this.interceptorsService.skip.join(', ') + '] skipped');\r\n\t\t}\r\n\t\treturn skip;\r\n\t}\r\n\r\n\tconstructor(\r\n\t\ttype: InterceptorType\r\n\t) {\r\n\t\tthis.type = type;\r\n\t\tthis.loggerService.info('Interceptor initialized: ' + this.type);\r\n\t}\r\n}\r\n","import { inject, Injectable } from '@angular/core';\r\nimport { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { TokenService } from '../services';\r\nimport { BaseInterceptor } from './base.interceptor';\r\nimport { InterceptorType } from '../interfaces';\r\n\r\n@Injectable({\r\n\tprovidedIn: 'root'\r\n})\r\nexport class TokenInterceptor extends BaseInterceptor implements HttpInterceptor {\r\n\r\n\tprivate tokenService: TokenService = inject(TokenService);\r\n\r\n\tintercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n\t\tif (this.skipInterceptor()) {\r\n\t\t\treturn next.handle(request);\r\n\t\t}\r\n\t\tconst accessToken: string | null = this.tokenService.accessToken;\r\n\t\tif (accessToken !== null) {\r\n\t\t\trequest = request.clone({\r\n\t\t\t\tsetHeaders: {\r\n\t\t\t\t\tToken: accessToken\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn next.handle(request);\r\n\t}\r\n\r\n\tconstructor() {\r\n\t\tsuper(InterceptorType.TOKEN);\r\n\t}\r\n}\r\n","import { HTTP_INTERCEPTORS } from \"@angular/common/http\";\r\nimport { EnvironmentProviders, makeEnvironmentProviders } from \"@angular/core\";\r\nimport { TokenInterceptor } from \"./interceptors/token.interceptor\";\r\n\r\nexport function provideTokenInterceptor(): EnvironmentProviders {\r\n return makeEnvironmentProviders([{\r\n provide: HTTP_INTERCEPTORS,\r\n useClass: TokenInterceptor,\r\n multi: true\r\n }]);\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.InterceptorType"],"mappings":";;;;;;;MAKa,SAAS,CA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R;;ACVA;;AAEG;;;;"}
@@ -0,0 +1,13 @@
1
+ import { LoggerService } from "../services";
2
+ import { InterceptorsService } from "../services/interceptors.service";
3
+ import { InterceptorType } from "../interfaces";
4
+ import * as i0 from "@angular/core";
5
+ export declare class BaseInterceptor {
6
+ type: InterceptorType | null;
7
+ interceptorsService: InterceptorsService;
8
+ loggerService: LoggerService;
9
+ skipInterceptor(): boolean;
10
+ constructor(type: InterceptorType);
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseInterceptor, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaseInterceptor>;
13
+ }
@@ -0,0 +1 @@
1
+ export * from './token.interceptor';
@@ -0,0 +1,11 @@
1
+ import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { BaseInterceptor } from './base.interceptor';
4
+ import * as i0 from "@angular/core";
5
+ export declare class TokenInterceptor extends BaseInterceptor implements HttpInterceptor {
6
+ private tokenService;
7
+ intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
8
+ constructor();
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TokenInterceptor, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<TokenInterceptor>;
11
+ }
@@ -124,3 +124,18 @@ export declare enum TokenServiceMode {
124
124
  SESSIONSTORAGE = 1,
125
125
  COOKIE = 2
126
126
  }
127
+ export declare enum InterceptorType {
128
+ ALL = "ALL",
129
+ ERROR = "ERROR",
130
+ LOADER = "LOADER",
131
+ MOCK = "MOCK",
132
+ TOKEN = "TOKEN",
133
+ PRECHECK = "PRECHECK",
134
+ LOCK = "LOCK",
135
+ REQUESTID = "REQUESTID"
136
+ }
137
+ export declare enum Precheck {
138
+ ERROR = "ERROR",
139
+ WARNING = "WARNING"
140
+ }
141
+ export type PrecheckNullable = Precheck | null;
@@ -0,0 +1,2 @@
1
+ import { EnvironmentProviders } from "@angular/core";
2
+ export declare function provideTokenInterceptor(): EnvironmentProviders;
@@ -0,0 +1,66 @@
1
+ import { HttpErrorResponse, HttpEvent, HttpHandler, HttpRequest } from "@angular/common/http";
2
+ import { Observable } from "rxjs";
3
+ import { InterceptorType, PrecheckNullable } from "../interfaces";
4
+ import * as i0 from "@angular/core";
5
+ export declare class InterceptorsService {
6
+ /**
7
+ * Skip
8
+ *
9
+ * Skip interceptors from next http requests
10
+ */
11
+ skip: InterceptorType[];
12
+ /**
13
+ * ResetSkip
14
+ *
15
+ * Resets to `skip` to empty array after first http request
16
+ */
17
+ resetSkip: boolean;
18
+ /**
19
+ * Precheck
20
+ *
21
+ * Tells the `PrecheckInterceptor` to set a header with the given value
22
+ */
23
+ precheck: PrecheckNullable;
24
+ /**
25
+ * ResetPrecheck
26
+ *
27
+ * Clear `precheck` after first http request
28
+ */
29
+ resetPrecheck: boolean;
30
+ /**
31
+ * Error callback function
32
+ *
33
+ * Function to call after every http error
34
+ */
35
+ errorCallbackfunction: ((httpErrorResponse: HttpErrorResponse) => void) | null;
36
+ /**
37
+ * Error skip status codes
38
+ *
39
+ * Skips the given status codes from `errorCallbackfunction`
40
+ */
41
+ errorSkipStatusCodes: number[];
42
+ /**
43
+ * Mock callback function
44
+ *
45
+ * Function to call to mock an http request
46
+ */
47
+ mockCallbackFunction: ((request: HttpRequest<any>, requestUrl: URL, next: HttpHandler) => Observable<HttpEvent<any>>) | null;
48
+ /**
49
+ * RequestId HTTP Header name
50
+ */
51
+ requestIdHttpHeaderName: string;
52
+ /**
53
+ * RequestId repeat
54
+ */
55
+ requestIdRepeat: boolean;
56
+ /**
57
+ * RequestId repeat delay
58
+ */
59
+ requestIdRepeatDelay: number;
60
+ /**
61
+ * RequestId repeat statuscodes
62
+ */
63
+ requestIdRepeatStatusCodes: number[];
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<InterceptorsService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<InterceptorsService>;
66
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codefoxcore",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0"
package/public-api.d.ts CHANGED
@@ -2,3 +2,6 @@ export * from './lib/classes';
2
2
  export * from './lib/services';
3
3
  export * from './lib/tokens';
4
4
  export * from './lib/interfaces';
5
+ export * from './lib/interceptors';
6
+ export * from './lib/providers';
7
+ export * from './lib/helpers';