@odx/angular 5.7.3 → 6.0.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/cdk/connected-overlay/lib/connected-overlay.component.d.ts +2 -4
  3. package/components/calendar/lib/calendar.config.d.ts +24 -93
  4. package/components/calendar/lib/directives/calendar-cell.directive.d.ts +0 -9
  5. package/components/calendar/lib/directives/calendar-view.directive.d.ts +0 -9
  6. package/components/calendar/lib/pipes/date-label.pipe.d.ts +7 -21
  7. package/components/calendar/lib/utils/get-A11y-label.d.ts +1 -2
  8. package/esm2022/cdk/connected-overlay/lib/connected-overlay.component.mjs +2 -10
  9. package/esm2022/components/calendar/lib/calendar.config.mjs +1 -12
  10. package/esm2022/components/calendar/lib/components/calendar-month/calendar-month.component.mjs +3 -3
  11. package/esm2022/components/calendar/lib/components/calendar-year/calendar-year.component.mjs +3 -3
  12. package/esm2022/components/calendar/lib/components/calendar-years/calendar-years.component.mjs +3 -3
  13. package/esm2022/components/calendar/lib/directives/calendar-cell.directive.mjs +2 -2
  14. package/esm2022/components/calendar/lib/pipes/date-label.pipe.mjs +22 -9
  15. package/esm2022/components/calendar/lib/utils/get-A11y-label.mjs +10 -8
  16. package/esm2022/internal/lib/helpers/fast-equals.mjs +3 -0
  17. package/esm2022/internal/lib/helpers/index.mjs +2 -1
  18. package/esm2022/localization/lib/localization.config.mjs +3 -5
  19. package/esm2022/localization/lib/localization.logger.mjs +3 -0
  20. package/esm2022/localization/lib/localization.service.mjs +20 -29
  21. package/fesm2022/odx-angular-cdk-connected-overlay.mjs +1 -9
  22. package/fesm2022/odx-angular-cdk-connected-overlay.mjs.map +1 -1
  23. package/fesm2022/odx-angular-components-calendar.mjs +39 -34
  24. package/fesm2022/odx-angular-components-calendar.mjs.map +1 -1
  25. package/fesm2022/odx-angular-internal.mjs +4 -1
  26. package/fesm2022/odx-angular-internal.mjs.map +1 -1
  27. package/fesm2022/odx-angular-localization.mjs +24 -32
  28. package/fesm2022/odx-angular-localization.mjs.map +1 -1
  29. package/internal/lib/helpers/fast-equals.d.ts +1 -0
  30. package/internal/lib/helpers/index.d.ts +1 -0
  31. package/localization/lib/localization.config.d.ts +0 -2
  32. package/localization/lib/localization.logger.d.ts +3 -0
  33. package/localization/lib/localization.service.d.ts +3 -7
  34. package/package.json +8 -7
@@ -1,17 +1,17 @@
1
1
  import { __decorate, __metadata } from 'tslib';
2
2
  import { A11yModule } from '@angular/cdk/a11y';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, Pipe, inject, Directive } from '@angular/core';
4
+ import { EventEmitter, Injectable, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Output, inject, ChangeDetectorRef, Pipe, Directive } from '@angular/core';
5
5
  import * as i2 from '@odx/angular';
6
- import { CoreModule, DisabledController } from '@odx/angular';
7
- import { CSSComponent, CSSModifier } from '@odx/angular/internal';
6
+ import { CoreModule, WindowRef, DisabledController } from '@odx/angular';
7
+ import { CSSComponent, fastDeepEqual, CSSModifier } from '@odx/angular/internal';
8
8
  import { createConfigTokens, isString, isPresent, injectElement, hasChanged, EventManager, deferFn, untilDestroyed, trackByIndex, isFunction } from '@odx/angular/utils';
