ps-toolkit-ui 1.20.87 → 1.20.89
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 +49 -26
- 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 +49 -26
- package/esm2015/lib/components/form/select/form.select.component.js +2 -2
- package/fesm2015/ps-toolkit-ui.js +49 -26
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -1473,42 +1473,65 @@
|
|
|
1473
1473
|
};
|
|
1474
1474
|
HelperClass.getDateRemainFull = function (l, dt, c) {
|
|
1475
1475
|
if (c === void 0) { c = 2; }
|
|
1476
|
+
var now = new Date();
|
|
1476
1477
|
var d = parseInt(dt.substring(6, dt.length - 2), 10);
|
|
1477
|
-
var
|
|
1478
|
+
var target = new Date(d);
|
|
1478
1479
|
var r = '';
|
|
1479
|
-
var
|
|
1480
|
-
|
|
1481
|
-
if (dif <= 0) {
|
|
1480
|
+
var f = now > target;
|
|
1481
|
+
if (f) {
|
|
1482
1482
|
r += l('Finished') + ' - ';
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
var
|
|
1488
|
-
var
|
|
1489
|
-
var
|
|
1490
|
-
|
|
1491
|
-
|
|
1483
|
+
var tmp = target;
|
|
1484
|
+
target = now;
|
|
1485
|
+
now = tmp;
|
|
1486
|
+
}
|
|
1487
|
+
var years = target.getFullYear() - now.getFullYear();
|
|
1488
|
+
var months = target.getMonth() - now.getMonth();
|
|
1489
|
+
var days = target.getDate() - now.getDate();
|
|
1490
|
+
var hours = target.getHours() - now.getHours();
|
|
1491
|
+
var minutes = target.getMinutes() - now.getMinutes();
|
|
1492
|
+
var seconds = target.getSeconds() - now.getSeconds();
|
|
1493
|
+
if (seconds < 0) {
|
|
1494
|
+
minutes--;
|
|
1495
|
+
}
|
|
1496
|
+
if (minutes < 0) {
|
|
1497
|
+
minutes += 60;
|
|
1498
|
+
hours--;
|
|
1499
|
+
}
|
|
1500
|
+
if (hours < 0) {
|
|
1501
|
+
hours += 24;
|
|
1502
|
+
days--;
|
|
1503
|
+
}
|
|
1504
|
+
if (days < 0) {
|
|
1505
|
+
var prevMonth = new Date(target.getFullYear(), target.getMonth(), 0);
|
|
1506
|
+
days += prevMonth.getDate();
|
|
1507
|
+
months--;
|
|
1508
|
+
}
|
|
1509
|
+
if (months < 0) {
|
|
1510
|
+
months += 12;
|
|
1511
|
+
years--;
|
|
1512
|
+
}
|
|
1513
|
+
if (years > 0) {
|
|
1514
|
+
r += l('YearP', years.toString());
|
|
1492
1515
|
c--;
|
|
1493
1516
|
}
|
|
1494
|
-
if (
|
|
1495
|
-
r +=
|
|
1496
|
-
r += l('MonthP',
|
|
1517
|
+
if (months > 0 && c > 0) {
|
|
1518
|
+
r += years > 0 ? l('And') : '';
|
|
1519
|
+
r += l('MonthP', months.toString());
|
|
1497
1520
|
c--;
|
|
1498
1521
|
}
|
|
1499
|
-
if (
|
|
1500
|
-
r +=
|
|
1501
|
-
r += l('DayP',
|
|
1522
|
+
if (days > 0 && c > 0) {
|
|
1523
|
+
r += years > 0 || months > 0 ? l('And') : '';
|
|
1524
|
+
r += l('DayP', days.toString());
|
|
1502
1525
|
c--;
|
|
1503
1526
|
}
|
|
1504
|
-
if (
|
|
1505
|
-
r +=
|
|
1506
|
-
r += l('HourP',
|
|
1527
|
+
if (hours > 0 && c > 0) {
|
|
1528
|
+
r += years > 0 || months > 0 || days > 0 ? l('And') : '';
|
|
1529
|
+
r += l('HourP', hours.toString());
|
|
1507
1530
|
c--;
|
|
1508
1531
|
}
|
|
1509
|
-
if (
|
|
1510
|
-
r +=
|
|
1511
|
-
r += l('MinuteP',
|
|
1532
|
+
if (minutes > 0 && c > 0) {
|
|
1533
|
+
r += years > 0 || months > 0 || days > 0 || hours > 0 ? l('And') : '';
|
|
1534
|
+
r += l('MinuteP', minutes.toString());
|
|
1512
1535
|
c--;
|
|
1513
1536
|
}
|
|
1514
1537
|
r += (r !== '' ? '' : l('LessThanMinute')) + ' ' + (f ? l('Ago') : l('Later'));
|
|
@@ -6304,7 +6327,7 @@
|
|
|
6304
6327
|
if (this.inp.onChange) {
|
|
6305
6328
|
this.inp.onChange(this.inp, false);
|
|
6306
6329
|
}
|
|
6307
|
-
if (this.inp.type === exports.InputType.SelectSearch) {
|
|
6330
|
+
if (this.inp.type === exports.InputType.SelectSearch || this.inp.type === exports.InputType.SelectSearchRadio) {
|
|
6308
6331
|
this.setOptions();
|
|
6309
6332
|
}
|
|
6310
6333
|
else if (e.target.value) {
|