@spartan-ng/brain 0.0.1-alpha.502 → 0.0.1-alpha.504

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.
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-calendar.mjs","sources":["../../../../libs/brain/calendar/src/lib/brn-calendar.token.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-header.ts","../../../../libs/brain/calendar/src/lib/brn-calendar.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-grid.ts","../../../../libs/brain/calendar/src/lib/i18n/calendar-i18n.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-next-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-previous-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-week.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-weekday.ts","../../../../libs/brain/calendar/src/lib/mode/brn-calendar-multiple.ts","../../../../libs/brain/calendar/src/index.ts","../../../../libs/brain/calendar/src/spartan-ng-brain-calendar.ts"],"sourcesContent":["import { ExistingProvider, InjectionToken, Signal, Type, WritableSignal, inject } from '@angular/core';\nimport { BrnCalendarHeader } from './brn-calendar-header';\n\nexport interface BrnCalendarBase<T> {\n\tisSelected: (date: T) => boolean;\n\tselectDate: (date: T) => void;\n\n\tconstrainDate: (date: T) => T;\n\tisDateDisabled: (date: T) => boolean;\n\tsetFocusedDate: (date: T) => void;\n\n\tdisabled: Signal<boolean>;\n\tfocusedDate: Signal<T>;\n\theader: Signal<BrnCalendarHeader | undefined>;\n\tstate: Signal<{\n\t\tfocusedDate: WritableSignal<T>;\n\t}>;\n\tdays: Signal<T[]>;\n}\n\nexport const BrnCalendarToken = new InjectionToken<BrnCalendarBase<unknown>>('BrnCalendarToken');\n\nexport function provideBrnCalendar<T>(instance: Type<BrnCalendarBase<T>>): ExistingProvider {\n\treturn { provide: BrnCalendarToken, useExisting: instance };\n}\n\n/**\n * Inject the calendar component.\n */\nexport function injectBrnCalendar<T>(): BrnCalendarBase<T> {\n\treturn inject(BrnCalendarToken) as BrnCalendarBase<T>;\n}\n","import { Directive, ElementRef, computed, inject, input } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: 'button[brnCalendarCellButton]',\n\thost: {\n\t\trole: 'gridcell',\n\t\t'[tabindex]': 'focusable() ? 0 : -1',\n\t\ttype: 'button',\n\t\t'[attr.data-outside]': \"outside() ? '' : null\",\n\t\t'[attr.data-today]': \"today() && !selected() ? '' : null\",\n\t\t'[attr.data-selected]': \"selected() ? '' : null\",\n\t\t'[attr.data-disabled]': \"disabled() ? '' : null\",\n\t\t'[attr.aria-selected]': \"selected() ? 'true' : null\",\n\t\t'[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n\t\t'[disabled]': 'disabled()',\n\t\t'(click)': '_calendar.selectDate(date())',\n\t\t'(keydown.arrowLeft)': 'focusPrevious($event)',\n\t\t'(keydown.arrowRight)': 'focusNext($event)',\n\t\t'(keydown.arrowUp)': 'focusAbove($event)',\n\t\t'(keydown.arrowDown)': 'focusBelow($event)',\n\t\t'(keydown.home)': 'focusFirst($event)',\n\t\t'(keydown.end)': 'focusLast($event)',\n\t\t'(keydown.pageUp)': 'focusPreviousMonth($event)',\n\t\t'(keydown.pageDown)': 'focusNextMonth($event)',\n\t},\n})\nexport class BrnCalendarCellButton<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the element ref */\n\tprivate readonly _elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n\t/** The date this cell represents */\n\tpublic readonly date = input.required<T>();\n\n\t/** Whether this date is currently selected */\n\tpublic readonly selected = computed(() => this._calendar.isSelected(this.date()));\n\n\t/** Whether this date is focusable */\n\tpublic readonly focusable = computed(() => this._dateAdapter.isSameDay(this._calendar.focusedDate(), this.date()));\n\n\tpublic readonly outside = computed(() => {\n\t\tconst focusedDate = this._calendar.focusedDate();\n\t\treturn !this._dateAdapter.isSameMonth(this.date(), focusedDate);\n\t});\n\n\t/** Whether this date is today */\n\tpublic readonly today = computed(() => this._dateAdapter.isSameDay(this.date(), this._dateAdapter.now()));\n\n\t/** Whether this date is disabled */\n\tpublic readonly disabled = computed(() => this._calendar.isDateDisabled(this.date()) || this._calendar.disabled());\n\n\t/**\n\t * Focus the previous cell.\n\t */\n\tprotected focusPrevious(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// in rtl, the arrow keys are reversed.\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? 1 : -1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the next cell.\n\t */\n\tprotected focusNext(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? -1 : 1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the above cell.\n\t */\n\tprotected focusAbove(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.subtract(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the below cell.\n\t */\n\tprotected focusBelow(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.add(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the first date of the month.\n\t */\n\tprotected focusFirst(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.startOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the last date of the month.\n\t */\n\tprotected focusLast(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.endOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the same date in the previous month.\n\t */\n\tprotected focusPreviousMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet previousMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tpreviousMonthTarget = this._dateAdapter.subtract(previousMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(previousMonthTarget);\n\n\t\t// if we are on a date that does not exist in the previous month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(previousMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Focus the same date in the next month.\n\t */\n\tprotected focusNextMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet nextMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tnextMonthTarget = this._dateAdapter.add(nextMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(nextMonthTarget);\n\n\t\t// if we are on a date that does not exist in the next month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(nextMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Get the direction of the element.\n\t */\n\tprivate getDirection(): 'ltr' | 'rtl' {\n\t\treturn getComputedStyle(this._elementRef.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';\n\t}\n\n\tfocus(): void {\n\t\tthis._elementRef.nativeElement.focus();\n\t}\n}\n","import { Directive, input } from '@angular/core';\n\nlet uniqueId = 0;\n\n@Directive({\n\tselector: '[brnCalendarHeader]',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'aria-live': 'polite',\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarHeader {\n\t/** The unique id for the header */\n\tpublic readonly id = input(`brn-calendar-header-${uniqueId++}`);\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tChangeDetectorRef,\n\tDirective,\n\tInjector,\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tinject,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { BrnCalendarCellButton } from './brn-calendar-cell-button';\nimport { BrnCalendarHeader } from './brn-calendar-header';\nimport { BrnCalendarBase, provideBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendar]',\n\tproviders: [provideBrnCalendar(BrnCalendar)],\n})\nexport class BrnCalendar<T> implements BrnCalendarBase<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeader);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButton<T>>(BrnCalendarCellButton, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this.date() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisSelected(date: T): boolean {\n\t\tconst selected = this.date() as T | undefined;\n\t\treturn selected !== undefined && this._dateAdapter.isSameDay(date, selected);\n\t}\n\n\tselectDate(date: T): void {\n\t\tif (this.isSelected(date)) {\n\t\t\tthis.date.set(undefined);\n\t\t} else {\n\t\t\tthis.date.set(date);\n\t\t}\n\t\tthis.state().focusedDate.set(date);\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n}\n\nexport type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n","import { Directive } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCalendarCell]',\n\thost: {\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarCell {}\n","import { Directive } from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarGrid]',\n\thost: {\n\t\trole: 'grid',\n\t\t'[attr.aria-labelledby]': '_calendar.header()?.id()',\n\t},\n})\nexport class BrnCalendarGrid<T> {\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n}\n","import { InjectionToken, ValueProvider, inject } from '@angular/core';\n\nexport interface BrnCalendarI18n {\n\tformatWeekdayName: (index: number) => string;\n\tformatHeader: (month: number, year: number) => string;\n\tlabelPrevious: () => string;\n\tlabelNext: () => string;\n\tlabelWeekday: (index: number) => string;\n}\n\nexport const BrnCalendarI18nToken = new InjectionToken<BrnCalendarI18n>('BrnCalendarI18nToken');\n\n/**\n * Provide the calendar i18n configuration.\n */\nexport function provideBrnCalendarI18n(configuration: BrnCalendarI18n): ValueProvider {\n\treturn { provide: BrnCalendarI18nToken, useValue: configuration };\n}\n\nconst defaultCalendarI18n: BrnCalendarI18n = {\n\tformatWeekdayName: (index: number) => {\n\t\tconst weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\n\t\treturn weekdays[index];\n\t},\n\tformatHeader: (month: number, year: number) => {\n\t\treturn new Date(year, month).toLocaleDateString(undefined, {\n\t\t\tmonth: 'long',\n\t\t\tyear: 'numeric',\n\t\t});\n\t},\n\tlabelPrevious: () => 'Go to the previous month',\n\tlabelNext: () => 'Go to the next month',\n\tlabelWeekday: (index: number) => {\n\t\tconst weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\t\treturn weekdays[index];\n\t},\n};\n\n/**\n * Inject the calendar i18n configuration.\n */\nexport function injectBrnCalendarI18n(): BrnCalendarI18n {\n\treturn inject(BrnCalendarI18nToken, { optional: true }) ?? defaultCalendarI18n;\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarNextButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelNext()',\n\t},\n})\nexport class BrnCalendarNextButton {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarPreviousButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelPrevious()',\n\t},\n})\nexport class BrnCalendarPreviousButton {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.subtract(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import {\n\tChangeDetectorRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tOnDestroy,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tuntracked,\n} from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeek]',\n})\nexport class BrnCalendarWeek<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekContext<T>>>(TemplateRef);\n\n\t// get the weeks to display.\n\tprotected readonly _weeks = computed(() => {\n\t\tconst days = this._calendar.days();\n\t\tconst weeks = [];\n\n\t\tfor (let i = 0; i < days.length; i += 7) {\n\t\t\tweeks.push(days.slice(i, i + 7));\n\t\t}\n\n\t\treturn weeks;\n\t});\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekContext<T>>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeek<T>, ctx: unknown): ctx is BrnWeekContext<T> {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// this should use `afterRenderEffect` but it's not available in the current version\n\t\teffect(() => {\n\t\t\tconst weeks = this._weeks();\n\t\t\tuntracked(() => this._renderWeeks(weeks));\n\t\t});\n\t}\n\n\tprivate _renderWeeks(weeks: T[][]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each week\n\t\tfor (const week of weeks) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: week,\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekContext<T> {\n\t$implicit: T[];\n}\n","import {\n\tChangeDetectorRef,\n\tcomputed,\n\tDirective,\n\teffect,\n\tEmbeddedViewRef,\n\tinject,\n\tOnDestroy,\n\tTemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeekday]',\n})\nexport class BrnCalendarWeekday<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the date time adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekdayContext>>(TemplateRef);\n\n\t/** Get the days of the week to display in the header. */\n\tprotected readonly _weekdays = computed(() => this._calendar.days().slice(0, 7));\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekdayContext>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeekday<T>, ctx: unknown): ctx is BrnWeekdayContext {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// Create a new view for each day\n\t\teffect(() => {\n\t\t\t// Get the weekdays to display\n\t\t\tconst weekdays = this._weekdays();\n\t\t\t// Render the weekdays\n\t\t\tuntracked(() => this._renderWeekdays(weekdays));\n\t\t});\n\t}\n\n\tprivate _renderWeekdays(weekdays: T[]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each day\n\t\tfor (const day of weekdays) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: this._dateAdapter.getDay(day),\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekdayContext {\n\t$implicit: number;\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tafterNextRender,\n\tbooleanAttribute,\n\tChangeDetectorRef,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\tinject,\n\tInjector,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { Weekday } from '../brn-calendar';\nimport { BrnCalendarCellButton } from '../brn-calendar-cell-button';\nimport { BrnCalendarHeader } from '../brn-calendar-header';\nimport { BrnCalendarBase, provideBrnCalendar } from '../brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarMulti]',\n\tproviders: [provideBrnCalendar(BrnCalendarMulti)],\n})\nexport class BrnCalendarMulti<T> implements BrnCalendarBase<T> {\n\t// /** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** The minimum selectable dates. */\n\tpublic readonly minSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** The maximum selectable dates. */\n\tpublic readonly maxSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T[]>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeader);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButton<T>>(BrnCalendarCellButton, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\tisSelected(date: T): boolean {\n\t\treturn this.date()?.some((d) => this._dateAdapter.isSameDay(d, date)) ?? false;\n\t}\n\n\tselectDate(date: T): void {\n\t\tconst selected = this.date() as T[] | undefined;\n\t\tif (this.isSelected(date)) {\n\t\t\tconst minSelection = this.minSelection();\n\t\t\tif (selected?.length === minSelection) {\n\t\t\t\t// min selection reached, do not allow to deselect\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.date.set(selected?.filter((d) => !this._dateAdapter.isSameDay(d, date)));\n\t\t} else {\n\t\t\tconst maxSelection = this.maxSelection();\n\t\t\tif (selected?.length === maxSelection) {\n\t\t\t\t// max selection reached, reset the selection to date\n\t\t\t\tthis.date.set([date]);\n\t\t\t} else {\n\t\t\t\t// add the date to the selection\n\t\t\t\tthis.date.set([...(selected ?? []), date]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// same as in brn-calendar.directive.ts\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n}\n","export * from './lib/brn-calendar';\nexport * from './lib/brn-calendar-cell';\nexport * from './lib/brn-calendar-cell-button';\nexport * from './lib/brn-calendar-grid';\nexport * from './lib/brn-calendar-header';\nexport * from './lib/brn-calendar-next-button';\nexport * from './lib/brn-calendar-previous-button';\nexport * from './lib/brn-calendar-week';\nexport * from './lib/brn-calendar-weekday';\nexport * from './lib/brn-calendar.token';\nexport * from './lib/i18n/calendar-i18n';\nexport * from './lib/mode/brn-calendar-multiple';\n\nimport { NgModule } from '@angular/core';\nimport { BrnCalendar } from './lib/brn-calendar';\nimport { BrnCalendarCell } from './lib/brn-calendar-cell';\nimport { BrnCalendarCellButton } from './lib/brn-calendar-cell-button';\nimport { BrnCalendarGrid } from './lib/brn-calendar-grid';\nimport { BrnCalendarHeader } from './lib/brn-calendar-header';\nimport { BrnCalendarNextButton } from './lib/brn-calendar-next-button';\nimport { BrnCalendarPreviousButton } from './lib/brn-calendar-previous-button';\nimport { BrnCalendarWeek } from './lib/brn-calendar-week';\nimport { BrnCalendarWeekday } from './lib/brn-calendar-weekday';\nimport { BrnCalendarMulti } from './lib/mode/brn-calendar-multiple';\n\nexport const BrnCalendarImports = [\n\tBrnCalendarCellButton,\n\tBrnCalendarGrid,\n\tBrnCalendarHeader,\n\tBrnCalendarNextButton,\n\tBrnCalendarPreviousButton,\n\tBrnCalendarWeek,\n\tBrnCalendarWeekday,\n\tBrnCalendar,\n\tBrnCalendarCell,\n\tBrnCalendarMulti,\n] as const;\n\n@NgModule({\n\timports: [...BrnCalendarImports],\n\texports: [...BrnCalendarImports],\n})\nexport class BrnCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAoBa,gBAAgB,GAAG,IAAI,cAAc,CAA2B,kBAAkB;AAEzF,SAAU,kBAAkB,CAAI,QAAkC,EAAA;IACvE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE;AAC5D;AAEA;;AAEG;SACa,iBAAiB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAuB;AACtD;;MCHa,qBAAqB,CAAA;;IAEd,YAAY,GAAG,iBAAiB,EAAK;;IAGrC,SAAS,GAAG,iBAAiB,EAAK;;AAGpC,IAAA,WAAW,GAAG,MAAM,CAAgC,UAAU,CAAC;;AAGhE,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAK;;AAG1B,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;;IAGjE,SAAS,GAAG,QAAQ,CAAC,MAAM,I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;YACX,eAAe;YACf,gBAAgB,CAAA,EAAA,CAAA;2HAOJ,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,iBAAA;;;ACzCD;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-calendar.mjs","sources":["../../../../libs/brain/calendar/src/lib/brn-calendar.token.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-header.ts","../../../../libs/brain/calendar/src/lib/brn-calendar.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-grid.ts","../../../../libs/brain/calendar/src/lib/i18n/calendar-i18n.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-next-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-previous-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-week.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-weekday.ts","../../../../libs/brain/calendar/src/lib/mode/brn-calendar-multiple.ts","../../../../libs/brain/calendar/src/lib/mode/brn-calendar-range.ts","../../../../libs/brain/calendar/src/index.ts","../../../../libs/brain/calendar/src/spartan-ng-brain-calendar.ts"],"sourcesContent":["import { ExistingProvider, InjectionToken, Signal, Type, WritableSignal, inject } from '@angular/core';\nimport { BrnCalendarHeader } from './brn-calendar-header';\n\nexport interface BrnCalendarBase<T> {\n\tisSelected: (date: T) => boolean;\n\tselectDate: (date: T) => void;\n\n\tconstrainDate: (date: T) => T;\n\tisDateDisabled: (date: T) => boolean;\n\tsetFocusedDate: (date: T) => void;\n\n\tisStartOfRange: (date: T) => boolean;\n\tisEndOfRange: (date: T) => boolean;\n\tisBetweenRange: (date: T) => boolean;\n\n\tdisabled: Signal<boolean>;\n\tfocusedDate: Signal<T>;\n\theader: Signal<BrnCalendarHeader | undefined>;\n\tstate: Signal<{\n\t\tfocusedDate: WritableSignal<T>;\n\t}>;\n\tdays: Signal<T[]>;\n}\n\nexport const BrnCalendarToken = new InjectionToken<BrnCalendarBase<unknown>>('BrnCalendarToken');\n\nexport function provideBrnCalendar<T>(instance: Type<BrnCalendarBase<T>>): ExistingProvider {\n\treturn { provide: BrnCalendarToken, useExisting: instance };\n}\n\n/**\n * Inject the calendar component.\n */\nexport function injectBrnCalendar<T>(): BrnCalendarBase<T> {\n\treturn inject(BrnCalendarToken) as BrnCalendarBase<T>;\n}\n","import { Directive, ElementRef, computed, inject, input } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: 'button[brnCalendarCellButton]',\n\thost: {\n\t\trole: 'gridcell',\n\t\t'[tabindex]': 'focusable() ? 0 : -1',\n\t\ttype: 'button',\n\t\t'[attr.data-outside]': \"outside() && (!end() && !start())? '' : null\",\n\t\t'[attr.data-today]': \"today() && !selected() ? '' : null\",\n\t\t'[attr.data-selected]': \"selected() ? '' : null\",\n\t\t'[attr.data-disabled]': \"disabled() ? '' : null\",\n\t\t'[attr.aria-selected]': \"selected() ? 'true' : null\",\n\t\t'[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n\t\t'[attr.data-range-start]': 'start() ? \"\" : null',\n\t\t'[attr.data-range-end]': 'end() ? \"\" : null',\n\t\t'[attr.data-range-between]': 'betweenRange() ? \"\" : null',\n\t\t'[disabled]': 'disabled()',\n\t\t'(click)': '_calendar.selectDate(date())',\n\t\t'(keydown.arrowLeft)': 'focusPrevious($event)',\n\t\t'(keydown.arrowRight)': 'focusNext($event)',\n\t\t'(keydown.arrowUp)': 'focusAbove($event)',\n\t\t'(keydown.arrowDown)': 'focusBelow($event)',\n\t\t'(keydown.home)': 'focusFirst($event)',\n\t\t'(keydown.end)': 'focusLast($event)',\n\t\t'(keydown.pageUp)': 'focusPreviousMonth($event)',\n\t\t'(keydown.pageDown)': 'focusNextMonth($event)',\n\t},\n})\nexport class BrnCalendarCellButton<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the element ref */\n\tprivate readonly _elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n\t/** The date this cell represents */\n\tpublic readonly date = input.required<T>();\n\n\t/** Whether this date is currently selected */\n\tpublic readonly selected = computed(() => this._calendar.isSelected(this.date()));\n\tpublic readonly start = computed(() => this._calendar.isStartOfRange(this.date()));\n\tpublic readonly end = computed(() => this._calendar.isEndOfRange(this.date()));\n\tpublic readonly betweenRange = computed(() => this._calendar.isBetweenRange(this.date()));\n\n\t/** Whether this date is focusable */\n\tpublic readonly focusable = computed(() => this._dateAdapter.isSameDay(this._calendar.focusedDate(), this.date()));\n\n\tpublic readonly outside = computed(() => {\n\t\tconst focusedDate = this._calendar.focusedDate();\n\t\treturn !this._dateAdapter.isSameMonth(this.date(), focusedDate);\n\t});\n\n\t/** Whether this date is today */\n\tpublic readonly today = computed(() => this._dateAdapter.isSameDay(this.date(), this._dateAdapter.now()));\n\n\t/** Whether this date is disabled */\n\tpublic readonly disabled = computed(() => this._calendar.isDateDisabled(this.date()) || this._calendar.disabled());\n\n\t/**\n\t * Focus the previous cell.\n\t */\n\tprotected focusPrevious(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// in rtl, the arrow keys are reversed.\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? 1 : -1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the next cell.\n\t */\n\tprotected focusNext(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? -1 : 1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the above cell.\n\t */\n\tprotected focusAbove(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.subtract(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the below cell.\n\t */\n\tprotected focusBelow(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.add(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the first date of the month.\n\t */\n\tprotected focusFirst(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.startOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the last date of the month.\n\t */\n\tprotected focusLast(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.endOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the same date in the previous month.\n\t */\n\tprotected focusPreviousMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet previousMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tpreviousMonthTarget = this._dateAdapter.subtract(previousMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(previousMonthTarget);\n\n\t\t// if we are on a date that does not exist in the previous month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(previousMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Focus the same date in the next month.\n\t */\n\tprotected focusNextMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet nextMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tnextMonthTarget = this._dateAdapter.add(nextMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(nextMonthTarget);\n\n\t\t// if we are on a date that does not exist in the next month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(nextMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Get the direction of the element.\n\t */\n\tprivate getDirection(): 'ltr' | 'rtl' {\n\t\treturn getComputedStyle(this._elementRef.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';\n\t}\n\n\tfocus(): void {\n\t\tthis._elementRef.nativeElement.focus();\n\t}\n}\n","import { Directive, input } from '@angular/core';\n\nlet uniqueId = 0;\n\n@Directive({\n\tselector: '[brnCalendarHeader]',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'aria-live': 'polite',\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarHeader {\n\t/** The unique id for the header */\n\tpublic readonly id = input(`brn-calendar-header-${uniqueId++}`);\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tChangeDetectorRef,\n\tDirective,\n\tInjector,\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tinject,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { BrnCalendarCellButton } from './brn-calendar-cell-button';\nimport { BrnCalendarHeader } from './brn-calendar-header';\nimport { BrnCalendarBase, provideBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendar]',\n\tproviders: [provideBrnCalendar(BrnCalendar)],\n})\nexport class BrnCalendar<T> implements BrnCalendarBase<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeader);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButton<T>>(BrnCalendarCellButton, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this.date() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisSelected(date: T): boolean {\n\t\tconst selected = this.date() as T | undefined;\n\t\treturn selected !== undefined && this._dateAdapter.isSameDay(date, selected);\n\t}\n\n\tselectDate(date: T): void {\n\t\tif (this.isSelected(date)) {\n\t\t\tthis.date.set(undefined);\n\t\t} else {\n\t\t\tthis.date.set(date);\n\t\t}\n\t\tthis.state().focusedDate.set(date);\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\t/**\n\t * Determine if a date is the start of a range. In a date picker, this is always false.\n\t * @param date The date to check.\n\t * @returns Always false.\n\t * @internal\n\t */\n\tisStartOfRange(_: T): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Determine if a date is the end of a range. In a date picker, this is always false.\n\t * @param date The date to check.\n\t * @returns Always false.\n\t * @internal\n\t */\n\tisEndOfRange(_: T): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Determine if a date is between the start and end dates. In a date picker, this is always false.\n\t * @param date The date to check.\n\t * @returns True if the date is between the start and end dates, false otherwise.\n\t * @internal\n\t */\n\tisBetweenRange(_: T): boolean {\n\t\treturn false;\n\t}\n}\n\nexport type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n","import { Directive } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCalendarCell]',\n\thost: {\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarCell {}\n","import { Directive } from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarGrid]',\n\thost: {\n\t\trole: 'grid',\n\t\t'[attr.aria-labelledby]': '_calendar.header()?.id()',\n\t},\n})\nexport class BrnCalendarGrid<T> {\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n}\n","import { InjectionToken, ValueProvider, inject } from '@angular/core';\n\nexport interface BrnCalendarI18n {\n\tformatWeekdayName: (index: number) => string;\n\tformatHeader: (month: number, year: number) => string;\n\tlabelPrevious: () => string;\n\tlabelNext: () => string;\n\tlabelWeekday: (index: number) => string;\n}\n\nexport const BrnCalendarI18nToken = new InjectionToken<BrnCalendarI18n>('BrnCalendarI18nToken');\n\n/**\n * Provide the calendar i18n configuration.\n */\nexport function provideBrnCalendarI18n(configuration: BrnCalendarI18n): ValueProvider {\n\treturn { provide: BrnCalendarI18nToken, useValue: configuration };\n}\n\nconst defaultCalendarI18n: BrnCalendarI18n = {\n\tformatWeekdayName: (index: number) => {\n\t\tconst weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\n\t\treturn weekdays[index];\n\t},\n\tformatHeader: (month: number, year: number) => {\n\t\treturn new Date(year, month).toLocaleDateString(undefined, {\n\t\t\tmonth: 'long',\n\t\t\tyear: 'numeric',\n\t\t});\n\t},\n\tlabelPrevious: () => 'Go to the previous month',\n\tlabelNext: () => 'Go to the next month',\n\tlabelWeekday: (index: number) => {\n\t\tconst weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\t\treturn weekdays[index];\n\t},\n};\n\n/**\n * Inject the calendar i18n configuration.\n */\nexport function injectBrnCalendarI18n(): BrnCalendarI18n {\n\treturn inject(BrnCalendarI18nToken, { optional: true }) ?? defaultCalendarI18n;\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarNextButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelNext()',\n\t},\n})\nexport class BrnCalendarNextButton {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarPreviousButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelPrevious()',\n\t},\n})\nexport class BrnCalendarPreviousButton {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.subtract(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import {\n\tChangeDetectorRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tOnDestroy,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tuntracked,\n} from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeek]',\n})\nexport class BrnCalendarWeek<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekContext<T>>>(TemplateRef);\n\n\t// get the weeks to display.\n\tprotected readonly _weeks = computed(() => {\n\t\tconst days = this._calendar.days();\n\t\tconst weeks = [];\n\n\t\tfor (let i = 0; i < days.length; i += 7) {\n\t\t\tweeks.push(days.slice(i, i + 7));\n\t\t}\n\n\t\treturn weeks;\n\t});\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekContext<T>>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeek<T>, ctx: unknown): ctx is BrnWeekContext<T> {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// this should use `afterRenderEffect` but it's not available in the current version\n\t\teffect(() => {\n\t\t\tconst weeks = this._weeks();\n\t\t\tuntracked(() => this._renderWeeks(weeks));\n\t\t});\n\t}\n\n\tprivate _renderWeeks(weeks: T[][]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each week\n\t\tfor (const week of weeks) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: week,\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekContext<T> {\n\t$implicit: T[];\n}\n","import {\n\tChangeDetectorRef,\n\tcomputed,\n\tDirective,\n\teffect,\n\tEmbeddedViewRef,\n\tinject,\n\tOnDestroy,\n\tTemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeekday]',\n})\nexport class BrnCalendarWeekday<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the date time adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekdayContext>>(TemplateRef);\n\n\t/** Get the days of the week to display in the header. */\n\tprotected readonly _weekdays = computed(() => this._calendar.days().slice(0, 7));\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekdayContext>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeekday<T>, ctx: unknown): ctx is BrnWeekdayContext {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// Create a new view for each day\n\t\teffect(() => {\n\t\t\t// Get the weekdays to display\n\t\t\tconst weekdays = this._weekdays();\n\t\t\t// Render the weekdays\n\t\t\tuntracked(() => this._renderWeekdays(weekdays));\n\t\t});\n\t}\n\n\tprivate _renderWeekdays(weekdays: T[]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each day\n\t\tfor (const day of weekdays) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: this._dateAdapter.getDay(day),\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekdayContext {\n\t$implicit: number;\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tafterNextRender,\n\tbooleanAttribute,\n\tChangeDetectorRef,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\tinject,\n\tInjector,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { Weekday } from '../brn-calendar';\nimport { BrnCalendarCellButton } from '../brn-calendar-cell-button';\nimport { BrnCalendarHeader } from '../brn-calendar-header';\nimport { BrnCalendarBase, provideBrnCalendar } from '../brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarMulti]',\n\tproviders: [provideBrnCalendar(BrnCalendarMulti)],\n})\nexport class BrnCalendarMulti<T> implements BrnCalendarBase<T> {\n\t/**\n\t * Determine if a date is the start of a range. In a date picker, this is always false.\n\t * @param date The date to check.\n\t * @returns Always false.\n\t * @internal\n\t */\n\tisStartOfRange(_: T): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Determine if a date is the end of a range. In a date picker, this is always false.\n\t * @param date The date to check.\n\t * @returns Always false.\n\t * @internal\n\t */\n\tisEndOfRange(_: T): boolean {\n\t\treturn false;\n\t}\n\n\t/**\n\t * Determine if a date is between the start and end dates. In a date picker, this is always false.\n\t * @param date The date to check.\n\t * @returns True if the date is between the start and end dates, false otherwise.\n\t * @internal\n\t */\n\tisBetweenRange(_: T): boolean {\n\t\treturn false;\n\t}\n\t// /** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** The minimum selectable dates. */\n\tpublic readonly minSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** The maximum selectable dates. */\n\tpublic readonly maxSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T[]>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeader);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButton<T>>(BrnCalendarCellButton, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\tisSelected(date: T): boolean {\n\t\treturn this.date()?.some((d) => this._dateAdapter.isSameDay(d, date)) ?? false;\n\t}\n\n\tselectDate(date: T): void {\n\t\tconst selected = this.date() as T[] | undefined;\n\t\tif (this.isSelected(date)) {\n\t\t\tconst minSelection = this.minSelection();\n\t\t\tif (selected?.length === minSelection) {\n\t\t\t\t// min selection reached, do not allow to deselect\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.date.set(selected?.filter((d) => !this._dateAdapter.isSameDay(d, date)));\n\t\t} else {\n\t\t\tconst maxSelection = this.maxSelection();\n\t\t\tif (selected?.length === maxSelection) {\n\t\t\t\t// max selection reached, reset the selection to date\n\t\t\t\tthis.date.set([date]);\n\t\t\t} else {\n\t\t\t\t// add the date to the selection\n\t\t\t\tthis.date.set([...(selected ?? []), date]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// same as in brn-calendar.directive.ts\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tafterNextRender,\n\tbooleanAttribute,\n\tChangeDetectorRef,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\tinject,\n\tInjector,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { Weekday } from '../brn-calendar';\nimport { BrnCalendarCellButton } from '../brn-calendar-cell-button';\nimport { BrnCalendarHeader } from '../brn-calendar-header';\nimport { BrnCalendarBase, provideBrnCalendar } from '../brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarRange]',\n\tproviders: [provideBrnCalendar(BrnCalendarRange)],\n})\nexport class BrnCalendarRange<T> implements BrnCalendarBase<T> {\n\t// /** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeader);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButton<T>>(BrnCalendarCellButton, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this.startDate() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * The selected start date\n\t */\n\tpublic readonly startDate = model<T>();\n\n\t/**\n\t * The selected end date\n\t */\n\tpublic readonly endDate = model<T>();\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\tisSelected(date: T): boolean {\n\t\tconst start = this.startDate();\n\t\tconst end = this.endDate();\n\n\t\tif (!start && !end) {\n\t\t\treturn false;\n\t\t}\n\t\tconst isStartSelected = start ? this._dateAdapter.isSameDay(date, start) : false;\n\t\tconst isEndSelected = end ? this._dateAdapter.isSameDay(date, end) : false;\n\n\t\treturn isStartSelected || isEndSelected;\n\t}\n\n\tselectDate(date: T): void {\n\t\tconst start = this.startDate();\n\t\tconst end = this.endDate();\n\n\t\tif (!start && !end) {\n\t\t\tthis.startDate.set(date);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (start && !end) {\n\t\t\tif (this._dateAdapter.isAfter(date, start)) {\n\t\t\t\tthis.endDate.set(date);\n\t\t\t} else if (this._dateAdapter.isBefore(date, start)) {\n\t\t\t\tthis.startDate.set(date);\n\t\t\t\tthis.endDate.set(start);\n\t\t\t} else if (this._dateAdapter.isSameDay(date, start)) {\n\t\t\t\tthis.endDate.set(date);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// If both start and end are selected, reset selection\n\t\tthis.startDate.set(date);\n\n\t\tthis.endDate.set(undefined);\n\t}\n\n\t// same as in brn-calendar.directive.ts\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\t/**\n\t * Determine if a date is the start of a range.\n\t * @param date The date to check.\n\t * @returns Always false.\n\t * @internal\n\t */\n\tisStartOfRange(date: T): boolean {\n\t\tconst start = this.startDate();\n\t\treturn start ? this._dateAdapter.isSameDay(date, start) : false;\n\t}\n\n\t/**\n\t * Determine if a date is the end of a range.\n\t * @param date The date to check.\n\t * @returns Always false.\n\t * @internal\n\t */\n\tisEndOfRange(date: T): boolean {\n\t\tconst end = this.endDate();\n\t\treturn end ? this._dateAdapter.isSameDay(date, end) : false;\n\t}\n\n\t/**\n\t * Determine if a date is between the start and end dates.\n\t * @param date The date to check.\n\t * @returns True if the date is between the start and end dates, false otherwise.\n\t * @internal\n\t */\n\tisBetweenRange(date: T): boolean {\n\t\tconst start = this.startDate();\n\t\tconst end = this.endDate();\n\n\t\tif (!start || !end) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this._dateAdapter.isAfter(date, start) && this._dateAdapter.isBefore(date, end);\n\t}\n}\n","export * from './lib/brn-calendar';\nexport * from './lib/brn-calendar-cell';\nexport * from './lib/brn-calendar-cell-button';\nexport * from './lib/brn-calendar-grid';\nexport * from './lib/brn-calendar-header';\nexport * from './lib/brn-calendar-next-button';\nexport * from './lib/brn-calendar-previous-button';\nexport * from './lib/brn-calendar-week';\nexport * from './lib/brn-calendar-weekday';\nexport * from './lib/brn-calendar.token';\nexport * from './lib/i18n/calendar-i18n';\nexport * from './lib/mode/brn-calendar-multiple';\nexport * from './lib/mode/brn-calendar-range';\n\nimport { NgModule } from '@angular/core';\nimport { BrnCalendar } from './lib/brn-calendar';\nimport { BrnCalendarCell } from './lib/brn-calendar-cell';\nimport { BrnCalendarCellButton } from './lib/brn-calendar-cell-button';\nimport { BrnCalendarGrid } from './lib/brn-calendar-grid';\nimport { BrnCalendarHeader } from './lib/brn-calendar-header';\nimport { BrnCalendarNextButton } from './lib/brn-calendar-next-button';\nimport { BrnCalendarPreviousButton } from './lib/brn-calendar-previous-button';\nimport { BrnCalendarWeek } from './lib/brn-calendar-week';\nimport { BrnCalendarWeekday } from './lib/brn-calendar-weekday';\nimport { BrnCalendarMulti } from './lib/mode/brn-calendar-multiple';\nimport { BrnCalendarRange } from './lib/mode/brn-calendar-range';\n\nexport const BrnCalendarImports = [\n\tBrnCalendarCellButton,\n\tBrnCalendarGrid,\n\tBrnCalendarHeader,\n\tBrnCalendarNextButton,\n\tBrnCalendarPreviousButton,\n\tBrnCalendarWeek,\n\tBrnCalendarWeekday,\n\tBrnCalendar,\n\tBrnCalendarCell,\n\tBrnCalendarMulti,\n\tBrnCalendarRange,\n] as const;\n\n@NgModule({\n\timports: [...BrnCalendarImports],\n\texports: [...BrnCalendarImports],\n})\nexport class BrnCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAwBa,gBAAgB,GAAG,IAAI,cAAc,CAA2B,kBAAkB;AAEzF,SAAU,kBAAkB,CAAI,QAAkC,EAAA;IACvE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE;AAC5D;AAEA;;AAEG;SACa,iBAAiB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAuB;AACtD;;MCJa,qBAAqB,CAAA;;IAEd,YAAY,GAAG,iBAAiB,EAAK;;IAGrC,SAAS,GAAG,iBAAiB,EAAK;;AAGpC,IAAA,WAAW,GAAG,MAAM,CAAgC,UAAU,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-155,6 +155,88 @@ class BrnNativeDateAdapter {
155
155
  }
156
156
  }
