ps-toolkit-ui 1.6.8 → 1.6.11

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.
@@ -986,11 +986,12 @@
986
986
  }
987
987
  return result;
988
988
  };
989
- HelperClass.setCookie = function (name, value, days) {
989
+ HelperClass.setCookie = function (name, value, hours) {
990
+ if (hours === void 0) { hours = 30 * 24; }
990
991
  var expires = '';
991
- if (days) {
992
+ if (hours) {
992
993
  var date = new Date();
993
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
994
+ date.setTime(date.getTime() + (hours * 60 * 60 * 1000));
994
995
  expires = '; expires=' + date.toUTCString();
995
996
  }
996
997
  document.cookie = name + '=' + (value || '') + expires + '; path=/';
@@ -6914,12 +6915,13 @@
6914
6915
  this.active = 0;
6915
6916
  this.onSuccess = null;
6916
6917
  this.rules = null;
6918
+ this.expireHours = 30 * 24;
6917
6919
  this.type = type;
6918
6920
  this.l = l;
6919
6921
  }
6920
6922
  LoginClass.prototype.setCookie = function (r) {
6921
6923
  if (r.Token) {
6922
- HelperClass.setCookie('Authorization', "Bearer " + r.Token, 30);
6924
+ HelperClass.setCookie('Authorization', "Bearer " + r.Token, this.expireHours);
6923
6925
  }
6924
6926
  };
6925
6927
  return LoginClass;
@@ -6950,6 +6952,7 @@
6950
6952
  this.mobile = new InputClass(this.config.environment, this.login.l, 'Mobile', 'fa-duotone fa-mobile-alt', exports.InputType.Mobile, 'm-b-20 h-45', '', true, 4, 50);
6951
6953
  sendCodeForm_1.onSuccess = function () {
6952
6954
  loginForm_1.subName = _this.login.l('LoginSmsSubTitle', _this.mobile.data());
6955
+ _this.mobile.type = exports.InputType.Hidden;
6953
6956
  code_1.progress.start();
6954
6957
  _this.login.steps[1].show();
6955
6958
  setTimeout(function () {
@@ -7017,6 +7020,7 @@
7017
7020
  };
7018
7021
  var sendCodeStep = new LoginStepClass(sendCodeForm_1);
7019
7022
  sendCodeStep.show = function () {
7023
+ _this.mobile.type = exports.InputType.Mobile;
7020
7024
  _this.login.active = 0;
7021
7025
  };
7022
7026
  this.login.steps.unshift(loginStep);