ps-toolkit-ui 1.19.77 → 1.19.79

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.
@@ -31,6 +31,12 @@
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';
34
40
  var PsToolkitUiConfigService = /** @class */ (function () {
35
41
  function PsToolkitUiConfigService(environment, strings, currentLang, authorizationName) {
36
42
  if (authorizationName === void 0) { authorizationName = 'Authorization'; }
@@ -38,7 +44,8 @@
38
44
  this.strings = strings;
39
45
  this.currentLang = currentLang;
40
46
  this.authorizationName = authorizationName;
41
- this.authName = authorizationName;
47
+ console.log('authorizationName', authorizationName);
48
+ Config.authName = authorizationName;
42
49
  PsToolkitUiConfigService.instance = this;
43
50
  }
44
51
  return PsToolkitUiConfigService;
@@ -1975,17 +1982,16 @@
1975
1982
  RequestClass.prototype.getClient = function (request, url, method, data, done, fail, timeout) {
1976
1983
  var _this = this;
1977
1984
  if (timeout === void 0) { timeout = null; }
1978
- var _a, _b, _c, _d, _e;
1985
+ var _a;
1979
1986
  var token = HelperClass.getCookie('Authorization');
1980
1987
  if (!(data instanceof FormData)) {
1981
1988
  data = HelperClass.jsonToFormData(data);
1982
1989
  }
1983
1990
  var headers = {};
1984
1991
  if (token !== null) {
1985
- var authName = (_b = (_a = PsToolkitUiConfigService.instance) === null || _a === void 0 ? void 0 : _a.authName) !== null && _b !== void 0 ? _b : 'Authorization';
1986
- console.log('Authorization name is:', (_c = PsToolkitUiConfigService.instance) === null || _c === void 0 ? void 0 : _c.authName);
1987
- console.log('Authorization name is:', (_d = PsToolkitUiConfigService.instance) === null || _d === void 0 ? void 0 : _d.authorizationName);
1988
- headers[(_e = PsToolkitUiConfigService.instance) === null || _e === void 0 ? void 0 : _e.authName] = token;
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;
1989
1995
  }
1990
1996
  var settings = {
1991
1997
  url: (url.includes('https://') || url.includes('http://') ? '' : this.environment.apiUrl) + url,