@rangertechnologies/fusion-ui 0.1.4 → 0.1.5
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.
|
@@ -314,8 +314,8 @@ var ConfigService = class ConfigService {
|
|
|
314
314
|
http;
|
|
315
315
|
config;
|
|
316
316
|
static runtimeConfig;
|
|
317
|
-
defaultApiUrl = "
|
|
318
|
-
hostContractGlobal = "__FUSION_HOST_RUNTIME_CONTRACT__";
|
|
317
|
+
defaultApiUrl = "https://dev-api.rangerfusion.com";
|
|
318
|
+
static hostContractGlobal = "__FUSION_HOST_RUNTIME_CONTRACT__";
|
|
319
319
|
constructor(http) {
|
|
320
320
|
this.http = http;
|
|
321
321
|
}
|
|
@@ -359,24 +359,38 @@ var ConfigService = class ConfigService {
|
|
|
359
359
|
return ConfigService.runtimeConfig?.serviceConfig?.[key];
|
|
360
360
|
}
|
|
361
361
|
getApiUrl() {
|
|
362
|
+
const hostContract = this.getHostContract();
|
|
363
|
+
if (hostContract?.apiUrl) return hostContract.apiUrl;
|
|
362
364
|
return this.config?.serviceConfig?.apiUrl || this.config?.serviceConfig?.API_URL || this.defaultApiUrl;
|
|
363
365
|
}
|
|
364
366
|
static getApiUrl() {
|
|
367
|
+
const hostContract = ConfigService.getHostContract();
|
|
368
|
+
if (hostContract?.apiUrl) return hostContract.apiUrl;
|
|
365
369
|
const serviceConfig = ConfigService.runtimeConfig?.serviceConfig;
|
|
366
370
|
return serviceConfig?.API_URL || serviceConfig?.apiUrl;
|
|
367
371
|
}
|
|
372
|
+
getAppUrl() {
|
|
373
|
+
const hostContract = this.getHostContract();
|
|
374
|
+
if (hostContract?.appUrl) return hostContract.appUrl;
|
|
375
|
+
return this.config?.serviceConfig?.appUrl || this.config?.serviceConfig?.APP_URL;
|
|
376
|
+
}
|
|
368
377
|
static getAppUrl() {
|
|
378
|
+
const hostContract = ConfigService.getHostContract();
|
|
379
|
+
if (hostContract?.appUrl) return hostContract.appUrl;
|
|
369
380
|
const serviceConfig = ConfigService.runtimeConfig?.serviceConfig;
|
|
370
381
|
return serviceConfig?.APP_URL || serviceConfig?.appUrl;
|
|
371
382
|
}
|
|
372
383
|
isSplitUserBootstrap() {
|
|
373
384
|
return Boolean(this.getServiceConfig("splitUserBootstrap"));
|
|
374
385
|
}
|
|
375
|
-
getHostContract() {
|
|
386
|
+
static getHostContract() {
|
|
376
387
|
if (typeof window === "undefined") return null;
|
|
377
|
-
const contract = window[
|
|
388
|
+
const contract = window[ConfigService.hostContractGlobal];
|
|
378
389
|
return contract?.apiUrl ? contract : null;
|
|
379
390
|
}
|
|
391
|
+
getHostContract() {
|
|
392
|
+
return ConfigService.getHostContract();
|
|
393
|
+
}
|
|
380
394
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
381
395
|
minVersion: "12.0.0",
|
|
382
396
|
version: "22.2.4",
|