@o3r/localization 12.3.0-prerelease.7 → 12.3.0-prerelease.71

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.
@@ -23,21 +23,21 @@ class LocalizationRulesEngineActionHandler {
23
23
  }, {});
24
24
  this.store.dispatch(setLocalizationOverride({ state: { localizationOverrides } }));
25
25
  }
26
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationRulesEngineActionHandler, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
27
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationRulesEngineActionHandler }); }
26
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationRulesEngineActionHandler, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
27
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationRulesEngineActionHandler }); }
28
28
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationRulesEngineActionHandler, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationRulesEngineActionHandler, decorators: [{
30
30
  type: Injectable
31
31
  }], ctorParameters: () => [{ type: i1.Store }] });
32
32
 
33
33
  class LocalizationRulesEngineActionModule {
34
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
35
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: LocalizationRulesEngineActionModule, imports: [LocalizationOverrideStoreModule] }); }
36
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationRulesEngineActionModule, providers: [
34
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationRulesEngineActionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
35
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: LocalizationRulesEngineActionModule, imports: [LocalizationOverrideStoreModule] }); }
36
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationRulesEngineActionModule, providers: [
37
37
  LocalizationRulesEngineActionHandler
38
38
  ], imports: [LocalizationOverrideStoreModule] }); }
39
39
  }
40
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationRulesEngineActionModule, decorators: [{
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationRulesEngineActionModule, decorators: [{
41
41
  type: NgModule,
42
42
  args: [{
43
43
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-localization-rules-engine.mjs","sources":["../../src/rules-engine/localization.interfaces.ts","../../src/rules-engine/localization.handler-action.ts","../../src/rules-engine/localization.rules-engine.module.ts","../../src/rules-engine/o3r-localization-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdateLocalisationBlock */\nexport const RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE = 'UPDATE_LOCALISATION';\n\n/**\n * Content of action that updates localization\n */\nexport interface ActionUpdateLocalisationBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE;\n key: string;\n value: string;\n}\n","import {\n Injectable,\n} from '@angular/core';\nimport {\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n ActionUpdateLocalisationBlock,\n RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE,\n} from './localization.interfaces';\nimport {\n LocalizationOverrideStore,\n setLocalizationOverride,\n} from '@o3r/localization';\n\n/**\n * Service to handle async Localization actions\n */\n@Injectable()\nexport class LocalizationRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateLocalisationBlock> {\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE] as const;\n\n constructor(private readonly store: Store<LocalizationOverrideStore>) {}\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdateLocalisationBlock[]): void | Promise<void> {\n const localizationOverrides = actions.reduce<Record<string, string>>((acc, { key, value }) => {\n acc[key] = value;\n return acc;\n }, {});\n\n this.store.dispatch(setLocalizationOverride({ state: { localizationOverrides } }));\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n LocalizationRulesEngineActionHandler,\n} from './localization.handler-action';\nimport {\n LocalizationOverrideStoreModule,\n} from '@o3r/localization';\n\n@NgModule({\n imports: [\n LocalizationOverrideStoreModule\n ],\n providers: [\n LocalizationRulesEngineActionHandler\n ]\n})\nexport class LocalizationRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAIA;AACO,MAAM,4CAA4C,GAAG;;ACa5D;;AAEG;MAEU,oCAAoC,CAAA;AAI/C,IAAA,WAAA,CAA6B,KAAuC,EAAA;QAAvC,IAAK,CAAA,KAAA,GAAL,KAAK;;AAFlB,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,4CA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mC,EAAA,UAAA,EAAA,CAAA;kBAR/C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"o3r-localization-rules-engine.mjs","sources":["../../src/rules-engine/localization.interfaces.ts","../../src/rules-engine/localization.handler-action.ts","../../src/rules-engine/localization.rules-engine.module.ts","../../src/rules-engine/o3r-localization-rules-engine.ts"],"sourcesContent":["import type {\n RulesEngineAction,\n} from '@o3r/core';\n\n/** ActionUpdateLocalisationBlock */\nexport const RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE = 'UPDATE_LOCALISATION';\n\n/**\n * Content of action that updates localization\n */\nexport interface ActionUpdateLocalisationBlock extends RulesEngineAction {\n actionType: typeof RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE;\n key: string;\n value: string;\n}\n","import {\n Injectable,\n} from '@angular/core';\nimport {\n Store,\n} from '@ngrx/store';\nimport type {\n RulesEngineActionHandler,\n} from '@o3r/core';\nimport {\n ActionUpdateLocalisationBlock,\n RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE,\n} from './localization.interfaces';\nimport {\n LocalizationOverrideStore,\n setLocalizationOverride,\n} from '@o3r/localization';\n\n/**\n * Service to handle async Localization actions\n */\n@Injectable()\nexport class LocalizationRulesEngineActionHandler implements RulesEngineActionHandler<ActionUpdateLocalisationBlock> {\n /** @inheritdoc */\n public readonly supportingActions = [RULES_ENGINE_LOCALISATION_UPDATE_ACTION_TYPE] as const;\n\n constructor(private readonly store: Store<LocalizationOverrideStore>) {}\n\n /** @inheritdoc */\n public executeActions(actions: ActionUpdateLocalisationBlock[]): void | Promise<void> {\n const localizationOverrides = actions.reduce<Record<string, string>>((acc, { key, value }) => {\n acc[key] = value;\n return acc;\n }, {});\n\n this.store.dispatch(setLocalizationOverride({ state: { localizationOverrides } }));\n }\n}\n","import {\n NgModule,\n} from '@angular/core';\nimport {\n LocalizationRulesEngineActionHandler,\n} from './localization.handler-action';\nimport {\n LocalizationOverrideStoreModule,\n} from '@o3r/localization';\n\n@NgModule({\n imports: [\n LocalizationOverrideStoreModule\n ],\n providers: [\n LocalizationRulesEngineActionHandler\n ]\n})\nexport class LocalizationRulesEngineActionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAIA;AACO,MAAM,4CAA4C,GAAG;;ACa5D;;AAEG;MAEU,oCAAoC,CAAA;AAI/C,IAAA,WAAA,CAA6B,KAAuC,EAAA;QAAvC,IAAK,CAAA,KAAA,GAAL,KAAK;;AAFlB,QAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,4CAA4C,CAAU;;;AAKpF,IAAA,cAAc,CAAC,OAAwC,EAAA;AAC5D,QAAA,MAAM,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAyB,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,KAAI;AAC3F,YAAA,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK;AAChB,YAAA,OAAO,GAAG;SACX,EAAE,EAAE,CAAC;AAEN,QAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,KAAK,EAAE,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;;kIAbzE,oCAAoC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;sIAApC,oCAAoC,EAAA,CAAA,CAAA;;4FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBADhD;;;MCHY,mCAAmC,CAAA;kIAAnC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnC,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,YAN5C,+BAA+B,CAAA,EAAA,CAAA,CAAA;AAMtB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,EAJnC,SAAA,EAAA;YACT;AACD,SAAA,EAAA,OAAA,EAAA,CAJC,+BAA+B,CAAA,EAAA,CAAA,CAAA;;4FAMtB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAR/C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;wBACT;AACD;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
@@ -111,10 +111,10 @@ class TranslateMessageFormatLazyCompiler extends TranslateCompiler {
111
111
  };
112
112
  return Object.keys(translations).reduce((acc, key) => compilingStrategy(acc, key), {});
113
113
  }
114
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TranslateMessageFormatLazyCompiler, deps: [{ token: MESSAGE_FORMAT_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
115
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TranslateMessageFormatLazyCompiler }); }
114
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslateMessageFormatLazyCompiler, deps: [{ token: MESSAGE_FORMAT_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
115
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslateMessageFormatLazyCompiler }); }
116
116
  }
117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TranslateMessageFormatLazyCompiler, decorators: [{
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslateMessageFormatLazyCompiler, decorators: [{
118
118
  type: Injectable
119
119
  }], ctorParameters: () => [{ type: undefined, decorators: [{
120
120
  type: Optional
@@ -165,13 +165,13 @@ class LocalizationOverrideStoreModule {
165
165
  ]
166
166
  };
167
167
  }
168
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
169
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: LocalizationOverrideStoreModule, imports: [i3.StoreFeatureModule] }); }
170
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationOverrideStoreModule, providers: [
168
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationOverrideStoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
169
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: LocalizationOverrideStoreModule, imports: [i3.StoreFeatureModule] }); }
170
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationOverrideStoreModule, providers: [
171
171
  { provide: LOCALIZATION_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultLocalizationOverrideReducer }
172
172
  ], imports: [StoreModule.forFeature(LOCALIZATION_OVERRIDE_STORE_NAME, LOCALIZATION_OVERRIDE_REDUCER_TOKEN)] }); }
173
173
  }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationOverrideStoreModule, decorators: [{
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationOverrideStoreModule, decorators: [{
175
175
  type: NgModule,
176
176
  args: [{
177
177
  imports: [
@@ -369,10 +369,10 @@ class LocalizationService {
369
369
  translate(key, interpolateParams) {
370
370
  return this.getKey(key).pipe(switchMap((translationKey) => this.getTranslationStream(translationKey, interpolateParams)), shareReplay({ refCount: true, bufferSize: 1 }));
371
371
  }
372
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationService, deps: [{ token: i2.TranslateService }, { token: i1.LoggerService }, { token: LOCALIZATION_CONFIGURATION_TOKEN }, { token: i3.Store, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
373
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationService }); }
372
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationService, deps: [{ token: i2.TranslateService }, { token: i1.LoggerService }, { token: LOCALIZATION_CONFIGURATION_TOKEN }, { token: i3.Store, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
373
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationService }); }
374
374
  }
375
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationService, decorators: [{
375
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationService, decorators: [{
376
376
  type: Injectable
377
377
  }], ctorParameters: () => [{ type: i2.TranslateService }, { type: i1.LoggerService }, { type: undefined, decorators: [{
378
378
  type: Inject,
@@ -436,10 +436,10 @@ class LocalizationTranslateDirective extends TranslateDirective {
436
436
  this.onKeyChange?.unsubscribe();
437
437
  }
438
438
  }
439
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationTranslateDirective, deps: [{ token: LocalizationService }, { token: i2.TranslateService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: LOCALIZATION_CONFIGURATION_TOKEN }], target: i0.ɵɵFactoryTarget.Directive }); }
440
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.4", type: LocalizationTranslateDirective, isStandalone: false, selector: "[translate],[ngx-translate]", inputs: { translate: "translate" }, usesInheritance: true, ngImport: i0 }); }
439
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationTranslateDirective, deps: [{ token: LocalizationService }, { token: i2.TranslateService }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: LOCALIZATION_CONFIGURATION_TOKEN }], target: i0.ɵɵFactoryTarget.Directive }); }
440
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.10", type: LocalizationTranslateDirective, isStandalone: false, selector: "[translate],[ngx-translate]", inputs: { translate: "translate" }, usesInheritance: true, ngImport: i0 }); }
441
441
  }
442
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationTranslateDirective, decorators: [{
442
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationTranslateDirective, decorators: [{
443
443
  type: Directive,
444
444
  args: [{
445
445
  selector: '[translate],[ngx-translate]',
@@ -508,10 +508,10 @@ class O3rLocalizationTranslatePipe extends TranslatePipe {
508
508
  this.onKeyChange.unsubscribe();
509
509
  }
510
510
  }
511
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: O3rLocalizationTranslatePipe, deps: [{ token: LocalizationService }, { token: i2.TranslateService }, { token: i0.ChangeDetectorRef }, { token: LOCALIZATION_CONFIGURATION_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe }); }
512
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: O3rLocalizationTranslatePipe, isStandalone: false, name: "o3rTranslate", pure: false }); }
511
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: O3rLocalizationTranslatePipe, deps: [{ token: LocalizationService }, { token: i2.TranslateService }, { token: i0.ChangeDetectorRef }, { token: LOCALIZATION_CONFIGURATION_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe }); }
512
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: O3rLocalizationTranslatePipe, isStandalone: false, name: "o3rTranslate", pure: false }); }
513
513
  }
