ps-toolkit-ui 1.15.53 → 1.15.55

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.
@@ -1442,6 +1442,47 @@
1442
1442
  }
1443
1443
  return '<span class="ltr d-ib">' + moment__namespace(d).locale('fa').format('jYYYY/jMM/jDD HH:mm') + '</span>';
1444
1444
  };
1445
+ HelperClass.getDateRemainFull = function (l, dt, c) {
1446
+ if (c === void 0) { c = 2; }
1447
+ var d = parseInt(dt.substring(6, dt.length - 2), 10);
1448
+ var now = moment.now();
1449
+ var dif = (d - now) / 1000;
1450
+ if (dif <= 0) {
1451
+ return l('Finished');
1452
+ }
1453
+ var year = Math.floor(dif / 31536000);
1454
+ var month = Math.floor((dif % 31536000) / 2628000);
1455
+ var day = Math.floor(((dif % 31536000) % 2628000) / 86400);
1456
+ var hour = Math.floor((((dif % 31536000) % 2628000) % 86400) / 3600);
1457
+ var minute = Math.floor(((((dif % 31536000) % 2628000) % 86400) % 3600) / 60);
1458
+ var r = '';
1459
+ if (year > 0) {
1460
+ r += l('YearP', year.toString());
1461
+ c--;
1462
+ }
1463
+ if (month > 0 && c > 0) {
1464
+ r += year > 0 ? l('And') : '';
1465
+ r += l('MonthP', month.toString());
1466
+ c--;
1467
+ }
1468
+ if (day > 0 && c > 0) {
1469
+ r += year > 0 || month > 0 ? l('And') : '';
1470
+ r += l('DayP', day.toString());
1471
+ c--;
1472
+ }
1473
+ if (hour > 0 && c > 0) {
1474
+ r += year > 0 || month > 0 || day > 0 ? l('And') : '';
1475
+ r += l('HourP', hour.toString());
1476
+ c--;
1477
+ }
1478
+ if (minute > 0 && c > 0) {
1479
+ r += year > 0 || month > 0 || day > 0 || hour > 0 ? l('And') : '';
1480
+ r += l('MinuteP', minute.toString());
1481
+ c--;
1482
+ }
1483
+ r += r !== '' ? ' ' + l('Later') : l('LessThanMinute');
1484
+ return r;
1485
+ };
1445
1486
  HelperClass.getDate = function (dt, format) {
1446
1487
  if (format === void 0) { format = 'jYYYY/jMM/jDD'; }
1447
1488
  try {
@@ -2445,7 +2486,7 @@
2445
2486
  this.icon = icon;
2446
2487
  this.class = cls + ([exports.InputType.Mobile, exports.InputType.Phone, exports.InputType.Password, exports.InputType.Email, exports.InputType.Number, exports.InputType.Price,
2447
2488
  exports.InputType.NationalCode, exports.InputType.NationalNum, exports.InputType.NationalCodeNum, exports.InputType.EconomicNum, exports.InputType.Sheba,
2448
- exports.InputType.PostalCode, exports.InputType.Date, exports.InputType.Time, exports.InputType.BillNumber, exports.InputType.Username].includes(type) ? ' ltr' : '');
2489
+ exports.InputType.PostalCode, exports.InputType.Date, exports.InputType.Time, exports.InputType.BillNumber, exports.InputType.Username, exports.InputType.Url].includes(type) ? ' ltr' : '');
2449
2490
  this.type = type;
2450
2491
  this.value = value;
2451
2492
  this.default = value == null ? null : (typeof value === 'number' || typeof value === 'string' ? _.cloneDeep(value) : HelperClass.clone(value));