@clr/angular 13.6.0 → 13.7.0

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.
@@ -328,6 +328,7 @@ const commonStringsDefault = {
328
328
  datepickerCurrentDecade: 'Current decade',
329
329
  datepickerSelectMonthText: 'Select month, the current month is {CALENDAR_MONTH}',
330
330
  datepickerSelectYearText: 'Select year, the current year is {CALENDAR_YEAR}',
331
+ datepickerSelectedLabel: '{FULL_DATE} - Selected',
331
332
  // Stack View
332
333
  stackViewChanged: 'Value changed.',
333
334
  // Responsive Nav
@@ -8085,21 +8086,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8085
8086
  * The full license information can be found in LICENSE in the root directory of this project.
8086
8087
  */
8087
8088
  class ClrDay {
8088
- constructor(_dateNavigationService, _toggleService, dateFormControlService) {
8089
+ constructor(_dateNavigationService, _toggleService, dateFormControlService, commonStrings) {
8089
8090
  this._dateNavigationService = _dateNavigationService;
8090
8091
  this._toggleService = _toggleService;
8091
8092
  this.dateFormControlService = dateFormControlService;
8093
+ this.commonStrings = commonStrings;
8092
8094
  }
8093
8095
  /**
8094
8096
  * DayViewModel input which is used to build the Day View.
8095
8097
  */
8096
8098
  set dayView(day) {
8097
8099
  this._dayView = day;
8098
- this.dayString = this._dayView.dayModel.toDateString();
8099
8100
  }
8100
8101
  get dayView() {
8101
8102
  return this._dayView;
8102
8103
  }
8104
+ get dayString() {
8105
+ return this.dayView.isSelected
8106
+ ? this.commonStrings.parse(this.commonStrings.keys.datepickerSelectedLabel, {
8107
+ FULL_DATE: this._dayView.dayModel.toDateString(),
8108
+ })
8109
+ : this._dayView.dayModel.toDateString();
8110
+ }
8103
8111
  /**
8104
8112
  * Updates the focusedDay in the DateNavigationService when the ClrDay is focused.
8105
8113
  */
@@ -8116,7 +8124,7 @@ class ClrDay {
8116
8124
  this._toggleService.open = false;
8117
8125
  }
8118
8126
  }
8119
- ClrDay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDay, deps: [{ token: DateNavigationService }, { token: ClrPopoverToggleService }, { token: DateFormControlService }], target: i0.ɵɵFactoryTarget.Component });
8127
+ ClrDay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDay, deps: [{ token: DateNavigationService }, { token: ClrPopoverToggleService }, { token: DateFormControlService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
8120
8128
  ClrDay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDay, selector: "clr-day", inputs: { dayView: ["clrDayView", "dayView"] }, host: { properties: { "class.day": "true" } }, ngImport: i0, template: `
8121
8129
  <button
8122
8130
  class="day-btn"
@@ -8128,6 +8136,7 @@ ClrDay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
8128
8136
  [attr.tabindex]="dayView.tabIndex"
8129
8137
  (click)="selectDay()"
8130
8138
  (focus)="onDayViewFocus()"
8139
+ [attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
8131
8140
  [attr.aria-label]="dayString"
8132
8141
  [attr.aria-selected]="dayView.isSelected"
8133
8142
  >
@@ -8149,6 +8158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8149
8158
  [attr.tabindex]="dayView.tabIndex"
8150
8159
  (click)="selectDay()"
8151
8160
  (focus)="onDayViewFocus()"
8161
+ [attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
8152
8162
  [attr.aria-label]="dayString"
8153
8163
  [attr.aria-selected]="dayView.isSelected"
8154
8164
  >
@@ -8157,7 +8167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8157
8167
  `,
8158
8168
  host: { '[class.day]': 'true' },
8159
8169
  }]
8160
- }], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }]; }, propDecorators: { dayView: [{
8170
+ }], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }, { type: ClrCommonStringsService }]; }, propDecorators: { dayView: [{
8161
8171
  type: Input,
8162
8172
  args: ['clrDayView']
8163
8173
  }] } });