9
- import { enGB } from 'date-fns/locale';
9
+ import { isSameDay, isSameMonth, isSameYear, endOfDay, endOfMonth, endOfYear, startOfDay, startOfMonth, startOfYear, isValid, toDate, isBefore, isEqual, addMonths, subMonths, isWithinInterval, startOfWeek, addDays, endOfWeek, eachMonthOfInterval, addYears, getYear, setYear, subDays, subWeeks, addWeeks, setMonth, getMonth } from 'date-fns';
10
10
  import { BehaviorSubject, shareReplay, map, filter, distinctUntilChanged, merge, defer, of, withLatestFrom } from 'rxjs';
11
- import { isSameDay, isSameMonth, isSameYear, endOfDay, endOfMonth, endOfYear, startOfDay, startOfMonth, startOfYear, isValid, toDate, isBefore, isEqual, addMonths, subMonths, format, isWithinInterval, startOfWeek, addDays, endOfWeek, eachMonthOfInterval, addYears, getYear, setYear, subDays, subWeeks, addWeeks, setMonth, getMonth } from 'date-fns';
12
11
  import { ActionGroupComponent } from '@odx/angular/components/action-group';
13
12
  import { ButtonComponent } from '@odx/angular/components/button';
14
13
  import { IconComponent } from '@odx/angular/components/icon';
14
+ import { LocalizationService } from '@odx/angular/localization';
15
15
  import * as i1 from '@angular/common';
16
16
  import { DOCUMENT } from '@angular/common';
17
17
  import * as i3 from '@ngrx/component';
@@ -23,16 +23,7 @@ var CalendarSelectionMode;
23
23
  })(CalendarSelectionMode || (CalendarSelectionMode = {}));
24
24
 
25
25
  const { CalendarConfig, CalendarDefaultConfig, injectCalendarConfig, provideCalendarConfig } = createConfigTokens('Calendar', '@odx/angular/components/calendar', {
26
- monthYearLabel: 'LLLL yyyy',
27
- monthLabel: 'LLL',
28
- weekLabel: 'EEEEE',
29
- dayLabel: 'd',
30
- yearLabel: 'yyyy',
31
- dayA11yLabel: 'MMMM dd, yyyy',
32
- monthA11yLabel: 'MMMM, yyyy',
33
- yearA11yLabel: 'yyyy',
34
26
  displayAdjacentDays: true,
35
- locale: new BehaviorSubject(enGB),
36
27
  selectionMode: CalendarSelectionMode.Date,
37
28
  yearView: {
38
29
  itemsPerRow: 3,
@@ -71,13 +62,15 @@ function checkIdenticalDate(currentDate, date, calendarView) {
71
62
  return dateValidators$4[calendarView](currentDate, date);
72
63
  }
73
64
 
74
- const labelResolvers = {
75
- [CalendarView.Month]: (config) => config.dayA11yLabel,
76
- [CalendarView.Year]: (config) => config.monthA11yLabel,
77
- [CalendarView.Years]: (config) => config.yearA11yLabel,
78
- };
79
- function getA11yLabel(calendarView, config) {
80
- return labelResolvers[calendarView](config);
65
+ function getA11yLabel(calendarView) {
66
+ switch (calendarView) {
67
+ case CalendarView.Year:
68
+ return { month: 'long', year: 'numeric' };
69
+ case CalendarView.Years:
70
+ return { year: 'numeric' };
71
+ default:
72
+ return { month: 'long', day: '2-digit', year: 'numeric' };
73
+ }
81
74
  }
82
75
 
83
76
  const dateValidators$3 = {
@@ -238,22 +231,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
238
231
 
239
232
  class DateLabelPipe {
240
233
  constructor() {
241
- this.config = injectCalendarConfig();
242
- }
243
- transform(value, dateFormat) {
234
+ this.localizationService = inject(LocalizationService);
235
+ this.windowRef = inject(WindowRef);
236
+ this.cdr = inject(ChangeDetectorRef);
237
+ this.lastValue = null;
238
+ this.lastFormatOptions = null;
239
+ this.formattedValue = '';
240
+ }
241
+ transform(value, formatOptions) {
244
242
  if (!value)
245
243
  return '';
246
- return format(value, dateFormat, { locale: this.config.locale.getValue() });
244
+ if (value === this.lastValue && fastDeepEqual(formatOptions, this.lastFormatOptions)) {
245
+ return this.formattedValue;
246
+ }
247
+ this.formattedValue = this.windowRef.nativeWindow.Intl.DateTimeFormat(this.localizationService.getActiveLanguage(), formatOptions).format(value);
248
+ this.lastValue = value;
249
+ this.lastFormatOptions = formatOptions;
250
+ this.cdr.markForCheck();
251
+ return this.formattedValue;
247
252
  }
248
253
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateLabelPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
249
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DateLabelPipe, isStandalone: true, name: "odxDateLabel" }); }
254
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DateLabelPipe, isStandalone: true, name: "odxDateLabel", pure: false }); }
250
255
  }
