@spartan-ng/brain 0.0.1-alpha.437 → 0.0.1-alpha.439
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.
- package/calendar/index.d.ts +5 -2
- package/calendar/lib/brn-calendar-cell-button.directive.d.ts +2 -2
- package/calendar/lib/brn-calendar-grid.directive.d.ts +1 -1
- package/calendar/lib/brn-calendar.directive.d.ts +4 -1
- package/calendar/lib/brn-calendar.token.d.ts +19 -5
- package/calendar/lib/mode/brn-calendar-multiple.directive.d.ts +61 -0
- package/fesm2022/spartan-ng-brain-calendar.mjs +196 -9
- package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input-otp.mjs +212 -0
- package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-select.mjs +2 -1
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-slider.mjs +278 -342
- package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle-group.mjs +260 -0
- package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-toggle.mjs +6 -197
- package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tooltip.mjs +18 -8
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/hlm-tailwind-preset.js +5 -0
- package/input-otp/README.md +3 -0
- package/input-otp/index.d.ts +10 -0
- package/input-otp/lib/brn-input-otp-slot.component.d.ts +14 -0
- package/input-otp/lib/brn-input-otp.component.d.ts +57 -0
- package/input-otp/lib/brn-input-otp.token.d.ts +5 -0
- package/package.json +9 -1
- package/slider/index.d.ts +9 -4
- package/slider/lib/brn-slider-range.directive.d.ts +7 -0
- package/slider/lib/brn-slider-thumb.directive.d.ts +18 -11
- package/slider/lib/brn-slider-tick.directive.d.ts +12 -0
- package/slider/lib/brn-slider-track.directive.d.ts +8 -136
- package/slider/lib/brn-slider-track.token.d.ts +5 -0
- package/slider/lib/brn-slider.directive.d.ts +37 -0
- package/slider/lib/brn-slider.token.d.ts +4 -0
- package/toggle/index.d.ts +0 -7
- package/toggle/lib/brn-toggle.directive.d.ts +0 -2
- package/toggle-group/README.md +3 -0
- package/toggle-group/index.d.ts +15 -0
- package/{toggle → toggle-group}/lib/brn-toggle-group.component.d.ts +5 -5
- package/toggle-group/lib/brn-toggle-item.directive.d.ts +25 -0
- package/tooltip/lib/brn-tooltip-trigger.directive.d.ts +8 -4
- package/slider/lib/brn-slider-tick-mark.directive.d.ts +0 -15
- package/slider/lib/brn-slider-track-active-fill.directive.d.ts +0 -10
- /package/{toggle → toggle-group}/lib/brn-toggle-group.token.d.ts +0 -0
|
@@ -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.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-grid.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-header.directive.ts","../../../../libs/brain/calendar/src/lib/i18n/calendar-i18n.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-next-button.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-previous-button.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-week.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-weekday.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar.directive.ts","../../../../libs/brain/calendar/src/index.ts","../../../../libs/brain/calendar/src/spartan-ng-brain-calendar.ts"],"sourcesContent":["import { ExistingProvider, InjectionToken, Type, inject } from '@angular/core';\nimport type { BrnCalendarDirective } from './brn-calendar.directive';\n\nexport const BrnCalendarToken = new InjectionToken<BrnCalendarDirective<unknown>>('BrnCalendarToken');\n\nexport function provideBrnCalendar<T>(instance: Type<BrnCalendarDirective<T>>): ExistingProvider {\n\treturn { provide: BrnCalendarToken, useExisting: instance };\n}\n\n/**\n * Inject the calendar component.\n */\nexport function injectBrnCalendar<T>(): BrnCalendarDirective<T> {\n\treturn inject(BrnCalendarToken) as BrnCalendarDirective<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\tstandalone: true,\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 BrnCalendarCellButtonDirective<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(() => {\n\t\tconst selectedDate = this.calendar.date();\n\t\treturn selectedDate && this.dateAdapter.isSameDay(this.date(), selectedDate);\n\t});\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 } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCalendarCell]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarCellDirective {}\n","import { Directive } from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarGrid]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'grid',\n\t\t'[attr.aria-labelledby]': 'calendar.header()?.id()',\n\t},\n})\nexport class BrnCalendarGridDirective<T> {\n\t/** Access the calendar component */\n\tprotected readonly calendar = injectBrnCalendar<T>();\n}\n","import { Directive, input } from '@angular/core';\n\nlet uniqueId = 0;\n\n@Directive({\n\tselector: '[brnCalendarHeader]',\n\tstandalone: true,\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'aria-live': 'polite',\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarHeaderDirective {\n\t/** The unique id for the header */\n\tpublic readonly id = input(`brn-calendar-header-${uniqueId++}`);\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\tstandalone: true,\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': 'i18n.labelNext()',\n\t},\n})\nexport class BrnCalendarNextButtonDirective {\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\tstandalone: true,\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': 'i18n.labelPrevious()',\n\t},\n})\nexport class BrnCalendarPreviousButtonDirective {\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\tstandalone: true,\n\tselector: '[brnCalendarWeek]',\n})\nexport class BrnCalendarWeekDirective<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 readonly _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>(_: BrnCalendarWeekDirective<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.length = 0;\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 { Directive, EmbeddedViewRef, OnDestroy, TemplateRef, ViewContainerRef, computed, inject } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tstandalone: true,\n\tselector: '[brnCalendarWeekday]',\n})\nexport class BrnCalendarWeekdayDirective<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 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 readonly _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>(_: BrnCalendarWeekdayDirective<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\tfor (const day of this.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\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\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 { BrnCalendarCellButtonDirective } from './brn-calendar-cell-button.directive';\nimport { BrnCalendarHeaderDirective } from './brn-calendar-header.directive';\nimport { provideBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendar]',\n\tstandalone: true,\n\tproviders: [provideBrnCalendar(BrnCalendarDirective)],\n})\nexport class BrnCalendarDirective<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(BrnCalendarHeaderDirective);\n\n\t/** Store the cells */\n\tprotected readonly cells = contentChildren<BrnCalendarCellButtonDirective<T>>(BrnCalendarCellButtonDirective, {\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\tselectDate(date: T): void {\n\t\tthis.date.set(date);\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","export * from './lib/brn-calendar-cell-button.directive';\nexport * from './lib/brn-calendar-cell.directive';\nexport * from './lib/brn-calendar-grid.directive';\nexport * from './lib/brn-calendar-header.directive';\nexport * from './lib/brn-calendar-next-button.directive';\nexport * from './lib/brn-calendar-previous-button.directive';\nexport * from './lib/brn-calendar-week.directive';\nexport * from './lib/brn-calendar-weekday.directive';\nexport * from './lib/brn-calendar.directive';\nexport * from './lib/brn-calendar.token';\nexport * from './lib/i18n/calendar-i18n';\n\nimport { NgModule } from '@angular/core';\nimport { BrnCalendarCellButtonDirective } from './lib/brn-calendar-cell-button.directive';\nimport { BrnCalendarCellDirective } from './lib/brn-calendar-cell.directive';\nimport { BrnCalendarGridDirective } from './lib/brn-calendar-grid.directive';\nimport { BrnCalendarHeaderDirective } from './lib/brn-calendar-header.directive';\nimport { BrnCalendarNextButtonDirective } from './lib/brn-calendar-next-button.directive';\nimport { BrnCalendarPreviousButtonDirective } from './lib/brn-calendar-previous-button.directive';\nimport { BrnCalendarWeekDirective } from './lib/brn-calendar-week.directive';\nimport { BrnCalendarWeekdayDirective } from './lib/brn-calendar-weekday.directive';\nimport { BrnCalendarDirective } from './lib/brn-calendar.directive';\n\nexport const BrnCalendarImports = [\n\tBrnCalendarCellButtonDirective,\n\tBrnCalendarGridDirective,\n\tBrnCalendarHeaderDirective,\n\tBrnCalendarNextButtonDirective,\n\tBrnCalendarPreviousButtonDirective,\n\tBrnCalendarWeekDirective,\n\tBrnCalendarWeekdayDirective,\n\tBrnCalendarDirective,\n\tBrnCalendarCellDirective,\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":";;;;MAGa,gBAAgB,GAAG,IAAI,cAAc,CAAgC,kBAAkB;AAE9F,SAAU,kBAAkB,CAAI,QAAuC,EAAA;IAC5E,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE;AAC5D;AAEA;;AAE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,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAf7B,8BAA8B;YAC9B,wBAAwB;YACxB,0BAA0B;YAC1B,8BAA8B;YAC9B,kCAAkC;YAClC,wBAAwB;YACxB,2BAA2B;YAC3B,oBAAoB;AACpB,YAAA,wBAAwB,aARxB,8BAA8B;YAC9B,wBAAwB;YACxB,0BAA0B;YAC1B,8BAA8B;YAC9B,kCAAkC;YAClC,wBAAwB;YACxB,2BAA2B;YAC3B,oBAAoB;YACpB,wBAAwB,CAAA,EAAA,CAAA;2HAOZ,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;;;ACtCD;;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.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-grid.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-header.directive.ts","../../../../libs/brain/calendar/src/lib/i18n/calendar-i18n.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-next-button.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-previous-button.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-week.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-weekday.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar.directive.ts","../../../../libs/brain/calendar/src/lib/mode/brn-calendar-multiple.directive.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 { BrnCalendarHeaderDirective } from './brn-calendar-header.directive';\n\nexport interface BrnCalendar<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<BrnCalendarHeaderDirective | undefined>;\n\tstate: Signal<{\n\t\tfocusedDate: WritableSignal<T>;\n\t}>;\n\tdays: Signal<T[]>;\n}\n\nexport const BrnCalendarToken = new InjectionToken<BrnCalendar<unknown>>('BrnCalendarToken');\n\nexport function provideBrnCalendar<T>(instance: Type<BrnCalendar<T>>): ExistingProvider {\n\treturn { provide: BrnCalendarToken, useExisting: instance };\n}\n\n/**\n * Inject the calendar component.\n */\nexport function injectBrnCalendar<T>(): BrnCalendar<T> {\n\treturn inject(BrnCalendarToken) as BrnCalendar<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\tstandalone: true,\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 BrnCalendarCellButtonDirective<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 } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCalendarCell]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarCellDirective {}\n","import { Directive } from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarGrid]',\n\tstandalone: true,\n\thost: {\n\t\trole: 'grid',\n\t\t'[attr.aria-labelledby]': 'calendar.header()?.id()',\n\t},\n})\nexport class BrnCalendarGridDirective<T> {\n\t/** Access the calendar component */\n\tprotected readonly calendar = injectBrnCalendar<T>();\n}\n","import { Directive, input } from '@angular/core';\n\nlet uniqueId = 0;\n\n@Directive({\n\tselector: '[brnCalendarHeader]',\n\tstandalone: true,\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'aria-live': 'polite',\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarHeaderDirective {\n\t/** The unique id for the header */\n\tpublic readonly id = input(`brn-calendar-header-${uniqueId++}`);\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\tstandalone: true,\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': 'i18n.labelNext()',\n\t},\n})\nexport class BrnCalendarNextButtonDirective {\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\tstandalone: true,\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': 'i18n.labelPrevious()',\n\t},\n})\nexport class BrnCalendarPreviousButtonDirective {\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\tstandalone: true,\n\tselector: '[brnCalendarWeek]',\n})\nexport class BrnCalendarWeekDirective<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 readonly _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>(_: BrnCalendarWeekDirective<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.length = 0;\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 { Directive, EmbeddedViewRef, OnDestroy, TemplateRef, ViewContainerRef, computed, inject } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tstandalone: true,\n\tselector: '[brnCalendarWeekday]',\n})\nexport class BrnCalendarWeekdayDirective<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 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 readonly _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>(_: BrnCalendarWeekdayDirective<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\tfor (const day of this.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\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\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 { BrnCalendarCellButtonDirective } from './brn-calendar-cell-button.directive';\nimport { BrnCalendarHeaderDirective } from './brn-calendar-header.directive';\nimport { BrnCalendar, provideBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendar]',\n\tstandalone: true,\n\tproviders: [provideBrnCalendar(BrnCalendarDirective)],\n})\nexport class BrnCalendarDirective<T> implements BrnCalendar<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(BrnCalendarHeaderDirective);\n\n\t/** Store the cells */\n\tprotected readonly cells = contentChildren<BrnCalendarCellButtonDirective<T>>(BrnCalendarCellButtonDirective, {\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 { 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 { BrnCalendarCellButtonDirective } from '../brn-calendar-cell-button.directive';\nimport { BrnCalendarHeaderDirective } from '../brn-calendar-header.directive';\nimport { Weekday } from '../brn-calendar.directive';\nimport { BrnCalendar, provideBrnCalendar } from '../brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarMulti]',\n\tstandalone: true,\n\tproviders: [provideBrnCalendar(BrnCalendarMultiDirective)],\n})\nexport class BrnCalendarMultiDirective<T> implements BrnCalendar<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(BrnCalendarHeaderDirective);\n\n\t/** Store the cells */\n\tprotected readonly cells = contentChildren<BrnCalendarCellButtonDirective<T>>(BrnCalendarCellButtonDirective, {\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-cell-button.directive';\nexport * from './lib/brn-calendar-cell.directive';\nexport * from './lib/brn-calendar-grid.directive';\nexport * from './lib/brn-calendar-header.directive';\nexport * from './lib/brn-calendar-next-button.directive';\nexport * from './lib/brn-calendar-previous-button.directive';\nexport * from './lib/brn-calendar-week.directive';\nexport * from './lib/brn-calendar-weekday.directive';\nexport * from './lib/brn-calendar.directive';\nexport * from './lib/brn-calendar.token';\nexport * from './lib/i18n/calendar-i18n';\nexport * from './lib/mode/brn-calendar-multiple.directive';\n\nimport { NgModule } from '@angular/core';\nimport { BrnCalendarCellButtonDirective } from './lib/brn-calendar-cell-button.directive';\nimport { BrnCalendarCellDirective } from './lib/brn-calendar-cell.directive';\nimport { BrnCalendarGridDirective } from './lib/brn-calendar-grid.directive';\nimport { BrnCalendarHeaderDirective } from './lib/brn-calendar-header.directive';\nimport { BrnCalendarNextButtonDirective } from './lib/brn-calendar-next-button.directive';\nimport { BrnCalendarPreviousButtonDirective } from './lib/brn-calendar-previous-button.directive';\nimport { BrnCalendarWeekDirective } from './lib/brn-calendar-week.directive';\nimport { BrnCalendarWeekdayDirective } from './lib/brn-calendar-weekday.directive';\nimport { BrnCalendarDirective } from './lib/brn-calendar.directive';\nimport { BrnCalendarMultiDirective } from './lib/mode/brn-calendar-multiple.directive';\n\nexport const BrnCalendarImports = [\n\tBrnCalendarCellButtonDirective,\n\tBrnCalendarGridDirective,\n\tBrnCalendarHeaderDirective,\n\tBrnCalendarNextButtonDirective,\n\tBrnCalendarPreviousButtonDirective,\n\tBrnCalendarWeekDirective,\n\tBrnCalendarWeekdayDirective,\n\tBrnCalendarDirective,\n\tBrnCalendarCellDirective,\n\tBrnCalendarMultiDirective,\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,CAAuB,kBAAkB;AAErF,SAAU,kBAAkB,CAAI,QAA8B,EAAA;IACnE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE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AA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAhB7B,8BAA8B;YAC9B,wBAAwB;YACxB,0BAA0B;YAC1B,8BAA8B;YAC9B,kCAAkC;YAClC,wBAAwB;YACxB,2BAA2B;YAC3B,oBAAoB;YACpB,wBAAwB;AACxB,YAAA,yBAAyB,aATzB,8BAA8B;YAC9B,wBAAwB;YACxB,0BAA0B;YAC1B,8BAA8B;YAC9B,kCAAkC;YAClC,wBAAwB;YACxB,2BAA2B;YAC3B,oBAAoB;YACpB,wBAAwB;YACxB,yBAAyB,CAAA,EAAA,CAAA;2HAOb,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;;;;"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, input, numberAttribute, computed, Component, forwardRef, signal, booleanAttribute, model, output, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
const BrnInputOtpToken = new InjectionToken('BrnInputOtpToken');
|
|
7
|
+
function injectBrnInputOtp() {
|
|
8
|
+
return inject(BrnInputOtpToken);
|
|
9
|
+
}
|
|
10
|
+
function provideBrnInputOtp(inputOtp) {
|
|
11
|
+
return { provide: BrnInputOtpToken, useExisting: inputOtp };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class BrnInputOtpSlotComponent {
|
|
15
|
+
/** Access the input-otp component */
|
|
16
|
+
inputOtp = injectBrnInputOtp();
|
|
17
|
+
index = input.required({ transform: numberAttribute });
|
|
18
|
+
slot = computed(() => this.inputOtp.context()[this.index()]);
|
|
19
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: BrnInputOtpSlotComponent, isStandalone: true, selector: "brn-input-otp-slot", inputs: { index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.data-active": "slot().isActive" } }, ngImport: i0, template: `
|
|
21
|
+
{{ slot().char }}
|
|
22
|
+
|
|
23
|
+
@if (slot().hasFakeCaret) {
|
|
24
|
+
<ng-content />
|
|
25
|
+
}
|
|
26
|
+
`, isInline: true });
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpSlotComponent, decorators: [{
|
|
29
|
+
type: Component,
|
|
30
|
+
args: [{
|
|
31
|
+
selector: 'brn-input-otp-slot',
|
|
32
|
+
standalone: true,
|
|
33
|
+
template: `
|
|
34
|
+
{{ slot().char }}
|
|
35
|
+
|
|
36
|
+
@if (slot().hasFakeCaret) {
|
|
37
|
+
<ng-content />
|
|
38
|
+
}
|
|
39
|
+
`,
|
|
40
|
+
host: {
|
|
41
|
+
'[attr.data-active]': 'slot().isActive',
|
|
42
|
+
},
|
|
43
|
+
}]
|
|
44
|
+
}] });
|
|
45
|
+
|
|
46
|
+
const BRN_INPUT_OTP_VALUE_ACCESSOR = {
|
|
47
|
+
provide: NG_VALUE_ACCESSOR,
|
|
48
|
+
useExisting: forwardRef(() => BrnInputOtpComponent),
|
|
49
|
+
multi: true,
|
|
50
|
+
};
|
|
51
|
+
class BrnInputOtpComponent {
|
|
52
|
+
/** Whether the input has focus. */
|
|
53
|
+
focused = signal(false);
|
|
54
|
+
hostStyles = input('position: relative; cursor: text; user-select: none; pointer-events: none;');
|
|
55
|
+
inputStyles = input('position: absolute; inset: 0; width: 100%; height: 100%; display: flex; textAlign: left; opacity: 1; color: transparent; pointerEvents: all; background: transparent; caret-color: transparent; border: 0px solid transparent; outline: transparent solid 0px; box-shadow: none; line-height: 1; letter-spacing: -0.5em; font-family: monospace; font-variant-numeric: tabular-nums;');
|
|
56
|
+
containerStyles = input('position: absolute; inset: 0; pointer-events: none;');
|
|
57
|
+
/** Determine if the date picker is disabled. */
|
|
58
|
+
disabled = input(false, {
|
|
59
|
+
transform: booleanAttribute,
|
|
60
|
+
});
|
|
61
|
+
/** The number of slots. */
|
|
62
|
+
maxLength = input.required({ transform: numberAttribute });
|
|
63
|
+
/** Virtual keyboard appearance on mobile */
|
|
64
|
+
inputMode = input('numeric');
|
|
65
|
+
inputClass = input('');
|
|
66
|
+
/**
|
|
67
|
+
* Defines how the pasted text should be transformed before saving to model/form.
|
|
68
|
+
* Allows pasting text which contains extra characters like spaces, dashes, etc. and are longer than the maxLength.
|
|
69
|
+
*
|
|
70
|
+
* "XXX-XXX": (pastedText) => pastedText.replaceAll('-', '')
|
|
71
|
+
* "XXX XXX": (pastedText) => pastedText.replaceAll(/\s+/g, '')
|
|
72
|
+
*/
|
|
73
|
+
transformPaste = input((text) => text);
|
|
74
|
+
/** The value controlling the input */
|
|
75
|
+
value = model('');
|
|
76
|
+
context = computed(() => {
|
|
77
|
+
const value = this.value();
|
|
78
|
+
const focused = this.focused();
|
|
79
|
+
const maxLength = this.maxLength();
|
|
80
|
+
const slots = Array.from({ length: this.maxLength() }).map((_, slotIndex) => {
|
|
81
|
+
const char = value[slotIndex] !== undefined ? value[slotIndex] : null;
|
|
82
|
+
const isActive = focused && (value.length === slotIndex || (value.length === maxLength && slotIndex === maxLength - 1));
|
|
83
|
+
return {
|
|
84
|
+
char,
|
|
85
|
+
isActive,
|
|
86
|
+
hasFakeCaret: isActive && value.length === slotIndex,
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
return slots;
|
|
90
|
+
});
|
|
91
|
+
/** Emitted when the input is complete, triggered through input or paste. */
|
|
92
|
+
completed = output();
|
|
93
|
+
state = computed(() => ({
|
|
94
|
+
disabled: signal(this.disabled()),
|
|
95
|
+
}));
|
|
96
|
+
_onChange;
|
|
97
|
+
_onTouched;
|
|
98
|
+
onInputChange(event) {
|
|
99
|
+
let newValue = event.target.value;
|
|
100
|
+
const maxLength = this.maxLength();
|
|
101
|
+
if (newValue.length > maxLength) {
|
|
102
|
+
// Replace the last character when max length is exceeded
|
|
103
|
+
newValue = newValue.slice(0, maxLength - 1) + newValue.slice(-1);
|
|
104
|
+
}
|
|
105
|
+
this.updateValue(newValue, maxLength);
|
|
106
|
+
}
|
|
107
|
+
onPaste(event) {
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
const clipboardData = event.clipboardData?.getData('text/plain') || '';
|
|
110
|
+
const maxLength = this.maxLength();
|
|
111
|
+
const content = this.transformPaste()(clipboardData, maxLength);
|
|
112
|
+
const newValue = content.slice(0, maxLength);
|
|
113
|
+
this.updateValue(newValue, maxLength);
|
|
114
|
+
}
|
|
115
|
+
/** CONTROL VALUE ACCESSOR */
|
|
116
|
+
writeValue(value) {
|
|
117
|
+
// optional FormControl is initialized with null value
|
|
118
|
+
if (value === null)
|
|
119
|
+
return;
|
|
120
|
+
this.updateValue(value, this.maxLength());
|
|
121
|
+
}
|
|
122
|
+
registerOnChange(fn) {
|
|
123
|
+
this._onChange = fn;
|
|
124
|
+
}
|
|
125
|
+
registerOnTouched(fn) {
|
|
126
|
+
this._onTouched = fn;
|
|
127
|
+
}
|
|
128
|
+
setDisabledState(isDisabled) {
|
|
129
|
+
this.state().disabled.set(isDisabled);
|
|
130
|
+
}
|
|
131
|
+
isCompleted(newValue, previousValue, maxLength) {
|
|
132
|
+
return newValue !== previousValue && previousValue.length < maxLength && newValue.length === maxLength;
|
|
133
|
+
}
|
|
134
|
+
updateValue(newValue, maxLength) {
|
|
135
|
+
const previousValue = this.value();
|
|
136
|
+
this.value.set(newValue);
|
|
137
|
+
this._onChange?.(newValue);
|
|
138
|
+
if (this.isCompleted(newValue, previousValue, maxLength)) {
|
|
139
|
+
this.completed.emit(newValue);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: BrnInputOtpComponent, isStandalone: true, selector: "brn-input-otp", inputs: { hostStyles: { classPropertyName: "hostStyles", publicName: "hostStyles", isSignal: true, isRequired: false, transformFunction: null }, inputStyles: { classPropertyName: "inputStyles", publicName: "inputStyles", isSignal: true, isRequired: false, transformFunction: null }, containerStyles: { classPropertyName: "containerStyles", publicName: "containerStyles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: true, transformFunction: null }, inputMode: { classPropertyName: "inputMode", publicName: "inputMode", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, transformPaste: { classPropertyName: "transformPaste", publicName: "transformPaste", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", completed: "completed" }, host: { attributes: { "data-input-otp-container": "true" }, properties: { "style": "hostStyles()" } }, providers: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtpComponent)], ngImport: i0, template: `
|
|
144
|
+
<ng-content />
|
|
145
|
+
<div [style]="containerStyles()">
|
|
146
|
+
<input
|
|
147
|
+
[class]="inputClass()"
|
|
148
|
+
autocomplete="one-time-code"
|
|
149
|
+
data-slot="input-otp"
|
|
150
|
+
[style]="inputStyles()"
|
|
151
|
+
[disabled]="state().disabled()"
|
|
152
|
+
[inputMode]="inputMode()"
|
|
153
|
+
[ngModel]="value()"
|
|
154
|
+
(input)="onInputChange($event)"
|
|
155
|
+
(paste)="onPaste($event)"
|
|
156
|
+
(focus)="focused.set(true)"
|
|
157
|
+
(blur)="focused.set(false)"
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
161
|
+
}
|
|
162
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpComponent, decorators: [{
|
|
163
|
+
type: Component,
|
|
164
|
+
args: [{
|
|
165
|
+
selector: 'brn-input-otp',
|
|
166
|
+
standalone: true,
|
|
167
|
+
imports: [FormsModule],
|
|
168
|
+
template: `
|
|
169
|
+
<ng-content />
|
|
170
|
+
<div [style]="containerStyles()">
|
|
171
|
+
<input
|
|
172
|
+
[class]="inputClass()"
|
|
173
|
+
autocomplete="one-time-code"
|
|
174
|
+
data-slot="input-otp"
|
|
175
|
+
[style]="inputStyles()"
|
|
176
|
+
[disabled]="state().disabled()"
|
|
177
|
+
[inputMode]="inputMode()"
|
|
178
|
+
[ngModel]="value()"
|
|
179
|
+
(input)="onInputChange($event)"
|
|
180
|
+
(paste)="onPaste($event)"
|
|
181
|
+
(focus)="focused.set(true)"
|
|
182
|
+
(blur)="focused.set(false)"
|
|
183
|
+
/>
|
|
184
|
+
</div>
|
|
185
|
+
`,
|
|
186
|
+
host: {
|
|
187
|
+
'[style]': 'hostStyles()',
|
|
188
|
+
'data-input-otp-container': 'true',
|
|
189
|
+
},
|
|
190
|
+
providers: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtpComponent)],
|
|
191
|
+
}]
|
|
192
|
+
}] });
|
|
193
|
+
|
|
194
|
+
class BrnInputOtpModule {
|
|
195
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
196
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, imports: [BrnInputOtpComponent, BrnInputOtpSlotComponent], exports: [BrnInputOtpComponent, BrnInputOtpSlotComponent] });
|
|
197
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, imports: [BrnInputOtpComponent] });
|
|
198
|
+
}
|
|
199
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, decorators: [{
|
|
200
|
+
type: NgModule,
|
|
201
|
+
args: [{
|
|
202
|
+
imports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],
|
|
203
|
+
exports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],
|
|
204
|
+
}]
|
|
205
|
+
}] });
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Generated bundle index. Do not edit.
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
export { BRN_INPUT_OTP_VALUE_ACCESSOR, BrnInputOtpComponent, BrnInputOtpModule, BrnInputOtpSlotComponent };
|
|
212
|
+
//# sourceMappingURL=spartan-ng-brain-input-otp.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-input-otp.mjs","sources":["../../../../libs/brain/input-otp/src/lib/brn-input-otp.token.ts","../../../../libs/brain/input-otp/src/lib/brn-input-otp-slot.component.ts","../../../../libs/brain/input-otp/src/lib/brn-input-otp.component.ts","../../../../libs/brain/input-otp/src/index.ts","../../../../libs/brain/input-otp/src/spartan-ng-brain-input-otp.ts"],"sourcesContent":["import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport { BrnInputOtpComponent } from './brn-input-otp.component';\n\nexport const BrnInputOtpToken = new InjectionToken<BrnInputOtpComponent>('BrnInputOtpToken');\n\nexport function injectBrnInputOtp(): BrnInputOtpComponent {\n\treturn inject(BrnInputOtpToken) as BrnInputOtpComponent;\n}\n\nexport function provideBrnInputOtp(inputOtp: Type<BrnInputOtpComponent>): ExistingProvider {\n\treturn { provide: BrnInputOtpToken, useExisting: inputOtp };\n}\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Component, computed, input, numberAttribute } from '@angular/core';\nimport { injectBrnInputOtp } from './brn-input-otp.token';\n\n@Component({\n\tselector: 'brn-input-otp-slot',\n\tstandalone: true,\n\ttemplate: `\n\t\t{{ slot().char }}\n\n\t\t@if (slot().hasFakeCaret) {\n\t\t\t<ng-content />\n\t\t}\n\t`,\n\thost: {\n\t\t'[attr.data-active]': 'slot().isActive',\n\t},\n})\nexport class BrnInputOtpSlotComponent {\n\t/** Access the input-otp component */\n\tprotected readonly inputOtp = injectBrnInputOtp();\n\n\tpublic readonly index = input.required<number, NumberInput>({ transform: numberAttribute });\n\n\tpublic readonly slot = computed(() => this.inputOtp.context()[this.index()]);\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tbooleanAttribute,\n\tComponent,\n\tcomputed,\n\tforwardRef,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { provideBrnInputOtp } from './brn-input-otp.token';\n\nexport const BRN_INPUT_OTP_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnInputOtpComponent),\n\tmulti: true,\n};\n\nexport type InputMode = 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n@Component({\n\tselector: 'brn-input-otp',\n\tstandalone: true,\n\timports: [FormsModule],\n\ttemplate: `\n\t\t<ng-content />\n\t\t<div [style]=\"containerStyles()\">\n\t\t\t<input\n\t\t\t\t[class]=\"inputClass()\"\n\t\t\t\tautocomplete=\"one-time-code\"\n\t\t\t\tdata-slot=\"input-otp\"\n\t\t\t\t[style]=\"inputStyles()\"\n\t\t\t\t[disabled]=\"state().disabled()\"\n\t\t\t\t[inputMode]=\"inputMode()\"\n\t\t\t\t[ngModel]=\"value()\"\n\t\t\t\t(input)=\"onInputChange($event)\"\n\t\t\t\t(paste)=\"onPaste($event)\"\n\t\t\t\t(focus)=\"focused.set(true)\"\n\t\t\t\t(blur)=\"focused.set(false)\"\n\t\t\t/>\n\t\t</div>\n\t`,\n\thost: {\n\t\t'[style]': 'hostStyles()',\n\t\t'data-input-otp-container': 'true',\n\t},\n\tproviders: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtpComponent)],\n})\nexport class BrnInputOtpComponent implements ControlValueAccessor {\n\t/** Whether the input has focus. */\n\tprotected readonly focused = signal<boolean>(false);\n\n\tpublic readonly hostStyles = input<string>(\n\t\t'position: relative; cursor: text; user-select: none; pointer-events: none;',\n\t);\n\n\tpublic readonly inputStyles = input<string>(\n\t\t'position: absolute; inset: 0; width: 100%; height: 100%; display: flex; textAlign: left; opacity: 1; color: transparent; pointerEvents: all; background: transparent; caret-color: transparent; border: 0px solid transparent; outline: transparent solid 0px; box-shadow: none; line-height: 1; letter-spacing: -0.5em; font-family: monospace; font-variant-numeric: tabular-nums;',\n\t);\n\n\tpublic readonly containerStyles = input<string>('position: absolute; inset: 0; pointer-events: none;');\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 number of slots. */\n\tpublic readonly maxLength = input.required<number, NumberInput>({ transform: numberAttribute });\n\n\t/** Virtual keyboard appearance on mobile */\n\tpublic readonly inputMode = input<InputMode>('numeric');\n\n\tpublic readonly inputClass = input<string>('');\n\n\t/**\n\t * Defines how the pasted text should be transformed before saving to model/form.\n\t * Allows pasting text which contains extra characters like spaces, dashes, etc. and are longer than the maxLength.\n\t *\n\t * \"XXX-XXX\": (pastedText) => pastedText.replaceAll('-', '')\n\t * \"XXX XXX\": (pastedText) => pastedText.replaceAll(/\\s+/g, '')\n\t */\n\tpublic readonly transformPaste = input<(pastedText: string, maxLength: number) => string>((text) => text);\n\n\t/** The value controlling the input */\n\tpublic readonly value = model('');\n\n\tpublic readonly context = computed(() => {\n\t\tconst value = this.value();\n\t\tconst focused = this.focused();\n\t\tconst maxLength = this.maxLength();\n\t\tconst slots = Array.from({ length: this.maxLength() }).map((_, slotIndex) => {\n\t\t\tconst char = value[slotIndex] !== undefined ? value[slotIndex] : null;\n\n\t\t\tconst isActive =\n\t\t\t\tfocused && (value.length === slotIndex || (value.length === maxLength && slotIndex === maxLength - 1));\n\n\t\t\treturn {\n\t\t\t\tchar,\n\t\t\t\tisActive,\n\t\t\t\thasFakeCaret: isActive && value.length === slotIndex,\n\t\t\t};\n\t\t});\n\n\t\treturn slots;\n\t});\n\n\t/** Emitted when the input is complete, triggered through input or paste. */\n\tpublic readonly completed = output<string>();\n\n\tprotected readonly state = computed(() => ({\n\t\tdisabled: signal(this.disabled()),\n\t}));\n\n\tprotected _onChange?: ChangeFn<string>;\n\tprotected _onTouched?: TouchFn;\n\n\tprotected onInputChange(event: Event) {\n\t\tlet newValue = (event.target as HTMLInputElement).value;\n\t\tconst maxLength = this.maxLength();\n\n\t\tif (newValue.length > maxLength) {\n\t\t\t// Replace the last character when max length is exceeded\n\t\t\tnewValue = newValue.slice(0, maxLength - 1) + newValue.slice(-1);\n\t\t}\n\n\t\tthis.updateValue(newValue, maxLength);\n\t}\n\n\tprotected onPaste(event: ClipboardEvent) {\n\t\tevent.preventDefault();\n\t\tconst clipboardData = event.clipboardData?.getData('text/plain') || '';\n\n\t\tconst maxLength = this.maxLength();\n\n\t\tconst content = this.transformPaste()(clipboardData, maxLength);\n\t\tconst newValue = content.slice(0, maxLength);\n\n\t\tthis.updateValue(newValue, maxLength);\n\t}\n\n\t/** CONTROL VALUE ACCESSOR */\n\twriteValue(value: string | null): void {\n\t\t// optional FormControl is initialized with null value\n\t\tif (value === null) return;\n\n\t\tthis.updateValue(value, this.maxLength());\n\t}\n\n\tregisterOnChange(fn: ChangeFn<string>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.state().disabled.set(isDisabled);\n\t}\n\n\tprivate isCompleted(newValue: string, previousValue: string, maxLength: number) {\n\t\treturn newValue !== previousValue && previousValue.length < maxLength && newValue.length === maxLength;\n\t}\n\n\tprivate updateValue(newValue: string, maxLength: number) {\n\t\tconst previousValue = this.value();\n\n\t\tthis.value.set(newValue);\n\t\tthis._onChange?.(newValue);\n\n\t\tif (this.isCompleted(newValue, previousValue, maxLength)) {\n\t\t\tthis.completed.emit(newValue);\n\t\t}\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { BrnInputOtpSlotComponent } from './lib/brn-input-otp-slot.component';\nimport { BrnInputOtpComponent } from './lib/brn-input-otp.component';\n\nexport * from './lib/brn-input-otp-slot.component';\nexport * from './lib/brn-input-otp.component';\n\n@NgModule({\n\timports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],\n\texports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],\n})\nexport class BrnInputOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,gBAAgB,GAAG,IAAI,cAAc,CAAuB,kBAAkB,CAAC;SAE5E,iBAAiB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAyB;AACxD;AAEM,SAAU,kBAAkB,CAAC,QAAoC,EAAA;IACtE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE;AAC5D;;MCOa,wBAAwB,CAAA;;IAEjB,QAAQ,GAAG,iBAAiB,EAAE;IAEjC,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAsB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAE3E,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;0HANhE,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAX1B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAA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CAC9C,EAAA,OAAA,EAAA,CAAA,oBAAoB,EAAE,wBAAwB,CAAA,EAAA,CAAA;AAE5C,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHnB,oBAAoB,CAAA,EAAA,CAAA;;2FAGlB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;AACzD,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;AACzD,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -467,7 +467,7 @@ class BrnSelectValueComponent {
|
|
|
467
467
|
_values = computed(() => Array.isArray(this._select.value()) ? this._select.value() : [this._select.value()]);
|
|
468
468
|
transformFn = input((values) => (values ?? []).join(', '));
|
|
469
469
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnSelectValueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
470
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: BrnSelectValueComponent, isStandalone: true, selector: "brn-select-value, hlm-select-value", inputs: { transformFn: { classPropertyName: "transformFn", publicName: "transformFn", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()" } }, queries: [{ propertyName: "customValueTemplate", first: true, predicate: BrnSelectValueDirective, descendants: true, isSignal: true }, { propertyName: "customPlaceholderTemplate", first: true, predicate: BrnSelectPlaceholderDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
470
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: BrnSelectValueComponent, isStandalone: true, selector: "brn-select-value, hlm-select-value", inputs: { transformFn: { classPropertyName: "transformFn", publicName: "transformFn", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()", "attr.data-placeholder": "_showPlaceholder() ? \"\" : null" } }, queries: [{ propertyName: "customValueTemplate", first: true, predicate: BrnSelectValueDirective, descendants: true, isSignal: true }, { propertyName: "customPlaceholderTemplate", first: true, predicate: BrnSelectPlaceholderDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
471
471
|
@if (_showPlaceholder()) {
|
|
472
472
|
<ng-container [ngTemplateOutlet]="customPlaceholderTemplate()?.templateRef ?? defaultPlaceholderTemplate" />
|
|
473
473
|
} @else {
|
|
@@ -497,6 +497,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
497
497
|
<ng-template #defaultPlaceholderTemplate>{{ placeholder() }}</ng-template>
|
|
498
498
|
`, host: {
|
|
499
499
|
'[id]': 'id()',
|
|
500
|
+
'[attr.data-placeholder]': '_showPlaceholder() ? "" : null',
|
|
500
501
|
}, standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;white-space:nowrap;pointer-events:none}\n"] }]
|
|
501
502
|
}] });
|
|
502
503
|
|