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.
- package/bundles/ps-toolkit-ui.umd.js +9 -4
- 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/helper.class.js +4 -4
- package/esm2015/lib/classes/login.class.js +3 -2
- package/esm2015/lib/components/form/select/form.select.component.js +4 -1
- package/fesm2015/ps-toolkit-ui.js +8 -4
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/helper.class.d.ts +1 -1
- package/lib/classes/login.class.d.ts +1 -0
- package/package.json +1 -1
|
@@ -986,11 +986,12 @@
|
|
|
986
986
|
}
|
|
987
987
|
return result;
|
|
988
988
|
};
|
|
989
|
-
HelperClass.setCookie = function (name, value,
|
|
989
|
+
HelperClass.setCookie = function (name, value, hours) {
|
|
990
|
+
if (hours === void 0) { hours = 30 * 24; }
|
|
990
991
|
var expires = '';
|
|
991
|
-
if (
|
|
992
|
+
if (hours) {
|
|
992
993
|
var date = new Date();
|
|
993
|
-
date.setTime(date.getTime() + (
|
|
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,
|
|
6927
|
+
HelperClass.setCookie('Authorization', "Bearer " + r.Token, this.expireHours);
|
|
6923
6928
|
}
|
|
6924
6929
|
};
|
|
6925
6930
|
return LoginClass;
|