251
256
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateLabelPipe, decorators: [{
252
257
  type: Pipe,
253
258
  args: [{
254
259
  standalone: true,
255
260
  name: 'odxDateLabel',
256
- pure: true,
261
+ pure: false,
257
262
  }]
258
263
  }] });
259
264
 
@@ -313,7 +318,7 @@ let CalendarCellDirective = class CalendarCellDirective {
313
318
  }
314
319
  ngOnChanges(changes) {
315
320
  if (hasChanged(changes, ['date', 'calendarView'], false)) {
316
- this.ariaLabel = this.dateLabelPipe.transform(this.date, getA11yLabel(this.calendarView, this.config));
321
+ this.ariaLabel = this.dateLabelPipe.transform(this.date, getA11yLabel(this.calendarView));
317
322
  this.isCurrent = checkIdenticalDate(this.date, new Date(), this.calendarView);
318
323
  }
319
324
  if (this.activeDate && hasChanged(changes, ['date', 'activeDate'], false)) {
@@ -612,14 +617,14 @@ let CalendarMonthComponent = class CalendarMonthComponent extends CalendarViewDi
612
617
  this.calendar.selectDate(value, { emitOutside: true });
613
618
  }
614
619
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarMonthComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
615
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarMonthComponent, isStandalone: true, selector: "odx-calendar-month", providers: [CalendarMonthService], usesInheritance: true, ngImport: i0, template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"7\">\n <odx-calendar-header\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (previous)=\"previousMonth($event)\"\n (next)=\"nextMonth($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: config.monthYearLabel }}\n </odx-calendar-header>\n </th>\n </tr>\n\n <tr class=\"odx-calendar__weekdays\">\n <td *ngFor=\"let day of calendarMonth.weekDays$ | async\">\n {{ day | odxDateLabel: config.weekLabel }}\n </td>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousDay($event)\"\n (keydown.ArrowRight)=\"nextDay($event)\"\n (keydown.ArrowUp)=\"previousWeek($event)\"\n (keydown.ArrowDown)=\"nextWeek($event)\"\n (keydown.PageUp)=\"previousMonth($event)\"\n (keydown.PageDown)=\"nextMonth($event)\"\n >\n <tr *ngFor=\"let week of calendarMonth.weeks$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let day of week; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(day)\"\n [odxCalendarCell]=\"day\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n [odxCalendarCellPreviewDate]=\"previewDate\"\n (click)=\"selectDate(day)\"\n >\n {{ day | odxDateLabel: config.dayLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: CalendarCellDirective, selector: "[odxCalendarCell]", inputs: ["odxCalendarCell", "odxCalendarCellCalendarView", "odxCalendarCellActiveDate", "odxCalendarCellSelectedDate", "odxCalendarCellSelectedDateRange", "odxCalendarCellPreviewDate"] }, { kind: "component", type: CalendarHeaderComponent, selector: "odx-calendar-header", inputs: ["activeDate", "calendarView", "minDate", "maxDate"], outputs: ["previous", "next", "changeView"] }, { kind: "pipe", type: DateLabelPipe, name: "odxDateLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
620
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarMonthComponent, isStandalone: true, selector: "odx-calendar-month", providers: [CalendarMonthService], usesInheritance: true, ngImport: i0, template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"7\">\n <odx-calendar-header\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (previous)=\"previousMonth($event)\"\n (next)=\"nextMonth($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: { month: 'long', year: 'numeric' } }}\n </odx-calendar-header>\n </th>\n </tr>\n\n <tr class=\"odx-calendar__weekdays\">\n <td *ngFor=\"let day of calendarMonth.weekDays$ | async\">\n {{ (day | odxDateLabel: { weekday: 'short' }).charAt(0) }}\n </td>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousDay($event)\"\n (keydown.ArrowRight)=\"nextDay($event)\"\n (keydown.ArrowUp)=\"previousWeek($event)\"\n (keydown.ArrowDown)=\"nextWeek($event)\"\n (keydown.PageUp)=\"previousMonth($event)\"\n (keydown.PageDown)=\"nextMonth($event)\"\n >\n <tr *ngFor=\"let week of calendarMonth.weeks$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let day of week; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(day)\"\n [odxCalendarCell]=\"day\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n [odxCalendarCellPreviewDate]=\"previewDate\"\n (click)=\"selectDate(day)\"\n >\n {{ day | odxDateLabel: { day: 'numeric' } }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: CalendarCellDirective, selector: "[odxCalendarCell]", inputs: ["odxCalendarCell", "odxCalendarCellCalendarView", "odxCalendarCellActiveDate", "odxCalendarCellSelectedDate", "odxCalendarCellSelectedDateRange", "odxCalendarCellPreviewDate"] }, { kind: "component", type: CalendarHeaderComponent, selector: "odx-calendar-header", inputs: ["activeDate", "calendarView", "minDate", "maxDate"], outputs: ["previous", "next", "changeView"] }, { kind: "pipe", type: DateLabelPipe, name: "odxDateLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
616
621
  };
