@igo2/core 19.0.2 → 20.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/activity/index.d.ts +29 -5
- package/analytics/index.d.ts +35 -5
- package/config/index.d.ts +63 -3
- package/environment/index.d.ts +21 -5
- package/fesm2022/igo2-core-activity.mjs +13 -16
- package/fesm2022/igo2-core-activity.mjs.map +1 -1
- package/fesm2022/igo2-core-analytics.mjs +8 -9
- package/fesm2022/igo2-core-analytics.mjs.map +1 -1
- package/fesm2022/igo2-core-config.mjs +14 -14
- package/fesm2022/igo2-core-config.mjs.map +1 -1
- package/fesm2022/igo2-core-language.mjs +13 -15
- package/fesm2022/igo2-core-language.mjs.map +1 -1
- package/fesm2022/igo2-core-media.mjs +8 -8
- package/fesm2022/igo2-core-media.mjs.map +1 -1
- package/fesm2022/igo2-core-message.mjs +15 -21
- package/fesm2022/igo2-core-message.mjs.map +1 -1
- package/fesm2022/igo2-core-monitoring.mjs.map +1 -1
- package/fesm2022/igo2-core-network.mjs +9 -11
- package/fesm2022/igo2-core-network.mjs.map +1 -1
- package/fesm2022/igo2-core-regex.mjs +8 -9
- package/fesm2022/igo2-core-regex.mjs.map +1 -1
- package/fesm2022/igo2-core-request.mjs +24 -27
- package/fesm2022/igo2-core-request.mjs.map +1 -1
- package/fesm2022/igo2-core-route.mjs +12 -16
- package/fesm2022/igo2-core-route.mjs.map +1 -1
- package/fesm2022/igo2-core-storage.mjs +8 -9
- package/fesm2022/igo2-core-storage.mjs.map +1 -1
- package/fesm2022/igo2-core.mjs +4 -4
- package/fesm2022/igo2-core.mjs.map +1 -1
- package/index.d.ts +16 -5
- package/language/index.d.ts +83 -3
- package/media/index.d.ts +27 -5
- package/message/index.d.ts +70 -3
- package/monitoring/index.d.ts +42 -5
- package/network/index.d.ts +27 -5
- package/package.json +8 -12
- package/regex/index.d.ts +16 -5
- package/request/index.d.ts +37 -5
- package/route/index.d.ts +63 -5
- package/src/theming/themes/_theme.scss +2 -5
- package/storage/index.d.ts +46 -5
- package/theming/prebuilt-themes/blue-theme.css +833 -700
- package/theming/prebuilt-themes/bluedark-theme.css +833 -700
- package/theming/prebuilt-themes/bluedq-theme.css +833 -700
- package/theming/prebuilt-themes/teal-theme.css +833 -700
- package/user/index.d.ts +8 -5
- package/activity/activity.interceptor.d.ts +0 -11
- package/activity/activity.module.d.ts +0 -8
- package/activity/activity.service.d.ts +0 -10
- package/activity/public_api.d.ts +0 -3
- package/analytics/analytics.interface.d.ts +0 -10
- package/analytics/analytics.service.d.ts +0 -22
- package/analytics/public_api.d.ts +0 -2
- package/config/config-deprecated.d.ts +0 -3
- package/config/config.interface.d.ts +0 -12
- package/config/config.module.d.ts +0 -11
- package/config/config.provider.d.ts +0 -4
- package/config/config.service.d.ts +0 -27
- package/config/public_api.d.ts +0 -5
- package/config/version.d.ts +0 -7
- package/environment/environment.interface.d.ts +0 -18
- package/environment/public_api.d.ts +0 -1
- package/language/language.module.d.ts +0 -7
- package/language/public_api.d.ts +0 -2
- package/language/shared/index.d.ts +0 -6
- package/language/shared/language-mock.provider.d.ts +0 -2
- package/language/shared/language.interface.d.ts +0 -10
- package/language/shared/language.loader.d.ts +0 -21
- package/language/shared/language.provider.d.ts +0 -25
- package/language/shared/language.service.d.ts +0 -15
- package/language/shared/missing-translation.guard.d.ts +0 -4
- package/lib/core.module.d.ts +0 -13
- package/media/media.enum.d.ts +0 -9
- package/media/media.service.d.ts +0 -16
- package/media/public_api.d.ts +0 -2
- package/message/message.module.d.ts +0 -11
- package/message/public_api.d.ts +0 -2
- package/message/shared/index.d.ts +0 -4
- package/message/shared/message.enum.d.ts +0 -8
- package/message/shared/message.interface.d.ts +0 -21
- package/message/shared/message.provider.d.ts +0 -2
- package/message/shared/message.service.d.ts +0 -31
- package/message/src/message.theme.scss +0 -21
- package/monitoring/__mocks__/index.d.ts +0 -1
- package/monitoring/__mocks__/monitoring-mock.d.ts +0 -4
- package/monitoring/public_api.d.ts +0 -3
- package/monitoring/sentry/index.d.ts +0 -3
- package/monitoring/sentry/sentry.d.ts +0 -4
- package/monitoring/sentry/sentry.interface.d.ts +0 -8
- package/monitoring/sentry/sentry.provider.d.ts +0 -15
- package/monitoring/sentry/sentry.utils.d.ts +0 -2
- package/monitoring/shared/any-monitoring.interface.d.ts +0 -2
- package/monitoring/shared/index.d.ts +0 -3
- package/monitoring/shared/monitoring.d.ts +0 -3
- package/monitoring/shared/monitoring.interface.d.ts +0 -7
- package/network/network.interfaces.d.ts +0 -3
- package/network/network.service.d.ts +0 -21
- package/network/public_api.d.ts +0 -2
- package/public_api.d.ts +0 -2
- package/regex/public_api.d.ts +0 -2
- package/regex/regex.interface.d.ts +0 -1
- package/regex/regex.service.d.ts +0 -12
- package/request/error.interceptor.d.ts +0 -14
- package/request/error.module.d.ts +0 -9
- package/request/logging.interceptor.d.ts +0 -8
- package/request/logging.module.d.ts +0 -8
- package/request/public_api.d.ts +0 -4
- package/route/public_api.d.ts +0 -2
- package/route/route.interface.d.ts +0 -36
- package/route/route.service.d.ts +0 -23
- package/src/core.theme.scss +0 -5
- package/src/packages.import.scss +0 -4
- package/src/theming/all-theme.scss +0 -10
- package/storage/public_api.d.ts +0 -3
- package/storage/storage.d.ts +0 -15
- package/storage/storage.interface.d.ts +0 -20
- package/storage/storage.service.d.ts +0 -10
- package/user/public_api.d.ts +0 -1
- package/user/user.interface.d.ts +0 -6
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { HttpErrorResponse, HTTP_INTERCEPTORS, HttpResponse } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { inject, Injectable, NgModule } from '@angular/core';
|
|
4
|
+
import { MessageService } from '@igo2/core/message';
|
|
5
5
|
import { throwError } from 'rxjs';
|
|
6
6
|
import { catchError, finalize, tap } from 'rxjs/operators';
|
|
7
7
|
|
|
8
8
|
class ErrorInterceptor {
|
|
9
|
-
messageService;
|
|
10
|
-
constructor(messageService) {
|
|
11
|
-
this.messageService = messageService;
|
|
12
|
-
}
|
|
9
|
+
messageService = inject(MessageService);
|
|
13
10
|
intercept(originalReq, next) {
|
|
14
11
|
const interceptError = originalReq.headers.get('interceptError');
|
|
15
12
|
const req = originalReq.clone({
|
|
@@ -60,15 +57,15 @@ class ErrorInterceptor {
|
|
|
60
57
|
progressBar: false
|
|
61
58
|
});
|
|
62
59
|
}
|
|
63
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
64
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
60
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ErrorInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
61
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ErrorInterceptor, providedIn: 'root' });
|
|
65
62
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ErrorInterceptor, decorators: [{
|
|
67
64
|
type: Injectable,
|
|
68
65
|
args: [{
|
|
69
66
|
providedIn: 'root'
|
|
70
67
|
}]
|
|
71
|
-
}]
|
|
68
|
+
}] });
|
|
72
69
|
|
|
73
70
|
class IgoErrorModule {
|
|
74
71
|
static forRoot() {
|
|
@@ -83,27 +80,27 @@ class IgoErrorModule {
|
|
|
83
80
|
]
|
|
84
81
|
};
|
|
85
82
|
}
|
|
86
|
-
constructor(
|
|
83
|
+
constructor() {
|
|
84
|
+
const parentModule = inject(IgoErrorModule, {
|
|
85
|
+
optional: true,
|
|
86
|
+
skipSelf: true
|
|
87
|
+
});
|
|
87
88
|
if (parentModule) {
|
|
88
89
|
throw new Error('IgoErrorModule is already loaded. Import it in the AppModule only');
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
92
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
93
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
93
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoErrorModule });
|
|
94
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoErrorModule });
|
|
94
95
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoErrorModule, decorators: [{
|
|
96
97
|
type: NgModule,
|
|
97
98
|
args: [{
|
|
98
99
|
imports: [],
|
|
99
100
|
declarations: [],
|
|
100
101
|
exports: []
|
|
101
102
|
}]
|
|
102
|
-
}], ctorParameters: () => [
|
|
103
|
-
type: Optional
|
|
104
|
-
}, {
|
|
105
|
-
type: SkipSelf
|
|
106
|
-
}] }] });
|
|
103
|
+
}], ctorParameters: () => [] });
|
|
107
104
|
|
|
108
105
|
class LoggingInterceptor {
|
|
109
106
|
intercept(req, next) {
|
|
@@ -123,10 +120,10 @@ class LoggingInterceptor {
|
|
|
123
120
|
console.log(msg);
|
|
124
121
|
}));
|
|
125
122
|
}
|
|
126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
127
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LoggingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
124
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LoggingInterceptor });
|
|
128
125
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LoggingInterceptor, decorators: [{
|
|
130
127
|
type: Injectable
|
|
131
128
|
}] });
|
|
132
129
|
|
|
@@ -143,11 +140,11 @@ class IgoLoggingModule {
|
|
|
143
140
|
]
|
|
144
141
|
};
|
|
145
142
|
}
|
|
146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
147
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
148
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
143
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
144
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoLoggingModule });
|
|
145
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoLoggingModule });
|
|
149
146
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoLoggingModule, decorators: [{
|
|
151
148
|
type: NgModule,
|
|
152
149
|
args: [{
|
|
153
150
|
imports: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-core-request.mjs","sources":["../../../packages/core/request/src/error.interceptor.ts","../../../packages/core/request/src/error.module.ts","../../../packages/core/request/src/logging.interceptor.ts","../../../packages/core/request/src/logging.module.ts","../../../packages/core/request/src/igo2-core-request.ts"],"sourcesContent":["import {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest\n} from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { MessageService } from '@igo2/core/message';\n\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, finalize } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ErrorInterceptor implements HttpInterceptor {\n
|
|
1
|
+
{"version":3,"file":"igo2-core-request.mjs","sources":["../../../packages/core/request/src/error.interceptor.ts","../../../packages/core/request/src/error.module.ts","../../../packages/core/request/src/logging.interceptor.ts","../../../packages/core/request/src/logging.module.ts","../../../packages/core/request/src/igo2-core-request.ts"],"sourcesContent":["import {\n HttpErrorResponse,\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest\n} from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\n\nimport { MessageService } from '@igo2/core/message';\n\nimport { Observable, throwError } from 'rxjs';\nimport { catchError, finalize } from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ErrorInterceptor implements HttpInterceptor {\n private messageService = inject(MessageService);\n\n intercept(\n originalReq: HttpRequest<any>,\n next: HttpHandler\n ): Observable<HttpEvent<any>> {\n const interceptError = originalReq.headers.get('interceptError');\n const req = originalReq.clone({\n headers: originalReq.headers.delete('interceptError')\n });\n if (interceptError === 'false') {\n return next.handle(req);\n }\n const errorContainer = { httpError: undefined };\n return next.handle(req).pipe(\n catchError((error) => this.handleError(error, errorContainer)),\n finalize(() => {\n const httpError = errorContainer.httpError;\n if (!httpError) {\n return;\n }\n\n if (httpError.error.toDisplay) {\n this.handleCaughtError(httpError);\n } else if (!httpError.error.caught) {\n this.handleUncaughtError(httpError);\n }\n })\n );\n }\n\n private handleError(\n httpError: HttpErrorResponse,\n errorContainer: { httpError: HttpErrorResponse }\n ) {\n if (httpError instanceof HttpErrorResponse) {\n const errorObj = httpError.error === 'object' ? httpError.error : {};\n errorObj.message = httpError.error?.message || httpError.statusText;\n errorObj.caught = false;\n\n httpError = new HttpErrorResponse({\n error: errorObj,\n headers: httpError.headers,\n status: httpError.status,\n statusText: httpError.statusText,\n url: httpError.url\n });\n }\n\n errorContainer.httpError = httpError;\n return throwError(httpError);\n }\n\n private handleCaughtError(httpError: HttpErrorResponse) {\n httpError.error.caught = true;\n this.messageService.error(httpError.error.message, httpError.error.title, {\n progressBar: false\n });\n }\n\n private handleUncaughtError(httpError: HttpErrorResponse) {\n httpError.error.caught = true;\n this.messageService.error(\n 'igo.core.errors.uncaught.message',\n 'igo.core.errors.uncaught.title',\n {\n progressBar: false\n }\n );\n }\n}\n","import { HTTP_INTERCEPTORS } from '@angular/common/http';\nimport { ModuleWithProviders, NgModule, inject } from '@angular/core';\n\nimport { ErrorInterceptor } from './error.interceptor';\n\n@NgModule({\n imports: [],\n declarations: [],\n exports: []\n})\nexport class IgoErrorModule {\n static forRoot(): ModuleWithProviders<IgoErrorModule> {\n return {\n ngModule: IgoErrorModule,\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: ErrorInterceptor,\n multi: true\n }\n ]\n };\n }\n\n constructor() {\n const parentModule = inject(IgoErrorModule, {\n optional: true,\n skipSelf: true\n });\n\n if (parentModule) {\n throw new Error(\n 'IgoErrorModule is already loaded. Import it in the AppModule only'\n );\n }\n }\n}\n","import {\n HttpEvent,\n HttpHandler,\n HttpInterceptor,\n HttpRequest,\n HttpResponse\n} from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable } from 'rxjs';\nimport { finalize, tap } from 'rxjs/operators';\n\n@Injectable()\nexport class LoggingInterceptor implements HttpInterceptor {\n intercept(\n req: HttpRequest<any>,\n next: HttpHandler\n ): Observable<HttpEvent<any>> {\n const started = Date.now();\n let ok: string;\n\n // extend server response observable with logging\n return next.handle(req).pipe(\n tap(\n // Succeeds when there is a response; ignore other events\n (event) => (ok = event instanceof HttpResponse ? 'succeeded' : ''),\n // Operation failed; error is an HttpErrorResponse\n () => (ok = 'failed')\n ),\n // Log when response observable either completes or errors\n finalize(() => {\n const elapsed = Date.now() - started;\n const msg = `${req.method} \"${req.urlWithParams}\"\n ${ok} in ${elapsed} ms.`;\n\n console.log(msg);\n })\n );\n }\n}\n","import { HTTP_INTERCEPTORS } from '@angular/common/http';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { LoggingInterceptor } from './logging.interceptor';\n\n@NgModule({\n imports: [],\n declarations: [],\n exports: []\n})\nexport class IgoLoggingModule {\n static forRoot(): ModuleWithProviders<IgoLoggingModule> {\n return {\n ngModule: IgoLoggingModule,\n providers: [\n {\n provide: HTTP_INTERCEPTORS,\n useClass: LoggingInterceptor,\n multi: true\n }\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAiBa,gBAAgB,CAAA;AACnB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAE/C,SAAS,CACP,WAA6B,EAC7B,IAAiB,EAAA;QAEjB,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;AAChE,QAAA,MAAM,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC;YAC5B,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB;AACrD,SAAA,CAAC;AACF,QAAA,IAAI,cAAc,KAAK,OAAO,EAAE;AAC9B,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QACzB;AACA,QAAA,MAAM,cAAc,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE;AAC/C,QAA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AAA,EAAA,CAAA;kBAD9B;;;MCFY,gBAAgB,CAAA;AAC3B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,gBAAgB;AAC1B,YAAA,SAAS,EAAE;AACT,gBAAA;AACE,oBAAA,OAAO,EAAE,iBAAiB;AAC1B,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,KAAK,EAAE;AACR;AACF;SACF;IACH;uGAZW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAhB,gBAAgB,EAAA,CAAA;wGAAhB,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken,
|
|
3
|
-
import
|
|
2
|
+
import { InjectionToken, inject, Injectable } from '@angular/core';
|
|
3
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
4
4
|
|
|
5
5
|
const ROUTE_OPTIONS = {
|
|
6
6
|
languageKey: 'lang',
|
|
@@ -44,16 +44,17 @@ function provideRouteServiceOptions(options) {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
class RouteService {
|
|
47
|
-
router;
|
|
48
|
-
route;
|
|
47
|
+
router = inject(Router);
|
|
48
|
+
route = inject(ActivatedRoute);
|
|
49
49
|
options;
|
|
50
50
|
/**
|
|
51
51
|
* @deprecated use the new option of context-service
|
|
52
52
|
*/
|
|
53
53
|
legacyOptions;
|
|
54
|
-
constructor(
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
constructor() {
|
|
55
|
+
const configs = inject(ROUTE_SERVICE_OPTIONS, {
|
|
56
|
+
optional: true
|
|
57
|
+
});
|
|
57
58
|
this.options = { ...ROUTE_OPTIONS, ...configs };
|
|
58
59
|
this.legacyOptions = LEGACY_ROUTE_OPTIONS;
|
|
59
60
|
}
|
|
@@ -74,20 +75,15 @@ class RouteService {
|
|
|
74
75
|
}
|
|
75
76
|
return this.route.queryParams;
|
|
76
77
|
}
|
|
77
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
78
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RouteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
79
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RouteService, providedIn: 'root' });
|
|
79
80
|
}
|
|
80
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RouteService, decorators: [{
|
|
81
82
|
type: Injectable,
|
|
82
83
|
args: [{
|
|
83
84
|
providedIn: 'root'
|
|
84
85
|
}]
|
|
85
|
-
}], ctorParameters: () => [
|
|
86
|
-
type: Inject,
|
|
87
|
-
args: [ROUTE_SERVICE_OPTIONS]
|
|
88
|
-
}, {
|
|
89
|
-
type: Optional
|
|
90
|
-
}] }] });
|
|
86
|
+
}], ctorParameters: () => [] });
|
|
91
87
|
|
|
92
88
|
/**
|
|
93
89
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-core-route.mjs","sources":["../../../packages/core/route/src/route.interface.ts","../../../packages/core/route/src/route.service.ts","../../../packages/core/route/src/igo2-core-route.ts"],"sourcesContent":["export interface RouteServiceOptions {\n centerKey?: string;\n zoomKey?: string;\n projectionKey?: string;\n contextKey?: string;\n searchKey?: string;\n visibleOnLayersKey?: string;\n visibleOffLayersKey?: string;\n directionsCoordKey?: string;\n directionsOptionsKey?: string;\n toolKey?: string;\n wmsUrlKey?: string;\n wmsLayersKey?: string;\n wmtsUrlKey?: string;\n wmtsLayersKey?: string;\n arcgisUrlKey?: string;\n arcgisLayersKey?: string;\n iarcgisUrlKey?: string;\n iarcgisLayersKey?: string;\n tarcgisUrlKey?: string;\n tarcgisLayersKey?: string;\n vectorKey?: string;\n zoomExtentKey?: string;\n exactMatchKey?: string;\n focusFirstResultKey?: string;\n searchGeomKey?: string;\n sidenavKey?: string;\n urlsKey?: string;\n languageKey?: string;\n positionKey?: string;\n layersKey?: string;\n groupsKey?: string;\n rotationKey?: string;\n}\n\nexport const ROUTE_OPTIONS: RouteServiceOptions = {\n languageKey: 'lang',\n searchKey: 'search',\n searchGeomKey: 'searchGeom',\n exactMatchKey: 'exactMatch',\n zoomExtentKey: 'zoomExtent',\n focusFirstResultKey: 'sf',\n toolKey: 'tool',\n directionsCoordKey: 'routing',\n directionsOptionsKey: 'routingOptions',\n sidenavKey: 'sidenav',\n visibleOnLayersKey: 'visiblelayers',\n visibleOffLayersKey: 'invisiblelayers',\n vectorKey: 'vector'\n};\n\nexport const LEGACY_ROUTE_OPTIONS: RouteServiceOptions = {\n projectionKey: 'projection',\n rotationKey: 'rotation',\n zoomKey: 'zoom',\n centerKey: 'center',\n contextKey: 'context',\n layersKey: 'layers',\n wmsUrlKey: 'wmsUrl',\n wmsLayersKey: 'wmsLayers',\n wmtsUrlKey: 'wmtsUrl',\n wmtsLayersKey: 'wmtsLayers',\n arcgisUrlKey: 'arcgisUrl',\n arcgisLayersKey: 'arcgisLayers',\n iarcgisUrlKey: 'iarcgisUrl',\n iarcgisLayersKey: 'iarcgisLayers',\n tarcgisUrlKey: 'tarcgisUrl',\n tarcgisLayersKey: 'tarcgisLayers'\n};\n","import {
|
|
1
|
+
{"version":3,"file":"igo2-core-route.mjs","sources":["../../../packages/core/route/src/route.interface.ts","../../../packages/core/route/src/route.service.ts","../../../packages/core/route/src/igo2-core-route.ts"],"sourcesContent":["export interface RouteServiceOptions {\n centerKey?: string;\n zoomKey?: string;\n projectionKey?: string;\n contextKey?: string;\n searchKey?: string;\n visibleOnLayersKey?: string;\n visibleOffLayersKey?: string;\n directionsCoordKey?: string;\n directionsOptionsKey?: string;\n toolKey?: string;\n wmsUrlKey?: string;\n wmsLayersKey?: string;\n wmtsUrlKey?: string;\n wmtsLayersKey?: string;\n arcgisUrlKey?: string;\n arcgisLayersKey?: string;\n iarcgisUrlKey?: string;\n iarcgisLayersKey?: string;\n tarcgisUrlKey?: string;\n tarcgisLayersKey?: string;\n vectorKey?: string;\n zoomExtentKey?: string;\n exactMatchKey?: string;\n focusFirstResultKey?: string;\n searchGeomKey?: string;\n sidenavKey?: string;\n urlsKey?: string;\n languageKey?: string;\n positionKey?: string;\n layersKey?: string;\n groupsKey?: string;\n rotationKey?: string;\n}\n\nexport const ROUTE_OPTIONS: RouteServiceOptions = {\n languageKey: 'lang',\n searchKey: 'search',\n searchGeomKey: 'searchGeom',\n exactMatchKey: 'exactMatch',\n zoomExtentKey: 'zoomExtent',\n focusFirstResultKey: 'sf',\n toolKey: 'tool',\n directionsCoordKey: 'routing',\n directionsOptionsKey: 'routingOptions',\n sidenavKey: 'sidenav',\n visibleOnLayersKey: 'visiblelayers',\n visibleOffLayersKey: 'invisiblelayers',\n vectorKey: 'vector'\n};\n\nexport const LEGACY_ROUTE_OPTIONS: RouteServiceOptions = {\n projectionKey: 'projection',\n rotationKey: 'rotation',\n zoomKey: 'zoom',\n centerKey: 'center',\n contextKey: 'context',\n layersKey: 'layers',\n wmsUrlKey: 'wmsUrl',\n wmsLayersKey: 'wmsLayers',\n wmtsUrlKey: 'wmtsUrl',\n wmtsLayersKey: 'wmtsLayers',\n arcgisUrlKey: 'arcgisUrl',\n arcgisLayersKey: 'arcgisLayers',\n iarcgisUrlKey: 'iarcgisUrl',\n iarcgisLayersKey: 'iarcgisLayers',\n tarcgisUrlKey: 'tarcgisUrl',\n tarcgisLayersKey: 'tarcgisLayers'\n};\n","import { Injectable, InjectionToken, inject } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\n\nimport { Observable } from 'rxjs';\n\nimport {\n LEGACY_ROUTE_OPTIONS,\n ROUTE_OPTIONS,\n RouteServiceOptions\n} from './route.interface';\n\nexport const ROUTE_SERVICE_OPTIONS = new InjectionToken<RouteServiceOptions>(\n 'routeServiceOptions'\n);\n\nexport function provideRouteServiceOptions(options: RouteServiceOptions) {\n return {\n provide: ROUTE_SERVICE_OPTIONS,\n useValue: options\n };\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RouteService {\n private router = inject(Router);\n route = inject(ActivatedRoute);\n\n public options: RouteServiceOptions;\n\n /**\n * @deprecated use the new option of context-service\n */\n public legacyOptions: RouteServiceOptions;\n\n constructor() {\n const configs = inject<RouteServiceOptions>(ROUTE_SERVICE_OPTIONS, {\n optional: true\n });\n\n this.options = { ...ROUTE_OPTIONS, ...configs };\n this.legacyOptions = LEGACY_ROUTE_OPTIONS;\n }\n\n get queryParams(): Observable<Params> {\n let url = decodeURIComponent(location.search);\n if (url.includes('¢er=')) {\n url = url.replace('¢er', '¢er');\n const queryParams: any = url\n .slice(1)\n .split('&')\n .map((p) => p.split('='))\n .reduce((obj, pair) => {\n const [key, value] = pair.map(decodeURIComponent);\n obj[key] = value;\n return obj;\n }, {});\n this.router.navigate([], { queryParams });\n }\n return this.route.queryParams;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAmCO,MAAM,aAAa,GAAwB;AAChD,IAAA,WAAW,EAAE,MAAM;AACnB,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,aAAa,EAAE,YAAY;AAC3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HxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BehaviorSubject } from 'rxjs';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable } from '@angular/core';
|
|
4
|
-
import
|
|
3
|
+
import { inject, Injectable } from '@angular/core';
|
|
4
|
+
import { ConfigService } from '@igo2/core/config';
|
|
5
5
|
|
|
6
6
|
var StorageScope;
|
|
7
7
|
(function (StorageScope) {
|
|
@@ -91,20 +91,19 @@ class BaseStorage {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
class StorageService extends BaseStorage {
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
constructor() {
|
|
95
|
+
const config = inject(ConfigService);
|
|
96
96
|
super(config);
|
|
97
|
-
this.config = config;
|
|
98
97
|
}
|
|
99
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
100
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
98
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
99
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StorageService, providedIn: 'root' });
|
|
101
100
|
}
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StorageService, decorators: [{
|
|
103
102
|
type: Injectable,
|
|
104
103
|
args: [{
|
|
105
104
|
providedIn: 'root'
|
|
106
105
|
}]
|
|
107
|
-
}], ctorParameters: () => [
|
|
106
|
+
}], ctorParameters: () => [] });
|
|
108
107
|
|
|
109
108
|
/**
|
|
110
109
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-core-storage.mjs","sources":["../../../packages/core/storage/src/storage.interface.ts","../../../packages/core/storage/src/storage.ts","../../../packages/core/storage/src/storage.service.ts","../../../packages/core/storage/src/igo2-core-storage.ts"],"sourcesContent":["export enum StorageScope {\n SESSION = 'Session',\n LOCAL = 'Local'\n}\n\nexport interface StorageOptions {\n key: string;\n}\n\nexport interface StorageServiceEvent {\n key?: string;\n scope: StorageScope;\n event: StorageServiceEventEnum;\n previousValue?: any;\n currentValue?: any;\n}\n\nexport enum StorageServiceEventEnum {\n ADDED = 'Added',\n MODIFIED = 'Modified',\n REMOVED = 'Removed',\n CLEARED = 'Cleared'\n}\n","import { ConfigService } from '@igo2/core/config';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n StorageOptions,\n StorageScope,\n StorageServiceEvent,\n StorageServiceEventEnum\n} from './storage.interface';\n\nexport abstract class BaseStorage<T extends StorageOptions = StorageOptions> {\n protected options?: T;\n\n public storageChange$ = new BehaviorSubject<StorageServiceEvent>(undefined);\n\n constructor(config: ConfigService) {\n this.options = config.getConfig<T>('storage') || ({ key: 'igo' } as T);\n }\n\n /**\n * Use to get the data found in storage file\n */\n get(key: string, scope?: StorageScope): string | object | boolean | number {\n let value: any;\n\n if (!scope || scope === StorageScope.SESSION) {\n value = sessionStorage.getItem(`${this.options.key}.${key}`);\n }\n\n if (scope === StorageScope.LOCAL || (!value && !scope)) {\n value = localStorage.getItem(`${this.options.key}.${key}`);\n }\n\n if (value) {\n try {\n return JSON.parse(value);\n } catch {\n return value;\n }\n }\n\n return value;\n }\n\n set(\n key: string,\n value: string | object | boolean | number,\n scope: StorageScope = StorageScope.LOCAL\n ) {\n const previousValue = this.get(key, scope);\n if (scope === StorageScope.SESSION) {\n sessionStorage.setItem(\n `${this.options.key}.${key}`,\n JSON.stringify(value)\n );\n } else {\n localStorage.setItem(`${this.options.key}.${key}`, JSON.stringify(value));\n }\n const currentValue = this.get(key, scope);\n\n if (currentValue !== previousValue) {\n this.storageChange$.next({\n key,\n scope,\n event:\n previousValue !== undefined\n ? StorageServiceEventEnum.MODIFIED\n : StorageServiceEventEnum.ADDED,\n previousValue,\n currentValue\n });\n }\n }\n\n remove(key: string, scope: StorageScope = StorageScope.LOCAL) {\n const previousValue = this.get(key, scope);\n if (scope === StorageScope.SESSION) {\n sessionStorage.removeItem(`${this.options.key}.${key}`);\n } else {\n localStorage.removeItem(`${this.options.key}.${key}`);\n }\n this.storageChange$.next({\n key,\n scope,\n event: StorageServiceEventEnum.REMOVED,\n previousValue\n });\n }\n\n clear(scope: StorageScope = StorageScope.LOCAL) {\n if (scope === StorageScope.SESSION) {\n sessionStorage.clear();\n } else {\n localStorage.clear();\n }\n this.storageChange$.next({ scope, event: StorageServiceEventEnum.CLEARED });\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport { BaseStorage } from './storage';\nimport { StorageOptions } from './storage.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StorageService extends BaseStorage<StorageOptions> {\n constructor(
|
|
1
|
+
{"version":3,"file":"igo2-core-storage.mjs","sources":["../../../packages/core/storage/src/storage.interface.ts","../../../packages/core/storage/src/storage.ts","../../../packages/core/storage/src/storage.service.ts","../../../packages/core/storage/src/igo2-core-storage.ts"],"sourcesContent":["export enum StorageScope {\n SESSION = 'Session',\n LOCAL = 'Local'\n}\n\nexport interface StorageOptions {\n key: string;\n}\n\nexport interface StorageServiceEvent {\n key?: string;\n scope: StorageScope;\n event: StorageServiceEventEnum;\n previousValue?: any;\n currentValue?: any;\n}\n\nexport enum StorageServiceEventEnum {\n ADDED = 'Added',\n MODIFIED = 'Modified',\n REMOVED = 'Removed',\n CLEARED = 'Cleared'\n}\n","import { ConfigService } from '@igo2/core/config';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n StorageOptions,\n StorageScope,\n StorageServiceEvent,\n StorageServiceEventEnum\n} from './storage.interface';\n\nexport abstract class BaseStorage<T extends StorageOptions = StorageOptions> {\n protected options?: T;\n\n public storageChange$ = new BehaviorSubject<StorageServiceEvent>(undefined);\n\n constructor(config: ConfigService) {\n this.options = config.getConfig<T>('storage') || ({ key: 'igo' } as T);\n }\n\n /**\n * Use to get the data found in storage file\n */\n get(key: string, scope?: StorageScope): string | object | boolean | number {\n let value: any;\n\n if (!scope || scope === StorageScope.SESSION) {\n value = sessionStorage.getItem(`${this.options.key}.${key}`);\n }\n\n if (scope === StorageScope.LOCAL || (!value && !scope)) {\n value = localStorage.getItem(`${this.options.key}.${key}`);\n }\n\n if (value) {\n try {\n return JSON.parse(value);\n } catch {\n return value;\n }\n }\n\n return value;\n }\n\n set(\n key: string,\n value: string | object | boolean | number,\n scope: StorageScope = StorageScope.LOCAL\n ) {\n const previousValue = this.get(key, scope);\n if (scope === StorageScope.SESSION) {\n sessionStorage.setItem(\n `${this.options.key}.${key}`,\n JSON.stringify(value)\n );\n } else {\n localStorage.setItem(`${this.options.key}.${key}`, JSON.stringify(value));\n }\n const currentValue = this.get(key, scope);\n\n if (currentValue !== previousValue) {\n this.storageChange$.next({\n key,\n scope,\n event:\n previousValue !== undefined\n ? StorageServiceEventEnum.MODIFIED\n : StorageServiceEventEnum.ADDED,\n previousValue,\n currentValue\n });\n }\n }\n\n remove(key: string, scope: StorageScope = StorageScope.LOCAL) {\n const previousValue = this.get(key, scope);\n if (scope === StorageScope.SESSION) {\n sessionStorage.removeItem(`${this.options.key}.${key}`);\n } else {\n localStorage.removeItem(`${this.options.key}.${key}`);\n }\n this.storageChange$.next({\n key,\n scope,\n event: StorageServiceEventEnum.REMOVED,\n previousValue\n });\n }\n\n clear(scope: StorageScope = StorageScope.LOCAL) {\n if (scope === StorageScope.SESSION) {\n sessionStorage.clear();\n } else {\n localStorage.clear();\n }\n this.storageChange$.next({ scope, event: StorageServiceEventEnum.CLEARED });\n }\n}\n","import { Injectable, inject } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport { BaseStorage } from './storage';\nimport { StorageOptions } from './storage.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StorageService extends BaseStorage<StorageOptions> {\n constructor() {\n const config = inject(ConfigService);\n super(config);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;IAAY;AAAZ,CAAA,UAAY,YAAY,EAAA;AACtB,IAAA,YAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,YAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EAHW,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;IAiBZ;AAAZ,CAAA,UAAY,uBAAuB,EAAA;AACjC,IAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,uBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,uBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,uBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,GAAA,EAAA,CAAA,CAAA;;MCNb,WAAW,CAAA;AACrB,IAAA,OAAO;AAEV,IAAA,cAAc,GAAG,IAAI,eAAe,CAAsB,SAAS,CAAC;AAE3E,IAAA,WAAA,CAAY,MAAqB,EAAA;AAC/B,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,SAAS,CAAI,SAAS,CAAC,IAAK,EAAE,GAAG,EAAE,KAAK,EAAQ;IACxE;AAEA;;AAEG;IACH,GAAG,CAAC,GAAW,EAAE,KAAoB,EAAA;AACnC,QAAA,IAAI,KAAU;QAEd,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,YAAY,CAAC,OAAO,EAAE;AAC5C,YAAA,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA,EAAG,IAAI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AA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACTD;;AAEG;;;;"}
|
package/fesm2022/igo2-core.mjs
CHANGED
|
@@ -17,13 +17,13 @@ class IgoCoreModule {
|
|
|
17
17
|
providers: [provideConfig(options), provideTranslation(withAsyncConfig())]
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
21
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
22
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
21
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoCoreModule, imports: [CommonModule, i1.IgoActivityModule, i2.IgoErrorModule], exports: [IgoActivityModule, IgoErrorModule, IgoLanguageModule] });
|
|
22
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoCoreModule, providers: [provideMessage(), provideHttpClient(withInterceptorsFromDi())], imports: [CommonModule,
|
|
23
23
|
IgoActivityModule.forRoot(),
|
|
24
24
|
IgoErrorModule.forRoot(), IgoActivityModule, IgoErrorModule, IgoLanguageModule] });
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoCoreModule, decorators: [{
|
|
27
27
|
type: NgModule,
|
|
28
28
|
args: [{
|
|
29
29
|
declarations: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-core.mjs","sources":["../../../packages/core/src/lib/core.module.ts","../../../packages/core/src/public_api.ts","../../../packages/core/src/igo2-core.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n provideHttpClient,\n withInterceptorsFromDi\n} from '@angular/common/http';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { IgoActivityModule } from '@igo2/core/activity';\nimport { ConfigOptions, provideConfig } from '@igo2/core/config';\nimport {\n IgoLanguageModule,\n provideTranslation,\n withAsyncConfig\n} from '@igo2/core/language';\nimport { provideMessage } from '@igo2/core/message';\nimport { IgoErrorModule } from '@igo2/core/request';\n\n@NgModule({\n declarations: [],\n exports: [IgoActivityModule, IgoErrorModule, IgoLanguageModule],\n imports: [\n CommonModule,\n IgoActivityModule.forRoot(),\n IgoErrorModule.forRoot()\n ],\n providers: [provideMessage(), provideHttpClient(withInterceptorsFromDi())]\n})\nexport class IgoCoreModule {\n static forRoot(\n options: ConfigOptions = {}\n ): ModuleWithProviders<IgoCoreModule> {\n return {\n ngModule: IgoCoreModule,\n providers: [provideConfig(options), provideTranslation(withAsyncConfig())]\n };\n }\n}\n","/*\n * Public API Surface of core\n */\n\nexport * from './lib/core.module';\n\n/** @deprecated */\n// export * from '@igo2/core/language';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA2Ba,aAAa,CAAA;AACxB,IAAA,OAAO,OAAO,CACZ,OAAA,GAAyB,EAAE,EAAA;QAE3B,OAAO;AACL,YAAA,QAAQ,EAAE,aAAa;AACvB,YAAA,SAAS,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,eAAe,EAAE,CAAC;SAC1E
|
|
1
|
+
{"version":3,"file":"igo2-core.mjs","sources":["../../../packages/core/src/lib/core.module.ts","../../../packages/core/src/public_api.ts","../../../packages/core/src/igo2-core.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n provideHttpClient,\n withInterceptorsFromDi\n} from '@angular/common/http';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { IgoActivityModule } from '@igo2/core/activity';\nimport { ConfigOptions, provideConfig } from '@igo2/core/config';\nimport {\n IgoLanguageModule,\n provideTranslation,\n withAsyncConfig\n} from '@igo2/core/language';\nimport { provideMessage } from '@igo2/core/message';\nimport { IgoErrorModule } from '@igo2/core/request';\n\n@NgModule({\n declarations: [],\n exports: [IgoActivityModule, IgoErrorModule, IgoLanguageModule],\n imports: [\n CommonModule,\n IgoActivityModule.forRoot(),\n IgoErrorModule.forRoot()\n ],\n providers: [provideMessage(), provideHttpClient(withInterceptorsFromDi())]\n})\nexport class IgoCoreModule {\n static forRoot(\n options: ConfigOptions = {}\n ): ModuleWithProviders<IgoCoreModule> {\n return {\n ngModule: IgoCoreModule,\n providers: [provideConfig(options), provideTranslation(withAsyncConfig())]\n };\n }\n}\n","/*\n * Public API Surface of core\n */\n\nexport * from './lib/core.module';\n\n/** @deprecated */\n// export * from '@igo2/core/language';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;MA2Ba,aAAa,CAAA;AACxB,IAAA,OAAO,OAAO,CACZ,OAAA,GAAyB,EAAE,EAAA;QAE3B,OAAO;AACL,YAAA,QAAQ,EAAE,aAAa;AACvB,YAAA,SAAS,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,eAAe,EAAE,CAAC;SAC1E;IACH;uGARW,aAAa,EAAA,IAAA,EAAA,E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@@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
3
|
+
import { ConfigOptions } from '@igo2/core/config';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
|
+
import * as i2 from '@igo2/core/activity';
|
|
6
|
+
import * as i3 from '@igo2/core/request';
|
|
7
|
+
import * as i4 from '@igo2/core/language';
|
|
8
|
+
|
|
9
|
+
declare class IgoCoreModule {
|
|
10
|
+
static forRoot(options?: ConfigOptions): ModuleWithProviders<IgoCoreModule>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IgoCoreModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoCoreModule, never, [typeof i1.CommonModule, typeof i2.IgoActivityModule, typeof i3.IgoErrorModule], [typeof i2.IgoActivityModule, typeof i3.IgoErrorModule, typeof i4.IgoLanguageModule]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<IgoCoreModule>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { IgoCoreModule };
|
package/language/index.d.ts
CHANGED
|
@@ -1,5 +1,85 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Provider, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import * as i1 from '@ngx-translate/core';
|
|
4
|
+
import { TranslateLoader, Language, TranslateModuleConfig, TranslateService, MissingTranslationHandler, MissingTranslationHandlerParams } from '@ngx-translate/core';
|
|
5
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { HttpBackend } from '@angular/common/http';
|
|
7
|
+
import { ConfigService } from '@igo2/core/config';
|
|
8
|
+
|
|
9
|
+
declare class IgoLanguageModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IgoLanguageModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoLanguageModule, never, never, [typeof i1.TranslateModule]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<IgoLanguageModule>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface LanguageOptions {
|
|
16
|
+
prefix?: string | string[];
|
|
17
|
+
ignoreLibsLocale?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare abstract class LanguageLoaderBase implements TranslateLoader {
|
|
20
|
+
abstract isLoaded$: Observable<boolean>;
|
|
21
|
+
abstract getTranslation(lang: string): Observable<any>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class LanguageLoader implements LanguageLoaderBase {
|
|
25
|
+
private httpClient;
|
|
26
|
+
private _isLoaded$;
|
|
27
|
+
isLoaded$: Observable<boolean>;
|
|
28
|
+
suffix: string;
|
|
29
|
+
prefix?: string | string[];
|
|
30
|
+
options: LanguageOptions;
|
|
31
|
+
baseUrl: string;
|
|
32
|
+
constructor(handler: HttpBackend, options: LanguageOptions);
|
|
33
|
+
private getServerUrl;
|
|
34
|
+
getTranslation(lang: string): Observable<any>;
|
|
35
|
+
}
|
|
36
|
+
declare class LanguageLoaderWithAsyncConfig extends LanguageLoader {
|
|
37
|
+
private configService;
|
|
38
|
+
constructor(handler: HttpBackend, configService: ConfigService, prefix?: string | string[], suffix?: string);
|
|
39
|
+
getTranslation(lang: string): Observable<any>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface TranslationFeature<KindT extends TranslationFeatureKind> {
|
|
43
|
+
kind: KindT;
|
|
44
|
+
providers: (Provider | EnvironmentProviders)[];
|
|
45
|
+
}
|
|
46
|
+
declare enum TranslationFeatureKind {
|
|
47
|
+
Translation = 0,
|
|
48
|
+
DefaultLanguage = 1
|
|
49
|
+
}
|
|
1
50
|
/**
|
|
2
|
-
*
|
|
51
|
+
* Make sure you only call this method in the root module of your application, most of the time called AppModule.
|
|
3
52
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
53
|
+
declare function provideTranslation(featureConfig: TranslationFeature<TranslationFeatureKind.Translation>): EnvironmentProviders;
|
|
54
|
+
declare function withStaticConfig(options: LanguageOptions, defaultLanguage?: string | undefined): TranslationFeature<TranslationFeatureKind.Translation>;
|
|
55
|
+
declare function withAsyncConfig(defaultLanguage?: string | undefined): TranslationFeature<TranslationFeatureKind.Translation>;
|
|
56
|
+
/**
|
|
57
|
+
* Get the first segment of the path (e.g., '/en/alerts' => 'en')
|
|
58
|
+
* @param allowedLanguages default to ['fr', 'en']
|
|
59
|
+
*/
|
|
60
|
+
declare function withUrlDefaultLanguage(fallbackLang?: Language, allowedLanguages?: Language[]): TranslationFeature<TranslationFeatureKind.DefaultLanguage>;
|
|
61
|
+
declare const setTranslationConfig: (loader?: Provider, defaultLanguage?: string) => TranslateModuleConfig;
|
|
62
|
+
declare const LANGUAGE_LOADER: Provider;
|
|
63
|
+
declare const DEFAULT_LANGUAGE_LOADER: Provider;
|
|
64
|
+
|
|
65
|
+
declare function provideMockTranslation(): EnvironmentProviders;
|
|
66
|
+
|
|
67
|
+
declare class LanguageService {
|
|
68
|
+
translate: TranslateService;
|
|
69
|
+
private language;
|
|
70
|
+
readonly language$: BehaviorSubject<string>;
|
|
71
|
+
constructor();
|
|
72
|
+
private setBrowserLanguage;
|
|
73
|
+
getLanguage(): string;
|
|
74
|
+
private matchLanguage;
|
|
75
|
+
setLanguage(language: string): void;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LanguageService, never>;
|
|
77
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LanguageService>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare class IgoMissingTranslationHandler implements MissingTranslationHandler {
|
|
81
|
+
handle(params: MissingTranslationHandlerParams): string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { DEFAULT_LANGUAGE_LOADER, IgoLanguageModule, IgoMissingTranslationHandler, LANGUAGE_LOADER, LanguageLoader, LanguageLoaderBase, LanguageLoaderWithAsyncConfig, LanguageService, TranslationFeatureKind, provideMockTranslation, provideTranslation, setTranslationConfig, withAsyncConfig, withStaticConfig, withUrlDefaultLanguage };
|
|
85
|
+
export type { LanguageOptions, TranslationFeature };
|
package/media/index.d.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare enum Media {
|
|
5
|
+
Mobile = "mobile",
|
|
6
|
+
Tablet = "tablet",
|
|
7
|
+
Desktop = "desktop"
|
|
8
|
+
}
|
|
9
|
+
declare enum MediaOrientation {
|
|
10
|
+
Portrait = "portrait",
|
|
11
|
+
Landscape = "landscape"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare class MediaService {
|
|
15
|
+
media$: BehaviorSubject<Media>;
|
|
16
|
+
orientation$: BehaviorSubject<MediaOrientation>;
|
|
17
|
+
constructor();
|
|
18
|
+
getMedia(): Media;
|
|
19
|
+
getOrientation(): MediaOrientation;
|
|
20
|
+
isTouchScreen(): boolean;
|
|
21
|
+
isMobile(): boolean;
|
|
22
|
+
isDesktop(): boolean;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaService, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MediaService>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Media, MediaOrientation, MediaService };
|
package/message/index.d.ts
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ModuleWithProviders, TemplateRef, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { IndividualConfig, ActiveToast } from 'ngx-toastr';
|
|
4
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
|
-
*
|
|
8
|
+
* @deprecated import the provideMessage directly
|
|
3
9
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
10
|
+
declare class IgoMessageModule {
|
|
11
|
+
static forRoot(): ModuleWithProviders<IgoMessageModule>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IgoMessageModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoMessageModule, never, never, never>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<IgoMessageModule>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare enum MessageType {
|
|
18
|
+
ERROR = "error",
|
|
19
|
+
ALERT = "warning",// todo delete (transition to ngx-toastr)
|
|
20
|
+
WARNING = "warning",
|
|
21
|
+
INFO = "info",
|
|
22
|
+
SUCCESS = "success",
|
|
23
|
+
SHOW = "show"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Message {
|
|
27
|
+
title?: string;
|
|
28
|
+
text?: string;
|
|
29
|
+
html?: string | TemplateRef<any>;
|
|
30
|
+
type?: MessageType;
|
|
31
|
+
options?: MessageOptions;
|
|
32
|
+
format?: 'text' | 'html';
|
|
33
|
+
textInterpolateParams?: object;
|
|
34
|
+
titleInterpolateParams?: object;
|
|
35
|
+
showIcon?: boolean;
|
|
36
|
+
}
|
|
37
|
+
interface MessageOptions extends IndividualConfig {
|
|
38
|
+
template?: string;
|
|
39
|
+
from?: Date | string;
|
|
40
|
+
to?: Date | string;
|
|
41
|
+
id?: number;
|
|
42
|
+
showOnEachLayerVisibility?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare function provideMessage(): EnvironmentProviders;
|
|
46
|
+
|
|
47
|
+
declare class MessageService {
|
|
48
|
+
private injector;
|
|
49
|
+
private configService;
|
|
50
|
+
private languageService;
|
|
51
|
+
messages$: BehaviorSubject<Message[]>;
|
|
52
|
+
private options?;
|
|
53
|
+
private activeMessageTranslations;
|
|
54
|
+
constructor();
|
|
55
|
+
private get toastr();
|
|
56
|
+
showError(httpError: HttpErrorResponse): ActiveToast<any>;
|
|
57
|
+
message(message: Message): void;
|
|
58
|
+
success(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
|
|
59
|
+
error(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
|
|
60
|
+
info(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
|
|
61
|
+
alert(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
|
|
62
|
+
show(text: string, title?: string, options?: Partial<IndividualConfig>, textInterpolateParams?: object, titleInterpolateParams?: object): ActiveToast<any>;
|
|
63
|
+
private handleNgxToastr;
|
|
64
|
+
remove(id?: number): void;
|
|
65
|
+
removeAllAreNotError(): void;
|
|
66
|
+
private handleTemplate;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MessageService, never>;
|
|
68
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MessageService>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { IgoMessageModule, MessageService, MessageType, provideMessage };
|
|
72
|
+
export type { Message, MessageOptions };
|