@stemy/ngx-utils 11.0.11 → 11.2.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.
- package/bundles/stemy-ngx-utils.umd.js +8 -6
- 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/pipes/reduce.pipe.js +1 -1
- package/esm2015/ngx-utils/services/acl.service.js +2 -2
- package/esm2015/ngx-utils/services/base-http.service.js +6 -4
- package/esm2015/ngx-utils/services/config.service.js +3 -3
- package/fesm2015/stemy-ngx-utils.js +8 -6
- package/fesm2015/stemy-ngx-utils.js.map +1 -1
- package/ngx-utils/pipes/reduce.pipe.d.ts +1 -1
- package/ngx-utils/services/base-http.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2663,7 +2663,7 @@
|
|
|
2663
2663
|
route: this.state.route,
|
|
2664
2664
|
component: this.state.component,
|
|
2665
2665
|
guard: guardType ? this.injector.get(guardType) : null,
|
|
2666
|
-
dirty:
|
|
2666
|
+
dirty: true,
|
|
2667
2667
|
first: true
|
|
2668
2668
|
};
|
|
2669
2669
|
this.components.push(info);
|
|
@@ -2987,11 +2987,12 @@
|
|
|
2987
2987
|
var authKey = "Authorization";
|
|
2988
2988
|
// If an authorization header exists and we still have an Unauthorized response prompt the user to log in again
|
|
2989
2989
|
if (headers.has(authKey) && response.status == 401) {
|
|
2990
|
-
_this.pushFailedRequest(url, options, function () {
|
|
2990
|
+
var pushed = _this.pushFailedRequest(url, options, function () {
|
|
2991
2991
|
options.headers = _this.makeHeaders(options.originalHeaders);
|
|
2992
2992
|
_this.toPromise(url, options, listener).then(resolve, reject);
|
|
2993
2993
|
});
|
|
2994
|
-
|
|
2994
|
+
if (pushed)
|
|
2995
|
+
_this.handleUnauthorizedError(absoluteUrl, options, function () { return reject(response); });
|
|
2995
2996
|
return;
|
|
2996
2997
|
}
|
|
2997
2998
|
reject(response);
|
|
@@ -3001,8 +3002,9 @@
|
|
|
3001
3002
|
};
|
|
3002
3003
|
BaseHttpService.prototype.pushFailedRequest = function (url, options, req) {
|
|
3003
3004
|
if (url.indexOf("tokens") >= 0)
|
|
3004
|
-
return;
|
|
3005
|
+
return false;
|
|
3005
3006
|
BaseHttpService.failedRequests.push(req);
|
|
3007
|
+
return true;
|
|
3006
3008
|
};
|
|
3007
3009
|
BaseHttpService.prototype.checkHeaders = function (headers) {
|
|
3008
3010
|
if (!headers || !headers.cookie || !headers.referer || !headers.host) {
|
|
@@ -3160,6 +3162,7 @@
|
|
|
3160
3162
|
_this.loadJson().then(function (config) {
|
|
3161
3163
|
_this.loadedConfig = config = Object.assign(_this.loadedConfig, config);
|
|
3162
3164
|
_this.prepareConfig(config).then(function (c) {
|
|
3165
|
+
_this.loadedConfig = c;
|
|
3163
3166
|
c.baseUrl = c.baseUrl || "/";
|
|
3164
3167
|
resolve(c);
|
|
3165
3168
|
});
|
|
@@ -3202,8 +3205,7 @@
|
|
|
3202
3205
|
_this.http.get(configUrl).toPromise().then(function (response) {
|
|
3203
3206
|
resolve(response);
|
|
3204
3207
|
}, function () {
|
|
3205
|
-
|
|
3206
|
-
resolve({});
|
|
3208
|
+
reject("Config file not found at: " + configUrl);
|
|
3207
3209
|
});
|
|
3208
3210
|
});
|
|
3209
3211
|
};
|