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