617
622
  CalendarMonthComponent = __decorate([
618
623
  CSSComponent('calendar-month')
619
624
  ], CalendarMonthComponent);
620
625
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarMonthComponent, decorators: [{
621
626
  type: Component,
622
- args: [{ selector: 'odx-calendar-month', standalone: true, imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [CalendarMonthService], template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"7\">\n <odx-calendar-header\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (previous)=\"previousMonth($event)\"\n (next)=\"nextMonth($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: config.monthYearLabel }}\n </odx-calendar-header>\n </th>\n </tr>\n\n <tr class=\"odx-calendar__weekdays\">\n <td *ngFor=\"let day of calendarMonth.weekDays$ | async\">\n {{ day | odxDateLabel: config.weekLabel }}\n </td>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousDay($event)\"\n (keydown.ArrowRight)=\"nextDay($event)\"\n (keydown.ArrowUp)=\"previousWeek($event)\"\n (keydown.ArrowDown)=\"nextWeek($event)\"\n (keydown.PageUp)=\"previousMonth($event)\"\n (keydown.PageDown)=\"nextMonth($event)\"\n >\n <tr *ngFor=\"let week of calendarMonth.weeks$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let day of week; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(day)\"\n [odxCalendarCell]=\"day\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n [odxCalendarCellPreviewDate]=\"previewDate\"\n (click)=\"selectDate(day)\"\n >\n {{ day | odxDateLabel: config.dayLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n" }]
627
+ args: [{ selector: 'odx-calendar-month', standalone: true, imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [CalendarMonthService], template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"7\">\n <odx-calendar-header\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (previous)=\"previousMonth($event)\"\n (next)=\"nextMonth($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: { month: 'long', year: 'numeric' } }}\n </odx-calendar-header>\n </th>\n </tr>\n\n <tr class=\"odx-calendar__weekdays\">\n <td *ngFor=\"let day of calendarMonth.weekDays$ | async\">\n {{ (day | odxDateLabel: { weekday: 'short' }).charAt(0) }}\n </td>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousDay($event)\"\n (keydown.ArrowRight)=\"nextDay($event)\"\n (keydown.ArrowUp)=\"previousWeek($event)\"\n (keydown.ArrowDown)=\"nextWeek($event)\"\n (keydown.PageUp)=\"previousMonth($event)\"\n (keydown.PageDown)=\"nextMonth($event)\"\n >\n <tr *ngFor=\"let week of calendarMonth.weeks$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let day of week; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(day)\"\n [odxCalendarCell]=\"day\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n [odxCalendarCellPreviewDate]=\"previewDate\"\n (click)=\"selectDate(day)\"\n >\n {{ day | odxDateLabel: { day: 'numeric' } }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n" }]
623
628
  }] });
