@igo2/core 20.1.0-next.9 → 20.1.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.
@@ -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: "20.3.16", ngImport: i0, type: ActivityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ActivityService, providedIn: 'root' });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ActivityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ActivityService, providedIn: 'root' });
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ActivityService, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ActivityService, decorators: [{
29
29
  type: Injectable,
30
30
  args: [{
31
31
  providedIn: 'root'
@@ -49,10 +49,10 @@ class ActivityInterceptor {
49
49
  this.activityService.unregister(id);
50
50
  }));
51
51
  }
52
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ActivityInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
53
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ActivityInterceptor });
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ActivityInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
53
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ActivityInterceptor });
54
54
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ActivityInterceptor, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ActivityInterceptor, decorators: [{
56
56
  type: Injectable
57
57
  }] });
58
58
 
@@ -69,11 +69,11 @@ class IgoActivityModule {
69
69
  ]
70
70
  };
71
71
  }
72
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoActivityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
73
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoActivityModule });
74
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoActivityModule });
72
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoActivityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
73
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoActivityModule });
74
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoActivityModule });
75
75
  }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoActivityModule, decorators: [{
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoActivityModule, decorators: [{
77
77
  type: NgModule,
78
78
  args: [{
79
79
  imports: [],
@@ -75,10 +75,10 @@ class AnalyticsService {
75
75
  if (this.options.provider === 'matomo')
76
76
  this.paq.push(['trackEvent', category, action, parameters]);
77
77
  }
78
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AnalyticsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
79
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AnalyticsService, providedIn: 'root' });
78
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnalyticsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
79
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnalyticsService, providedIn: 'root' });
80
80
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AnalyticsService, decorators: [{
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: AnalyticsService, decorators: [{
82
82
  type: Injectable,
83
83
  args: [{
84
84
  providedIn: 'root'
@@ -33,8 +33,8 @@ const ALTERNATE_CONFIG_FROM_DEPRECATION = new Map(Object.entries(CONFIG_DEPRECAT
33
33
  ]));
34
34
 
35
35
  const version = {
36
- lib: '20.1.0-next.9',
37
- releaseDate: 1769095547219
36
+ lib: '20.1.0',
37
+ releaseDate: 1777991288222
38
38
  };
39
39
 
40
40
  class ConfigService {
@@ -117,10 +117,10 @@ class ConfigService {
117
117
  });
118
118
  });
119
119
  }
120
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
121
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigService, providedIn: 'root' });
120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
121
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ConfigService, providedIn: 'root' });
122
122
  }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfigService, decorators: [{
123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", 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: "20.3.16", ngImport: i0, type: IgoConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoConfigModule });
157
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoConfigModule });
155
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
156
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoConfigModule });
157
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoConfigModule });
158
158
  }
159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoConfigModule, decorators: [{
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", 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: '20.1.0-next.9',\n releaseDate: 1769095547219\n};\n","import { HttpBackend, HttpClient } from '@angular/common/http';\nimport { Injectable, inject } 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() {\n const handler = inject(HttpBackend);\n\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,IAA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,EAAA,CAAA;;4FAEP,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,QAAA,CAAC;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;IACH;wGANW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAf,eAAe,EAAA,CAAA;yGAAf,eAAe,EAAA,CAAA;;4FAAf,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: '20.1.0',\n releaseDate: 1777991288222\n};\n","import { HttpBackend, HttpClient } from '@angular/common/http';\nimport { Injectable, inject } 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() {\n const handler = inject(HttpBackend);\n\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;AAC7B,KAAA,MAAM,CAAC,CAAC,C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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,QAAA,CAAC;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;IACH;wGANW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;yGAAf,eAAe,EAAA,CAAA;yGAAf,eAAe,EAAA,CAAA;;4FAAf,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;;;;"}
@@ -9,11 +9,11 @@ import { ConfigService } from '@igo2/core/config';
9
9
  import { timeout, catchError } from 'rxjs/operators';
10
10
 
11
11
  class IgoLanguageModule {
12
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoLanguageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoLanguageModule, exports: [TranslateModule] });
14
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoLanguageModule, imports: [TranslateModule] });
12
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoLanguageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
13
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoLanguageModule, exports: [TranslateModule] });
14
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoLanguageModule, imports: [TranslateModule] });
15
15
  }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoLanguageModule, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoLanguageModule, decorators: [{
17
17
  type: NgModule,
18
18
  args: [{
19
19
  exports: [TranslateModule]
@@ -118,10 +118,10 @@ class LanguageService {
118
118
  this.language$.next(this.language);
119
119
  });
120
120
  }
121
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LanguageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
122
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LanguageService, providedIn: 'root' });
121
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LanguageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
122
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LanguageService, providedIn: 'root' });
123
123
  }
