@igo2/core 19.0.0-next.2 → 19.0.0-next.21

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.
@@ -22,10 +22,10 @@ class ActivityService {
22
22
  this.ids.splice(index, 1);
23
23
  this.counter$.next(this.ids.length);
24
24
  }
25
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ActivityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ActivityService, providedIn: 'root' });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ActivityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ActivityService, providedIn: 'root' });
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ActivityService, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ActivityService, decorators: [{
29
29
  type: Injectable,
30
30
  args: [{
31
31
  providedIn: 'root'
@@ -52,10 +52,10 @@ class ActivityInterceptor {
52
52
  this.activityService.unregister(id);
53
53
  }));
54
54
  }
55
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ActivityInterceptor, deps: [{ token: ActivityService }], target: i0.ɵɵFactoryTarget.Injectable });
56
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ActivityInterceptor });
55
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ActivityInterceptor, deps: [{ token: ActivityService }], target: i0.ɵɵFactoryTarget.Injectable });
56
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ActivityInterceptor });
57
57
  }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ActivityInterceptor, decorators: [{
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ActivityInterceptor, decorators: [{
59
59
  type: Injectable
60
60
  }], ctorParameters: () => [{ type: ActivityService }] });
61
61
 
@@ -72,11 +72,11 @@ class IgoActivityModule {
72
72
  ]
73
73
  };
74
74
  }
75
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoActivityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
76
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: IgoActivityModule });
77
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoActivityModule });
75
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoActivityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
76
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: IgoActivityModule });
77
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoActivityModule });
78
78
  }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoActivityModule, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoActivityModule, decorators: [{
80
80
  type: NgModule,
81
81
  args: [{
82
82
  imports: [],
@@ -76,10 +76,10 @@ class AnalyticsService {
76
76
  if (this.options.provider === 'matomo')
77
77
  this.paq.push(['trackEvent', category, action, parameters]);
78
78
  }
79
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AnalyticsService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
80
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AnalyticsService, providedIn: 'root' });
79
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AnalyticsService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
80
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AnalyticsService, providedIn: 'root' });
81
81
  }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: AnalyticsService, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AnalyticsService, decorators: [{
83
83
  type: Injectable,
84
84
  args: [{
85
85
  providedIn: 'root'
@@ -34,8 +34,8 @@ const ALTERNATE_CONFIG_FROM_DEPRECATION = new Map(Object.entries(CONFIG_DEPRECAT
34
34
  ]));
35
35
 
36
36
  const version = {
37
- lib: '19.0.0-next.2',
38
- releaseDate: 1740498911999
37
+ lib: '19.0.0-next.21',
38
+ releaseDate: 1750170617891
39
39
  };
40
40
 
41
41
  class ConfigService {
@@ -117,10 +117,10 @@ class ConfigService {
117
117
  });
118
118
  });
119
119
  }
