ps-toolkit-ui 1.19.79 → 1.19.80
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/ps-toolkit-ui.umd.js +4 -15
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/request.class.js +7 -6
- package/esm2015/lib/services/config.service.js +2 -9
- package/fesm2015/ps-toolkit-ui.js +6 -13
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/services/config.service.d.ts +1 -5
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -31,26 +31,15 @@
|
|
|
31
31
|
var HighchartsExporting__namespace = /*#__PURE__*/_interopNamespace(HighchartsExporting);
|
|
32
32
|
var HighchartsExportData__namespace = /*#__PURE__*/_interopNamespace(HighchartsExportData);
|
|
33
33
|
|
|
34
|
-
var Config = /** @class */ (function () {
|
|
35
|
-
function Config() {
|
|
36
|
-
}
|
|
37
|
-
return Config;
|
|
38
|
-
}());
|
|
39
|
-
Config.authName = 'Authorization';
|
|
40
34
|
var PsToolkitUiConfigService = /** @class */ (function () {
|
|
41
35
|
function PsToolkitUiConfigService(environment, strings, currentLang, authorizationName) {
|
|
42
|
-
if (authorizationName === void 0) { authorizationName = 'Authorization'; }
|
|
43
36
|
this.environment = environment;
|
|
44
37
|
this.strings = strings;
|
|
45
38
|
this.currentLang = currentLang;
|
|
46
39
|
this.authorizationName = authorizationName;
|
|
47
|
-
console.log('authorizationName', authorizationName);
|
|
48
|
-
Config.authName = authorizationName;
|
|
49
|
-
PsToolkitUiConfigService.instance = this;
|
|
50
40
|
}
|
|
51
41
|
return PsToolkitUiConfigService;
|
|
52
42
|
}());
|
|
53
|
-
PsToolkitUiConfigService.instance = null;
|
|
54
43
|
PsToolkitUiConfigService.ctorParameters = function () { return [
|
|
55
44
|
{ type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
|
|
56
45
|
{ type: undefined, decorators: [{ type: core.Inject, args: ['strings',] }] },
|
|
@@ -1982,16 +1971,16 @@
|
|
|
1982
1971
|
RequestClass.prototype.getClient = function (request, url, method, data, done, fail, timeout) {
|
|
1983
1972
|
var _this = this;
|
|
1984
1973
|
if (timeout === void 0) { timeout = null; }
|
|
1985
|
-
var _a;
|
|
1986
1974
|
var token = HelperClass.getCookie('Authorization');
|
|
1987
1975
|
if (!(data instanceof FormData)) {
|
|
1988
1976
|
data = HelperClass.jsonToFormData(data);
|
|
1989
1977
|
}
|
|
1990
1978
|
var headers = {};
|
|
1991
1979
|
if (token !== null) {
|
|
1992
|
-
var
|
|
1993
|
-
|
|
1994
|
-
|
|
1980
|
+
var config = core.inject(PsToolkitUiConfigService);
|
|
1981
|
+
var authName = config.authorizationName;
|
|
1982
|
+
console.log('Authorization name is:', authName);
|
|
1983
|
+
headers[authName] = token;
|
|
1995
1984
|
}
|
|
1996
1985
|
var settings = {
|
|
1997
1986
|
url: (url.includes('https://') || url.includes('http://') ? '' : this.environment.apiUrl) + url,
|