@stemy/ngx-utils 11.2.2 → 11.2.3
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/bundles/stemy-ngx-utils.umd.js +10 -1
- package/bundles/stemy-ngx-utils.umd.js.map +1 -1
- package/bundles/stemy-ngx-utils.umd.min.js +1 -1
- package/bundles/stemy-ngx-utils.umd.min.js.map +1 -1
- package/esm2015/ngx-utils/common-types.js +1 -1
- package/esm2015/ngx-utils/services/config.service.js +11 -2
- package/fesm2015/stemy-ngx-utils.js +10 -1
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/ngx-utils/common-types.d.ts +1 -0
- package/package.json +1 -1
- package/stemy-ngx-utils.metadata.json +1 -1
|
@@ -3158,6 +3158,14 @@
|
|
|
3158
3158
|
}
|
|
3159
3159
|
this.baseConfig = baseConfig || {};
|
|
3160
3160
|
this.loadedConfig = Object.assign(!baseUrl ? {} : { baseUrl: baseUrl }, this.baseConfig);
|
|
3161
|
+
try {
|
|
3162
|
+
var url = new URL(this.loadedConfig.baseUrl);
|
|
3163
|
+
var port = url.port && url.port !== "443" && url.port !== "80" ? ":" + url.port : "";
|
|
3164
|
+
this.loadedConfig.baseDomain = url.protocol + "://" + url.hostname + port + "/";
|
|
3165
|
+
}
|
|
3166
|
+
catch (_a) {
|
|
3167
|
+
this.loadedConfig.baseDomain = "/";
|
|
3168
|
+
}
|
|
3161
3169
|
this.scriptParameters = scriptParams || {};
|
|
3162
3170
|
this.loaderFunc = function () {
|
|
3163
3171
|
_this.loader = _this.loader || new Promise(function (resolve, reject) {
|
|
@@ -3218,7 +3226,8 @@
|
|
|
3218
3226
|
var project = !this.loadedConfig ? "" : this.loadedConfig.project;
|
|
3219
3227
|
url = url ? "" + url.replace(/\/+$/, "") + ending : ending;
|
|
3220
3228
|
url = url.replace("[project]", project);
|
|
3221
|
-
|
|
3229
|
+
url = this.universal.isServer && url.startsWith("//") ? "http:" + url : url;
|
|
3230
|
+
return url.startsWith("/") ? this.loadedConfig.baseUrl + url.substr(1) : url;
|
|
3222
3231
|
};
|
|
3223
3232
|
ConfigService.prototype.getConfigValue = function (key) {
|
|
3224
3233
|
return this.loadedConfig[key];
|