624
629
 
625
630
  let CalendarYearComponent = class CalendarYearComponent extends CalendarViewDirective {
@@ -655,14 +660,14 @@ let CalendarYearComponent = class CalendarYearComponent extends CalendarViewDire
655
660
  this.changeView();
656
661
  }
657
662
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarYearComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
658
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarYearComponent, isStandalone: true, selector: "odx-calendar-year", providers: [CalendarYearService], usesInheritance: true, ngImport: i0, template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"3\">\n <odx-calendar-header\n (previous)=\"previousYear($event)\"\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (next)=\"nextYear($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: config.yearLabel }}\n </odx-calendar-header>\n </th>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousMonth($event)\"\n (keydown.ArrowRight)=\"nextMonth($event)\"\n (keydown.ArrowUp)=\"previousSeason($event)\"\n (keydown.ArrowDown)=\"nextSeason($event)\"\n (keydown.PageDown)=\"nextYear($event)\"\n (keydown.PageUp)=\"previousYear($event)\"\n >\n <tr class=\"odx-calendar__season\" *ngFor=\"let season of calendarYear.seasons$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let month of season; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(month)\"\n [odxCalendarCell]=\"month\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(month)\"\n >\n {{ month | odxDateLabel: config.monthLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: CalendarCellDirective, selector: "[odxCalendarCell]", inputs: ["odxCalendarCell", "odxCalendarCellCalendarView", "odxCalendarCellActiveDate", "odxCalendarCellSelectedDate", "odxCalendarCellSelectedDateRange", "odxCalendarCellPreviewDate"] }, { kind: "component", type: CalendarHeaderComponent, selector: "odx-calendar-header", inputs: ["activeDate", "calendarView", "minDate", "maxDate"], outputs: ["previous", "next", "changeView"] }, { kind: "pipe", type: DateLabelPipe, name: "odxDateLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
663
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarYearComponent, isStandalone: true, selector: "odx-calendar-year", providers: [CalendarYearService], usesInheritance: true, ngImport: i0, template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"3\">\n <odx-calendar-header\n (previous)=\"previousYear($event)\"\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (next)=\"nextYear($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: { year: 'numeric' } }}\n </odx-calendar-header>\n </th>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousMonth($event)\"\n (keydown.ArrowRight)=\"nextMonth($event)\"\n (keydown.ArrowUp)=\"previousSeason($event)\"\n (keydown.ArrowDown)=\"nextSeason($event)\"\n (keydown.PageDown)=\"nextYear($event)\"\n (keydown.PageUp)=\"previousYear($event)\"\n >\n <tr class=\"odx-calendar__season\" *ngFor=\"let season of calendarYear.seasons$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let month of season; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(month)\"\n [odxCalendarCell]=\"month\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(month)\"\n >\n {{ month | odxDateLabel: { month: 'short' } }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: CalendarCellDirective, selector: "[odxCalendarCell]", inputs: ["odxCalendarCell", "odxCalendarCellCalendarView", "odxCalendarCellActiveDate", "odxCalendarCellSelectedDate", "odxCalendarCellSelectedDateRange", "odxCalendarCellPreviewDate"] }, { kind: "component", type: CalendarHeaderComponent, selector: "odx-calendar-header", inputs: ["activeDate", "calendarView", "minDate", "maxDate"], outputs: ["previous", "next", "changeView"] }, { kind: "pipe", type: DateLabelPipe, name: "odxDateLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
659
664
  };