157
157
 
158
+ class BrnUtcDateAdapter {
159
+ create({ day, hour, minute, month, second, year, millisecond }) {
160
+ const now = new Date();
161
+ const utcTime = Date.UTC(year ?? now.getUTCFullYear(), month ?? now.getUTCMonth(), day ?? now.getUTCDate(), hour ?? now.getUTCHours(), minute ?? now.getUTCMinutes(), second ?? now.getUTCSeconds(), millisecond ?? now.getUTCMilliseconds());
162
+ return new Date(utcTime);
163
+ }
164
+ now() {
165
+ return new Date(Date.now());
166
+ }
167
+ set(date, values) {
168
+ const utcTime = Date.UTC(values.year ?? date.getUTCFullYear(), values.month ?? date.getUTCMonth(), values.day ?? date.getUTCDate(), values.hour ?? date.getUTCHours(), values.minute ?? date.getUTCMinutes(), values.second ?? date.getUTCSeconds(), values.millisecond ?? date.getUTCMilliseconds());
169
+ return new Date(utcTime);
170
+ }
171
+ add(date, duration) {
172
+ return new Date(Date.UTC(date.getUTCFullYear() + (duration.years ?? 0), date.getUTCMonth() + (duration.months ?? 0), date.getUTCDate() + (duration.days ?? 0), date.getUTCHours() + (duration.hours ?? 0), date.getUTCMinutes() + (duration.minutes ?? 0), date.getUTCSeconds() + (duration.seconds ?? 0), date.getUTCMilliseconds() + (duration.milliseconds ?? 0)));
173
+ }
174
+ subtract(date, duration) {
175
+ return new Date(Date.UTC(date.getUTCFullYear() - (duration.years ?? 0), date.getUTCMonth() - (duration.months ?? 0), date.getUTCDate() - (duration.days ?? 0), date.getUTCHours() - (duration.hours ?? 0), date.getUTCMinutes() - (duration.minutes ?? 0), date.getUTCSeconds() - (duration.seconds ?? 0), date.getUTCMilliseconds() - (duration.milliseconds ?? 0)));
176
+ }
177
+ compare(a, b) {
178
+ const diff = a.getTime() - b.getTime();
179
+ return diff === 0 ? 0 : diff > 0 ? 1 : -1;
180
+ }
181
+ isEqual(a, b) {
182
+ return a.getTime() === b.getTime();
183
+ }
184
+ isBefore(a, b) {
185
+ return a.getTime() < b.getTime();
186
+ }
187
+ isAfter(a, b) {
188
+ return a.getTime() > b.getTime();
189
+ }
190
+ isSameDay(a, b) {
191
+ return this.isSameYear(a, b) && this.isSameMonth(a, b) && a.getUTCDate() === b.getUTCDate();
192
+ }
193
+ isSameMonth(a, b) {
194
+ return this.isSameYear(a, b) && a.getUTCMonth() === b.getUTCMonth();
195
+ }
196
+ isSameYear(a, b) {
197
+ return a.getUTCFullYear() === b.getUTCFullYear();
198
+ }
199
+ getYear(date) {
200
+ return date.getUTCFullYear();
201
+ }
202
+ getMonth(date) {
203
+ return date.getUTCMonth();
204
+ }
205
+ getDay(date) {
206
+ return date.getUTCDay();
207
+ }
208
+ getDate(date) {
209
+ return date.getUTCDate();
210
+ }
211
+ getHours(date) {
212
+ return date.getUTCHours();
213
+ }
214
+ getMinutes(date) {
215
+ return date.getUTCMinutes();
216
+ }
217
+ getSeconds(date) {
218
+ return date.getUTCSeconds();
219
+ }
220
+ getMilliseconds(date) {
221
+ return date.getUTCMilliseconds();
222
+ }
223
+ getTime(date) {
224
+ return date.getTime();
225
+ }
226
+ startOfMonth(date) {
227
+ return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1));
228
+ }
229
+ endOfMonth(date) {
230
+ return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, 0, 23, 59, 59, 999));
231
+ }
232
+ startOfDay(date) {
233
+ return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
234
+ }
235
+ endOfDay(date) {
236
+ return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 23, 59, 59, 999));
237
+ }
238
+ }
239
+
158
240
  const BrnDateAdapterToken = new InjectionToken('BrnDateAdapterToken');
