ps-toolkit-ui 1.6.9 → 1.6.12

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=/';
@@ -5310,6 +5311,9 @@
5310
5311
  return;
5311
5312
  }
5312
5313
  this.inp.value = null;
5314
+ if (this.inp.onChange) {
5315
+ this.inp.onChange(this.inp, false);
5316
+ }
5313
5317
  if (this.inp.type === exports.InputType.SelectSearch) {
5314
5318
  this.setOptions();
5315
5319
  }
@@ -6914,12 +6918,13 @@
6914
6918
  this.active = 0;
6915
6919
  this.onSuccess = null;
6916
6920
  this.rules = null;
6921
+ this.expireHours = 30 * 24;
6917
6922
  this.type = type;
6918
6923
  this.l = l;
6919
6924
  }
6920
6925
  LoginClass.prototype.setCookie = function (r) {
6921
6926
  if (r.Token) {
6922
- HelperClass.setCookie('Authorization', "Bearer " + r.Token, 30);
6927
+ HelperClass.setCookie('Authorization', "Bearer " + r.Token, this.expireHours);
6923
6928
  }
6924
6929
  };
6925
6930
  return LoginClass;