514
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: O3rLocalizationTranslatePipe, decorators: [{
514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: O3rLocalizationTranslatePipe, decorators: [{
515
515
  type: Pipe,
516
516
  args: [{
517
517
  name: 'o3rTranslate',
@@ -539,10 +539,10 @@ class LocalizedCurrencyPipe extends CurrencyPipe {
539
539
  ngOnDestroy() {
540
540
  this.onLangChange.unsubscribe();
541
541
  }
542
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizedCurrencyPipe, deps: [{ token: LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
543
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: LocalizedCurrencyPipe, isStandalone: false, name: "currency", pure: false }); }
542
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizedCurrencyPipe, deps: [{ token: LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
543
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: LocalizedCurrencyPipe, isStandalone: false, name: "currency", pure: false }); }
544
544
  }
545
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizedCurrencyPipe, decorators: [{
545
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizedCurrencyPipe, decorators: [{
546
546
  type: Pipe,
547
547
  args: [{
548
548
  name: 'currency',
@@ -567,10 +567,10 @@ class LocalizedDatePipe extends DatePipe {
567
567
  ngOnDestroy() {
568
568
  this.onLangChange.unsubscribe();
569
569
  }
570
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizedDatePipe, deps: [{ token: LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
571
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: LocalizedDatePipe, isStandalone: false, name: "date", pure: false }); }
570
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizedDatePipe, deps: [{ token: LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
571
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: LocalizedDatePipe, isStandalone: false, name: "date", pure: false }); }
572
572
  }
573
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizedDatePipe, decorators: [{
573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizedDatePipe, decorators: [{
574
574
  type: Pipe,
575
575
  args: [{
576
576
  name: 'date',
@@ -595,10 +595,10 @@ class LocalizedDecimalPipe extends DecimalPipe {
595
595
  ngOnDestroy() {
596
596
  this.onLangChange.unsubscribe();
597
597
  }
598
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizedDecimalPipe, deps: [{ token: LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
599
- /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: LocalizedDecimalPipe, isStandalone: false, name: "decimal", pure: false }); }
598
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizedDecimalPipe, deps: [{ token: LocalizationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Pipe }); }
599
+ /** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: LocalizedDecimalPipe, isStandalone: false, name: "decimal", pure: false }); }
600
600
  }
601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizedDecimalPipe, decorators: [{
601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizedDecimalPipe, decorators: [{
602
602
  type: Pipe,
603
603
  args: [{
604
604
  name: 'decimal',
@@ -633,10 +633,10 @@ class TextDirectionService {
633
633
  });
634
634
  return this.subscription;
635
635
  }
636
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextDirectionService, deps: [{ token: i2.TranslateService }, { token: LOCALIZATION_CONFIGURATION_TOKEN }, { token: i0.RendererFactory2 }, { token: i2$1.Directionality }], target: i0.ɵɵFactoryTarget.Injectable }); }
637
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextDirectionService }); }
636
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextDirectionService, deps: [{ token: i2.TranslateService }, { token: LOCALIZATION_CONFIGURATION_TOKEN }, { token: i0.RendererFactory2 }, { token: i2$1.Directionality }], target: i0.ɵɵFactoryTarget.Injectable }); }
637
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextDirectionService }); }
638
638
  }
639
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextDirectionService, decorators: [{
639
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextDirectionService, decorators: [{
640
640
  type: Injectable
641
641
  }], ctorParameters: () => [{ type: i2.TranslateService }, { type: undefined, decorators: [{
642
642
  type: Inject,
@@ -653,10 +653,10 @@ class TextDirectionality extends Directionality {
653
653
  ngOnDestroy() {
654
654
  this.change.complete();
655
655
  }
656
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextDirectionality, deps: [{ token: DIR_DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
657
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextDirectionality }); }
656
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextDirectionality, deps: [{ token: DIR_DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
657
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextDirectionality }); }
658
658
  }
659
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TextDirectionality, decorators: [{
659
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextDirectionality, decorators: [{
660
660
  type: Injectable
661
661
  }], ctorParameters: () => [{ type: undefined, decorators: [{
662
662
  type: Optional
@@ -708,9 +708,9 @@ class LocalizationModule {
708
708
  ]
709
709
  };
710
710
  }
711
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
712
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: LocalizationModule, declarations: [O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule], exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe] }); }
713
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationModule, providers: [
711
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
712
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: LocalizationModule, declarations: [O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule], exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe] }); }
713
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationModule, providers: [
714
714
  { provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] },
715
715
  { provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] },
716
716
  { provide: Directionality, useClass: TextDirectionality },
@@ -720,7 +720,7 @@ class LocalizationModule {
720
720
  TextDirectionService
721
721
  ], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule, TranslateModule] }); }
722
722
  }
723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationModule, decorators: [{
723
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationModule, decorators: [{
724
724
  type: NgModule,
725
725
  args: [{
726
726
  declarations: [O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
@@ -827,10 +827,10 @@ class TranslationsLoader {
827
827
  }
828
828
  }));
829
829
  }
830
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TranslationsLoader, deps: [{ token: LOCALIZATION_CONFIGURATION_TOKEN }, { token: i1.LoggerService, optional: true }, { token: i2$2.DynamicContentService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
831
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TranslationsLoader }); }
830
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslationsLoader, deps: [{ token: LOCALIZATION_CONFIGURATION_TOKEN }, { token: i1.LoggerService, optional: true }, { token: i2$2.DynamicContentService, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
831
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslationsLoader }); }
832
832
  }
833
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: TranslationsLoader, decorators: [{
833
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TranslationsLoader, decorators: [{
834
834
  type: Injectable
835
835
  }], ctorParameters: () => [{ type: undefined, decorators: [{
836
836
  type: Inject,
@@ -941,10 +941,10 @@ class OtterLocalizationDevtools {
941
941
  this.localizationService.getTranslateService().setTranslation(language || this.getCurrentLanguage(), initialLocs);
942
942
  this.appRef.tick();
943
943
  }
944
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: OtterLocalizationDevtools, deps: [{ token: LocalizationService }, { token: i2.TranslateCompiler }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
945
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: OtterLocalizationDevtools }); }
944
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: OtterLocalizationDevtools, deps: [{ token: LocalizationService }, { token: i2.TranslateCompiler }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
945
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: OtterLocalizationDevtools }); }
946
946
  }
947
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: OtterLocalizationDevtools, decorators: [{
947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: OtterLocalizationDevtools, decorators: [{
948
948
  type: Injectable
949
949
  }], ctorParameters: () => [{ type: LocalizationService }, { type: i2.TranslateCompiler }, { type: i0.ApplicationRef }] });
950
950
 
@@ -1025,10 +1025,10 @@ class LocalizationDevtoolsConsoleService {
1025
1025
  reloadLocalizationKeys(language) {
1026
1026
  return this.localizationDevtools.reloadLocalizationKeys(language);
1027
1027
  }
1028
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsConsoleService, deps: [{ token: OtterLocalizationDevtools }, { token: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1029
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsConsoleService }); }
1028
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsConsoleService, deps: [{ token: OtterLocalizationDevtools }, { token: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1029
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsConsoleService }); }
1030
1030
  }
1031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsConsoleService, decorators: [{
1031
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsConsoleService, decorators: [{
1032
1032
  type: Injectable
1033
1033
  }], ctorParameters: () => [{ type: OtterLocalizationDevtools }, { type: undefined, decorators: [{
1034
1034
  type: Optional
@@ -1142,10 +1142,10 @@ class LocalizationDevtoolsMessageService {
1142
1142
  activate() {
1143
1143
  fromEvent(window, 'message').pipe(takeUntilDestroyed(this.destroyRef), filterMessageContent(isLocalizationMessage)).subscribe((e) => this.handleEvents(e));
1144
1144
  }
1145
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsMessageService, deps: [{ token: i1.LoggerService }, { token: OtterLocalizationDevtools }, { token: LocalizationService }, { token: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1146
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsMessageService }); }
1145
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsMessageService, deps: [{ token: i1.LoggerService }, { token: OtterLocalizationDevtools }, { token: LocalizationService }, { token: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1146
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsMessageService }); }
1147
1147
  }
1148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsMessageService, decorators: [{
1148
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsMessageService, decorators: [{
1149
1149
  type: Injectable
1150
1150
  }], ctorParameters: () => [{ type: i1.LoggerService }, { type: OtterLocalizationDevtools }, { type: LocalizationService }, { type: undefined, decorators: [{
1151
1151
  type: Optional
@@ -1170,16 +1170,16 @@ class LocalizationDevtoolsModule {
1170
1170
  ]
1171
1171
  };
1172
1172
  }
1173
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1174
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsModule, imports: [LocalizationModule] }); }
1175
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsModule, providers: [
1173
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1174
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsModule, imports: [LocalizationModule] }); }
1175
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsModule, providers: [
1176
1176
  { provide: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, useValue: OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS },
1177
1177
  LocalizationDevtoolsMessageService,
1178
1178
  LocalizationDevtoolsConsoleService,
1179
1179
  OtterLocalizationDevtools
1180
1180
  ], imports: [LocalizationModule] }); }
1181
1181
  }
1182
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.4", ngImport: i0, type: LocalizationDevtoolsModule, decorators: [{
1182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: LocalizationDevtoolsModule, decorators: [{
1183
1183
  type: NgModule,
1184
1184
  args: [{
1185
1185
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"o3r-localization.mjs","sources":["../../src/annotations/localization.ts","../../src/core/localization.configuration.ts","../../src/core/translate-messageformat-lazy.compiler.ts","../../src/stores/localization-override/localization-override.actions.ts","../../src/stores/localization-override/localization-override.reducer.ts","../../src/stores/localization-override/localization-override.state.ts","../../src/stores/localization-override/localization-override.module.ts","../../src/stores/localization-override/localization-override.selectors.ts","../../src/stores/localization-override/localization-override.sync.ts","../../src/tools/localization.token.ts","../../src/tools/localization.service.ts","../../src/tools/localization-translate.directive.ts","../../src/tools/localization-translate.pipe.ts","../../src/tools/localized-currency.pipe.ts","../../src/tools/localized-date.pipe.ts","../../src/tools/localized-decimal.pipe.ts","../../src/tools/text-direction.service.ts","../../src/tools/text-directionality.service.ts","../../src/tools/localization.module.ts","../../src/tools/translations-loader.ts","../../src/tools/localization.provider.ts","../../src/devkit/localization-devtools.service.ts","../../src/devkit/localization-devtools.token.ts","../../src/devkit/localization-devtools.console.service.ts","../../src/devkit/localization-devtools.message.service.ts","../../src/devkit/localization-devtools.module.ts","../../src/o3r-localization.ts"],"sourcesContent":["import {\n deepFill,\n immutablePrimitive,\n otterComponentInfoPropertyName,\n} from '@o3r/core';\n\n/**\n * Decorator to pass localization url\n * @param _url\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- decorator should start with a capital letter\nexport function Localization(_url: string) {\n return (target: any, key: string) => {\n const privateField = _url || `_${key}`;\n const privateValue = target[key];\n\n if (delete target[key]) {\n Object.defineProperty(target, key, {\n get: function (this: any) {\n return this[privateField];\n },\n set: function (this: any, value: Record<string, unknown>) {\n const currentField = this[privateField] || privateValue;\n this[privateField] = typeof currentField === 'undefined' ? immutablePrimitive(value) : deepFill(currentField, value);\n if (this[otterComponentInfoPropertyName]) {\n this[otterComponentInfoPropertyName].translations = this[privateField];\n }\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n}\n","/**\n * Describes configuration for LocalizationModule\n */\nexport interface LocalizationConfiguration {\n /** List of available languages */\n supportedLocales: string[];\n /** Application display language */\n language?: string;\n /** Url to fetch translation bundles from */\n endPointUrl: string;\n /** Prefix endPoinrUrl with dynamicContentPath provided by DynamicContentPath */\n useDynamicContent: boolean;\n /** List of RTL language codes */\n rtlLanguages: string[];\n /**\n * Fallback language map of resource in case translation in language does not exist.\n * translate to unsupported language will try to map to supportedLocales from below property.\n * @example\n * ```typescript\n * {\n * supportedLocales: ['en-GB', 'en-US', 'fr-FR'],\n * fallbackLocalesMap: {'en-CA': 'en-US', 'de': 'fr-FR'}\n * }\n * // translate to en-CA -> fallback to en-US, translate to de-DE -> fallback to fr-FR,\n * // translate to en-NZ -> fallback to en-GB, translate to en -> fallback to en-GB.\n * ```\n */\n fallbackLocalesMap?: {\n [supportedLocale: string]: string;\n };\n /** Fallback language of resource in case translation in language does not exist */\n fallbackLanguage: string;\n /** Path relative to published folder where webpack will copy translation bundles */\n bundlesOutputPath: string;\n /** Debug mode switch */\n debugMode: boolean;\n /** Query parameters for fetching the localization resources */\n queryParams?: { [key: string]: string };\n /** Fetch options object as per https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters */\n fetchOptions?: RequestInit;\n /** Enable the ability to switch the translations on and off at runtime. */\n enableTranslationDeactivation: boolean;\n /**\n * Merge the translations from DynamicContentPath with the local translations\n * Warning: Enable this option will download two localization bundles and can delay the display of the text on application first page\n * @default false\n */\n mergeWithLocalTranslations: boolean;\n}\n\n/**\n * Default configuration for LocalizationModule\n */\nexport const DEFAULT_LOCALIZATION_CONFIGURATION: Readonly<LocalizationConfiguration> = {\n supportedLocales: [],\n endPointUrl: '',\n useDynamicContent: false,\n rtlLanguages: ['ar', 'he'],\n fallbackLanguage: 'en',\n bundlesOutputPath: '',\n debugMode: false,\n enableTranslationDeactivation: false,\n mergeWithLocalTranslations: false\n} as const;\n","import {\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n} from '@angular/core';\nimport {\n TranslateCompiler,\n} from '@ngx-translate/core';\nimport {\n IntlMessageFormat,\n Options,\n} from 'intl-messageformat';\n\n/**\n * Options for Lazy Message Format compiler\n */\nexport interface LazyMessageFormatConfig extends Options {\n /**\n * Enables compiled translation caching\n * @default true\n */\n enableCache?: boolean;\n\n /**\n * Enables HTML in translation\n * @default true\n */\n ignoreTag?: boolean;\n}\n\n/**\n * Message format configuration default value\n */\nexport const lazyMessageDefaultConfig: Readonly<LazyMessageFormatConfig> = {\n enableCache: true,\n ignoreTag: true\n} as const;\n\n/** Message Format configuration Token */\nexport const MESSAGE_FORMAT_CONFIG = new InjectionToken<LazyMessageFormatConfig>('Message Format configuration');\n\n/**\n * This compiler expects ICU syntax and compiles the expressions with messageformat.js\n * Compare to ngx-translate-messageformat-compiler package, the compilation of the translation is done only on demand\n */\n@Injectable()\nexport class TranslateMessageFormatLazyCompiler extends TranslateCompiler {\n /** Configuration */\n private readonly config: LazyMessageFormatConfig;\n\n /** Cache of compiled translations */\n private cache: { [x: string]: IntlMessageFormat } = {};\n\n constructor(@Optional() @Inject(MESSAGE_FORMAT_CONFIG) config?: LazyMessageFormatConfig) {\n super();\n\n this.config = config ? { ...lazyMessageDefaultConfig, ...config } : lazyMessageDefaultConfig;\n }\n\n /**\n * Clear the cache of the compiled translations\n */\n public clearCache() {\n this.cache = {};\n }\n\n /** @inheritDoc */\n public compile(value: string, lang: string): (params: any) => string {\n return (params: any) => (new IntlMessageFormat(value, lang, undefined, this.config).format(params) as string);\n }\n\n /** @inheritDoc */\n public compileTranslations(translations: { [x: string]: any }, lang: string) {\n type CompiledTranslationMap = { [key in keyof typeof translations]: (params: any) => string };\n\n const compilingStrategy = this.config.enableCache\n ? (acc: CompiledTranslationMap, key: string) => {\n acc[key] = (params: any) => {\n const cached = this.cache[`${lang}_${key}`];\n if (cached) {\n return cached.format(params) as string;\n }\n\n const newCachedItem = new IntlMessageFormat(translations[key], lang, undefined, this.config);\n this.cache[`${lang}_${key}`] = newCachedItem;\n return newCachedItem.format(params) as string;\n };\n return acc;\n }\n\n : (acc: CompiledTranslationMap, key: string) => {\n acc[key] = (params: any) => new IntlMessageFormat(translations[key], lang, undefined, this.config).format(params) as string;\n return acc;\n };\n\n return Object.keys(translations).reduce<CompiledTranslationMap>((acc, key) => compilingStrategy(acc, key), {});\n }\n}\n","import {\n createAction,\n props,\n} from '@ngrx/store';\nimport {\n SetStateActionPayload,\n} from '@o3r/core';\nimport {\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/** Actions */\nconst ACTION_SET = '[LocalizationOverride] set';\n\n/**\n * Clear all overrides and fill the store with the payload\n */\nexport const setLocalizationOverride = createAction(ACTION_SET, props<SetStateActionPayload<LocalizationOverrideState>>());\n","import {\n ActionCreator,\n createReducer,\n on,\n ReducerTypes,\n} from '@ngrx/store';\nimport * as actions from './localization-override.actions';\nimport {\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/**\n * LocalizationOverride Store initial value\n */\nexport const localizationOverrideInitialState: LocalizationOverrideState = { localizationOverrides: {} };\n\n/**\n * List of basic actions for LocalizationOverride Store\n */\nexport const localizationOverrideReducerFeatures: ReducerTypes<LocalizationOverrideState, ActionCreator[]>[] = [\n on(actions.setLocalizationOverride, (_state, payload) => ({ ...payload.state }))\n];\n\n/**\n * LocalizationOverride Store reducer\n */\nexport const localizationOverrideReducer = createReducer(\n localizationOverrideInitialState,\n ...localizationOverrideReducerFeatures\n);\n","/**\n * LocalizationOverride store state\n */\nexport interface LocalizationOverrideState {\n /** Mapping of initial localization keys to the one they are replaced with */\n localizationOverrides: Record<string, string>;\n}\n\n/**\n * Name of the LocalizationOverride Store\n */\nexport const LOCALIZATION_OVERRIDE_STORE_NAME = 'localizationOverride';\n\n/**\n * LocalizationOverride Store Interface\n */\nexport interface LocalizationOverrideStore {\n /** LocalizationOverride state */\n [LOCALIZATION_OVERRIDE_STORE_NAME]: LocalizationOverrideState;\n}\n","import {\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n StoreModule,\n} from '@ngrx/store';\nimport {\n localizationOverrideReducer,\n} from './localization-override.reducer';\nimport {\n LOCALIZATION_OVERRIDE_STORE_NAME,\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/** Token of the LocalizationOverride reducer */\nexport const LOCALIZATION_OVERRIDE_REDUCER_TOKEN = new InjectionToken<ActionReducer<LocalizationOverrideState, Action>>('Feature LocalizationOverride Reducer');\n\n/** Provide default reducer for LocalizationOverride store */\nexport function getDefaultLocalizationOverrideReducer() {\n return localizationOverrideReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(LOCALIZATION_OVERRIDE_STORE_NAME, LOCALIZATION_OVERRIDE_REDUCER_TOKEN)\n ],\n providers: [\n { provide: LOCALIZATION_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultLocalizationOverrideReducer }\n ]\n})\nexport class LocalizationOverrideStoreModule {\n public static forRoot<T extends LocalizationOverrideState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<LocalizationOverrideStoreModule> {\n return {\n ngModule: LocalizationOverrideStoreModule,\n providers: [\n { provide: LOCALIZATION_OVERRIDE_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import {\n createFeatureSelector,\n createSelector,\n} from '@ngrx/store';\nimport {\n LOCALIZATION_OVERRIDE_STORE_NAME,\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/** Select LocalizationOverride State */\nexport const selectLocalizationOverrideState = createFeatureSelector<LocalizationOverrideState>(LOCALIZATION_OVERRIDE_STORE_NAME);\n\n/** Select all localization override map */\nexport const selectLocalizationOverride = createSelector(selectLocalizationOverrideState, (state) => state?.localizationOverrides || {});\n","import {\n Serializer,\n} from '@o3r/core';\nimport {\n localizationOverrideInitialState,\n} from './localization-override.reducer';\nimport {\n LocalizationOverrideState,\n} from './localization-override.state';\n\nexport const localizationOverrideStorageDeserializer = (rawObject: any) => {\n if (!rawObject) {\n return localizationOverrideInitialState;\n }\n return rawObject;\n};\n\nexport const localizationOverrideStorageSync: Serializer<LocalizationOverrideState> = {\n deserialize: localizationOverrideStorageDeserializer\n};\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n LocalizationConfiguration,\n} from '../core';\n\n/** Localization Configuration Token */\nexport const LOCALIZATION_CONFIGURATION_TOKEN = new InjectionToken<LocalizationConfiguration>('Localization Configuration injection token');\n","import {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport {\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n BehaviorSubject,\n combineLatest,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport {\n LocalizationConfiguration,\n} from '../core/localization.configuration';\nimport {\n LocalizationOverrideStore,\n selectLocalizationOverride,\n} from '../stores/index';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\n/**\n * Service which is wrapping the configuration logic of TranslateService from ngx-translate\n * Any application willing to use localization just needs to inject LocalizationService\n * in the root component and call its configure() method.\n */\n@Injectable()\nexport class LocalizationService {\n private readonly localeSplitIdentifier: string = '-';\n\n /**\n * Internal subject that we use to track changes between keys only and translation mode\n */\n private readonly _showKeys$ = new BehaviorSubject(false);\n\n /**\n * Map of localization keys to replace a key to another\n */\n private readonly keyMapping$?: Observable<Record<string, any>>;\n\n /**\n * _showKeys$ exposed as an Observable\n */\n public showKeys$ = this._showKeys$.asObservable();\n\n constructor(\n private readonly translateService: TranslateService,\n private readonly logger: LoggerService,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly configuration: LocalizationConfiguration,\n @Optional() private readonly store?: Store<LocalizationOverrideStore>\n ) {\n this.configure();\n if (this.store) {\n this.keyMapping$ = this.store.pipe(\n select(selectLocalizationOverride)\n );\n }\n }\n\n /**\n * This will handle the fallback language hierarchy to find out fallback language.\n * supportedLocales language has highest priority, next priority goes to fallbackLocalesMap and default would be\n * fallbackLanguage.\n * @param language Selected language.\n * @returns selected language if supported, fallback language otherwise.\n */\n private checkFallbackLocalesMap<T extends string | undefined>(language: T) {\n if (language && !this.configuration.supportedLocales.includes(language)) {\n const closestSupportedLanguageCode = this.getFirstClosestSupportedLanguageCode(language);\n const fallbackForLanguage = this.getFallbackMapLangCode(language);\n const fallbackStrategyDebug = (fallbackForLanguage && ' associated fallback language ')\n || (closestSupportedLanguageCode && ' closest supported language ')\n || (this.configuration.fallbackLanguage && ' configured default language ');\n const fallbackLang = fallbackForLanguage || closestSupportedLanguageCode || this.configuration.fallbackLanguage || language;\n if (language !== fallbackLang) {\n this.logger.debug(`Non supported languages ${language} will fallback to ${fallbackStrategyDebug} ${fallbackLang}`);\n }\n return fallbackLang;\n } else if (!language) {\n this.logger.debug('Language is not defined');\n }\n return language;\n }\n\n /**\n * This function checks if fallback language can be provided from fallbackLocalesMap.\n * supportedLocales: ['en-GB', 'en-US', 'fr-FR'], fallbackLocalesMap: {'en-CA': 'en-US', 'de': 'fr-FR'}\n * translate to en-CA -> fallback to en-US, translate to de-DE -> fallback to fr-FR\n * translate to en-NZ -> fallback to en-GB\n * @param language Selected language.\n * @returns Fallback language if available, undefined otherwise.\n */\n private getFallbackMapLangCode(language: string): string | undefined {\n const fallbackLocalesMap = this.configuration.fallbackLocalesMap;\n const [locale] = language.split(this.localeSplitIdentifier);\n\n return fallbackLocalesMap && (fallbackLocalesMap[language] || fallbackLocalesMap[locale]);\n }\n\n /**\n * This function checks if closest supported language available incase of selected language is not\n * supported language.\n * supportedLocales: ['en-GB', 'en-US', 'fr-FR']\n * translate to en-CA -> fallback to en-GB\n * @param language Selected language.\n * @returns Closest supported language if available, undefined otherwise.\n */\n private getFirstClosestSupportedLanguageCode(language: string): string | undefined {\n const [locale] = language.split(this.localeSplitIdentifier);\n const firstClosestRegx = new RegExp(`^${locale}${this.localeSplitIdentifier}?`, 'i');\n\n return this.configuration.supportedLocales.find((supportedLang) => firstClosestRegx.test(supportedLang));\n }\n\n /**\n * Returns a stream of translated values of a key which updates whenever the language changes.\n * @param translationKey Key to translate\n * @param interpolateParams Object to use in translation binding\n * @returns A stream of the translated key\n */\n private getTranslationStream(translationKey: string, interpolateParams?: object) {\n const translation$ = this.translateService.stream(translationKey, interpolateParams).pipe(\n map((value: string) => this.configuration.debugMode ? `${translationKey} - ${value}` : value)\n );\n\n if (!this.configuration.enableTranslationDeactivation) {\n return translation$;\n }\n\n return combineLatest([\n translation$,\n this.showKeys$\n ]).pipe(\n map(([value, showKeys]) => showKeys ? translationKey : value)\n );\n }\n\n /**\n * Configures TranslateService and registers locales. This method is called from the application level.\n */\n public configure() {\n const language = this.checkFallbackLocalesMap(this.configuration.language || this.configuration.fallbackLanguage);\n this.translateService.addLangs(this.configuration.supportedLocales);\n this.translateService.setDefaultLang(language);\n this.useLanguage(language);\n }\n\n /**\n * Is the translation deactivation enabled\n */\n public isTranslationDeactivationEnabled() {\n return this.configuration.enableTranslationDeactivation;\n }\n\n /**\n * Wrapper to call the ngx-translate service TranslateService method getLangs().\n */\n public getLanguages() {\n return this.translateService.getLangs();\n }\n\n /**\n * Wrapper to call the ngx-translate service TranslateService method use(language).\n * @param language\n */\n public useLanguage(language: string): Observable<any> {\n language = this.checkFallbackLocalesMap(language);\n return this.translateService.use(language);\n }\n\n /**\n * Wrapper to get the ngx-translate service TranslateService currentLang.\n */\n public getCurrentLanguage() {\n return this.translateService.currentLang;\n }\n\n /**\n * Get the instance of the ngx-translate TranslateService used by LocalizationService.\n */\n public getTranslateService() {\n return this.translateService;\n }\n\n /**\n * Toggle the ShowKeys mode between active and inactive.\n * @param value if specified, set the ShowKeys mode to value. If not specified, toggle the ShowKeys mode.\n */\n public toggleShowKeys(value?: boolean) {\n if (!this.configuration.enableTranslationDeactivation) {\n throw new Error('Translation deactivation is not enabled. Please set the LocalizationConfiguration property \"enableTranslationDeactivation\" accordingly.');\n }\n const newValue = value === undefined ? !this.showKeys : value;\n this._showKeys$.next(newValue);\n }\n\n /**\n * Return the current value of debug show/hide translation keys.\n */\n public get showKeys() {\n return this._showKeys$.value;\n }\n\n /**\n * Get an observable of translation key after global mapping\n * @param requestedKey Original translation key\n */\n public getKey(requestedKey: string) {\n return this.keyMapping$\n ? this.keyMapping$.pipe(\n map((keyMapping) => keyMapping?.[requestedKey] || requestedKey),\n distinctUntilChanged()\n )\n : of(requestedKey);\n }\n\n /**\n * Returns a stream of translated values of a key which updates whenever the language changes.\n * @param key Key to translate\n * @param interpolateParams Object to use in translation binding\n * @returns A stream of the translated key\n */\n public translate(key: string, interpolateParams?: object) {\n return this.getKey(key).pipe(\n switchMap((translationKey) => this.getTranslationStream(translationKey, interpolateParams)),\n shareReplay({ refCount: true, bufferSize: 1 })\n );\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n} from '@angular/core';\nimport {\n TranslateDirective,\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LocalizationService,\n} from './localization.service';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n/**\n * TranslateDirective class adding debug functionality\n */\n@Directive({\n selector: '[translate],[ngx-translate]',\n standalone: false\n})\nexport class LocalizationTranslateDirective extends TranslateDirective implements OnDestroy {\n /**\n * Internal subscription to the LocalizationService showKeys mode changes\n */\n private readonly onShowKeysChange?: Subscription;\n\n /**\n * Should we display keys instead of translations\n */\n private showKeys = false;\n\n /**\n * Internal subscription to the LocalizationService key mapping\n */\n private onKeyChange?: Subscription;\n\n /** @inheritdoc */\n @Input()\n public set translate(key: string) {\n if (key && key !== this.key) {\n if (this.onKeyChange) {\n this.onKeyChange.unsubscribe();\n }\n this.onKeyChange = this.localizationService.getKey(key).subscribe((newKey) => {\n this.key = newKey;\n this.checkNodes();\n });\n }\n }\n\n constructor(private readonly localizationService: LocalizationService, translateService: TranslateService, element: ElementRef, _ref: ChangeDetectorRef,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly localizationConfig: LocalizationConfiguration) {\n super(translateService, element, _ref);\n\n if (localizationConfig.enableTranslationDeactivation) {\n this.onShowKeysChange = localizationService.showKeys$.subscribe((showKeys) => {\n this.showKeys = showKeys;\n this.checkNodes(true);\n });\n }\n }\n\n /**\n * Overriding parent's setContent to plug debugging feature\n * @param node\n * @param content\n */\n public setContent(node: any, content: string): void {\n const key = node.originalContent;\n const newContent = this.showKeys ? key : (this.localizationConfig.debugMode && key ? `${key as string} - ${content}` : content);\n if (typeof node.textContent !== 'undefined' && node.textContent !== null) {\n node.textContent = newContent;\n } else {\n node.data = newContent;\n }\n }\n\n public ngOnDestroy() {\n super.ngOnDestroy();\n if (this.onShowKeysChange) {\n this.onShowKeysChange.unsubscribe();\n }\n if (this.onKeyChange) {\n this.onKeyChange?.unsubscribe();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Inject,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n TranslatePipe,\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LocalizationService,\n} from './localization.service';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\n/**\n * TranslatePipe class adding debug functionality\n */\n@Pipe({\n name: 'o3rTranslate',\n pure: false,\n standalone: false\n})\nexport class O3rLocalizationTranslatePipe extends TranslatePipe implements PipeTransform, OnDestroy {\n /**\n * Internal subscription to the LocalizationService showKeys mode changes\n */\n protected readonly onShowKeysChange?: Subscription;\n\n /**\n * Internal subscription to the LocalizationService key mapping\n */\n protected onKeyChange?: Subscription;\n\n /**\n * Should we display keys instead of translations\n */\n protected showKeys = false;\n\n /** last key queried */\n protected lastQueryKey?: string;\n\n /** last key resolved */\n protected lastResolvedKey?: string;\n\n constructor(protected readonly localizationService: LocalizationService, translateService: TranslateService, protected readonly changeDetector: ChangeDetectorRef,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) protected readonly localizationConfig: LocalizationConfiguration) {\n super(translateService, changeDetector);\n\n if (localizationConfig.enableTranslationDeactivation) {\n this.onShowKeysChange = this.localizationService.showKeys$.subscribe((showKeys) => {\n this.showKeys = showKeys;\n this.changeDetector.markForCheck();\n });\n }\n }\n\n /**\n * Calls original transform method and eventually outputs the key if debugMode (in LocalizationConfiguration) is enabled\n * @inheritdoc\n */\n public transform(query: string, ...args: any[]): any {\n if (this.showKeys) {\n return query;\n }\n\n if (query !== this.lastQueryKey) {\n this.lastQueryKey = query;\n if (this.onKeyChange) {\n this.onKeyChange.unsubscribe();\n }\n this.onKeyChange = this.localizationService.getKey(query).subscribe((key) => {\n this.lastResolvedKey = key;\n this.changeDetector.markForCheck();\n });\n }\n\n if (this.lastResolvedKey) {\n const value = super.transform(this.lastResolvedKey, ...args);\n\n if (this.localizationConfig.debugMode) {\n return `${this.lastResolvedKey} - ${value as string}`;\n }\n\n return value;\n }\n\n return this.value;\n }\n\n public ngOnDestroy() {\n super.ngOnDestroy();\n if (this.onShowKeysChange) {\n this.onShowKeysChange.unsubscribe();\n }\n if (this.onKeyChange) {\n this.onKeyChange.unsubscribe();\n }\n }\n}\n","import {\n CurrencyPipe,\n} from '@angular/common';\nimport {\n ChangeDetectorRef,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from './localization.service';\n\n/**\n * Native angular CurrencyPipe taking the current lang into consideration\n */\n@Pipe({\n name: 'currency',\n pure: false,\n standalone: false\n})\nexport class LocalizedCurrencyPipe extends CurrencyPipe implements OnDestroy, PipeTransform {\n private readonly onLangChange: Subscription;\n\n constructor(private readonly localizationService: LocalizationService, private readonly changeDetectorRef: ChangeDetectorRef) {\n super(localizationService.getCurrentLanguage());\n this.onLangChange = this.localizationService.getTranslateService().onLangChange.subscribe(() =>\n this.changeDetectorRef.markForCheck()\n );\n }\n\n /**\n * @inheritdoc\n */\n public transform(value: number | string, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): string | null;\n public transform(value: null | undefined, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): null;\n public transform(\n // eslint-disable-next-line @typescript-eslint/unified-signatures -- Expose same signatures as angular CurrencyPipe\n value: number | string | null | undefined, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): string | null;\n public transform(\n value: number | string | null | undefined, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): string | null {\n return super.transform(value, currencyCode, display, digitsInfo, locale || this.localizationService.getCurrentLanguage());\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import {\n DatePipe,\n} from '@angular/common';\nimport {\n ChangeDetectorRef,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from './localization.service';\n\n/**\n * Native angular DatePipe taking the current lang into consideration\n */\n@Pipe({\n name: 'date',\n pure: false,\n standalone: false\n})\nexport class LocalizedDatePipe extends DatePipe implements OnDestroy, PipeTransform {\n private readonly onLangChange: Subscription;\n\n constructor(private readonly localizationService: LocalizationService, private readonly changeDetectorRef: ChangeDetectorRef) {\n super(localizationService.getCurrentLanguage());\n this.onLangChange = this.localizationService.getTranslateService().onLangChange.subscribe(() =>\n this.changeDetectorRef.markForCheck()\n );\n }\n\n /**\n * @inheritdoc\n */\n public transform(value: Date | string | number, format?: string, timezone?: string, locale?: string): string\n | null;\n public transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null;\n public transform(\n value: Date | string | number | null | undefined, format?: string, timezone?: string,\n locale?: string): string | null;\n public transform(\n value: Date | string | number | null | undefined, format = 'mediumDate', timezone?: string,\n locale?: string): string | null {\n return this.localizationService.showKeys ? format : super.transform(value, format, timezone, locale || this.localizationService.getCurrentLanguage());\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import {\n DecimalPipe,\n} from '@angular/common';\nimport {\n ChangeDetectorRef,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from './localization.service';\n\n/**\n * Native angular DecimalPipe taking the current lang into consideration\n */\n@Pipe({\n name: 'decimal',\n pure: false,\n standalone: false\n})\nexport class LocalizedDecimalPipe extends DecimalPipe implements OnDestroy, PipeTransform {\n private readonly onLangChange: Subscription;\n\n constructor(private readonly localizationService: LocalizationService, private readonly changeDetectorRef: ChangeDetectorRef) {\n super(localizationService.getCurrentLanguage());\n this.onLangChange = this.localizationService.getTranslateService().onLangChange.subscribe(() =>\n this.changeDetectorRef.markForCheck()\n );\n }\n\n /**\n * @inheritdoc\n */\n public transform(value: number | string, digitsInfo?: string, locale?: string): string | null;\n public transform(value: null | undefined, digitsInfo?: string, locale?: string): null;\n public transform(value: number | string | null | undefined, digitsInfo?: string, locale?: string): string | null {\n return super.transform(value, digitsInfo, locale || this.localizationService.getCurrentLanguage());\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import {\n Directionality,\n} from '@angular/cdk/bidi';\nimport {\n Inject,\n Injectable,\n Renderer2,\n RendererFactory2,\n} from '@angular/core';\nimport {\n LangChangeEvent,\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\n/**\n * Service for handling the text direction based on the LocalizationConfiguration\n */\n@Injectable()\nexport class TextDirectionService {\n private subscription?: Subscription;\n private readonly renderer: Renderer2;\n\n constructor(\n private readonly translateService: TranslateService,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly configuration: LocalizationConfiguration,\n private readonly rendererFactory: RendererFactory2,\n private readonly directionality: Directionality) {\n this.renderer = this.rendererFactory.createRenderer(null, null);\n }\n\n /**\n * Updates the dir attribute on body HTML tag.\n * @returns a subscription that updates the dir attribute\n */\n public onLangChangeSubscription() {\n if (this.subscription && !this.subscription.closed) {\n return this.subscription;\n }\n this.subscription = this.translateService.onLangChange.subscribe((event: LangChangeEvent) => {\n const direction = this.configuration.rtlLanguages.includes(event.lang.split('-')[0]) ? 'rtl' : 'ltr';\n this.renderer.setAttribute(document.body, 'dir', direction);\n this.directionality.change.emit(direction);\n });\n return this.subscription;\n }\n}\n","import {\n DIR_DOCUMENT,\n Direction,\n Directionality,\n} from '@angular/cdk/bidi';\nimport {\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n} from '@angular/core';\nimport {\n startWith,\n} from 'rxjs/operators';\n\n@Injectable()\nexport class TextDirectionality extends Directionality implements OnDestroy {\n /**\n * The current 'ltr' or 'rtl' value.\n * @override\n */\n public value!: Direction;\n\n constructor(@Optional() @Inject(DIR_DOCUMENT) _document?: any) {\n super(_document);\n this.change\n .pipe(startWith(this.value))\n .subscribe((value: Direction) => this.value = value);\n }\n\n public ngOnDestroy() {\n this.change.complete();\n }\n}\n","import {\n BidiModule,\n Directionality,\n} from '@angular/cdk/bidi';\nimport {\n CommonModule,\n CurrencyPipe,\n DatePipe,\n DecimalPipe,\n} from '@angular/common';\nimport {\n InjectionToken,\n LOCALE_ID,\n ModuleWithProviders,\n NgModule,\n Optional,\n} from '@angular/core';\nimport {\n TranslateModule,\n} from '@ngx-translate/core';\nimport {\n DynamicContentModule,\n} from '@o3r/dynamic-content';\nimport {\n DEFAULT_LOCALIZATION_CONFIGURATION,\n LocalizationConfiguration,\n} from '../core';\nimport {\n LocalizationTranslateDirective,\n} from './localization-translate.directive';\nimport {\n O3rLocalizationTranslatePipe,\n} from './localization-translate.pipe';\nimport {\n LocalizationService,\n} from './localization.service';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\nimport {\n LocalizedCurrencyPipe,\n} from './localized-currency.pipe';\nimport {\n LocalizedDatePipe,\n} from './localized-date.pipe';\nimport {\n LocalizedDecimalPipe,\n} from './localized-decimal.pipe';\nimport {\n TextDirectionService,\n} from './text-direction.service';\nimport {\n TextDirectionality,\n} from './text-directionality.service';\n\n/**\n * creates LocalizationConfiguration, which is used if the application\n * @param configuration Localization configuration\n */\nexport function createLocalizationConfiguration(configuration?: Partial<LocalizationConfiguration>): LocalizationConfiguration {\n return {\n ...DEFAULT_LOCALIZATION_CONFIGURATION,\n ...configuration\n };\n}\n\n/**\n * Factory to inject the LOCALE_ID token with the current language into Angular context\n * @param localizationService Localization service\n */\nexport function localeIdNgBridge(localizationService: LocalizationService) {\n return localizationService.getCurrentLanguage();\n}\n\n/** Custom Localization Configuration Token to override default localization configuration */\nexport const CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN = new InjectionToken<Partial<LocalizationConfiguration>>('Partial Localization configuration');\n\n@NgModule({\n declarations: [O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],\n imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule],\n exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],\n providers: [\n { provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] },\n { provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] },\n { provide: Directionality, useClass: TextDirectionality },\n { provide: DatePipe, useClass: LocalizedDatePipe },\n { provide: DecimalPipe, useClass: LocalizedDecimalPipe },\n { provide: CurrencyPipe, useClass: LocalizedCurrencyPipe },\n TextDirectionService\n ]\n})\nexport class LocalizationModule {\n /**\n * forRoot method should be called only once from the application index.ts\n * It will do several things:\n * - provide the configuration for the whole application\n * - register all locales specified in the LocalizationConfiguration\n * - configure TranslateService\n * - inject LOCALE_ID token\n * @param configuration LocalizationConfiguration\n */\n public static forRoot(\n configuration?: () => Partial<LocalizationConfiguration>\n ): ModuleWithProviders<LocalizationModule> {\n return {\n ngModule: LocalizationModule,\n providers: [\n LocalizationService,\n ...(configuration\n ? [{\n provide: CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN,\n useFactory: configuration\n }]\n : [])\n ]\n };\n }\n}\n","import {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n TranslateLoader,\n} from '@ngx-translate/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n from,\n Observable,\n of,\n} from 'rxjs';\nimport {\n catchError,\n map,\n switchMap,\n} from 'rxjs/operators';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\nconst JSON_EXT = '.json';\n\n/**\n * This class is responsible for loading translation bundles from remote or local endpoints depending on the LocalizationConfiguration.\n * Fallback mechanism ensures that if a bundle in some language cannot be fetched remotely\n * we try to fetch the same language bundle locally (bundles stored inside the application)\n * and finally load the fallback language bundle (if all previous fetches failed)\n */\n@Injectable()\nexport class TranslationsLoader implements TranslateLoader {\n constructor(@Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly localizationConfiguration: LocalizationConfiguration,\n @Optional() private readonly logger?: LoggerService,\n @Optional() private readonly dynamicContentService?: DynamicContentService) {}\n\n /**\n * Download a language bundle file\n * @param url Url to the bundle file\n */\n private downloadLanguageBundle$(url: string) {\n const queryParams = this.localizationConfiguration.queryParams;\n\n let queryString = '';\n if (queryParams) {\n queryString = '?' + Object.keys(queryParams).map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(queryParams[key])).join('&');\n }\n return from(fetch(url + queryString, this.localizationConfiguration.fetchOptions)).pipe(\n switchMap((response) => from(response.json()))\n );\n }\n\n /**\n * @inheritdoc\n */\n public getTranslation(lang: string): Observable<any> {\n const fallback = this.localizationConfiguration.fallbackLanguage;\n let localizationPath$ = of(this.localizationConfiguration.endPointUrl);\n\n if (this.localizationConfiguration.useDynamicContent) {\n if (!this.dynamicContentService) {\n throw new Error('Dynamic Content is not available. Please verify you have imported the module DynamicContentModule in your application');\n }\n localizationPath$ = this.dynamicContentService.getContentPathStream(this.localizationConfiguration.endPointUrl);\n }\n\n return localizationPath$.pipe(\n switchMap((localizationPath: string) => {\n if (localizationPath) {\n const localizationBundle$ = this.downloadLanguageBundle$(localizationPath + lang + JSON_EXT);\n\n if (this.localizationConfiguration.mergeWithLocalTranslations) {\n return combineLatest([\n localizationBundle$.pipe(catchError(() => of({}))),\n this.getTranslationFromLocal(lang, fallback).pipe(\n map((translations) => {\n Object.keys(translations).forEach((key) => translations[key] = `[local] ${translations[key] as string}`);\n return translations;\n })\n )\n ]).pipe(map(([dynamicTranslations, localTranslations]) => ({ ...localTranslations, ...dynamicTranslations })));\n }\n\n /*\n * if endPointUrl is specified by the configuration then:\n * 1. try to load lang from endPointUrl\n * 2. if 1 fails then try to load from the app (local file)\n */\n return localizationBundle$.pipe(\n catchError(() => {\n this.logger?.warn(`Failed to load the localization resource from ${localizationPath + lang + JSON_EXT}, trying from the application resources`);\n return this.getTranslationFromLocal(lang, fallback);\n })\n );\n }\n /*\n * else if endPointUrl NOT specified by then configuration then:\n * 1. try to load from the app (local file)\n */\n this.logger?.warn('No localization endpoint specified, localization fetch from application resources');\n return this.getTranslationFromLocal(lang, fallback);\n })\n );\n }\n\n /**\n *\n *Fetches localization bundles from published folder (internal to application)\n *\n *1. try to load lang from local\n *2. if 1 fails try to load fallback lang but only if it's different from lang in 1\n * @param lang - language of the bundle\n * @param fallbackLanguage - fallback language in case bundle in language not found\n */\n public getTranslationFromLocal(lang: string, fallbackLanguage: string): Observable<any> {\n const pathPrefix: string = this.localizationConfiguration.bundlesOutputPath;\n return this.downloadLanguageBundle$(pathPrefix + lang + JSON_EXT).pipe(\n catchError(() => {\n if (lang === fallbackLanguage) {\n this.logger?.warn(`Failed to load ${lang} from ${pathPrefix + lang + JSON_EXT}.`);\n return of({});\n } else {\n this.logger?.warn(`Failed to load ${lang} from ${pathPrefix + lang + JSON_EXT}. Application will fallback to ${fallbackLanguage}`);\n return this.downloadLanguageBundle$(pathPrefix + fallbackLanguage + JSON_EXT).pipe(\n catchError(() => of({}))\n );\n }\n })\n );\n }\n}\n","import {\n FactoryProvider,\n Optional,\n} from '@angular/core';\nimport {\n TranslateLoader,\n} from '@ngx-translate/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\nimport {\n TranslationsLoader,\n} from './translations-loader';\n\n/**\n * Creates a loader of translations bundles based on the configuration\n * (endPointUrl and language determine which bundle we load and where do we fetch it from)\n * @param localizationConfiguration\n * @param logger service to handle the log of warning and errors\n * @param dynamicContentService (optional)\n */\nexport function createTranslateLoader(localizationConfiguration: LocalizationConfiguration, logger?: LoggerService, dynamicContentService?: DynamicContentService) {\n return new TranslationsLoader(localizationConfiguration, logger, dynamicContentService);\n}\n\n/**\n * TranslateLoader provider, using framework's TranslationsLoader class\n */\nexport const translateLoaderProvider: Readonly<FactoryProvider> = {\n provide: TranslateLoader,\n useFactory: createTranslateLoader,\n deps: [LOCALIZATION_CONFIGURATION_TOKEN, [new Optional(), LoggerService], [new Optional(), DynamicContentService]]\n} as const;\n","import {\n ApplicationRef,\n Injectable,\n} from '@angular/core';\nimport {\n TranslateCompiler,\n} from '@ngx-translate/core';\nimport {\n firstValueFrom,\n lastValueFrom,\n Subscription,\n} from 'rxjs';\nimport type {\n TranslateMessageFormatLazyCompiler,\n} from '../core';\nimport {\n LocalizationService,\n} from '../tools';\n\n@Injectable()\nexport class OtterLocalizationDevtools {\n constructor(\n private readonly localizationService: LocalizationService,\n private readonly translateCompiler: TranslateCompiler,\n private readonly appRef: ApplicationRef\n ) {}\n\n /**\n * Is the translation deactivation enabled\n */\n public isTranslationDeactivationEnabled() {\n return this.localizationService.isTranslationDeactivationEnabled();\n }\n\n /**\n * Show localization keys\n * @param value value enforced by the DevTools extension\n */\n public showLocalizationKeys(value?: boolean): void {\n this.localizationService.toggleShowKeys(value);\n this.appRef.tick();\n }\n\n /**\n * Returns the current language\n */\n public getCurrentLanguage() {\n return this.localizationService.getCurrentLanguage();\n }\n\n /**\n * Setup a listener on language change\n * @param fn called when the language is changed in the app\n */\n public onLanguageChange(fn: (language: string) => any): Subscription {\n return this.localizationService\n .getTranslateService()\n .onLangChange\n .subscribe(({ lang }) => {\n fn(lang);\n });\n }\n\n /**\n * Switch the current language to the specified value\n * @param language new language to switch to\n */\n public async switchLanguage(language: string | undefined) {\n if (!language) {\n return;\n }\n await lastValueFrom(this.localizationService.useLanguage(language));\n this.appRef.tick();\n }\n\n /**\n * Updates the specified localization key/values for the current language.\n *\n * Recommendation: To be used with a small number of keys to update to avoid performance issues.\n * @param keyValues key/values to update\n * @param language if not provided, the current language value\n */\n public async updateLocalizationKeys(keyValues: { [key: string]: string }, language?: string) {\n const lang = language || this.getCurrentLanguage();\n const translateService = this.localizationService.getTranslateService();\n await firstValueFrom(translateService.getTranslation(lang));\n Object.entries(keyValues).forEach(([key, value]) => {\n translateService.set(key, value, lang);\n });\n this.appRef.tick();\n }\n\n /**\n * Reload a language from the language file\n * @see https://github.com/ngx-translate/core/blob/master/packages/core/lib/translate.service.ts#L490\n * @param language language to reload\n */\n public async reloadLocalizationKeys(language?: string) {\n const lang = language || this.getCurrentLanguage();\n if ((this.translateCompiler as TranslateMessageFormatLazyCompiler).clearCache) {\n (this.translateCompiler as TranslateMessageFormatLazyCompiler).clearCache();\n }\n const initialLocs = await lastValueFrom(\n this.localizationService\n .getTranslateService()\n .reloadLang(lang)\n );\n this.localizationService.getTranslateService().setTranslation(\n language || this.getCurrentLanguage(),\n initialLocs\n );\n this.appRef.tick();\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n LocalizationDevtoolsServiceOptions,\n} from './localization-devkit.interface';\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS: Readonly<LocalizationDevtoolsServiceOptions> = {\n isActivatedOnBootstrap: false,\n isActivatedOnBootstrapWhenCMSContext: true,\n metadataFilePath: './metadata/localisation.metadata.json'\n} as const;\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_OPTIONS = new InjectionToken<LocalizationDevtoolsServiceOptions>('Otter Localization Devtools options');\n","/* eslint-disable no-console -- This is the purpose of this service */\nimport {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport type {\n ContextualizationDataset,\n DevtoolsServiceInterface,\n WindowWithDevtools,\n} from '@o3r/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationContextualizationDevtools,\n LocalizationDevtoolsServiceOptions,\n} from './localization-devkit.interface';\nimport {\n OtterLocalizationDevtools,\n} from './localization-devtools.service';\nimport {\n OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_LOCALIZATION_DEVTOOLS_OPTIONS,\n} from './localization-devtools.token';\n\n@Injectable()\nexport class LocalizationDevtoolsConsoleService implements DevtoolsServiceInterface, LocalizationContextualizationDevtools {\n /** Name of the Window property to access to the devtools */\n public static readonly windowModuleName = 'localization';\n\n constructor(\n private readonly localizationDevtools: OtterLocalizationDevtools,\n @Optional() @Inject(OTTER_LOCALIZATION_DEVTOOLS_OPTIONS) private readonly options: LocalizationDevtoolsServiceOptions = OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS\n ) {\n if (\n this.options.isActivatedOnBootstrap\n || (\n this.options.isActivatedOnBootstrapWhenCMSContext\n && (document.body.dataset as ContextualizationDataset).cmscontext === 'true'\n )\n ) {\n this.activate();\n }\n }\n\n /** @inheritDoc */\n public activate() {\n const windowWithDevtools: WindowWithDevtools = window;\n\n windowWithDevtools._OTTER_DEVTOOLS_ ||= {};\n\n windowWithDevtools._OTTER_DEVTOOLS_[LocalizationDevtoolsConsoleService.windowModuleName] = this;\n\n console.info(`Otter localization Devtools is now accessible via the _OTTER_DEVTOOLS_.${LocalizationDevtoolsConsoleService.windowModuleName} variable`);\n }\n\n /**\n * @inheritdoc\n */\n public isTranslationDeactivationEnabled(): boolean | Promise<boolean> {\n return this.localizationDevtools.isTranslationDeactivationEnabled();\n }\n\n /**\n * @inheritdoc\n */\n public showLocalizationKeys(value?: boolean): void | Promise<void> {\n this.localizationDevtools.showLocalizationKeys(value);\n }\n\n /**\n * @inheritdoc\n */\n public getCurrentLanguage(): string | Promise<string> {\n const currentLanguage = this.localizationDevtools.getCurrentLanguage();\n return currentLanguage;\n }\n\n /**\n * @inheritdoc\n */\n public async switchLanguage(language: string): Promise<{ previous: string; requested: string; current: string }> {\n const previous = this.localizationDevtools.getCurrentLanguage();\n await this.localizationDevtools.switchLanguage(language);\n const current = this.localizationDevtools.getCurrentLanguage();\n return {\n requested: language,\n previous,\n current\n };\n }\n\n /**\n * @inheritdoc\n */\n public onLanguageChange(fn: (language: string) => any): Subscription {\n return this.localizationDevtools.onLanguageChange(fn);\n }\n\n /**\n * @inheritdoc\n */\n public updateLocalizationKeys(keyValues: { [key: string]: string }, language?: string): void | Promise<void> {\n return this.localizationDevtools.updateLocalizationKeys(keyValues, language);\n }\n\n /**\n * @inheritdoc\n */\n public reloadLocalizationKeys(language?: string) {\n return this.localizationDevtools.reloadLocalizationKeys(language);\n }\n}\n","import {\n DestroyRef,\n inject,\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n filterMessageContent,\n sendOtterMessage,\n} from '@o3r/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n firstValueFrom,\n fromEvent,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from '../tools';\nimport {\n type AvailableLocalizationMessageContents,\n LocalizationDevtoolsServiceOptions,\n type LocalizationMessageDataTypes,\n} from './localization-devkit.interface';\nimport {\n OtterLocalizationDevtools,\n} from './localization-devtools.service';\nimport {\n OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_LOCALIZATION_DEVTOOLS_OPTIONS,\n} from './localization-devtools.token';\n\nconst isLocalizationMessage = (message: any): message is AvailableLocalizationMessageContents => {\n return message && (\n message.dataType === 'displayLocalizationKeys'\n || message.dataType === 'languages'\n || message.dataType === 'switchLanguage'\n || message.dataType === 'localizations'\n || message.dataType === 'updateLocalization'\n || message.dataType === 'requestMessages'\n || message.dataType === 'connect'\n || message.dataType === 'reloadLocalizationKeys'\n || message.dataType === 'isTranslationDeactivationEnabled'\n || message.dataType === 'getTranslationValuesContentMessage'\n );\n};\n\n@Injectable()\nexport class LocalizationDevtoolsMessageService {\n private readonly sendMessage = sendOtterMessage<AvailableLocalizationMessageContents>;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor(\n private readonly logger: LoggerService,\n private readonly localizationDevTools: OtterLocalizationDevtools,\n private readonly localizationService: LocalizationService,\n @Optional() @Inject(OTTER_LOCALIZATION_DEVTOOLS_OPTIONS) private readonly options: LocalizationDevtoolsServiceOptions = OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS\n ) {\n this.options = {\n ...OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n ...this.options\n };\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n private async sendLocalizationsMetadata() {\n const metadata = await (await fetch(this.options.metadataFilePath)).json();\n this.sendMessage('localizations', {\n localizations: metadata\n });\n }\n\n /**\n * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension\n * @param only restricted list of messages to re-send\n */\n private async handleReEmitRequest(only?: LocalizationMessageDataTypes[]) {\n if (!only || only.includes('localizations')) {\n void this.sendLocalizationsMetadata();\n }\n if (!only || only.includes('switchLanguage')) {\n this.sendMessage('switchLanguage', { language: this.localizationDevTools.getCurrentLanguage() });\n }\n if (!only || only.includes('languages')) {\n this.sendMessage('languages', { languages: this.localizationService.getLanguages() });\n }\n if (!only || only.includes('getTranslationValuesContentMessage')) {\n this.sendMessage('getTranslationValuesContentMessage', {\n translations: await firstValueFrom(this.localizationService.getTranslateService().getTranslation(this.localizationService.getCurrentLanguage()))\n });\n }\n if (!only || only.includes('isTranslationDeactivationEnabled')) {\n this.sendMessage('isTranslationDeactivationEnabled', { enabled: this.localizationService.isTranslationDeactivationEnabled() });\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param message Message coming from the Otter Chrome DevTools extension\n */\n private handleEvents(message: AvailableLocalizationMessageContents) {\n this.logger.debug('Message handling by the localization service', message);\n\n switch (message.dataType) {\n case 'connect': {\n this.connectPlugin();\n break;\n }\n case 'displayLocalizationKeys': {\n this.localizationDevTools.showLocalizationKeys(message.toggle);\n break;\n }\n case 'requestMessages': {\n void this.handleReEmitRequest(message.only);\n break;\n }\n case 'switchLanguage': {\n void this.localizationDevTools.switchLanguage(message.language);\n break;\n }\n case 'updateLocalization': {\n void this.localizationDevTools.updateLocalizationKeys({\n [message.key]: message.value\n }, message.lang);\n break;\n }\n case 'reloadLocalizationKeys': {\n void this.localizationDevTools.reloadLocalizationKeys(message.lang);\n break;\n }\n default: {\n this.logger.warn('Message ignored by the localization service', message);\n }\n }\n }\n\n /**\n * Function to connect the plugin to the Otter Chrome DevTools extension\n */\n private connectPlugin() {\n this.logger.debug('Otter DevTools is plugged to localization service of the application');\n }\n\n /** @inheritDoc */\n public activate() {\n fromEvent(window, 'message').pipe(\n takeUntilDestroyed(this.destroyRef),\n filterMessageContent(isLocalizationMessage)\n ).subscribe((e) => this.handleEvents(e));\n }\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n LocalizationModule,\n} from '../tools/index';\nimport type {\n LocalizationDevtoolsServiceOptions,\n} from './localization-devkit.interface';\nimport {\n LocalizationDevtoolsConsoleService,\n} from './localization-devtools.console.service';\nimport {\n LocalizationDevtoolsMessageService,\n} from './localization-devtools.message.service';\nimport {\n OtterLocalizationDevtools,\n} from './localization-devtools.service';\nimport {\n OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_LOCALIZATION_DEVTOOLS_OPTIONS,\n} from './localization-devtools.token';\n\n@NgModule({\n imports: [\n LocalizationModule\n ],\n providers: [\n { provide: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, useValue: OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS },\n LocalizationDevtoolsMessageService,\n LocalizationDevtoolsConsoleService,\n OtterLocalizationDevtools\n ]\n})\nexport class LocalizationDevtoolsModule {\n /**\n * Initialize Otter Devtools\n * @param options\n */\n public static instrument(options: Partial<LocalizationDevtoolsServiceOptions>): ModuleWithProviders<LocalizationDevtoolsModule> {\n return {\n ngModule: LocalizationDevtoolsModule,\n providers: [\n { provide: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, useValue: { ...OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, ...options }, multi: false },\n LocalizationDevtoolsMessageService,\n LocalizationDevtoolsConsoleService,\n OtterLocalizationDevtools\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.setLocalizationOverride","i1","i1.LocalizationService","i2"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA;;;AAGG;AACH;AACM,SAAU,YAAY,CAAC,IAAY,EAAA;AACvC,IAAA,OAAO,CAAC,MAAW,EAAE,GAAW,KAAI;AAClC,QAAA,MAAM,YAAY,GAAG,IAAI,IAAI,CAAI,CAAA,EAAA,GAAG,EAAE;AACtC,QAAA,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC;AAEhC,QAAA,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE;AACtB,YAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;AACjC,gBAAA,GAAG,EAAE,YAAA;AACH,oBAAA,OAAO,IAAI,CAAC,YAAY,CAAC;iBAC1B;gBACD,GAAG,EAAE,UAAqB,KAA8B,EAAA;oBACtD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,YAAY;oBACvD,IAAI,CAAC,YAAY,CAAC,GAAG,OAAO,YAAY,KAAK,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC;AACpH,oBAAA,IAAI,IAAI,CAAC,8BAA8B,CAAC,EAA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;iIAdQ,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA1B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,YATnC,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAST,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,EAP1B,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,mCAAmC,EAAE,QAAQ,EAAE,2CAA2C,EAAE;YACvG,kCAAkC;YAClC,kCAAkC;YAClC;AACD,SAAA,EAAA,OAAA,EAAA,CAPC,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAST,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAXtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,mCAAmC,EAAE,QAAQ,EAAE,2CAA2C,EAAE;wBACvG,kCAAkC;wBAClC,kCAAkC;wBAClC;AACD;AACF,iBAAA;;;AClCD;;AAEG;;;;"}
1
+ {"version":3,"file":"o3r-localization.mjs","sources":["../../src/annotations/localization.ts","../../src/core/localization.configuration.ts","../../src/core/translate-messageformat-lazy.compiler.ts","../../src/stores/localization-override/localization-override.actions.ts","../../src/stores/localization-override/localization-override.reducer.ts","../../src/stores/localization-override/localization-override.state.ts","../../src/stores/localization-override/localization-override.module.ts","../../src/stores/localization-override/localization-override.selectors.ts","../../src/stores/localization-override/localization-override.sync.ts","../../src/tools/localization.token.ts","../../src/tools/localization.service.ts","../../src/tools/localization-translate.directive.ts","../../src/tools/localization-translate.pipe.ts","../../src/tools/localized-currency.pipe.ts","../../src/tools/localized-date.pipe.ts","../../src/tools/localized-decimal.pipe.ts","../../src/tools/text-direction.service.ts","../../src/tools/text-directionality.service.ts","../../src/tools/localization.module.ts","../../src/tools/translations-loader.ts","../../src/tools/localization.provider.ts","../../src/devkit/localization-devtools.service.ts","../../src/devkit/localization-devtools.token.ts","../../src/devkit/localization-devtools.console.service.ts","../../src/devkit/localization-devtools.message.service.ts","../../src/devkit/localization-devtools.module.ts","../../src/o3r-localization.ts"],"sourcesContent":["import {\n deepFill,\n immutablePrimitive,\n otterComponentInfoPropertyName,\n} from '@o3r/core';\n\n/**\n * Decorator to pass localization url\n * @param _url\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- decorator should start with a capital letter\nexport function Localization(_url: string) {\n return (target: any, key: string) => {\n const privateField = _url || `_${key}`;\n const privateValue = target[key];\n\n if (delete target[key]) {\n Object.defineProperty(target, key, {\n get: function (this: any) {\n return this[privateField];\n },\n set: function (this: any, value: Record<string, unknown>) {\n const currentField = this[privateField] || privateValue;\n this[privateField] = typeof currentField === 'undefined' ? immutablePrimitive(value) : deepFill(currentField, value);\n if (this[otterComponentInfoPropertyName]) {\n this[otterComponentInfoPropertyName].translations = this[privateField];\n }\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n}\n","/**\n * Describes configuration for LocalizationModule\n */\nexport interface LocalizationConfiguration {\n /** List of available languages */\n supportedLocales: string[];\n /** Application display language */\n language?: string;\n /** Url to fetch translation bundles from */\n endPointUrl: string;\n /** Prefix endPoinrUrl with dynamicContentPath provided by DynamicContentPath */\n useDynamicContent: boolean;\n /** List of RTL language codes */\n rtlLanguages: string[];\n /**\n * Fallback language map of resource in case translation in language does not exist.\n * translate to unsupported language will try to map to supportedLocales from below property.\n * @example\n * ```typescript\n * {\n * supportedLocales: ['en-GB', 'en-US', 'fr-FR'],\n * fallbackLocalesMap: {'en-CA': 'en-US', 'de': 'fr-FR'}\n * }\n * // translate to en-CA -> fallback to en-US, translate to de-DE -> fallback to fr-FR,\n * // translate to en-NZ -> fallback to en-GB, translate to en -> fallback to en-GB.\n * ```\n */\n fallbackLocalesMap?: {\n [supportedLocale: string]: string;\n };\n /** Fallback language of resource in case translation in language does not exist */\n fallbackLanguage: string;\n /** Path relative to published folder where webpack will copy translation bundles */\n bundlesOutputPath: string;\n /** Debug mode switch */\n debugMode: boolean;\n /** Query parameters for fetching the localization resources */\n queryParams?: { [key: string]: string };\n /** Fetch options object as per https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch#Parameters */\n fetchOptions?: RequestInit;\n /** Enable the ability to switch the translations on and off at runtime. */\n enableTranslationDeactivation: boolean;\n /**\n * Merge the translations from DynamicContentPath with the local translations\n * Warning: Enable this option will download two localization bundles and can delay the display of the text on application first page\n * @default false\n */\n mergeWithLocalTranslations: boolean;\n}\n\n/**\n * Default configuration for LocalizationModule\n */\nexport const DEFAULT_LOCALIZATION_CONFIGURATION: Readonly<LocalizationConfiguration> = {\n supportedLocales: [],\n endPointUrl: '',\n useDynamicContent: false,\n rtlLanguages: ['ar', 'he'],\n fallbackLanguage: 'en',\n bundlesOutputPath: '',\n debugMode: false,\n enableTranslationDeactivation: false,\n mergeWithLocalTranslations: false\n} as const;\n","import {\n Inject,\n Injectable,\n InjectionToken,\n Optional,\n} from '@angular/core';\nimport {\n TranslateCompiler,\n} from '@ngx-translate/core';\nimport {\n IntlMessageFormat,\n Options,\n} from 'intl-messageformat';\n\n/**\n * Options for Lazy Message Format compiler\n */\nexport interface LazyMessageFormatConfig extends Options {\n /**\n * Enables compiled translation caching\n * @default true\n */\n enableCache?: boolean;\n\n /**\n * Enables HTML in translation\n * @default true\n */\n ignoreTag?: boolean;\n}\n\n/**\n * Message format configuration default value\n */\nexport const lazyMessageDefaultConfig: Readonly<LazyMessageFormatConfig> = {\n enableCache: true,\n ignoreTag: true\n} as const;\n\n/** Message Format configuration Token */\nexport const MESSAGE_FORMAT_CONFIG = new InjectionToken<LazyMessageFormatConfig>('Message Format configuration');\n\n/**\n * This compiler expects ICU syntax and compiles the expressions with messageformat.js\n * Compare to ngx-translate-messageformat-compiler package, the compilation of the translation is done only on demand\n */\n@Injectable()\nexport class TranslateMessageFormatLazyCompiler extends TranslateCompiler {\n /** Configuration */\n private readonly config: LazyMessageFormatConfig;\n\n /** Cache of compiled translations */\n private cache: { [x: string]: IntlMessageFormat } = {};\n\n constructor(@Optional() @Inject(MESSAGE_FORMAT_CONFIG) config?: LazyMessageFormatConfig) {\n super();\n\n this.config = config ? { ...lazyMessageDefaultConfig, ...config } : lazyMessageDefaultConfig;\n }\n\n /**\n * Clear the cache of the compiled translations\n */\n public clearCache() {\n this.cache = {};\n }\n\n /** @inheritDoc */\n public compile(value: string, lang: string): (params: any) => string {\n return (params: any) => (new IntlMessageFormat(value, lang, undefined, this.config).format(params) as string);\n }\n\n /** @inheritDoc */\n public compileTranslations(translations: { [x: string]: any }, lang: string) {\n type CompiledTranslationMap = { [key in keyof typeof translations]: (params: any) => string };\n\n const compilingStrategy = this.config.enableCache\n ? (acc: CompiledTranslationMap, key: string) => {\n acc[key] = (params: any) => {\n const cached = this.cache[`${lang}_${key}`];\n if (cached) {\n return cached.format(params) as string;\n }\n\n const newCachedItem = new IntlMessageFormat(translations[key], lang, undefined, this.config);\n this.cache[`${lang}_${key}`] = newCachedItem;\n return newCachedItem.format(params) as string;\n };\n return acc;\n }\n\n : (acc: CompiledTranslationMap, key: string) => {\n acc[key] = (params: any) => new IntlMessageFormat(translations[key], lang, undefined, this.config).format(params) as string;\n return acc;\n };\n\n return Object.keys(translations).reduce<CompiledTranslationMap>((acc, key) => compilingStrategy(acc, key), {});\n }\n}\n","import {\n createAction,\n props,\n} from '@ngrx/store';\nimport {\n SetStateActionPayload,\n} from '@o3r/core';\nimport {\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/** Actions */\nconst ACTION_SET = '[LocalizationOverride] set';\n\n/**\n * Clear all overrides and fill the store with the payload\n */\nexport const setLocalizationOverride = createAction(ACTION_SET, props<SetStateActionPayload<LocalizationOverrideState>>());\n","import {\n ActionCreator,\n createReducer,\n on,\n ReducerTypes,\n} from '@ngrx/store';\nimport * as actions from './localization-override.actions';\nimport {\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/**\n * LocalizationOverride Store initial value\n */\nexport const localizationOverrideInitialState: LocalizationOverrideState = { localizationOverrides: {} };\n\n/**\n * List of basic actions for LocalizationOverride Store\n */\nexport const localizationOverrideReducerFeatures: ReducerTypes<LocalizationOverrideState, ActionCreator[]>[] = [\n on(actions.setLocalizationOverride, (_state, payload) => ({ ...payload.state }))\n];\n\n/**\n * LocalizationOverride Store reducer\n */\nexport const localizationOverrideReducer = createReducer(\n localizationOverrideInitialState,\n ...localizationOverrideReducerFeatures\n);\n","/**\n * LocalizationOverride store state\n */\nexport interface LocalizationOverrideState {\n /** Mapping of initial localization keys to the one they are replaced with */\n localizationOverrides: Record<string, string>;\n}\n\n/**\n * Name of the LocalizationOverride Store\n */\nexport const LOCALIZATION_OVERRIDE_STORE_NAME = 'localizationOverride';\n\n/**\n * LocalizationOverride Store Interface\n */\nexport interface LocalizationOverrideStore {\n /** LocalizationOverride state */\n [LOCALIZATION_OVERRIDE_STORE_NAME]: LocalizationOverrideState;\n}\n","import {\n InjectionToken,\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n Action,\n ActionReducer,\n StoreModule,\n} from '@ngrx/store';\nimport {\n localizationOverrideReducer,\n} from './localization-override.reducer';\nimport {\n LOCALIZATION_OVERRIDE_STORE_NAME,\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/** Token of the LocalizationOverride reducer */\nexport const LOCALIZATION_OVERRIDE_REDUCER_TOKEN = new InjectionToken<ActionReducer<LocalizationOverrideState, Action>>('Feature LocalizationOverride Reducer');\n\n/** Provide default reducer for LocalizationOverride store */\nexport function getDefaultLocalizationOverrideReducer() {\n return localizationOverrideReducer;\n}\n\n@NgModule({\n imports: [\n StoreModule.forFeature(LOCALIZATION_OVERRIDE_STORE_NAME, LOCALIZATION_OVERRIDE_REDUCER_TOKEN)\n ],\n providers: [\n { provide: LOCALIZATION_OVERRIDE_REDUCER_TOKEN, useFactory: getDefaultLocalizationOverrideReducer }\n ]\n})\nexport class LocalizationOverrideStoreModule {\n public static forRoot<T extends LocalizationOverrideState>(reducerFactory: () => ActionReducer<T, Action>): ModuleWithProviders<LocalizationOverrideStoreModule> {\n return {\n ngModule: LocalizationOverrideStoreModule,\n providers: [\n { provide: LOCALIZATION_OVERRIDE_REDUCER_TOKEN, useFactory: reducerFactory }\n ]\n };\n }\n}\n","import {\n createFeatureSelector,\n createSelector,\n} from '@ngrx/store';\nimport {\n LOCALIZATION_OVERRIDE_STORE_NAME,\n LocalizationOverrideState,\n} from './localization-override.state';\n\n/** Select LocalizationOverride State */\nexport const selectLocalizationOverrideState = createFeatureSelector<LocalizationOverrideState>(LOCALIZATION_OVERRIDE_STORE_NAME);\n\n/** Select all localization override map */\nexport const selectLocalizationOverride = createSelector(selectLocalizationOverrideState, (state) => state?.localizationOverrides || {});\n","import {\n Serializer,\n} from '@o3r/core';\nimport {\n localizationOverrideInitialState,\n} from './localization-override.reducer';\nimport {\n LocalizationOverrideState,\n} from './localization-override.state';\n\nexport const localizationOverrideStorageDeserializer = (rawObject: any) => {\n if (!rawObject) {\n return localizationOverrideInitialState;\n }\n return rawObject;\n};\n\nexport const localizationOverrideStorageSync: Serializer<LocalizationOverrideState> = {\n deserialize: localizationOverrideStorageDeserializer\n};\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n LocalizationConfiguration,\n} from '../core';\n\n/** Localization Configuration Token */\nexport const LOCALIZATION_CONFIGURATION_TOKEN = new InjectionToken<LocalizationConfiguration>('Localization Configuration injection token');\n","import {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n select,\n Store,\n} from '@ngrx/store';\nimport {\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n BehaviorSubject,\n combineLatest,\n Observable,\n of,\n} from 'rxjs';\nimport {\n distinctUntilChanged,\n map,\n shareReplay,\n switchMap,\n} from 'rxjs/operators';\nimport {\n LocalizationConfiguration,\n} from '../core/localization.configuration';\nimport {\n LocalizationOverrideStore,\n selectLocalizationOverride,\n} from '../stores/index';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\n/**\n * Service which is wrapping the configuration logic of TranslateService from ngx-translate\n * Any application willing to use localization just needs to inject LocalizationService\n * in the root component and call its configure() method.\n */\n@Injectable()\nexport class LocalizationService {\n private readonly localeSplitIdentifier: string = '-';\n\n /**\n * Internal subject that we use to track changes between keys only and translation mode\n */\n private readonly _showKeys$ = new BehaviorSubject(false);\n\n /**\n * Map of localization keys to replace a key to another\n */\n private readonly keyMapping$?: Observable<Record<string, any>>;\n\n /**\n * _showKeys$ exposed as an Observable\n */\n public showKeys$ = this._showKeys$.asObservable();\n\n constructor(\n private readonly translateService: TranslateService,\n private readonly logger: LoggerService,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly configuration: LocalizationConfiguration,\n @Optional() private readonly store?: Store<LocalizationOverrideStore>\n ) {\n this.configure();\n if (this.store) {\n this.keyMapping$ = this.store.pipe(\n select(selectLocalizationOverride)\n );\n }\n }\n\n /**\n * This will handle the fallback language hierarchy to find out fallback language.\n * supportedLocales language has highest priority, next priority goes to fallbackLocalesMap and default would be\n * fallbackLanguage.\n * @param language Selected language.\n * @returns selected language if supported, fallback language otherwise.\n */\n private checkFallbackLocalesMap<T extends string | undefined>(language: T) {\n if (language && !this.configuration.supportedLocales.includes(language)) {\n const closestSupportedLanguageCode = this.getFirstClosestSupportedLanguageCode(language);\n const fallbackForLanguage = this.getFallbackMapLangCode(language);\n const fallbackStrategyDebug = (fallbackForLanguage && ' associated fallback language ')\n || (closestSupportedLanguageCode && ' closest supported language ')\n || (this.configuration.fallbackLanguage && ' configured default language ');\n const fallbackLang = fallbackForLanguage || closestSupportedLanguageCode || this.configuration.fallbackLanguage || language;\n if (language !== fallbackLang) {\n this.logger.debug(`Non supported languages ${language} will fallback to ${fallbackStrategyDebug} ${fallbackLang}`);\n }\n return fallbackLang;\n } else if (!language) {\n this.logger.debug('Language is not defined');\n }\n return language;\n }\n\n /**\n * This function checks if fallback language can be provided from fallbackLocalesMap.\n * supportedLocales: ['en-GB', 'en-US', 'fr-FR'], fallbackLocalesMap: {'en-CA': 'en-US', 'de': 'fr-FR'}\n * translate to en-CA -> fallback to en-US, translate to de-DE -> fallback to fr-FR\n * translate to en-NZ -> fallback to en-GB\n * @param language Selected language.\n * @returns Fallback language if available, undefined otherwise.\n */\n private getFallbackMapLangCode(language: string): string | undefined {\n const fallbackLocalesMap = this.configuration.fallbackLocalesMap;\n const [locale] = language.split(this.localeSplitIdentifier);\n\n return fallbackLocalesMap && (fallbackLocalesMap[language] || fallbackLocalesMap[locale]);\n }\n\n /**\n * This function checks if closest supported language available incase of selected language is not\n * supported language.\n * supportedLocales: ['en-GB', 'en-US', 'fr-FR']\n * translate to en-CA -> fallback to en-GB\n * @param language Selected language.\n * @returns Closest supported language if available, undefined otherwise.\n */\n private getFirstClosestSupportedLanguageCode(language: string): string | undefined {\n const [locale] = language.split(this.localeSplitIdentifier);\n const firstClosestRegx = new RegExp(`^${locale}${this.localeSplitIdentifier}?`, 'i');\n\n return this.configuration.supportedLocales.find((supportedLang) => firstClosestRegx.test(supportedLang));\n }\n\n /**\n * Returns a stream of translated values of a key which updates whenever the language changes.\n * @param translationKey Key to translate\n * @param interpolateParams Object to use in translation binding\n * @returns A stream of the translated key\n */\n private getTranslationStream(translationKey: string, interpolateParams?: object) {\n const translation$ = this.translateService.stream(translationKey, interpolateParams).pipe(\n map((value: string) => this.configuration.debugMode ? `${translationKey} - ${value}` : value)\n );\n\n if (!this.configuration.enableTranslationDeactivation) {\n return translation$;\n }\n\n return combineLatest([\n translation$,\n this.showKeys$\n ]).pipe(\n map(([value, showKeys]) => showKeys ? translationKey : value)\n );\n }\n\n /**\n * Configures TranslateService and registers locales. This method is called from the application level.\n */\n public configure() {\n const language = this.checkFallbackLocalesMap(this.configuration.language || this.configuration.fallbackLanguage);\n this.translateService.addLangs(this.configuration.supportedLocales);\n this.translateService.setDefaultLang(language);\n this.useLanguage(language);\n }\n\n /**\n * Is the translation deactivation enabled\n */\n public isTranslationDeactivationEnabled() {\n return this.configuration.enableTranslationDeactivation;\n }\n\n /**\n * Wrapper to call the ngx-translate service TranslateService method getLangs().\n */\n public getLanguages() {\n return this.translateService.getLangs();\n }\n\n /**\n * Wrapper to call the ngx-translate service TranslateService method use(language).\n * @param language\n */\n public useLanguage(language: string): Observable<any> {\n language = this.checkFallbackLocalesMap(language);\n return this.translateService.use(language);\n }\n\n /**\n * Wrapper to get the ngx-translate service TranslateService currentLang.\n */\n public getCurrentLanguage() {\n return this.translateService.currentLang;\n }\n\n /**\n * Get the instance of the ngx-translate TranslateService used by LocalizationService.\n */\n public getTranslateService() {\n return this.translateService;\n }\n\n /**\n * Toggle the ShowKeys mode between active and inactive.\n * @param value if specified, set the ShowKeys mode to value. If not specified, toggle the ShowKeys mode.\n */\n public toggleShowKeys(value?: boolean) {\n if (!this.configuration.enableTranslationDeactivation) {\n throw new Error('Translation deactivation is not enabled. Please set the LocalizationConfiguration property \"enableTranslationDeactivation\" accordingly.');\n }\n const newValue = value === undefined ? !this.showKeys : value;\n this._showKeys$.next(newValue);\n }\n\n /**\n * Return the current value of debug show/hide translation keys.\n */\n public get showKeys() {\n return this._showKeys$.value;\n }\n\n /**\n * Get an observable of translation key after global mapping\n * @param requestedKey Original translation key\n */\n public getKey(requestedKey: string) {\n return this.keyMapping$\n ? this.keyMapping$.pipe(\n map((keyMapping) => keyMapping?.[requestedKey] || requestedKey),\n distinctUntilChanged()\n )\n : of(requestedKey);\n }\n\n /**\n * Returns a stream of translated values of a key which updates whenever the language changes.\n * @param key Key to translate\n * @param interpolateParams Object to use in translation binding\n * @returns A stream of the translated key\n */\n public translate(key: string, interpolateParams?: object) {\n return this.getKey(key).pipe(\n switchMap((translationKey) => this.getTranslationStream(translationKey, interpolateParams)),\n shareReplay({ refCount: true, bufferSize: 1 })\n );\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n ElementRef,\n Inject,\n Input,\n OnDestroy,\n} from '@angular/core';\nimport {\n TranslateDirective,\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LocalizationService,\n} from './localization.service';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n/**\n * TranslateDirective class adding debug functionality\n */\n@Directive({\n selector: '[translate],[ngx-translate]',\n standalone: false\n})\nexport class LocalizationTranslateDirective extends TranslateDirective implements OnDestroy {\n /**\n * Internal subscription to the LocalizationService showKeys mode changes\n */\n private readonly onShowKeysChange?: Subscription;\n\n /**\n * Should we display keys instead of translations\n */\n private showKeys = false;\n\n /**\n * Internal subscription to the LocalizationService key mapping\n */\n private onKeyChange?: Subscription;\n\n /** @inheritdoc */\n @Input()\n public set translate(key: string) {\n if (key && key !== this.key) {\n if (this.onKeyChange) {\n this.onKeyChange.unsubscribe();\n }\n this.onKeyChange = this.localizationService.getKey(key).subscribe((newKey) => {\n this.key = newKey;\n this.checkNodes();\n });\n }\n }\n\n constructor(private readonly localizationService: LocalizationService, translateService: TranslateService, element: ElementRef, _ref: ChangeDetectorRef,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly localizationConfig: LocalizationConfiguration) {\n super(translateService, element, _ref);\n\n if (localizationConfig.enableTranslationDeactivation) {\n this.onShowKeysChange = localizationService.showKeys$.subscribe((showKeys) => {\n this.showKeys = showKeys;\n this.checkNodes(true);\n });\n }\n }\n\n /**\n * Overriding parent's setContent to plug debugging feature\n * @param node\n * @param content\n */\n public setContent(node: any, content: string): void {\n const key = node.originalContent;\n const newContent = this.showKeys ? key : (this.localizationConfig.debugMode && key ? `${key as string} - ${content}` : content);\n if (typeof node.textContent !== 'undefined' && node.textContent !== null) {\n node.textContent = newContent;\n } else {\n node.data = newContent;\n }\n }\n\n public ngOnDestroy() {\n super.ngOnDestroy();\n if (this.onShowKeysChange) {\n this.onShowKeysChange.unsubscribe();\n }\n if (this.onKeyChange) {\n this.onKeyChange?.unsubscribe();\n }\n }\n}\n","import {\n ChangeDetectorRef,\n Inject,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n TranslatePipe,\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LocalizationService,\n} from './localization.service';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\n/**\n * TranslatePipe class adding debug functionality\n */\n@Pipe({\n name: 'o3rTranslate',\n pure: false,\n standalone: false\n})\nexport class O3rLocalizationTranslatePipe extends TranslatePipe implements PipeTransform, OnDestroy {\n /**\n * Internal subscription to the LocalizationService showKeys mode changes\n */\n protected readonly onShowKeysChange?: Subscription;\n\n /**\n * Internal subscription to the LocalizationService key mapping\n */\n protected onKeyChange?: Subscription;\n\n /**\n * Should we display keys instead of translations\n */\n protected showKeys = false;\n\n /** last key queried */\n protected lastQueryKey?: string;\n\n /** last key resolved */\n protected lastResolvedKey?: string;\n\n constructor(protected readonly localizationService: LocalizationService, translateService: TranslateService, protected readonly changeDetector: ChangeDetectorRef,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) protected readonly localizationConfig: LocalizationConfiguration) {\n super(translateService, changeDetector);\n\n if (localizationConfig.enableTranslationDeactivation) {\n this.onShowKeysChange = this.localizationService.showKeys$.subscribe((showKeys) => {\n this.showKeys = showKeys;\n this.changeDetector.markForCheck();\n });\n }\n }\n\n /**\n * Calls original transform method and eventually outputs the key if debugMode (in LocalizationConfiguration) is enabled\n * @inheritdoc\n */\n public transform(query: string, ...args: any[]): any {\n if (this.showKeys) {\n return query;\n }\n\n if (query !== this.lastQueryKey) {\n this.lastQueryKey = query;\n if (this.onKeyChange) {\n this.onKeyChange.unsubscribe();\n }\n this.onKeyChange = this.localizationService.getKey(query).subscribe((key) => {\n this.lastResolvedKey = key;\n this.changeDetector.markForCheck();\n });\n }\n\n if (this.lastResolvedKey) {\n const value = super.transform(this.lastResolvedKey, ...args);\n\n if (this.localizationConfig.debugMode) {\n return `${this.lastResolvedKey} - ${value as string}`;\n }\n\n return value;\n }\n\n return this.value;\n }\n\n public ngOnDestroy() {\n super.ngOnDestroy();\n if (this.onShowKeysChange) {\n this.onShowKeysChange.unsubscribe();\n }\n if (this.onKeyChange) {\n this.onKeyChange.unsubscribe();\n }\n }\n}\n","import {\n CurrencyPipe,\n} from '@angular/common';\nimport {\n ChangeDetectorRef,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from './localization.service';\n\n/**\n * Native angular CurrencyPipe taking the current lang into consideration\n */\n@Pipe({\n name: 'currency',\n pure: false,\n standalone: false\n})\nexport class LocalizedCurrencyPipe extends CurrencyPipe implements OnDestroy, PipeTransform {\n private readonly onLangChange: Subscription;\n\n constructor(private readonly localizationService: LocalizationService, private readonly changeDetectorRef: ChangeDetectorRef) {\n super(localizationService.getCurrentLanguage());\n this.onLangChange = this.localizationService.getTranslateService().onLangChange.subscribe(() =>\n this.changeDetectorRef.markForCheck()\n );\n }\n\n /**\n * @inheritdoc\n */\n public transform(value: number | string, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): string | null;\n public transform(value: null | undefined, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): null;\n public transform(\n // eslint-disable-next-line @typescript-eslint/unified-signatures -- Expose same signatures as angular CurrencyPipe\n value: number | string | null | undefined, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): string | null;\n public transform(\n value: number | string | null | undefined, currencyCode?: string, display?: string | boolean, digitsInfo?: string, locale?: string): string | null {\n return super.transform(value, currencyCode, display, digitsInfo, locale || this.localizationService.getCurrentLanguage());\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import {\n DatePipe,\n} from '@angular/common';\nimport {\n ChangeDetectorRef,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from './localization.service';\n\n/**\n * Native angular DatePipe taking the current lang into consideration\n */\n@Pipe({\n name: 'date',\n pure: false,\n standalone: false\n})\nexport class LocalizedDatePipe extends DatePipe implements OnDestroy, PipeTransform {\n private readonly onLangChange: Subscription;\n\n constructor(private readonly localizationService: LocalizationService, private readonly changeDetectorRef: ChangeDetectorRef) {\n super(localizationService.getCurrentLanguage());\n this.onLangChange = this.localizationService.getTranslateService().onLangChange.subscribe(() =>\n this.changeDetectorRef.markForCheck()\n );\n }\n\n /**\n * @inheritdoc\n */\n public transform(value: Date | string | number, format?: string, timezone?: string, locale?: string): string\n | null;\n public transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null;\n public transform(\n value: Date | string | number | null | undefined, format?: string, timezone?: string,\n locale?: string): string | null;\n public transform(\n value: Date | string | number | null | undefined, format = 'mediumDate', timezone?: string,\n locale?: string): string | null {\n return this.localizationService.showKeys ? format : super.transform(value, format, timezone, locale || this.localizationService.getCurrentLanguage());\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import {\n DecimalPipe,\n} from '@angular/common';\nimport {\n ChangeDetectorRef,\n OnDestroy,\n Pipe,\n PipeTransform,\n} from '@angular/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from './localization.service';\n\n/**\n * Native angular DecimalPipe taking the current lang into consideration\n */\n@Pipe({\n name: 'decimal',\n pure: false,\n standalone: false\n})\nexport class LocalizedDecimalPipe extends DecimalPipe implements OnDestroy, PipeTransform {\n private readonly onLangChange: Subscription;\n\n constructor(private readonly localizationService: LocalizationService, private readonly changeDetectorRef: ChangeDetectorRef) {\n super(localizationService.getCurrentLanguage());\n this.onLangChange = this.localizationService.getTranslateService().onLangChange.subscribe(() =>\n this.changeDetectorRef.markForCheck()\n );\n }\n\n /**\n * @inheritdoc\n */\n public transform(value: number | string, digitsInfo?: string, locale?: string): string | null;\n public transform(value: null | undefined, digitsInfo?: string, locale?: string): null;\n public transform(value: number | string | null | undefined, digitsInfo?: string, locale?: string): string | null {\n return super.transform(value, digitsInfo, locale || this.localizationService.getCurrentLanguage());\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import {\n Directionality,\n} from '@angular/cdk/bidi';\nimport {\n Inject,\n Injectable,\n Renderer2,\n RendererFactory2,\n} from '@angular/core';\nimport {\n LangChangeEvent,\n TranslateService,\n} from '@ngx-translate/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\n/**\n * Service for handling the text direction based on the LocalizationConfiguration\n */\n@Injectable()\nexport class TextDirectionService {\n private subscription?: Subscription;\n private readonly renderer: Renderer2;\n\n constructor(\n private readonly translateService: TranslateService,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly configuration: LocalizationConfiguration,\n private readonly rendererFactory: RendererFactory2,\n private readonly directionality: Directionality) {\n this.renderer = this.rendererFactory.createRenderer(null, null);\n }\n\n /**\n * Updates the dir attribute on body HTML tag.\n * @returns a subscription that updates the dir attribute\n */\n public onLangChangeSubscription() {\n if (this.subscription && !this.subscription.closed) {\n return this.subscription;\n }\n this.subscription = this.translateService.onLangChange.subscribe((event: LangChangeEvent) => {\n const direction = this.configuration.rtlLanguages.includes(event.lang.split('-')[0]) ? 'rtl' : 'ltr';\n this.renderer.setAttribute(document.body, 'dir', direction);\n this.directionality.change.emit(direction);\n });\n return this.subscription;\n }\n}\n","import {\n DIR_DOCUMENT,\n Direction,\n Directionality,\n} from '@angular/cdk/bidi';\nimport {\n Inject,\n Injectable,\n OnDestroy,\n Optional,\n} from '@angular/core';\nimport {\n startWith,\n} from 'rxjs/operators';\n\n@Injectable()\nexport class TextDirectionality extends Directionality implements OnDestroy {\n /**\n * The current 'ltr' or 'rtl' value.\n * @override\n */\n public value!: Direction;\n\n constructor(@Optional() @Inject(DIR_DOCUMENT) _document?: any) {\n super(_document);\n this.change\n .pipe(startWith(this.value))\n .subscribe((value: Direction) => this.value = value);\n }\n\n public ngOnDestroy() {\n this.change.complete();\n }\n}\n","import {\n BidiModule,\n Directionality,\n} from '@angular/cdk/bidi';\nimport {\n CommonModule,\n CurrencyPipe,\n DatePipe,\n DecimalPipe,\n} from '@angular/common';\nimport {\n InjectionToken,\n LOCALE_ID,\n ModuleWithProviders,\n NgModule,\n Optional,\n} from '@angular/core';\nimport {\n TranslateModule,\n} from '@ngx-translate/core';\nimport {\n DynamicContentModule,\n} from '@o3r/dynamic-content';\nimport {\n DEFAULT_LOCALIZATION_CONFIGURATION,\n LocalizationConfiguration,\n} from '../core';\nimport {\n LocalizationTranslateDirective,\n} from './localization-translate.directive';\nimport {\n O3rLocalizationTranslatePipe,\n} from './localization-translate.pipe';\nimport {\n LocalizationService,\n} from './localization.service';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\nimport {\n LocalizedCurrencyPipe,\n} from './localized-currency.pipe';\nimport {\n LocalizedDatePipe,\n} from './localized-date.pipe';\nimport {\n LocalizedDecimalPipe,\n} from './localized-decimal.pipe';\nimport {\n TextDirectionService,\n} from './text-direction.service';\nimport {\n TextDirectionality,\n} from './text-directionality.service';\n\n/**\n * creates LocalizationConfiguration, which is used if the application\n * @param configuration Localization configuration\n */\nexport function createLocalizationConfiguration(configuration?: Partial<LocalizationConfiguration>): LocalizationConfiguration {\n return {\n ...DEFAULT_LOCALIZATION_CONFIGURATION,\n ...configuration\n };\n}\n\n/**\n * Factory to inject the LOCALE_ID token with the current language into Angular context\n * @param localizationService Localization service\n */\nexport function localeIdNgBridge(localizationService: LocalizationService) {\n return localizationService.getCurrentLanguage();\n}\n\n/** Custom Localization Configuration Token to override default localization configuration */\nexport const CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN = new InjectionToken<Partial<LocalizationConfiguration>>('Partial Localization configuration');\n\n@NgModule({\n declarations: [O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],\n imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule],\n exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],\n providers: [\n { provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] },\n { provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] },\n { provide: Directionality, useClass: TextDirectionality },\n { provide: DatePipe, useClass: LocalizedDatePipe },\n { provide: DecimalPipe, useClass: LocalizedDecimalPipe },\n { provide: CurrencyPipe, useClass: LocalizedCurrencyPipe },\n TextDirectionService\n ]\n})\nexport class LocalizationModule {\n /**\n * forRoot method should be called only once from the application index.ts\n * It will do several things:\n * - provide the configuration for the whole application\n * - register all locales specified in the LocalizationConfiguration\n * - configure TranslateService\n * - inject LOCALE_ID token\n * @param configuration LocalizationConfiguration\n */\n public static forRoot(\n configuration?: () => Partial<LocalizationConfiguration>\n ): ModuleWithProviders<LocalizationModule> {\n return {\n ngModule: LocalizationModule,\n providers: [\n LocalizationService,\n ...(configuration\n ? [{\n provide: CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN,\n useFactory: configuration\n }]\n : [])\n ]\n };\n }\n}\n","import {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n TranslateLoader,\n} from '@ngx-translate/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n combineLatest,\n from,\n Observable,\n of,\n} from 'rxjs';\nimport {\n catchError,\n map,\n switchMap,\n} from 'rxjs/operators';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\n\nconst JSON_EXT = '.json';\n\n/**\n * This class is responsible for loading translation bundles from remote or local endpoints depending on the LocalizationConfiguration.\n * Fallback mechanism ensures that if a bundle in some language cannot be fetched remotely\n * we try to fetch the same language bundle locally (bundles stored inside the application)\n * and finally load the fallback language bundle (if all previous fetches failed)\n */\n@Injectable()\nexport class TranslationsLoader implements TranslateLoader {\n constructor(@Inject(LOCALIZATION_CONFIGURATION_TOKEN) private readonly localizationConfiguration: LocalizationConfiguration,\n @Optional() private readonly logger?: LoggerService,\n @Optional() private readonly dynamicContentService?: DynamicContentService) {}\n\n /**\n * Download a language bundle file\n * @param url Url to the bundle file\n */\n private downloadLanguageBundle$(url: string) {\n const queryParams = this.localizationConfiguration.queryParams;\n\n let queryString = '';\n if (queryParams) {\n queryString = '?' + Object.keys(queryParams).map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(queryParams[key])).join('&');\n }\n return from(fetch(url + queryString, this.localizationConfiguration.fetchOptions)).pipe(\n switchMap((response) => from(response.json()))\n );\n }\n\n /**\n * @inheritdoc\n */\n public getTranslation(lang: string): Observable<any> {\n const fallback = this.localizationConfiguration.fallbackLanguage;\n let localizationPath$ = of(this.localizationConfiguration.endPointUrl);\n\n if (this.localizationConfiguration.useDynamicContent) {\n if (!this.dynamicContentService) {\n throw new Error('Dynamic Content is not available. Please verify you have imported the module DynamicContentModule in your application');\n }\n localizationPath$ = this.dynamicContentService.getContentPathStream(this.localizationConfiguration.endPointUrl);\n }\n\n return localizationPath$.pipe(\n switchMap((localizationPath: string) => {\n if (localizationPath) {\n const localizationBundle$ = this.downloadLanguageBundle$(localizationPath + lang + JSON_EXT);\n\n if (this.localizationConfiguration.mergeWithLocalTranslations) {\n return combineLatest([\n localizationBundle$.pipe(catchError(() => of({}))),\n this.getTranslationFromLocal(lang, fallback).pipe(\n map((translations) => {\n Object.keys(translations).forEach((key) => translations[key] = `[local] ${translations[key] as string}`);\n return translations;\n })\n )\n ]).pipe(map(([dynamicTranslations, localTranslations]) => ({ ...localTranslations, ...dynamicTranslations })));\n }\n\n /*\n * if endPointUrl is specified by the configuration then:\n * 1. try to load lang from endPointUrl\n * 2. if 1 fails then try to load from the app (local file)\n */\n return localizationBundle$.pipe(\n catchError(() => {\n this.logger?.warn(`Failed to load the localization resource from ${localizationPath + lang + JSON_EXT}, trying from the application resources`);\n return this.getTranslationFromLocal(lang, fallback);\n })\n );\n }\n /*\n * else if endPointUrl NOT specified by then configuration then:\n * 1. try to load from the app (local file)\n */\n this.logger?.warn('No localization endpoint specified, localization fetch from application resources');\n return this.getTranslationFromLocal(lang, fallback);\n })\n );\n }\n\n /**\n *\n *Fetches localization bundles from published folder (internal to application)\n *\n *1. try to load lang from local\n *2. if 1 fails try to load fallback lang but only if it's different from lang in 1\n * @param lang - language of the bundle\n * @param fallbackLanguage - fallback language in case bundle in language not found\n */\n public getTranslationFromLocal(lang: string, fallbackLanguage: string): Observable<any> {\n const pathPrefix: string = this.localizationConfiguration.bundlesOutputPath;\n return this.downloadLanguageBundle$(pathPrefix + lang + JSON_EXT).pipe(\n catchError(() => {\n if (lang === fallbackLanguage) {\n this.logger?.warn(`Failed to load ${lang} from ${pathPrefix + lang + JSON_EXT}.`);\n return of({});\n } else {\n this.logger?.warn(`Failed to load ${lang} from ${pathPrefix + lang + JSON_EXT}. Application will fallback to ${fallbackLanguage}`);\n return this.downloadLanguageBundle$(pathPrefix + fallbackLanguage + JSON_EXT).pipe(\n catchError(() => of({}))\n );\n }\n })\n );\n }\n}\n","import {\n FactoryProvider,\n Optional,\n} from '@angular/core';\nimport {\n TranslateLoader,\n} from '@ngx-translate/core';\nimport {\n DynamicContentService,\n} from '@o3r/dynamic-content';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n LocalizationConfiguration,\n} from '../core';\nimport {\n LOCALIZATION_CONFIGURATION_TOKEN,\n} from './localization.token';\nimport {\n TranslationsLoader,\n} from './translations-loader';\n\n/**\n * Creates a loader of translations bundles based on the configuration\n * (endPointUrl and language determine which bundle we load and where do we fetch it from)\n * @param localizationConfiguration\n * @param logger service to handle the log of warning and errors\n * @param dynamicContentService (optional)\n */\nexport function createTranslateLoader(localizationConfiguration: LocalizationConfiguration, logger?: LoggerService, dynamicContentService?: DynamicContentService) {\n return new TranslationsLoader(localizationConfiguration, logger, dynamicContentService);\n}\n\n/**\n * TranslateLoader provider, using framework's TranslationsLoader class\n */\nexport const translateLoaderProvider: Readonly<FactoryProvider> = {\n provide: TranslateLoader,\n useFactory: createTranslateLoader,\n deps: [LOCALIZATION_CONFIGURATION_TOKEN, [new Optional(), LoggerService], [new Optional(), DynamicContentService]]\n} as const;\n","import {\n ApplicationRef,\n Injectable,\n} from '@angular/core';\nimport {\n TranslateCompiler,\n} from '@ngx-translate/core';\nimport {\n firstValueFrom,\n lastValueFrom,\n Subscription,\n} from 'rxjs';\nimport type {\n TranslateMessageFormatLazyCompiler,\n} from '../core';\nimport {\n LocalizationService,\n} from '../tools';\n\n@Injectable()\nexport class OtterLocalizationDevtools {\n constructor(\n private readonly localizationService: LocalizationService,\n private readonly translateCompiler: TranslateCompiler,\n private readonly appRef: ApplicationRef\n ) {}\n\n /**\n * Is the translation deactivation enabled\n */\n public isTranslationDeactivationEnabled() {\n return this.localizationService.isTranslationDeactivationEnabled();\n }\n\n /**\n * Show localization keys\n * @param value value enforced by the DevTools extension\n */\n public showLocalizationKeys(value?: boolean): void {\n this.localizationService.toggleShowKeys(value);\n this.appRef.tick();\n }\n\n /**\n * Returns the current language\n */\n public getCurrentLanguage() {\n return this.localizationService.getCurrentLanguage();\n }\n\n /**\n * Setup a listener on language change\n * @param fn called when the language is changed in the app\n */\n public onLanguageChange(fn: (language: string) => any): Subscription {\n return this.localizationService\n .getTranslateService()\n .onLangChange\n .subscribe(({ lang }) => {\n fn(lang);\n });\n }\n\n /**\n * Switch the current language to the specified value\n * @param language new language to switch to\n */\n public async switchLanguage(language: string | undefined) {\n if (!language) {\n return;\n }\n await lastValueFrom(this.localizationService.useLanguage(language));\n this.appRef.tick();\n }\n\n /**\n * Updates the specified localization key/values for the current language.\n *\n * Recommendation: To be used with a small number of keys to update to avoid performance issues.\n * @param keyValues key/values to update\n * @param language if not provided, the current language value\n */\n public async updateLocalizationKeys(keyValues: { [key: string]: string }, language?: string) {\n const lang = language || this.getCurrentLanguage();\n const translateService = this.localizationService.getTranslateService();\n await firstValueFrom(translateService.getTranslation(lang));\n Object.entries(keyValues).forEach(([key, value]) => {\n translateService.set(key, value, lang);\n });\n this.appRef.tick();\n }\n\n /**\n * Reload a language from the language file\n * @see https://github.com/ngx-translate/core/blob/master/packages/core/lib/translate.service.ts#L490\n * @param language language to reload\n */\n public async reloadLocalizationKeys(language?: string) {\n const lang = language || this.getCurrentLanguage();\n if ((this.translateCompiler as TranslateMessageFormatLazyCompiler).clearCache) {\n (this.translateCompiler as TranslateMessageFormatLazyCompiler).clearCache();\n }\n const initialLocs = await lastValueFrom(\n this.localizationService\n .getTranslateService()\n .reloadLang(lang)\n );\n this.localizationService.getTranslateService().setTranslation(\n language || this.getCurrentLanguage(),\n initialLocs\n );\n this.appRef.tick();\n }\n}\n","import {\n InjectionToken,\n} from '@angular/core';\nimport {\n LocalizationDevtoolsServiceOptions,\n} from './localization-devkit.interface';\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS: Readonly<LocalizationDevtoolsServiceOptions> = {\n isActivatedOnBootstrap: false,\n isActivatedOnBootstrapWhenCMSContext: true,\n metadataFilePath: './metadata/localisation.metadata.json'\n} as const;\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_OPTIONS = new InjectionToken<LocalizationDevtoolsServiceOptions>('Otter Localization Devtools options');\n","/* eslint-disable no-console -- This is the purpose of this service */\nimport {\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport type {\n ContextualizationDataset,\n DevtoolsServiceInterface,\n WindowWithDevtools,\n} from '@o3r/core';\nimport {\n Subscription,\n} from 'rxjs';\nimport {\n LocalizationContextualizationDevtools,\n LocalizationDevtoolsServiceOptions,\n} from './localization-devkit.interface';\nimport {\n OtterLocalizationDevtools,\n} from './localization-devtools.service';\nimport {\n OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_LOCALIZATION_DEVTOOLS_OPTIONS,\n} from './localization-devtools.token';\n\n@Injectable()\nexport class LocalizationDevtoolsConsoleService implements DevtoolsServiceInterface, LocalizationContextualizationDevtools {\n /** Name of the Window property to access to the devtools */\n public static readonly windowModuleName = 'localization';\n\n constructor(\n private readonly localizationDevtools: OtterLocalizationDevtools,\n @Optional() @Inject(OTTER_LOCALIZATION_DEVTOOLS_OPTIONS) private readonly options: LocalizationDevtoolsServiceOptions = OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS\n ) {\n if (\n this.options.isActivatedOnBootstrap\n || (\n this.options.isActivatedOnBootstrapWhenCMSContext\n && (document.body.dataset as ContextualizationDataset).cmscontext === 'true'\n )\n ) {\n this.activate();\n }\n }\n\n /** @inheritDoc */\n public activate() {\n const windowWithDevtools: WindowWithDevtools = window;\n\n windowWithDevtools._OTTER_DEVTOOLS_ ||= {};\n\n windowWithDevtools._OTTER_DEVTOOLS_[LocalizationDevtoolsConsoleService.windowModuleName] = this;\n\n console.info(`Otter localization Devtools is now accessible via the _OTTER_DEVTOOLS_.${LocalizationDevtoolsConsoleService.windowModuleName} variable`);\n }\n\n /**\n * @inheritdoc\n */\n public isTranslationDeactivationEnabled(): boolean | Promise<boolean> {\n return this.localizationDevtools.isTranslationDeactivationEnabled();\n }\n\n /**\n * @inheritdoc\n */\n public showLocalizationKeys(value?: boolean): void | Promise<void> {\n this.localizationDevtools.showLocalizationKeys(value);\n }\n\n /**\n * @inheritdoc\n */\n public getCurrentLanguage(): string | Promise<string> {\n const currentLanguage = this.localizationDevtools.getCurrentLanguage();\n return currentLanguage;\n }\n\n /**\n * @inheritdoc\n */\n public async switchLanguage(language: string): Promise<{ previous: string; requested: string; current: string }> {\n const previous = this.localizationDevtools.getCurrentLanguage();\n await this.localizationDevtools.switchLanguage(language);\n const current = this.localizationDevtools.getCurrentLanguage();\n return {\n requested: language,\n previous,\n current\n };\n }\n\n /**\n * @inheritdoc\n */\n public onLanguageChange(fn: (language: string) => any): Subscription {\n return this.localizationDevtools.onLanguageChange(fn);\n }\n\n /**\n * @inheritdoc\n */\n public updateLocalizationKeys(keyValues: { [key: string]: string }, language?: string): void | Promise<void> {\n return this.localizationDevtools.updateLocalizationKeys(keyValues, language);\n }\n\n /**\n * @inheritdoc\n */\n public reloadLocalizationKeys(language?: string) {\n return this.localizationDevtools.reloadLocalizationKeys(language);\n }\n}\n","import {\n DestroyRef,\n inject,\n Inject,\n Injectable,\n Optional,\n} from '@angular/core';\nimport {\n takeUntilDestroyed,\n} from '@angular/core/rxjs-interop';\nimport {\n filterMessageContent,\n sendOtterMessage,\n} from '@o3r/core';\nimport {\n LoggerService,\n} from '@o3r/logger';\nimport {\n firstValueFrom,\n fromEvent,\n} from 'rxjs';\nimport {\n LocalizationService,\n} from '../tools';\nimport {\n type AvailableLocalizationMessageContents,\n LocalizationDevtoolsServiceOptions,\n type LocalizationMessageDataTypes,\n} from './localization-devkit.interface';\nimport {\n OtterLocalizationDevtools,\n} from './localization-devtools.service';\nimport {\n OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_LOCALIZATION_DEVTOOLS_OPTIONS,\n} from './localization-devtools.token';\n\nconst isLocalizationMessage = (message: any): message is AvailableLocalizationMessageContents => {\n return message && (\n message.dataType === 'displayLocalizationKeys'\n || message.dataType === 'languages'\n || message.dataType === 'switchLanguage'\n || message.dataType === 'localizations'\n || message.dataType === 'updateLocalization'\n || message.dataType === 'requestMessages'\n || message.dataType === 'connect'\n || message.dataType === 'reloadLocalizationKeys'\n || message.dataType === 'isTranslationDeactivationEnabled'\n || message.dataType === 'getTranslationValuesContentMessage'\n );\n};\n\n@Injectable()\nexport class LocalizationDevtoolsMessageService {\n private readonly sendMessage = sendOtterMessage<AvailableLocalizationMessageContents>;\n private readonly destroyRef = inject(DestroyRef);\n\n constructor(\n private readonly logger: LoggerService,\n private readonly localizationDevTools: OtterLocalizationDevtools,\n private readonly localizationService: LocalizationService,\n @Optional() @Inject(OTTER_LOCALIZATION_DEVTOOLS_OPTIONS) private readonly options: LocalizationDevtoolsServiceOptions = OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS\n ) {\n this.options = {\n ...OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n ...this.options\n };\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n private async sendLocalizationsMetadata() {\n const metadata = await (await fetch(this.options.metadataFilePath)).json();\n this.sendMessage('localizations', {\n localizations: metadata\n });\n }\n\n /**\n * Function to trigger a re-send a requested messages to the Otter Chrome DevTools extension\n * @param only restricted list of messages to re-send\n */\n private async handleReEmitRequest(only?: LocalizationMessageDataTypes[]) {\n if (!only || only.includes('localizations')) {\n void this.sendLocalizationsMetadata();\n }\n if (!only || only.includes('switchLanguage')) {\n this.sendMessage('switchLanguage', { language: this.localizationDevTools.getCurrentLanguage() });\n }\n if (!only || only.includes('languages')) {\n this.sendMessage('languages', { languages: this.localizationService.getLanguages() });\n }\n if (!only || only.includes('getTranslationValuesContentMessage')) {\n this.sendMessage('getTranslationValuesContentMessage', {\n translations: await firstValueFrom(this.localizationService.getTranslateService().getTranslation(this.localizationService.getCurrentLanguage()))\n });\n }\n if (!only || only.includes('isTranslationDeactivationEnabled')) {\n this.sendMessage('isTranslationDeactivationEnabled', { enabled: this.localizationService.isTranslationDeactivationEnabled() });\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param message Message coming from the Otter Chrome DevTools extension\n */\n private handleEvents(message: AvailableLocalizationMessageContents) {\n this.logger.debug('Message handling by the localization service', message);\n\n switch (message.dataType) {\n case 'connect': {\n this.connectPlugin();\n break;\n }\n case 'displayLocalizationKeys': {\n this.localizationDevTools.showLocalizationKeys(message.toggle);\n break;\n }\n case 'requestMessages': {\n void this.handleReEmitRequest(message.only);\n break;\n }\n case 'switchLanguage': {\n void this.localizationDevTools.switchLanguage(message.language);\n break;\n }\n case 'updateLocalization': {\n void this.localizationDevTools.updateLocalizationKeys({\n [message.key]: message.value\n }, message.lang);\n break;\n }\n case 'reloadLocalizationKeys': {\n void this.localizationDevTools.reloadLocalizationKeys(message.lang);\n break;\n }\n default: {\n this.logger.warn('Message ignored by the localization service', message);\n }\n }\n }\n\n /**\n * Function to connect the plugin to the Otter Chrome DevTools extension\n */\n private connectPlugin() {\n this.logger.debug('Otter DevTools is plugged to localization service of the application');\n }\n\n /** @inheritDoc */\n public activate() {\n fromEvent(window, 'message').pipe(\n takeUntilDestroyed(this.destroyRef),\n filterMessageContent(isLocalizationMessage)\n ).subscribe((e) => this.handleEvents(e));\n }\n}\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport {\n LocalizationModule,\n} from '../tools/index';\nimport type {\n LocalizationDevtoolsServiceOptions,\n} from './localization-devkit.interface';\nimport {\n LocalizationDevtoolsConsoleService,\n} from './localization-devtools.console.service';\nimport {\n LocalizationDevtoolsMessageService,\n} from './localization-devtools.message.service';\nimport {\n OtterLocalizationDevtools,\n} from './localization-devtools.service';\nimport {\n OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS,\n OTTER_LOCALIZATION_DEVTOOLS_OPTIONS,\n} from './localization-devtools.token';\n\n@NgModule({\n imports: [\n LocalizationModule\n ],\n providers: [\n { provide: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, useValue: OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS },\n LocalizationDevtoolsMessageService,\n LocalizationDevtoolsConsoleService,\n OtterLocalizationDevtools\n ]\n})\nexport class LocalizationDevtoolsModule {\n /**\n * Initialize Otter Devtools\n * @param options\n */\n public static instrument(options: Partial<LocalizationDevtoolsServiceOptions>): ModuleWithProviders<LocalizationDevtoolsModule> {\n return {\n ngModule: LocalizationDevtoolsModule,\n providers: [\n { provide: OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, useValue: { ...OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, ...options }, multi: false },\n LocalizationDevtoolsMessageService,\n LocalizationDevtoolsConsoleService,\n OtterLocalizationDevtools\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["actions.setLocalizationOverride","i1","i1.LocalizationService","i2"],"mappings":";;;;;;;;;;;;;;;;;;;AAMA;;;AAGG;AACH;AACM,SAAU,YAAY,CAAC,IAAY,EAAA;AACvC,IAAA,OAAO,CAAC,MAAW,EAAE,GAAW,KAAI;AAClC,QAAA,MAAM,YAAY,GAAG,IAAI,IAAI,CAAI,CAAA,EAAA,GAAG,EAAE;AACtC,QAAA,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC;AAEhC,QAAA,IAAI,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE;AACtB,YAAA,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE;AACjC,gBAAA,GAAG,EAAE,YAAA;AACH,oBAAA,OAAO,IAAI,CAAC,YAAY,CAAC;iBAC1B;gBACD,GAAG,EAAE,UAAqB,KAA8B,EAAA;oBACtD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,YAAY;oBACvD,IAAI,CAAC,YAAY,CAAC,GAAG,OAAO,YAAY,KAAK,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,QAA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AAE,EAAE,KAAK,EAAE,KAAK,EAAE;gBACxI,kCAAkC;gBAClC,kCAAkC;gBAClC;AACD;SACF;;kIAdQ,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA1B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,YATnC,kBAAkB,CAAA,EAAA,CAAA,CAAA;AAST,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,EAP1B,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,mCAAmC,EAAE,QAAQ,EAAE,2CAA2C,EAAE;YACvG,kCAAkC;YAClC,kCAAkC;YAClC;AACD,SAAA,EAAA,OAAA,EAAA,CAPC,kBAAkB,CAAA,EAAA,CAAA,CAAA;;4FAST,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAXtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP;AACD,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,mCAAmC,EAAE,QAAQ,EAAE,2CAA2C,EAAE;wBACvG,kCAAkC;wBAClC,kCAAkC;wBAClC;AACD;AACF,iBAAA;;;AClCD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/localization",
3
- "version": "12.3.0-prerelease.7",
3
+ "version": "12.3.0-prerelease.71",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -44,11 +44,11 @@
44
44
  "@formatjs/intl-numberformat": "^8.0.2",
45
45
  "@ngrx/store": "^19.0.0",
46
46
  "@ngx-translate/core": "~16.0.4",
47
- "@o3r/core": "^12.3.0-prerelease.7",
48
- "@o3r/dynamic-content": "^12.3.0-prerelease.7",
49
- "@o3r/extractors": "^12.3.0-prerelease.7",
50
- "@o3r/logger": "^12.3.0-prerelease.7",
51
- "@o3r/schematics": "^12.3.0-prerelease.7",
47
+ "@o3r/core": "^12.3.0-prerelease.71",
48
+ "@o3r/dynamic-content": "^12.3.0-prerelease.71",
49
+ "@o3r/extractors": "^12.3.0-prerelease.71",
50
+ "@o3r/logger": "^12.3.0-prerelease.71",
51
+ "@o3r/schematics": "^12.3.0-prerelease.71",
52
52
  "@schematics/angular": "^19.0.0",
53
53
  "@yarnpkg/cli": "^4.3.1",
54
54
  "@yarnpkg/core": "^4.1.1",
@@ -115,6 +115,7 @@
115
115
  }
116
116
  },
117
117
  "dependencies": {
118
+ "@o3r/schematics": "^12.3.0-prerelease.71",
118
119
  "tslib": "^2.6.2"
119
120
  },
120
121
  "engines": {
@@ -2,7 +2,7 @@ import type { SchematicOptionObject } from '@o3r/schematics';
2
2
  export interface NgAddLocalizationKeySchematicsSchema extends SchematicOptionObject {
3
3
  /** Path to the component */
4
4
  path: string;
5
- /** Skip the linter process */
5
+ /** Skip the linter process which includes the run of EsLint and EditorConfig rules */
6
6
  skipLinter: boolean;
7
7
  /** Localization key without the component prefix */
8
8
  key: string;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/add-localization-key/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oCAAqC,SAAQ,qBAAqB;IACjF,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IAEZ,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IAEd,0BAA0B;IAC1B,UAAU,EAAE,OAAO,CAAC;IAEpB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/add-localization-key/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oCAAqC,SAAQ,qBAAqB;IACjF,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IAEpB,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IAEZ,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IAEd,0BAA0B;IAC1B,UAAU,EAAE,OAAO,CAAC;IAEpB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC"}
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "skipLinter": {
12
12
  "type": "boolean",
13
- "description": "Skip the linter process",
13
+ "description": "Skip the linter process which includes EsLint and EditorConfig rules applying",
14
14
  "default": false
15
15
  },
16
16
  "key": {
@@ -4,7 +4,7 @@ export interface NgAddLocalizationSchematicsSchema extends SchematicOptionObject
4
4
  path: string;
5
5
  /** Path to spec file of the component */
6
6
  specFilePath?: string | undefined;
7
- /** Skip the linter process */
7
+ /** Skip the linter process which includes the run of EsLint and EditorConfig rules */
8
8
  skipLinter: boolean;
9
9
  /** Determine if the dummy localization should be generated */
10
10
  activateDummy: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/localization-to-component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,iCAAkC,SAAQ,qBAAqB;IAC9E,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IAEpB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAC;CACxB"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/localization-to-component/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,iCAAkC,SAAQ,qBAAqB;IAC9E,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IAEpB,8DAA8D;IAC9D,aAAa,EAAE,OAAO,CAAC;CACxB"}
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "skipLinter": {
17
17
  "type": "boolean",
18
- "description": "Skip the linter process",
18
+ "description": "Skip the linter process which includes EsLint and EditorConfig rules applying",
19
19
  "default": false
20
20
  },
21
21
  "activateDummy": {
@@ -4,5 +4,5 @@ import type { NgAddSchematicsSchema } from '../schema';
4
4
  * Register Devtools to the application
5
5
  * @param options
6
6
  */
7
- export declare const registerDevtools: (options: NgAddSchematicsSchema) => Promise<Rule>;
7
+ export declare const registerDevtools: (options: NgAddSchematicsSchema) => Rule;
8
8
  //# sourceMappingURL=devtools-registration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAOnB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAU,SAAS,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAgBnF,CAAC"}
1
+ {"version":3,"file":"devtools-registration.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/helpers/devtools-registration.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAOnB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,SAAS,qBAAqB,KAAG,IAejE,CAAC"}
@@ -4,6 +4,7 @@ exports.registerDevtools = void 0;
4
4
  const node_fs_1 = require("node:fs");
5
5
  const path = require("node:path");
6
6
  const schematics_1 = require("@angular-devkit/schematics");
7
+ const schematics_2 = require("@o3r/schematics");
7
8
  const DEVTOOL_MODULE_NAME = 'LocalizationDevtoolsModule';
8
9
  const MESSAGE_DEVTOOL_SERVICE_NAME = 'LocalizationDevtoolsMessageService';
9
10
  const CONSOLE_DEVTOOL_SERVICE_NAME = 'LocalizationDevtoolsConsoleService';
@@ -12,16 +13,15 @@ const PACKAGE_NAME = JSON.parse((0, node_fs_1.readFileSync)(path.resolve(__dirna
12
13
  * Register Devtools to the application
13
14
  * @param options
14
15
  */
15
- const registerDevtools = async (options) => {
16
- const { registerDevtoolsToApplication } = await Promise.resolve().then(() => require('@o3r/schematics'));
16
+ const registerDevtools = (options) => {
17
17
  return (0, schematics_1.chain)([
18
- registerDevtoolsToApplication({
18
+ (0, schematics_2.registerDevtoolsToApplication)({
19
19
  moduleName: DEVTOOL_MODULE_NAME,
20
20
  packageName: PACKAGE_NAME,
21
21
  serviceName: MESSAGE_DEVTOOL_SERVICE_NAME,
22
22
  projectName: options.projectName
23
23
  }),
24
- registerDevtoolsToApplication({
24
+ (0, schematics_2.registerDevtoolsToApplication)({
25
25
  moduleName: DEVTOOL_MODULE_NAME,
26
26
  packageName: PACKAGE_NAME,
27
27
  serviceName: CONSOLE_DEVTOOL_SERVICE_NAME,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAOpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA4ElB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,KAAG,IAKtD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAmBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AA0DlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
@@ -4,44 +4,38 @@ exports.ngAdd = void 0;
4
4
  const fs = require("node:fs");
5
5
  const path = require("node:path");
6
6
  const schematics_1 = require("@angular-devkit/schematics");
7
+ const schematics_2 = require("@o3r/schematics");
7
8
  const cms_adapter_1 = require("../cms-adapter");
8
9
  const devtools_registration_1 = require("./helpers/devtools-registration");
9
10
  const dependenciesToInstall = [
10
11
  'chokidar',
11
12
  'globby'
12
13
  ];
13
- const reportMissingSchematicsDep = (logger) => (reason) => {
14
- logger.error(`[ERROR]: Adding @o3r/localization has failed.
15
- If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the localization package. Please run 'ng add @o3r/core' .
16
- Otherwise, use the error message as guidance.`);
17
- throw reason;
18
- };
19
14
  /**
20
15
  * Add Otter localization to an Angular Project
21
16
  * @param options for the dependencies installations
22
17
  */
23
18
  function ngAddFn(options) {
24
19
  return async (tree, context) => {
25
- const { applyEsLintFix, getPackageInstallConfig, getProjectNewDependenciesTypes, getWorkspaceConfig, setupDependencies, getO3rPeerDeps, getExternalDependenciesVersionRange, registerPackageCollectionSchematics, setupSchematicsParamsForProject } = await Promise.resolve().then(() => require('@o3r/schematics'));
26
20
  const { updateI18n, updateLocalization } = await Promise.resolve().then(() => require('../localization-base'));
27
21
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
28
22
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf8' }));
29
- const depsInfo = getO3rPeerDeps(packageJsonPath);
23
+ const depsInfo = (0, schematics_2.getO3rPeerDeps)(packageJsonPath);
30
24
  context.logger.info(`The package ${depsInfo.packageName} comes with a debug mechanism`);
31
25
  context.logger.info('Get information on https://github.com/AmadeusITGroup/otter/tree/main/docs/localization/LOCALIZATION.md#Debugging');
32
26
  const { NodeDependencyType } = await Promise.resolve().then(() => require('@schematics/angular/utility/dependencies'));
33
- const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined;
27
+ const workspaceProject = options.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
34
28
  const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => {
35
29
  acc[dep] = {
36
30
  inManifest: [{
37
31
  range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`,
38
- types: getProjectNewDependenciesTypes(workspaceProject)
32
+ types: (0, schematics_2.getProjectNewDependenciesTypes)(workspaceProject)
39
33
  }],
40
34
  ngAddOptions: { exactO3rVersion: options.exactO3rVersion }
41
35
  };
42
36
  return acc;
43
- }, getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
44
- Object.entries(getExternalDependenciesVersionRange(dependenciesToInstall, packageJsonPath, context.logger)).forEach(([dep, range]) => {
37
+ }, (0, schematics_2.getPackageInstallConfig)(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion));
38
+ Object.entries((0, schematics_2.getExternalDependenciesVersionRange)(dependenciesToInstall, packageJsonPath, context.logger)).forEach(([dep, range]) => {
45
39
  dependencies[dep] = {
46
40
  inManifest: [{
47
41
  range,
@@ -49,19 +43,19 @@ function ngAddFn(options) {
49
43
  }]
50
44
  };
51
45
  });
52
- const registerDevtoolRule = await (0, devtools_registration_1.registerDevtools)(options);
46
+ const registerDevtoolRule = (0, devtools_registration_1.registerDevtools)(options);
53
47
  return (0, schematics_1.chain)([
54
48
  updateLocalization(options, __dirname),
55
49
  updateI18n(options),
56
- options.skipLinter ? (0, schematics_1.noop)() : applyEsLintFix(),
57
- setupDependencies({
50
+ options.skipLinter ? (0, schematics_1.noop)() : (0, schematics_2.applyEsLintFix)(),
51
+ (0, schematics_2.setupDependencies)({
58
52
  projectName: options.projectName,
59
53
  dependencies,
60
54
  ngAddToRun: depsInfo.o3rPeerDeps
61
55
  }),
62
56
  (0, cms_adapter_1.updateCmsAdapter)(options),
63
- registerPackageCollectionSchematics(packageJson),
64
- setupSchematicsParamsForProject({ '@o3r/core:component*': { useLocalization: true } }, options.projectName),
57
+ (0, schematics_2.registerPackageCollectionSchematics)(packageJson),
58
+ (0, schematics_2.setupSchematicsParamsForProject)({ '@o3r/core:component*': { useLocalization: true } }, options.projectName),
65
59
  registerDevtoolRule
66
60
  ]);
67
61
  };
@@ -70,9 +64,6 @@ function ngAddFn(options) {
70
64
  * Add Otter localization to an Angular Project
71
65
  * @param options for the dependencies installations
72
66
  */
73
- const ngAdd = (options) => async (_, { logger }) => {
74
- const { createOtterSchematic } = await Promise.resolve().then(() => require('@o3r/schematics')).catch(reportMissingSchematicsDep(logger));
75
- return createOtterSchematic(ngAddFn)(options);
76
- };
67
+ const ngAdd = (options) => (0, schematics_2.createOtterSchematic)(ngAddFn)(options);
77
68
  exports.ngAdd = ngAdd;
78
69
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,7 @@ import type { SchematicOptionObject } from '@o3r/schematics';
2
2
  export interface NgAddSchematicsSchema extends SchematicOptionObject {
3
3
  /** Project name */
4
4
  projectName?: string | undefined;
5
- /** Skip the linter process */
5
+ /** Skip the linter process which includes the run of EsLint and EditorConfig rules */
6
6
  skipLinter: boolean;
7
7
  /** Skip the install process */
8
8
  skipInstall: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,8BAA8B;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,+BAA+B;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,sFAAsF;IACtF,UAAU,EAAE,OAAO,CAAC;IACpB,+BAA+B;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "skipLinter": {
15
15
  "type": "boolean",
16
- "description": "Skip the linter process",
16
+ "description": "Skip the linter process which includes EsLint and EditorConfig rules applying",
17
17
  "default": false
18
18
  },
19
19
  "skipInstall": {