{"version":3,"file":"odx-angular-components-calendar.mjs","sources":["../../../../libs/angular/components/calendar/src/lib/models/selection-mode.ts","../../../../libs/angular/components/calendar/src/lib/calendar.config.ts","../../../../libs/angular/components/calendar/src/lib/models/calendar-view.ts","../../../../libs/angular/components/calendar/src/lib/models/date-range.ts","../../../../libs/angular/components/calendar/src/lib/models/selected-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/check-identical-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/get-A11y-label.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-max-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-min-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/is-date-disabled.ts","../../../../libs/angular/components/calendar/src/lib/utils/parse-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-daterange.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-next-date-set.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-previous-date-set.ts","../../../../libs/angular/components/calendar/src/lib/calendar.service.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-header/calendar-header.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-header/calendar-header.component.html","../../../../libs/angular/components/calendar/src/lib/pipes/date-label.pipe.ts","../../../../libs/angular/components/calendar/src/lib/utils/check-cell-in-range.ts","../../../../libs/angular/components/calendar/src/lib/directives/calendar-cell.directive.ts","../../../../libs/angular/components/calendar/src/lib/directives/calendar-view.directive.ts","../../../../libs/angular/components/calendar/src/lib/services/calendar-month.service.ts","../../../../libs/angular/components/calendar/src/lib/services/calendar-year.service.ts","../../../../libs/angular/components/calendar/src/lib/services/calendar-years.service.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-month/calendar-month.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-month/calendar-month.component.html","../../../../libs/angular/components/calendar/src/lib/components/calendar-year/calendar-year.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-year/calendar-year.component.html","../../../../libs/angular/components/calendar/src/lib/components/calendar-years/calendar-years.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-years/calendar-years.component.html","../../../../libs/angular/components/calendar/src/lib/daterange.service.ts","../../../../libs/angular/components/calendar/src/lib/calendar.component.ts","../../../../libs/angular/components/calendar/src/lib/calendar.component.html","../../../../libs/angular/components/calendar/src/odx-angular-components-calendar.ts"],"sourcesContent":["export enum CalendarSelectionMode {\n  Date,\n  DateRange,\n}\n","import { createConfigTokens } from '@odx/angular/utils';\nimport { CalendarSelectionMode } from './models/selection-mode';\n\nexport interface CalendarConfig {\n  /**\n   * Displays the adjacent days in month calendar view.\n   *\n   * @default true\n   */\n  displayAdjacentDays: boolean;\n  /**\n   * Switches between single selection and a daterange selection.\n   *\n   * @default CalendarSelectionMode.Date\n   */\n  selectionMode: CalendarSelectionMode;\n\n  /**\n   * Configuration for the year view.\n   *\n   * @typedef {Object} YearViewConfig\n   * @property {number} itemsPerRow - Number of items to display per row in the year view.\n   * @default 3\n   */\n  /**\n   * Configuration options for the calendar's year view.\n   *\n   * @type {YearViewConfig}\n   */\n  yearView: { itemsPerRow: number };\n  /**\n   * Configuration for the years view.\n   *\n   * @typedef {Object} YearsViewConfig\n   * @property {number} itemsPerRow - Number of items to display per row in the years view.\n   * @property {number} [padding=100] - The number of year items before and after the current year\n   * @default\n   *   itemsPerRow: 3,\n   *   padding: 100\n   */\n  /**\n   * Configuration options for the calendar's years view.\n   *\n   * @type {YearsViewConfig}\n   */\n  yearsView: { itemsPerRow: number; padding: number };\n}\n\n/**\n * Tools for customizing configuration for the calendar component\n *\n * @example\n * ```ts\n * @Component({\n *  ...\n *  providers: [provideCalendarConfig({ selectionMode: CalendarSelectionMode.DateRange, locale: new BehaviorSubject<Locale>(deDE)})]\n * })\n * export class MyDateRangepickerComponent {}\n * ```\n *\n * @example\n * ```ts\n * constructor(@Inject(CalendarConfig) private readonly calendarConfig: CalendarConfig) {}\n * ```\n */\nexport const { CalendarConfig, CalendarDefaultConfig, injectCalendarConfig, provideCalendarConfig } = createConfigTokens(\n  'Calendar',\n  '@odx/angular/components/calendar',\n  {\n    displayAdjacentDays: true,\n    selectionMode: CalendarSelectionMode.Date,\n    yearView: {\n      itemsPerRow: 3,\n    },\n    yearsView: {\n      itemsPerRow: 3,\n      padding: 100,\n    },\n  },\n);\n","export enum CalendarView {\n  Month = 'month',\n  Year = 'year',\n  Years = 'years',\n}\n","import { DateType } from './date-type';\n\nexport interface DateTypeRange {\n  start: DateType | null;\n  end: DateType | null;\n}\n\nexport interface DateRange {\n  start: Date | null;\n  end: Date | null;\n}\n\nexport enum DateRangeSelectionState {\n  NothingSelected = 'NothingSelected',\n  StartSelected = 'StartSelected',\n  EndSelected = 'EndSelected',\n}\n\nexport interface DateRangeState {\n  selectionState: DateRangeSelectionState;\n  dateRange: DateRange;\n}\n","export interface DateSelectEvent {\n  date: Date | null;\n  options: DateSelectOptions;\n}\n\nexport interface DateSelectOptions {\n  skipDaterangeUpdate?: boolean;\n  emitOutside?: boolean;\n}\n\nexport const dateSelectOptionsDefaults: DateSelectOptions = {\n  skipDaterangeUpdate: false,\n  emitOutside: false,\n};\n","import { isSameDay, isSameMonth, isSameYear } from 'date-fns';\nimport { CalendarView, DateValidator } from '../models';\n\nconst dateValidators: Record<CalendarView, DateValidator> = {\n  [CalendarView.Month]: (currentDate: Date, date: Date) => isSameDay(currentDate, date),\n  [CalendarView.Year]: (currentDate: Date, date: Date) => isSameMonth(currentDate, date),\n  [CalendarView.Years]: (currentDate: Date, date: Date) => isSameYear(currentDate, date),\n};\n\n/** @internal */\nexport function checkIdenticalDate(currentDate: Date, date: Date, calendarView: CalendarView): boolean {\n  return dateValidators[calendarView](currentDate, date);\n}\n","import { CalendarView } from '../models';\n\n/** @internal */\nexport function getA11yLabel(calendarView: CalendarView): Intl.DateTimeFormatOptions {\n  switch (calendarView) {\n    case CalendarView.Year:\n      return { month: 'long', year: 'numeric' };\n\n    case CalendarView.Years:\n      return { year: 'numeric' };\n\n    default:\n      return { month: 'long', day: '2-digit', year: 'numeric' };\n  }\n}\n","import { endOfDay, endOfMonth, endOfYear } from 'date-fns';\nimport { CalendarView, DateValidator } from '../models';\n\nconst dateValidators: Record<CalendarView, DateValidator> = {\n  [CalendarView.Month]: (maxDate: Date, date: Date) => endOfDay(maxDate) < endOfDay(date),\n  [CalendarView.Year]: (maxDate: Date, date: Date) => endOfMonth(maxDate) < endOfMonth(date),\n  [CalendarView.Years]: (maxDate: Date, date: Date) => endOfYear(maxDate) < endOfYear(date),\n};\n\n/** @internal */\nexport function validateMaxDate(maxDate: Date, date: Date, calendarView: CalendarView): boolean {\n  return dateValidators[calendarView](maxDate, date);\n}\n","import { startOfDay, startOfMonth, startOfYear } from 'date-fns';\nimport { CalendarView, DateValidator } from '../models';\n\nconst dateValidators: Record<CalendarView, DateValidator> = {\n  [CalendarView.Month]: (minDate: Date, date: Date) => startOfDay(minDate) > startOfDay(date),\n  [CalendarView.Year]: (minDate: Date, date: Date) => startOfMonth(minDate) > startOfMonth(date),\n  [CalendarView.Years]: (minDate: Date, date: Date) => startOfYear(minDate) > startOfYear(date),\n};\n\n/** @internal */\nexport function validateMinDate(maxDate: Date, date: Date, calendarView: CalendarView): boolean {\n  return dateValidators[calendarView](maxDate, date);\n}\n","import { CalendarView, DateFilter } from '../models';\nimport { validateMaxDate } from './validate-max-date';\nimport { validateMinDate } from './validate-min-date';\n\n/** @internal */\nexport function isDateDisabled(date: Date, calendarView: CalendarView, minDate?: Date | null, maxDate?: Date | null, filterFn?: DateFilter | null): boolean {\n  const minDateValidation = minDate && validateMinDate(minDate, date, calendarView);\n  const maxDateValidation = maxDate && validateMaxDate(maxDate, date, calendarView);\n  const isDateFiltered = calendarView === CalendarView.Month && !!filterFn?.(date);\n\n  return minDateValidation || maxDateValidation || isDateFiltered;\n}\n","import { isString } from '@odx/angular/utils';\nimport { isValid, toDate } from 'date-fns';\nimport { DateType } from '../models';\n\n/** @internal */\nexport function parseDate(value: DateType): Date {\n  try {\n    const timestamp = isString(value) ? Date.parse(value) : value;\n\n    if (!isValid(timestamp)) {\n      return new Date();\n    }\n\n    return toDate(timestamp);\n  } catch {\n    return new Date();\n  }\n}\n","import { isBefore, isEqual } from 'date-fns';\n\n/** @internal */\nexport function validateDaterange(start: Date, end: Date): boolean {\n  return isBefore(start, end) || isEqual(start, end);\n}\n","import { addMonths, startOfMonth, startOfYear } from 'date-fns';\nimport { CalendarView, DateValidator } from '../models';\n\nconst dateValidators: Record<CalendarView, DateValidator> = {\n  [CalendarView.Month]: (maxDate: Date, date: Date) => maxDate < startOfMonth(addMonths(date, 1)),\n  [CalendarView.Year]: (maxDate: Date, date: Date) => maxDate < startOfYear(addMonths(date, 12)),\n  [CalendarView.Years]: () => false,\n};\n\n/** @internal */\nexport function validateNextDateSet(maxDate: Date, date: Date, calendarView: CalendarView): boolean {\n  return dateValidators[calendarView](maxDate, date);\n}\n","import { endOfMonth, endOfYear, subMonths } from 'date-fns';\nimport { CalendarView, DateValidator } from '../models';\n\nconst dateValidators: Record<CalendarView, DateValidator> = {\n  [CalendarView.Month]: (minDate: Date, date: Date) => minDate > endOfMonth(subMonths(date, 1)),\n  [CalendarView.Year]: (minDate: Date, date: Date) => minDate > endOfYear(subMonths(date, 12)),\n  [CalendarView.Years]: () => false,\n};\n\n/** @internal */\nexport function validatePreviousDateSet(minDate: Date, date: Date, calendarView: CalendarView): boolean {\n  return dateValidators[calendarView](minDate, date);\n}\n","import { EventEmitter, Injectable } from '@angular/core';\nimport { isPresent as isNonNullable } from '@odx/angular/utils';\nimport { isEqual, startOfDay } from 'date-fns';\nimport { BehaviorSubject, distinctUntilChanged, filter, map, merge, shareReplay } from 'rxjs';\nimport { CalendarView, DateSelectEvent, DateSelectOptions, DateType, dateSelectOptionsDefaults } from './models';\nimport { parseDate } from './utils';\n\n/**\n * Manages the state and functionality related to a calendar, such as tracking the active date,\n * hovered date, current calendar view, and handling date selections. It provides observable streams\n * that components can subscribe to in order to react to changes in the calendar's state.\n */\n@Injectable()\nexport class CalendarService {\n  private readonly activeDate$$ = new BehaviorSubject<Date | null>(null); // the date that is being focused by click or arrow keys\n  private readonly hoveredDate$$ = new BehaviorSubject<Date | null>(null); // the date that is being hovered by a pointing device\n  private readonly calendarView$$ = new BehaviorSubject<CalendarView>(CalendarView.Month);\n  private readonly dateSelectEvents$$ = new BehaviorSubject<DateSelectEvent>({\n    date: null,\n    options: dateSelectOptionsDefaults,\n  });\n\n  /**\n   * Currently selected date to external subscribers, particularly useful for two-way binding.\n   *\n   * @emits {Date | null} The currently selected date or null if no date is selected.\n   */\n  public readonly outputDate$ = new EventEmitter<Date | null>();\n\n  /**\n   * An observable of the current calendar view state, allowing subscribers to adjust UI components\n   * based on the view (e.g., month, year, multi-year).\n   *\n   * @emits {CalendarView} The current calendar view state.\n   */\n  public readonly calendarView$ = this.calendarView$$.pipe(shareReplay({ bufferSize: 1, refCount: true }));\n\n  /**\n   * Streams date select events which include the selected date and any associated options.\n   *\n   * @emits {DateSelectEvent} The date selection event, including the selected date and options.\n   */\n  public readonly dateSelectEvents$ = this.dateSelectEvents$$.asObservable();\n\n  /**\n   * Streams the last selected date, enabling components to update based on the latest date selection.\n   *\n   * @emits {Date | null} The last selected date or null if no date has been selected.\n   */\n  public readonly selectedDate$ = this.dateSelectEvents$$.pipe(\n    map((x) => x.date),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * Streams the active date which reflects the date that is being focused, either through UI interactions\n   * like clicking or using arrow keys.\n   *\n   * @emits {Date | null} The active date or null if no date is active.\n   */\n  public readonly activeDate$ = this.activeDate$$.pipe(\n    filter(Boolean),\n    distinctUntilChanged((prev, curr) => isEqual(prev, curr)),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * Combines streams of active and hovered dates to provide a merged view of preview dates.\n   *\n   * @emits {Date | null} The preview date or null if no date is being previewed.\n   */\n  public readonly previewDate$ = merge(this.activeDate$$, this.hoveredDate$$).pipe(\n    filter(Boolean),\n    distinctUntilChanged((prev, curr) => isEqual(prev, curr)),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * Updates the active date state with a new date, parsed from various input types.\n   *\n   * @param {DateType | null} value - The new date or null to clear the active date.\n   */\n  public setActiveDate(value: DateType | null): void {\n    if (!isNonNullable(value)) return;\n    this.activeDate$$.next(parseDate(value));\n  }\n\n  /**\n   * Sets a date as hovered, which can be used to preview date ranges or effects in the UI.\n   *\n   * @param {DateType | null} value - The date being hovered or null to clear the hovered state.\n   */\n  public setHoveredDate(value: DateType | null): void {\n    if (!isNonNullable(value)) return;\n    this.hoveredDate$$.next(parseDate(value));\n  }\n\n  /**\n   * Selects a date and updates relevant states and options. Can emit the selected date externally\n   * if specified in the options.\n   *\n   * @param {DateType | null} value - The date to select.\n   * @param {DateSelectOptions} [options] - Optional settings for the date selection, such as whether\n   *                                        to emit the date change externally.\n   */\n  public selectDate(value: DateType | null, options?: DateSelectOptions): void {\n    const date = isNonNullable(value) ? startOfDay(parseDate(value)) : null;\n    this.dateSelectEvents$$.next({ date, options: { ...dateSelectOptionsDefaults, ...options } });\n    if (options?.emitOutside) {\n      this.outputDate$.next(date);\n    }\n    this.setActiveDate(date);\n  }\n\n  /**\n   * Changes the calendar view to the specified view, updating the internal state and notifying subscribers.\n   *\n   * @param {CalendarView} view - The new view to set for the calendar.\n   */\n  public changeView(view: CalendarView): void {\n    this.calendarView$$.next(view);\n  }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { NgChanges, hasChanged, injectElement } from '@odx/angular/utils';\nimport { CalendarView } from '../../models';\nimport { validateNextDateSet, validatePreviousDateSet } from '../../utils';\n\n/**\n * Represents the header component of the calendar.\n */\n@CSSComponent('calendar-header')\n@Component({\n  selector: 'odx-calendar-header',\n  standalone: true,\n  imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent],\n  templateUrl: './calendar-header.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n})\nexport class CalendarHeaderComponent implements OnChanges {\n  protected isPreviousDisabled = false;\n  protected isNextDisabled = false;\n\n  public readonly element = injectElement();\n\n  /**\n   * The active date of the calendar.\n   *\n   * @type {Date}\n   */\n  @Input()\n  public activeDate!: Date;\n\n  /**\n   * The current view of the calendar.\n   *\n   * @type {CalendarView}\n   */\n  @Input()\n  public calendarView!: CalendarView;\n\n  /**\n   * The minimum selectable date in the calendar.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public minDate?: Date | null = null;\n\n  /**\n   * The maximum selectable date in the calendar.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public maxDate?: Date | null = null;\n\n  /**\n   * Event emitted when the previous button is clicked.\n   *\n   * @emits {MouseEvent}\n   */\n  @Output()\n  public previous = new EventEmitter<MouseEvent>();\n\n  /**\n   * Event emitted when the next button is clicked.\n   *\n   * @emits {MouseEvent}\n   */\n  @Output()\n  public next = new EventEmitter<MouseEvent>();\n\n  /**\n   * Event emitted when the view is changed.\n   *\n   * @emits {void}\n   */\n  @Output()\n  public changeView = new EventEmitter<void>();\n\n  public ngOnChanges(changes: NgChanges<CalendarHeaderComponent>): void {\n    if (hasChanged(changes, ['activeDate', 'calendarView', 'minDate', 'maxDate'], false)) {\n      this.isPreviousDisabled = this.minDate ? validatePreviousDateSet(this.minDate, this.activeDate, this.calendarView) : false;\n      this.isNextDisabled = this.maxDate ? validateNextDateSet(this.maxDate, this.activeDate, this.calendarView) : false;\n    }\n  }\n\n  protected previousClicked(event: MouseEvent): void {\n    if (this.isPreviousDisabled) return;\n    this.previous.emit(event);\n  }\n\n  protected nextClicked(event: MouseEvent): void {\n    if (this.isNextDisabled) return;\n    this.next.emit(event);\n  }\n}\n","<odx-action-group>\n  <button odxButton [disabled]=\"isPreviousDisabled\" (click)=\"previousClicked($event)\"><odx-icon name=\"core::chevron-left\" /></button>\n\n  <button odxButton class=\"odx-calendar-header__title\" (click)=\"changeView.emit()\">\n    <ng-content />\n  </button>\n\n  <button odxButton [disabled]=\"isNextDisabled\" (click)=\"nextClicked($event)\"><odx-icon name=\"core::chevron-right\" /></button>\n</odx-action-group>\n","import { ChangeDetectorRef, Pipe, PipeTransform, inject } from '@angular/core';\nimport { WindowRef } from '@odx/angular';\nimport { fastDeepEqual } from '@odx/angular/internal';\nimport { LocalizationService } from '@odx/angular/localization';\n\n/**\n * Transforms a given date into a formatted string based on the provided date format string.\n * The transformation utilizes the `format` function from date-fns library and considers the locale\n * from the global calendar configuration to ensure the date is represented in a locale-appropriate format.\n *\n * @param {Date | null} value - The date to format.\n * @param {Intl.DateTimeFormatOptions} formatOptions - The format options to apply to the date.\n * @returns {string} - The formatted date string.\n */\n@Pipe({\n  standalone: true,\n  name: 'odxDateLabel',\n  pure: false,\n})\nexport class DateLabelPipe implements PipeTransform {\n  private readonly localizationService = inject(LocalizationService);\n  private readonly windowRef = inject(WindowRef);\n  private readonly cdr = inject(ChangeDetectorRef);\n  private lastValue: Date | null = null;\n  private lastFormatOptions: Intl.DateTimeFormatOptions | null = null;\n  private formattedValue = '';\n\n  public transform(value: Date | null, formatOptions: Intl.DateTimeFormatOptions): string {\n    if (!value) return '';\n\n    if (value === this.lastValue && fastDeepEqual(formatOptions, this.lastFormatOptions)) {\n      return this.formattedValue;\n    }\n\n    this.formattedValue = this.windowRef.nativeWindow.Intl.DateTimeFormat(this.localizationService.getActiveLanguage(), formatOptions).format(value);\n    this.lastValue = value;\n    this.lastFormatOptions = formatOptions;\n    this.cdr.markForCheck();\n\n    return this.formattedValue;\n  }\n}\n","import { isSameDay, isWithinInterval } from 'date-fns';\nimport { CalendarView, DateRange, DateRangeSelectionState, DateRangeState } from '../models';\nimport { validateDaterange } from './validate-daterange';\nexport interface DateRangeValidationInfo {\n  isRangeStart: boolean;\n  isRangeEnd: boolean;\n  isInRange: boolean;\n}\n\n/** @internal */\nexport function checkCellInRange(\n  date: Date,\n  dateRangeState: DateRangeState,\n  calendarView: CalendarView,\n  targetSelectionState: DateRangeSelectionState,\n): DateRangeValidationInfo {\n  const { start, end } = dateRangeState.dateRange;\n\n  if (calendarView !== CalendarView.Month || dateRangeState.selectionState !== targetSelectionState || (start && end && !validateDaterange(start, end))) {\n    return {\n      isRangeStart: false,\n      isRangeEnd: false,\n      isInRange: false,\n    };\n  }\n  const isRangeStart = start ? isSameDay(date, start) : false;\n  const isRangeEnd = end ? isSameDay(date, end) : false;\n  return {\n    isRangeStart,\n    isRangeEnd,\n    isInRange: isRangeEnd || isRangeStart || isWithinInclusiveRange(date, { start, end }),\n  };\n}\n\nfunction isWithinInclusiveRange(date: Date, dateRange: DateRange): boolean {\n  const { start, end } = dateRange;\n  if (!start || !end) {\n    return false;\n  }\n\n  return isWithinInterval(date, { start, end });\n}\n","import { Directive, inject, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { deferFn, EventManager, hasChanged, injectElement, NgChanges } from '@odx/angular/utils';\nimport { isSameMonth } from 'date-fns';\nimport { injectCalendarConfig } from '../calendar.config';\nimport { CalendarService } from '../calendar.service';\nimport { CalendarSelectionMode, CalendarView, DateRangeSelectionState, DateRangeState } from '../models';\nimport { DateLabelPipe } from '../pipes';\nimport { checkIdenticalDate, getA11yLabel } from '../utils';\nimport { checkCellInRange } from '../utils/check-cell-in-range';\n\n/**\n * Represents a directive for a cell in the calendar view.\n */\n@CSSComponent('calendar-cell')\n@Directive({\n  selector: '[odxCalendarCell]',\n  standalone: true,\n  providers: [DisabledController.connect(), DateLabelPipe],\n  host: {\n    '[class.is-disabled]': 'isDisabled',\n    '[class.is-selected]': 'isSelected',\n    '[class.is-in-any-range]': 'isInRange || isInPreviewRange',\n    '[attr.hidden]': 'isHidden || null',\n    '[tabindex]': 'isActive ? 0 : -1',\n    '[attr.aria-label]': 'ariaLabel',\n    '[attr.aria-disabled]': 'isDisabled',\n    '[attr.type]': '\"button\"',\n  },\n})\nexport class CalendarCellDirective implements OnChanges, OnInit, OnDestroy {\n  private readonly disabledController = DisabledController.inject();\n\n  private readonly eventManager = inject(EventManager);\n  private readonly calendarService = inject(CalendarService);\n  private registeredEventId = '';\n\n  protected readonly config = injectCalendarConfig();\n  protected readonly dateLabelPipe = inject(DateLabelPipe);\n  protected isActive = false;\n  protected isSelected = false;\n  protected isHidden = false;\n  protected ariaLabel = '';\n\n  protected get isDisabled(): boolean {\n    return !!this.disabledController?.disabled;\n  }\n\n  @CSSModifier()\n  protected isCurrent = false;\n\n  @CSSModifier()\n  protected adjacent = false;\n\n  @CSSModifier()\n  protected isInRange = false;\n\n  @CSSModifier()\n  protected isRangeStart = false;\n\n  @CSSModifier()\n  protected isRangeEnd = false;\n\n  @CSSModifier()\n  protected isInPreviewRange = false;\n\n  @CSSModifier()\n  protected isPreviewRangeStart = false;\n\n  @CSSModifier()\n  protected isPreviewRangeEnd = false;\n\n  public readonly element = injectElement();\n\n  /**\n   * Represents the date associated with a calendar cell.\n   * The date is used to determine the date displayed in the cell.\n   *\n   * @type {Date}\n   */\n  @Input('odxCalendarCell')\n  public date!: Date;\n\n  /**\n   * Represents the calendar view of the cell.\n   * The calendar view determines how the cell is displayed in the calendar.\n   *\n   * @type {CalendarView}\n   */\n  @Input('odxCalendarCellCalendarView')\n  public calendarView!: CalendarView;\n\n  /**\n   * Represents the active date in the calendar view.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input('odxCalendarCellActiveDate')\n  public activeDate: Date | null = null;\n\n  /**\n   * Represents the selected date in the calendar view.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input('odxCalendarCellSelectedDate')\n  public selectedDate?: Date | null = null;\n\n  /**\n   * Represents the selected date range in the calendar view.\n   *\n   * @type {DateRangeState | null}\n   * @default null\n   */\n  @Input('odxCalendarCellSelectedDateRange')\n  public selectedDateRange?: DateRangeState | null = null;\n\n  /**\n   * Represents the preview date for the calendar view.\n   * This property represents the date that is currently being previewed in the calendar view.\n   * It can be set to a specific date or null if no date is being previewed.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input('odxCalendarCellPreviewDate')\n  public previewDate?: Date | null = null;\n\n  public ngOnChanges(changes: NgChanges<CalendarCellDirective>): void {\n    if (hasChanged(changes, ['date', 'calendarView'], false)) {\n      this.ariaLabel = this.dateLabelPipe.transform(this.date, getA11yLabel(this.calendarView));\n      this.isCurrent = checkIdenticalDate(this.date, new Date(), this.calendarView);\n    }\n\n    if (this.activeDate && hasChanged(changes, ['date', 'activeDate'], false)) {\n      this.isActive = checkIdenticalDate(this.date, this.activeDate, this.calendarView);\n      if (this.calendarView === CalendarView.Month) {\n        this.adjacent = !isSameMonth(this.date, this.activeDate);\n        this.isHidden = this.adjacent && !this.config.displayAdjacentDays;\n      }\n    }\n\n    if (this.selectedDate && hasChanged(changes, ['date', 'selectedDate'], false)) {\n      this.isSelected = checkIdenticalDate(this.date, this.selectedDate, this.calendarView);\n    }\n\n    if (this.config.selectionMode === CalendarSelectionMode.DateRange && this.selectedDateRange && hasChanged(changes, ['date', 'selectedDateRange'], false)) {\n      const start = this.selectedDateRange.dateRange.start;\n      this.isSelected = checkIdenticalDate(this.date, start || new Date(), this.calendarView);\n      const rangeValidation = checkCellInRange(this.date, this.selectedDateRange, this.calendarView, DateRangeSelectionState.EndSelected);\n      this.isRangeStart = rangeValidation.isRangeStart;\n      this.isRangeEnd = rangeValidation.isRangeEnd;\n      this.isInRange = rangeValidation.isInRange;\n    }\n\n    if (\n      this.config.selectionMode === CalendarSelectionMode.DateRange &&\n      this.previewDate &&\n      this.selectedDateRange &&\n      hasChanged(changes, ['date', 'selectedDateRange', 'previewDate'])\n    ) {\n      const previewRange: DateRangeState = {\n        selectionState: this.selectedDateRange.selectionState,\n        dateRange: { start: this.selectedDateRange.dateRange.start, end: this.previewDate },\n      };\n      const rangeValidation = checkCellInRange(this.date, previewRange, this.calendarView, DateRangeSelectionState.StartSelected);\n      this.isPreviewRangeStart = rangeValidation.isRangeStart;\n      this.isPreviewRangeEnd = rangeValidation.isRangeEnd;\n      this.isInPreviewRange = rangeValidation.isInRange;\n    }\n\n    if (this.isActive) {\n      deferFn(() => this.element.nativeElement.focus());\n    }\n  }\n\n  public ngOnInit(): void {\n    if (this.config.selectionMode === CalendarSelectionMode.DateRange && this.calendarView === CalendarView.Month) {\n      this.registerEvents();\n    }\n  }\n\n  public ngOnDestroy(): void {\n    this.eventManager.destroyListener(this.registeredEventId);\n  }\n\n  private registerEvents(): void {\n    this.registeredEventId = this.eventManager.register(\n      ['mouseover'],\n      (event) => {\n        event?.preventDefault();\n        event?.stopPropagation();\n        this.calendarService.setHoveredDate(this.date);\n      },\n      this.element.nativeElement,\n    )[0];\n  }\n}\n","import { Directive, inject, Input } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { injectCalendarConfig } from '../calendar.config';\nimport { CalendarService } from '../calendar.service';\nimport { CalendarView, DateFilter, DateRangeState } from '../models';\nimport { isDateDisabled } from '../utils';\n\n/**\n * Represents an abstract directive for a calendar view.\n */\n@Directive({\n  standalone: true,\n})\nexport abstract class CalendarViewDirective {\n  protected readonly takeUntilDestroyed = untilDestroyed();\n  protected readonly calendar = inject(CalendarService);\n  protected readonly config = injectCalendarConfig();\n  protected abstract readonly currentView: CalendarView;\n  protected abstract readonly nextView: CalendarView;\n\n  public readonly element = injectElement();\n\n  /**\n   * The active date for the calendar view.\n   *\n   * @type {Date}\n   */\n  @Input()\n  public activeDate!: Date;\n\n  /**\n   * The selected date in the calendar view.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public selectedDate?: Date | null = null;\n\n  /**\n   * The selected date range in the calendar view.\n   *\n   * @type {DateRangeState | null}\n   * @default null\n   */\n  @Input()\n  public selectedDateRange?: DateRangeState | null = null;\n\n  /**\n   * The preview date for the calendar view.\n   * This property represents the date that is currently being previewed in the calendar view.\n   * It can be set to a specific date or null if no date is being previewed.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public previewDate?: Date | null = null;\n\n  /**\n   * The minimum selectable date in the calendar view.\n   * If set, dates before this minimum date will be disabled for selection.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public minDate?: Date | null = null;\n\n  /**\n   * The maximum selectable date in the calendar view.\n   * If set, dates after this maximum date will be disabled for selection.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public maxDate?: Date | null = null;\n\n  /**\n   * The filter function used to determine if a date should be displayed in the calendar view.\n   * If set to `null`, no filtering will be applied.\n   *\n   * @type {DateFilter | null}\n   * @default null\n   *\n   * @remarks\n   * The filter function should accept a `Date` object as its parameter and return a boolean value.\n   * If the function returns `true`, the date will be displayed; if it returns `false`, the date will be hidden.\n   *\n   * @example\n   * ```ts\n   * // Filter out weekends\n   * const filterFn: DateFilter = (date) => date.getDay() !== 0 && date.getDay() !== 6;\n   * ```\n   */\n  @Input()\n  public filterFn?: DateFilter | null = null;\n\n  protected isDateDisabled(value: Date): boolean {\n    return isDateDisabled(value, this.currentView, this.minDate, this.maxDate, this.filterFn);\n  }\n\n  protected changeView(): void {\n    this.calendar.changeView(this.nextView);\n  }\n\n  protected updateActiveDate(event: Event, date: Date): void {\n    event.preventDefault();\n    event.stopPropagation();\n\n    this.calendar.setActiveDate(date);\n  }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { addDays, startOfMonth, startOfWeek } from 'date-fns';\nimport { map } from 'rxjs';\nimport { CalendarService } from '../calendar.service';\n\n/** @internal */\n@Injectable()\nexport class CalendarMonthService {\n  private readonly calendar = inject(CalendarService);\n  private readonly weeksInView = 6;\n\n  public readonly weekDays$ = this.calendar.activeDate$.pipe(map((date) => this.generateWeekDays(date)));\n  public readonly weeks$ = this.calendar.activeDate$.pipe(map((date) => this.generateWeeks(date)));\n\n  private generateWeekDays(date: Date): Date[] {\n    const firstWeekDay = startOfWeek(date, { weekStartsOn: 1 });\n    return Array.from({ length: 7 }, (_, i) => addDays(firstWeekDay, i));\n  }\n\n  private generateWeeks(date: Date): Date[][] {\n    const startOfTheSelectedMonth = startOfMonth(date);\n    const startDate = startOfWeek(startOfTheSelectedMonth, { weekStartsOn: 1 });\n    const allWeeks = [];\n\n    let currentDate = startDate;\n\n    for (let i = this.weeksInView; i > 0; i--) {\n      allWeeks.push(this.generateDaysForWeek(currentDate, date));\n      currentDate = addDays(currentDate, 7);\n    }\n\n    return allWeeks;\n  }\n\n  private generateDaysForWeek(date: Date, currentDate: Date): Date[] {\n    return Array.from({ length: 7 }).map((_, i) => addDays(date, i), currentDate);\n  }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { eachMonthOfInterval, endOfYear, startOfYear } from 'date-fns';\nimport { map } from 'rxjs';\nimport { injectCalendarConfig } from '../calendar.config';\nimport { CalendarService } from '../calendar.service';\n\n/** @internal */\n@Injectable()\nexport class CalendarYearService {\n  private readonly config = injectCalendarConfig();\n  private readonly calendar = inject(CalendarService);\n\n  public readonly seasons$ = this.calendar.activeDate$.pipe(map((selectedDate) => this.generateSeasons(selectedDate)));\n\n  private generateSeasons(date: Date): Date[][] {\n    const { itemsPerRow } = this.config.yearView;\n    const seasons = [];\n    const months = eachMonthOfInterval({\n      start: startOfYear(date),\n      end: endOfYear(date),\n    });\n\n    let index = 0;\n    while (index < months.length) {\n      seasons.push(months.slice(index, index + itemsPerRow));\n      index += itemsPerRow;\n    }\n\n    return seasons;\n  }\n}\n","import { Injectable } from '@angular/core';\nimport { addYears, getYear, setYear, startOfYear } from 'date-fns';\nimport { defer, of } from 'rxjs';\nimport { injectCalendarConfig } from '../calendar.config';\n\n/** @internal */\n@Injectable()\nexport class CalendarYearsService {\n  private readonly config = injectCalendarConfig();\n\n  public readonly years$ = defer(() => of(this.generateYears()));\n\n  private generateYears(): Date[][] {\n    const { itemsPerRow, padding } = this.config.yearsView;\n    const now = Date.now();\n    const startDate = startOfYear(addYears(now, -padding));\n    const startYear = getYear(startDate);\n    const endDate = startOfYear(addYears(now, padding));\n    const endYear = getYear(endDate);\n\n    const years: Date[] = [];\n    const yearRows: Date[][] = [];\n\n    for (let i = startYear; i <= endYear; i++) {\n      years.push(setYear(startDate, i));\n    }\n\n    let index = 0;\n    while (index < years.length) {\n      yearRows.push(years.slice(index, index + itemsPerRow));\n      index += itemsPerRow;\n    }\n\n    return yearRows;\n  }\n}\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { addDays, addMonths, addWeeks, subDays, subMonths, subWeeks } from 'date-fns';\nimport { CalendarCellDirective, CalendarViewDirective } from '../../directives';\nimport { CalendarView } from '../../models';\nimport { DateLabelPipe } from '../../pipes';\nimport { CalendarMonthService } from '../../services';\nimport { CalendarHeaderComponent } from '../calendar-header';\n\n/**\n * Represents a calendar month component.\n * This component extends the `CalendarViewDirective` class and provides functionality for managing the calendar month.\n *\n * @see {CalendarViewDirective}\n */\n@CSSComponent('calendar-month')\n@Component({\n  selector: 'odx-calendar-month',\n  standalone: true,\n  imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe],\n  templateUrl: './calendar-month.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  providers: [CalendarMonthService],\n})\nexport class CalendarMonthComponent extends CalendarViewDirective {\n  protected readonly calendarMonth = inject(CalendarMonthService);\n  protected readonly nextView = CalendarView.Years;\n  protected readonly currentView = CalendarView.Month;\n  protected previousDay(event: Event): void {\n    this.updateActiveDate(event, subDays(this.activeDate, 1));\n  }\n\n  protected nextDay(event: Event): void {\n    this.updateActiveDate(event, addDays(this.activeDate, 1));\n  }\n\n  protected previousWeek(event: Event): void {\n    this.updateActiveDate(event, subWeeks(this.activeDate, 1));\n  }\n\n  protected nextWeek(event: Event): void {\n    this.updateActiveDate(event, addWeeks(this.activeDate, 1));\n  }\n\n  protected previousMonth(event: Event): void {\n    this.updateActiveDate(event, subMonths(this.activeDate, 1));\n  }\n\n  protected nextMonth(event: Event): void {\n    this.updateActiveDate(event, addMonths(this.activeDate, 1));\n  }\n\n  protected selectDate(value: Date): void {\n    if (this.isDateDisabled(value)) return;\n\n    this.calendar.selectDate(value, { emitOutside: true });\n  }\n}\n","<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      @for (day of calendarMonth.weekDays$ | async; track $index) {\n        <td>\n          {{ (day | odxDateLabel: { weekday: 'short' }).charAt(0) }}\n        </td>\n      }\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    @for (week of calendarMonth.weeks$ | async; track $index) {\n      <tr>\n        @for (day of week; track $index) {\n          <td role=\"gridcell\">\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        }\n      </tr>\n    }\n  </tbody>\n</table>\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { addMonths, getMonth, setMonth, subMonths } from 'date-fns';\nimport { CalendarCellDirective, CalendarViewDirective } from '../../directives';\nimport { CalendarView } from '../../models';\nimport { DateLabelPipe } from '../../pipes';\nimport { CalendarYearService } from '../../services';\nimport { CalendarHeaderComponent } from '../calendar-header';\n\n/**\n * Represents a component for displaying a calendar year view.\n * Extends the `CalendarViewDirective` class.\n *\n * @see {CalendarViewDirective}\n */\n@CSSComponent('calendar-year')\n@Component({\n  selector: 'odx-calendar-year',\n  standalone: true,\n  imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe],\n  templateUrl: './calendar-year.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  providers: [CalendarYearService],\n})\nexport class CalendarYearComponent extends CalendarViewDirective {\n  protected readonly calendarYear = inject(CalendarYearService);\n  protected readonly nextView = CalendarView.Month;\n  protected readonly currentView = CalendarView.Year;\n\n  protected previousMonth(event: Event): void {\n    this.updateActiveDate(event, subMonths(this.activeDate, 1));\n  }\n\n  protected nextMonth(event: Event): void {\n    this.updateActiveDate(event, addMonths(this.activeDate, 1));\n  }\n\n  protected previousSeason(event: Event): void {\n    this.updateActiveDate(event, subMonths(this.activeDate, 3));\n  }\n\n  protected nextSeason(event: Event): void {\n    this.updateActiveDate(event, addMonths(this.activeDate, 3));\n  }\n\n  protected previousYear(event: Event): void {\n    this.updateActiveDate(event, subMonths(this.activeDate, 12));\n  }\n\n  protected nextYear(event: Event): void {\n    this.updateActiveDate(event, addMonths(this.activeDate, 12));\n  }\n\n  protected selectDate(value: Date): void {\n    if (this.isDateDisabled(value)) return;\n\n    const date = setMonth(this.activeDate, getMonth(value));\n    this.calendar.selectDate(date, { skipDaterangeUpdate: true });\n\n    this.changeView();\n  }\n}\n","<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    @for (season of calendarYear.seasons$ | async; track $index) {\n      <tr class=\"odx-calendar__season\">\n        @for (month of season; track $index) {\n          <td role=\"gridcell\">\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        }\n      </tr>\n    }\n  </tbody>\n</table>\n","\nimport { AfterViewInit, ChangeDetectionStrategy, Component, ViewEncapsulation, inject, DOCUMENT } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, isFunction } from '@odx/angular/utils';\nimport { addMonths, getYear, setYear, subMonths } from 'date-fns';\nimport { CalendarCellDirective, CalendarViewDirective } from '../../directives';\nimport { CalendarView } from '../../models';\nimport { DateLabelPipe } from '../../pipes';\nimport { CalendarYearsService } from '../../services';\nimport { CalendarHeaderComponent } from '../calendar-header';\n\n/**\n * Represents the component for displaying the years view in a calendar.\n * Extends the `CalendarViewDirective` class and implements the `AfterViewInit` interface.\n *\n * @see {CalendarViewDirective}\n */\n@CSSComponent('calendar-years')\n@Component({\n  selector: 'odx-calendar-years',\n  standalone: true,\n  imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe],\n  templateUrl: './calendar-years.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  providers: [CalendarYearsService],\n})\nexport class CalendarYearsComponent extends CalendarViewDirective implements AfterViewInit {\n  private readonly document = inject(DOCUMENT);\n\n  protected readonly calendarYears = inject(CalendarYearsService);\n  protected readonly nextView = CalendarView.Year;\n  protected readonly currentView = CalendarView.Years;\n\n  public ngAfterViewInit(): void {\n    deferFn(() => this.scrollCurrentYearIntoView());\n  }\n\n  protected previousYear(event: Event): void {\n    this.updateActiveDate(event, subMonths(this.activeDate, 12));\n  }\n\n  protected nextYear(event: Event): void {\n    this.updateActiveDate(event, addMonths(this.activeDate, 12));\n  }\n\n  protected previousRow(event: Event): void {\n    this.updateActiveDate(event, subMonths(this.activeDate, 12 * 3));\n  }\n\n  protected nextRow(event: Event): void {\n    this.updateActiveDate(event, addMonths(this.activeDate, 12 * 3));\n  }\n\n  protected selectDate(value: Date): void {\n    if (this.isDateDisabled(value)) return;\n\n    const date = setYear(this.activeDate, getYear(value));\n    this.calendar.selectDate(date, { skipDaterangeUpdate: true });\n\n    this.changeView();\n  }\n\n  private scrollCurrentYearIntoView(): void {\n    const selectedYear = this.document.querySelector('.odx-calendar-cell.is-selected');\n    const currentYear = this.document.querySelector('.odx-calendar-cell--is-current');\n\n    const element = selectedYear || currentYear;\n\n    if (element && isFunction(element.scrollIntoView)) {\n      element.scrollIntoView({ block: 'center', behavior: 'smooth' });\n    }\n  }\n}\n","<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\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    @for (yearRow of calendarYears.years$ | async; track $index) {\n      <tr class=\"odx-calendar__year-row\">\n        @for (year of yearRow; track $index) {\n          <td role=\"gridcell\">\n            <button\n              [disabled]=\"isDateDisabled(year)\"\n              [odxCalendarCell]=\"year\"\n              [odxCalendarCellActiveDate]=\"calendar.activeDate$ | async\"\n              [odxCalendarCellCalendarView]=\"currentView\"\n              [odxCalendarCellSelectedDate]=\"selectedDate\"\n              [odxCalendarCellSelectedDateRange]=\"selectedDateRange\"\n              (click)=\"selectDate(year)\"\n            >\n              {{ year | odxDateLabel: { year: 'numeric' } }}\n            </button>\n          </td>\n        }\n      </tr>\n    }\n  </tbody>\n</table>\n","import { EventEmitter, Injectable, inject } from '@angular/core';\nimport { deferFn } from '@odx/angular/utils';\nimport { BehaviorSubject, Observable, distinctUntilChanged, filter, map, shareReplay, withLatestFrom } from 'rxjs';\nimport { CalendarService } from './calendar.service';\nimport { DateRange, DateRangeSelectionState, DateSelectEvent, DateTypeRange } from './models';\nimport { DateRangeState } from './models/date-range';\nimport { validateDaterange } from './utils';\n\n/**\n * Service for managing date range selection.\n */\n@Injectable()\nexport class DaterangeService {\n  private readonly calendar = inject(CalendarService);\n\n  private readonly dateRangeState$$ = new BehaviorSubject<DateRangeState>({\n    selectionState: DateRangeSelectionState.NothingSelected,\n    dateRange: { start: null, end: null },\n  });\n\n  /**\n   * An event emitter for outputting the selected date range.\n   *\n   * @emits {DateRange | null} outputDateRange$ - The selected date range or null if no range is selected.\n   */\n  public readonly outputDateRange$ = new EventEmitter<DateRange | null>();\n\n  /**\n   * An observable that emits the current date range state.\n   * The date range state represents the current selection state and the selected date range.\n   *\n   * @emits {DateRangeState} dateRangeState$ - The current date range state.\n   */\n  public readonly dateRangeState$: Observable<DateRangeState> = this.calendar.dateSelectEvents$.pipe(\n    filter((newSelectedDate: DateSelectEvent) => Boolean(newSelectedDate.date)),\n    withLatestFrom(this.dateRangeState$$),\n    map(([newSelectedDate, currentDateRangeState]) => {\n      const newDate = newSelectedDate.date;\n      const currentStart = currentDateRangeState.dateRange.start;\n      const newDateRangeState: DateRangeState = {\n        selectionState: DateRangeSelectionState.NothingSelected,\n        dateRange: { start: null, end: null },\n      };\n\n      if (newSelectedDate.options.skipDaterangeUpdate) {\n        return currentDateRangeState;\n      }\n\n      if (\n        currentStart &&\n        newDate &&\n        currentDateRangeState.selectionState === DateRangeSelectionState.StartSelected &&\n        validateDaterange(currentStart, newDate)\n      ) {\n        newDateRangeState.dateRange = { start: currentStart, end: newDate };\n        newDateRangeState.selectionState = DateRangeSelectionState.EndSelected;\n      } else {\n        newDateRangeState.dateRange = { start: newDate, end: null };\n        newDateRangeState.selectionState = DateRangeSelectionState.StartSelected;\n      }\n\n      this.dateRangeState$$.next(newDateRangeState);\n      if (newSelectedDate.options?.emitOutside) {\n        this.outputDateRange$.next(newDateRangeState.dateRange);\n      }\n      return newDateRangeState;\n    }),\n    distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)),\n    shareReplay({ refCount: true }),\n  );\n\n  /**\n   * Sets the selected date range.\n   *\n   * @param {DateTypeRange} value - The selected date range.\n   */\n  public setDateRange(value: DateTypeRange): void {\n    deferFn(() => {\n      this.calendar.selectDate(value.start);\n      this.calendar.selectDate(value.end);\n      this.calendar.setActiveDate(value.start);\n    });\n  }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { ChangeDetectionStrategy, Component, EventEmitter, inject, Input, OnChanges, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { EventManager, hasChanged, injectElement, NgChanges } from '@odx/angular/utils';\nimport { combineLatest } from 'rxjs';\nimport { injectCalendarConfig } from './calendar.config';\nimport { CalendarService } from './calendar.service';\nimport { CalendarMonthComponent, CalendarYearComponent, CalendarYearsComponent } from './components';\nimport { DaterangeService } from './daterange.service';\nimport { CalendarSelectionMode, CalendarView, DateFilter, DateRange, DateType, DateTypeRange } from './models';\n\n/**\n * A component for selecting a date or date range. It provides a calendar interface for selecting dates and date ranges,\n * and supports various configuration options for customizing the appearance and behavior of the calendar.\n */\n@CSSComponent('calendar')\n@Component({\n  selector: 'odx-calendar',\n  standalone: true,\n  imports: [CoreModule, A11yModule, CalendarMonthComponent, CalendarYearComponent, CalendarYearsComponent],\n  templateUrl: './calendar.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  providers: [CalendarService, EventManager, DaterangeService],\n})\nexport class CalendarComponent implements OnChanges {\n  private readonly config = injectCalendarConfig();\n  protected readonly calendar = inject(CalendarService);\n  protected readonly daterange = inject(DaterangeService);\n  protected readonly CalendarView = CalendarView;\n\n  protected readonly vm$ = combineLatest({\n    activeDate: this.calendar.activeDate$,\n    calendarView: this.calendar.calendarView$,\n    selectedDate: this.calendar.selectedDate$,\n    selectedDateRange: this.daterange.dateRangeState$,\n    previewDate: this.calendar.previewDate$,\n  });\n\n  public readonly element = injectElement();\n\n  /**\n   * Represents the selected date in the calendar component.\n   * It can be of type `DateType` or `null` if no date is selected.\n   *\n   * @type {DateType | null}\n   * @default null\n   */\n  @Input()\n  public selectedDate: DateType | null = null;\n\n  /**\n   * Represents the selected date range in the calendar component.\n   * It can be of type `DateTypeRange` or `null` if no date range is selected.\n   *\n   * @type {DateTypeRange | null}\n   * @default null\n   */\n  @Input()\n  public selectedDateRange?: DateTypeRange | null = null;\n\n  /**\n   * The minimum selectable date for the calendar component.\n   * If set to null, there is no minimum date restriction.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public minDate?: Date | null = null;\n\n  /**\n   * The maximum selectable date for the calendar component.\n   * If set to null, there is no maximum date restriction.\n   *\n   * @type {Date | null}\n   * @default null\n   */\n  @Input()\n  public maxDate?: Date | null = null;\n\n  /**\n   * The filter function used to determine which dates are selectable in the calendar.\n   * If set to `null`, all dates will be selectable.\n   *\n   * @type {DateFilter | null}\n   * @default null\n   *\n   * @example\n   * ```ts\n   * // Filter out weekends\n   * const filterFn: DateFilter = (date) => date.getDay() !== 0 && date.getDay() !== 6;\n   * ```\n   */\n  @Input()\n  public filterFn?: DateFilter | null = null;\n\n  /**\n   * Emits an event whenever the selected date changes.\n   * The event payload is either a Date object representing the selected date or null\n   * if no date is selected.\n   *\n   * @emits {Date | null}\n   */\n  @Output()\n  public selectedDateChange: EventEmitter<Date | null>;\n\n  /**\n   * Emits an event whenever the selected date range changes.\n   * The event payload is either a DateRange object representing the selected date range\n   * or null if no date range is selected.\n   *\n   * @emits {DateRange | null}\n   */\n  @Output()\n  public selectedDateRangeChange: EventEmitter<DateRange | null>;\n\n  constructor() {\n    this.selectedDateChange = this.calendar.outputDate$;\n    this.selectedDateRangeChange = this.daterange.outputDateRange$;\n  }\n\n  public ngOnChanges(changes: NgChanges<CalendarComponent>): void {\n    if (hasChanged(changes, 'selectedDate', false)) {\n      this.calendar.selectDate(this.selectedDate, { skipDaterangeUpdate: true });\n    }\n\n    if (this.selectedDateRange && hasChanged(changes, 'selectedDateRange', false) && this.config.selectionMode === CalendarSelectionMode.DateRange) {\n      this.daterange.setDateRange(this.selectedDateRange);\n    }\n  }\n}\n","@if (vm$ | async; as vm) {\n  @switch (vm.calendarView) {\n    @case (CalendarView.Year) {\n      <odx-calendar-year\n        [activeDate]=\"vm.activeDate\"\n        [selectedDate]=\"vm.selectedDate\"\n        [selectedDateRange]=\"vm.selectedDateRange\"\n        [minDate]=\"minDate\"\n        [maxDate]=\"maxDate\"\n        [filterFn]=\"filterFn\"\n      />\n    }\n    @case (CalendarView.Years) {\n      <odx-calendar-years\n        [activeDate]=\"vm.activeDate\"\n        [selectedDate]=\"vm.selectedDate\"\n        [selectedDateRange]=\"vm.selectedDateRange\"\n        [minDate]=\"minDate\"\n        [maxDate]=\"maxDate\"\n        [filterFn]=\"filterFn\"\n      />\n    }\n    @default {\n      <odx-calendar-month\n        [activeDate]=\"vm.activeDate\"\n        [selectedDate]=\"vm.selectedDate\"\n        [selectedDateRange]=\"vm.selectedDateRange\"\n        [previewDate]=\"vm.previewDate\"\n        [minDate]=\"minDate\"\n        [maxDate]=\"maxDate\"\n        [filterFn]=\"filterFn\"\n      />\n    }\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dateValidators","isNonNullable","i1"],"mappings":";;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACJ,IAAA,qBAAA,CAAA,qBAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS;AACX,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAAA,EAAA,CAAA,CAAA;;ACgDjC;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,GAAG,kBAAkB,CACtH,UAAU,EACV,kCAAkC,EAClC;AACE,IAAA,mBAAmB,EAAE,IAAI;IACzB,aAAa,EAAE,qBAAqB,CAAC,IAAI;AACzC,IAAA,QAAQ,EAAE;AACR,QAAA,WAAW,EAAE,CAAC;AACf,KAAA;AACD,IAAA,SAAS,EAAE;AACT,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