ps-toolkit-ui 0.2.48 → 0.2.51
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 +15 -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/form.class.js +11 -4
- package/esm2015/lib/classes/string.class.js +2 -1
- package/esm2015/lib/components/login/login.component.js +4 -1
- package/esm2015/lib/components/notification/notification.component.js +1 -1
- package/fesm2015/ps-toolkit-ui.js +15 -4
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/form.class.d.ts +1 -0
- package/lib/classes/string.class.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
Login: {
|
|
96
96
|
ReSendCodeDes: '(ارسال مجدد)',
|
|
97
|
+
ReSendCodeRemain: '<div class="ltr d-ib"><div style="width: 20px;text-align: center;" class="d-ib">{}</div>:<div style="text-align: center;width: 20px;" class="d-ib">{}</div></div> مانده تا دریافت مجدد کد',
|
|
97
98
|
Code: 'کد تایید',
|
|
98
99
|
Base: 'نام سایت',
|
|
99
100
|
BaseDesc: 'توضیحات سایت',
|
|
@@ -1483,22 +1484,29 @@
|
|
|
1483
1484
|
var Progress = /** @class */ (function () {
|
|
1484
1485
|
function Progress(secs) {
|
|
1485
1486
|
var _this = this;
|
|
1486
|
-
this.percent =
|
|
1487
|
+
this.percent = 100;
|
|
1487
1488
|
this.onEnd = null;
|
|
1488
1489
|
this.onStart = null;
|
|
1490
|
+
this.onTick = null;
|
|
1489
1491
|
this.start = function () {
|
|
1490
1492
|
_this.remainSecs = _this.secs;
|
|
1491
|
-
_this.percent =
|
|
1493
|
+
_this.percent = 100;
|
|
1492
1494
|
if (_this.onStart) {
|
|
1493
1495
|
_this.onStart();
|
|
1494
1496
|
}
|
|
1495
1497
|
_this.interVal = setInterval(function () {
|
|
1496
|
-
_this.percent = (_this.remainSecs / _this.secs) *
|
|
1498
|
+
_this.percent = (_this.remainSecs / _this.secs) * 100;
|
|
1497
1499
|
if (_this.remainSecs === 0) {
|
|
1498
1500
|
clearInterval(_this.interVal);
|
|
1499
1501
|
if (_this.onEnd) {
|
|
1500
1502
|
_this.onEnd();
|
|
1501
1503
|
}
|
|
1504
|
+
return;
|
|
1505
|
+
}
|
|
1506
|
+
if (Number.isInteger(_this.remainSecs)) {
|
|
1507
|
+
var m = Math.floor(_this.remainSecs / 60);
|
|
1508
|
+
var s = _this.remainSecs % 60;
|
|
1509
|
+
_this.onTick(m, s);
|
|
1502
1510
|
}
|
|
1503
1511
|
_this.remainSecs -= 0.5;
|
|
1504
1512
|
}, 500);
|
|
@@ -6704,6 +6712,9 @@
|
|
|
6704
6712
|
code_1.progress.onEnd = function () {
|
|
6705
6713
|
labelResend_1.value = 'ReSendCodeDes';
|
|
6706
6714
|
};
|
|
6715
|
+
code_1.progress.onTick = function (m, s) {
|
|
6716
|
+
labelResend_1.value = _this.login.l('ReSendCodeRemain', [m > 9 ? m : "0" + m, s > 9 ? s : "0" + s]);
|
|
6717
|
+
};
|
|
6707
6718
|
labelResend_1.onClick = function () {
|
|
6708
6719
|
labelResend_1.name = '(' + _this.login.l('LoadingComp', 'Send') + ')';
|
|
6709
6720
|
new RequestClass(_this.config.environment).send(_this.login.reSendCodeUrl, exports.Method.Post, loginForm_1.data(), null, function () {
|
|
@@ -6822,7 +6833,7 @@
|
|
|
6822
6833
|
{ type: core.Component, args: [{
|
|
6823
6834
|
selector: 'lib-notification',
|
|
6824
6835
|
template: "<div id=\"Notifications\">\r\n</div>\r\n",
|
|
6825
|
-
styles: ["#Notifications{bottom:20px;position:fixed;right:0;width:350px;z-index:9999}::ng-deep #Notifications .con{float:right;padding:5px 20px;width:calc(100% - 40px)}::ng-deep #Notifications .item{background-color:var(--red);border-radius:var(--border-radius-base);box-shadow:var(--box-shadow);color:#fff;float:right;position:relative;text-align:center;width:100%}::ng-deep #Notifications .item.success{background-color:var(--green)}::ng-deep #Notifications .item i{cursor:pointer;float:right;height:30px;line-height:30px;width:30px}::ng-deep #Notifications .item i:hover{background-color:var(--red-dark)}::ng-deep #Notifications .item.success i:hover{background-color:var(--green-dark)}::ng-deep #Notifications .item div{float:right;font-size:12px;line-height:20px;padding:10px;width:calc(100% - 30px)}"]
|
|
6836
|
+
styles: ["#Notifications{bottom:20px;position:fixed;right:0;width:350px;z-index:9999}::ng-deep #Notifications .con{float:right;padding:5px 20px;width:calc(100% - 40px)}::ng-deep #Notifications .item{background-color:var(--red);border-radius:var(--border-radius-base);box-shadow:var(--box-shadow);color:#fff;float:right;overflow:hidden;position:relative;text-align:center;width:100%}::ng-deep #Notifications .item.success{background-color:var(--green)}::ng-deep #Notifications .item i{cursor:pointer;float:right;height:30px;line-height:30px;width:30px}::ng-deep #Notifications .item i:hover{background-color:var(--red-dark)}::ng-deep #Notifications .item.success i:hover{background-color:var(--green-dark)}::ng-deep #Notifications .item div{float:right;font-size:12px;line-height:20px;padding:10px;width:calc(100% - 30px)}"]
|
|
6826
6837
|
},] }
|
|
6827
6838
|
];
|
|
6828
6839
|
NotificationComponent.ctorParameters = function () { return []; };
|