@igo2/core 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__ivy_ngcc__/locale/en.auth.json +29 -29
- package/__ivy_ngcc__/locale/en.common.json +43 -43
- package/__ivy_ngcc__/locale/en.context.json +199 -199
- package/__ivy_ngcc__/locale/en.core.json +29 -29
- package/__ivy_ngcc__/locale/en.geo.json +805 -774
- package/__ivy_ngcc__/locale/en.integration.json +123 -123
- package/__ivy_ngcc__/locale/en.json +50 -19
- package/__ivy_ngcc__/locale/fr.auth.json +32 -32
- package/__ivy_ngcc__/locale/fr.common.json +43 -43
- package/__ivy_ngcc__/locale/fr.context.json +199 -199
- package/__ivy_ngcc__/locale/fr.core.json +29 -29
- package/__ivy_ngcc__/locale/fr.geo.json +805 -774
- package/__ivy_ngcc__/locale/fr.integration.json +125 -125
- package/__ivy_ngcc__/locale/fr.json +43 -12
- package/esm2020/lib/activity/activity.interceptor.mjs +1 -1
- package/esm2020/lib/activity/activity.module.mjs +1 -1
- package/esm2020/lib/activity/activity.service.mjs +1 -1
- package/esm2020/lib/analytics/shared/analytics.service.mjs +8 -1
- package/esm2020/lib/compression/compressedData.interface.mjs +1 -1
- package/esm2020/lib/compression/compression.service.mjs +1 -1
- package/esm2020/lib/config/config.interface.mjs +1 -1
- package/esm2020/lib/config/config.module.mjs +1 -1
- package/esm2020/lib/config/config.provider.mjs +1 -1
- package/esm2020/lib/config/config.service.mjs +1 -1
- package/esm2020/lib/config/version.mjs +3 -3
- package/esm2020/lib/core.module.mjs +10 -2
- package/esm2020/lib/gesture/gesture.module.mjs +1 -1
- package/esm2020/lib/gesture/gesture.provider.mjs +1 -1
- package/esm2020/lib/language/language.module.mjs +1 -1
- package/esm2020/lib/language/shared/language.loader.mjs +3 -4
- package/esm2020/lib/language/shared/language.provider.mjs +1 -1
- package/esm2020/lib/language/shared/language.service.mjs +5 -5
- package/esm2020/lib/media/media.service.mjs +1 -1
- package/esm2020/lib/message/message.module.mjs +1 -1
- package/esm2020/lib/message/shared/index.mjs +1 -1
- package/esm2020/lib/message/shared/message.interface.mjs +1 -1
- package/esm2020/lib/message/shared/message.service.mjs +17 -9
- package/esm2020/lib/network/network.interfaces.mjs +1 -1
- package/esm2020/lib/network/network.service.mjs +3 -10
- package/esm2020/lib/regex/index.mjs +3 -0
- package/esm2020/lib/regex/regex.interface.mjs +2 -0
- package/esm2020/lib/regex/regex.service.mjs +27 -0
- package/esm2020/lib/request/error.interceptor.mjs +1 -1
- package/esm2020/lib/request/error.module.mjs +1 -1
- package/esm2020/lib/request/logging.interceptor.mjs +2 -2
- package/esm2020/lib/request/logging.module.mjs +1 -1
- package/esm2020/lib/route/route.service.mjs +1 -1
- package/esm2020/lib/storage/storage.interface.mjs +1 -1
- package/esm2020/lib/storage/storage.service.mjs +1 -1
- package/esm2020/public_api.mjs +2 -1
- package/fesm2015/igo2-core.mjs +70 -27
- package/fesm2015/igo2-core.mjs.map +1 -1
- package/fesm2020/igo2-core.mjs +68 -27
- package/fesm2020/igo2-core.mjs.map +1 -1
- package/lib/analytics/shared/analytics.service.d.ts +4 -0
- package/lib/regex/index.d.ts +2 -0
- package/lib/regex/regex.interface.d.ts +3 -0
- package/lib/regex/regex.service.d.ts +12 -0
- package/locale/en.auth.json +29 -29
- package/locale/en.common.json +43 -43
- package/locale/en.context.json +199 -199
- package/locale/en.core.json +29 -29
- package/locale/en.geo.json +805 -774
- package/locale/en.integration.json +123 -123
- package/locale/en.json +50 -19
- package/locale/fr.auth.json +32 -32
- package/locale/fr.common.json +43 -43
- package/locale/fr.context.json +199 -199
- package/locale/fr.core.json +29 -29
- package/locale/fr.geo.json +805 -774
- package/locale/fr.integration.json +125 -125
- package/locale/fr.json +43 -12
- package/package.json +10 -5
- package/public_api.d.ts +1 -0
- package/style/all.theming.scss +5 -5
- package/style/core.theming.scss +9 -9
- package/style/foreground.scss +20 -20
- package/style/index.theming.scss +780 -780
- package/style/material.font.scss +9 -9
- package/style/partial/core.variables.scss +4 -4
- package/style/partial/media.scss +80 -80
- package/style/setup.scss +2 -2
- package/style/themes/blue.theme.scss +19 -19
- package/style/themes/bluedark.theme.scss +51 -51
- package/style/themes/bluedq.theme.scss +52 -52
- package/style/themes/bluegrey.theme.scss +16 -16
- package/style/themes/dark.theme.scss +16 -16
- package/style/themes/deeppurple.theme.scss +16 -16
- package/style/themes/indigo.theme.scss +16 -16
- package/style/themes/orange.theme.scss +16 -16
- package/style/themes/teal.theme.scss +16 -16
- package/style/theming.scss +5 -5
- package/style/typography.scss +17 -17
package/fesm2020/igo2-core.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Injectable, NgModule, InjectionToken, APP_INITIALIZER, Injector, Inject, Optional, SkipSelf, EventEmitter } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { HTTP_INTERCEPTORS, HttpClient, HttpErrorResponse, HttpClientModule, HttpResponse } from '@angular/common/http';
|
|
5
|
-
import { finalize, catchError,
|
|
6
|
-
import { BehaviorSubject, throwError,
|
|
5
|
+
import { finalize, catchError, debounceTime, first, tap, startWith } from 'rxjs/operators';
|
|
6
|
+
import { BehaviorSubject, throwError, forkJoin, map, combineLatest, Observable, fromEvent } from 'rxjs';
|
|
7
7
|
import { uuid, ObjectUtils } from '@igo2/utils';
|
|
8
8
|
import * as i1 from '@ngx-translate/core';
|
|
9
9
|
import { TranslateLoader, TranslateModule, MissingTranslationHandler } from '@ngx-translate/core';
|
|
@@ -100,8 +100,8 @@ IgoActivityModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
|
|
100
100
|
}], null, null); })();
|
|
101
101
|
|
|
102
102
|
const version = {
|
|
103
|
-
lib: '1.
|
|
104
|
-
releaseDate:
|
|
103
|
+
lib: '1.15.0',
|
|
104
|
+
releaseDate: 1683149021750
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
class ConfigService {
|
|
@@ -205,7 +205,7 @@ class LanguageLoader {
|
|
|
205
205
|
return igoLocale$;
|
|
206
206
|
}
|
|
207
207
|
const appLocale$ = this.prefix.map((prefix) => this.http.get(`${prefix}${lang}${this.suffix}`));
|
|
208
|
-
const locale$ =
|
|
208
|
+
const locale$ = forkJoin([igoLocale$, ...appLocale$]);
|
|
209
209
|
return locale$.pipe(map((translations) => {
|
|
210
210
|
return translations.reduce((acc, current) => ObjectUtils.mergeDeep(acc, current), {});
|
|
211
211
|
}));
|
|
@@ -354,9 +354,9 @@ class LanguageService {
|
|
|
354
354
|
}
|
|
355
355
|
setLanguage(language) {
|
|
356
356
|
this.language = language.match(/en|fr/) ? language : 'en';
|
|
357
|
-
this.language
|
|
358
|
-
|
|
359
|
-
|
|
357
|
+
combineLatest([this.translate.use(this.language), this.translate.reloadLang(this.language)]).subscribe(() => {
|
|
358
|
+
this.language$.next(this.language);
|
|
359
|
+
});
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
LanguageService.ɵfac = function LanguageService_Factory(t) { return new (t || LanguageService)(i0.ɵɵinject(i1.TranslateService)); };
|
|
@@ -387,14 +387,18 @@ class MessageService {
|
|
|
387
387
|
const translatedTitleInterpolateParams = { ...activeMessageTranslation.titleInterpolateParams };
|
|
388
388
|
if (activeMessageTranslation.textInterpolateParams) {
|
|
389
389
|
Object.keys(activeMessageTranslation.textInterpolateParams).map(k => {
|
|
390
|
-
|
|
391
|
-
|
|
390
|
+
if (k) {
|
|
391
|
+
translatedTextInterpolateParams[k] =
|
|
392
|
+
this.languageService.translate.instant(activeMessageTranslation.textInterpolateParams[k]);
|
|
393
|
+
}
|
|
392
394
|
});
|
|
393
395
|
}
|
|
394
396
|
if (activeMessageTranslation.titleInterpolateParams) {
|
|
395
397
|
Object.keys(activeMessageTranslation.titleInterpolateParams).map(k => {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
+
if (k) {
|
|
399
|
+
translatedTitleInterpolateParams[k] =
|
|
400
|
+
this.languageService.translate.instant(activeMessageTranslation.titleInterpolateParams[k]);
|
|
401
|
+
}
|
|
398
402
|
});
|
|
399
403
|
}
|
|
400
404
|
forkJoin([
|
|
@@ -481,14 +485,18 @@ class MessageService {
|
|
|
481
485
|
const translatedTitlenterpolateParams = { ...titleInterpolateParams };
|
|
482
486
|
if (textInterpolateParams) {
|
|
483
487
|
Object.keys(textInterpolateParams).map(k => {
|
|
484
|
-
|
|
485
|
-
|
|
488
|
+
if (textInterpolateParams[k]) {
|
|
489
|
+
translatedTextInterpolateParams[k] =
|
|
490
|
+
this.languageService.translate.instant(textInterpolateParams[k]);
|
|
491
|
+
}
|
|
486
492
|
});
|
|
487
493
|
}
|
|
488
494
|
if (titleInterpolateParams) {
|
|
489
495
|
Object.keys(titleInterpolateParams).map(k => {
|
|
490
|
-
|
|
491
|
-
|
|
496
|
+
if (k) {
|
|
497
|
+
translatedTitlenterpolateParams[k] =
|
|
498
|
+
this.languageService.translate.instant(titleInterpolateParams[k]);
|
|
499
|
+
}
|
|
492
500
|
});
|
|
493
501
|
}
|
|
494
502
|
const message = this.languageService.translate.instant(text, translatedTextInterpolateParams);
|
|
@@ -650,13 +658,21 @@ IgoErrorModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
|
|
650
658
|
|
|
651
659
|
const dbConfig = {
|
|
652
660
|
name: 'igo2DB',
|
|
653
|
-
version:
|
|
661
|
+
version: 2,
|
|
654
662
|
objectStoresMeta: [{
|
|
655
663
|
store: 'geoData',
|
|
656
664
|
storeConfig: { keyPath: 'url', autoIncrement: false },
|
|
657
665
|
storeSchema: [
|
|
658
666
|
{ name: 'regionID', keypath: 'regionID', options: { unique: false } }
|
|
659
667
|
]
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
store: 'layerData',
|
|
671
|
+
storeConfig: { keyPath: 'layerId', autoIncrement: false },
|
|
672
|
+
storeSchema: [
|
|
673
|
+
{ name: 'layerOptions', keypath: 'layerOptions', options: { unique: false } },
|
|
674
|
+
{ name: 'sourceOptions', keypath: 'sourceOptions', options: { unique: false } }
|
|
675
|
+
]
|
|
660
676
|
}]
|
|
661
677
|
};
|
|
662
678
|
class IgoCoreModule {
|
|
@@ -766,7 +782,7 @@ class LoggingInterceptor {
|
|
|
766
782
|
// Log when response observable either completes or errors
|
|
767
783
|
finalize(() => {
|
|
768
784
|
const elapsed = Date.now() - started;
|
|
769
|
-
const msg = `${req.method} "${req.urlWithParams}"
|
|
785
|
+
const msg = `${req.method} "${req.urlWithParams}"
|
|
770
786
|
${ok} in ${elapsed} ms.`;
|
|
771
787
|
console.log(msg);
|
|
772
788
|
}));
|
|
@@ -933,6 +949,13 @@ class AnalyticsService {
|
|
|
933
949
|
this.paq.push(['trackEvent', category, action, name]);
|
|
934
950
|
}
|
|
935
951
|
}
|
|
952
|
+
/**
|
|
953
|
+
* Function that tracks layers added to the map
|
|
954
|
+
*/
|
|
955
|
+
trackLayer(category, action, parameters) {
|
|
956
|
+
if (this.options.provider === 'matomo')
|
|
957
|
+
this.paq.push(['trackEvent', category, action, parameters]);
|
|
958
|
+
}
|
|
936
959
|
}
|
|
937
960
|
AnalyticsService.ɵfac = function AnalyticsService_Factory(t) { return new (t || AnalyticsService)(i0.ɵɵinject(ConfigService)); };
|
|
938
961
|
AnalyticsService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AnalyticsService, factory: AnalyticsService.ɵfac, providedIn: 'root' });
|
|
@@ -1264,10 +1287,7 @@ class NetworkService {
|
|
|
1264
1287
|
if (this.previousMessageId) {
|
|
1265
1288
|
this.messageService.remove(this.previousMessageId);
|
|
1266
1289
|
}
|
|
1267
|
-
const
|
|
1268
|
-
const message = translate.instant('igo.core.network.online.message');
|
|
1269
|
-
const title = translate.instant('igo.core.network.online.title');
|
|
1270
|
-
const messageObj = this.messageService.info(message, title);
|
|
1290
|
+
const messageObj = this.messageService.info('igo.core.network.online.message', 'igo.core.network.online.title');
|
|
1271
1291
|
this.previousMessageId = messageObj.toastId;
|
|
1272
1292
|
this.state.connection = true;
|
|
1273
1293
|
this.emitEvent();
|
|
@@ -1276,10 +1296,7 @@ class NetworkService {
|
|
|
1276
1296
|
if (this.previousMessageId) {
|
|
1277
1297
|
this.messageService.remove(this.previousMessageId);
|
|
1278
1298
|
}
|
|
1279
|
-
const
|
|
1280
|
-
const message = translate.instant('igo.core.network.offline.message');
|
|
1281
|
-
const title = translate.instant('igo.core.network.offline.title');
|
|
1282
|
-
const messageObj = this.messageService.info(message, title);
|
|
1299
|
+
const messageObj = this.messageService.info('igo.core.network.offline.message', 'igo.core.network.offline.title');
|
|
1283
1300
|
this.previousMessageId = messageObj.toastId;
|
|
1284
1301
|
this.state.connection = false;
|
|
1285
1302
|
this.emitEvent();
|
|
@@ -1310,6 +1327,30 @@ NetworkService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NetworkSe
|
|
|
1310
1327
|
}]
|
|
1311
1328
|
}], function () { return [{ type: MessageService }, { type: i0.Injector }]; }, null); })();
|
|
1312
1329
|
|
|
1330
|
+
class RegexService {
|
|
1331
|
+
constructor(config) {
|
|
1332
|
+
this.config = config;
|
|
1333
|
+
this.options = this.config.getConfig('regex');
|
|
1334
|
+
}
|
|
1335
|
+
getAll() {
|
|
1336
|
+
return this.options;
|
|
1337
|
+
}
|
|
1338
|
+
get(key) {
|
|
1339
|
+
if (this.options) {
|
|
1340
|
+
return this.options[key];
|
|
1341
|
+
}
|
|
1342
|
+
return;
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
RegexService.ɵfac = function RegexService_Factory(t) { return new (t || RegexService)(i0.ɵɵinject(ConfigService)); };
|
|
1346
|
+
RegexService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: RegexService, factory: RegexService.ɵfac, providedIn: 'root' });
|
|
1347
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RegexService, [{
|
|
1348
|
+
type: Injectable,
|
|
1349
|
+
args: [{
|
|
1350
|
+
providedIn: 'root'
|
|
1351
|
+
}]
|
|
1352
|
+
}], function () { return [{ type: ConfigService }]; }, null); })();
|
|
1353
|
+
|
|
1313
1354
|
/*
|
|
1314
1355
|
* Public API Surface of core
|
|
1315
1356
|
*/
|
|
@@ -1318,5 +1359,5 @@ NetworkService.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: NetworkSe
|
|
|
1318
1359
|
* Generated bundle index. Do not edit.
|
|
1319
1360
|
*/
|
|
1320
1361
|
|
|
1321
|
-
export { ActivityInterceptor, ActivityService, AnalyticsService, CONFIG_OPTIONS, CompressionService, ConfigService, ErrorInterceptor, IgoActivityModule, IgoConfigModule, IgoCoreModule, IgoErrorModule, IgoGestureConfig, IgoGestureModule, IgoLanguageModule, IgoLoggingModule, IgoMessageModule, IgoMissingTranslationHandler, LanguageLoader, LanguageService, LoggingInterceptor, Media, MediaOrientation, MediaService, MessageService, MessageType, NetworkService, ROUTE_SERVICE_OPTIONS, RouteService, StorageScope, StorageService, StorageServiceEventEnum, configFactory, defaultLanguageLoader, provideConfigLoader, provideConfigOptions, provideDefaultLanguageLoader, provideLanguageLoader, provideRouteServiceOptions, version };
|
|
1362
|
+
export { ActivityInterceptor, ActivityService, AnalyticsService, CONFIG_OPTIONS, CompressionService, ConfigService, ErrorInterceptor, IgoActivityModule, IgoConfigModule, IgoCoreModule, IgoErrorModule, IgoGestureConfig, IgoGestureModule, IgoLanguageModule, IgoLoggingModule, IgoMessageModule, IgoMissingTranslationHandler, LanguageLoader, LanguageService, LoggingInterceptor, Media, MediaOrientation, MediaService, MessageService, MessageType, NetworkService, ROUTE_SERVICE_OPTIONS, RegexService, RouteService, StorageScope, StorageService, StorageServiceEventEnum, configFactory, defaultLanguageLoader, provideConfigLoader, provideConfigOptions, provideDefaultLanguageLoader, provideLanguageLoader, provideRouteServiceOptions, version };
|
|
1322
1363
|
//# sourceMappingURL=igo2-core.mjs.map
|