660
665
  CalendarYearComponent = __decorate([
661
666
  CSSComponent('calendar-year')
662
667
  ], CalendarYearComponent);
663
668
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarYearComponent, decorators: [{
664
669
  type: Component,
665
- args: [{ selector: 'odx-calendar-year', standalone: true, imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [CalendarYearService], template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"3\">\n <odx-calendar-header\n (previous)=\"previousYear($event)\"\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (next)=\"nextYear($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: config.yearLabel }}\n </odx-calendar-header>\n </th>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousMonth($event)\"\n (keydown.ArrowRight)=\"nextMonth($event)\"\n (keydown.ArrowUp)=\"previousSeason($event)\"\n (keydown.ArrowDown)=\"nextSeason($event)\"\n (keydown.PageDown)=\"nextYear($event)\"\n (keydown.PageUp)=\"previousYear($event)\"\n >\n <tr class=\"odx-calendar__season\" *ngFor=\"let season of calendarYear.seasons$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let month of season; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(month)\"\n [odxCalendarCell]=\"month\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(month)\"\n >\n {{ month | odxDateLabel: config.monthLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n" }]
670
+ args: [{ selector: 'odx-calendar-year', standalone: true, imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [CalendarYearService], template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"3\">\n <odx-calendar-header\n (previous)=\"previousYear($event)\"\n [calendarView]=\"currentView\"\n [activeDate]=\"activeDate\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n (next)=\"nextYear($event)\"\n (changeView)=\"changeView()\"\n >\n {{ activeDate | odxDateLabel: { year: 'numeric' } }}\n </odx-calendar-header>\n </th>\n </tr>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousMonth($event)\"\n (keydown.ArrowRight)=\"nextMonth($event)\"\n (keydown.ArrowUp)=\"previousSeason($event)\"\n (keydown.ArrowDown)=\"nextSeason($event)\"\n (keydown.PageDown)=\"nextYear($event)\"\n (keydown.PageUp)=\"previousYear($event)\"\n >\n <tr class=\"odx-calendar__season\" *ngFor=\"let season of calendarYear.seasons$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let month of season; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(month)\"\n [odxCalendarCell]=\"month\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(month)\"\n >\n {{ month | odxDateLabel: { month: 'short' } }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n" }]
666
671
  }] });
667
672
 
668
673
  let CalendarYearsComponent = class CalendarYearsComponent extends CalendarViewDirective {
@@ -704,14 +709,14 @@ let CalendarYearsComponent = class CalendarYearsComponent extends CalendarViewDi
704
709
  }
705
710
  }