124
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LanguageService, decorators: [{
124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LanguageService, decorators: [{
125
125
  type: Injectable,
126
126
  args: [{
127
127
  providedIn: 'root'
@@ -254,9 +254,13 @@ function provideMockTranslation() {
254
254
  return makeEnvironmentProviders([provideTranslateService()]);
255
255
  }
256
256
 
257
+ function labelAttribute(value, defaultValue = {}) {
258
+ return { ...defaultValue, ...(value ?? {}) };
259
+ }
260
+
257
261
  /**
258
262
  * Generated bundle index. Do not edit.
259
263
  */
260
264
 
261
- export { DEFAULT_LANGUAGE_LOADER, IgoLanguageModule, IgoMissingTranslationHandler, LANGUAGE_LOADER, LanguageLoader, LanguageLoaderBase, LanguageLoaderWithAsyncConfig, LanguageService, TranslationFeatureKind, provideMockTranslation, provideTranslation, setTranslationConfig, withAsyncConfig, withStaticConfig, withUrlDefaultLanguage };
265
+ export { DEFAULT_LANGUAGE_LOADER, IgoLanguageModule, IgoMissingTranslationHandler, LANGUAGE_LOADER, LanguageLoader, LanguageLoaderBase, LanguageLoaderWithAsyncConfig, LanguageService, TranslationFeatureKind, labelAttribute, provideMockTranslation, provideTranslation, setTranslationConfig, withAsyncConfig, withStaticConfig, withUrlDefaultLanguage };
262
266
  //# 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 { isPlatformServer } from '@angular/common';\nimport { HttpBackend, HttpClient } from '@angular/common/http';\nimport { DOCUMENT, 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)\n ? this.getServerUrl(document)\n : '';\n }\n\n private getServerUrl(document: Document): string {\n const origin = document.location.origin;\n return origin.endsWith('/') ? origin : 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, inject } 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 translate = inject(TranslateService);\n\n private language: string;\n readonly language$ = new BehaviorSubject<string>(undefined);\n\n constructor() {\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 { HttpBackend } from '@angular/common/http';\nimport {\n DOCUMENT,\n EnvironmentProviders,\n Provider,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer\n} from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport {\n Language,\n MissingTranslationHandler,\n TRANSLATE_SERVICE_CONFIG,\n TranslateLoader,\n TranslateModuleConfig,\n TranslateServiceConfig,\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 fallbackLang?: Language,\n allowedLanguages: Language[] = ['fr', 'en']\n): TranslationFeature<TranslationFeatureKind.DefaultLanguage> {\n return {\n kind: TranslationFeatureKind.DefaultLanguage,\n providers: [\n {\n provide: TRANSLATE_SERVICE_CONFIG,\n useFactory: defaultLanguageSegmentFactory(\n allowedLanguages,\n fallbackLang\n )\n }\n ]\n };\n}\n\nfunction defaultLanguageSegmentFactory(\n allowedLanguages: Language[],\n fallbackLang?: Language\n): () => TranslateServiceConfig {\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 {\n extend: true,\n lang: firstSegment\n } satisfies TranslateServiceConfig;\n }\n\n return {\n extend: true,\n lang: fallbackLang,\n fallbackLang: fallbackLang ?? 'fr'\n } satisfies TranslateServiceConfig;\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 { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\n\nimport { provideTranslateService } from '@ngx-translate/core';\n\nexport function provideMockTranslation(): EnvironmentProviders {\n return makeEnvironmentProviders([provideTranslateService()]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,iBAAiB,CAAA;wGAAjB,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,SAAA,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,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,eAAe,CAAA,EAAA,CAAA;;4FAEd,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,QAAQ;AAAC,YAAA,IAAA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ACNA;;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/utils/coercion.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\nexport type Translation =\n | string\n | Translation[]\n | TranslationObject\n\n // required to prevent error \"Type instantiation is excessively deep and possibly infinite.\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | any;\n\n// using Record<> does not work because TS does not support recursive definitions\nexport interface TranslationObject {\n [key: string]: Translation;\n}\n","import { isPlatformServer } from '@angular/common';\nimport { HttpBackend, HttpClient } from '@angular/common/http';\nimport { DOCUMENT, 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)\n ? this.getServerUrl(document)\n : '';\n }\n\n private getServerUrl(document: Document): string {\n const origin = document.location.origin;\n return origin.endsWith('/') ? origin : 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, inject } 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 translate = inject(TranslateService);\n\n private language: string;\n readonly language$ = new BehaviorSubject<string>(undefined);\n\n constructor() {\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 { HttpBackend } from '@angular/common/http';\nimport {\n DOCUMENT,\n EnvironmentProviders,\n Provider,\n inject,\n makeEnvironmentProviders,\n provideAppInitializer\n} from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport {\n Language,\n MissingTranslationHandler,\n TRANSLATE_SERVICE_CONFIG,\n TranslateLoader,\n TranslateModuleConfig,\n TranslateServiceConfig,\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 fallbackLang?: Language,\n allowedLanguages: Language[] = ['fr', 'en']\n): TranslationFeature<TranslationFeatureKind.DefaultLanguage> {\n return {\n kind: TranslationFeatureKind.DefaultLanguage,\n providers: [\n {\n provide: TRANSLATE_SERVICE_CONFIG,\n useFactory: defaultLanguageSegmentFactory(\n allowedLanguages,\n fallbackLang\n )\n }\n ]\n };\n}\n\nfunction defaultLanguageSegmentFactory(\n allowedLanguages: Language[],\n fallbackLang?: Language\n): () => TranslateServiceConfig {\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 {\n extend: true,\n lang: firstSegment\n } satisfies TranslateServiceConfig;\n }\n\n return {\n extend: true,\n lang: fallbackLang,\n fallbackLang: fallbackLang ?? 'fr'\n } satisfies TranslateServiceConfig;\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 { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\n\nimport { provideTranslateService } from '@ngx-translate/core';\n\nexport function provideMockTranslation(): EnvironmentProviders {\n return makeEnvironmentProviders([provideTranslateService()]);\n}\n","import { Translation, TranslationObject } from '../shared/language.interface';\n\nexport function labelAttribute(\n value: Translation | TranslationObject | undefined,\n defaultValue: Translation | TranslationObject = {}\n): Translation | TranslationObject {\n return { ...defaultValue, ...(value ?? {}) };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;MAOa,iBAAiB,CAAA;wGAAjB,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,SAAA,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,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,eAAe,CAAA,EAAA,CAAA;;4FAEd,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,WAAA,CAAY,OAAoB,EAAE,OAAwB,EAAA;QACxD,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC;AACzC,QAAA,IAAI,CAAC,OAA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eAAe;IAChC,MAAM,EAAE,MAAM,IAAI,uBAAuB;AACzC,IAAA,yBAAyB,EAAE;AACzB,QAAA,OAAO,EAAE,yBAAyB;AAClC,QAAA,QAAQ,EAAE;AACX;AACF,CAAA;AAED,SAAS,wBAAwB,CAC/B,IAAiB,EACjB,OAAyB,EAAA;AAEzB,IAAA,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC;AAC1C;AAEO,MAAM,eAAe,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;AAEO,MAAM,uBAAuB,GAAa;AAC/C,IAAA,OAAO,EAAE,eAAe;AACxB,IAAA,UAAU,EAAE,uBAAuB;AACnC,IAAA,IAAI,EAAE,CAAC,WAAW,EAAE,aAAa;;;SChLnB,sBAAsB,GAAA;AACpC,IAAA,OAAO,wBAAwB,CAAC,CAAC,uBAAuB,EAAE,CAAC,CAAC;AAC9D;;SCJgB,cAAc,CAC5B,KAAkD,EAClD,eAAgD,EAAE,EAAA;IAElD,OAAO,EAAE,GAAG,YAAY,EAAE,IAAI,KAAK,IAAI,EAAE,CAAC,EAAE;AAC9C;;ACPA;;AAEG;;;;"}
@@ -75,17 +75,18 @@ class MediaService {
75
75
  return 'ontouchstart' in document.documentElement ? true : false;
76
76
  }
77
77
  isMobile() {
78
- const media = this.getMedia();
79
- return media === 'mobile';
78
+ return this.getMedia() === Media.Mobile;
79
+ }
80
+ isTablet() {
81
+ return this.getMedia() === Media.Tablet;
80
82
  }
81
83
  isDesktop() {
82
- const media = this.getMedia();
83
- return media === 'desktop';
84
+ return this.getMedia() === Media.Desktop;
84
85
  }
85
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
86
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MediaService, providedIn: 'root' });
86
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MediaService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
87
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MediaService, providedIn: 'root' });
87
88
  }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MediaService, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MediaService, decorators: [{
89
90
  type: Injectable,
90
91
  args: [{
91
92
  providedIn: 'root'
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-core-media.mjs","sources":["../../../packages/core/media/src/media.enum.ts","../../../packages/core/media/src/media.service.ts","../../../packages/core/media/src/igo2-core-media.ts"],"sourcesContent":["export enum Media {\n Mobile = 'mobile',\n Tablet = 'tablet',\n Desktop = 'desktop'\n}\n\nexport enum MediaOrientation {\n Portrait = 'portrait',\n Landscape = 'landscape'\n}\n","import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { Injectable, inject } from '@angular/core';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport { Media, MediaOrientation } from './media.enum';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MediaService {\n public media$ = new BehaviorSubject<Media>(undefined);\n public orientation$ = new BehaviorSubject<MediaOrientation>(undefined);\n\n constructor() {\n const breakpointObserver = inject(BreakpointObserver);\n\n breakpointObserver\n .observe([Breakpoints.HandsetLandscape])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Mobile);\n this.orientation$.next(MediaOrientation.Landscape);\n }\n });\n\n breakpointObserver\n .observe([Breakpoints.HandsetPortrait])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Mobile);\n this.orientation$.next(MediaOrientation.Portrait);\n }\n });\n\n breakpointObserver\n .observe([Breakpoints.TabletLandscape])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Tablet);\n this.orientation$.next(MediaOrientation.Landscape);\n }\n });\n\n breakpointObserver\n .observe([Breakpoints.TabletPortrait])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Tablet);\n this.orientation$.next(MediaOrientation.Portrait);\n }\n });\n\n breakpointObserver.observe([Breakpoints.WebLandscape]).subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Desktop);\n this.orientation$.next(MediaOrientation.Landscape);\n }\n });\n\n breakpointObserver.observe([Breakpoints.WebPortrait]).subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Desktop);\n this.orientation$.next(MediaOrientation.Portrait);\n }\n });\n }\n\n getMedia(): Media {\n return this.media$.value;\n }\n\n getOrientation(): MediaOrientation {\n return this.orientation$.value;\n }\n\n isTouchScreen(): boolean {\n return 'ontouchstart' in document.documentElement ? true : false;\n }\n\n isMobile(): boolean {\n const media = this.getMedia();\n return media === 'mobile';\n }\n\n isDesktop(): boolean {\n const media = this.getMedia();\n return media === 'desktop';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;IAAY;AAAZ,CAAA,UAAY,KAAK,EAAA;AACf,IAAA,KAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,KAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,KAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,KAAK,KAAL,KAAK,GAAA,EAAA,CAAA,CAAA;IAML;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,UAAA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I,GAAG,KAAK;IAClE;IAEA,QAAQ,GAAA;AACN,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;QAC7B,OAAO,KAAK,KAAK,QAAQ;IAC3B;IAEA,SAAS,GAAA;AACP,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE;QAC7B,OAAO,KAAK,KAAK,SAAS;IAC5B;wGA9EW,YAAY,EAAA,IAAA,EAAA,EAAA,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;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-core-media.mjs","sources":["../../../packages/core/media/src/media.enum.ts","../../../packages/core/media/src/media.service.ts","../../../packages/core/media/src/igo2-core-media.ts"],"sourcesContent":["export enum Media {\n Mobile = 'mobile',\n Tablet = 'tablet',\n Desktop = 'desktop'\n}\n\nexport enum MediaOrientation {\n Portrait = 'portrait',\n Landscape = 'landscape'\n}\n","import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { Injectable, inject } from '@angular/core';\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport { Media, MediaOrientation } from './media.enum';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class MediaService {\n public media$ = new BehaviorSubject<Media>(undefined);\n public orientation$ = new BehaviorSubject<MediaOrientation>(undefined);\n\n constructor() {\n const breakpointObserver = inject(BreakpointObserver);\n\n breakpointObserver\n .observe([Breakpoints.HandsetLandscape])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Mobile);\n this.orientation$.next(MediaOrientation.Landscape);\n }\n });\n\n breakpointObserver\n .observe([Breakpoints.HandsetPortrait])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Mobile);\n this.orientation$.next(MediaOrientation.Portrait);\n }\n });\n\n breakpointObserver\n .observe([Breakpoints.TabletLandscape])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Tablet);\n this.orientation$.next(MediaOrientation.Landscape);\n }\n });\n\n breakpointObserver\n .observe([Breakpoints.TabletPortrait])\n .subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Tablet);\n this.orientation$.next(MediaOrientation.Portrait);\n }\n });\n\n breakpointObserver.observe([Breakpoints.WebLandscape]).subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Desktop);\n this.orientation$.next(MediaOrientation.Landscape);\n }\n });\n\n breakpointObserver.observe([Breakpoints.WebPortrait]).subscribe((res) => {\n if (res.matches) {\n this.media$.next(Media.Desktop);\n this.orientation$.next(MediaOrientation.Portrait);\n }\n });\n }\n\n getMedia(): Media {\n return this.media$.value;\n }\n\n getOrientation(): MediaOrientation {\n return this.orientation$.value;\n }\n\n isTouchScreen(): boolean {\n return 'ontouchstart' in document.documentElement ? true : false;\n }\n\n isMobile(): boolean {\n return this.getMedia() === Media.Mobile;\n }\n\n isTablet(): boolean {\n return this.getMedia() === Media.Tablet;\n }\n\n isDesktop(): boolean {\n return this.getMedia() === Media.Desktop;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;IAAY;AAAZ,CAAA,UAAY,KAAK,EAAA;AACf,IAAA,KAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,KAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,KAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,KAAK,KAAL,KAAK,GAAA,EAAA,CAAA,CAA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A,aAAa,GAAA;AACX,QAAA,OAAO,cAAc,IAAI,QAAQ,CAAC,eAAe,GAAG,IAAI,GAAG,KAAK;IAClE;IAEA,QAAQ,GAAA;QACN,OAAO,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,MAAM;IACzC;IAEA,QAAQ,GAAA;QACN,OAAO,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,MAAM;IACzC;IAEA,SAAS,GAAA;QACP,OAAO,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,CAAC,OAAO;IAC1C;wGAhFW,YAAY,EAAA,IAAA,EAAA,EAAA,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;;;ACTD;;AAEG;;;;"}
@@ -36,11 +36,11 @@ class IgoMessageModule {
36
36
  providers: []
37
37
  };
38
38
  }