120
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ConfigService, deps: [{ token: i1.HttpBackend }], target: i0.ɵɵFactoryTarget.Injectable });
121
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ConfigService, providedIn: 'root' });
120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ConfigService, deps: [{ token: i1.HttpBackend }], target: i0.ɵɵFactoryTarget.Injectable });
121
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ConfigService, providedIn: 'root' });
122
122
  }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ConfigService, decorators: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ConfigService, decorators: [{
124
124
  type: Injectable,
125
125
  args: [{
126
126
  providedIn: 'root'
@@ -152,11 +152,11 @@ class IgoConfigModule {
152
152
  providers: [provideConfig({})]
153
153
  };
154
154
  }
155
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: IgoConfigModule });
157
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoConfigModule });
155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: IgoConfigModule });
157
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoConfigModule });
158
158
  }
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoConfigModule, decorators: [{
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoConfigModule, decorators: [{
160
160
  type: NgModule,
161
161
  args: [{
162
162
  imports: [],
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-core-config.mjs","sources":["../../../packages/core/config/src/config-deprecated.ts","../../../packages/core/config/src/version.ts","../../../packages/core/config/src/config.service.ts","../../../packages/core/config/src/config.provider.ts","../../../packages/core/config/src/config.module.ts","../../../packages/core/config/src/igo2-core-config.ts"],"sourcesContent":["import { AlternateConfigOptions, DeprecatedOptions } from './config.interface';\n\nexport const CONFIG_DEPRECATED: Record<string, DeprecatedOptions> = {\n showMenuButton: {\n alternativeKey: 'menu.button.visible',\n mayBeRemoveIn: new Date('2024-06-06')\n },\n menuButtonReverseColor: {\n alternativeKey: 'menu.button.useThemeColor',\n mayBeRemoveIn: new Date('2024-06-06')\n },\n importWithStyle: {\n alternativeKey: 'importExport.importWithStyle',\n mayBeRemoveIn: new Date('2024-06-06')\n },\n hasGeolocateButton: {\n alternativeKey: 'geolocate.button.visible',\n mayBeRemoveIn: new Date('2024-06-06')\n }\n};\n\nexport const ALTERNATE_CONFIG_FROM_DEPRECATION = new Map<\n string,\n AlternateConfigOptions\n>(\n Object.entries(CONFIG_DEPRECATED)\n .filter(([_, options]) => options.alternativeKey)\n .map(([key, options]) => [\n options.alternativeKey,\n {\n deprecatedKey: key\n } satisfies AlternateConfigOptions\n ])\n);\n","export interface Version {\n app?: string;\n lib?: string;\n releaseDateApp?: number;\n releaseDate?: number;\n}\n\nexport const version: Version = {\n lib: '19.0.0-next.2',\n releaseDate: 1740498911999\n};\n","import { HttpBackend, HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport {\n ALTERNATE_CONFIG_FROM_DEPRECATION,\n CONFIG_DEPRECATED\n} from './config-deprecated';\nimport { ConfigOptions } from './config.interface';\nimport { version } from './version';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfigService<T extends object = Record<string, any>> {\n private config: T | null;\n private httpClient: HttpClient;\n private configDeprecated = new Map(Object.entries(CONFIG_DEPRECATED));\n\n private _isLoaded$ = new BehaviorSubject<boolean>(null);\n isLoaded$ = this._isLoaded$.asObservable();\n\n constructor(handler: HttpBackend) {\n this.httpClient = new HttpClient(handler);\n }\n\n /**\n * Use to get the all config file (merge from environnement.ts and config.json)\n */\n public getConfigs(): any {\n Array.from(this.configDeprecated.keys()).map((deprecatedKey) => {\n const deprecatedValue = ObjectUtils.resolve(this.config, deprecatedKey);\n if (deprecatedValue !== undefined) {\n this.handleDeprecatedConfig(deprecatedKey);\n }\n });\n return this.config;\n }\n\n /**\n * Use to get the data found in config file\n */\n public getConfig<T = any>(key: string, defaultValue?: unknown): T {\n let value = ObjectUtils.resolve(this.config, key);\n\n const isDeprecated = this.configDeprecated.get(key);\n if (isDeprecated && value !== undefined) {\n this.handleDeprecatedConfig(key);\n } else if (value === undefined) {\n value = this.handleDeprecationPossibility(key);\n }\n\n return value ?? defaultValue;\n }\n\n private handleDeprecatedConfig(key: string): void {\n const options = this.configDeprecated.get(key);\n\n let message = `This config (${key}) is deprecated and will be removed shortly`;\n if (options.alternativeKey) {\n message += ` You should use this key (${options.alternativeKey}) as an alternate solution`;\n }\n\n const currentDate = new Date();\n currentDate >= options.mayBeRemoveIn\n ? console.error(message)\n : console.warn(message);\n }\n\n private handleDeprecationPossibility(key: string): any {\n const options = ALTERNATE_CONFIG_FROM_DEPRECATION.get(key);\n if (!options) {\n return;\n }\n\n return this.getConfig(options.deprecatedKey);\n }\n\n /**\n * This method loads \"[path]\" to get all config's variables\n */\n public load(options: ConfigOptions<T>): void | Promise<unknown> {\n const baseConfig = options.default;\n if (!options.path) {\n this.config = baseConfig;\n this._isLoaded$.next(true);\n return;\n }\n\n return new Promise((resolve) => {\n this.httpClient\n .get(options.path)\n .pipe(\n catchError((error: any): any => {\n console.log(`Configuration file ${options.path} could not be read`);\n this._isLoaded$.next(false);\n resolve(true);\n return throwError(error.error || 'Server error');\n })\n )\n .subscribe((configResponse: object) => {\n this.config = ObjectUtils.mergeDeep(\n ObjectUtils.mergeDeep({ version }, baseConfig),\n configResponse\n );\n this._isLoaded$.next(true);\n resolve(true);\n });\n });\n }\n}\n","import {\n EnvironmentProviders,\n InjectionToken,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer\n} from '@angular/core';\n\nimport { ConfigOptions } from './config.interface';\nimport { ConfigService } from './config.service';\n\nexport const CONFIG_OPTIONS = new InjectionToken<ConfigOptions>(\n 'configOptions'\n);\n\nexport function provideConfig(options: ConfigOptions): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CONFIG_OPTIONS,\n useValue: options\n },\n provideAppInitializer(async () => {\n const configService = inject(ConfigService);\n const options = inject(CONFIG_OPTIONS);\n return configService.load(options);\n })\n ]);\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { provideConfig } from './config.provider';\n\n/**\n * @deprecated import the provideConfig directly\n */\n@NgModule({\n imports: [],\n declarations: [],\n exports: []\n})\nexport class IgoConfigModule {\n static forRoot(): ModuleWithProviders<IgoConfigModule> {\n return {\n ngModule: IgoConfigModule,\n providers: [provideConfig({})]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAEO,MAAM,iBAAiB,GAAsC;AAClE,IAAA,cAAc,EAAE;AACd,QAAA,cAAc,EAAE,qBAAqB;AACrC,QAAA,aAAa,EAAE,IAAI,IAAI,CAAC,YAAY;AACrC,KAAA;AACD,IAAA,sBAAsB,EAAE;AACtB,QAAA,cAAc,EAAE,2BAA2B;AAC3C,QAAA,aAAa,EAAE,IAAI,IAAI,CAAC,YAAY;AACrC,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,cAAc,EAAE,8BAA8B;AAC9C,QAAA,aAAa,EAAE,IAAI,IAAI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,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCNY,cAAc,GAAG,IAAI,cAAc,CAC9C,eAAe;AAGX,SAAU,aAAa,CAAC,OAAsB,EAAA;AAClD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,QAAQ,EAAE;AACX,SAAA;QACD,qBAAqB,CAAC,YAAW;AAC/B,YAAA,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAC3C,YAAA,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,YAAA,OAAO,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC;AACpC,SAAC;AACF,KAAA,CAAC;AACJ;;ACvBA;;AAEG;MAMU,eAAe,CAAA;AAC1B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,eAAe;AACzB,YAAA,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;SAC9B;;uGALQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,CAAA;wGAAf,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-core-config.mjs","sources":["../../../packages/core/config/src/config-deprecated.ts","../../../packages/core/config/src/version.ts","../../../packages/core/config/src/config.service.ts","../../../packages/core/config/src/config.provider.ts","../../../packages/core/config/src/config.module.ts","../../../packages/core/config/src/igo2-core-config.ts"],"sourcesContent":["import { AlternateConfigOptions, DeprecatedOptions } from './config.interface';\n\nexport const CONFIG_DEPRECATED: Record<string, DeprecatedOptions> = {\n showMenuButton: {\n alternativeKey: 'menu.button.visible',\n mayBeRemoveIn: new Date('2024-06-06')\n },\n menuButtonReverseColor: {\n alternativeKey: 'menu.button.useThemeColor',\n mayBeRemoveIn: new Date('2024-06-06')\n },\n importWithStyle: {\n alternativeKey: 'importExport.importWithStyle',\n mayBeRemoveIn: new Date('2024-06-06')\n },\n hasGeolocateButton: {\n alternativeKey: 'geolocate.button.visible',\n mayBeRemoveIn: new Date('2024-06-06')\n }\n};\n\nexport const ALTERNATE_CONFIG_FROM_DEPRECATION = new Map<\n string,\n AlternateConfigOptions\n>(\n Object.entries(CONFIG_DEPRECATED)\n .filter(([_, options]) => options.alternativeKey)\n .map(([key, options]) => [\n options.alternativeKey,\n {\n deprecatedKey: key\n } satisfies AlternateConfigOptions\n ])\n);\n","export interface Version {\n app?: string;\n lib?: string;\n releaseDateApp?: number;\n releaseDate?: number;\n}\n\nexport const version: Version = {\n lib: '19.0.0-next.21',\n releaseDate: 1750170617891\n};\n","import { HttpBackend, HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { ObjectUtils } from '@igo2/utils';\n\nimport { BehaviorSubject, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport {\n ALTERNATE_CONFIG_FROM_DEPRECATION,\n CONFIG_DEPRECATED\n} from './config-deprecated';\nimport { ConfigOptions } from './config.interface';\nimport { version } from './version';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfigService<T extends object = Record<string, any>> {\n private config: T | null;\n private httpClient: HttpClient;\n private configDeprecated = new Map(Object.entries(CONFIG_DEPRECATED));\n\n private _isLoaded$ = new BehaviorSubject<boolean>(null);\n isLoaded$ = this._isLoaded$.asObservable();\n\n constructor(handler: HttpBackend) {\n this.httpClient = new HttpClient(handler);\n }\n\n /**\n * Use to get the all config file (merge from environnement.ts and config.json)\n */\n public getConfigs(): any {\n Array.from(this.configDeprecated.keys()).map((deprecatedKey) => {\n const deprecatedValue = ObjectUtils.resolve(this.config, deprecatedKey);\n if (deprecatedValue !== undefined) {\n this.handleDeprecatedConfig(deprecatedKey);\n }\n });\n return this.config;\n }\n\n /**\n * Use to get the data found in config file\n */\n public getConfig<T = any>(key: string, defaultValue?: unknown): T {\n let value = ObjectUtils.resolve(this.config, key);\n\n const isDeprecated = this.configDeprecated.get(key);\n if (isDeprecated && value !== undefined) {\n this.handleDeprecatedConfig(key);\n } else if (value === undefined) {\n value = this.handleDeprecationPossibility(key);\n }\n\n return value ?? defaultValue;\n }\n\n private handleDeprecatedConfig(key: string): void {\n const options = this.configDeprecated.get(key);\n\n let message = `This config (${key}) is deprecated and will be removed shortly`;\n if (options.alternativeKey) {\n message += ` You should use this key (${options.alternativeKey}) as an alternate solution`;\n }\n\n const currentDate = new Date();\n currentDate >= options.mayBeRemoveIn\n ? console.error(message)\n : console.warn(message);\n }\n\n private handleDeprecationPossibility(key: string): any {\n const options = ALTERNATE_CONFIG_FROM_DEPRECATION.get(key);\n if (!options) {\n return;\n }\n\n return this.getConfig(options.deprecatedKey);\n }\n\n /**\n * This method loads \"[path]\" to get all config's variables\n */\n public load(options: ConfigOptions<T>): void | Promise<unknown> {\n const baseConfig = options.default;\n if (!options.path) {\n this.config = baseConfig;\n this._isLoaded$.next(true);\n return;\n }\n\n return new Promise((resolve) => {\n this.httpClient\n .get(options.path)\n .pipe(\n catchError((error: any): any => {\n console.log(`Configuration file ${options.path} could not be read`);\n this._isLoaded$.next(false);\n resolve(true);\n return throwError(error.error || 'Server error');\n })\n )\n .subscribe((configResponse: object) => {\n this.config = ObjectUtils.mergeDeep(\n ObjectUtils.mergeDeep({ version }, baseConfig),\n configResponse\n );\n this._isLoaded$.next(true);\n resolve(true);\n });\n });\n }\n}\n","import {\n EnvironmentProviders,\n InjectionToken,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer\n} from '@angular/core';\n\nimport { ConfigOptions } from './config.interface';\nimport { ConfigService } from './config.service';\n\nexport const CONFIG_OPTIONS = new InjectionToken<ConfigOptions>(\n 'configOptions'\n);\n\nexport function provideConfig(options: ConfigOptions): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: CONFIG_OPTIONS,\n useValue: options\n },\n provideAppInitializer(async () => {\n const configService = inject(ConfigService);\n const options = inject(CONFIG_OPTIONS);\n return configService.load(options);\n })\n ]);\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { provideConfig } from './config.provider';\n\n/**\n * @deprecated import the provideConfig directly\n */\n@NgModule({\n imports: [],\n declarations: [],\n exports: []\n})\nexport class IgoConfigModule {\n static forRoot(): ModuleWithProviders<IgoConfigModule> {\n return {\n ngModule: IgoConfigModule,\n providers: [provideConfig({})]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAEO,MAAM,iBAAiB,GAAsC;AAClE,IAAA,cAAc,EAAE;AACd,QAAA,cAAc,EAAE,qBAAqB;AACrC,QAAA,aAAa,EAAE,IAAI,IAAI,CAAC,YAAY;AACrC,KAAA;AACD,IAAA,sBAAsB,EAAE;AACtB,QAAA,cAAc,EAAE,2BAA2B;AAC3C,QAAA,aAAa,EAAE,IAAI,IAAI,CAAC,YAAY;AACrC,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,cAAc,EAAE,8BAA8B;AAC9C,QAAA,aAAa,EAAE,IAAI,IAAI,CAAC,YAAY;AACrC,KAAA;AACD,IAAA,kBAAkB,EAAE;AAClB,QAAA,cAAc,EAAE,0BAA0B;AAC1C,QAAA,aAAa,EAAE,IAAI,IAAI,CAAC,YAAY;AACrC;CACF;AAEM,MAAM,iCAAiC,GAAG,IAAI,GAAG,CAItD,MAAM,CAAC,OAAO,CAAC,iBAAiB;AAC7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AGX,SAAU,aAAa,CAAC,OAAsB,EAAA;AAClD,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,QAAQ,EAAE;AACX,SAAA;QACD,qBAAqB,CAAC,YAAW;AAC/B,YAAA,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAC3C,YAAA,MAAM,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,YAAA,OAAO,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC;AACpC,SAAC;AACF,KAAA,CAAC;AACJ;;ACvBA;;AAEG;MAMU,eAAe,CAAA;AAC1B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,eAAe;AACzB,YAAA,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,CAAC;SAC9B;;uGALQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAf,eAAe,EAAA,CAAA;wGAAf,eAAe,EAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -1,7 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule, Injectable, makeEnvironmentProviders, provideAppInitializer, inject, importProvidersFrom } from '@angular/core';
2
+ import { NgModule, inject, PLATFORM_ID, Injectable, makeEnvironmentProviders, provideAppInitializer, importProvidersFrom } from '@angular/core';
3
3
  import * as i1 from '@ngx-translate/core';
4
- import { TranslateModule, TranslateLoader, MissingTranslationHandler, TranslateFakeLoader } from '@ngx-translate/core';
4
+ import { TranslateModule, TranslateLoader, provideTranslateService, MissingTranslationHandler, DEFAULT_LANGUAGE, TranslateFakeLoader } from '@ngx-translate/core';
5
+ import { DOCUMENT, isPlatformServer } from '@angular/common';
5
6
  import { HttpClient, HttpBackend } from '@angular/common/http';
6
7
  import { ObjectUtils } from '@igo2/utils';
7
8
  import { BehaviorSubject, of, forkJoin, map, tap, first, switchMap, combineLatest } from 'rxjs';
@@ -9,11 +10,11 @@ import { ConfigService } from '@igo2/core/config';
9
10
  import { timeout, catchError } from 'rxjs/operators';
10
11
 
11
12
  class IgoLanguageModule {
12
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoLanguageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: IgoLanguageModule, exports: [TranslateModule] });
14
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoLanguageModule, imports: [TranslateModule] });
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoLanguageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
14
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: IgoLanguageModule, exports: [TranslateModule] });
15
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoLanguageModule, imports: [TranslateModule] });
15
16
  }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoLanguageModule, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoLanguageModule, decorators: [{
17
18
  type: NgModule,
18
19
  args: [{
19
20
  exports: [TranslateModule]
@@ -30,12 +31,16 @@ class LanguageLoader {
30
31
  suffix = '.json';
31
32
  prefix;
32
33
  options;
34
+ baseUrl;
33
35
  constructor(handler, options) {
34
36
  this.httpClient = new HttpClient(handler);
35
37
  this.options = options;
38
+ const document = inject(DOCUMENT);
39
+ const platformId = inject(PLATFORM_ID);
40
+ this.baseUrl = isPlatformServer(platformId) ? document.location.origin : '';
36
41
  }
37
42
  getTranslation(lang) {
38
- const igoLocale$ = this.httpClient.get(`locale/libs_locale/${lang}.json`);
43
+ const igoLocale$ = this.httpClient.get(`${this.baseUrl}/locale/libs_locale/${lang}.json`);
39
44
  if (!this.prefix) {
40
45
  const prefix = this.options.prefix;
41
46
  this.prefix = !prefix || Array.isArray(prefix) ? prefix : [prefix];
@@ -44,7 +49,7 @@ class LanguageLoader {
44
49
  this._isLoaded$.next(true);
45
50
  return this.options.ignoreLibsLocale ? of(undefined) : igoLocale$;
46
51
  }
47
- const appLocale$ = this.prefix.map((prefix) => this.httpClient.get(`${prefix}${lang}${this.suffix}`));
52
+ const appLocale$ = this.prefix.map((prefix) => this.httpClient.get(`${this.baseUrl}/${prefix}${lang}${this.suffix}`));
48
53
  const locale$ = [...appLocale$];
49
54
  if (!this.options.ignoreLibsLocale) {
50
55
  locale$.unshift(igoLocale$);
@@ -79,8 +84,12 @@ class LanguageService {
79
84
  language$ = new BehaviorSubject(undefined);
80
85
  constructor(translate) {
81
86
  this.translate = translate;
82
- if (!this.translate.defaultLang ||
83
- !this.matchLanguage(this.translate.defaultLang)) {
87
+ const defaultLang = this.translate.defaultLang;
88
+ if (defaultLang && this.matchLanguage(defaultLang)) {
89
+ this.language = defaultLang;
90
+ this.language$.next(defaultLang);
91
+ }
92
+ else {
84
93
  this.setBrowserLanguage();
85
94
  }
86
95
  }
@@ -105,10 +114,10 @@ class LanguageService {
105
114
  this.language$.next(this.language);
106
115
  });
107
116
  }
108
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LanguageService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
109
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LanguageService, providedIn: 'root' });
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: LanguageService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
118
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: LanguageService, providedIn: 'root' });
110
119
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LanguageService, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: LanguageService, decorators: [{
112
121
  type: Injectable,
113
122
  args: [{
114
123
  providedIn: 'root'
@@ -136,6 +145,7 @@ const TIMEOUT_DURATION = 5000;
136
145
  var TranslationFeatureKind;
137
146
  (function (TranslationFeatureKind) {
138
147
  TranslationFeatureKind[TranslationFeatureKind["Translation"] = 0] = "Translation";
148
+ TranslationFeatureKind[TranslationFeatureKind["DefaultLanguage"] = 1] = "DefaultLanguage";
139
149
  })(TranslationFeatureKind || (TranslationFeatureKind = {}));
140
150
  /**
141
151
  * Make sure you only call this method in the root module of your application, most of the time called AppModule.
@@ -161,7 +171,7 @@ function withStaticConfig(options, defaultLanguage) {
161
171
  return {
162
172
  kind: TranslationFeatureKind.Translation,
163
173
  providers: [
164
- importProvidersFrom(TranslateModule.forRoot(setTranslationConfig(loader, defaultLanguage)))
174
+ provideTranslateService(setTranslationConfig(loader, defaultLanguage))
165
175
  ]
166
176
  };
167
177
  }
@@ -174,10 +184,36 @@ function withAsyncConfig(defaultLanguage) {
174
184
  return {
175
185
  kind: TranslationFeatureKind.Translation,
176
186
  providers: [
177
- importProvidersFrom(TranslateModule.forRoot(setTranslationConfig(loader, defaultLanguage)))
187
+ provideTranslateService(setTranslationConfig(loader, defaultLanguage))
178
188
  ]
179
189
  };
180
190
  }
191
+ /**
192
+ * Get the first segment of the path (e.g., '/en/alerts' => 'en')
193
+ * @param allowedLanguages default to ['fr', 'en']
194
+ */
195
+ function withUrlDefaultLanguage(defaultLang, allowedLanguages = ['fr', 'en']) {
196
+ return {
197
+ kind: TranslationFeatureKind.DefaultLanguage,
198
+ providers: [
199
+ {
200
+ provide: DEFAULT_LANGUAGE,
201
+ useFactory: defaultLanguageSegmentFactory(allowedLanguages, defaultLang)
202
+ }
203
+ ]
204
+ };
205
+ }
206
+ function defaultLanguageSegmentFactory(allowedLanguages, defaultLang) {
207
+ return () => {
208
+ const doc = inject(DOCUMENT);
209
+ const url = new URL(doc.location.href);
210
+ const firstSegment = url.pathname.split('/').filter(Boolean)[0];
211
+ if (allowedLanguages.includes(firstSegment)) {
212
+ return firstSegment;
213
+ }
214
+ return defaultLang;
215
+ };
216
+ }
181
217
  const setTranslationConfig = (loader, defaultLanguage) => ({
182
218
  defaultLanguage: defaultLanguage,
183
219
  loader: loader ?? DEFAULT_LANGUAGE_LOADER,
@@ -218,5 +254,5 @@ function provideMockTranslation() {
218
254
  * Generated bundle index. Do not edit.
219
255
  */
220
256
 
221
- export { DEFAULT_LANGUAGE_LOADER, IgoLanguageModule, IgoMissingTranslationHandler, LANGUAGE_LOADER, LanguageLoader, LanguageLoaderBase, LanguageLoaderWithAsyncConfig, LanguageService, TranslationFeatureKind, provideMockTranslation, provideTranslation, setTranslationConfig, withAsyncConfig, withStaticConfig };
257
+ export { DEFAULT_LANGUAGE_LOADER, IgoLanguageModule, IgoMissingTranslationHandler, LANGUAGE_LOADER, LanguageLoader, LanguageLoaderBase, LanguageLoaderWithAsyncConfig, LanguageService, TranslationFeatureKind, provideMockTranslation, provideTranslation, setTranslationConfig, withAsyncConfig, withStaticConfig, withUrlDefaultLanguage };
222
258
  //# sourceMappingURL=igo2-core-language.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-core-language.mjs","sources":["../../../packages/core/language/src/language.module.ts","../../../packages/core/language/src/shared/language.interface.ts","../../../packages/core/language/src/shared/language.loader.ts","../../../packages/core/language/src/shared/language.service.ts","../../../packages/core/language/src/shared/missing-translation.guard.ts","../../../packages/core/language/src/shared/language.provider.ts","../../../packages/core/language/src/shared/language-mock.provider.ts","../../../packages/core/language/src/igo2-core-language.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\n\n@NgModule({\n exports: [TranslateModule]\n})\nexport class IgoLanguageModule {}\n","import { TranslateLoader } from '@ngx-translate/core';\nimport { Observable } from 'rxjs';\n\nexport interface LanguageOptions {\n prefix?: string | string[];\n ignoreLibsLocale?: boolean;\n}\n\nexport abstract class LanguageLoaderBase implements TranslateLoader {\n abstract isLoaded$: Observable<boolean>;\n abstract getTranslation(lang: string): Observable<any>;\n}\n","import { HttpBackend, HttpClient } from '@angular/common/http';\n\nimport { ConfigService } from '@igo2/core/config';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport {\n BehaviorSubject,\n Observable,\n first,\n forkJoin,\n map,\n of,\n switchMap,\n tap\n} from 'rxjs';\n\nimport { LanguageLoaderBase, LanguageOptions } from './language.interface';\n\nexport class LanguageLoader implements LanguageLoaderBase {\n private httpClient: HttpClient;\n\n private _isLoaded$ = new BehaviorSubject<boolean>(null);\n isLoaded$ = this._isLoaded$.asObservable();\n\n suffix = '.json';\n prefix?: string | string[];\n options: LanguageOptions;\n\n constructor(handler: HttpBackend, options: LanguageOptions) {\n this.httpClient = new HttpClient(handler);\n this.options = options;\n }\n\n public getTranslation(lang: string): Observable<any> {\n const igoLocale$ = this.httpClient.get(`locale/libs_locale/${lang}.json`);\n if (!this.prefix) {\n const prefix = this.options.prefix;\n this.prefix = !prefix || Array.isArray(prefix) ? prefix : [prefix];\n }\n\n if (!this.prefix || this.prefix.length === 0) {\n this._isLoaded$.next(true);\n return this.options.ignoreLibsLocale ? of(undefined) : igoLocale$;\n }\n\n const appLocale$ = (this.prefix as string[]).map((prefix) =>\n this.httpClient.get(`${prefix}${lang}${this.suffix}`)\n );\n\n const locale$ = [...appLocale$];\n\n if (!this.options.ignoreLibsLocale) {\n locale$.unshift(igoLocale$);\n }\n\n return forkJoin(locale$).pipe(\n map((translations) => {\n return translations.reduce(\n (acc, current) => ObjectUtils.mergeDeep(acc, current),\n {}\n );\n }),\n tap(() => {\n this._isLoaded$.next(true);\n })\n );\n }\n}\n\nexport class LanguageLoaderWithAsyncConfig extends LanguageLoader {\n constructor(\n handler: HttpBackend,\n private configService: ConfigService,\n prefix?: string | string[],\n suffix = '.json'\n ) {\n super(handler, undefined);\n this.prefix = prefix;\n this.suffix = suffix;\n }\n\n public getTranslation(lang: string): Observable<any> {\n return this.configService.isLoaded$.pipe(\n first((isLoaded) => isLoaded),\n switchMap(() => {\n this.options =\n this.configService.getConfig<LanguageOptions>('language');\n\n return super.getTranslation(lang);\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { BehaviorSubject, combineLatest } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LanguageService {\n private language: string;\n readonly language$ = new BehaviorSubject<string>(undefined);\n\n constructor(public translate: TranslateService) {\n if (\n !this.translate.defaultLang ||\n !this.matchLanguage(this.translate.defaultLang)\n ) {\n this.setBrowserLanguage();\n }\n }\n private setBrowserLanguage() {\n this.language = this.translate.getBrowserLang();\n const lang = this.getLanguage();\n this.translate.setDefaultLang(lang);\n this.language$.next(lang);\n }\n\n public getLanguage(): string {\n return this.matchLanguage(this.language) ? this.language : 'en';\n }\n\n private matchLanguage(lang: string): boolean {\n return !!lang.match(/en|fr/);\n }\n\n public setLanguage(language: string) {\n this.language = this.matchLanguage(language) ? language : 'en';\n combineLatest([\n this.translate.use(this.language),\n this.translate.reloadLang(this.language)\n ]).subscribe(() => {\n this.language$.next(this.language);\n });\n }\n}\n","import {\n MissingTranslationHandler,\n MissingTranslationHandlerParams\n} from '@ngx-translate/core';\n\nexport class IgoMissingTranslationHandler implements MissingTranslationHandler {\n handle(params: MissingTranslationHandlerParams) {\n if (!params.translateService.langs.length) {\n const error =\n 'Translations are not yet loaded. \\\n Check that the LanguageService is injected.';\n throw new Error(error);\n }\n\n if (params.key.substr(0, 4) === 'igo.') {\n throw new Error(`The Key \"${params.key}\" is missing in locale file.`);\n } else {\n return params.key;\n }\n }\n}\n","import { HttpBackend } from '@angular/common/http';\nimport {\n EnvironmentProviders,\n Provider,\n importProvidersFrom,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer\n} from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport {\n MissingTranslationHandler,\n TranslateLoader,\n TranslateModule,\n TranslateModuleConfig\n} from '@ngx-translate/core';\nimport { first } from 'rxjs';\nimport { catchError, timeout } from 'rxjs/operators';\n\nimport { LanguageLoaderBase, LanguageOptions } from './language.interface';\nimport {\n LanguageLoader,\n LanguageLoaderWithAsyncConfig\n} from './language.loader';\nimport { LanguageService } from './language.service';\nimport { IgoMissingTranslationHandler } from './missing-translation.guard';\n\n// 5 seconds\nconst TIMEOUT_DURATION = 5000;\n\nexport interface TranslationFeature<KindT extends TranslationFeatureKind> {\n kind: KindT;\n providers: (Provider | EnvironmentProviders)[];\n}\n\nexport enum TranslationFeatureKind {\n Translation = 0\n}\n\n/**\n * Make sure you only call this method in the root module of your application, most of the time called AppModule.\n */\nexport function provideTranslation(\n featureConfig: TranslationFeature<TranslationFeatureKind.Translation>\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n ...featureConfig.providers,\n provideAppInitializer(() => {\n const languageService = inject(LanguageService);\n return (\n languageService.translate.currentLoader as LanguageLoaderBase\n ).isLoaded$?.pipe(\n timeout(TIMEOUT_DURATION),\n first((isLoaded) => isLoaded === true),\n catchError((error) => {\n error.message += ` - Request timed out for language loader after: ${TIMEOUT_DURATION}`;\n throw error;\n })\n );\n })\n ]);\n}\n\nexport function withStaticConfig(\n options: LanguageOptions,\n defaultLanguage?: string | undefined\n): TranslationFeature<TranslationFeatureKind.Translation> {\n const loader: Provider = {\n provide: TranslateLoader,\n useFactory: (http: HttpBackend) => languageLoaderWithStatic(http, options),\n deps: [HttpBackend]\n };\n return {\n kind: TranslationFeatureKind.Translation,\n providers: [\n importProvidersFrom(\n TranslateModule.forRoot(setTranslationConfig(loader, defaultLanguage))\n )\n ]\n };\n}\n\nexport function withAsyncConfig(\n defaultLanguage?: string | undefined\n): TranslationFeature<TranslationFeatureKind.Translation> {\n const loader: Provider = {\n provide: TranslateLoader,\n useFactory: languageLoaderWithAsync,\n deps: [HttpBackend, ConfigService]\n };\n return {\n kind: TranslationFeatureKind.Translation,\n providers: [\n importProvidersFrom(\n TranslateModule.forRoot(setTranslationConfig(loader, defaultLanguage))\n )\n ]\n };\n}\n\nexport const setTranslationConfig = (\n loader?: Provider,\n defaultLanguage?: string\n): TranslateModuleConfig => ({\n defaultLanguage: defaultLanguage,\n loader: loader ?? DEFAULT_LANGUAGE_LOADER,\n missingTranslationHandler: {\n provide: MissingTranslationHandler,\n useClass: IgoMissingTranslationHandler\n }\n});\n\nfunction languageLoaderWithStatic(\n http: HttpBackend,\n options?: LanguageOptions\n) {\n return new LanguageLoader(http, options);\n}\n\nexport const LANGUAGE_LOADER: Provider = {\n provide: TranslateLoader,\n useFactory: languageLoaderWithAsync,\n deps: [HttpBackend, ConfigService]\n};\n\nfunction languageLoaderWithAsync(http: HttpBackend, config?: ConfigService) {\n return new LanguageLoaderWithAsyncConfig(http, config, undefined, undefined);\n}\n\nexport const DEFAULT_LANGUAGE_LOADER: Provider = {\n provide: TranslateLoader,\n useFactory: languageLoaderWithAsync,\n deps: [HttpBackend, ConfigService]\n};\n","import {\n EnvironmentProviders,\n importProvidersFrom,\n makeEnvironmentProviders\n} from '@angular/core';\n\nimport {\n TranslateFakeLoader,\n TranslateLoader,\n TranslateModule\n} from '@ngx-translate/core';\n\nexport function provideMockTranslation(): EnvironmentProviders {\n return makeEnvironmentProviders([\n importProvidersFrom(\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useClass: TranslateFakeLoader\n }\n })\n )\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,eAAe,CAAA,EAAA,CAAA;AAEd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,eAAe,CAAA,EAAA,CAAA;;2FAEd,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;MCEqB,kBAAkB,CAAA;AAGvC;;MCOY,cAAc,CAAA;AACjB,IAAA,UAAU;AAEV,IAAA,UAAU,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC;AACvD,IAAA,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE;IAE1C,MAAM,GAAG,OAAO;AAChB,IAAA,MAAM;AACN,IAAA,OAAO;IAEP,WAAY,CAAA,OAAoB,EAAE,OAAwB,EAAA;QACxD,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC;AACzC,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;;AAGjB,IAAA,cAAc,CAAC,IAAY,EAAA;AAChC,QAAA,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,EAAE,aAAa;;AAGnC,SAAS,uBAAuB,CAAC,IAAiB,EAAE,MAAsB,EAAA;IACxE,OAAO,IAAI,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;AAC9E;AAEa,MAAA,uBAAuB,GAAa;AAC/C,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,UAAU,EAAE,uBAAuB;AACnC,IAAA,IAAI,EAAE,CAAC,WAAW,EAAE,aAAa;;;SC1HnB,sBAAsB,GAAA;AACpC,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,mBAAmB,CACjB,eAAe,CAAC,OAAO,CAAC;AACtB,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,QAAQ,EAAE;AACX;AACF,SAAA,CAAC;AAEL,KAAA,CAAC;AACJ;;ACvBA;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-core-language.mjs","sources":["../../../packages/core/language/src/language.module.ts","../../../packages/core/language/src/shared/language.interface.ts","../../../packages/core/language/src/shared/language.loader.ts","../../../packages/core/language/src/shared/language.service.ts","../../../packages/core/language/src/shared/missing-translation.guard.ts","../../../packages/core/language/src/shared/language.provider.ts","../../../packages/core/language/src/shared/language-mock.provider.ts","../../../packages/core/language/src/igo2-core-language.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\nimport { TranslateModule } from '@ngx-translate/core';\n\n@NgModule({\n exports: [TranslateModule]\n})\nexport class IgoLanguageModule {}\n","import { TranslateLoader } from '@ngx-translate/core';\nimport { Observable } from 'rxjs';\n\nexport interface LanguageOptions {\n prefix?: string | string[];\n ignoreLibsLocale?: boolean;\n}\n\nexport abstract class LanguageLoaderBase implements TranslateLoader {\n abstract isLoaded$: Observable<boolean>;\n abstract getTranslation(lang: string): Observable<any>;\n}\n","import { DOCUMENT, isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport { HttpBackend, HttpClient } from '@angular/common/http';\nimport { PLATFORM_ID, inject } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\nimport { ObjectUtils } from '@igo2/utils';\n\nimport {\n BehaviorSubject,\n Observable,\n first,\n forkJoin,\n map,\n of,\n switchMap,\n tap\n} from 'rxjs';\n\nimport { LanguageLoaderBase, LanguageOptions } from './language.interface';\n\nexport class LanguageLoader implements LanguageLoaderBase {\n private httpClient: HttpClient;\n\n private _isLoaded$ = new BehaviorSubject<boolean>(null);\n isLoaded$ = this._isLoaded$.asObservable();\n\n suffix = '.json';\n prefix?: string | string[];\n options: LanguageOptions;\n\n baseUrl: string;\n\n constructor(handler: HttpBackend, options: LanguageOptions) {\n this.httpClient = new HttpClient(handler);\n this.options = options;\n\n const document = inject(DOCUMENT);\n const platformId = inject(PLATFORM_ID);\n this.baseUrl = isPlatformServer(platformId) ? document.location.origin : '';\n }\n\n public getTranslation(lang: string): Observable<any> {\n const igoLocale$ = this.httpClient.get(\n `${this.baseUrl}/locale/libs_locale/${lang}.json`\n );\n if (!this.prefix) {\n const prefix = this.options.prefix;\n this.prefix = !prefix || Array.isArray(prefix) ? prefix : [prefix];\n }\n\n if (!this.prefix || this.prefix.length === 0) {\n this._isLoaded$.next(true);\n return this.options.ignoreLibsLocale ? of(undefined) : igoLocale$;\n }\n\n const appLocale$ = (this.prefix as string[]).map((prefix) =>\n this.httpClient.get(`${this.baseUrl}/${prefix}${lang}${this.suffix}`)\n );\n\n const locale$ = [...appLocale$];\n\n if (!this.options.ignoreLibsLocale) {\n locale$.unshift(igoLocale$);\n }\n\n return forkJoin(locale$).pipe(\n map((translations) => {\n return translations.reduce(\n (acc, current) => ObjectUtils.mergeDeep(acc, current),\n {}\n );\n }),\n tap(() => {\n this._isLoaded$.next(true);\n })\n );\n }\n}\n\nexport class LanguageLoaderWithAsyncConfig extends LanguageLoader {\n constructor(\n handler: HttpBackend,\n private configService: ConfigService,\n prefix?: string | string[],\n suffix = '.json'\n ) {\n super(handler, undefined);\n this.prefix = prefix;\n this.suffix = suffix;\n }\n\n public getTranslation(lang: string): Observable<any> {\n return this.configService.isLoaded$.pipe(\n first((isLoaded) => isLoaded),\n switchMap(() => {\n this.options =\n this.configService.getConfig<LanguageOptions>('language');\n\n return super.getTranslation(lang);\n })\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { TranslateService } from '@ngx-translate/core';\nimport { BehaviorSubject, combineLatest } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LanguageService {\n private language: string;\n readonly language$ = new BehaviorSubject<string>(undefined);\n\n constructor(public translate: TranslateService) {\n const defaultLang = this.translate.defaultLang;\n if (defaultLang && this.matchLanguage(defaultLang)) {\n this.language = defaultLang;\n this.language$.next(defaultLang);\n } else {\n this.setBrowserLanguage();\n }\n }\n private setBrowserLanguage() {\n this.language = this.translate.getBrowserLang();\n const lang = this.getLanguage();\n this.translate.setDefaultLang(lang);\n this.language$.next(lang);\n }\n\n public getLanguage(): string {\n return this.matchLanguage(this.language) ? this.language : 'en';\n }\n\n private matchLanguage(lang: string): boolean {\n return !!lang.match(/en|fr/);\n }\n\n public setLanguage(language: string) {\n this.language = this.matchLanguage(language) ? language : 'en';\n combineLatest([\n this.translate.use(this.language),\n this.translate.reloadLang(this.language)\n ]).subscribe(() => {\n this.language$.next(this.language);\n });\n }\n}\n","import {\n MissingTranslationHandler,\n MissingTranslationHandlerParams\n} from '@ngx-translate/core';\n\nexport class IgoMissingTranslationHandler implements MissingTranslationHandler {\n handle(params: MissingTranslationHandlerParams) {\n if (!params.translateService.langs.length) {\n const error =\n 'Translations are not yet loaded. \\\n Check that the LanguageService is injected.';\n throw new Error(error);\n }\n\n if (params.key.substr(0, 4) === 'igo.') {\n throw new Error(`The Key \"${params.key}\" is missing in locale file.`);\n } else {\n return params.key;\n }\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { HttpBackend } from '@angular/common/http';\nimport {\n EnvironmentProviders,\n Provider,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer\n} from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport {\n DEFAULT_LANGUAGE,\n Language,\n MissingTranslationHandler,\n TranslateLoader,\n TranslateModuleConfig,\n provideTranslateService\n} from '@ngx-translate/core';\nimport { first } from 'rxjs';\nimport { catchError, timeout } from 'rxjs/operators';\n\nimport { LanguageLoaderBase, LanguageOptions } from './language.interface';\nimport {\n LanguageLoader,\n LanguageLoaderWithAsyncConfig\n} from './language.loader';\nimport { LanguageService } from './language.service';\nimport { IgoMissingTranslationHandler } from './missing-translation.guard';\n\n// 5 seconds\nconst TIMEOUT_DURATION = 5000;\n\nexport interface TranslationFeature<KindT extends TranslationFeatureKind> {\n kind: KindT;\n providers: (Provider | EnvironmentProviders)[];\n}\n\nexport enum TranslationFeatureKind {\n Translation = 0,\n DefaultLanguage = 1\n}\n\n/**\n * Make sure you only call this method in the root module of your application, most of the time called AppModule.\n */\nexport function provideTranslation(\n featureConfig: TranslationFeature<TranslationFeatureKind.Translation>\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n ...featureConfig.providers,\n provideAppInitializer(() => {\n const languageService = inject(LanguageService);\n return (\n languageService.translate.currentLoader as LanguageLoaderBase\n ).isLoaded$?.pipe(\n timeout(TIMEOUT_DURATION),\n first((isLoaded) => isLoaded === true),\n catchError((error) => {\n error.message += ` - Request timed out for language loader after: ${TIMEOUT_DURATION}`;\n throw error;\n })\n );\n })\n ]);\n}\n\nexport function withStaticConfig(\n options: LanguageOptions,\n defaultLanguage?: string | undefined\n): TranslationFeature<TranslationFeatureKind.Translation> {\n const loader: Provider = {\n provide: TranslateLoader,\n useFactory: (http: HttpBackend) => languageLoaderWithStatic(http, options),\n deps: [HttpBackend]\n };\n return {\n kind: TranslationFeatureKind.Translation,\n providers: [\n provideTranslateService(setTranslationConfig(loader, defaultLanguage))\n ]\n };\n}\n\nexport function withAsyncConfig(\n defaultLanguage?: string | undefined\n): TranslationFeature<TranslationFeatureKind.Translation> {\n const loader: Provider = {\n provide: TranslateLoader,\n useFactory: languageLoaderWithAsync,\n deps: [HttpBackend, ConfigService]\n };\n return {\n kind: TranslationFeatureKind.Translation,\n providers: [\n provideTranslateService(setTranslationConfig(loader, defaultLanguage))\n ]\n };\n}\n\n/**\n * Get the first segment of the path (e.g., '/en/alerts' => 'en')\n * @param allowedLanguages default to ['fr', 'en']\n */\nexport function withUrlDefaultLanguage(\n defaultLang?: Language,\n allowedLanguages: Language[] = ['fr', 'en']\n): TranslationFeature<TranslationFeatureKind.DefaultLanguage> {\n return {\n kind: TranslationFeatureKind.DefaultLanguage,\n providers: [\n {\n provide: DEFAULT_LANGUAGE,\n useFactory: defaultLanguageSegmentFactory(allowedLanguages, defaultLang)\n }\n ]\n };\n}\n\nfunction defaultLanguageSegmentFactory(\n allowedLanguages: Language[],\n defaultLang?: Language\n): () => string | undefined {\n return () => {\n const doc = inject(DOCUMENT);\n const url = new URL(doc.location.href);\n\n const firstSegment = url.pathname.split('/').filter(Boolean)[0];\n if (allowedLanguages.includes(firstSegment)) {\n return firstSegment;\n }\n\n return defaultLang;\n };\n}\n\nexport const setTranslationConfig = (\n loader?: Provider,\n defaultLanguage?: string\n): TranslateModuleConfig => ({\n defaultLanguage: defaultLanguage,\n loader: loader ?? DEFAULT_LANGUAGE_LOADER,\n missingTranslationHandler: {\n provide: MissingTranslationHandler,\n useClass: IgoMissingTranslationHandler\n }\n});\n\nfunction languageLoaderWithStatic(\n http: HttpBackend,\n options?: LanguageOptions\n) {\n return new LanguageLoader(http, options);\n}\n\nexport const LANGUAGE_LOADER: Provider = {\n provide: TranslateLoader,\n useFactory: languageLoaderWithAsync,\n deps: [HttpBackend, ConfigService]\n};\n\nfunction languageLoaderWithAsync(http: HttpBackend, config?: ConfigService) {\n return new LanguageLoaderWithAsyncConfig(http, config, undefined, undefined);\n}\n\nexport const DEFAULT_LANGUAGE_LOADER: Provider = {\n provide: TranslateLoader,\n useFactory: languageLoaderWithAsync,\n deps: [HttpBackend, ConfigService]\n};\n","import {\n EnvironmentProviders,\n importProvidersFrom,\n makeEnvironmentProviders\n} from '@angular/core';\n\nimport {\n TranslateFakeLoader,\n TranslateLoader,\n TranslateModule\n} from '@ngx-translate/core';\n\nexport function provideMockTranslation(): EnvironmentProviders {\n return makeEnvironmentProviders([\n importProvidersFrom(\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useClass: TranslateFakeLoader\n }\n })\n )\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;MAOa,iBAAiB,CAAA;uGAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,eAAe,CAAA,EAAA,CAAA;AAEd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,eAAe,CAAA,EAAA,CAAA;;2FAEd,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,eAAe;AAC1B,iBAAA;;;MCEqB,kBAAkB,CAAA;AAGvC;;MCSY,cAAc,CAAA;AACjB,IAAA,UAAU;AAEV,IAAA,UAAU,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC;AACvD,IAAA,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE;IAE1C,MAAM,GAAG,OAAO;AAChB,IAAA,MAAM;AACN,IAAA,OAAO;AAEP,IAAA,OAAO;IAEP,WAAY,CAAA,OAAoB,EAAE,OAAwB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AAe,GAAa;AACvC,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,UAAU,EAAE,uBAAuB;AACnC,IAAA,IAAI,EAAE,CAAC,WAAW,EAAE,aAAa;;AAGnC,SAAS,uBAAuB,CAAC,IAAiB,EAAE,MAAsB,EAAA;IACxE,OAAO,IAAI,6BAA6B,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;AAC9E;AAEa,MAAA,uBAAuB,GAAa;AAC/C,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,UAAU,EAAE,uBAAuB;AACnC,IAAA,IAAI,EAAE,CAAC,WAAW,EAAE,aAAa;;;SC7JnB,sBAAsB,GAAA;AACpC,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,mBAAmB,CACjB,eAAe,CAAC,OAAO,CAAC;AACtB,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,QAAQ,EAAE;AACX;AACF,SAAA,CAAC;AAEL,KAAA,CAAC;AACJ;;ACvBA;;AAEG;;;;"}
@@ -82,10 +82,10 @@ class MediaService {
82
82
  const media = this.getMedia();
83
83
  return media === 'desktop';
84
84
  }
85
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MediaService, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
86
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MediaService, providedIn: 'root' });
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MediaService, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
86
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MediaService, providedIn: 'root' });
87
87
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MediaService, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MediaService, decorators: [{
89
89
  type: Injectable,
90
90
  args: [{
91
91
  providedIn: 'root'
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { makeEnvironmentProviders, NgModule, Injector, Injectable, Inject } from '@angular/core';
2
+ import { makeEnvironmentProviders, NgModule, Injector, Inject, Injectable } from '@angular/core';
3
3
  import { provideToastr, ToastrService } from 'ngx-toastr';
4
4
  import * as i1 from '@igo2/core/config';
5
5
  import * as i2 from '@igo2/core/language';
@@ -36,11 +36,11 @@ class IgoMessageModule {
36
36
  providers: []
37
37
  };
38
38
  }
39
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: IgoMessageModule });
41
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoMessageModule, providers: [provideMessage()] });
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: IgoMessageModule });
41
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoMessageModule, providers: [provideMessage()] });
42
42
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoMessageModule, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoMessageModule, decorators: [{
44
44
  type: NgModule,
45
45
  args: [{
46
46
  imports: [],
@@ -262,10 +262,10 @@ class MessageService {
262
262
  message.title = undefined;
263
263
  return message;
264
264
  }
265
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MessageService, deps: [{ token: Injector }, { token: i1.ConfigService }, { token: i2.LanguageService }], target: i0.ɵɵFactoryTarget.Injectable });
266
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MessageService, providedIn: 'root' });
265
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MessageService, deps: [{ token: Injector }, { token: i1.ConfigService }, { token: i2.LanguageService }], target: i0.ɵɵFactoryTarget.Injectable });
266
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MessageService, providedIn: 'root' });
267
267
  }
