monkey-front-core 21.0.14 → 21.0.16

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.
@@ -5566,15 +5566,18 @@ class MonkeyEcxI18nResolver {
5566
5566
  this._injector = inject(Injector);
5567
5567
  this._localeId = injectTokenWithWarning(LOCALE_ID, 'LOCALE_ID');
5568
5568
  this._bootstrapService = injectTokenWithWarning(MECX_BOOTSTRAP_SERVICE, 'MECX_BOOTSTRAP_SERVICE');
5569
+ this._i18nPath = injectTokenWithWarning(MECX_I18N_PATH, 'MECX_I18N_PATH');
5570
+ this._i18nAlias = injectTokenWithWarning(MECX_I18N_ALIAS, 'MECX_I18N_ALIAS');
5569
5571
  this._tokenStorageService = inject(MonkeyEcxTokenStorageService);
5570
5572
  // not to do
5571
5573
  }
5572
5574
  resolve() {
5573
5575
  const service = this._injector.get(MonkeyEcxService);
5574
- const path = this._injector.get(MECX_I18N_PATH).toString();
5575
- const alias = this._injector.get(MECX_I18N_ALIAS).toString();
5576
5576
  const locale = this._tokenStorageService.getMe()?.locale || this._localeId;
5577
+ const path = this._i18nPath;
5577
5578
  const host = this.getHost();
5579
+ console.log(this._i18nAlias);
5580
+ console.log(this._i18nPath);
5578
5581
  const url = [host || '', `assets/${path}/i18n/${locale}.json`].join(host ? '/' : '');
5579
5582
  const cacheKey = `${path}/${locale}`;
5580
5583
  const now = Date.now();
@@ -5584,7 +5587,7 @@ class MonkeyEcxI18nResolver {
5584
5587
  }
5585
5588
  return service.get(url).pipe(map((translations) => {
5586
5589
  this._bootstrapService.handleI18N(locale, {
5587
- [alias]: translations.data
5590
+ [this._i18nAlias]: translations.data
5588
5591
  });
5589
5592
  MonkeyEcxI18nResolver._loadedPaths.set(cacheKey, now);
5590
5593
  return true;
@@ -5596,11 +5599,10 @@ class MonkeyEcxI18nResolver {
5596
5599
  return '';
5597
5600
  }
5598
5601
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MonkeyEcxI18nResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5599
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MonkeyEcxI18nResolver, providedIn: 'root' }); }
5602
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MonkeyEcxI18nResolver }); }
5600
5603
  }
5601
5604
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: MonkeyEcxI18nResolver, decorators: [{
5602
- type: Injectable,
5603
- args: [{ providedIn: 'root' }]
5605
+ type: Injectable
5604
5606
  }], ctorParameters: () => [] });
5605
5607
 
5606
5608
  /* eslint-disable no-console */