@o3r/localization 10.0.0-prerelease.46 → 10.0.0-prerelease.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/esm2022/tools/localization-translate.pipe.mjs +18 -6
- package/esm2022/tools/localization.module.mjs +5 -5
- package/fesm2022/o3r-localization.mjs +21 -9
- package/fesm2022/o3r-localization.mjs.map +1 -1
- package/migration.json +10 -0
- package/package.json +6 -6
- package/schematics/add-localization-key/index.js +1 -1
- package/schematics/localization-to-component/index.js +1 -1
- package/schematics/ng-update/v10-0/index.d.ts +6 -0
- package/schematics/ng-update/v10-0/index.d.ts.map +1 -0
- package/schematics/ng-update/v10-0/index.js +30 -0
- package/tools/localization-translate.pipe.d.ts +18 -9
- package/tools/localization-translate.pipe.d.ts.map +1 -1
- package/tools/localization.module.d.ts +1 -1
package/README.md
CHANGED
|
@@ -201,7 +201,7 @@ export class SimpleHeaderPresModule {}
|
|
|
201
201
|
|
|
202
202
|
<!-- using a pipe -->
|
|
203
203
|
|
|
204
|
-
{{ "o3r-simple-header-pres.motto" |
|
|
204
|
+
{{ "o3r-simple-header-pres.motto" | o3rTranslate }} // => this will output Let's shape the future of travel
|
|
205
205
|
<!-- using a directive -->
|
|
206
206
|
|
|
207
207
|
<div [translate]="o3r-simple-header-pres.locWithArg" [translateParams]="{user: 'otter friend'}"> // => this will output Hello, otter friend!
|
|
@@ -214,7 +214,7 @@ export class SimpleHeaderPresModule {}
|
|
|
214
214
|
|
|
215
215
|
<!-- for resource with HTML markup use binding -->
|
|
216
216
|
|
|
217
|
-
<span [innerHTML]="'someKeyWithHtml' |
|
|
217
|
+
<span [innerHTML]="'someKeyWithHtml' | o3rTranslate"></span>
|
|
218
218
|
|
|
219
219
|
```
|
|
220
220
|
|
|
@@ -226,7 +226,7 @@ As a result "**hello bold**" will be printed inside the span element.
|
|
|
226
226
|
|
|
227
227
|
<!-- dynamic resource -->
|
|
228
228
|
|
|
229
|
-
{{ "someBagsAdded" |
|
|
229
|
+
{{ "someBagsAdded" | o3rTranslate:{bags: 5} }} // => will output "You have added 5 bags"
|
|
230
230
|
|
|
231
231
|
```
|
|
232
232
|
|
|
@@ -479,7 +479,7 @@ import {MESSAGE_FORMAT_CONFIG} from 'ngx-translate-messageformat-compiler';
|
|
|
479
479
|
```typescript
|
|
480
480
|
// component html template
|
|
481
481
|
...
|
|
482
|
-
</span> {{translations.nbOfErrors |
|
|
482
|
+
</span> {{translations.nbOfErrors | o3rTranslate: {count: countMessages} }}
|
|
483
483
|
...
|
|
484
484
|
```
|
|
485
485
|
|
|
@@ -504,9 +504,9 @@ Sometimes you may want to display a different resource based on some property va
|
|
|
504
504
|
```typescript
|
|
505
505
|
// in component html
|
|
506
506
|
<ul>
|
|
507
|
-
<li>{{ translations.people |
|
|
508
|
-
<li>{{ translations.people |
|
|
509
|
-
<li>{{ translations.people |
|
|
507
|
+
<li>{{ translations.people | o3rTranslate: { gender: 'female', how: 'influential' } }}</li>
|
|
508
|
+
<li>{{ translations.people | o3rTranslate: { gender: 'male', how: 'funny' } }}</li>
|
|
509
|
+
<li>{{ translations.people | o3rTranslate: { how: 'affectionate' } }}</li>
|
|
510
510
|
</ul>
|
|
511
511
|
```
|
|
512
512
|
|
|
@@ -8,7 +8,7 @@ import * as i2 from "@ngx-translate/core";
|
|
|
8
8
|
/**
|
|
9
9
|
* TranslatePipe class adding debug functionality
|
|
10
10
|
*/
|
|
11
|
-
export class
|
|
11
|
+
export class O3rLocalizationTranslatePipe extends TranslatePipe {
|
|
12
12
|
constructor(localizationService, translateService, changeDetector, localizationConfig) {
|
|
13
13
|
super(translateService, changeDetector);
|
|
14
14
|
this.localizationService = localizationService;
|
|
@@ -58,14 +58,26 @@ export class LocalizationTranslatePipe extends TranslatePipe {
|
|
|
58
58
|
this.onShowKeysChange.unsubscribe();
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
|
62
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type:
|
|
61
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: O3rLocalizationTranslatePipe, deps: [{ token: i1.LocalizationService }, { token: i2.TranslateService }, { token: i0.ChangeDetectorRef }, { token: LOCALIZATION_CONFIGURATION_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
62
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: O3rLocalizationTranslatePipe, name: "o3rTranslate", pure: false }); }
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: O3rLocalizationTranslatePipe, decorators: [{
|
|
65
65
|
type: Pipe,
|
|
66
|
-
args: [{ name: '
|
|
66
|
+
args: [{ name: 'o3rTranslate', pure: false }]
|
|
67
67
|
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.TranslateService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
68
68
|
type: Inject,
|
|
69
69
|
args: [LOCALIZATION_CONFIGURATION_TOKEN]
|
|
70
70
|
}] }] });
|
|
71
|
-
|
|
71
|
+
/**
|
|
72
|
+
* TranslatePipe class adding debug functionality
|
|
73
|
+
* @deprecated please use O3rLocalizationTranslatePipe, will be removed in v12.
|
|
74
|
+
*/
|
|
75
|
+
export class LocalizationTranslatePipe extends O3rLocalizationTranslatePipe {
|
|
76
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationTranslatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
77
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: LocalizationTranslatePipe, name: "translate", pure: false }); }
|
|
78
|
+
}
|
|
79
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationTranslatePipe, decorators: [{
|
|
80
|
+
type: Pipe,
|
|
81
|
+
args: [{ name: 'translate', pure: false }]
|
|
82
|
+
}] });
|
|
83
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxpemF0aW9uLXRyYW5zbGF0ZS5waXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3Rvb2xzL2xvY2FsaXphdGlvbi10cmFuc2xhdGUucGlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDL0UsT0FBTyxFQUFFLGFBQWEsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBR3RFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQzdELE9BQU8sRUFBRSxnQ0FBZ0MsRUFBRSxNQUFNLHNCQUFzQixDQUFDOzs7O0FBRXhFOztHQUVHO0FBRUgsTUFBTSxPQUFPLDRCQUE2QixTQUFRLGFBQWE7SUFzQjdELFlBQStCLG1CQUF3QyxFQUFFLGdCQUFrQyxFQUFxQixjQUFpQyxFQUN4RixrQkFBNkM7UUFDcEgsS0FBSyxDQUFDLGdCQUFnQixFQUFFLGNBQWMsQ0FBQyxDQUFDO1FBR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zLmxvY2FsaXphdGlvbkNvbmZpZy5kZWJ1Z01vZGUpIHtcbiAgICAgICAgcmV0dXJuIGAke3RoaXMubGFzdFJlc29sdmVkS2V5fSAtICR7dmFsdWUgYXMgc3RyaW5nfWA7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcy52YWx1ZTtcbiAgfVxuXG4gIHB1YmxpYyBuZ09uRGVzdHJveSgpIHtcbiAgICBzdXBlci5uZ09uRGVzdHJveSgpO1xuICAgIGlmICh0aGlzLm9uU2hvd0tleXNDaGFuZ2UpIHtcbiAgICAgIHRoaXMub25TaG93S2V5c0NoYW5nZS51bnN1YnNjcmliZSgpO1xuICAgIH1cbiAgfVxufVxuXG4vKipcbiAqIFRyYW5zbGF0ZVBpcGUgY2xhc3MgYWRkaW5nIGRlYnVnIGZ1bmN0aW9uYWxpdHlcbiAqIEBkZXByZWNhdGVkIHBsZWFzZSB1c2UgTzNyTG9jYWxpemF0aW9uVHJhbnNsYXRlUGlwZSwgd2lsbCBiZSByZW1vdmVkIGluIHYxMi5cbiAqL1xuQFBpcGUoe25hbWU6ICd0cmFuc2xhdGUnLCBwdXJlOiBmYWxzZX0pXG5leHBvcnQgY2xhc3MgTG9jYWxpemF0aW9uVHJhbnNsYXRlUGlwZSBleHRlbmRzIE8zckxvY2FsaXphdGlvblRyYW5zbGF0ZVBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHt9XG4iXX0=
|
|
@@ -5,7 +5,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
5
5
|
import { DynamicContentModule } from '@o3r/dynamic-content';
|
|
6
6
|
import { DEFAULT_LOCALIZATION_CONFIGURATION } from '../core';
|
|
7
7
|
import { LocalizationTranslateDirective } from './localization-translate.directive';
|
|
8
|
-
import { LocalizationTranslatePipe } from './localization-translate.pipe';
|
|
8
|
+
import { LocalizationTranslatePipe, O3rLocalizationTranslatePipe } from './localization-translate.pipe';
|
|
9
9
|
import { LocalizationService } from './localization.service';
|
|
10
10
|
import { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';
|
|
11
11
|
import { LocalizedCurrencyPipe } from './localized-currency.pipe';
|
|
@@ -56,7 +56,7 @@ export class LocalizationModule {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
59
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, declarations: [LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule], exports: [TranslateModule, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe] }); }
|
|
59
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, declarations: [O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule], exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe] }); }
|
|
60
60
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, providers: [
|
|
61
61
|
{ provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] },
|
|
62
62
|
{ provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] },
|
|
@@ -70,9 +70,9 @@ export class LocalizationModule {
|
|
|
70
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, decorators: [{
|
|
71
71
|
type: NgModule,
|
|
72
72
|
args: [{
|
|
73
|
-
declarations: [LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
73
|
+
declarations: [O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
74
74
|
imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule],
|
|
75
|
-
exports: [TranslateModule, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
75
|
+
exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
76
76
|
providers: [
|
|
77
77
|
{ provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] },
|
|
78
78
|
{ provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] },
|
|
@@ -84,4 +84,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
84
84
|
]
|
|
85
85
|
}]
|
|
86
86
|
}] });
|
|
87
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
87
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxpemF0aW9uLm1vZHVsZS5qcy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uICAgKi9cbiAgcHVibGljIHN0YXRpYyBmb3JSb290KFxuICAgIGNvbmZpZ3VyYXRpb24/OiAoKSA9PiBQYXJ0aWFsPExvY2FsaXphdGlvbkNvbmZpZ3VyYXRpb24+XG4gICk6IE1vZHVsZVdpdGhQcm92aWRlcnM8TG9jYWxpemF0aW9uTW9kdWxlPiB7XG4gICAgcmV0dXJuIHtcbiAgICAgIG5nTW9kdWxlOiBMb2NhbGl6YXRpb25Nb2R1bGUsXG4gICAgICBwcm92aWRlcnM6IFtcbiAgICAgICAgTG9jYWxpemF0aW9uU2VydmljZSxcbiAgICAgICAgLi4uKGNvbmZpZ3VyYXRpb24gPyBbe1xuICAgICAgICAgIHByb3ZpZGU6IENVU1RPTV9MT0NBTElaQVRJT05fQ09ORklHVVJBVElPTl9UT0tFTixcbiAgICAgICAgICB1c2VGYWN0b3J5OiBjb25maWd1cmF0aW9uXG4gICAgICAgIH1dIDogW10pXG4gICAgICBdXG4gICAgfTtcbiAgfVxufVxuIl19
|
|
@@ -453,7 +453,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
453
453
|
/**
|
|
454
454
|
* TranslatePipe class adding debug functionality
|
|
455
455
|
*/
|
|
456
|
-
class
|
|
456
|
+
class O3rLocalizationTranslatePipe extends TranslatePipe {
|
|
457
457
|
constructor(localizationService, translateService, changeDetector, localizationConfig) {
|
|
458
458
|
super(translateService, changeDetector);
|
|
459
459
|
this.localizationService = localizationService;
|
|
@@ -503,16 +503,28 @@ class LocalizationTranslatePipe extends TranslatePipe {
|
|
|
503
503
|
this.onShowKeysChange.unsubscribe();
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
|
507
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type:
|
|
506
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: O3rLocalizationTranslatePipe, deps: [{ token: LocalizationService }, { token: i2.TranslateService }, { token: i0.ChangeDetectorRef }, { token: LOCALIZATION_CONFIGURATION_TOKEN }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
507
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: O3rLocalizationTranslatePipe, name: "o3rTranslate", pure: false }); }
|
|
508
508
|
}
|
|
509
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type:
|
|
509
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: O3rLocalizationTranslatePipe, decorators: [{
|
|
510
510
|
type: Pipe,
|
|
511
|
-
args: [{ name: '
|
|
511
|
+
args: [{ name: 'o3rTranslate', pure: false }]
|
|
512
512
|
}], ctorParameters: () => [{ type: LocalizationService }, { type: i2.TranslateService }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
513
513
|
type: Inject,
|
|
514
514
|
args: [LOCALIZATION_CONFIGURATION_TOKEN]
|
|
515
515
|
}] }] });
|
|
516
|
+
/**
|
|
517
|
+
* TranslatePipe class adding debug functionality
|
|
518
|
+
* @deprecated please use O3rLocalizationTranslatePipe, will be removed in v12.
|
|
519
|
+
*/
|
|
520
|
+
class LocalizationTranslatePipe extends O3rLocalizationTranslatePipe {
|
|
521
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationTranslatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
522
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: LocalizationTranslatePipe, name: "translate", pure: false }); }
|
|
523
|
+
}
|
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationTranslatePipe, decorators: [{
|
|
525
|
+
type: Pipe,
|
|
526
|
+
args: [{ name: 'translate', pure: false }]
|
|
527
|
+
}] });
|
|
516
528
|
|
|
517
529
|
/**
|
|
518
530
|
* Native angular CurrencyPipe taking the current lang into consideration
|
|
@@ -700,7 +712,7 @@ class LocalizationModule {
|
|
|
700
712
|
};
|
|
701
713
|
}
|
|
702
714
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
703
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, declarations: [LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule], exports: [TranslateModule, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe] }); }
|
|
715
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, declarations: [O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule], exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe] }); }
|
|
704
716
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, providers: [
|
|
705
717
|
{ provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] },
|
|
706
718
|
{ provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] },
|
|
@@ -714,9 +726,9 @@ class LocalizationModule {
|
|
|
714
726
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImport: i0, type: LocalizationModule, decorators: [{
|
|
715
727
|
type: NgModule,
|
|
716
728
|
args: [{
|
|
717
|
-
declarations: [LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
729
|
+
declarations: [O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
718
730
|
imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule],
|
|
719
|
-
exports: [TranslateModule, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
731
|
+
exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],
|
|
720
732
|
providers: [
|
|
721
733
|
{ provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] },
|
|
722
734
|
{ provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] },
|
|
@@ -1087,5 +1099,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.9", ngImpor
|
|
|
1087
1099
|
* Generated bundle index. Do not edit.
|
|
1088
1100
|
*/
|
|
1089
1101
|
|
|
1090
|
-
export { CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN, DEFAULT_LOCALIZATION_CONFIGURATION, LOCALIZATION_CONFIGURATION_TOKEN, LOCALIZATION_OVERRIDE_REDUCER_TOKEN, LOCALIZATION_OVERRIDE_STORE_NAME, Localization, LocalizationDevtoolsConsoleService, LocalizationDevtoolsMessageService, LocalizationDevtoolsModule, LocalizationModule, LocalizationOverrideStoreModule, LocalizationService, LocalizationTranslateDirective, LocalizationTranslatePipe, LocalizedCurrencyPipe, LocalizedDatePipe, LocalizedDecimalPipe, MESSAGE_FORMAT_CONFIG, OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, OtterLocalizationDevtools, TextDirectionService, TextDirectionality, TranslateMessageFormatLazyCompiler, TranslationsLoader, createLocalizationConfiguration, createTranslateLoader, getDefaultLocalizationOverrideReducer, lazyMessageDefaultConfig, localeIdNgBridge, localizationOverrideInitialState, localizationOverrideReducer, localizationOverrideReducerFeatures, localizationOverrideStorageDeserializer, localizationOverrideStorageSync, selectLocalizationOverride, selectLocalizationOverrideState, setLocalizationOverride, translateLoaderProvider };
|
|
1102
|
+
export { CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN, DEFAULT_LOCALIZATION_CONFIGURATION, LOCALIZATION_CONFIGURATION_TOKEN, LOCALIZATION_OVERRIDE_REDUCER_TOKEN, LOCALIZATION_OVERRIDE_STORE_NAME, Localization, LocalizationDevtoolsConsoleService, LocalizationDevtoolsMessageService, LocalizationDevtoolsModule, LocalizationModule, LocalizationOverrideStoreModule, LocalizationService, LocalizationTranslateDirective, LocalizationTranslatePipe, LocalizedCurrencyPipe, LocalizedDatePipe, LocalizedDecimalPipe, MESSAGE_FORMAT_CONFIG, O3rLocalizationTranslatePipe, OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS, OtterLocalizationDevtools, TextDirectionService, TextDirectionality, TranslateMessageFormatLazyCompiler, TranslationsLoader, createLocalizationConfiguration, createTranslateLoader, getDefaultLocalizationOverrideReducer, lazyMessageDefaultConfig, localeIdNgBridge, localizationOverrideInitialState, localizationOverrideReducer, localizationOverrideReducerFeatures, localizationOverrideStorageDeserializer, localizationOverrideStorageSync, selectLocalizationOverride, selectLocalizationOverrideState, setLocalizationOverride, translateLoaderProvider };
|
|
1091
1103
|
//# sourceMappingURL=o3r-localization.mjs.map
|
|
@@ -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 { deepFill, immutablePrimitive, otterComponentInfoPropertyName } from '@o3r/core';\n\n/**\n * Decorator to pass localization url\n * @param _url\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\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: 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};\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { TranslateCompiler } from '@ngx-translate/core';\nimport { IntlMessageFormat, Options } 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: LazyMessageFormatConfig = {\n enableCache: true,\n ignoreTag: true\n};\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\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)\n .reduce<CompiledTranslationMap>(compilingStrategy, {});\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { SetStateActionPayload } from '@o3r/core';\nimport { LocalizationOverrideState } 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 {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';\nimport * as actions from './localization-override.actions';\nimport { LocalizationOverrideState} 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 { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { Action, ActionReducer, StoreModule } from '@ngrx/store';\n\nimport { localizationOverrideReducer } from './localization-override.reducer';\nimport { LOCALIZATION_OVERRIDE_STORE_NAME, LocalizationOverrideState } 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 { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { LOCALIZATION_OVERRIDE_STORE_NAME, LocalizationOverrideState } 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 { Serializer } from '@o3r/core';\nimport { localizationOverrideInitialState } from './localization-override.reducer';\nimport { LocalizationOverrideState } 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 { InjectionToken } from '@angular/core';\nimport { LocalizationConfiguration } from '../core';\n\n/** Localization Configuration Token */\nexport const LOCALIZATION_CONFIGURATION_TOKEN = new InjectionToken<LocalizationConfiguration>('Localization Configuration injection token');\n","/* eslint-disable @typescript-eslint/ban-types */\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { select, Store } from '@ngrx/store';\nimport { TranslateService } from '@ngx-translate/core';\nimport { LoggerService } from '@o3r/logger';\nimport { BehaviorSubject, combineLatest, Observable, of } from 'rxjs';\nimport { distinctUntilChanged, map, shareReplay, switchMap } from 'rxjs/operators';\nimport { LocalizationConfiguration } from '../core/localization.configuration';\nimport { LocalizationOverrideStore, selectLocalizationOverride } from '../stores/index';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } 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\n private readonly localeSplitIdentifier: string = '-';\n\n /**\n * Internal subject that we use to track changes between keys only and translation mode\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\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 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.indexOf(language) === -1) {\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 /**\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\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 * 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\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 ? value : !this.showKeys;\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 if (this.keyMapping$) {\n return this.keyMapping$.pipe(\n map((keyMapping) => keyMapping && keyMapping[requestedKey] || requestedKey),\n distinctUntilChanged()\n );\n } else {\n return of(requestedKey);\n }\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(1)\n );\n }\n}\n","import { ChangeDetectorRef, Directive, ElementRef, Inject, Input } from '@angular/core';\nimport { TranslateDirective, TranslateService } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationConfiguration } from '../core';\nimport { LocalizationService } from './localization.service';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\n/**\n * TranslateDirective class adding debug functionality\n */\n@Directive({\n selector: '[translate],[ngx-translate]'\n})\nexport class LocalizationTranslateDirective extends TranslateDirective {\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 { ChangeDetectorRef, Inject, Pipe, PipeTransform } from '@angular/core';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationConfiguration } from '../core';\nimport { LocalizationService } from './localization.service';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\n/**\n * TranslatePipe class adding debug functionality\n */\n@Pipe({name: 'translate', pure: false})\nexport class LocalizationTranslatePipe extends TranslatePipe implements PipeTransform {\n /**\n * Internal subscription to the LocalizationService showKeys mode changes\n */\n private readonly onShowKeysChange?: Subscription;\n\n /**\n * Internal subscription to the LocalizationService key mapping\n */\n private onKeyChange?: Subscription;\n\n /**\n * Should we display keys instead of translations\n */\n private showKeys = false;\n\n /** last key queried */\n private lastQueryKey?: string;\n\n /** last key resolved */\n private lastResolvedKey?: string;\n\n constructor(private readonly localizationService: LocalizationService, translateService: TranslateService, private readonly changeDetector: ChangeDetectorRef,\n @Inject(LOCALIZATION_CONFIGURATION_TOKEN) private 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\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 }\n}\n","import {CurrencyPipe} from '@angular/common';\nimport {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {LocalizationService} 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})\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 // Expose same signatures as angular CurencyPipe\n // eslint-disable-next-line @typescript-eslint/unified-signatures\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 {DatePipe} from '@angular/common';\nimport {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {LocalizationService} 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})\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 if (this.localizationService.showKeys) {\n return format;\n } else {\n return super.transform(value, format, timezone, locale || this.localizationService.getCurrentLanguage());\n }\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import { DecimalPipe } from '@angular/common';\nimport {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {LocalizationService} 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})\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 { Directionality } from '@angular/cdk/bidi';\nimport { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\nimport { LangChangeEvent, TranslateService } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationConfiguration } from '../core';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } 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.indexOf(event.lang.split('-')[0]) > -1 ? '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 { DIR_DOCUMENT, Direction, Directionality } from '@angular/cdk/bidi';\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { startWith } from 'rxjs/operators';\n\n@Injectable()\nexport class TextDirectionality extends Directionality {\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 { BidiModule, Directionality } from '@angular/cdk/bidi';\nimport { CommonModule, CurrencyPipe, DatePipe, DecimalPipe } from '@angular/common';\nimport { InjectionToken, LOCALE_ID, ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { DynamicContentModule } from '@o3r/dynamic-content';\nimport { DEFAULT_LOCALIZATION_CONFIGURATION, LocalizationConfiguration } from '../core';\nimport { LocalizationTranslateDirective } from './localization-translate.directive';\nimport { LocalizationTranslatePipe } from './localization-translate.pipe';\nimport { LocalizationService } from './localization.service';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\nimport { LocalizedCurrencyPipe } from './localized-currency.pipe';\nimport { LocalizedDatePipe } from './localized-date.pipe';\nimport { LocalizedDecimalPipe } from './localized-decimal.pipe';\nimport { TextDirectionService } from './text-direction.service';\nimport { TextDirectionality } 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: [LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],\n imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule],\n exports: [TranslateModule, LocalizationTranslatePipe, 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 provide: CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN,\n useFactory: configuration\n }] : [])\n ]\n };\n }\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { TranslateLoader } from '@ngx-translate/core';\n\nimport { LocalizationConfiguration } from '../core';\n\nimport { combineLatest, from, Observable, of } from 'rxjs';\nimport { catchError, map, switchMap } from 'rxjs/operators';\n\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\n\nimport { DynamicContentService } from '@o3r/dynamic-content';\nimport { LoggerService } from '@o3r/logger';\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 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\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}. Application will fallback to ${fallbackLanguage}`);\n return this.downloadLanguageBundle$(pathPrefix + fallbackLanguage + JSON_EXT).pipe(\n catchError(() => of({}))\n );\n } else {\n this.logger?.warn(`Failed to load ${lang} from ${pathPrefix + lang + JSON_EXT}.`);\n return of({});\n }\n })\n );\n }\n}\n","import { FactoryProvider, Optional } from '@angular/core';\nimport { TranslateLoader } from '@ngx-translate/core';\nimport { DynamicContentService } from '@o3r/dynamic-content';\nimport { LoggerService } from '@o3r/logger';\nimport { LocalizationConfiguration } from '../core';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\nimport { TranslationsLoader } 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: FactoryProvider = {\n provide: TranslateLoader,\n useFactory: createTranslateLoader,\n deps: [LOCALIZATION_CONFIGURATION_TOKEN, [new Optional(), LoggerService], [new Optional(), DynamicContentService]]\n};\n","import { Injectable } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationService } from '../tools';\n\n@Injectable()\nexport class OtterLocalizationDevtools {\n\n constructor(private readonly localizationService: LocalizationService) {}\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 }\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","import { InjectionToken } from '@angular/core';\nimport { LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS: LocalizationDevtoolsServiceOptions = {\n isActivatedOnBootstrap: false,\n isActivatedOnBootstrapWhenCMSContext: true\n};\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_OPTIONS: InjectionToken<LocalizationDevtoolsServiceOptions> = new InjectionToken<LocalizationDevtoolsServiceOptions>('Otter Localization Devtools options');\n","/* eslint-disable no-console */\nimport { ApplicationRef, Inject, Injectable, Optional } from '@angular/core';\nimport type { ContextualizationDataset, DevtoolsServiceInterface, WindowWithDevtools } from '@o3r/core';\nimport { lastValueFrom, Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { LocalizationService } from '../tools';\nimport { LocalizationContextualizationDevtools, LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\nimport { OtterLocalizationDevtools } from './localization-devtools.service';\nimport { OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS } from './localization-devtools.token';\n\n@Injectable()\nexport class LocalizationDevtoolsConsoleService implements DevtoolsServiceInterface, LocalizationContextualizationDevtools {\n\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 private readonly localizationService: LocalizationService,\n private readonly appRef: ApplicationRef,\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 // eslint-disable-next-line no-underscore-dangle\n windowWithDevtools._OTTER_DEVTOOLS_ ||= {};\n // eslint-disable-next-line no-underscore-dangle\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 showLocalizationKeys(value?: boolean): void | Promise<void> {\n this.localizationDevtools.showLocalizationKeys(value);\n this.appRef.tick();\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 lastValueFrom(this.localizationService.useLanguage(language));\n this.appRef.tick();\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 Object.entries(keyValues).map(([key, value]) => {\n this.localizationService.getTranslateService().set(key, value, language || this.localizationDevtools.getCurrentLanguage());\n });\n this.appRef.tick();\n }\n\n /**\n * @inheritdoc\n */\n public async reloadLocalizationKeys(language?: string) {\n const lang = language || this.localizationDevtools.getCurrentLanguage();\n const initialLocs = await lastValueFrom(\n this.localizationService\n .getTranslateService()\n .reloadLang(lang)\n .pipe(take(1))\n );\n return this.updateLocalizationKeys(initialLocs, lang);\n }\n}\n","import { Inject, Injectable, OnDestroy, Optional } from '@angular/core';\nimport { filterMessageContent } from '@o3r/core';\nimport { LoggerService } from '@o3r/logger';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { AvailableLocalizationMessageContents, LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\nimport { OtterLocalizationDevtools } from './localization-devtools.service';\nimport { OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS } from './localization-devtools.token';\n\nconst isLocalizationMessage = (message: any): message is AvailableLocalizationMessageContents => {\n return message && message.dataType === 'displayLocalizationKeys';\n};\n\n@Injectable()\nexport class LocalizationDevtoolsMessageService implements OnDestroy {\n\n private readonly subscriptions = new Subscription();\n\n constructor(\n private readonly logger: LoggerService,\n private readonly localizationDevTools: OtterLocalizationDevtools,\n @Optional() @Inject(OTTER_LOCALIZATION_DEVTOOLS_OPTIONS) private readonly options: LocalizationDevtoolsServiceOptions = OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS) {\n\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param event Event coming from the Otter Chrome DevTools extension\n * @param message\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 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 this.subscriptions.add(\n fromEvent(window, 'message').pipe(filterMessageContent(isLocalizationMessage)).subscribe((e) => this.handleEvents(e))\n );\n }\n\n /** @inheritDoc */\n public ngOnDestroy() {\n this.subscriptions.unsubscribe();\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { LocalizationModule } from '../tools/index';\nimport type { LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\nimport { LocalizationDevtoolsConsoleService } from './localization-devtools.console.service';\nimport { LocalizationDevtoolsMessageService } from './localization-devtools.message.service';\nimport { OtterLocalizationDevtools } from './localization-devtools.service';\nimport { OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS } 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 /**\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":";;;;;;;;;;;;;;;;;;AAEA;;;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,CAAC;AACvC,QAAA,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAEjC,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,CAAC;iBAC3B;gBACD,GAAG,EAAE,UAAqB,KAA8B,EAAA;oBACtD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC;oBACxD,IAAI,CAAC,YAAY,CAAC,GAAG,OAAO,YAAY,KAAK,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AACrH,oBAAA,IAAI,IAAI,CAAC,8BAA8B,CAAC,EAAE;wBACxC,IAAI,CAAC,8BA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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 { deepFill, immutablePrimitive, otterComponentInfoPropertyName } from '@o3r/core';\n\n/**\n * Decorator to pass localization url\n * @param _url\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\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: 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};\n","import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { TranslateCompiler } from '@ngx-translate/core';\nimport { IntlMessageFormat, Options } 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: LazyMessageFormatConfig = {\n enableCache: true,\n ignoreTag: true\n};\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\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)\n .reduce<CompiledTranslationMap>(compilingStrategy, {});\n }\n}\n","import { createAction, props } from '@ngrx/store';\nimport { SetStateActionPayload } from '@o3r/core';\nimport { LocalizationOverrideState } 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 {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';\nimport * as actions from './localization-override.actions';\nimport { LocalizationOverrideState} 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 { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core';\nimport { Action, ActionReducer, StoreModule } from '@ngrx/store';\n\nimport { localizationOverrideReducer } from './localization-override.reducer';\nimport { LOCALIZATION_OVERRIDE_STORE_NAME, LocalizationOverrideState } 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 { createFeatureSelector, createSelector } from '@ngrx/store';\nimport { LOCALIZATION_OVERRIDE_STORE_NAME, LocalizationOverrideState } 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 { Serializer } from '@o3r/core';\nimport { localizationOverrideInitialState } from './localization-override.reducer';\nimport { LocalizationOverrideState } 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 { InjectionToken } from '@angular/core';\nimport { LocalizationConfiguration } from '../core';\n\n/** Localization Configuration Token */\nexport const LOCALIZATION_CONFIGURATION_TOKEN = new InjectionToken<LocalizationConfiguration>('Localization Configuration injection token');\n","/* eslint-disable @typescript-eslint/ban-types */\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { select, Store } from '@ngrx/store';\nimport { TranslateService } from '@ngx-translate/core';\nimport { LoggerService } from '@o3r/logger';\nimport { BehaviorSubject, combineLatest, Observable, of } from 'rxjs';\nimport { distinctUntilChanged, map, shareReplay, switchMap } from 'rxjs/operators';\nimport { LocalizationConfiguration } from '../core/localization.configuration';\nimport { LocalizationOverrideStore, selectLocalizationOverride } from '../stores/index';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } 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\n private readonly localeSplitIdentifier: string = '-';\n\n /**\n * Internal subject that we use to track changes between keys only and translation mode\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\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 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.indexOf(language) === -1) {\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 /**\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\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 * 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\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 ? value : !this.showKeys;\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 if (this.keyMapping$) {\n return this.keyMapping$.pipe(\n map((keyMapping) => keyMapping && keyMapping[requestedKey] || requestedKey),\n distinctUntilChanged()\n );\n } else {\n return of(requestedKey);\n }\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(1)\n );\n }\n}\n","import { ChangeDetectorRef, Directive, ElementRef, Inject, Input } from '@angular/core';\nimport { TranslateDirective, TranslateService } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationConfiguration } from '../core';\nimport { LocalizationService } from './localization.service';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\n/**\n * TranslateDirective class adding debug functionality\n */\n@Directive({\n selector: '[translate],[ngx-translate]'\n})\nexport class LocalizationTranslateDirective extends TranslateDirective {\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 { ChangeDetectorRef, Inject, Pipe, PipeTransform } from '@angular/core';\nimport { TranslatePipe, TranslateService } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationConfiguration } from '../core';\nimport { LocalizationService } from './localization.service';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\n\n/**\n * TranslatePipe class adding debug functionality\n */\n@Pipe({name: 'o3rTranslate', pure: false})\nexport class O3rLocalizationTranslatePipe extends TranslatePipe implements PipeTransform {\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\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 }\n}\n\n/**\n * TranslatePipe class adding debug functionality\n * @deprecated please use O3rLocalizationTranslatePipe, will be removed in v12.\n */\n@Pipe({name: 'translate', pure: false})\nexport class LocalizationTranslatePipe extends O3rLocalizationTranslatePipe implements PipeTransform {}\n","import {CurrencyPipe} from '@angular/common';\nimport {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {LocalizationService} 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})\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 // Expose same signatures as angular CurencyPipe\n // eslint-disable-next-line @typescript-eslint/unified-signatures\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 {DatePipe} from '@angular/common';\nimport {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {LocalizationService} 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})\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 if (this.localizationService.showKeys) {\n return format;\n } else {\n return super.transform(value, format, timezone, locale || this.localizationService.getCurrentLanguage());\n }\n }\n\n public ngOnDestroy(): void {\n this.onLangChange.unsubscribe();\n }\n}\n","import { DecimalPipe } from '@angular/common';\nimport {ChangeDetectorRef, OnDestroy, Pipe, PipeTransform} from '@angular/core';\nimport {Subscription} from 'rxjs';\nimport {LocalizationService} 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})\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 { Directionality } from '@angular/cdk/bidi';\nimport { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\nimport { LangChangeEvent, TranslateService } from '@ngx-translate/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationConfiguration } from '../core';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } 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.indexOf(event.lang.split('-')[0]) > -1 ? '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 { DIR_DOCUMENT, Direction, Directionality } from '@angular/cdk/bidi';\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { startWith } from 'rxjs/operators';\n\n@Injectable()\nexport class TextDirectionality extends Directionality {\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 { BidiModule, Directionality } from '@angular/cdk/bidi';\nimport { CommonModule, CurrencyPipe, DatePipe, DecimalPipe } from '@angular/common';\nimport { InjectionToken, LOCALE_ID, ModuleWithProviders, NgModule, Optional } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { DynamicContentModule } from '@o3r/dynamic-content';\nimport { DEFAULT_LOCALIZATION_CONFIGURATION, LocalizationConfiguration } from '../core';\nimport { LocalizationTranslateDirective } from './localization-translate.directive';\nimport { LocalizationTranslatePipe, O3rLocalizationTranslatePipe } from './localization-translate.pipe';\nimport { LocalizationService } from './localization.service';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\nimport { LocalizedCurrencyPipe } from './localized-currency.pipe';\nimport { LocalizedDatePipe } from './localized-date.pipe';\nimport { LocalizedDecimalPipe } from './localized-decimal.pipe';\nimport { TextDirectionService } from './text-direction.service';\nimport { TextDirectionality } 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, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe],\n imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule],\n exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslatePipe, 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 provide: CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN,\n useFactory: configuration\n }] : [])\n ]\n };\n }\n}\n","import { Inject, Injectable, Optional } from '@angular/core';\nimport { TranslateLoader } from '@ngx-translate/core';\n\nimport { LocalizationConfiguration } from '../core';\n\nimport { combineLatest, from, Observable, of } from 'rxjs';\nimport { catchError, map, switchMap } from 'rxjs/operators';\n\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\n\nimport { DynamicContentService } from '@o3r/dynamic-content';\nimport { LoggerService } from '@o3r/logger';\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 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\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}. Application will fallback to ${fallbackLanguage}`);\n return this.downloadLanguageBundle$(pathPrefix + fallbackLanguage + JSON_EXT).pipe(\n catchError(() => of({}))\n );\n } else {\n this.logger?.warn(`Failed to load ${lang} from ${pathPrefix + lang + JSON_EXT}.`);\n return of({});\n }\n })\n );\n }\n}\n","import { FactoryProvider, Optional } from '@angular/core';\nimport { TranslateLoader } from '@ngx-translate/core';\nimport { DynamicContentService } from '@o3r/dynamic-content';\nimport { LoggerService } from '@o3r/logger';\nimport { LocalizationConfiguration } from '../core';\nimport { LOCALIZATION_CONFIGURATION_TOKEN } from './localization.token';\nimport { TranslationsLoader } 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: FactoryProvider = {\n provide: TranslateLoader,\n useFactory: createTranslateLoader,\n deps: [LOCALIZATION_CONFIGURATION_TOKEN, [new Optional(), LoggerService], [new Optional(), DynamicContentService]]\n};\n","import { Injectable } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { LocalizationService } from '../tools';\n\n@Injectable()\nexport class OtterLocalizationDevtools {\n\n constructor(private readonly localizationService: LocalizationService) {}\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 }\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","import { InjectionToken } from '@angular/core';\nimport { LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS: LocalizationDevtoolsServiceOptions = {\n isActivatedOnBootstrap: false,\n isActivatedOnBootstrapWhenCMSContext: true\n};\n\nexport const OTTER_LOCALIZATION_DEVTOOLS_OPTIONS: InjectionToken<LocalizationDevtoolsServiceOptions> = new InjectionToken<LocalizationDevtoolsServiceOptions>('Otter Localization Devtools options');\n","/* eslint-disable no-console */\nimport { ApplicationRef, Inject, Injectable, Optional } from '@angular/core';\nimport type { ContextualizationDataset, DevtoolsServiceInterface, WindowWithDevtools } from '@o3r/core';\nimport { lastValueFrom, Subscription } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { LocalizationService } from '../tools';\nimport { LocalizationContextualizationDevtools, LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\nimport { OtterLocalizationDevtools } from './localization-devtools.service';\nimport { OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS } from './localization-devtools.token';\n\n@Injectable()\nexport class LocalizationDevtoolsConsoleService implements DevtoolsServiceInterface, LocalizationContextualizationDevtools {\n\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 private readonly localizationService: LocalizationService,\n private readonly appRef: ApplicationRef,\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 // eslint-disable-next-line no-underscore-dangle\n windowWithDevtools._OTTER_DEVTOOLS_ ||= {};\n // eslint-disable-next-line no-underscore-dangle\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 showLocalizationKeys(value?: boolean): void | Promise<void> {\n this.localizationDevtools.showLocalizationKeys(value);\n this.appRef.tick();\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 lastValueFrom(this.localizationService.useLanguage(language));\n this.appRef.tick();\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 Object.entries(keyValues).map(([key, value]) => {\n this.localizationService.getTranslateService().set(key, value, language || this.localizationDevtools.getCurrentLanguage());\n });\n this.appRef.tick();\n }\n\n /**\n * @inheritdoc\n */\n public async reloadLocalizationKeys(language?: string) {\n const lang = language || this.localizationDevtools.getCurrentLanguage();\n const initialLocs = await lastValueFrom(\n this.localizationService\n .getTranslateService()\n .reloadLang(lang)\n .pipe(take(1))\n );\n return this.updateLocalizationKeys(initialLocs, lang);\n }\n}\n","import { Inject, Injectable, OnDestroy, Optional } from '@angular/core';\nimport { filterMessageContent } from '@o3r/core';\nimport { LoggerService } from '@o3r/logger';\nimport { fromEvent, Subscription } from 'rxjs';\nimport { AvailableLocalizationMessageContents, LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\nimport { OtterLocalizationDevtools } from './localization-devtools.service';\nimport { OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS } from './localization-devtools.token';\n\nconst isLocalizationMessage = (message: any): message is AvailableLocalizationMessageContents => {\n return message && message.dataType === 'displayLocalizationKeys';\n};\n\n@Injectable()\nexport class LocalizationDevtoolsMessageService implements OnDestroy {\n\n private readonly subscriptions = new Subscription();\n\n constructor(\n private readonly logger: LoggerService,\n private readonly localizationDevTools: OtterLocalizationDevtools,\n @Optional() @Inject(OTTER_LOCALIZATION_DEVTOOLS_OPTIONS) private readonly options: LocalizationDevtoolsServiceOptions = OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS) {\n\n if (this.options.isActivatedOnBootstrap) {\n this.activate();\n }\n }\n\n /**\n * Function to handle the incoming messages from Otter Chrome DevTools extension\n * @param event Event coming from the Otter Chrome DevTools extension\n * @param message\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 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 this.subscriptions.add(\n fromEvent(window, 'message').pipe(filterMessageContent(isLocalizationMessage)).subscribe((e) => this.handleEvents(e))\n );\n }\n\n /** @inheritDoc */\n public ngOnDestroy() {\n this.subscriptions.unsubscribe();\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { LocalizationModule } from '../tools/index';\nimport type { LocalizationDevtoolsServiceOptions } from './localization-devkit.interface';\nimport { LocalizationDevtoolsConsoleService } from './localization-devtools.console.service';\nimport { LocalizationDevtoolsMessageService } from './localization-devtools.message.service';\nimport { OtterLocalizationDevtools } from './localization-devtools.service';\nimport { OTTER_LOCALIZATION_DEVTOOLS_DEFAULT_OPTIONS, OTTER_LOCALIZATION_DEVTOOLS_OPTIONS } 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 /**\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":";;;;;;;;;;;;;;;;;;AAEA;;;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,CAAC;AACvC,QAAA,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAEjC,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,CAAC;iBAC3B;gBACD,GAAG,EAAE,UAAqB,KAA8B,EAAA;oBACtD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC;oBACxD,IAAI,CAAC,YAAY,CAAC,GAAG,OAAO,YAAY,KAAK,WAAW,GAAG,kBAAkB,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AACrH,oBAAA,IAAI,IAAI,CAAC,8BAA8B,CAAC,EAAE;wBACxC,IAAI,CAAC,8BAA8B,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;AACxE,qBAAA;iBACF;AACD,gBAAA,UAAU,EAAE,IAAI;AAChB,gBAAA,YAAY,EAAE,IAAI;AACnB,aAAA,CAAC,CA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AAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,kBAAkB;AACnB,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,mCAAmC,EAAE,QAAQ,EAAE,2CAA2C,EAAE;wBACvG,kCAAkC;wBAClC,kCAAkC;wBAClC,yBAAyB;AAC1B,qBAAA;AACF,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
|
package/migration.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular_devkit/schematics/collection-schema.json",
|
|
3
|
+
"schematics": {
|
|
4
|
+
"migration-v10_0": {
|
|
5
|
+
"version": "10.0.0-alpha.0",
|
|
6
|
+
"description": "Updates of the Otter Library to v10.0.*",
|
|
7
|
+
"factory": "./schematics/ng-update/v10-0/index#updateV10_0"
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/localization",
|
|
3
|
-
"version": "10.0.0-prerelease.
|
|
3
|
+
"version": "10.0.0-prerelease.48",
|
|
4
4
|
"description": "This module provides a runtime dynamic language/translation support and debug tools.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"localization",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"@formatjs/intl-numberformat": "^8.0.2",
|
|
41
41
|
"@ngrx/store": "~17.1.0",
|
|
42
42
|
"@ngx-translate/core": "~15.0.0",
|
|
43
|
-
"@o3r/core": "^10.0.0-prerelease.
|
|
44
|
-
"@o3r/dynamic-content": "^10.0.0-prerelease.
|
|
45
|
-
"@o3r/extractors": "^10.0.0-prerelease.
|
|
46
|
-
"@o3r/logger": "^10.0.0-prerelease.
|
|
47
|
-
"@o3r/schematics": "^10.0.0-prerelease.
|
|
43
|
+
"@o3r/core": "^10.0.0-prerelease.48",
|
|
44
|
+
"@o3r/dynamic-content": "^10.0.0-prerelease.48",
|
|
45
|
+
"@o3r/extractors": "^10.0.0-prerelease.48",
|
|
46
|
+
"@o3r/logger": "^10.0.0-prerelease.48",
|
|
47
|
+
"@o3r/schematics": "^10.0.0-prerelease.48",
|
|
48
48
|
"@schematics/angular": "~17.0.0",
|
|
49
49
|
"chokidar": "^3.5.2",
|
|
50
50
|
"intl-messageformat": "~10.5.0",
|
|
@@ -142,7 +142,7 @@ function ngAddLocalizationKeyFn(options) {
|
|
|
142
142
|
const updateTemplateFile = () => {
|
|
143
143
|
const templatePath = templateRelativePath && node_path_1.posix.join((0, node_path_1.dirname)(options.path), templateRelativePath);
|
|
144
144
|
if (templatePath) {
|
|
145
|
-
tree.overwrite(templatePath, tree.readText(templatePath).replaceAll(options.value, `{{ translations.${properties.keyName} |
|
|
145
|
+
tree.overwrite(templatePath, tree.readText(templatePath).replaceAll(options.value, `{{ translations.${properties.keyName} | o3rTranslate }}`));
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
return (0, schematics_1.chain)([
|
|
@@ -130,7 +130,7 @@ function ngAddLocalizationFn(options) {
|
|
|
130
130
|
if (templatePath && tree.exists(templatePath)) {
|
|
131
131
|
tree.commitUpdate(tree
|
|
132
132
|
.beginUpdate(templatePath)
|
|
133
|
-
.insertLeft(0, '<div>Localization: {{ translations.dummyLoc1 |
|
|
133
|
+
.insertLeft(0, '<div>Localization: {{ translations.dummyLoc1 | o3rTranslate }}</div>\n'));
|
|
134
134
|
}
|
|
135
135
|
return tree;
|
|
136
136
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v10-0/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AA0BjF;;GAEG;AACH,eAAO,MAAM,WAAW,4BAAuD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateV10_0 = void 0;
|
|
4
|
+
/* eslint-disable camelcase, @typescript-eslint/naming-convention */
|
|
5
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
+
const schematics_2 = require("@o3r/schematics");
|
|
7
|
+
const pipeReplacementInfo = {
|
|
8
|
+
translate: {
|
|
9
|
+
new: {
|
|
10
|
+
name: 'o3rTranslate'
|
|
11
|
+
},
|
|
12
|
+
import: 'LocalizationModule'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Update of Otter library V10.0
|
|
17
|
+
*/
|
|
18
|
+
function updateV10_0Fn() {
|
|
19
|
+
return (tree, context) => {
|
|
20
|
+
const updateRules = [
|
|
21
|
+
(0, schematics_2.updatePipes)(pipeReplacementInfo)
|
|
22
|
+
];
|
|
23
|
+
return (0, schematics_1.chain)(updateRules)(tree, context);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Update of Otter library V10.0
|
|
28
|
+
*/
|
|
29
|
+
exports.updateV10_0 = (0, schematics_2.createSchematicWithMetricsIfInstalled)(updateV10_0Fn);
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { ChangeDetectorRef, PipeTransform } from '@angular/core';
|
|
2
2
|
import { TranslatePipe, TranslateService } from '@ngx-translate/core';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
3
4
|
import { LocalizationConfiguration } from '../core';
|
|
4
5
|
import { LocalizationService } from './localization.service';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* TranslatePipe class adding debug functionality
|
|
8
9
|
*/
|
|
9
|
-
export declare class
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export declare class O3rLocalizationTranslatePipe extends TranslatePipe implements PipeTransform {
|
|
11
|
+
protected readonly localizationService: LocalizationService;
|
|
12
|
+
protected readonly changeDetector: ChangeDetectorRef;
|
|
13
|
+
protected readonly localizationConfig: LocalizationConfiguration;
|
|
13
14
|
/**
|
|
14
15
|
* Internal subscription to the LocalizationService showKeys mode changes
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
protected readonly onShowKeysChange?: Subscription;
|
|
17
18
|
/**
|
|
18
19
|
* Internal subscription to the LocalizationService key mapping
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
protected onKeyChange?: Subscription;
|
|
21
22
|
/**
|
|
22
23
|
* Should we display keys instead of translations
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
+
protected showKeys: boolean;
|
|
25
26
|
/** last key queried */
|
|
26
|
-
|
|
27
|
+
protected lastQueryKey?: string;
|
|
27
28
|
/** last key resolved */
|
|
28
|
-
|
|
29
|
+
protected lastResolvedKey?: string;
|
|
29
30
|
constructor(localizationService: LocalizationService, translateService: TranslateService, changeDetector: ChangeDetectorRef, localizationConfig: LocalizationConfiguration);
|
|
30
31
|
/**
|
|
31
32
|
* Calls original transform method and eventually outputs the key if debugMode (in LocalizationConfiguration) is enabled
|
|
@@ -33,6 +34,14 @@ export declare class LocalizationTranslatePipe extends TranslatePipe implements
|
|
|
33
34
|
*/
|
|
34
35
|
transform(query: string, ...args: any[]): any;
|
|
35
36
|
ngOnDestroy(): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<O3rLocalizationTranslatePipe, never>;
|
|
38
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<O3rLocalizationTranslatePipe, "o3rTranslate", false>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* TranslatePipe class adding debug functionality
|
|
42
|
+
* @deprecated please use O3rLocalizationTranslatePipe, will be removed in v12.
|
|
43
|
+
*/
|
|
44
|
+
export declare class LocalizationTranslatePipe extends O3rLocalizationTranslatePipe implements PipeTransform {
|
|
36
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationTranslatePipe, never>;
|
|
37
46
|
static ɵpipe: i0.ɵɵPipeDeclaration<LocalizationTranslatePipe, "translate", false>;
|
|
38
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localization-translate.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localization-translate.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgB,aAAa,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"localization-translate.pipe.d.ts","sourceRoot":"","sources":["../../src/tools/localization-translate.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAgB,aAAa,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;;AAG7D;;GAEG;AACH,qBACa,4BAA6B,SAAQ,aAAc,YAAW,aAAa;IAsB1E,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB;IAAsC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,iBAAiB;IAC3G,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB;IAtBtH;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAEnD;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC;IAErC;;OAEG;IACH,SAAS,CAAC,QAAQ,UAAS;IAE3B,uBAAuB;IACvB,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEhC,wBAAwB;IACxB,SAAS,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;gBAEJ,mBAAmB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAqB,cAAc,EAAE,iBAAiB,EACxF,kBAAkB,EAAE,yBAAyB;IAWtH;;;OAGG;IACI,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG;IA8B7C,WAAW;yCApEP,4BAA4B;uCAA5B,4BAA4B;CA0ExC;AAED;;;GAGG;AACH,qBACa,yBAA0B,SAAQ,4BAA6B,YAAW,aAAa;yCAAvF,yBAAyB;uCAAzB,yBAAyB;CAAiE"}
|
|
@@ -35,7 +35,7 @@ export declare class LocalizationModule {
|
|
|
35
35
|
*/
|
|
36
36
|
static forRoot(configuration?: () => Partial<LocalizationConfiguration>): ModuleWithProviders<LocalizationModule>;
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationModule, never>;
|
|
38
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizationModule, [typeof i1.LocalizationTranslatePipe, typeof i2.LocalizationTranslateDirective, typeof i3.LocalizedDatePipe, typeof i4.LocalizedDecimalPipe, typeof i5.LocalizedCurrencyPipe], [typeof i6.TranslateModule, typeof i7.BidiModule, typeof i8.DynamicContentModule, typeof i9.CommonModule], [typeof i6.TranslateModule, typeof i1.LocalizationTranslatePipe, typeof i2.LocalizationTranslateDirective, typeof i3.LocalizedDatePipe, typeof i4.LocalizedDecimalPipe, typeof i5.LocalizedCurrencyPipe]>;
|
|
38
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizationModule, [typeof i1.O3rLocalizationTranslatePipe, typeof i1.LocalizationTranslatePipe, typeof i2.LocalizationTranslateDirective, typeof i3.LocalizedDatePipe, typeof i4.LocalizedDecimalPipe, typeof i5.LocalizedCurrencyPipe], [typeof i6.TranslateModule, typeof i7.BidiModule, typeof i8.DynamicContentModule, typeof i9.CommonModule], [typeof i6.TranslateModule, typeof i1.O3rLocalizationTranslatePipe, typeof i1.LocalizationTranslatePipe, typeof i2.LocalizationTranslateDirective, typeof i3.LocalizedDatePipe, typeof i4.LocalizedDecimalPipe, typeof i5.LocalizedCurrencyPipe]>;
|
|
39
39
|
static ɵinj: i0.ɵɵInjectorDeclaration<LocalizationModule>;
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=localization.module.d.ts.map
|