268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MessageService, decorators: [{
268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: MessageService, decorators: [{
269
269
  type: Injectable,
270
270
  args: [{
271
271
  providedIn: 'root'
@@ -56,10 +56,10 @@ class NetworkService {
56
56
  ? this.stateChangeEventEmitter.pipe(debounceTime(300), startWith(this.state))
57
57
  : this.stateChangeEventEmitter.pipe(debounceTime(300));
58
58
  }
59
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: NetworkService, deps: [{ token: i1.MessageService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
60
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: NetworkService, providedIn: 'root' });
59
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NetworkService, deps: [{ token: i1.MessageService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
60
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NetworkService, providedIn: 'root' });
61
61
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: NetworkService, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: NetworkService, decorators: [{
63
63
  type: Injectable,
64
64
  args: [{
65
65
  providedIn: 'root'
@@ -18,10 +18,10 @@ class RegexService {
18
18
  }
19
19
  return;
20
20
  }
21
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RegexService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
22
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RegexService, providedIn: 'root' });
21
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RegexService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
22
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RegexService, providedIn: 'root' });
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RegexService, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RegexService, decorators: [{
25
25
  type: Injectable,
26
26
  args: [{
27
27
  providedIn: 'root'
@@ -1,6 +1,6 @@
1
1
  import { HttpErrorResponse, HTTP_INTERCEPTORS, HttpResponse } from '@angular/common/http';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, NgModule, Optional, SkipSelf } from '@angular/core';
3
+ import { Injectable, Optional, SkipSelf, NgModule } from '@angular/core';
4
4
  import * as i1 from '@igo2/core/message';
5
5
  import { throwError } from 'rxjs';
6
6
  import { catchError, finalize, tap } from 'rxjs/operators';
@@ -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.1.7", ngImport: i0, type: ErrorInterceptor, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
64
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ErrorInterceptor, providedIn: 'root' });
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ErrorInterceptor, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
64
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: ErrorInterceptor, providedIn: 'root' });
65
65
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ErrorInterceptor, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", 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.1.7", 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.1.7", ngImport: i0, type: IgoErrorModule });
93
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoErrorModule });
91
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", 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.5", ngImport: i0, type: IgoErrorModule });
93
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoErrorModule });
94
94
  }
