nuxeo-development-framework 4.2.9 → 4.3.1

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.
@@ -636,6 +636,12 @@
636
636
  args: [{}]
637
637
  }] });
638
638
 
639
+ // export class EnvManager {
640
+ // static environment: Environment = null;
641
+ // static initialize(values: Partial<Environment>): void {
642
+ // this.environment = { ...values };
643
+ // }
644
+ // }
639
645
  var EnvManager = /** @class */ (function () {
640
646
  function EnvManager() {
641
647
  }
@@ -644,7 +650,9 @@
644
650
  };
645
651
  return EnvManager;
646
652
  }());
647
- EnvManager.environment = null;
653
+ EnvManager.environment = null;
654
+ EnvManager.configuration = null;
655
+ EnvManager.conditons = null;
648
656
 
649
657
  var LocalStoragService = /** @class */ (function () {
650
658
  function LocalStoragService() {
@@ -1034,10 +1042,10 @@
1034
1042
  // load my config file from my assets
1035
1043
  AppConfigService.prototype.load = function () {
1036
1044
  var _this = this;
1037
- rxjs.combineLatest([
1038
- this.http.get("assets/configs/configuration.json"),
1039
- this.http.get("assets/configs/conditions.json"),
1040
- ]).subscribe(function (res) {
1045
+ rxjs.iif(function () { return !!EnvManager.conditons; }, rxjs.of([EnvManager.configuration, EnvManager.conditons]), rxjs.combineLatest([
1046
+ this.http.get('assets/configs/configuration.json'),
1047
+ this.http.get('assets/configs/conditions.json')
1048
+ ])).subscribe(function (res) {
1041
1049
  _this.conditons = res[1];
1042
1050
  _this.myConfiguration = res[0];
1043
1051
  _this.configLoaded.next(true);
@@ -1629,11 +1637,13 @@
1629
1637
  if (locale) {
1630
1638
  _this.userLang = locale.split('-')[0];
1631
1639
  }
1632
- if (_this.userLang) {
1633
- _this.loadTranslation(_this.userLang, _this.defaultLang);
1634
- }
1635
- else {
1636
- _this.loadTranslation(_this.defaultLang);
1640
+ if (_this.nuxeoService.nuxeoClient) {
1641
+ if (_this.userLang) {
1642
+ _this.loadTranslation(_this.userLang, _this.defaultLang);
1643
+ }
1644
+ else {
1645
+ _this.loadTranslation(_this.defaultLang);
1646
+ }
1637
1647
  }
1638
1648
  });
1639
1649
  }
@@ -30138,8 +30148,10 @@
30138
30148
  var NuxeoCoreModule = /** @class */ (function () {
30139
30149
  function NuxeoCoreModule() {
30140
30150
  }
30141
- NuxeoCoreModule.register = function (environment) {
30151
+ NuxeoCoreModule.register = function (environment, configuration, conditons) {
30142
30152
  EnvManager.initialize(environment);
30153
+ EnvManager.conditons = conditons;
30154
+ EnvManager.configuration = configuration;
30143
30155
  return {
30144
30156
  ngModule: NuxeoCoreModule,
30145
30157
  providers: [{ provide: 'environment', useValue: environment }]