39
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoMessageModule });
41
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoMessageModule, providers: [provideMessage()] });
39
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoMessageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
40
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoMessageModule });
41
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoMessageModule, providers: [provideMessage()] });
42
42
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoMessageModule, decorators: [{
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoMessageModule, decorators: [{
44
44
  type: NgModule,
45
45
  args: [{
46
46
  imports: [],
@@ -259,10 +259,10 @@ class MessageService {
259
259
  message.title = undefined;
260
260
  return message;
261
261
  }
262
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
263
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MessageService, providedIn: 'root' });
262
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MessageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
263
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MessageService, providedIn: 'root' });
264
264
  }
265
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: MessageService, decorators: [{
265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: MessageService, decorators: [{
266
266
  type: Injectable,
267
267
  args: [{
268
268
  providedIn: 'root'
@@ -54,10 +54,10 @@ class NetworkService {
54
54
  ? this.stateChangeEventEmitter.pipe(debounceTime(300), startWith(this.state))
55
55
  : this.stateChangeEventEmitter.pipe(debounceTime(300));
56
56
  }
57
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NetworkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
58
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NetworkService, providedIn: 'root' });
57
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NetworkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
58
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NetworkService, providedIn: 'root' });
59
59
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: NetworkService, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: NetworkService, decorators: [{
61
61
  type: Injectable,
62
62
  args: [{
63
63
  providedIn: 'root'
@@ -17,10 +17,10 @@ class RegexService {
17
17
  }
18
18
  return;
19
19
  }
20
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RegexService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
21
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RegexService, providedIn: 'root' });
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RegexService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
21
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RegexService, providedIn: 'root' });
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RegexService, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RegexService, decorators: [{
24
24
  type: Injectable,
25
25
  args: [{
26
26
  providedIn: 'root'
@@ -57,10 +57,10 @@ class ErrorInterceptor {
57
57
  progressBar: false
58
58
  });
59
59
  }
60
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ErrorInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ErrorInterceptor, providedIn: 'root' });
60
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ErrorInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
61
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ErrorInterceptor, providedIn: 'root' });
62
62
  }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ErrorInterceptor, decorators: [{
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ErrorInterceptor, decorators: [{
64
64
  type: Injectable,
65
65
  args: [{
66
66
  providedIn: 'root'
@@ -89,11 +89,11 @@ class IgoErrorModule {
89
89
  throw new Error('IgoErrorModule is already loaded. Import it in the AppModule only');
90
90
  }
91
91
  }
92
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
93
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoErrorModule });
94
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoErrorModule });
92
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
93
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoErrorModule });
94
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoErrorModule });
95
95
  }
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoErrorModule, decorators: [{
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoErrorModule, decorators: [{
97
97
  type: NgModule,
98
98
  args: [{
99
99
  imports: [],
@@ -120,10 +120,10 @@ class LoggingInterceptor {
120
120
  console.log(msg);
121
121
  }));
122
122
  }
123
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LoggingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
124
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LoggingInterceptor });
123
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LoggingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
124
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LoggingInterceptor });
125
125
  }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: LoggingInterceptor, decorators: [{
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: LoggingInterceptor, decorators: [{
127
127
  type: Injectable
128
128
  }] });