95
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoErrorModule, decorators: [{
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", 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.1.7", ngImport: i0, type: LoggingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
127
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LoggingInterceptor });
126
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: LoggingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
127
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: LoggingInterceptor });
128
128
  }
129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: LoggingInterceptor, decorators: [{
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", 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.1.7", ngImport: i0, type: IgoLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
147
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: IgoLoggingModule });
148
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoLoggingModule });
146
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
147
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: IgoLoggingModule });
148
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoLoggingModule });
149
149
  }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: IgoLoggingModule, decorators: [{
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoLoggingModule, decorators: [{
151
151
  type: NgModule,
152
152
  args: [{
153
153
  imports: [],
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, Inject, Optional } from '@angular/core';
2
+ import { InjectionToken, Inject, Optional, Injectable } from '@angular/core';
3
3
  import * as i1 from '@angular/router';
4
4
 
5
5
  const ROUTE_SERVICE_OPTIONS = new InjectionToken('routeServiceOptions');
@@ -58,10 +58,10 @@ class RouteService {
58
58
  }
59
59
  return this.route.queryParams;
60
60
  }
61
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RouteService, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: ROUTE_SERVICE_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
62
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RouteService, providedIn: 'root' });
61
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RouteService, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: ROUTE_SERVICE_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
62
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RouteService, providedIn: 'root' });
63
63
  }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: RouteService, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: RouteService, decorators: [{
65
65
  type: Injectable,
66
66
  args: [{
67
67
  providedIn: 'root'
@@ -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.1.7", ngImport: i0, type: StorageService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
100
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: StorageService, providedIn: 'root' });
99
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StorageService, deps: [{ token: i1.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
100
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StorageService, providedIn: 'root' });
101
101
  }
102
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: StorageService, decorators: [{
102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: StorageService, decorators: [{
103
103
  type: Injectable,
104
104
  args: [{
105
105
  providedIn: 'root'
@@ -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.1.7", ngImport: i0, type: IgoCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
21
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.7", 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.1.7", ngImport: i0, type: IgoCoreModule, providers: [provideMessage(), provideHttpClient(withInterceptorsFromDi())], imports: [CommonModule,
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
21
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.5", 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.5", 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.1.7", ngImport: i0, type: IgoCoreModule, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgoCoreModule, decorators: [{
27
27
  type: NgModule,
28
28
  args: [{
29
29
  declarations: [],