@ngx-mce/datetime-picker 21.2.6-next.1 → 21.2.6-next.3

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.
@@ -36,7 +36,6 @@ class NgxDateRange {
36
36
  * Ensures that objects with a `start` and `end` property can't be assigned to a variable that
37
37
  * expects a `DateRange`
38
38
  */
39
- // tslint:disable-next-line:no-unused-variable
40
39
  _disableStructuralEquivalency;
41
40
  constructor(
42
41
  /** The start date of the range. */
@@ -1022,7 +1021,7 @@ class NgxMatMonthView {
1022
1021
  ? this._dateAdapter.format(this.activeDate, this._dateFormats.display.monthLabel)
1023
1022
  : this._dateAdapter
1024
1023
  .getMonthNames('short')[this._dateAdapter.getMonth(this.activeDate)].toLocaleUpperCase();
1025
- let firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
1024
+ const firstOfMonth = this._dateAdapter.createDate(this._dateAdapter.getYear(this.activeDate), this._dateAdapter.getMonth(this.activeDate), 1);
1026
1025
  this._firstWeekOffset =
1027
1026
  (DAYS_PER_WEEK +
1028
1027
  this._dateAdapter.getDayOfWeek(firstOfMonth) -
@@ -1095,7 +1094,7 @@ class NgxMatMonthView {
1095
1094
  const narrowWeekdays = this._dateAdapter.getDayOfWeekNames('narrow');
1096
1095
  const longWeekdays = this._dateAdapter.getDayOfWeekNames('long');
1097
1096
  // Rotate the labels for days of the week based on the configured first day of the week.
1098
- let weekdays = longWeekdays.map((long, i) => {
1097
+ const weekdays = longWeekdays.map((long, i) => {
1099
1098
  return { long, narrow: narrowWeekdays[i] };
1100
1099
  });
1101
1100
  this._weekdays = weekdays.slice(firstDayOfWeek).concat(weekdays.slice(0, firstDayOfWeek));
@@ -1226,7 +1225,7 @@ class NgxMatMultiYearView {
1226
1225
  return this._activeDate;
1227
1226
  }
1228
1227
  set activeDate(value) {
1229
- let oldActiveDate = this._activeDate;
1228
+ const oldActiveDate = this._activeDate;
1230
1229
  const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||
1231
1230
  this._dateAdapter.today();
1232
1231
  this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
@@ -1547,7 +1546,7 @@ class NgxMatYearView {
1547
1546
  return this._activeDate;
1548
1547
  }
1549
1548
  set activeDate(value) {
1550
- let oldActiveDate = this._activeDate;
1549
+ const oldActiveDate = this._activeDate;
1551
1550
  const validDate = this._dateAdapter.getValidDateOrNull(this._dateAdapter.deserialize(value)) ||
1552
1551
  this._dateAdapter.today();
1553
1552
  this._activeDate = this._dateAdapter.clampDate(validDate, this.minDate, this.maxDate);
@@ -1724,7 +1723,7 @@ class NgxMatYearView {
1724
1723
  this._setSelectedMonth(this.selected);
1725
1724
  this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());
1726
1725
  this._yearLabel = this._dateAdapter.getYearName(this.activeDate);
1727
- let monthNames = this._dateAdapter.getMonthNames('short');
1726
+ const monthNames = this._dateAdapter.getMonthNames('short');
1728
1727
  // First row of months only contains 5 elements so we can fit the year label on the same row.
1729
1728
  this._months = [
1730
1729
  [0, 1, 2, 3],
@@ -2749,7 +2748,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
2749
2748
  */
2750
2749
  function dateInputsHaveChanged(changes, adapter) {
2751
2750
  const keys = Object.keys(changes);
2752
- for (let key of keys) {
2751
+ for (const key of keys) {
2753
2752
  const { previousValue, currentValue } = changes[key];
2754
2753
  if (adapter.isDateInstance(previousValue) && adapter.isDateInstance(currentValue)) {
2755
2754
  if (!adapter.sameDate(previousValue, currentValue)) {
@@ -2802,7 +2801,6 @@ class NgxMatDateRangeInputPartBase extends NgxMatDatepickerInputBase {
2802
2801
  // itself. Usually we can work around it for the CVA, but there's no API to do it for the
2803
2802
  // validator. We work around it here by injecting the `NgControl` in `ngOnInit`, after
2804
2803
  // everything has been resolved.
2805
- // tslint:disable-next-line:no-bitwise
2806
2804
  const ngControl = this._injector.get(NgControl, null, {
2807
2805
  optional: true,
2808
2806
  self: true,
@@ -5411,7 +5409,7 @@ class NgxMatDatetimePickerInputV2 {
5411
5409
  const target = event?.target;
5412
5410
  const parsedDate = this._dateAdapter?.parse(target.value, this._dateFormats.display.dateInput);
5413
5411
  this._lastValueValid = this._dateAdapter?.isValid(parsedDate);
5414
- let date = this._dateAdapter?.getValidDateOrNull(parsedDate);
5412
+ const date = this._dateAdapter?.getValidDateOrNull(parsedDate);
5415
5413
  // Update internal value
5416
5414
  this._value.set(date);
5417
5415
  // Notify form control