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.
- package/bundles/ps-toolkit-ui.umd.js +8 -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/login/login.component.js +3 -1
- package/fesm2015/ps-toolkit-ui.js +7 -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=/';
|
|
@@ -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,
|
|
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);
|