ps-toolkit-ui 1.19.79 → 1.19.81
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 +11 -23
- 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 +10 -10
- package/esm2015/lib/services/config.service.js +3 -12
- package/fesm2015/ps-toolkit-ui.js +11 -19
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/services/config.service.d.ts +1 -6
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -31,31 +31,18 @@
|
|
|
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
|
-
function PsToolkitUiConfigService(environment, strings, currentLang
|
|
42
|
-
if (authorizationName === void 0) { authorizationName = 'Authorization'; }
|
|
35
|
+
function PsToolkitUiConfigService(environment, strings, currentLang) {
|
|
43
36
|
this.environment = environment;
|
|
44
37
|
this.strings = strings;
|
|
45
38
|
this.currentLang = currentLang;
|
|
46
|
-
this.authorizationName = authorizationName;
|
|
47
|
-
console.log('authorizationName', authorizationName);
|
|
48
|
-
Config.authName = authorizationName;
|
|
49
|
-
PsToolkitUiConfigService.instance = this;
|
|
50
39
|
}
|
|
51
40
|
return PsToolkitUiConfigService;
|
|
52
41
|
}());
|
|
53
|
-
PsToolkitUiConfigService.instance = null;
|
|
54
42
|
PsToolkitUiConfigService.ctorParameters = function () { return [
|
|
55
43
|
{ type: undefined, decorators: [{ type: core.Inject, args: ['environment',] }] },
|
|
56
44
|
{ type: undefined, decorators: [{ type: core.Inject, args: ['strings',] }] },
|
|
57
|
-
{ type: String, decorators: [{ type: core.Inject, args: ['currentLang',] }] }
|
|
58
|
-
{ type: String, decorators: [{ type: core.Inject, args: ['authorizationName',] }] }
|
|
45
|
+
{ type: String, decorators: [{ type: core.Inject, args: ['currentLang',] }] }
|
|
59
46
|
]; };
|
|
60
47
|
|
|
61
48
|
var AccordionComponent = /** @class */ (function () {
|
|
@@ -1982,24 +1969,25 @@
|
|
|
1982
1969
|
RequestClass.prototype.getClient = function (request, url, method, data, done, fail, timeout) {
|
|
1983
1970
|
var _this = this;
|
|
1984
1971
|
if (timeout === void 0) { timeout = null; }
|
|
1985
|
-
var _a;
|
|
1986
1972
|
var token = HelperClass.getCookie('Authorization');
|
|
1973
|
+
var tokenCu = HelperClass.getCookie('AuthorizationCu');
|
|
1974
|
+
var h = {};
|
|
1975
|
+
if (token != null) {
|
|
1976
|
+
h.Authorization = token;
|
|
1977
|
+
}
|
|
1978
|
+
if (token != null) {
|
|
1979
|
+
h.AuthorizationCu = tokenCu;
|
|
1980
|
+
}
|
|
1987
1981
|
if (!(data instanceof FormData)) {
|
|
1988
1982
|
data = HelperClass.jsonToFormData(data);
|
|
1989
1983
|
}
|
|
1990
|
-
var headers = {};
|
|
1991
|
-
if (token !== null) {
|
|
1992
|
-
var authName = (_a = Config.authName) !== null && _a !== void 0 ? _a : 'Authorization';
|
|
1993
|
-
console.log('Authorization name is:', Config.authName);
|
|
1994
|
-
headers[Config.authName] = token;
|
|
1995
|
-
}
|
|
1996
1984
|
var settings = {
|
|
1997
1985
|
url: (url.includes('https://') || url.includes('http://') ? '' : this.environment.apiUrl) + url,
|
|
1998
1986
|
method: exports.Method[method].toString(),
|
|
1999
1987
|
processData: false,
|
|
2000
1988
|
contentType: false,
|
|
2001
1989
|
data: data,
|
|
2002
|
-
headers:
|
|
1990
|
+
headers: h
|
|
2003
1991
|
};
|
|
2004
1992
|
if (timeout != null) {
|
|
2005
1993
|
settings.timeout = timeout;
|