129
129
 
@@ -140,11 +140,11 @@ class IgoLoggingModule {
140
140
  ]
141
141
  };
142
142
  }
143
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
144
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoLoggingModule });
145
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoLoggingModule });
143
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoLoggingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
144
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoLoggingModule });
145
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoLoggingModule });
146
146
  }
147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoLoggingModule, decorators: [{
147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoLoggingModule, decorators: [{
148
148
  type: NgModule,
149
149
  args: [{
150
150
  imports: [],
@@ -75,10 +75,10 @@ class RouteService {
75
75
  }
76
76
  return this.route.queryParams;
77
77
  }
78
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RouteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
79
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RouteService, providedIn: 'root' });
78
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RouteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
79
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RouteService, providedIn: 'root' });
80
80
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: RouteService, decorators: [{
81
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RouteService, decorators: [{
82
82
  type: Injectable,
83
83
  args: [{
84
84
  providedIn: 'root'
@@ -95,10 +95,10 @@ class StorageService extends BaseStorage {
95
95
  const config = inject(ConfigService);
96
96
  super(config);
97
97
  }
98
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
99
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: StorageService, providedIn: 'root' });
98
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: StorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
99
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: StorageService, providedIn: 'root' });
100
100
  }
101
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: StorageService, decorators: [{
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: StorageService, decorators: [{
102
102
  type: Injectable,
103
103
  args: [{
104
104
  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, inject } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport { BaseStorage } from './storage';\nimport { StorageOptions } from './storage.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StorageService extends BaseStorage<StorageOptions> {\n constructor() {\n const config = inject(ConfigService);\n super(config);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;IAAY;AAAZ,CAAA,UAAY,YAAY,EAAA;AACtB,IAAA,YAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,YAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EAHW,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;IAiBZ;AAAZ,CAAA,UAAY,uBAAuB,EAAA;AACjC,IAAA,uBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,uBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,uBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,uBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,GAAA,EAAA,CAAA,CAAA;;MCNb,WAAW,CAAA;AACrB,IAAA,OAAO;AAEV,IAAA,cAAc,GAAG,IAAI,eAAe,CAAsB,SAAS,CAAC;AAE3E,IAAA,WAAA,CAAY,MAAqB,EAAA;AAC/B,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,SAAS,CAAI,SAAS,CAAC,IAAK,EAAE,GAAG,EAAE,KAAK,EAAQ;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;AACD;;ACxFK,MAAO,cAAe,SAAQ,WAA2B,CAAA;AAC7D,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;QACpC,KAAK,CAAC,MAAM,CAAC;IACf;wGAJW,cAAc,EAAA,IAAA,EAAA,EAAA,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;;;ACTD;;AAEG;;;;"}
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(key: string, value: unknown, scope: StorageScope = StorageScope.LOCAL) {\n const previousValue = this.get(key, scope);\n if (scope === StorageScope.SESSION) {\n sessionStorage.setItem(\n `${this.options.key}.${key}`,\n JSON.stringify(value)\n );\n } else {\n localStorage.setItem(`${this.options.key}.${key}`, JSON.stringify(value));\n }\n const currentValue = this.get(key, scope);\n\n if (currentValue !== previousValue) {\n this.storageChange$.next({\n key,\n scope,\n event:\n previousValue !== undefined\n ? StorageServiceEventEnum.MODIFIED\n : StorageServiceEventEnum.ADDED,\n previousValue,\n currentValue\n });\n }\n }\n\n remove(key: string, scope: StorageScope = StorageScope.LOCAL) {\n const previousValue = this.get(key, scope);\n if (scope === StorageScope.SESSION) {\n sessionStorage.removeItem(`${this.options.key}.${key}`);\n } else {\n localStorage.removeItem(`${this.options.key}.${key}`);\n }\n this.storageChange$.next({\n key,\n scope,\n event: StorageServiceEventEnum.REMOVED,\n previousValue\n });\n }\n\n clear(scope: StorageScope = StorageScope.LOCAL) {\n if (scope === StorageScope.SESSION) {\n sessionStorage.clear();\n } else {\n localStorage.clear();\n }\n this.storageChange$.next({ scope, event: StorageServiceEventEnum.CLEARED });\n }\n}\n","import { Injectable, inject } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\n\nimport { BaseStorage } from './storage';\nimport { StorageOptions } from './storage.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StorageService extends BaseStorage<StorageOptions> {\n constructor() {\n const config = inject(ConfigService);\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AAc,cAFb,MAAM,EAAA,CAAA;;4FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACTD;;AAEG;;;;"}
@@ -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: "20.3.16", ngImport: i0, type: IgoCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
21
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: IgoCoreModule, imports: [CommonModule, i1.IgoActivityModule, i2.IgoErrorModule], exports: [IgoActivityModule, IgoErrorModule, IgoLanguageModule] });
22
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: IgoCoreModule, providers: [provideMessage(), provideHttpClient(withInterceptorsFromDi())], imports: [CommonModule,
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
21
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: IgoCoreModule, imports: [CommonModule, i1.IgoActivityModule, i2.IgoErrorModule], exports: [IgoActivityModule, IgoErrorModule, IgoLanguageModule] });
22
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", 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: "20.3.16", ngImport: i0, type: IgoCoreModule, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: IgoCoreModule, decorators: [{
27
27
  type: NgModule,
28
28
  args: [{
29
29
  declarations: [],