@osovitny/anatoly 3.21.1 → 3.21.22

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.
@@ -3028,21 +3028,7 @@ class LocalizePipe {
3028
3028
  }]
3029
3029
  }], () => [{ type: LocalizationService }], null); })();
3030
3030
 
3031
- /*
3032
- <file>
3033
- Project:
3034
- @osovitny/anatoly
3035
-
3036
- Authors:
3037
- Vadim Osovitny vadim.osovitny@osovitny.com
3038
-
3039
- Created:
3040
- 12 May 2020
3041
-
3042
- Copyright (c) 2016-2025 Osovitny Inc. All rights reserved.
3043
- </file>
3044
- */
3045
- //Node
3031
+ // This factory is consumed by the root module so lazy feature imports stay in the same translate scope.
3046
3032
  function translateLoaderFactory(httpClient) {
3047
3033
  const prefix = formatAssetsUrl(AssetGroupType.Lib, 'l10n/');
3048
3034
  const suffix = `.json?v=${AppVersion ?? '1.0.0'}`;
@@ -3062,28 +3048,13 @@ class LocalizationModule {
3062
3048
  }
3063
3049
  static { this.ɵfac = function LocalizationModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LocalizationModule)(i0.ɵɵinject(i0.Injector)); }; }
3064
3050
  static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: LocalizationModule }); }
3065
- static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
3066
- TranslateService,
3067
- LocalizationService
3068
- ], imports: [TranslateModule.forRoot({
3069
- loader: {
3070
- provide: TranslateLoader,
3071
- useFactory: translateLoaderFactory,
3072
- deps: [HttpClient]
3073
- }
3074
- }), TranslateModule] }); }
3051
+ static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [TranslateModule, TranslateModule] }); }
3075
3052
  }
3076
3053
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LocalizationModule, [{
3077
3054
  type: NgModule,
3078
3055
  args: [{
3079
3056
  imports: [
3080
- TranslateModule.forRoot({
3081
- loader: {
3082
- provide: TranslateLoader,
3083
- useFactory: translateLoaderFactory,
3084
- deps: [HttpClient]
3085
- }
3086
- })
3057
+ TranslateModule
3087
3058
  ],
3088
3059
  exports: [
3089
3060
  TranslateModule,
@@ -3091,14 +3062,10 @@ class LocalizationModule {
3091
3062
  ],
3092
3063
  declarations: [
3093
3064
  LocalizePipe
3094
- ],
3095
- providers: [
3096
- TranslateService,
3097
- LocalizationService
3098
3065
  ]
3099
3066
  }]
3100
3067
  }], () => [{ type: i0.Injector }], null); })();
3101
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LocalizationModule, { declarations: [LocalizePipe], imports: [i1$3.TranslateModule], exports: [TranslateModule,
3068
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(LocalizationModule, { declarations: [LocalizePipe], imports: [TranslateModule], exports: [TranslateModule,
3102
3069
  LocalizePipe] }); })();
3103
3070
 
3104
3071
  /*
@@ -11558,23 +11525,31 @@ class AnatolyModule {
11558
11525
  static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
11559
11526
  provideHttpClient(),
11560
11527
  provideAppInitializer(() => {
11561
- const appService = inject(AppService);
11562
- return firstValueFrom(appService.loadAppInitializerSettings().pipe(map$1(() => {
11528
+ return (async () => {
11529
+ const appService = inject(AppService);
11530
+ await firstValueFrom(appService.loadAppInitializerSettings());
11563
11531
  //Localization
11564
11532
  const translate = InjectorInstance.get(TranslateService);
11565
11533
  const localizationService = InjectorInstance.get(LocalizationService);
11566
11534
  const lang = localizationService.configureSettings(translate);
11567
- translate.use(lang);
11535
+ await firstValueFrom(translate.use(lang));
11568
11536
  //IAM
11569
11537
  const msalInstance = InjectorInstance.get(MsalService);
11570
11538
  const auth = InjectorInstance.get(AuthService);
11571
11539
  firstValueFrom(msalInstance.initialize()).then(() => {
11572
11540
  auth.init();
11573
11541
  });
11574
- })));
11542
+ })();
11575
11543
  }),
11576
11544
  AppService
11577
11545
  ], imports: [CommonModule,
11546
+ TranslateModule.forRoot({
11547
+ loader: {
11548
+ provide: TranslateLoader,
11549
+ useFactory: translateLoaderFactory,
11550
+ deps: [HttpClient]
11551
+ }
11552
+ }),
11578
11553
  AnatolyCoreModule,
11579
11554
  AnatolyDataModule,
11580
11555
  AnatolyIAMModule,
@@ -11588,6 +11563,13 @@ class AnatolyModule {
11588
11563
  args: [{
11589
11564
  imports: [
11590
11565
  CommonModule,
11566
+ TranslateModule.forRoot({
11567
+ loader: {
11568
+ provide: TranslateLoader,
11569
+ useFactory: translateLoaderFactory,
11570
+ deps: [HttpClient]
11571
+ }
11572
+ }),
11591
11573
  AnatolyCoreModule,
11592
11574
  AnatolyDataModule,
11593
11575
  AnatolyIAMModule,
@@ -11602,27 +11584,27 @@ class AnatolyModule {
11602
11584
  providers: [
11603
11585
  provideHttpClient(),
11604
11586
  provideAppInitializer(() => {
11605
- const appService = inject(AppService);
11606
- return firstValueFrom(appService.loadAppInitializerSettings().pipe(map$1(() => {
11587
+ return (async () => {
11588
+ const appService = inject(AppService);
11589
+ await firstValueFrom(appService.loadAppInitializerSettings());
11607
11590
  //Localization
11608
11591
  const translate = InjectorInstance.get(TranslateService);
11609
11592
  const localizationService = InjectorInstance.get(LocalizationService);
11610
11593
  const lang = localizationService.configureSettings(translate);
11611
- translate.use(lang);
11594
+ await firstValueFrom(translate.use(lang));
11612
11595
  //IAM
11613
11596
  const msalInstance = InjectorInstance.get(MsalService);
11614
11597
  const auth = InjectorInstance.get(AuthService);
11615
11598
  firstValueFrom(msalInstance.initialize()).then(() => {
11616
11599
  auth.init();
11617
11600
  });
11618
- })));
11601
+ })();
11619
11602
  }),
11620
11603
  AppService
11621
11604
  ]
11622
11605
  }]
11623
11606
  }], () => [{ type: i0.Injector }], null); })();
11624
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyModule, { imports: [CommonModule,
11625
- AnatolyCoreModule,
11607
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AnatolyModule, { imports: [CommonModule, i1$3.TranslateModule, AnatolyCoreModule,
11626
11608
  AnatolyDataModule,
11627
11609
  AnatolyIAMModule,
11628
11610
  AnatolyUIModule], exports: [AnatolyCoreModule,