706
711
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarYearsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
707
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarYearsComponent, isStandalone: true, selector: "odx-calendar-years", providers: [CalendarYearsService], usesInheritance: true, ngImport: i0, template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\" *ngrxLet=\"calendar.activeDate$ as activeDate\">\n <thead aria-hidden=\"true\">\n <th></th>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousYear($event)\"\n (keydown.ArrowRight)=\"nextYear($event)\"\n (keydown.ArrowUp)=\"previousRow($event)\"\n (keydown.ArrowDown)=\"nextRow($event)\"\n >\n <tr class=\"odx-calendar__year-row\" *ngFor=\"let yearRow of calendarYears.years$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let year of yearRow; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(year)\"\n [odxCalendarCell]=\"year\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(year)\"\n >\n {{ year | odxDateLabel: config.yearLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: i3.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "directive", type: CalendarCellDirective, selector: "[odxCalendarCell]", inputs: ["odxCalendarCell", "odxCalendarCellCalendarView", "odxCalendarCellActiveDate", "odxCalendarCellSelectedDate", "odxCalendarCellSelectedDateRange", "odxCalendarCellPreviewDate"] }, { kind: "pipe", type: DateLabelPipe, name: "odxDateLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
712
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarYearsComponent, isStandalone: true, selector: "odx-calendar-years", providers: [CalendarYearsService], usesInheritance: true, ngImport: i0, template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\" *ngrxLet=\"calendar.activeDate$ as activeDate\">\n <thead aria-hidden=\"true\">\n <th></th>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousYear($event)\"\n (keydown.ArrowRight)=\"nextYear($event)\"\n (keydown.ArrowUp)=\"previousRow($event)\"\n (keydown.ArrowDown)=\"nextRow($event)\"\n >\n <tr class=\"odx-calendar__year-row\" *ngFor=\"let yearRow of calendarYears.years$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let year of yearRow; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(year)\"\n [odxCalendarCell]=\"year\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(year)\"\n >\n {{ year | odxDateLabel: { year: 'numeric' } }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: i3.LetDirective, selector: "[ngrxLet]", inputs: ["ngrxLet", "ngrxLetSuspenseTpl"] }, { kind: "directive", type: CalendarCellDirective, selector: "[odxCalendarCell]", inputs: ["odxCalendarCell", "odxCalendarCellCalendarView", "odxCalendarCellActiveDate", "odxCalendarCellSelectedDate", "odxCalendarCellSelectedDateRange", "odxCalendarCellPreviewDate"] }, { kind: "pipe", type: DateLabelPipe, name: "odxDateLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
708
713
  };
709
714
  CalendarYearsComponent = __decorate([
710
715
  CSSComponent('calendar-years')
711
716
  ], CalendarYearsComponent);
712
717
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarYearsComponent, decorators: [{
713
718
  type: Component,
714
- args: [{ selector: 'odx-calendar-years', standalone: true, imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [CalendarYearsService], template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\" *ngrxLet=\"calendar.activeDate$ as activeDate\">\n <thead aria-hidden=\"true\">\n <th></th>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousYear($event)\"\n (keydown.ArrowRight)=\"nextYear($event)\"\n (keydown.ArrowUp)=\"previousRow($event)\"\n (keydown.ArrowDown)=\"nextRow($event)\"\n >\n <tr class=\"odx-calendar__year-row\" *ngFor=\"let yearRow of calendarYears.years$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let year of yearRow; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(year)\"\n [odxCalendarCell]=\"year\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(year)\"\n >\n {{ year | odxDateLabel: config.yearLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n" }]
719
+ args: [{ selector: 'odx-calendar-years', standalone: true, imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [CalendarYearsService], template: "<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\" *ngrxLet=\"calendar.activeDate$ as activeDate\">\n <thead aria-hidden=\"true\">\n <th></th>\n </thead>\n\n <tbody\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousYear($event)\"\n (keydown.ArrowRight)=\"nextYear($event)\"\n (keydown.ArrowUp)=\"previousRow($event)\"\n (keydown.ArrowDown)=\"nextRow($event)\"\n >\n <tr class=\"odx-calendar__year-row\" *ngFor=\"let yearRow of calendarYears.years$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let year of yearRow; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(year)\"\n [odxCalendarCell]=\"year\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellCalendarView]=\"currentView\"\n [odxCalendarCellSelectedDate]=\"selectedDate\"\n [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n (click)=\"selectDate(year)\"\n >\n {{ year | odxDateLabel: { year: 'numeric' } }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n" }]
715
720
  }] });
716
721
 
717
722
  class DaterangeService {