159
241
  /**
160
242
  * Inject the DateAdapter instance
@@ -168,10 +250,22 @@ function injectDateAdapter() {
168
250
  function provideDateAdapter(adapter) {
169
251
  return { provide: BrnDateAdapterToken, useClass: adapter };
170
252
  }
253
+ /**
254
+ * Provide the native date adapter
255
+ */
256
+ function provideNativeDateAdapter() {
257
+ return provideDateAdapter(BrnNativeDateAdapter);
258
+ }
259
+ /**
260
+ * Provide the UTC date adapter
261
+ */
262
+ function provideUtcDateAdapter() {
263
+ return provideDateAdapter(BrnUtcDateAdapter);
264
+ }
171
265
 
172
266
  /**
173
267
  * Generated bundle index. Do not edit.
174
268
  */
175
269
 
176
- export { BrnDateAdapterToken, BrnNativeDateAdapter, injectDateAdapter, provideDateAdapter };
270
+ export { BrnDateAdapterToken, BrnNativeDateAdapter, BrnUtcDateAdapter, injectDateAdapter, provideDateAdapter, provideNativeDateAdapter, provideUtcDateAdapter };
177
271
  //# sourceMappingURL=spartan-ng-brain-date-time.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-date-time.mjs","sources":["../../../../libs/brain/date-time/src/lib/native-date-adapter.ts","../../../../libs/brain/date-time/src/lib/date-adapter.ts","../../../../libs/brain/date-time/src/spartan-ng-brain-date-time.ts"],"sourcesContent":["import type { BrnDateAdapter, BrnDateUnits, BrnDuration } from './date-adapter';\n\nexport class BrnNativeDateAdapter implements BrnDateAdapter<Date> {\n\t/**\n\t * Create a new date time object.\n\t */\n\tcreate({ day, hour, minute, month, second, year, millisecond }: BrnDateUnits): Date {\n\t\tconst now = new Date();\n\n\t\treturn new Date(\n\t\t\tyear ?? now.getFullYear(),\n\t\t\tmonth ?? now.getMonth(),\n\t\t\tday ?? now.getDate(),\n\t\t\thour ?? now.getHours(),\n\t\t\tminute ?? now.getMinutes(),\n\t\t\tsecond ?? now.getSeconds(),\n\t\t\tmillisecond ?? now.getMilliseconds(),\n\t\t);\n\t}\n\n\t/**\n\t * Create a new date with the current date and time.\n\t */\n\tnow(): Date {\n\t\treturn new Date();\n\t}\n\n\t/**\n\t * Set the year of the date time object based on a duration.\n\t */\n\tset(date: Date, values: BrnDateUnits): Date {\n\t\treturn new Date(\n\t\t\tvalues.year ?? date.getFullYear(),\n\t\t\tvalues.month ?? date.getMonth(),\n\t\t\tvalues.day ?? date.getDate(),\n\t\t\tvalues.hour ?? date.getHours(),\n\t\t\tvalues.minute ?? date.getMinutes(),\n\t\t\tvalues.second ?? date.getSeconds(),\n\t\t\tvalues.millisecond ?? date.getMilliseconds(),\n\t\t);\n\t}\n\n\t/**\n\t * Add a duration to the date time object.\n\t */\n\tadd(date: Date, duration: BrnDuration): Date {\n\t\treturn new Date(\n\t\t\tdate.getFullYear() + (duration.years ?? 0),\n\t\t\tdate.getMonth() + (duration.months ?? 0),\n\t\t\tdate.getDate() + (duration.days ?? 0),\n\t\t\tdate.getHours() + (duration.hours ?? 0),\n\t\t\tdate.getMinutes() + (duration.minutes ?? 0),\n\t\t\tdate.getSeconds() + (duration.seconds ?? 0),\n\t\t\tdate.getMilliseconds() + (duration.milliseconds ?? 0),\n\t\t);\n\t}\n\n\t/**\n\t * Subtract a duration from the date time object\n\t */\n\tsubtract(date: Date, duration: BrnDuration): Date {\n\t\treturn new Date(\n\t\t\tdate.getFullYear() - (duration.years ?? 0),\n\t\t\tdate.getMonth() - (duration.months ?? 0),\n\t\t\tdate.getDate() - (duration.days ?? 0),\n\t\t\tdate.getHours() - (duration.hours ?? 0),\n\t\t\tdate.getMinutes() - (duration.minutes ?? 0),\n\t\t\tdate.getSeconds() - (duration.seconds ?? 0),\n\t\t\tdate.getMilliseconds() - (duration.milliseconds ?? 0),\n\t\t);\n\t}\n\n\t/**\n\t * Compare two date time objects\n\t */\n\tcompare(a: Date, b: Date): number {\n\t\tconst diff = a.getTime() - b.getTime();\n\t\treturn diff === 0 ? 0 : diff > 0 ? 1 : -1;\n\t}\n\n\t/**\n\t * Determine if two date time objects are equal.\n\t */\n\tisEqual(a: Date, b: Date): boolean {\n\t\treturn a.getTime() === b.getTime();\n\t}\n\n\t/**\n\t * Determine if a date time object is before another.\n\t */\n\tisBefore(a: Date, b: Date): boolean {\n\t\treturn a.getTime() < b.getTime();\n\t}\n\n\t/**\n\t * Determine if a date time object is after another.\n\t */\n\tisAfter(a: Date, b: Date): boolean {\n\t\treturn a.getTime() > b.getTime();\n\t}\n\n\t/**\n\t * Determine if two date objects are on the same day.\n\t */\n\tisSameDay(a: Date, b: Date): boolean {\n\t\treturn this.isSameYear(a, b) && this.isSameMonth(a, b) && a.getDate() === b.getDate();\n\t}\n\n\t/**\n\t * Determine if two date objects are on the same month.\n\t */\n\tisSameMonth(a: Date, b: Date): boolean {\n\t\treturn this.isSameYear(a, b) && a.getMonth() === b.getMonth();\n\t}\n\n\t/**\n\t * Determine if two date objects are on the same year.\n\t */\n\tisSameYear(a: Date, b: Date): boolean {\n\t\treturn a.getFullYear() === b.getFullYear();\n\t}\n\n\t/**\n\t * Get the year.\n\t */\n\tgetYear(date: Date): number {\n\t\treturn date.getFullYear();\n\t}\n\n\t/**\n\t * Get the month.\n\t */\n\tgetMonth(date: Date): number {\n\t\treturn date.getMonth();\n\t}\n\n\t/**\n\t * Get the day.\n\t */\n\tgetDay(date: Date): number {\n\t\treturn date.getDay();\n\t}\n\n\t/**\n\t * Get the date.\n\t */\n\tgetDate(date: Date): number {\n\t\treturn date.getDate();\n\t}\n\n\t/**\n\t * Get the hours.\n\t */\n\tgetHours(date: Date): number {\n\t\treturn date.getHours();\n\t}\n\n\t/**\n\t * Get the minutes.\n\t */\n\tgetMinutes(date: Date): number {\n\t\treturn date.getMinutes();\n\t}\n\n\t/**\n\t * Get the seconds.\n\t */\n\tgetSeconds(date: Date): number {\n\t\treturn date.getSeconds();\n\t}\n\n\t/**\n\t * Get the milliseconds.\n\t */\n\tgetMilliseconds(date: Date): number {\n\t\treturn date.getMilliseconds();\n\t}\n\n\t/**\n\t * Get the first day of the month.\n\t */\n\tstartOfMonth(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth(), 1);\n\t}\n\n\t/**\n\t * Get the last day of the month.\n\t */\n\tendOfMonth(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth() + 1, 0);\n\t}\n\n\t/**\n\t * Get the start of the day.\n\t */\n\tstartOfDay(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate());\n\t}\n\n\t/**\n\t * Get the end of the day.\n\t */\n\tendOfDay(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);\n\t}\n\n\t/**\n\t * Get the time.\n\t */\n\tgetTime(date: Date): number {\n\t\treturn date.getTime();\n\t}\n}\n","import { ClassProvider, InjectionToken, Type, inject } from '@angular/core';\nimport { BrnNativeDateAdapter } from './native-date-adapter';\n\n/**\n * An abstraction that can be used to create and modify date time objects\n * immutably regardless of the underlying implementation.\n */\nexport interface BrnDateAdapter<T> {\n\t/**\n\t * Create a new date time object.\n\t */\n\tcreate(values: BrnDateUnits): T;\n\n\t/**\n\t * Create a new date with the current date and time.\n\t */\n\tnow(): T;\n\n\t/**\n\t * Set the year of the date time object based on a duration.\n\t */\n\tset(date: T, values: BrnDateUnits): T;\n\n\t/**\n\t * Add a duration to the date time object.\n\t */\n\tadd(date: T, duration: BrnDuration): T;\n\n\t/**\n\t * Subtract a duration from the date time object.\n\t */\n\tsubtract(date: T, duration: BrnDuration): T;\n\n\t/**\n\t * Compare two date time objects.\n\t */\n\tcompare(a: T, b: T): number;\n\n\t/**\n\t * Determine if two date time objects are equal.\n\t */\n\tisEqual(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if a date time object is before another.\n\t */\n\tisBefore(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if a date time object is after another.\n\t */\n\tisAfter(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if two date objects are on the same day.\n\t */\n\tisSameDay(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if two date objects are on the same month.\n\t */\n\tisSameMonth(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if two date objects are on the same year.\n\t */\n\tisSameYear(a: T, b: T): boolean;\n\n\t/**\n\t * Get the year.\n\t */\n\tgetYear(date: T): number;\n\n\t/**\n\t * Get the month.\n\t */\n\tgetMonth(date: T): number;\n\n\t/**\n\t * Get the date.\n\t */\n\tgetDate(date: T): number;\n\n\t/**\n\t * Get the day of the week.\n\t *\n\t * Returns a value between 0 and 6 where 0 is Sunday\n\t */\n\tgetDay(date: T): number;\n\n\t/**\n\t * Get the hours.\n\t */\n\tgetHours(date: T): number;\n\n\t/**\n\t * Get the minutes.\n\t */\n\tgetMinutes(date: T): number;\n\n\t/**\n\t * Get the seconds.\n\t */\n\tgetSeconds(date: T): number;\n\n\t/**\n\t * Get the milliseconds.\n\t */\n\tgetMilliseconds(date: T): number;\n\n\t/**\n\t * Get the time.\n\t */\n\tgetTime(date: T): number;\n\n\t/**\n\t * Get the first day of the month.\n\t */\n\tstartOfMonth(date: T): T;\n\n\t/**\n\t * Get the last day of the month.\n\t */\n\tendOfMonth(date: T): T;\n\n\t/**\n\t * Get the start of the day.\n\t */\n\tstartOfDay(date: T): T;\n\n\t/**\n\t * Get the end of the day.\n\t */\n\tendOfDay(date: T): T;\n}\n\nexport interface BrnDateUnits {\n\t/**\n\t * The year.\n\t */\n\tyear?: number;\n\n\t/**\n\t * The month.\n\t */\n\tmonth?: number;\n\n\t/**\n\t * The day.\n\t */\n\tday?: number;\n\n\t/**\n\t * The hour.\n\t */\n\thour?: number;\n\n\t/**\n\t * The minute.\n\t */\n\tminute?: number;\n\n\t/**\n\t * The second.\n\t */\n\tsecond?: number;\n\n\t/**\n\t * The millisecond.\n\t */\n\tmillisecond?: number;\n}\n\nexport interface BrnDuration {\n\t/**\n\t * The years.\n\t */\n\tyears?: number;\n\n\t/**\n\t * The months.\n\t */\n\tmonths?: number;\n\n\t/**\n\t * The days.\n\t */\n\tdays?: number;\n\n\t/**\n\t * The hours.\n\t */\n\thours?: number;\n\n\t/**\n\t * The minutes.\n\t */\n\tminutes?: number;\n\n\t/**\n\t * The seconds.\n\t */\n\tseconds?: number;\n\n\t/**\n\t * The milliseconds.\n\t */\n\tmilliseconds?: number;\n}\n\nexport const BrnDateAdapterToken = new InjectionToken<BrnDateAdapter<unknown>>('BrnDateAdapterToken');\n\n/**\n * Inject the DateAdapter instance\n */\nexport function injectDateAdapter<T>(): BrnDateAdapter<T> {\n\treturn (inject(BrnDateAdapterToken, { optional: true }) as BrnDateAdapter<T>) ?? new BrnNativeDateAdapter();\n}\n\n/**\n * Provide the DateAdapter instance\n */\nexport function provideDateAdapter<T>(adapter: Type<BrnDateAdapter<T>>): ClassProvider {\n\treturn { provide: BrnDateAdapterToken, useClass: adapter };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAEa,oBAAoB,CAAA;AAChC;;AAEG;AACH,IAAA,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAgB,EAAA;AAC3E,QAAA,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE;QAEtB,OAAO,IAAI,IAAI,CACd,IAAI,IAAI,GAAG,CAAC,WAAW,EAAE,EACzB,KAAK,IAAI,GAAG,CAAC,QAAQ,EAAE,EACvB,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,EACpB,IAAI,IAAI,GAAG,CAAC,QAAQ,EAAE,EACtB,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,EAC1B,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,EAC1B,WAAW,IAAI,GAAG,CAAC,eAAe,EAAE,CACpC;;AAGF;;AAEG;IACH,GAAG,GAAA;QACF,OAAO,IAAI,IAAI,EAAE;;AAGlB;;AAEG;IACH,GAAG,CAAC,IAAU,EAAE,MAAoB,EAAA;AACnC,QAAA,OAAO,IAAI,IAAI,CACd,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,EACjC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,EAC/B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,EAC5B,MAAM,CAAC,IAAI,IAAI,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AAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;;AAGrE;;AAEG;AACH,IAAA,QAAQ,CAAC,IAAU,EAAA;QAClB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC;;AAGtF;;AAEG;AACH,IAAA,OAAO,CAAC,IAAU,EAAA;AACjB,QAAA,OAAO,IAAI,CAAC,OAAO,EAAE;;AAEtB;;MCFY,mBAAmB,GAAG,IAAI,cAAc,CAA0B,qBAAqB;AAEpG;;AAEG;SACa,iBAAiB,GAAA;AAChC,IAAA,OAAQ,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAuB,IAAI,IAAI,oBAAoB,EAAE;AAC5G;AAEA;;AAEG;AACG,SAAU,kBAAkB,CAAI,OAAgC,EAAA;IACrE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE;AAC3D;;AChOA;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-date-time.mjs","sources":["../../../../libs/brain/date-time/src/lib/native-date-adapter.ts","../../../../libs/brain/date-time/src/lib/utc-date-adapter.ts","../../../../libs/brain/date-time/src/lib/date-adapter.ts","../../../../libs/brain/date-time/src/spartan-ng-brain-date-time.ts"],"sourcesContent":["import type { BrnDateAdapter, BrnDateUnits, BrnDuration } from './date-adapter';\n\nexport class BrnNativeDateAdapter implements BrnDateAdapter<Date> {\n\t/**\n\t * Create a new date time object.\n\t */\n\tcreate({ day, hour, minute, month, second, year, millisecond }: BrnDateUnits): Date {\n\t\tconst now = new Date();\n\n\t\treturn new Date(\n\t\t\tyear ?? now.getFullYear(),\n\t\t\tmonth ?? now.getMonth(),\n\t\t\tday ?? now.getDate(),\n\t\t\thour ?? now.getHours(),\n\t\t\tminute ?? now.getMinutes(),\n\t\t\tsecond ?? now.getSeconds(),\n\t\t\tmillisecond ?? now.getMilliseconds(),\n\t\t);\n\t}\n\n\t/**\n\t * Create a new date with the current date and time.\n\t */\n\tnow(): Date {\n\t\treturn new Date();\n\t}\n\n\t/**\n\t * Set the year of the date time object based on a duration.\n\t */\n\tset(date: Date, values: BrnDateUnits): Date {\n\t\treturn new Date(\n\t\t\tvalues.year ?? date.getFullYear(),\n\t\t\tvalues.month ?? date.getMonth(),\n\t\t\tvalues.day ?? date.getDate(),\n\t\t\tvalues.hour ?? date.getHours(),\n\t\t\tvalues.minute ?? date.getMinutes(),\n\t\t\tvalues.second ?? date.getSeconds(),\n\t\t\tvalues.millisecond ?? date.getMilliseconds(),\n\t\t);\n\t}\n\n\t/**\n\t * Add a duration to the date time object.\n\t */\n\tadd(date: Date, duration: BrnDuration): Date {\n\t\treturn new Date(\n\t\t\tdate.getFullYear() + (duration.years ?? 0),\n\t\t\tdate.getMonth() + (duration.months ?? 0),\n\t\t\tdate.getDate() + (duration.days ?? 0),\n\t\t\tdate.getHours() + (duration.hours ?? 0),\n\t\t\tdate.getMinutes() + (duration.minutes ?? 0),\n\t\t\tdate.getSeconds() + (duration.seconds ?? 0),\n\t\t\tdate.getMilliseconds() + (duration.milliseconds ?? 0),\n\t\t);\n\t}\n\n\t/**\n\t * Subtract a duration from the date time object\n\t */\n\tsubtract(date: Date, duration: BrnDuration): Date {\n\t\treturn new Date(\n\t\t\tdate.getFullYear() - (duration.years ?? 0),\n\t\t\tdate.getMonth() - (duration.months ?? 0),\n\t\t\tdate.getDate() - (duration.days ?? 0),\n\t\t\tdate.getHours() - (duration.hours ?? 0),\n\t\t\tdate.getMinutes() - (duration.minutes ?? 0),\n\t\t\tdate.getSeconds() - (duration.seconds ?? 0),\n\t\t\tdate.getMilliseconds() - (duration.milliseconds ?? 0),\n\t\t);\n\t}\n\n\t/**\n\t * Compare two date time objects\n\t */\n\tcompare(a: Date, b: Date): number {\n\t\tconst diff = a.getTime() - b.getTime();\n\t\treturn diff === 0 ? 0 : diff > 0 ? 1 : -1;\n\t}\n\n\t/**\n\t * Determine if two date time objects are equal.\n\t */\n\tisEqual(a: Date, b: Date): boolean {\n\t\treturn a.getTime() === b.getTime();\n\t}\n\n\t/**\n\t * Determine if a date time object is before another.\n\t */\n\tisBefore(a: Date, b: Date): boolean {\n\t\treturn a.getTime() < b.getTime();\n\t}\n\n\t/**\n\t * Determine if a date time object is after another.\n\t */\n\tisAfter(a: Date, b: Date): boolean {\n\t\treturn a.getTime() > b.getTime();\n\t}\n\n\t/**\n\t * Determine if two date objects are on the same day.\n\t */\n\tisSameDay(a: Date, b: Date): boolean {\n\t\treturn this.isSameYear(a, b) && this.isSameMonth(a, b) && a.getDate() === b.getDate();\n\t}\n\n\t/**\n\t * Determine if two date objects are on the same month.\n\t */\n\tisSameMonth(a: Date, b: Date): boolean {\n\t\treturn this.isSameYear(a, b) && a.getMonth() === b.getMonth();\n\t}\n\n\t/**\n\t * Determine if two date objects are on the same year.\n\t */\n\tisSameYear(a: Date, b: Date): boolean {\n\t\treturn a.getFullYear() === b.getFullYear();\n\t}\n\n\t/**\n\t * Get the year.\n\t */\n\tgetYear(date: Date): number {\n\t\treturn date.getFullYear();\n\t}\n\n\t/**\n\t * Get the month.\n\t */\n\tgetMonth(date: Date): number {\n\t\treturn date.getMonth();\n\t}\n\n\t/**\n\t * Get the day.\n\t */\n\tgetDay(date: Date): number {\n\t\treturn date.getDay();\n\t}\n\n\t/**\n\t * Get the date.\n\t */\n\tgetDate(date: Date): number {\n\t\treturn date.getDate();\n\t}\n\n\t/**\n\t * Get the hours.\n\t */\n\tgetHours(date: Date): number {\n\t\treturn date.getHours();\n\t}\n\n\t/**\n\t * Get the minutes.\n\t */\n\tgetMinutes(date: Date): number {\n\t\treturn date.getMinutes();\n\t}\n\n\t/**\n\t * Get the seconds.\n\t */\n\tgetSeconds(date: Date): number {\n\t\treturn date.getSeconds();\n\t}\n\n\t/**\n\t * Get the milliseconds.\n\t */\n\tgetMilliseconds(date: Date): number {\n\t\treturn date.getMilliseconds();\n\t}\n\n\t/**\n\t * Get the first day of the month.\n\t */\n\tstartOfMonth(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth(), 1);\n\t}\n\n\t/**\n\t * Get the last day of the month.\n\t */\n\tendOfMonth(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth() + 1, 0);\n\t}\n\n\t/**\n\t * Get the start of the day.\n\t */\n\tstartOfDay(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate());\n\t}\n\n\t/**\n\t * Get the end of the day.\n\t */\n\tendOfDay(date: Date): Date {\n\t\treturn new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59, 999);\n\t}\n\n\t/**\n\t * Get the time.\n\t */\n\tgetTime(date: Date): number {\n\t\treturn date.getTime();\n\t}\n}\n","import type { BrnDateAdapter, BrnDateUnits, BrnDuration } from './date-adapter';\n\nexport class BrnUtcDateAdapter implements BrnDateAdapter<Date> {\n\tcreate({ day, hour, minute, month, second, year, millisecond }: BrnDateUnits): Date {\n\t\tconst now = new Date();\n\t\tconst utcTime = Date.UTC(\n\t\t\tyear ?? now.getUTCFullYear(),\n\t\t\tmonth ?? now.getUTCMonth(),\n\t\t\tday ?? now.getUTCDate(),\n\t\t\thour ?? now.getUTCHours(),\n\t\t\tminute ?? now.getUTCMinutes(),\n\t\t\tsecond ?? now.getUTCSeconds(),\n\t\t\tmillisecond ?? now.getUTCMilliseconds(),\n\t\t);\n\t\treturn new Date(utcTime);\n\t}\n\n\tnow(): Date {\n\t\treturn new Date(Date.now());\n\t}\n\n\tset(date: Date, values: BrnDateUnits): Date {\n\t\tconst utcTime = Date.UTC(\n\t\t\tvalues.year ?? date.getUTCFullYear(),\n\t\t\tvalues.month ?? date.getUTCMonth(),\n\t\t\tvalues.day ?? date.getUTCDate(),\n\t\t\tvalues.hour ?? date.getUTCHours(),\n\t\t\tvalues.minute ?? date.getUTCMinutes(),\n\t\t\tvalues.second ?? date.getUTCSeconds(),\n\t\t\tvalues.millisecond ?? date.getUTCMilliseconds(),\n\t\t);\n\t\treturn new Date(utcTime);\n\t}\n\n\tadd(date: Date, duration: BrnDuration): Date {\n\t\treturn new Date(\n\t\t\tDate.UTC(\n\t\t\t\tdate.getUTCFullYear() + (duration.years ?? 0),\n\t\t\t\tdate.getUTCMonth() + (duration.months ?? 0),\n\t\t\t\tdate.getUTCDate() + (duration.days ?? 0),\n\t\t\t\tdate.getUTCHours() + (duration.hours ?? 0),\n\t\t\t\tdate.getUTCMinutes() + (duration.minutes ?? 0),\n\t\t\t\tdate.getUTCSeconds() + (duration.seconds ?? 0),\n\t\t\t\tdate.getUTCMilliseconds() + (duration.milliseconds ?? 0),\n\t\t\t),\n\t\t);\n\t}\n\n\tsubtract(date: Date, duration: BrnDuration): Date {\n\t\treturn new Date(\n\t\t\tDate.UTC(\n\t\t\t\tdate.getUTCFullYear() - (duration.years ?? 0),\n\t\t\t\tdate.getUTCMonth() - (duration.months ?? 0),\n\t\t\t\tdate.getUTCDate() - (duration.days ?? 0),\n\t\t\t\tdate.getUTCHours() - (duration.hours ?? 0),\n\t\t\t\tdate.getUTCMinutes() - (duration.minutes ?? 0),\n\t\t\t\tdate.getUTCSeconds() - (duration.seconds ?? 0),\n\t\t\t\tdate.getUTCMilliseconds() - (duration.milliseconds ?? 0),\n\t\t\t),\n\t\t);\n\t}\n\n\tcompare(a: Date, b: Date): number {\n\t\tconst diff = a.getTime() - b.getTime();\n\t\treturn diff === 0 ? 0 : diff > 0 ? 1 : -1;\n\t}\n\n\tisEqual(a: Date, b: Date): boolean {\n\t\treturn a.getTime() === b.getTime();\n\t}\n\n\tisBefore(a: Date, b: Date): boolean {\n\t\treturn a.getTime() < b.getTime();\n\t}\n\n\tisAfter(a: Date, b: Date): boolean {\n\t\treturn a.getTime() > b.getTime();\n\t}\n\n\tisSameDay(a: Date, b: Date): boolean {\n\t\treturn this.isSameYear(a, b) && this.isSameMonth(a, b) && a.getUTCDate() === b.getUTCDate();\n\t}\n\n\tisSameMonth(a: Date, b: Date): boolean {\n\t\treturn this.isSameYear(a, b) && a.getUTCMonth() === b.getUTCMonth();\n\t}\n\n\tisSameYear(a: Date, b: Date): boolean {\n\t\treturn a.getUTCFullYear() === b.getUTCFullYear();\n\t}\n\n\tgetYear(date: Date): number {\n\t\treturn date.getUTCFullYear();\n\t}\n\n\tgetMonth(date: Date): number {\n\t\treturn date.getUTCMonth();\n\t}\n\n\tgetDay(date: Date): number {\n\t\treturn date.getUTCDay();\n\t}\n\n\tgetDate(date: Date): number {\n\t\treturn date.getUTCDate();\n\t}\n\n\tgetHours(date: Date): number {\n\t\treturn date.getUTCHours();\n\t}\n\n\tgetMinutes(date: Date): number {\n\t\treturn date.getUTCMinutes();\n\t}\n\n\tgetSeconds(date: Date): number {\n\t\treturn date.getUTCSeconds();\n\t}\n\n\tgetMilliseconds(date: Date): number {\n\t\treturn date.getUTCMilliseconds();\n\t}\n\n\tgetTime(date: Date): number {\n\t\treturn date.getTime();\n\t}\n\n\tstartOfMonth(date: Date): Date {\n\t\treturn new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), 1));\n\t}\n\n\tendOfMonth(date: Date): Date {\n\t\treturn new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + 1, 0, 23, 59, 59, 999));\n\t}\n\n\tstartOfDay(date: Date): Date {\n\t\treturn new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));\n\t}\n\n\tendOfDay(date: Date): Date {\n\t\treturn new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 23, 59, 59, 999));\n\t}\n}\n","import { ClassProvider, InjectionToken, Type, inject } from '@angular/core';\nimport { BrnNativeDateAdapter } from './native-date-adapter';\nimport { BrnUtcDateAdapter } from './utc-date-adapter';\n\n/**\n * An abstraction that can be used to create and modify date time objects\n * immutably regardless of the underlying implementation.\n */\nexport interface BrnDateAdapter<T> {\n\t/**\n\t * Create a new date time object.\n\t */\n\tcreate(values: BrnDateUnits): T;\n\n\t/**\n\t * Create a new date with the current date and time.\n\t */\n\tnow(): T;\n\n\t/**\n\t * Set the year of the date time object based on a duration.\n\t */\n\tset(date: T, values: BrnDateUnits): T;\n\n\t/**\n\t * Add a duration to the date time object.\n\t */\n\tadd(date: T, duration: BrnDuration): T;\n\n\t/**\n\t * Subtract a duration from the date time object.\n\t */\n\tsubtract(date: T, duration: BrnDuration): T;\n\n\t/**\n\t * Compare two date time objects.\n\t */\n\tcompare(a: T, b: T): number;\n\n\t/**\n\t * Determine if two date time objects are equal.\n\t */\n\tisEqual(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if a date time object is before another.\n\t */\n\tisBefore(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if a date time object is after another.\n\t */\n\tisAfter(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if two date objects are on the same day.\n\t */\n\tisSameDay(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if two date objects are on the same month.\n\t */\n\tisSameMonth(a: T, b: T): boolean;\n\n\t/**\n\t * Determine if two date objects are on the same year.\n\t */\n\tisSameYear(a: T, b: T): boolean;\n\n\t/**\n\t * Get the year.\n\t */\n\tgetYear(date: T): number;\n\n\t/**\n\t * Get the month.\n\t */\n\tgetMonth(date: T): number;\n\n\t/**\n\t * Get the date.\n\t */\n\tgetDate(date: T): number;\n\n\t/**\n\t * Get the day of the week.\n\t *\n\t * Returns a value between 0 and 6 where 0 is Sunday\n\t */\n\tgetDay(date: T): number;\n\n\t/**\n\t * Get the hours.\n\t */\n\tgetHours(date: T): number;\n\n\t/**\n\t * Get the minutes.\n\t */\n\tgetMinutes(date: T): number;\n\n\t/**\n\t * Get the seconds.\n\t */\n\tgetSeconds(date: T): number;\n\n\t/**\n\t * Get the milliseconds.\n\t */\n\tgetMilliseconds(date: T): number;\n\n\t/**\n\t * Get the time.\n\t */\n\tgetTime(date: T): number;\n\n\t/**\n\t * Get the first day of the month.\n\t */\n\tstartOfMonth(date: T): T;\n\n\t/**\n\t * Get the last day of the month.\n\t */\n\tendOfMonth(date: T): T;\n\n\t/**\n\t * Get the start of the day.\n\t */\n\tstartOfDay(date: T): T;\n\n\t/**\n\t * Get the end of the day.\n\t */\n\tendOfDay(date: T): T;\n}\n\nexport interface BrnDateUnits {\n\t/**\n\t * The year.\n\t */\n\tyear?: number;\n\n\t/**\n\t * The month.\n\t */\n\tmonth?: number;\n\n\t/**\n\t * The day.\n\t */\n\tday?: number;\n\n\t/**\n\t * The hour.\n\t */\n\thour?: number;\n\n\t/**\n\t * The minute.\n\t */\n\tminute?: number;\n\n\t/**\n\t * The second.\n\t */\n\tsecond?: number;\n\n\t/**\n\t * The millisecond.\n\t */\n\tmillisecond?: number;\n}\n\nexport interface BrnDuration {\n\t/**\n\t * The years.\n\t */\n\tyears?: number;\n\n\t/**\n\t * The months.\n\t */\n\tmonths?: number;\n\n\t/**\n\t * The days.\n\t */\n\tdays?: number;\n\n\t/**\n\t * The hours.\n\t */\n\thours?: number;\n\n\t/**\n\t * The minutes.\n\t */\n\tminutes?: number;\n\n\t/**\n\t * The seconds.\n\t */\n\tseconds?: number;\n\n\t/**\n\t * The milliseconds.\n\t */\n\tmilliseconds?: number;\n}\n\nexport const BrnDateAdapterToken = new InjectionToken<BrnDateAdapter<unknown>>('BrnDateAdapterToken');\n\n/**\n * Inject the DateAdapter instance\n */\nexport function injectDateAdapter<T>(): BrnDateAdapter<T> {\n\treturn (inject(BrnDateAdapterToken, { optional: true }) as BrnDateAdapter<T>) ?? new BrnNativeDateAdapter();\n}\n\n/**\n * Provide the DateAdapter instance\n */\nexport function provideDateAdapter<T>(adapter: Type<BrnDateAdapter<T>>): ClassProvider {\n\treturn { provide: BrnDateAdapterToken, useClass: adapter };\n}\n\n/**\n * Provide the native date adapter\n */\nexport function provideNativeDateAdapter(): ClassProvider {\n\treturn provideDateAdapter(BrnNativeDateAdapter);\n}\n\n/**\n * Provide the UTC date adapter\n */\nexport function provideUtcDateAdapter(): ClassProvider {\n\treturn provideDateAdapter(BrnUtcDateAdapter);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAEa,oBAAoB,CAAA;AAChC;;AAEG;AACH,IAAA,MAAM,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAgB,EAAA;AAC3E,QAAA,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE;QAEtB,OAAO,IAAI,IAAI,CACd,IAAI,IAAI,GAAG,CAAC,WAAW,EAAE,EACzB,KAAK,IAAI,GAAG,CAAC,QAAQ,EAAE,EACvB,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE,EACpB,IAAI,IAAI,GAAG,CAAC,QAAQ,EAAE,EACtB,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,EAC1B,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,EAC1B,WAAW,IAAI,GAAG,CAAC,eAAe,EAAE,CACpC;;AAGF;;AAEG;IACH,GAAG,GAAA;QACF,OAAO,IAAI,IAAI,EAAE;;AAGlB;;AAEG;IACH,GAAG,CAAC,IAAU,EAAE,MAAoB,EAAA;AACnC,QAAA,OAAO,IAAI,IAAI,CACd,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,EACjC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,EAC/B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE,EAC5B,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,EAC9B,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE,EAClC,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,EAAE,EAClC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AAC;;AAG7F,IAAA,UAAU,CAAC,IAAU,EAAA;QACpB,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;;AAGxF,IAAA,QAAQ,CAAC,IAAU,EAAA;AAClB,QAAA,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;;AAEzG;;MCqEY,mBAAmB,GAAG,IAAI,cAAc,CAA0B,qBAAqB;AAEpG;;AAEG;SACa,iBAAiB,GAAA;AAChC,IAAA,OAAQ,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAuB,IAAI,IAAI,oBAAoB,EAAE;AAC5G;AAEA;;AAEG;AACG,SAAU,kBAAkB,CAAI,OAAgC,EAAA;IACrE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE;AAC3D;AAEA;;AAEG;SACa,wBAAwB,GAAA;AACvC,IAAA,OAAO,kBAAkB,CAAC,oBAAoB,CAAC;AAChD;AAEA;;AAEG;SACa,qBAAqB,GAAA;AACpC,IAAA,OAAO,kBAAkB,CAAC,iBAAiB,CAAC;AAC7C;;AC/OA;;AAEG;;;;"}
@@ -207,10 +207,10 @@ class BrnSwitch {
207
207
  *
208
208
  * @param isDisabled - Whether switch should be disabled
209
209
  */
210
- setDisabledState = (isDisabled) => {
210
+ setDisabledState(isDisabled) {
211
211
  this._state().disabled.set(isDisabled);
212
212
  this._cdr.markForCheck();
213
- };
213
+ }
214
214
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnSwitch, deps: [], target: i0.ɵɵFactoryTarget.Component });
215
215
  /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.8", type: BrnSwitch, isStandalone: true, selector: "brn-switch", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed", touched: "touched" }, host: { properties: { "style": "{display: \"contents\"}", "attr.id": "_state().id", "attr.name": "_state().name", "attr.aria-labelledby": "null", "attr.aria-label": "null", "attr.aria-describedby": "null", "attr.data-state": "checked() ? \"checked\" : \"unchecked\"", "attr.data-focus-visible": "_focusVisible()", "attr.data-focus": "_focused()", "attr.data-disabled": "_state().disabled()" } }, providers: [BRN_SWITCH_VALUE_ACCESSOR], viewQueries: [{ propertyName: "switch", first: true, predicate: ["switch"], descendants: true, isSignal: true }], ngImport: i0, template: `
216
216
  <button