ps-toolkit-ui 1.6.7 → 1.6.10

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=/';
@@ -6917,9 +6918,10 @@
6917
6918
  this.type = type;
6918
6919
  this.l = l;
6919
6920
  }
6920
- LoginClass.prototype.setCookie = function (r) {
6921
+ LoginClass.prototype.setCookie = function (r, hours) {
6922
+ if (hours === void 0) { hours = 30 * 24; }
6921
6923
  if (r.Token) {
6922
- HelperClass.setCookie('Authorization', "Bearer " + r.Token, 30);
6924
+ HelperClass.setCookie('Authorization', "Bearer " + r.Token, r.Expired ? r.Expired : hours);
6923
6925
  }
6924
6926
  };
6925
6927
  return LoginClass;
@@ -6977,16 +6979,6 @@
6977
6979
  _this.login.onSuccess(result);
6978
6980
  }
6979
6981
  };
6980
- loginForm_1.onFailed = function (msg) {
6981
- console.log(msg);
6982
- // code.clear();
6983
- // this.mobile.error = InputError.NotExist;
6984
- // this.mobile.type = InputType.Mobile;
6985
- // setTimeout(() => {
6986
- // this.mobile.focus();
6987
- // }, 100);
6988
- // this.login.steps[0].show();
6989
- };
6990
6982
  var code_1 = new InputClass(this.config.environment, this.login.l, 'Code', 'fa-duotone fa-unlock-alt', exports.InputType.Number, 'm-b-20 h-45', null, true, 1111, 9999);
6991
6983
  var labelResend_1 = new InputClass(this.config.environment, this.login.l, 'ReSendCodeDes', null, exports.InputType.Label, 'comp resend-code h-45');
6992
6984
  code_1.progress = new Progress(120);
@@ -7028,6 +7020,7 @@
7028
7020
  };
7029
7021
  var sendCodeStep = new LoginStepClass(sendCodeForm_1);
7030
7022
  sendCodeStep.show = function () {
7023
+ _this.mobile.type = exports.InputType.Mobile;
7031
7024
  _this.login.active = 0;
7032
7025
  };
7033
7026
  this.login.steps.unshift(loginStep);