barsa-develop-components 1.0.254 → 1.0.255

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.
@@ -2030,9 +2030,9 @@ class TimerCountDownComponent extends FieldBaseComponent {
2030
2030
  minimumIntegerDigits: 2,
2031
2031
  useGrouping: false
2032
2032
  });
2033
- this.countDownText = `
2034
- ${this._getMonthText(month)}
2035
- ${this._daysText(days)}
2033
+ this.countDownText = `
2034
+ ${this._getMonthText(month)}
2035
+ ${this._daysText(days)}
2036
2036
  ${this._getTimeText(hours, minutes, seconds)}`;
2037
2037
  this._cdr.detectChanges();
2038
2038
  }, 1000);
@@ -2044,6 +2044,25 @@ class TimerCountDownComponent extends FieldBaseComponent {
2044
2044
  return days > 0 ? `${days} روز` : '';
2045
2045
  }
2046
2046
  _getTimeText(hours, minutes, seconds) {
2047
+ if (hours < 0 || minutes < 0 || seconds < 0) {
2048
+ if (this.parameters?.ExpireViewMode) {
2049
+ switch (this.parameters.ExpireViewMode) {
2050
+ case 1:
2051
+ return `00:00:00`;
2052
+ break;
2053
+ case 2:
2054
+ return `پایان یافته`;
2055
+ break;
2056
+ case 3:
2057
+ return '';
2058
+ break;
2059
+ case 4: // نمایش زمان گذشته
2060
+ return `${hours}:${minutes}:${seconds}`;
2061
+ break;
2062
+ }
2063
+ }
2064
+ return `00:00:00`;
2065
+ }
2047
2066
  return `${hours}:${minutes}:${seconds}`;
2048
2067
  }
2049
2068
  }