@igo2/core 19.0.0-next.27 → 19.0.0-next.29
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/environment/environment.interface.d.ts +2 -0
- package/fesm2022/igo2-core-activity.mjs +10 -10
- package/fesm2022/igo2-core-activity.mjs.map +1 -1
- package/fesm2022/igo2-core-analytics.mjs +3 -3
- package/fesm2022/igo2-core-analytics.mjs.map +1 -1
- package/fesm2022/igo2-core-config.mjs +9 -9
- package/fesm2022/igo2-core-config.mjs.map +1 -1
- package/fesm2022/igo2-core-language.mjs +7 -7
- package/fesm2022/igo2-core-language.mjs.map +1 -1
- package/fesm2022/igo2-core-media.mjs +3 -3
- package/fesm2022/igo2-core-media.mjs.map +1 -1
- package/fesm2022/igo2-core-message.mjs +7 -7
- package/fesm2022/igo2-core-message.mjs.map +1 -1
- package/fesm2022/igo2-core-network.mjs +3 -3
- package/fesm2022/igo2-core-network.mjs.map +1 -1
- package/fesm2022/igo2-core-regex.mjs +3 -3
- package/fesm2022/igo2-core-regex.mjs.map +1 -1
- package/fesm2022/igo2-core-request.mjs +14 -14
- package/fesm2022/igo2-core-request.mjs.map +1 -1
- package/fesm2022/igo2-core-route.mjs +45 -29
- package/fesm2022/igo2-core-route.mjs.map +1 -1
- package/fesm2022/igo2-core-storage.mjs +3 -3
- 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/locale/en.json +1 -1
- package/locale/fr.json +1 -1
- package/package.json +3 -3
- package/route/route.interface.d.ts +34 -21
- package/route/route.service.d.ts +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-core-network.mjs","sources":["../../../packages/core/network/src/network.service.ts","../../../packages/core/network/src/igo2-core-network.ts"],"sourcesContent":["import { EventEmitter, Injectable, Injector, OnDestroy } from '@angular/core';\n\nimport { MessageService } from '@igo2/core/message';\n\nimport { Observable, Subscription, fromEvent } from 'rxjs';\nimport { debounceTime, startWith } from 'rxjs/operators';\n\nimport { ConnectionState } from './network.interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NetworkService implements OnDestroy {\n private stateChangeEventEmitter = new EventEmitter<ConnectionState>();\n private onlineSubscription: Subscription;\n private offlineSubscription: Subscription;\n private previousMessageId;\n\n private state: ConnectionState = {\n connection: window.navigator.onLine\n };\n\n constructor(\n private messageService: MessageService,\n private injector: Injector\n ) {\n this.checkNetworkState();\n }\n\n private checkNetworkState() {\n this.onlineSubscription = fromEvent(window, 'online').subscribe(() => {\n if (this.previousMessageId) {\n this.messageService.remove(this.previousMessageId);\n }\n const messageObj = this.messageService.info(\n 'igo.core.network.online.message',\n 'igo.core.network.online.title'\n );\n this.previousMessageId = messageObj.toastId;\n this.state.connection = true;\n this.emitEvent();\n });\n\n this.offlineSubscription = fromEvent(window, 'offline').subscribe(() => {\n if (this.previousMessageId) {\n this.messageService.remove(this.previousMessageId);\n }\n const messageObj = this.messageService.info(\n 'igo.core.network.offline.message',\n 'igo.core.network.offline.title'\n );\n this.previousMessageId = messageObj.toastId;\n this.state.connection = false;\n this.emitEvent();\n });\n }\n\n private emitEvent() {\n this.stateChangeEventEmitter.emit(this.state);\n }\n\n ngOnDestroy(): void {\n try {\n this.offlineSubscription.unsubscribe();\n this.onlineSubscription.unsubscribe();\n } catch {\n // empty\n }\n }\n\n currentState(reportState = true): Observable<ConnectionState> {\n return reportState\n ? this.stateChangeEventEmitter.pipe(\n debounceTime(300),\n startWith(this.state)\n )\n : this.stateChangeEventEmitter.pipe(debounceTime(300));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAYa,cAAc,CAAA;AAWf,IAAA,cAAA;AACA,IAAA,QAAA;AAXF,IAAA,uBAAuB,GAAG,IAAI,YAAY,EAAmB;AAC7D,IAAA,kBAAkB;AAClB,IAAA,mBAAmB;AACnB,IAAA,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,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;;IAG/C,WAAW,GAAA;AACT,QAAA,IAAI;AACF,YAAA,IAAI,CAAC,mBAAmB,CAAC,WAAW,EAAE;AACtC,YAAA,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE;;AACrC,QAAA,MAAM;;;;IAKV,YAAY,CAAC,WAAW,GAAG,IAAI,EAAA;AAC7B,QAAA,OAAO;AACL,cAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAC/B,YAAY,CAAC,GAAG,CAAC,EACjB,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;AAEzB,cAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;;
|
|
1
|
+
{"version":3,"file":"igo2-core-network.mjs","sources":["../../../packages/core/network/src/network.service.ts","../../../packages/core/network/src/igo2-core-network.ts"],"sourcesContent":["import { EventEmitter, Injectable, Injector, OnDestroy } from '@angular/core';\n\nimport { MessageService } from '@igo2/core/message';\n\nimport { Observable, Subscription, fromEvent } from 'rxjs';\nimport { debounceTime, startWith } from 'rxjs/operators';\n\nimport { ConnectionState } from './network.interfaces';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NetworkService implements OnDestroy {\n private stateChangeEventEmitter = new EventEmitter<ConnectionState>();\n private onlineSubscription: Subscription;\n private offlineSubscription: Subscription;\n private previousMessageId;\n\n private state: ConnectionState = {\n connection: window.navigator.onLine\n };\n\n constructor(\n private messageService: MessageService,\n private injector: Injector\n ) {\n this.checkNetworkState();\n }\n\n private checkNetworkState() {\n this.onlineSubscription = fromEvent(window, 'online').subscribe(() => {\n if (this.previousMessageId) {\n this.messageService.remove(this.previousMessageId);\n }\n const messageObj = this.messageService.info(\n 'igo.core.network.online.message',\n 'igo.core.network.online.title'\n );\n this.previousMessageId = messageObj.toastId;\n this.state.connection = true;\n this.emitEvent();\n });\n\n this.offlineSubscription = fromEvent(window, 'offline').subscribe(() => {\n if (this.previousMessageId) {\n this.messageService.remove(this.previousMessageId);\n }\n const messageObj = this.messageService.info(\n 'igo.core.network.offline.message',\n 'igo.core.network.offline.title'\n );\n this.previousMessageId = messageObj.toastId;\n this.state.connection = false;\n this.emitEvent();\n });\n }\n\n private emitEvent() {\n this.stateChangeEventEmitter.emit(this.state);\n }\n\n ngOnDestroy(): void {\n try {\n this.offlineSubscription.unsubscribe();\n this.onlineSubscription.unsubscribe();\n } catch {\n // empty\n }\n }\n\n currentState(reportState = true): Observable<ConnectionState> {\n return reportState\n ? this.stateChangeEventEmitter.pipe(\n debounceTime(300),\n startWith(this.state)\n )\n : this.stateChangeEventEmitter.pipe(debounceTime(300));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAYa,cAAc,CAAA;AAWf,IAAA,cAAA;AACA,IAAA,QAAA;AAXF,IAAA,uBAAuB,GAAG,IAAI,YAAY,EAAmB;AAC7D,IAAA,kBAAkB;AAClB,IAAA,mBAAmB;AACnB,IAAA,iBAAiB;AAEjB,IAAA,KAAK,GAAoB;AAC/B,QAAA,UAAU,EAAE,MAAM,CAAC,SAAS,CAAC;KAC9B;IAED,WACU,CAAA,cAA8B,EAC9B,QAAkB,EAAA;QADlB,IAAc,CAAA,cAAA,GAAd,cAAc;QACd,IAAQ,CAAA,QAAA,GAAR,QAAQ;QAEhB,IAAI,CAAC,iBAAiB,EAAE;;IAGlB,iBAAiB,GAAA;AACvB,QAAA,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,SAAS,CAAC,MAAK;AACnE,YAAA,IAAI,IAAI,CAAC,iBAAiB,EAAE;gBAC1B,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;;AAEpD,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CACzC,iCAAiC,EACjC,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AA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;4FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -18,10 +18,10 @@ class RegexService {
|
|
|
18
18
|
}
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
22
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RegexService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RegexService, providedIn: 'root' });
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RegexService, decorators: [{
|
|
25
25
|
type: Injectable,
|
|
26
26
|
args: [{
|
|
27
27
|
providedIn: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-core-regex.mjs","sources":["../../../packages/core/regex/src/regex.service.ts","../../../packages/core/regex/src/igo2-core-regex.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport { RegexOptions } from './regex.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RegexService {\n protected options: RegexOptions;\n\n constructor(private config: ConfigService) {\n this.options = this.config.getConfig('regex');\n }\n\n getAll() {\n return this.options;\n }\n\n get(key) {\n if (this.options) {\n return this.options[key];\n }\n return;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MASa,YAAY,CAAA;AAGH,IAAA,MAAA;AAFV,IAAA,OAAO;AAEjB,IAAA,WAAA,CAAoB,MAAqB,EAAA;QAArB,IAAM,CAAA,MAAA,GAAN,MAAM;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;;IAG/C,MAAM,GAAA;QACJ,OAAO,IAAI,CAAC,OAAO;;AAGrB,IAAA,GAAG,CAAC,GAAG,EAAA;AACL,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;;QAE1B;;
|
|
1
|
+
{"version":3,"file":"igo2-core-regex.mjs","sources":["../../../packages/core/regex/src/regex.service.ts","../../../packages/core/regex/src/igo2-core-regex.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport { RegexOptions } from './regex.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RegexService {\n protected options: RegexOptions;\n\n constructor(private config: ConfigService) {\n this.options = this.config.getConfig('regex');\n }\n\n getAll() {\n return this.options;\n }\n\n get(key) {\n if (this.options) {\n return this.options[key];\n }\n return;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MASa,YAAY,CAAA;AAGH,IAAA,MAAA;AAFV,IAAA,OAAO;AAEjB,IAAA,WAAA,CAAoB,MAAqB,EAAA;QAArB,IAAM,CAAA,MAAA,GAAN,MAAM;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;;IAG/C,MAAM,GAAA;QACJ,OAAO,IAAI,CAAC,OAAO;;AAGrB,IAAA,GAAG,CAAC,GAAG,EAAA;AACL,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;AAChB,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;;QAE1B;;wGAfS,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFX,MAAM,EAAA,CAAA;;4FAEP,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -60,10 +60,10 @@ class ErrorInterceptor {
|
|
|
60
60
|
progressBar: false
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
64
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
63
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ErrorInterceptor, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
64
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ErrorInterceptor, providedIn: 'root' });
|
|
65
65
|
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ErrorInterceptor, decorators: [{
|
|
67
67
|
type: Injectable,
|
|
68
68
|
args: [{
|
|
69
69
|
providedIn: 'root'
|
|
@@ -88,11 +88,11 @@ class IgoErrorModule {
|
|
|
88
88
|
throw new Error('IgoErrorModule is already loaded. Import it in the AppModule only');
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
92
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
93
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
91
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoErrorModule, deps: [{ token: IgoErrorModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
92
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: IgoErrorModule });
|
|
93
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoErrorModule });
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoErrorModule, decorators: [{
|
|
96
96
|
type: NgModule,
|
|
97
97
|
args: [{
|
|
98
98
|
imports: [],
|
|
@@ -123,10 +123,10 @@ class LoggingInterceptor {
|
|
|
123
123
|
console.log(msg);
|
|
124
124
|
}));
|
|
125
125
|
}
|
|
126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
127
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
126
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LoggingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
127
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LoggingInterceptor });
|
|
128
128
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: LoggingInterceptor, decorators: [{
|
|
130
130
|
type: Injectable
|
|
131
131
|
}] });
|
|
132
132
|
|
|
@@ -143,11 +143,11 @@ class IgoLoggingModule {
|
|
|
143
143
|
]
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
147
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
148
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
147
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: IgoLoggingModule });
|
|
148
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoLoggingModule });
|
|
149
149
|
}
|
|
150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
150
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoLoggingModule, decorators: [{
|
|
151
151
|
type: NgModule,
|
|
152
152
|
args: [{
|
|
153
153
|
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 constructor(private messageService: 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 {\n ModuleWithProviders,\n NgModule,\n Optional,\n SkipSelf\n} 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(@Optional() @SkipSelf() parentModule: IgoErrorModule) {\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;AACP,IAAA,cAAA;AAApB,IAAA,WAAA,CAAoB,cAA8B,EAAA;QAA9B,IAAc,CAAA,cAAA,GAAd,cAAc;;IAElC,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;;AAEzB,QAAA,MAAM,cAAc,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE;AAC/C,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAC1B,UAAU,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,EAC9D,QAAQ,CAAC,MAAK;AACZ,YAAA,MAAM,SAAS,GAAG,cAAc,CAAC,SA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ACtD,QAAA,SAAS,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI;QAC7B,IAAI,CAAC,cAAc,CAAC,KAAK,CACvB,kCAAkC,EAClC,gCAAgC,EAChC;AACE,YAAA,WAAW,EAAE;AACd,SAAA,CACF;;
|
|
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 constructor(private messageService: 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 {\n ModuleWithProviders,\n NgModule,\n Optional,\n SkipSelf\n} 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(@Optional() @SkipSelf() parentModule: IgoErrorModule) {\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;AACP,IAAA,cAAA;AAApB,IAAA,WAAA,CAAoB,cAA8B,EAAA;QAA9B,IAAc,CAAA,cAAA,GAAd,cAAc;;IAElC,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;;AAEzB,QAAA,MAAM,cAAc,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE;AAC/C,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAC1B,UAAU,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC,EAC9D,QAAQ,CAAC,MAAK;AACZ,YAAA,MAAM,SAAS,GAAG,cAAc,CAAC,SAAS;YAC1C,IAAI,CAAC,SAAS,EAAE;gB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,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAhB,gBAAgB,EAAA,CAAA;yGAAhB,gBAAgB,EAAA,CAAA;;4FAAhB,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;;;;"}
|
|
@@ -2,6 +2,40 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, Inject, Optional, Injectable } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
4
|
|
|
5
|
+
const ROUTE_OPTIONS = {
|
|
6
|
+
languageKey: 'lang',
|
|
7
|
+
searchKey: 'search',
|
|
8
|
+
searchGeomKey: 'searchGeom',
|
|
9
|
+
exactMatchKey: 'exactMatch',
|
|
10
|
+
zoomExtentKey: 'zoomExtent',
|
|
11
|
+
focusFirstResultKey: 'sf',
|
|
12
|
+
toolKey: 'tool',
|
|
13
|
+
directionsCoordKey: 'routing',
|
|
14
|
+
directionsOptionsKey: 'routingOptions',
|
|
15
|
+
sidenavKey: 'sidenav',
|
|
16
|
+
visibleOnLayersKey: 'visiblelayers',
|
|
17
|
+
visibleOffLayersKey: 'invisiblelayers',
|
|
18
|
+
vectorKey: 'vector'
|
|
19
|
+
};
|
|
20
|
+
const LEGACY_ROUTE_OPTIONS = {
|
|
21
|
+
projectionKey: 'projection',
|
|
22
|
+
rotationKey: 'rotation',
|
|
23
|
+
zoomKey: 'zoom',
|
|
24
|
+
centerKey: 'center',
|
|
25
|
+
contextKey: 'context',
|
|
26
|
+
layersKey: 'layers',
|
|
27
|
+
wmsUrlKey: 'wmsUrl',
|
|
28
|
+
wmsLayersKey: 'wmsLayers',
|
|
29
|
+
wmtsUrlKey: 'wmtsUrl',
|
|
30
|
+
wmtsLayersKey: 'wmtsLayers',
|
|
31
|
+
arcgisUrlKey: 'arcgisUrl',
|
|
32
|
+
arcgisLayersKey: 'arcgisLayers',
|
|
33
|
+
iarcgisUrlKey: 'iarcgisUrl',
|
|
34
|
+
iarcgisLayersKey: 'iarcgisLayers',
|
|
35
|
+
tarcgisUrlKey: 'tarcgisUrl',
|
|
36
|
+
tarcgisLayersKey: 'tarcgisLayers'
|
|
37
|
+
};
|
|
38
|
+
|
|
5
39
|
const ROUTE_SERVICE_OPTIONS = new InjectionToken('routeServiceOptions');
|
|
6
40
|
function provideRouteServiceOptions(options) {
|
|
7
41
|
return {
|
|
@@ -13,33 +47,15 @@ class RouteService {
|
|
|
13
47
|
router;
|
|
14
48
|
route;
|
|
15
49
|
options;
|
|
16
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated use the new option of context-service
|
|
52
|
+
*/
|
|
53
|
+
legacyOptions;
|
|
54
|
+
constructor(router, route, configs) {
|
|
17
55
|
this.router = router;
|
|
18
56
|
this.route = route;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
zoomKey: 'zoom',
|
|
22
|
-
projectionKey: 'projection',
|
|
23
|
-
contextKey: 'context',
|
|
24
|
-
searchKey: 'search',
|
|
25
|
-
visibleOnLayersKey: 'visiblelayers',
|
|
26
|
-
visibleOffLayersKey: 'invisiblelayers',
|
|
27
|
-
directionsCoordKey: 'routing',
|
|
28
|
-
directionsOptionsKey: 'routingOptions',
|
|
29
|
-
toolKey: 'tool',
|
|
30
|
-
wmsUrlKey: 'wmsUrl',
|
|
31
|
-
wmsLayersKey: 'wmsLayers',
|
|
32
|
-
wmtsUrlKey: 'wmtsUrl',
|
|
33
|
-
wmtsLayersKey: 'wmtsLayers',
|
|
34
|
-
arcgisUrlKey: 'arcgisUrl',
|
|
35
|
-
arcgisLayersKey: 'arcgisLayers',
|
|
36
|
-
iarcgisUrlKey: 'iarcgisUrl',
|
|
37
|
-
iarcgisLayersKey: 'iarcgisLayers',
|
|
38
|
-
tarcgisUrlKey: 'tarcgisUrl',
|
|
39
|
-
tarcgisLayersKey: 'tarcgisLayers',
|
|
40
|
-
vectorKey: 'vector'
|
|
41
|
-
};
|
|
42
|
-
this.options = Object.assign({}, defaultOptions, options);
|
|
57
|
+
this.options = { ...ROUTE_OPTIONS, ...configs };
|
|
58
|
+
this.legacyOptions = LEGACY_ROUTE_OPTIONS;
|
|
43
59
|
}
|
|
44
60
|
get queryParams() {
|
|
45
61
|
let url = decodeURIComponent(location.search);
|
|
@@ -58,10 +74,10 @@ class RouteService {
|
|
|
58
74
|
}
|
|
59
75
|
return this.route.queryParams;
|
|
60
76
|
}
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
62
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
77
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RouteService, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: ROUTE_SERVICE_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
78
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RouteService, providedIn: 'root' });
|
|
63
79
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: RouteService, decorators: [{
|
|
65
81
|
type: Injectable,
|
|
66
82
|
args: [{
|
|
67
83
|
providedIn: 'root'
|
|
@@ -77,5 +93,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
77
93
|
* Generated bundle index. Do not edit.
|
|
78
94
|
*/
|
|
79
95
|
|
|
80
|
-
export { ROUTE_SERVICE_OPTIONS, RouteService, provideRouteServiceOptions };
|
|
96
|
+
export { LEGACY_ROUTE_OPTIONS, ROUTE_OPTIONS, ROUTE_SERVICE_OPTIONS, RouteService, provideRouteServiceOptions };
|
|
81
97
|
//# sourceMappingURL=igo2-core-route.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"igo2-core-route.mjs","sources":["../../../packages/core/route/src/route.service.ts","../../../packages/core/route/src/igo2-core-route.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { ActivatedRoute, Params, Router } from '@angular/router';\n\nimport { Observable } from 'rxjs';\n\nimport {
|
|
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 { Inject, Injectable, InjectionToken, Optional } 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 public options: RouteServiceOptions;\n\n /**\n * @deprecated use the new option of context-service\n */\n public legacyOptions: RouteServiceOptions;\n\n constructor(\n private router: Router,\n public route: ActivatedRoute,\n @Inject(ROUTE_SERVICE_OPTIONS)\n @Optional()\n configs: RouteServiceOptions\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":";;;;AAmCa,MAAA,aAAa,GAAwB;AAChD,IAAA,WAAW,EAAE,MAAM;AACnB,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,kBAAkB,EAAE,SAAS;AAC7B,IAAA,oBAAoB,EAAE,gBAAgB;AACtC,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,kBAAkB,EAAE,eAAe;AACnC,IAAA,mBAAmB,EAAE,iBAAiB;AACtC,IAAA,SAAS,EAAE;;AAGA,MAAA,oBAAoB,GAAwB;AACvD,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,WAAW,EAAE,UAAU;AACvB,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,YAAY,EAAE,WAAW;AACzB,IAAA,UAAU,EAAE,SAAS;AACrB,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,YAAY,EAAE,WAAW;AACzB,IAAA,eAAe,EAAE,cAAc;AAC/B,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,gBAAgB,EAAE,eAAe;AACjC,IAAA,aAAa,EAAE,YAAY;AAC3B,IAAA,gBAAgB,EAAE;;;MCxDP,qBAAqB,GAAG,IAAI,cA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AAC,WAAW;;AAlCpB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,sEAWb,qBAAqB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAXpB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFX,MAAM,EAAA,CAAA;;4FAEP,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;0BAYI,MAAM;2BAAC,qBAAqB;;0BAC5B;;;ACrCL;;AAEG;;;;"}
|
|
@@ -96,10 +96,10 @@ class StorageService extends BaseStorage {
|
|
|
96
96
|
super(config);
|
|
97
97
|
this.config = config;
|
|
98
98
|
}
|
|
99
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
|
100
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
|
99
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StorageService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
100
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StorageService, providedIn: 'root' });
|
|
101
101
|
}
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: StorageService, decorators: [{
|
|
103
103
|
type: Injectable,
|
|
104
104
|
args: [{
|
|
105
105
|
providedIn: 'root'
|
|
@@ -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(private config: 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,GAGvB,EAAA,CAAA,CAAA;IAcW;AAAZ,CAAA,UAAY,uBAAuB,EAAA;AACjC,IAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,uBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,uBAAA,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YACtC;AACD,SAAA,CAAC;;AAGJ,IAAA,KAAK,CAAC,KAAA,GAAsB,YAAY,CAAC,KAAK,EAAA;AAC5C,QAAA,IAAI,KAAK,KAAK,YAAY,CAAC,OAAO,EAAE;YAClC,cAAc,CAAC,KAAK,EAAE;;aACjB;YACL,YAAY,CAAC,KAAK,EAAE;;AAEtB,QAAA,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,uBAAuB,CAAC,OAAO,EAAE,CAAC;;AAE9E;;ACxFK,MAAO,cAAe,SAAQ,WAA2B,CAAA;AACzC,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAqB,EAAA;QACvC,KAAK,CAAC,MAAM,CAAC;QADK,IAAM,CAAA,MAAA,GAAN,MAAM;;
|
|
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(private config: ConfigService) {\n super(config);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"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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: "19.2.
|
|
21
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
|
22
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: IgoCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
21
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: IgoCoreModule, imports: [CommonModule, i1.IgoActivityModule, i2.IgoErrorModule], exports: [IgoActivityModule, IgoErrorModule, IgoLanguageModule] });
|
|
22
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", 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: "19.2.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", 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;;wGAPQ,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YANtB,YAAY,EAAA,EAAA,C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