ng-primitives 0.109.3 → 0.109.4
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/date-picker/index.d.ts
CHANGED
|
@@ -386,6 +386,10 @@ declare class NgpDatePickerRowRender<T> implements OnDestroy {
|
|
|
386
386
|
* Store the previously rendered month.
|
|
387
387
|
*/
|
|
388
388
|
private previousMonth;
|
|
389
|
+
/**
|
|
390
|
+
* Store the previously rendered first day of the week.
|
|
391
|
+
*/
|
|
392
|
+
private previousFirstDayOfWeek;
|
|
389
393
|
constructor();
|
|
390
394
|
ngOnDestroy(): void;
|
|
391
395
|
/**
|
|
@@ -789,6 +789,10 @@ class NgpDatePickerRowRender {
|
|
|
789
789
|
* Store the previously rendered month.
|
|
790
790
|
*/
|
|
791
791
|
this.previousMonth = null;
|
|
792
|
+
/**
|
|
793
|
+
* Store the previously rendered first day of the week.
|
|
794
|
+
*/
|
|
795
|
+
this.previousFirstDayOfWeek = null;
|
|
792
796
|
// Wait for the inputs of the containing picker to be initialized.
|
|
793
797
|
explicitEffect([this.state().focusedDate, this.state().firstDayOfWeek], () => this.renderRows());
|
|
794
798
|
}
|
|
@@ -799,13 +803,16 @@ class NgpDatePickerRowRender {
|
|
|
799
803
|
* Render the row.
|
|
800
804
|
*/
|
|
801
805
|
renderRows() {
|
|
802
|
-
|
|
806
|
+
const currentFirstDayOfWeek = this.state().firstDayOfWeek();
|
|
807
|
+
// If neither the month nor the first day of the week has changed, do not re-render.
|
|
803
808
|
if (this.previousMonth &&
|
|
804
|
-
this.dateAdapter.isSameMonth(this.previousMonth, this.state().focusedDate())
|
|
809
|
+
this.dateAdapter.isSameMonth(this.previousMonth, this.state().focusedDate()) &&
|
|
810
|
+
this.previousFirstDayOfWeek === currentFirstDayOfWeek) {
|
|
805
811
|
return;
|
|
806
812
|
}
|
|
807
|
-
// Store the current focused month.
|
|
813
|
+
// Store the current focused month and first day of the week.
|
|
808
814
|
this.previousMonth = this.state().focusedDate();
|
|
815
|
+
this.previousFirstDayOfWeek = currentFirstDayOfWeek;
|
|
809
816
|
const weeks = this.weeks();
|
|
810
817
|
// clear the view container.
|
|
811
818
|
this.destroyRows();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-date-picker.mjs","sources":["../../../../packages/ng-primitives/date-picker/src/config/date-picker-config.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-row-render/date-picker-row-render-token.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-cell-render/date-picker-cell-render-token.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-cell-render/date-picker-cell-render.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-date-button/date-picker-date-button-token.ts","../../../../packages/ng-primitives/date-picker/src/date-range-picker/date-range-picker-state.ts","../../../../packages/ng-primitives/date-picker/src/date-picker/date-picker-state.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-cell/date-picker-cell.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-date-button/date-picker-date-button.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-grid/date-picker-grid.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-label/date-picker-label-token.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-label/date-picker-label.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-next-month/date-picker-next-month.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-previous-month/date-picker-previous-month.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-row-render/date-picker-row-render.ts","../../../../packages/ng-primitives/date-picker/src/date-picker/date-picker-first-day-of-week.ts","../../../../packages/ng-primitives/date-picker/src/date-picker/date-picker.ts","../../../../packages/ng-primitives/date-picker/src/date-range-picker/date-range-picker.ts","../../../../packages/ng-primitives/date-picker/src/ng-primitives-date-picker.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpDatePickerFirstDayOfWeekNumber } from '../date-picker/date-picker-first-day-of-week';\n\nexport interface NgpDatePickerConfig {\n /**\n * Define the first day of the week for the date picker calendar.\n * @default 7 (Sunday)\n */\n firstDayOfWeek: NgpDatePickerFirstDayOfWeekNumber;\n}\n\nexport const defaultDatePickerConfig: NgpDatePickerConfig = {\n firstDayOfWeek: 7,\n};\n\nexport const NgpDatePickerConfigToken = new InjectionToken<NgpDatePickerConfig>(\n 'NgpDatePickerConfigToken',\n);\n\n/**\n * Provide the default DatePicker / DateRangePicker configuration\n * @param config The DatePicker / DateRangePicker configuration\n * @returns The provider\n */\nexport function provideDatePickerConfig(config: Partial<NgpDatePickerConfig>): Provider[] {\n return [\n {\n provide: NgpDatePickerConfigToken,\n useValue: { ...defaultDatePickerConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the DatePicker / DateRangePicker configuration\n * @returns The global DatePicker / DateRangePicker configuration\n */\nexport function injectDatePickerConfig(): NgpDatePickerConfig {\n return inject(NgpDatePickerConfigToken, { optional: true }) ?? defaultDatePickerConfig;\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerRowRender } from './date-picker-row-render';\n\nexport const NgpDatePickerRowRenderToken = new InjectionToken<NgpDatePickerRowRender<unknown>>(\n 'NgpDatePickerRowRenderToken',\n);\n\n/**\n * Inject the DatePickerRowRender directive instance\n */\nexport function injectDatePickerRowRender<T>(): NgpDatePickerRowRender<T> {\n return inject(NgpDatePickerRowRenderToken) as NgpDatePickerRowRender<T>;\n}\n\nexport const NgpDatePickerWeekToken = new InjectionToken<unknown[]>('NgpDatePickerWeekToken');\n\n/**\n * Inject current week days\n */\nexport function injectDatePickerWeek<T>(): T[] {\n return inject(NgpDatePickerWeekToken) as T[];\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerCellRender } from './date-picker-cell-render';\n\nexport const NgpDatePickerCellRenderToken = new InjectionToken<NgpDatePickerCellRender<unknown>>(\n 'NgpDatePickerCellRenderToken',\n);\n\n/**\n * Inject the DatePickerCell directive instance\n */\nexport function injectDatePickerCellRender<T>(): NgpDatePickerCellRender<T> {\n return inject(NgpDatePickerCellRenderToken) as NgpDatePickerCellRender<T>;\n}\n\nexport const NgpDatePickerCellDateToken = new InjectionToken<unknown>('NgpDatePickerCellDateToken');\n\n/**\n * Inject current cell date\n */\nexport function injectDatePickerCellDate<T>(): T {\n return inject(NgpDatePickerCellDateToken) as T;\n}\n","import {\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { injectDatePickerWeek } from '../date-picker-row-render/date-picker-row-render-token';\nimport {\n NgpDatePickerCellDateToken,\n NgpDatePickerCellRenderToken,\n} from './date-picker-cell-render-token';\n\n/**\n * A structural directive that renders a cell in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerCellRender]',\n exportAs: 'ngpDatePickerCellRender',\n providers: [{ provide: NgpDatePickerCellRenderToken, useExisting: NgpDatePickerCellRender }],\n})\nexport class NgpDatePickerCellRender<T> implements OnDestroy {\n /**\n * Access the template ref for the cell.\n */\n private readonly templateRef = inject(TemplateRef);\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the dates in the week.\n */\n private readonly dates = injectDatePickerWeek<T>();\n\n /**\n * Store the view refs for the dates.\n */\n private readonly viewRefs: EmbeddedViewRef<NgpDatePickerCellContext<T>>[] = [];\n\n // Make sure the template checker knows the type of the context with which the\n // template of this directive will be rendered\n static ngTemplateContextGuard<T>(\n _: NgpDatePickerCellRender<T>,\n context: unknown,\n ): context is NgpDatePickerCellContext<T> {\n return true;\n }\n\n constructor() {\n this.renderDates();\n }\n\n /**\n * Render the dates in the week.\n */\n private renderDates(): void {\n this.viewRefs.forEach(viewRef => viewRef.destroy());\n\n for (const date of this.dates) {\n const viewRef = this.viewContainerRef.createEmbeddedView(\n this.templateRef,\n {\n $implicit: date,\n },\n {\n injector: Injector.create({\n parent: this.viewContainerRef.injector,\n providers: [{ provide: NgpDatePickerCellDateToken, useValue: date }],\n }),\n },\n );\n this.viewRefs.push(viewRef);\n }\n }\n\n /**\n * Destroy the view refs.\n */\n ngOnDestroy(): void {\n this.viewRefs.forEach(viewRef => viewRef.destroy());\n }\n}\n\ninterface NgpDatePickerCellContext<T> {\n $implicit: T;\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerDateButton } from './date-picker-date-button';\n\nexport const NgpDatePickerDateButtonToken = new InjectionToken<NgpDatePickerDateButton<unknown>>(\n 'NgpDatePickerDateButtonToken',\n);\n\n/**\n * Inject the DatePickerDateButton directive instance\n */\nexport function injectDatePickerDateButton<T>(): NgpDatePickerDateButton<T> {\n return inject(NgpDatePickerDateButtonToken) as NgpDatePickerDateButton<T>;\n}\n","import { InjectOptions } from '@angular/core';\nimport {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n InjectedState,\n} from 'ng-primitives/state';\nimport type { NgpDateRangePicker } from './date-range-picker';\n\n/**\n * The state token for the DateRangePicker primitive.\n */\nexport const NgpDateRangePickerStateToken =\n createStateToken<NgpDateRangePicker<unknown>>('DateRangePicker');\n\n/**\n * Provides the DateRangePicker state.\n */\nexport const provideDateRangePickerState = createStateProvider(NgpDateRangePickerStateToken);\n\n/**\n * Injects the DateRangePicker state.\n */\nexport const injectDateRangePickerState = createStateInjector<NgpDateRangePicker<unknown>>(\n NgpDateRangePickerStateToken,\n) as <T>(injectOptions?: InjectOptions) => InjectedState<NgpDateRangePicker<T>>;\n\n/**\n * The DateRangePicker state registration function.\n */\nexport const dateRangePickerState = createState(NgpDateRangePickerStateToken);\n","import { InjectOptions } from '@angular/core';\nimport {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n InjectedState,\n} from 'ng-primitives/state';\nimport { NgpDateRangePicker } from '../date-range-picker/date-range-picker';\nimport { injectDateRangePickerState } from '../date-range-picker/date-range-picker-state';\nimport type { NgpDatePicker } from './date-picker';\n\nexport const NgpDatePickerStateToken = createStateToken<NgpDatePicker<unknown>>('DatePicker');\nexport const provideDatePickerState = createStateProvider(NgpDatePickerStateToken);\nexport const injectDatePickerState = createStateInjector<NgpDatePicker<unknown>>(\n NgpDatePickerStateToken,\n) as <T>(injectOptions?: InjectOptions) => InjectedState<NgpDatePicker<T>>;\nexport const datePickerState = createState(NgpDatePickerStateToken);\n\nexport function injectDateControllerState<T>(): InjectedState<\n NgpDatePicker<T> | NgpDateRangePicker<T>\n> {\n const datePickerState = injectDatePickerState<T>({ optional: true });\n const dateRangePickerState = injectDateRangePickerState<T>({ optional: true });\n\n if (datePickerState()) {\n return datePickerState;\n } else if (dateRangePickerState()) {\n return dateRangePickerState;\n } else {\n throw new Error('No date picker or date range picker state found');\n }\n}\n","import { computed, contentChild, Directive } from '@angular/core';\nimport { NgpDatePickerDateButtonToken } from '../date-picker-date-button/date-picker-date-button-token';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * A cell in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerCell]',\n exportAs: 'ngpDatePickerCell',\n host: {\n role: 'gridcell',\n '[attr.data-selected]': 'datePickerButton()?.selected() ? \"\" : null',\n '[attr.aria-selected]': 'datePickerButton()?.selected()',\n '[attr.aria-disabled]': 'datePickerButton()?.disabled()',\n '[attr.data-disabled]': 'datePickerButton()?.disabled() ? \"\" : null',\n '[attr.aria-labelledby]': 'labelId()',\n },\n})\nexport class NgpDatePickerCell {\n /**\n * Access the date picker.\n */\n private readonly state = injectDateControllerState();\n\n /**\n * Access the child date picker date button.\n */\n protected readonly datePickerButton = contentChild(NgpDatePickerDateButtonToken, {\n descendants: true,\n });\n\n /**\n * Access the label id.\n */\n protected readonly labelId = computed(() => this.state().label()?.id());\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { computed, Directive, ElementRef, HostListener, inject, OnDestroy } from '@angular/core';\nimport { ngpButton } from 'ng-primitives/button';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDatePickerCellDate } from '../date-picker-cell-render/date-picker-cell-render-token';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\nimport { NgpDatePickerDateButtonToken } from './date-picker-date-button-token';\n\n/**\n * A button that represents a date in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerDateButton]',\n exportAs: 'ngpDatePickerDateButton',\n providers: [{ provide: NgpDatePickerDateButtonToken, useExisting: NgpDatePickerDateButton }],\n host: {\n '[attr.role]': '!isButton ? \"button\" : null',\n '[attr.tabindex]': 'focused() ? 0 : -1',\n '[attr.data-selected]': 'selected() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.data-outside-month]': 'outside() ? \"\" : null',\n '[attr.data-today]': 'today() ? \"\" : null',\n '[attr.data-range-start]': 'start() ? \"\" : null',\n '[attr.data-range-end]': 'end() ? \"\" : null',\n '[attr.data-range-between]': 'betweenRange() ? \"\" : null',\n },\n})\nexport class NgpDatePickerDateButton<T> implements OnDestroy {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the date picker state.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * The date this cell represents.\n */\n private readonly date = injectDatePickerCellDate<T>();\n\n /**\n * Determine if this is the focused date.\n */\n protected readonly focused = computed(() =>\n this.dateAdapter.isSameDay(this.date, this.state().focusedDate()),\n );\n\n /**\n * Determine if this is the selected date.\n * @internal\n */\n readonly selected = computed(() => this.state().isSelected(this.date));\n\n /**\n * Determine if this is the start date of the range.\n */\n protected readonly start = computed(() => this.state().isStartOfRange(this.date));\n\n /**\n * Determine if this is the end date of the range.\n */\n protected readonly end = computed(() => this.state().isEndOfRange(this.date));\n\n /**\n * Determine if this is between the start and end dates of the range.\n */\n protected readonly betweenRange = computed(() => this.state().isBetweenRange(this.date));\n\n /**\n * Determine if this date is outside the current month.\n */\n protected readonly outside = computed(\n () => !this.dateAdapter.isSameMonth(this.date, this.state().focusedDate()),\n );\n\n /**\n * Determine if this date is today.\n */\n protected readonly today = computed(() =>\n this.dateAdapter.isSameDay(this.date, this.dateAdapter.now()),\n );\n\n /**\n * Determine if this date is disabled.\n * @internal\n */\n readonly disabled = computed(() => {\n const min = this.state().min();\n const max = this.state().max();\n\n if (this.state().disabled() || this.state().dateDisabled()(this.date)) {\n return true;\n }\n\n if (min && this.dateAdapter.compare(this.dateAdapter.startOfDay(this.date), min) < 0) {\n return true;\n }\n\n if (max && this.dateAdapter.compare(this.dateAdapter.startOfDay(this.date), max) > 0) {\n return true;\n }\n\n return false;\n });\n\n /**\n * Determine if the element is a button.\n */\n protected readonly isButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n constructor() {\n this.state().registerButton(this);\n ngpButton({ disabled: this.disabled });\n }\n\n ngOnDestroy(): void {\n this.state().unregisterButton(this);\n }\n\n /**\n * When the button is clicked, select the date.\n */\n @HostListener('click')\n @HostListener('keydown.enter', ['$event'])\n @HostListener('keydown.space', ['$event'])\n protected select(event?: Event): void {\n // if the button is disabled, do nothing.\n if (this.disabled()) {\n return;\n }\n\n // because this may not be a button, we should stop the event from firing twice due to\n // us listening to both the click and the keydown.enter event.\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n // Select the date with time preservation enabled for button clicks\n this.state().select(this.date, true);\n this.state().setFocusedDate(this.date, 'mouse', 'forward');\n }\n\n /**\n * Focus if this is the current focused date.\n * @internal\n */\n focus(): void {\n if (this.dateAdapter.isSameDay(this.date, this.state().focusedDate())) {\n this.focusMonitor.focusVia(this.elementRef, 'keyboard');\n }\n }\n\n /**\n * Focus the previous cell.\n */\n @HostListener('keydown.arrowLeft', ['$event'])\n protected focusPrevious(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n // in rtl, the arrow keys are reversed.\n if (this.getDirection() === 'rtl') {\n this.focusDate(this.dateAdapter.add(this.state().focusedDate(), { days: 1 }), 'forward');\n } else {\n this.focusDate(\n this.dateAdapter.subtract(this.state().focusedDate(), { days: 1 }),\n 'backward',\n );\n }\n }\n\n /**\n * Focus the next cell.\n */\n @HostListener('keydown.arrowRight', ['$event'])\n protected focusNext(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n // in rtl, the arrow keys are reversed.\n if (this.getDirection() === 'rtl') {\n this.focusDate(\n this.dateAdapter.subtract(this.state().focusedDate(), { days: 1 }),\n 'backward',\n );\n } else {\n this.focusDate(this.dateAdapter.add(this.state().focusedDate(), { days: 1 }), 'forward');\n }\n }\n\n /**\n * Focus the above cell.\n */\n @HostListener('keydown.arrowUp', ['$event'])\n protected focusAbove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.focusDate(this.dateAdapter.subtract(this.state().focusedDate(), { days: 7 }), 'backward');\n }\n\n /**\n * Focus the below cell.\n */\n @HostListener('keydown.arrowDown', ['$event'])\n protected focusBelow(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.focusDate(this.dateAdapter.add(this.state().focusedDate(), { days: 7 }), 'forward');\n }\n\n /**\n * Focus the first date of the month.\n */\n @HostListener('keydown.home', ['$event'])\n protected focusFirst(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.focusDate(this.dateAdapter.startOfMonth(this.state().focusedDate()), 'forward');\n }\n\n /**\n * Focus the last date of the month.\n */\n @HostListener('keydown.end', ['$event'])\n protected focusLast(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.focusDate(this.dateAdapter.endOfMonth(this.state().focusedDate()), 'backward');\n }\n\n /**\n * Focus the same date in the previous month.\n */\n @HostListener('keydown.pageUp', ['$event'])\n protected focusPreviousMonth(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n const date = this.dateAdapter.getDate(this.state().focusedDate());\n\n let previousMonthTarget = this.dateAdapter.startOfMonth(this.state().focusedDate());\n previousMonthTarget = this.dateAdapter.subtract(previousMonthTarget, { months: 1 });\n\n const lastDay = this.dateAdapter.endOfMonth(previousMonthTarget);\n\n // if we are on a date that does not exist in the previous month, we should focus the last day of the month.\n if (date > this.dateAdapter.getDate(lastDay)) {\n this.focusDate(lastDay, 'forward');\n return;\n } else {\n this.focusDate(this.dateAdapter.set(previousMonthTarget, { day: date }), 'forward');\n }\n }\n\n /**\n * Focus the same date in the next month.\n */\n @HostListener('keydown.pageDown', ['$event'])\n protected focusNextMonth(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n const date = this.dateAdapter.getDate(this.state().focusedDate());\n\n let nextMonthTarget = this.dateAdapter.startOfMonth(this.state().focusedDate());\n nextMonthTarget = this.dateAdapter.add(nextMonthTarget, { months: 1 });\n\n const lastDay = this.dateAdapter.endOfMonth(nextMonthTarget);\n\n // if we are on a date that does not exist in the next month, we should focus the last day of the month.\n if (date > this.dateAdapter.getDate(lastDay)) {\n this.focusDate(lastDay, 'backward');\n return;\n } else {\n this.focusDate(this.dateAdapter.set(nextMonthTarget, { day: date }), 'backward');\n }\n }\n\n private focusDate(date: T, direction: 'forward' | 'backward'): void {\n this.state().setFocusedDate(date, 'keyboard', direction);\n }\n\n /**\n * Get the direction of the element.\n */\n private getDirection(): 'ltr' | 'rtl' {\n return getComputedStyle(this.elementRef.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';\n }\n}\n","import { computed, Directive } from '@angular/core';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * The grid that contains the days of the month.\n */\n@Directive({\n selector: '[ngpDatePickerGrid]',\n exportAs: 'ngpDatePickerGrid',\n host: {\n role: 'grid',\n '[attr.aria-labelledby]': 'labelId()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpDatePickerGrid<T> {\n /**\n * Access the date picker state.\n */\n protected readonly state = injectDateControllerState<T>();\n\n /**\n * Determine the id for the label.\n */\n protected readonly labelId = computed(() => this.state().label()?.id());\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerLabel } from './date-picker-label';\n\nexport const NgpDatePickerLabelToken = new InjectionToken<NgpDatePickerLabel<unknown>>(\n 'NgpDatePickerLabelToken',\n);\n\n/**\n * Inject the DatePickerLabel directive instance\n */\nexport function injectDatePickerLabel<T>(): NgpDatePickerLabel<T> {\n return inject(NgpDatePickerLabelToken) as NgpDatePickerLabel<T>;\n}\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\nimport { NgpDatePickerLabelToken } from './date-picker-label-token';\n\n/**\n * The label that displays the current month and year typically in the header of the date picker. This will be announced by screen readers when the date changes.\n */\n@Directive({\n selector: '[ngpDatePickerLabel]',\n exportAs: 'ngpDatePickerLabel',\n providers: [{ provide: NgpDatePickerLabelToken, useExisting: NgpDatePickerLabel }],\n host: {\n '[id]': 'id()',\n '[attr.aria-live]': 'ariaLive()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpDatePickerLabel<T> {\n /**\n * Access the date picker.\n */\n protected readonly state = injectDateControllerState<T>();\n\n /**\n * Define a unique id for the label.\n */\n readonly id = input(uniqueId('ngp-date-picker-label'));\n\n /**\n * Define the aria live attribute.\n */\n readonly ariaLive = input('polite', {\n alias: 'aria-live',\n });\n}\n","import { computed, Directive, ElementRef, HostListener, inject } from '@angular/core';\nimport { ngpButton } from 'ng-primitives/button';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * A button that navigates to the next month.\n */\n@Directive({\n selector: '[ngpDatePickerNextMonth]',\n exportAs: 'ngpDatePickerNextMonth',\n host: {\n '[attr.aria-disabled]': 'disabled()',\n '[attr.type]': 'isButton ? \"button\" : null',\n },\n})\nexport class NgpDatePickerNextMonth<T> {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker state.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Determine if this is a button element\n */\n protected readonly isButton = this.elementRef.nativeElement.tagName.toLowerCase() === 'button';\n\n /**\n * Determine if the next month is disabled.\n * @internal\n */\n readonly disabled = computed(() => {\n if (this.state().disabled()) {\n return true;\n }\n\n const maxDate = this.state().max();\n const lastDay = this.dateAdapter.set(this.dateAdapter.endOfMonth(this.state().focusedDate()), {\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n });\n\n // if there is a max date and it is equal to or before the last day of the month, disable it.\n if (maxDate && this.dateAdapter.compare(maxDate, lastDay) <= 0) {\n return true;\n }\n\n return false;\n });\n\n constructor() {\n ngpButton({ disabled: this.disabled });\n }\n\n /**\n * Navigate to the next month.\n */\n @HostListener('click')\n protected navigateToNextMonth(): void {\n if (this.disabled()) {\n return;\n }\n\n // move focus to the first day of the next month.\n let date = this.state().focusedDate();\n date = this.dateAdapter.add(date, { months: 1 });\n date = this.dateAdapter.set(date, {\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n });\n\n this.state().setFocusedDate(date, 'mouse', 'forward');\n }\n}\n","import { computed, Directive, ElementRef, HostListener, inject } from '@angular/core';\nimport { ngpButton } from 'ng-primitives/button';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * A button that navigates to the previous month.\n */\n@Directive({\n selector: '[ngpDatePickerPreviousMonth]',\n exportAs: 'ngpDatePickerPreviousMonth',\n host: {\n '[attr.aria-disabled]': 'disabled()',\n '[attr.type]': 'isButton ? \"button\" : null',\n },\n})\nexport class NgpDatePickerPreviousMonth<T> {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker state.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Determine if this is a button element\n */\n protected readonly isButton = this.elementRef.nativeElement.tagName.toLowerCase() === 'button';\n\n /**\n * Determine if the next month is disabled.\n * @internal\n */\n readonly disabled = computed(() => {\n if (this.state().disabled()) {\n return true;\n }\n\n const minDate = this.state().min();\n\n // if the next month is out of bounds, disable it.\n const firstDay = this.dateAdapter.set(\n this.dateAdapter.startOfMonth(this.state().focusedDate()),\n {\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n );\n\n // if there is a min date and it is equal to or after the first day of the month, disable it.\n if (minDate && this.dateAdapter.compare(minDate, firstDay) >= 0) {\n return true;\n }\n\n return false;\n });\n\n constructor() {\n ngpButton({ disabled: this.disabled });\n }\n\n /**\n * Navigate to the previous month.\n */\n @HostListener('click')\n protected navigateToPreviouMonth(): void {\n if (this.disabled()) {\n return;\n }\n\n // move focus to the first day of the previous month.\n let date = this.state().focusedDate();\n date = this.dateAdapter.set(date, {\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n });\n date = this.dateAdapter.subtract(date, { months: 1 });\n\n this.state().setFocusedDate(date, 'mouse', 'backward');\n }\n}\n","import {\n computed,\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { explicitEffect } from 'ng-primitives/internal';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\nimport {\n NgpDatePickerRowRenderToken,\n NgpDatePickerWeekToken,\n} from './date-picker-row-render-token';\n\n/**\n * The number of days in a week.\n * @internal\n */\nconst DAYS_PER_WEEK = 7;\n\n/**\n * A structural directive that renders a row of weekdays in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerRowRender]',\n exportAs: 'ngpDatePickerRowRender',\n providers: [{ provide: NgpDatePickerRowRenderToken, useExisting: NgpDatePickerRowRender }],\n})\nexport class NgpDatePickerRowRender<T> implements OnDestroy {\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Access the template ref for the cell.\n */\n private readonly templateRef = inject(TemplateRef);\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Get all the days to display, this is the days of the current month\n * and the days of the previous and next month to fill the grid.\n */\n protected readonly days = computed(() => {\n const month = this.state().focusedDate();\n const days: T[] = [];\n\n // Get the first and last day of the month.\n let firstDay = this.dateAdapter.startOfMonth(month);\n let lastDay = this.dateAdapter.endOfMonth(month);\n\n // calculate the offset of the first day of the week.\n const firstDayOfWeekOffset = this.getFirstDayOfWeekOffset(firstDay);\n const lastDayOfWeekOffset = this.getLastDayOfWeekOffset(lastDay);\n\n // find the first and last day of visible in the grid.\n firstDay = this.dateAdapter.subtract(firstDay, {\n days: firstDayOfWeekOffset,\n });\n lastDay = this.dateAdapter.add(lastDay, {\n days: lastDayOfWeekOffset,\n });\n\n // collect all the days to display.\n while (firstDay <= lastDay) {\n days.push(firstDay);\n firstDay = this.dateAdapter.add(firstDay, { days: 1 });\n }\n\n return days;\n });\n\n // get the weeks to display.\n protected readonly weeks = computed(() => {\n const days = this.days();\n const weeks = [];\n\n for (let i = 0; i < days.length; i += 7) {\n weeks.push(days.slice(i, i + 7));\n }\n\n return weeks;\n });\n\n /**\n * Store the embedded view refs of each rendered row.\n */\n private readonly viewRefs: EmbeddedViewRef<void>[] = [];\n\n /**\n * Store the previously rendered month.\n */\n private previousMonth: T | null = null;\n\n constructor() {\n // Wait for the inputs of the containing picker to be initialized.\n explicitEffect([this.state().focusedDate, this.state().firstDayOfWeek], () =>\n this.renderRows(),\n );\n }\n\n ngOnDestroy(): void {\n this.destroyRows();\n }\n\n /**\n * Render the row.\n */\n private renderRows(): void {\n // If the focused date has not changed, do not re-render.\n if (\n this.previousMonth &&\n this.dateAdapter.isSameMonth(this.previousMonth, this.state().focusedDate())\n ) {\n return;\n }\n\n // Store the current focused month.\n this.previousMonth = this.state().focusedDate();\n\n const weeks = this.weeks();\n\n // clear the view container.\n this.destroyRows();\n\n // render the weeks.\n for (const week of weeks) {\n const viewRef = this.viewContainerRef.createEmbeddedView(this.templateRef, null, {\n injector: Injector.create({\n parent: this.viewContainerRef.injector,\n providers: [{ provide: NgpDatePickerWeekToken, useValue: week }],\n }),\n });\n this.viewRefs.push(viewRef);\n }\n }\n\n /**\n * Destroy the row.\n */\n private destroyRows(): void {\n for (const viewRef of this.viewRefs) {\n viewRef.destroy();\n }\n this.viewRefs.length = 0;\n }\n\n /**\n * Get the offset of the first day of the week.\n * @param firstCalendarDay The first day of the calendar without the offset.\n * @returns The offset of the first day of the week.\n *\n * @internal\n */\n getFirstDayOfWeekOffset(firstCalendarDay: T): number {\n return (\n (DAYS_PER_WEEK + this.dateAdapter.getDay(firstCalendarDay) - this.state().firstDayOfWeek()) %\n DAYS_PER_WEEK\n );\n }\n\n /**\n * Get the offset of the last day of the week.\n * @param lastCalendarDay The last day of the calendar without the offset.\n * @returns The offset of the last day of the week.\n *\n * @internal\n */\n getLastDayOfWeekOffset(lastCalendarDay: T): number {\n const lastDay = this.dateAdapter.getDay(lastCalendarDay);\n const firstDay = this.state().firstDayOfWeek();\n\n return (DAYS_PER_WEEK + firstDay + DAYS_PER_WEEK - 1 - lastDay) % DAYS_PER_WEEK;\n }\n}\n","import { numberAttribute } from '@angular/core';\n\n/**\n * The first day of the week as a number (0-7).\n * - `1` = Monday\n * - `2` = Tuesday\n * - `3` = Wednesday\n * - `4` = Thursday\n * - `5` = Friday\n * - `6` = Saturday\n * - `7` = Sunday\n */\nexport type NgpDatePickerFirstDayOfWeekNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7;\n\n/**\n * The first day of the week as a number (0-7).\n * - `1` = Monday\n * - `2` = Tuesday\n * - `3` = Wednesday\n * - `4` = Thursday\n * - `5` = Friday\n * - `6` = Saturday\n * - `7` = Sunday\n */\nexport type NgpDatePickerFirstDayOfWeekNumberInput =\n | NgpDatePickerFirstDayOfWeekNumber\n | `${NgpDatePickerFirstDayOfWeekNumber}`;\n\n/**\n * Transform the first day of the week input value to a number (0-7) for the start of the week in\n * the calendar.\n * @param firstDayOfWeek The first day of the week input value (number).\n * @returns The first day of the week number.\n */\nexport function transformToFirstDayOfWeekNumber(\n firstDayOfWeek: NgpDatePickerFirstDayOfWeekNumberInput,\n): NgpDatePickerFirstDayOfWeekNumber {\n if (!firstDayOfWeek) {\n return 7;\n }\n return numberAttribute(firstDayOfWeek) as NgpDatePickerFirstDayOfWeekNumber;\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterNextRender,\n booleanAttribute,\n contentChild,\n Directive,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDatePickerConfig } from '../config/date-picker-config';\nimport type { NgpDatePickerDateButton } from '../date-picker-date-button/date-picker-date-button';\nimport { NgpDatePickerLabelToken } from '../date-picker-label/date-picker-label-token';\nimport { transformToFirstDayOfWeekNumber } from './date-picker-first-day-of-week';\nimport { datePickerState, provideDatePickerState } from './date-picker-state';\n\n/**\n * The outermost container for the date picker.\n */\n@Directive({\n selector: '[ngpDatePicker]',\n exportAs: 'ngpDatePicker',\n providers: [provideDatePickerState()],\n host: {\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpDatePicker<T> {\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker config.\n */\n private readonly config = injectDatePickerConfig();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * The minimum date that can be selected.\n */\n readonly min = input<T | undefined>(undefined, {\n alias: 'ngpDatePickerMin',\n });\n\n /**\n * The maximum date that can be selected.\n */\n readonly max = input<T | undefined>(undefined, {\n alias: 'ngpDatePickerMax',\n });\n\n /**\n * Determine if the date picker is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpDatePickerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * A function that is called to determine if a specific date should be disabled.\n */\n readonly dateDisabled = input<(date: T) => boolean>(() => false, {\n alias: 'ngpDatePickerDateDisabled',\n });\n\n /**\n * Sets which day starts the week in the calendar.\n * Accepts 0-7 where 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday.\n * Defaults to NgpDatePickerConfig.firstDayOfWeek (default 7 if not overridden).\n * Note: Update calendar header column order when changing from Sunday start.\n * @default 7 (Sunday)\n */\n readonly firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), {\n alias: 'ngpDatePickerFirstDayOfWeek',\n transform: transformToFirstDayOfWeekNumber,\n });\n\n /**\n * The selected value.\n */\n readonly date = input<T | undefined>(undefined, {\n alias: 'ngpDatePickerDate',\n });\n\n /**\n * Emit when the date changes.\n */\n readonly dateChange = output<T | undefined>({\n alias: 'ngpDatePickerDateChange',\n });\n\n /**\n * The focused value.\n */\n readonly focusedDate = input<T>(this.dateAdapter.now(), {\n alias: 'ngpDatePickerFocusedDate',\n });\n\n /**\n * Emit when the focused date changes.\n */\n readonly focusedDateChange = output<T>({\n alias: 'ngpDatePickerFocusedDateChange',\n });\n\n /**\n * Detect the label element.\n * @internal\n */\n readonly label = contentChild(NgpDatePickerLabelToken, { descendants: true });\n\n /**\n * Access all the date picker buttons\n */\n private readonly buttons = signal<NgpDatePickerDateButton<T>[]>([]);\n\n /**\n * The date picker state.\n */\n protected readonly state = datePickerState<NgpDatePicker<T>>(this);\n\n /**\n * Set the focused date.\n * @param date The date to focus.\n * @internal\n */\n setFocusedDate(date: T, origin: FocusOrigin = 'mouse', direction: 'forward' | 'backward'): void {\n if (this.state.disabled()) {\n return;\n }\n\n const min = this.state.min();\n const max = this.state.max();\n\n if (min && this.dateAdapter.isBefore(date, min)) {\n date = min;\n }\n\n if (max && this.dateAdapter.isAfter(date, max)) {\n date = max;\n }\n\n // if the date is disabled, find the next available date in the specified direction.\n if (this.state.dateDisabled()(date)) {\n let nextDate = this.dateAdapter.add(date, { days: direction === 'forward' ? 1 : -1 });\n\n while (\n this.state.dateDisabled()(nextDate) ||\n (min && this.dateAdapter.isBefore(nextDate, min)) ||\n (max && this.dateAdapter.isAfter(nextDate, max))\n ) {\n nextDate = this.dateAdapter.add(nextDate, { days: direction === 'forward' ? 1 : -1 });\n }\n\n date = nextDate;\n }\n\n this.state.focusedDate.set(date);\n this.focusedDateChange.emit(date);\n\n if (origin === 'keyboard') {\n afterNextRender(\n {\n write: () => this.buttons().forEach(button => button.focus()),\n },\n {\n injector: this.injector,\n },\n );\n }\n }\n\n /**\n * Register a date button.\n * @param button The date button to register.\n * @internal\n */\n registerButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => [...buttons, button]);\n }\n\n /**\n * Unregister a date button.\n * @param button The date button to unregister.\n * @internal\n */\n unregisterButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => buttons.filter(b => b !== button));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n * @param preserveTime Whether to preserve time components from existing selected date.\n * @internal\n */\n select(date: T, preserveTime = false): void {\n let selectedDate = date;\n\n if (preserveTime) {\n const existingDate = this.state.date();\n if (existingDate) {\n selectedDate = this.dateAdapter.set(existingDate, {\n year: this.dateAdapter.getYear(date),\n month: this.dateAdapter.getMonth(date),\n day: this.dateAdapter.getDate(date),\n });\n }\n }\n\n this.state.date.set(selectedDate);\n this.dateChange.emit(selectedDate);\n }\n\n /**\n * Determine if a date is selected.\n * @param date The date to check.\n * @returns True if the date is selected, false otherwise.\n * @internal\n */\n isSelected(date: T): boolean {\n const selected = this.state.date();\n if (!selected) {\n return false;\n }\n\n return this.dateAdapter.isSameDay(date, selected);\n }\n\n /**\n * Determine if a date is the start of a range. In a date picker, this is always false.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isStartOfRange(_: T): boolean {\n return false;\n }\n\n /**\n * Determine if a date is the end of a range. In a date picker, this is always false.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isEndOfRange(_: T): boolean {\n return false;\n }\n\n /**\n * Determine if a date is between the start and end dates. In a date picker, this is always false.\n * @param date The date to check.\n * @returns True if the date is between the start and end dates, false otherwise.\n * @internal\n */\n isBetweenRange(_: T): boolean {\n return false;\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterNextRender,\n booleanAttribute,\n contentChild,\n Directive,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDatePickerConfig } from '../config/date-picker-config';\nimport { NgpDatePickerDateButton } from '../date-picker-date-button/date-picker-date-button';\nimport { NgpDatePickerLabelToken } from '../date-picker-label/date-picker-label-token';\nimport { transformToFirstDayOfWeekNumber } from '../date-picker/date-picker-first-day-of-week';\nimport { dateRangePickerState, provideDateRangePickerState } from './date-range-picker-state';\n\n@Directive({\n selector: '[ngpDateRangePicker]',\n exportAs: 'ngpDateRangePicker',\n providers: [provideDateRangePickerState()],\n host: {\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpDateRangePicker<T> {\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date range picker config.\n */\n private readonly config = injectDatePickerConfig();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * The minimum date that can be selected.\n */\n readonly min = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerMin',\n });\n\n /**\n * The maximum date that can be selected.\n */\n readonly max = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerMax',\n });\n\n /**\n * Determine if the date picker is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpDateRangePickerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * A function that is called to determine if a specific date should be disabled.\n */\n readonly dateDisabled = input<(date: T) => boolean>(() => false, {\n alias: 'ngpDateRangePickerDateDisabled',\n });\n\n /**\n * Sets which day starts the week in the calendar.\n * Accepts 0-7 where 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday.\n * Defaults to NgpDatePickerConfig.firstDayOfWeek (default 7 if not overridden).\n * Note: Update calendar header column order when changing from Sunday start.\n * @default 7 (Sunday)\n */\n readonly firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), {\n alias: 'ngpDateRangePickerFirstDayOfWeek',\n transform: transformToFirstDayOfWeekNumber,\n });\n\n /**\n * The selected start date\n */\n readonly startDate = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerStartDate',\n });\n\n /**\n * Emit when the date changes.\n */\n readonly startDateChange = output<T | undefined>({\n alias: 'ngpDateRangePickerStartDateChange',\n });\n\n /**\n * The selected end date\n */\n readonly endDate = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerEndDate',\n });\n\n /**\n * Emit when the end date changes.\n */\n readonly endDateChange = output<T | undefined>({\n alias: 'ngpDateRangePickerEndDateChange',\n });\n\n /**\n * The focused value.\n */\n readonly focusedDate = input<T>(this.dateAdapter.now(), {\n alias: 'ngpDateRangePickerFocusedDate',\n });\n\n /**\n * Emit when the focused date changes.\n */\n readonly focusedDateChange = output<T>({\n alias: 'ngpDateRangePickerFocusedDateChange',\n });\n\n /**\n * Detect the label element.\n * @internal\n */\n readonly label = contentChild(NgpDatePickerLabelToken, { descendants: true });\n\n /**\n * Access all the date picker buttons\n */\n private readonly buttons = signal<NgpDatePickerDateButton<T>[]>([]);\n\n /**\n * The date range picker state.\n */\n protected readonly state = dateRangePickerState<NgpDateRangePicker<T>>(this);\n\n /**\n * Set the focused date.\n * @param date The date to focus.\n * @internal\n */\n setFocusedDate(date: T, origin: FocusOrigin = 'mouse', direction: 'forward' | 'backward'): void {\n if (this.state.disabled()) {\n return;\n }\n\n const min = this.state.min();\n const max = this.state.max();\n\n if (min && this.dateAdapter.isBefore(date, min)) {\n date = min;\n }\n\n if (max && this.dateAdapter.isAfter(date, max)) {\n date = max;\n }\n\n // if the date is disabled, find the next available date in the specified direction.\n if (this.state.dateDisabled()(date)) {\n let nextDate = this.dateAdapter.add(date, { days: direction === 'forward' ? 1 : -1 });\n\n while (\n this.state.dateDisabled()(nextDate) ||\n (min && this.dateAdapter.isBefore(nextDate, min)) ||\n (max && this.dateAdapter.isAfter(nextDate, max))\n ) {\n nextDate = this.dateAdapter.add(nextDate, { days: direction === 'forward' ? 1 : -1 });\n }\n\n date = nextDate;\n }\n\n this.state.focusedDate.set(date);\n this.focusedDateChange.emit(date);\n\n if (origin === 'keyboard') {\n afterNextRender(\n {\n write: () => this.buttons().forEach(button => button.focus()),\n },\n {\n injector: this.injector,\n },\n );\n }\n }\n\n /**\n * Register a date button.\n * @param button The date button to register.\n * @internal\n */\n registerButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => [...buttons, button]);\n }\n\n /**\n * Unregister a date button.\n * @param button The date button to unregister.\n * @internal\n */\n unregisterButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => buttons.filter(b => b !== button));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n * @param preserveTime Whether to preserve time components from existing selected dates.\n * @internal\n */\n /**\n * Handles the selection of a date within the date range picker.\n *\n * Selection logic:\n * - If neither a start date nor an end date is selected:\n * - Sets the selected date as the start date.\n * - If a start date is selected but no end date:\n * - If the selected date is after the start date, sets it as the end date.\n * - If the selected date is before the start date, sets the selected date as the start date\n * and the previous start date as the end date.\n * - If the selected date is the same as the start date, sets the selected date as the end date\n * to select a single date.\n * - If both start and end dates are already selected:\n * - Resets the selection, setting the selected date as the new start date and clearing the end date.\n *\n * @param date The date to select.\n * @param preserveTime Whether to preserve time components from existing selected dates.\n */\n select(date: T, preserveTime = false): void {\n const start = this.state.startDate();\n const end = this.state.endDate();\n\n // Helper function to preserve time components when preserveTime is enabled\n const maybePreserveTime = (newDate: T, existingDate: T | undefined): T => {\n if (!preserveTime || !existingDate) {\n return newDate;\n }\n\n return this.dateAdapter.set(existingDate, {\n year: this.dateAdapter.getYear(newDate),\n month: this.dateAdapter.getMonth(newDate),\n day: this.dateAdapter.getDate(newDate),\n });\n };\n\n if (!start && !end) {\n const selectedDate = maybePreserveTime(date, undefined);\n this.state.startDate.set(selectedDate);\n this.startDateChange.emit(selectedDate);\n return;\n }\n\n if (start && !end) {\n if (this.dateAdapter.isAfter(date, start)) {\n const selectedDate = maybePreserveTime(date, undefined);\n this.state.endDate.set(selectedDate);\n this.endDateChange.emit(selectedDate);\n } else if (this.dateAdapter.isBefore(date, start)) {\n const selectedStartDate = maybePreserveTime(date, start);\n this.state.startDate.set(selectedStartDate);\n this.state.endDate.set(start);\n this.startDateChange.emit(selectedStartDate);\n this.endDateChange.emit(start);\n } else if (this.dateAdapter.isSameDay(date, start)) {\n const selectedDate = maybePreserveTime(date, undefined);\n this.state.endDate.set(selectedDate);\n this.endDateChange.emit(selectedDate);\n }\n return;\n }\n\n // If both start and end are selected, reset selection\n const selectedDate = maybePreserveTime(date, start);\n this.state.startDate.set(selectedDate);\n this.startDateChange.emit(selectedDate);\n this.state.endDate.set(undefined);\n this.endDateChange.emit(undefined);\n }\n\n /**\n * Determine if a date is selected. A date is selected if it is either the start date or the end date.\n * @param date The date to check.\n * @returns True if the date is selected, false otherwise.\n * @internal\n */\n isSelected(date: T): boolean {\n const start = this.state.startDate();\n const end = this.state.endDate();\n\n if (!start && !end) {\n return false;\n }\n\n const isStartSelected = start ? this.dateAdapter.isSameDay(date, start) : false;\n const isEndSelected = end ? this.dateAdapter.isSameDay(date, end) : false;\n\n return isStartSelected || isEndSelected;\n }\n\n /**\n * Determine if a date is the start of a range.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isStartOfRange(date: T): boolean {\n const start = this.state.startDate();\n return start ? this.dateAdapter.isSameDay(date, start) : false;\n }\n\n /**\n * Determine if a date is the end of a range.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isEndOfRange(date: T): boolean {\n const end = this.state.endDate();\n return end ? this.dateAdapter.isSameDay(date, end) : false;\n }\n\n /**\n * Determine if a date is between the start and end dates.\n * @param date The date to check.\n * @returns True if the date is between the start and end dates, false otherwise.\n * @internal\n */\n isBetweenRange(date: T): boolean {\n const start = this.state.startDate();\n const end = this.state.endDate();\n\n if (!start || !end) {\n return false;\n }\n\n return this.dateAdapter.isAfter(date, start) && this.dateAdapter.isBefore(date, end);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAWO,MAAM,uBAAuB,GAAwB;AAC1D,IAAA,cAAc,EAAE,CAAC;CAClB;AAEM,MAAM,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,CAC3B;AAED;;;;AAIG;AACG,SAAU,uBAAuB,CAAC,MAAoC,EAAA;IAC1E,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,wBAAwB;AACjC,YAAA,QAAQ,EAAE,EAAE,GAAG,uBAAuB,EAAE,GAAG,MAAM,EAAE;AACpD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,sBAAsB,GAAA;AACpC,IAAA,OAAO,MAAM,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,uBAAuB;AACxF;;MCpCa,2BAA2B,GAAG,IAAI,cAAc,CAC3D,6BAA6B;AAG/B;;AAEG;SACa,yBAAyB,GAAA;AACvC,IAAA,OAAO,MAAM,CAAC,2BAA2B,CAA8B;AACzE;AAEO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAY,wBAAwB,CAAC;AAE7F;;AAEG;SACa,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAQ;AAC9C;;MClBa,4BAA4B,GAAG,IAAI,cAAc,CAC5D,8BAA8B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,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,6BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,mCAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,iCAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,+BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,iBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,qCAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,uBAAuB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AChI9E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-date-picker.mjs","sources":["../../../../packages/ng-primitives/date-picker/src/config/date-picker-config.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-row-render/date-picker-row-render-token.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-cell-render/date-picker-cell-render-token.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-cell-render/date-picker-cell-render.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-date-button/date-picker-date-button-token.ts","../../../../packages/ng-primitives/date-picker/src/date-range-picker/date-range-picker-state.ts","../../../../packages/ng-primitives/date-picker/src/date-picker/date-picker-state.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-cell/date-picker-cell.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-date-button/date-picker-date-button.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-grid/date-picker-grid.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-label/date-picker-label-token.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-label/date-picker-label.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-next-month/date-picker-next-month.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-previous-month/date-picker-previous-month.ts","../../../../packages/ng-primitives/date-picker/src/date-picker-row-render/date-picker-row-render.ts","../../../../packages/ng-primitives/date-picker/src/date-picker/date-picker-first-day-of-week.ts","../../../../packages/ng-primitives/date-picker/src/date-picker/date-picker.ts","../../../../packages/ng-primitives/date-picker/src/date-range-picker/date-range-picker.ts","../../../../packages/ng-primitives/date-picker/src/ng-primitives-date-picker.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpDatePickerFirstDayOfWeekNumber } from '../date-picker/date-picker-first-day-of-week';\n\nexport interface NgpDatePickerConfig {\n /**\n * Define the first day of the week for the date picker calendar.\n * @default 7 (Sunday)\n */\n firstDayOfWeek: NgpDatePickerFirstDayOfWeekNumber;\n}\n\nexport const defaultDatePickerConfig: NgpDatePickerConfig = {\n firstDayOfWeek: 7,\n};\n\nexport const NgpDatePickerConfigToken = new InjectionToken<NgpDatePickerConfig>(\n 'NgpDatePickerConfigToken',\n);\n\n/**\n * Provide the default DatePicker / DateRangePicker configuration\n * @param config The DatePicker / DateRangePicker configuration\n * @returns The provider\n */\nexport function provideDatePickerConfig(config: Partial<NgpDatePickerConfig>): Provider[] {\n return [\n {\n provide: NgpDatePickerConfigToken,\n useValue: { ...defaultDatePickerConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the DatePicker / DateRangePicker configuration\n * @returns The global DatePicker / DateRangePicker configuration\n */\nexport function injectDatePickerConfig(): NgpDatePickerConfig {\n return inject(NgpDatePickerConfigToken, { optional: true }) ?? defaultDatePickerConfig;\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerRowRender } from './date-picker-row-render';\n\nexport const NgpDatePickerRowRenderToken = new InjectionToken<NgpDatePickerRowRender<unknown>>(\n 'NgpDatePickerRowRenderToken',\n);\n\n/**\n * Inject the DatePickerRowRender directive instance\n */\nexport function injectDatePickerRowRender<T>(): NgpDatePickerRowRender<T> {\n return inject(NgpDatePickerRowRenderToken) as NgpDatePickerRowRender<T>;\n}\n\nexport const NgpDatePickerWeekToken = new InjectionToken<unknown[]>('NgpDatePickerWeekToken');\n\n/**\n * Inject current week days\n */\nexport function injectDatePickerWeek<T>(): T[] {\n return inject(NgpDatePickerWeekToken) as T[];\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerCellRender } from './date-picker-cell-render';\n\nexport const NgpDatePickerCellRenderToken = new InjectionToken<NgpDatePickerCellRender<unknown>>(\n 'NgpDatePickerCellRenderToken',\n);\n\n/**\n * Inject the DatePickerCell directive instance\n */\nexport function injectDatePickerCellRender<T>(): NgpDatePickerCellRender<T> {\n return inject(NgpDatePickerCellRenderToken) as NgpDatePickerCellRender<T>;\n}\n\nexport const NgpDatePickerCellDateToken = new InjectionToken<unknown>('NgpDatePickerCellDateToken');\n\n/**\n * Inject current cell date\n */\nexport function injectDatePickerCellDate<T>(): T {\n return inject(NgpDatePickerCellDateToken) as T;\n}\n","import {\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { injectDatePickerWeek } from '../date-picker-row-render/date-picker-row-render-token';\nimport {\n NgpDatePickerCellDateToken,\n NgpDatePickerCellRenderToken,\n} from './date-picker-cell-render-token';\n\n/**\n * A structural directive that renders a cell in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerCellRender]',\n exportAs: 'ngpDatePickerCellRender',\n providers: [{ provide: NgpDatePickerCellRenderToken, useExisting: NgpDatePickerCellRender }],\n})\nexport class NgpDatePickerCellRender<T> implements OnDestroy {\n /**\n * Access the template ref for the cell.\n */\n private readonly templateRef = inject(TemplateRef);\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the dates in the week.\n */\n private readonly dates = injectDatePickerWeek<T>();\n\n /**\n * Store the view refs for the dates.\n */\n private readonly viewRefs: EmbeddedViewRef<NgpDatePickerCellContext<T>>[] = [];\n\n // Make sure the template checker knows the type of the context with which the\n // template of this directive will be rendered\n static ngTemplateContextGuard<T>(\n _: NgpDatePickerCellRender<T>,\n context: unknown,\n ): context is NgpDatePickerCellContext<T> {\n return true;\n }\n\n constructor() {\n this.renderDates();\n }\n\n /**\n * Render the dates in the week.\n */\n private renderDates(): void {\n this.viewRefs.forEach(viewRef => viewRef.destroy());\n\n for (const date of this.dates) {\n const viewRef = this.viewContainerRef.createEmbeddedView(\n this.templateRef,\n {\n $implicit: date,\n },\n {\n injector: Injector.create({\n parent: this.viewContainerRef.injector,\n providers: [{ provide: NgpDatePickerCellDateToken, useValue: date }],\n }),\n },\n );\n this.viewRefs.push(viewRef);\n }\n }\n\n /**\n * Destroy the view refs.\n */\n ngOnDestroy(): void {\n this.viewRefs.forEach(viewRef => viewRef.destroy());\n }\n}\n\ninterface NgpDatePickerCellContext<T> {\n $implicit: T;\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerDateButton } from './date-picker-date-button';\n\nexport const NgpDatePickerDateButtonToken = new InjectionToken<NgpDatePickerDateButton<unknown>>(\n 'NgpDatePickerDateButtonToken',\n);\n\n/**\n * Inject the DatePickerDateButton directive instance\n */\nexport function injectDatePickerDateButton<T>(): NgpDatePickerDateButton<T> {\n return inject(NgpDatePickerDateButtonToken) as NgpDatePickerDateButton<T>;\n}\n","import { InjectOptions } from '@angular/core';\nimport {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n InjectedState,\n} from 'ng-primitives/state';\nimport type { NgpDateRangePicker } from './date-range-picker';\n\n/**\n * The state token for the DateRangePicker primitive.\n */\nexport const NgpDateRangePickerStateToken =\n createStateToken<NgpDateRangePicker<unknown>>('DateRangePicker');\n\n/**\n * Provides the DateRangePicker state.\n */\nexport const provideDateRangePickerState = createStateProvider(NgpDateRangePickerStateToken);\n\n/**\n * Injects the DateRangePicker state.\n */\nexport const injectDateRangePickerState = createStateInjector<NgpDateRangePicker<unknown>>(\n NgpDateRangePickerStateToken,\n) as <T>(injectOptions?: InjectOptions) => InjectedState<NgpDateRangePicker<T>>;\n\n/**\n * The DateRangePicker state registration function.\n */\nexport const dateRangePickerState = createState(NgpDateRangePickerStateToken);\n","import { InjectOptions } from '@angular/core';\nimport {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n InjectedState,\n} from 'ng-primitives/state';\nimport { NgpDateRangePicker } from '../date-range-picker/date-range-picker';\nimport { injectDateRangePickerState } from '../date-range-picker/date-range-picker-state';\nimport type { NgpDatePicker } from './date-picker';\n\nexport const NgpDatePickerStateToken = createStateToken<NgpDatePicker<unknown>>('DatePicker');\nexport const provideDatePickerState = createStateProvider(NgpDatePickerStateToken);\nexport const injectDatePickerState = createStateInjector<NgpDatePicker<unknown>>(\n NgpDatePickerStateToken,\n) as <T>(injectOptions?: InjectOptions) => InjectedState<NgpDatePicker<T>>;\nexport const datePickerState = createState(NgpDatePickerStateToken);\n\nexport function injectDateControllerState<T>(): InjectedState<\n NgpDatePicker<T> | NgpDateRangePicker<T>\n> {\n const datePickerState = injectDatePickerState<T>({ optional: true });\n const dateRangePickerState = injectDateRangePickerState<T>({ optional: true });\n\n if (datePickerState()) {\n return datePickerState;\n } else if (dateRangePickerState()) {\n return dateRangePickerState;\n } else {\n throw new Error('No date picker or date range picker state found');\n }\n}\n","import { computed, contentChild, Directive } from '@angular/core';\nimport { NgpDatePickerDateButtonToken } from '../date-picker-date-button/date-picker-date-button-token';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * A cell in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerCell]',\n exportAs: 'ngpDatePickerCell',\n host: {\n role: 'gridcell',\n '[attr.data-selected]': 'datePickerButton()?.selected() ? \"\" : null',\n '[attr.aria-selected]': 'datePickerButton()?.selected()',\n '[attr.aria-disabled]': 'datePickerButton()?.disabled()',\n '[attr.data-disabled]': 'datePickerButton()?.disabled() ? \"\" : null',\n '[attr.aria-labelledby]': 'labelId()',\n },\n})\nexport class NgpDatePickerCell {\n /**\n * Access the date picker.\n */\n private readonly state = injectDateControllerState();\n\n /**\n * Access the child date picker date button.\n */\n protected readonly datePickerButton = contentChild(NgpDatePickerDateButtonToken, {\n descendants: true,\n });\n\n /**\n * Access the label id.\n */\n protected readonly labelId = computed(() => this.state().label()?.id());\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { computed, Directive, ElementRef, HostListener, inject, OnDestroy } from '@angular/core';\nimport { ngpButton } from 'ng-primitives/button';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDatePickerCellDate } from '../date-picker-cell-render/date-picker-cell-render-token';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\nimport { NgpDatePickerDateButtonToken } from './date-picker-date-button-token';\n\n/**\n * A button that represents a date in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerDateButton]',\n exportAs: 'ngpDatePickerDateButton',\n providers: [{ provide: NgpDatePickerDateButtonToken, useExisting: NgpDatePickerDateButton }],\n host: {\n '[attr.role]': '!isButton ? \"button\" : null',\n '[attr.tabindex]': 'focused() ? 0 : -1',\n '[attr.data-selected]': 'selected() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled()',\n '[attr.data-outside-month]': 'outside() ? \"\" : null',\n '[attr.data-today]': 'today() ? \"\" : null',\n '[attr.data-range-start]': 'start() ? \"\" : null',\n '[attr.data-range-end]': 'end() ? \"\" : null',\n '[attr.data-range-between]': 'betweenRange() ? \"\" : null',\n },\n})\nexport class NgpDatePickerDateButton<T> implements OnDestroy {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the date picker state.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * The date this cell represents.\n */\n private readonly date = injectDatePickerCellDate<T>();\n\n /**\n * Determine if this is the focused date.\n */\n protected readonly focused = computed(() =>\n this.dateAdapter.isSameDay(this.date, this.state().focusedDate()),\n );\n\n /**\n * Determine if this is the selected date.\n * @internal\n */\n readonly selected = computed(() => this.state().isSelected(this.date));\n\n /**\n * Determine if this is the start date of the range.\n */\n protected readonly start = computed(() => this.state().isStartOfRange(this.date));\n\n /**\n * Determine if this is the end date of the range.\n */\n protected readonly end = computed(() => this.state().isEndOfRange(this.date));\n\n /**\n * Determine if this is between the start and end dates of the range.\n */\n protected readonly betweenRange = computed(() => this.state().isBetweenRange(this.date));\n\n /**\n * Determine if this date is outside the current month.\n */\n protected readonly outside = computed(\n () => !this.dateAdapter.isSameMonth(this.date, this.state().focusedDate()),\n );\n\n /**\n * Determine if this date is today.\n */\n protected readonly today = computed(() =>\n this.dateAdapter.isSameDay(this.date, this.dateAdapter.now()),\n );\n\n /**\n * Determine if this date is disabled.\n * @internal\n */\n readonly disabled = computed(() => {\n const min = this.state().min();\n const max = this.state().max();\n\n if (this.state().disabled() || this.state().dateDisabled()(this.date)) {\n return true;\n }\n\n if (min && this.dateAdapter.compare(this.dateAdapter.startOfDay(this.date), min) < 0) {\n return true;\n }\n\n if (max && this.dateAdapter.compare(this.dateAdapter.startOfDay(this.date), max) > 0) {\n return true;\n }\n\n return false;\n });\n\n /**\n * Determine if the element is a button.\n */\n protected readonly isButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n constructor() {\n this.state().registerButton(this);\n ngpButton({ disabled: this.disabled });\n }\n\n ngOnDestroy(): void {\n this.state().unregisterButton(this);\n }\n\n /**\n * When the button is clicked, select the date.\n */\n @HostListener('click')\n @HostListener('keydown.enter', ['$event'])\n @HostListener('keydown.space', ['$event'])\n protected select(event?: Event): void {\n // if the button is disabled, do nothing.\n if (this.disabled()) {\n return;\n }\n\n // because this may not be a button, we should stop the event from firing twice due to\n // us listening to both the click and the keydown.enter event.\n if (event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n // Select the date with time preservation enabled for button clicks\n this.state().select(this.date, true);\n this.state().setFocusedDate(this.date, 'mouse', 'forward');\n }\n\n /**\n * Focus if this is the current focused date.\n * @internal\n */\n focus(): void {\n if (this.dateAdapter.isSameDay(this.date, this.state().focusedDate())) {\n this.focusMonitor.focusVia(this.elementRef, 'keyboard');\n }\n }\n\n /**\n * Focus the previous cell.\n */\n @HostListener('keydown.arrowLeft', ['$event'])\n protected focusPrevious(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n // in rtl, the arrow keys are reversed.\n if (this.getDirection() === 'rtl') {\n this.focusDate(this.dateAdapter.add(this.state().focusedDate(), { days: 1 }), 'forward');\n } else {\n this.focusDate(\n this.dateAdapter.subtract(this.state().focusedDate(), { days: 1 }),\n 'backward',\n );\n }\n }\n\n /**\n * Focus the next cell.\n */\n @HostListener('keydown.arrowRight', ['$event'])\n protected focusNext(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n // in rtl, the arrow keys are reversed.\n if (this.getDirection() === 'rtl') {\n this.focusDate(\n this.dateAdapter.subtract(this.state().focusedDate(), { days: 1 }),\n 'backward',\n );\n } else {\n this.focusDate(this.dateAdapter.add(this.state().focusedDate(), { days: 1 }), 'forward');\n }\n }\n\n /**\n * Focus the above cell.\n */\n @HostListener('keydown.arrowUp', ['$event'])\n protected focusAbove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.focusDate(this.dateAdapter.subtract(this.state().focusedDate(), { days: 7 }), 'backward');\n }\n\n /**\n * Focus the below cell.\n */\n @HostListener('keydown.arrowDown', ['$event'])\n protected focusBelow(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.focusDate(this.dateAdapter.add(this.state().focusedDate(), { days: 7 }), 'forward');\n }\n\n /**\n * Focus the first date of the month.\n */\n @HostListener('keydown.home', ['$event'])\n protected focusFirst(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.focusDate(this.dateAdapter.startOfMonth(this.state().focusedDate()), 'forward');\n }\n\n /**\n * Focus the last date of the month.\n */\n @HostListener('keydown.end', ['$event'])\n protected focusLast(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.focusDate(this.dateAdapter.endOfMonth(this.state().focusedDate()), 'backward');\n }\n\n /**\n * Focus the same date in the previous month.\n */\n @HostListener('keydown.pageUp', ['$event'])\n protected focusPreviousMonth(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n const date = this.dateAdapter.getDate(this.state().focusedDate());\n\n let previousMonthTarget = this.dateAdapter.startOfMonth(this.state().focusedDate());\n previousMonthTarget = this.dateAdapter.subtract(previousMonthTarget, { months: 1 });\n\n const lastDay = this.dateAdapter.endOfMonth(previousMonthTarget);\n\n // if we are on a date that does not exist in the previous month, we should focus the last day of the month.\n if (date > this.dateAdapter.getDate(lastDay)) {\n this.focusDate(lastDay, 'forward');\n return;\n } else {\n this.focusDate(this.dateAdapter.set(previousMonthTarget, { day: date }), 'forward');\n }\n }\n\n /**\n * Focus the same date in the next month.\n */\n @HostListener('keydown.pageDown', ['$event'])\n protected focusNextMonth(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n\n const date = this.dateAdapter.getDate(this.state().focusedDate());\n\n let nextMonthTarget = this.dateAdapter.startOfMonth(this.state().focusedDate());\n nextMonthTarget = this.dateAdapter.add(nextMonthTarget, { months: 1 });\n\n const lastDay = this.dateAdapter.endOfMonth(nextMonthTarget);\n\n // if we are on a date that does not exist in the next month, we should focus the last day of the month.\n if (date > this.dateAdapter.getDate(lastDay)) {\n this.focusDate(lastDay, 'backward');\n return;\n } else {\n this.focusDate(this.dateAdapter.set(nextMonthTarget, { day: date }), 'backward');\n }\n }\n\n private focusDate(date: T, direction: 'forward' | 'backward'): void {\n this.state().setFocusedDate(date, 'keyboard', direction);\n }\n\n /**\n * Get the direction of the element.\n */\n private getDirection(): 'ltr' | 'rtl' {\n return getComputedStyle(this.elementRef.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';\n }\n}\n","import { computed, Directive } from '@angular/core';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * The grid that contains the days of the month.\n */\n@Directive({\n selector: '[ngpDatePickerGrid]',\n exportAs: 'ngpDatePickerGrid',\n host: {\n role: 'grid',\n '[attr.aria-labelledby]': 'labelId()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpDatePickerGrid<T> {\n /**\n * Access the date picker state.\n */\n protected readonly state = injectDateControllerState<T>();\n\n /**\n * Determine the id for the label.\n */\n protected readonly labelId = computed(() => this.state().label()?.id());\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport type { NgpDatePickerLabel } from './date-picker-label';\n\nexport const NgpDatePickerLabelToken = new InjectionToken<NgpDatePickerLabel<unknown>>(\n 'NgpDatePickerLabelToken',\n);\n\n/**\n * Inject the DatePickerLabel directive instance\n */\nexport function injectDatePickerLabel<T>(): NgpDatePickerLabel<T> {\n return inject(NgpDatePickerLabelToken) as NgpDatePickerLabel<T>;\n}\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\nimport { NgpDatePickerLabelToken } from './date-picker-label-token';\n\n/**\n * The label that displays the current month and year typically in the header of the date picker. This will be announced by screen readers when the date changes.\n */\n@Directive({\n selector: '[ngpDatePickerLabel]',\n exportAs: 'ngpDatePickerLabel',\n providers: [{ provide: NgpDatePickerLabelToken, useExisting: NgpDatePickerLabel }],\n host: {\n '[id]': 'id()',\n '[attr.aria-live]': 'ariaLive()',\n '[attr.data-disabled]': 'state().disabled() ? \"\" : null',\n },\n})\nexport class NgpDatePickerLabel<T> {\n /**\n * Access the date picker.\n */\n protected readonly state = injectDateControllerState<T>();\n\n /**\n * Define a unique id for the label.\n */\n readonly id = input(uniqueId('ngp-date-picker-label'));\n\n /**\n * Define the aria live attribute.\n */\n readonly ariaLive = input('polite', {\n alias: 'aria-live',\n });\n}\n","import { computed, Directive, ElementRef, HostListener, inject } from '@angular/core';\nimport { ngpButton } from 'ng-primitives/button';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * A button that navigates to the next month.\n */\n@Directive({\n selector: '[ngpDatePickerNextMonth]',\n exportAs: 'ngpDatePickerNextMonth',\n host: {\n '[attr.aria-disabled]': 'disabled()',\n '[attr.type]': 'isButton ? \"button\" : null',\n },\n})\nexport class NgpDatePickerNextMonth<T> {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker state.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Determine if this is a button element\n */\n protected readonly isButton = this.elementRef.nativeElement.tagName.toLowerCase() === 'button';\n\n /**\n * Determine if the next month is disabled.\n * @internal\n */\n readonly disabled = computed(() => {\n if (this.state().disabled()) {\n return true;\n }\n\n const maxDate = this.state().max();\n const lastDay = this.dateAdapter.set(this.dateAdapter.endOfMonth(this.state().focusedDate()), {\n hour: 23,\n minute: 59,\n second: 59,\n millisecond: 999,\n });\n\n // if there is a max date and it is equal to or before the last day of the month, disable it.\n if (maxDate && this.dateAdapter.compare(maxDate, lastDay) <= 0) {\n return true;\n }\n\n return false;\n });\n\n constructor() {\n ngpButton({ disabled: this.disabled });\n }\n\n /**\n * Navigate to the next month.\n */\n @HostListener('click')\n protected navigateToNextMonth(): void {\n if (this.disabled()) {\n return;\n }\n\n // move focus to the first day of the next month.\n let date = this.state().focusedDate();\n date = this.dateAdapter.add(date, { months: 1 });\n date = this.dateAdapter.set(date, {\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n });\n\n this.state().setFocusedDate(date, 'mouse', 'forward');\n }\n}\n","import { computed, Directive, ElementRef, HostListener, inject } from '@angular/core';\nimport { ngpButton } from 'ng-primitives/button';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\n\n/**\n * A button that navigates to the previous month.\n */\n@Directive({\n selector: '[ngpDatePickerPreviousMonth]',\n exportAs: 'ngpDatePickerPreviousMonth',\n host: {\n '[attr.aria-disabled]': 'disabled()',\n '[attr.type]': 'isButton ? \"button\" : null',\n },\n})\nexport class NgpDatePickerPreviousMonth<T> {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker state.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Determine if this is a button element\n */\n protected readonly isButton = this.elementRef.nativeElement.tagName.toLowerCase() === 'button';\n\n /**\n * Determine if the next month is disabled.\n * @internal\n */\n readonly disabled = computed(() => {\n if (this.state().disabled()) {\n return true;\n }\n\n const minDate = this.state().min();\n\n // if the next month is out of bounds, disable it.\n const firstDay = this.dateAdapter.set(\n this.dateAdapter.startOfMonth(this.state().focusedDate()),\n {\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n );\n\n // if there is a min date and it is equal to or after the first day of the month, disable it.\n if (minDate && this.dateAdapter.compare(minDate, firstDay) >= 0) {\n return true;\n }\n\n return false;\n });\n\n constructor() {\n ngpButton({ disabled: this.disabled });\n }\n\n /**\n * Navigate to the previous month.\n */\n @HostListener('click')\n protected navigateToPreviouMonth(): void {\n if (this.disabled()) {\n return;\n }\n\n // move focus to the first day of the previous month.\n let date = this.state().focusedDate();\n date = this.dateAdapter.set(date, {\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n });\n date = this.dateAdapter.subtract(date, { months: 1 });\n\n this.state().setFocusedDate(date, 'mouse', 'backward');\n }\n}\n","import {\n computed,\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n OnDestroy,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { explicitEffect } from 'ng-primitives/internal';\nimport { injectDateControllerState } from '../date-picker/date-picker-state';\nimport {\n NgpDatePickerRowRenderToken,\n NgpDatePickerWeekToken,\n} from './date-picker-row-render-token';\n\n/**\n * The number of days in a week.\n * @internal\n */\nconst DAYS_PER_WEEK = 7;\n\n/**\n * A structural directive that renders a row of weekdays in the date picker grid.\n */\n@Directive({\n selector: '[ngpDatePickerRowRender]',\n exportAs: 'ngpDatePickerRowRender',\n providers: [{ provide: NgpDatePickerRowRenderToken, useExisting: NgpDatePickerRowRender }],\n})\nexport class NgpDatePickerRowRender<T> implements OnDestroy {\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker.\n */\n private readonly state = injectDateControllerState<T>();\n\n /**\n * Access the template ref for the cell.\n */\n private readonly templateRef = inject(TemplateRef);\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Get all the days to display, this is the days of the current month\n * and the days of the previous and next month to fill the grid.\n */\n protected readonly days = computed(() => {\n const month = this.state().focusedDate();\n const days: T[] = [];\n\n // Get the first and last day of the month.\n let firstDay = this.dateAdapter.startOfMonth(month);\n let lastDay = this.dateAdapter.endOfMonth(month);\n\n // calculate the offset of the first day of the week.\n const firstDayOfWeekOffset = this.getFirstDayOfWeekOffset(firstDay);\n const lastDayOfWeekOffset = this.getLastDayOfWeekOffset(lastDay);\n\n // find the first and last day of visible in the grid.\n firstDay = this.dateAdapter.subtract(firstDay, {\n days: firstDayOfWeekOffset,\n });\n lastDay = this.dateAdapter.add(lastDay, {\n days: lastDayOfWeekOffset,\n });\n\n // collect all the days to display.\n while (firstDay <= lastDay) {\n days.push(firstDay);\n firstDay = this.dateAdapter.add(firstDay, { days: 1 });\n }\n\n return days;\n });\n\n // get the weeks to display.\n protected readonly weeks = computed(() => {\n const days = this.days();\n const weeks = [];\n\n for (let i = 0; i < days.length; i += 7) {\n weeks.push(days.slice(i, i + 7));\n }\n\n return weeks;\n });\n\n /**\n * Store the embedded view refs of each rendered row.\n */\n private readonly viewRefs: EmbeddedViewRef<void>[] = [];\n\n /**\n * Store the previously rendered month.\n */\n private previousMonth: T | null = null;\n\n /**\n * Store the previously rendered first day of the week.\n */\n private previousFirstDayOfWeek: number | null = null;\n\n constructor() {\n // Wait for the inputs of the containing picker to be initialized.\n explicitEffect([this.state().focusedDate, this.state().firstDayOfWeek], () =>\n this.renderRows(),\n );\n }\n\n ngOnDestroy(): void {\n this.destroyRows();\n }\n\n /**\n * Render the row.\n */\n private renderRows(): void {\n const currentFirstDayOfWeek = this.state().firstDayOfWeek();\n\n // If neither the month nor the first day of the week has changed, do not re-render.\n if (\n this.previousMonth &&\n this.dateAdapter.isSameMonth(this.previousMonth, this.state().focusedDate()) &&\n this.previousFirstDayOfWeek === currentFirstDayOfWeek\n ) {\n return;\n }\n\n // Store the current focused month and first day of the week.\n this.previousMonth = this.state().focusedDate();\n this.previousFirstDayOfWeek = currentFirstDayOfWeek;\n\n const weeks = this.weeks();\n\n // clear the view container.\n this.destroyRows();\n\n // render the weeks.\n for (const week of weeks) {\n const viewRef = this.viewContainerRef.createEmbeddedView(this.templateRef, null, {\n injector: Injector.create({\n parent: this.viewContainerRef.injector,\n providers: [{ provide: NgpDatePickerWeekToken, useValue: week }],\n }),\n });\n this.viewRefs.push(viewRef);\n }\n }\n\n /**\n * Destroy the row.\n */\n private destroyRows(): void {\n for (const viewRef of this.viewRefs) {\n viewRef.destroy();\n }\n this.viewRefs.length = 0;\n }\n\n /**\n * Get the offset of the first day of the week.\n * @param firstCalendarDay The first day of the calendar without the offset.\n * @returns The offset of the first day of the week.\n *\n * @internal\n */\n getFirstDayOfWeekOffset(firstCalendarDay: T): number {\n return (\n (DAYS_PER_WEEK + this.dateAdapter.getDay(firstCalendarDay) - this.state().firstDayOfWeek()) %\n DAYS_PER_WEEK\n );\n }\n\n /**\n * Get the offset of the last day of the week.\n * @param lastCalendarDay The last day of the calendar without the offset.\n * @returns The offset of the last day of the week.\n *\n * @internal\n */\n getLastDayOfWeekOffset(lastCalendarDay: T): number {\n const lastDay = this.dateAdapter.getDay(lastCalendarDay);\n const firstDay = this.state().firstDayOfWeek();\n\n return (DAYS_PER_WEEK + firstDay + DAYS_PER_WEEK - 1 - lastDay) % DAYS_PER_WEEK;\n }\n}\n","import { numberAttribute } from '@angular/core';\n\n/**\n * The first day of the week as a number (0-7).\n * - `1` = Monday\n * - `2` = Tuesday\n * - `3` = Wednesday\n * - `4` = Thursday\n * - `5` = Friday\n * - `6` = Saturday\n * - `7` = Sunday\n */\nexport type NgpDatePickerFirstDayOfWeekNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7;\n\n/**\n * The first day of the week as a number (0-7).\n * - `1` = Monday\n * - `2` = Tuesday\n * - `3` = Wednesday\n * - `4` = Thursday\n * - `5` = Friday\n * - `6` = Saturday\n * - `7` = Sunday\n */\nexport type NgpDatePickerFirstDayOfWeekNumberInput =\n | NgpDatePickerFirstDayOfWeekNumber\n | `${NgpDatePickerFirstDayOfWeekNumber}`;\n\n/**\n * Transform the first day of the week input value to a number (0-7) for the start of the week in\n * the calendar.\n * @param firstDayOfWeek The first day of the week input value (number).\n * @returns The first day of the week number.\n */\nexport function transformToFirstDayOfWeekNumber(\n firstDayOfWeek: NgpDatePickerFirstDayOfWeekNumberInput,\n): NgpDatePickerFirstDayOfWeekNumber {\n if (!firstDayOfWeek) {\n return 7;\n }\n return numberAttribute(firstDayOfWeek) as NgpDatePickerFirstDayOfWeekNumber;\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterNextRender,\n booleanAttribute,\n contentChild,\n Directive,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDatePickerConfig } from '../config/date-picker-config';\nimport type { NgpDatePickerDateButton } from '../date-picker-date-button/date-picker-date-button';\nimport { NgpDatePickerLabelToken } from '../date-picker-label/date-picker-label-token';\nimport { transformToFirstDayOfWeekNumber } from './date-picker-first-day-of-week';\nimport { datePickerState, provideDatePickerState } from './date-picker-state';\n\n/**\n * The outermost container for the date picker.\n */\n@Directive({\n selector: '[ngpDatePicker]',\n exportAs: 'ngpDatePicker',\n providers: [provideDatePickerState()],\n host: {\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpDatePicker<T> {\n /**\n * Access the date adapter.\n */\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date picker config.\n */\n private readonly config = injectDatePickerConfig();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * The minimum date that can be selected.\n */\n readonly min = input<T | undefined>(undefined, {\n alias: 'ngpDatePickerMin',\n });\n\n /**\n * The maximum date that can be selected.\n */\n readonly max = input<T | undefined>(undefined, {\n alias: 'ngpDatePickerMax',\n });\n\n /**\n * Determine if the date picker is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpDatePickerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * A function that is called to determine if a specific date should be disabled.\n */\n readonly dateDisabled = input<(date: T) => boolean>(() => false, {\n alias: 'ngpDatePickerDateDisabled',\n });\n\n /**\n * Sets which day starts the week in the calendar.\n * Accepts 0-7 where 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday.\n * Defaults to NgpDatePickerConfig.firstDayOfWeek (default 7 if not overridden).\n * Note: Update calendar header column order when changing from Sunday start.\n * @default 7 (Sunday)\n */\n readonly firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), {\n alias: 'ngpDatePickerFirstDayOfWeek',\n transform: transformToFirstDayOfWeekNumber,\n });\n\n /**\n * The selected value.\n */\n readonly date = input<T | undefined>(undefined, {\n alias: 'ngpDatePickerDate',\n });\n\n /**\n * Emit when the date changes.\n */\n readonly dateChange = output<T | undefined>({\n alias: 'ngpDatePickerDateChange',\n });\n\n /**\n * The focused value.\n */\n readonly focusedDate = input<T>(this.dateAdapter.now(), {\n alias: 'ngpDatePickerFocusedDate',\n });\n\n /**\n * Emit when the focused date changes.\n */\n readonly focusedDateChange = output<T>({\n alias: 'ngpDatePickerFocusedDateChange',\n });\n\n /**\n * Detect the label element.\n * @internal\n */\n readonly label = contentChild(NgpDatePickerLabelToken, { descendants: true });\n\n /**\n * Access all the date picker buttons\n */\n private readonly buttons = signal<NgpDatePickerDateButton<T>[]>([]);\n\n /**\n * The date picker state.\n */\n protected readonly state = datePickerState<NgpDatePicker<T>>(this);\n\n /**\n * Set the focused date.\n * @param date The date to focus.\n * @internal\n */\n setFocusedDate(date: T, origin: FocusOrigin = 'mouse', direction: 'forward' | 'backward'): void {\n if (this.state.disabled()) {\n return;\n }\n\n const min = this.state.min();\n const max = this.state.max();\n\n if (min && this.dateAdapter.isBefore(date, min)) {\n date = min;\n }\n\n if (max && this.dateAdapter.isAfter(date, max)) {\n date = max;\n }\n\n // if the date is disabled, find the next available date in the specified direction.\n if (this.state.dateDisabled()(date)) {\n let nextDate = this.dateAdapter.add(date, { days: direction === 'forward' ? 1 : -1 });\n\n while (\n this.state.dateDisabled()(nextDate) ||\n (min && this.dateAdapter.isBefore(nextDate, min)) ||\n (max && this.dateAdapter.isAfter(nextDate, max))\n ) {\n nextDate = this.dateAdapter.add(nextDate, { days: direction === 'forward' ? 1 : -1 });\n }\n\n date = nextDate;\n }\n\n this.state.focusedDate.set(date);\n this.focusedDateChange.emit(date);\n\n if (origin === 'keyboard') {\n afterNextRender(\n {\n write: () => this.buttons().forEach(button => button.focus()),\n },\n {\n injector: this.injector,\n },\n );\n }\n }\n\n /**\n * Register a date button.\n * @param button The date button to register.\n * @internal\n */\n registerButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => [...buttons, button]);\n }\n\n /**\n * Unregister a date button.\n * @param button The date button to unregister.\n * @internal\n */\n unregisterButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => buttons.filter(b => b !== button));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n * @param preserveTime Whether to preserve time components from existing selected date.\n * @internal\n */\n select(date: T, preserveTime = false): void {\n let selectedDate = date;\n\n if (preserveTime) {\n const existingDate = this.state.date();\n if (existingDate) {\n selectedDate = this.dateAdapter.set(existingDate, {\n year: this.dateAdapter.getYear(date),\n month: this.dateAdapter.getMonth(date),\n day: this.dateAdapter.getDate(date),\n });\n }\n }\n\n this.state.date.set(selectedDate);\n this.dateChange.emit(selectedDate);\n }\n\n /**\n * Determine if a date is selected.\n * @param date The date to check.\n * @returns True if the date is selected, false otherwise.\n * @internal\n */\n isSelected(date: T): boolean {\n const selected = this.state.date();\n if (!selected) {\n return false;\n }\n\n return this.dateAdapter.isSameDay(date, selected);\n }\n\n /**\n * Determine if a date is the start of a range. In a date picker, this is always false.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isStartOfRange(_: T): boolean {\n return false;\n }\n\n /**\n * Determine if a date is the end of a range. In a date picker, this is always false.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isEndOfRange(_: T): boolean {\n return false;\n }\n\n /**\n * Determine if a date is between the start and end dates. In a date picker, this is always false.\n * @param date The date to check.\n * @returns True if the date is between the start and end dates, false otherwise.\n * @internal\n */\n isBetweenRange(_: T): boolean {\n return false;\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n afterNextRender,\n booleanAttribute,\n contentChild,\n Directive,\n inject,\n Injector,\n input,\n output,\n signal,\n} from '@angular/core';\nimport { injectDateAdapter } from 'ng-primitives/date-time';\nimport { injectDatePickerConfig } from '../config/date-picker-config';\nimport { NgpDatePickerDateButton } from '../date-picker-date-button/date-picker-date-button';\nimport { NgpDatePickerLabelToken } from '../date-picker-label/date-picker-label-token';\nimport { transformToFirstDayOfWeekNumber } from '../date-picker/date-picker-first-day-of-week';\nimport { dateRangePickerState, provideDateRangePickerState } from './date-range-picker-state';\n\n@Directive({\n selector: '[ngpDateRangePicker]',\n exportAs: 'ngpDateRangePicker',\n providers: [provideDateRangePickerState()],\n host: {\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpDateRangePicker<T> {\n private readonly dateAdapter = injectDateAdapter<T>();\n\n /**\n * Access the date range picker config.\n */\n private readonly config = injectDatePickerConfig();\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * The minimum date that can be selected.\n */\n readonly min = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerMin',\n });\n\n /**\n * The maximum date that can be selected.\n */\n readonly max = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerMax',\n });\n\n /**\n * Determine if the date picker is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpDateRangePickerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * A function that is called to determine if a specific date should be disabled.\n */\n readonly dateDisabled = input<(date: T) => boolean>(() => false, {\n alias: 'ngpDateRangePickerDateDisabled',\n });\n\n /**\n * Sets which day starts the week in the calendar.\n * Accepts 0-7 where 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday, 7=Sunday.\n * Defaults to NgpDatePickerConfig.firstDayOfWeek (default 7 if not overridden).\n * Note: Update calendar header column order when changing from Sunday start.\n * @default 7 (Sunday)\n */\n readonly firstDayOfWeek = input(transformToFirstDayOfWeekNumber(this.config.firstDayOfWeek), {\n alias: 'ngpDateRangePickerFirstDayOfWeek',\n transform: transformToFirstDayOfWeekNumber,\n });\n\n /**\n * The selected start date\n */\n readonly startDate = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerStartDate',\n });\n\n /**\n * Emit when the date changes.\n */\n readonly startDateChange = output<T | undefined>({\n alias: 'ngpDateRangePickerStartDateChange',\n });\n\n /**\n * The selected end date\n */\n readonly endDate = input<T | undefined>(undefined, {\n alias: 'ngpDateRangePickerEndDate',\n });\n\n /**\n * Emit when the end date changes.\n */\n readonly endDateChange = output<T | undefined>({\n alias: 'ngpDateRangePickerEndDateChange',\n });\n\n /**\n * The focused value.\n */\n readonly focusedDate = input<T>(this.dateAdapter.now(), {\n alias: 'ngpDateRangePickerFocusedDate',\n });\n\n /**\n * Emit when the focused date changes.\n */\n readonly focusedDateChange = output<T>({\n alias: 'ngpDateRangePickerFocusedDateChange',\n });\n\n /**\n * Detect the label element.\n * @internal\n */\n readonly label = contentChild(NgpDatePickerLabelToken, { descendants: true });\n\n /**\n * Access all the date picker buttons\n */\n private readonly buttons = signal<NgpDatePickerDateButton<T>[]>([]);\n\n /**\n * The date range picker state.\n */\n protected readonly state = dateRangePickerState<NgpDateRangePicker<T>>(this);\n\n /**\n * Set the focused date.\n * @param date The date to focus.\n * @internal\n */\n setFocusedDate(date: T, origin: FocusOrigin = 'mouse', direction: 'forward' | 'backward'): void {\n if (this.state.disabled()) {\n return;\n }\n\n const min = this.state.min();\n const max = this.state.max();\n\n if (min && this.dateAdapter.isBefore(date, min)) {\n date = min;\n }\n\n if (max && this.dateAdapter.isAfter(date, max)) {\n date = max;\n }\n\n // if the date is disabled, find the next available date in the specified direction.\n if (this.state.dateDisabled()(date)) {\n let nextDate = this.dateAdapter.add(date, { days: direction === 'forward' ? 1 : -1 });\n\n while (\n this.state.dateDisabled()(nextDate) ||\n (min && this.dateAdapter.isBefore(nextDate, min)) ||\n (max && this.dateAdapter.isAfter(nextDate, max))\n ) {\n nextDate = this.dateAdapter.add(nextDate, { days: direction === 'forward' ? 1 : -1 });\n }\n\n date = nextDate;\n }\n\n this.state.focusedDate.set(date);\n this.focusedDateChange.emit(date);\n\n if (origin === 'keyboard') {\n afterNextRender(\n {\n write: () => this.buttons().forEach(button => button.focus()),\n },\n {\n injector: this.injector,\n },\n );\n }\n }\n\n /**\n * Register a date button.\n * @param button The date button to register.\n * @internal\n */\n registerButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => [...buttons, button]);\n }\n\n /**\n * Unregister a date button.\n * @param button The date button to unregister.\n * @internal\n */\n unregisterButton(button: NgpDatePickerDateButton<T>): void {\n this.buttons.update(buttons => buttons.filter(b => b !== button));\n }\n\n /**\n * Select a date.\n * @param date The date to select.\n * @param preserveTime Whether to preserve time components from existing selected dates.\n * @internal\n */\n /**\n * Handles the selection of a date within the date range picker.\n *\n * Selection logic:\n * - If neither a start date nor an end date is selected:\n * - Sets the selected date as the start date.\n * - If a start date is selected but no end date:\n * - If the selected date is after the start date, sets it as the end date.\n * - If the selected date is before the start date, sets the selected date as the start date\n * and the previous start date as the end date.\n * - If the selected date is the same as the start date, sets the selected date as the end date\n * to select a single date.\n * - If both start and end dates are already selected:\n * - Resets the selection, setting the selected date as the new start date and clearing the end date.\n *\n * @param date The date to select.\n * @param preserveTime Whether to preserve time components from existing selected dates.\n */\n select(date: T, preserveTime = false): void {\n const start = this.state.startDate();\n const end = this.state.endDate();\n\n // Helper function to preserve time components when preserveTime is enabled\n const maybePreserveTime = (newDate: T, existingDate: T | undefined): T => {\n if (!preserveTime || !existingDate) {\n return newDate;\n }\n\n return this.dateAdapter.set(existingDate, {\n year: this.dateAdapter.getYear(newDate),\n month: this.dateAdapter.getMonth(newDate),\n day: this.dateAdapter.getDate(newDate),\n });\n };\n\n if (!start && !end) {\n const selectedDate = maybePreserveTime(date, undefined);\n this.state.startDate.set(selectedDate);\n this.startDateChange.emit(selectedDate);\n return;\n }\n\n if (start && !end) {\n if (this.dateAdapter.isAfter(date, start)) {\n const selectedDate = maybePreserveTime(date, undefined);\n this.state.endDate.set(selectedDate);\n this.endDateChange.emit(selectedDate);\n } else if (this.dateAdapter.isBefore(date, start)) {\n const selectedStartDate = maybePreserveTime(date, start);\n this.state.startDate.set(selectedStartDate);\n this.state.endDate.set(start);\n this.startDateChange.emit(selectedStartDate);\n this.endDateChange.emit(start);\n } else if (this.dateAdapter.isSameDay(date, start)) {\n const selectedDate = maybePreserveTime(date, undefined);\n this.state.endDate.set(selectedDate);\n this.endDateChange.emit(selectedDate);\n }\n return;\n }\n\n // If both start and end are selected, reset selection\n const selectedDate = maybePreserveTime(date, start);\n this.state.startDate.set(selectedDate);\n this.startDateChange.emit(selectedDate);\n this.state.endDate.set(undefined);\n this.endDateChange.emit(undefined);\n }\n\n /**\n * Determine if a date is selected. A date is selected if it is either the start date or the end date.\n * @param date The date to check.\n * @returns True if the date is selected, false otherwise.\n * @internal\n */\n isSelected(date: T): boolean {\n const start = this.state.startDate();\n const end = this.state.endDate();\n\n if (!start && !end) {\n return false;\n }\n\n const isStartSelected = start ? this.dateAdapter.isSameDay(date, start) : false;\n const isEndSelected = end ? this.dateAdapter.isSameDay(date, end) : false;\n\n return isStartSelected || isEndSelected;\n }\n\n /**\n * Determine if a date is the start of a range.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isStartOfRange(date: T): boolean {\n const start = this.state.startDate();\n return start ? this.dateAdapter.isSameDay(date, start) : false;\n }\n\n /**\n * Determine if a date is the end of a range.\n * @param date The date to check.\n * @returns Always false.\n * @internal\n */\n isEndOfRange(date: T): boolean {\n const end = this.state.endDate();\n return end ? this.dateAdapter.isSameDay(date, end) : false;\n }\n\n /**\n * Determine if a date is between the start and end dates.\n * @param date The date to check.\n * @returns True if the date is between the start and end dates, false otherwise.\n * @internal\n */\n isBetweenRange(date: T): boolean {\n const start = this.state.startDate();\n const end = this.state.endDate();\n\n if (!start || !end) {\n return false;\n }\n\n return this.dateAdapter.isAfter(date, start) && this.dateAdapter.isBefore(date, end);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAWO,MAAM,uBAAuB,GAAwB;AAC1D,IAAA,cAAc,EAAE,CAAC;CAClB;AAEM,MAAM,wBAAwB,GAAG,IAAI,cAAc,CACxD,0BAA0B,CAC3B;AAED;;;;AAIG;AACG,SAAU,uBAAuB,CAAC,MAAoC,EAAA;IAC1E,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,wBAAwB;AACjC,YAAA,QAAQ,EAAE,EAAE,GAAG,uBAAuB,EAAE,GAAG,MAAM,EAAE;AACpD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,sBAAsB,GAAA;AACpC,IAAA,OAAO,MAAM,CAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,uBAAuB;AACxF;;MCpCa,2BAA2B,GAAG,IAAI,cAAc,CAC3D,6BAA6B;AAG/B;;AAEG;SACa,yBAAyB,GAAA;AACvC,IAAA,OAAO,MAAM,CAAC,2BAA2B,CAA8B;AACzE;AAEO,MAAM,sBAAsB,GAAG,IAAI,cAAc,CAAY,wBAAwB,CAAC;AAE7F;;AAEG;SACa,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAQ;AAC9C;;MClBa,4BAA4B,GAAG,IAAI,cAAc,CAC5D,8BAA8B;AAGhC;;AAEG;SACa,0BAA0B,GAAA;AACxC,IAAA,OAAO,MAAM,CAAC,4BAA4B,CAA+B;AAC3E;AAEO,MAAM,0BAA0B,GA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k/overlay';
|
|
|
5
5
|
import { DOCUMENT } from '@angular/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { Injectable, InjectionToken, inject, ApplicationRef, TemplateRef, DestroyRef, signal, computed, Injector, runInInjectionContext } from '@angular/core';
|
|
8
|
+
import { ControlContainer } from '@angular/forms';
|
|
8
9
|
import { autoUpdate, offset, shift, flip, size, arrow, computePosition } from '@floating-ui/dom';
|
|
9
10
|
import { setupExitAnimation, explicitEffect, fromResizeEvent, injectElementRef } from 'ng-primitives/internal';
|
|
10
11
|
import { Subject, fromEvent } from 'rxjs';
|
|
@@ -759,6 +760,7 @@ class NgpOverlay {
|
|
|
759
760
|
...(this.config.providers || []),
|
|
760
761
|
{ provide: NgpOverlay, useValue: this },
|
|
761
762
|
provideOverlayContext(this.config.context),
|
|
763
|
+
{ provide: ControlContainer, useValue: null },
|
|
762
764
|
],
|
|
763
765
|
}), { $implicit: this.config.context });
|
|
764
766
|
// Attach portal to container (skip enter animation delay if instant transition)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-portal.mjs","sources":["../../../../packages/ng-primitives/portal/src/offset.ts","../../../../packages/ng-primitives/portal/src/overlay-cooldown.ts","../../../../packages/ng-primitives/portal/src/overlay-token.ts","../../../../packages/ng-primitives/portal/src/portal.ts","../../../../packages/ng-primitives/portal/src/scroll-strategy.ts","../../../../packages/ng-primitives/portal/src/overlay.ts","../../../../packages/ng-primitives/portal/src/overlay-arrow-state.ts","../../../../packages/ng-primitives/portal/src/shift.ts","../../../../packages/ng-primitives/portal/src/ng-primitives-portal.ts"],"sourcesContent":["import { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isObject, isNil } from 'ng-primitives/utils';\n\n/**\n * Options for configuring offset between a floating element and its reference element.\n * Can be a single number for uniform offset or an object for axis-specific control.\n */\nexport interface NgpOffsetOptions {\n /**\n * The offset along the main axis (the axis that runs along the side of the floating element).\n * Represents the distance between the floating element and the reference element.\n * @default 0\n */\n mainAxis?: number;\n\n /**\n * The offset along the cross axis (the axis that runs along the alignment of the floating element).\n * Represents the skidding between the floating element and the reference element.\n * @default 0\n */\n crossAxis?: number;\n\n /**\n * Same axis as crossAxis but applies only to aligned placements and inverts the end alignment.\n * When set to a number, it overrides the crossAxis value.\n * @default null\n */\n alignmentAxis?: number | null;\n}\n\n/**\n * Type representing all valid offset values.\n * Can be a number (applies to mainAxis) or an object with axis-specific offsets.\n */\nexport type NgpOffset = number | NgpOffsetOptions;\n\n/**\n * Input type for offset that also accepts string representations of numbers\n */\nexport type NgpOffsetInput = NgpOffset | string;\n\n/**\n * Transform function to coerce offset input values to the correct type\n * @param value The input value to coerce\n * @returns The coerced offset value\n */\nexport function coerceOffset(value: NgpOffsetInput | null | undefined): NgpOffset {\n if (isNil(value)) {\n return 0;\n }\n\n if (isObject(value)) {\n return value;\n }\n\n // Use CDK's coerceNumberProperty for consistent number coercion\n // This handles strings, numbers, and other input types just like Angular CDK inputs\n return coerceNumberProperty(value, 0);\n}\n","import { Injectable, WritableSignal } from '@angular/core';\n\n/** Interface for overlays that can be closed immediately */\nexport interface CooldownOverlay {\n hideImmediate(): void;\n /** Optional signal to mark the transition as instant due to cooldown */\n instantTransition?: WritableSignal<boolean>;\n}\n\n/**\n * Singleton service that tracks close timestamps and active overlays per overlay type.\n * This enables the cooldown feature where quickly moving between triggers\n * of the same overlay type (e.g., tooltip to tooltip) shows the second\n * overlay immediately without the showDelay, and closes the first immediately.\n * @internal\n */\n@Injectable({ providedIn: 'root' })\nexport class NgpOverlayCooldownManager {\n private readonly lastCloseTimestamps = new Map<string, number>();\n private readonly activeOverlays = new Map<string, CooldownOverlay>();\n\n /**\n * Record the close timestamp for an overlay type.\n * @param overlayType The type identifier for the overlay group\n */\n recordClose(overlayType: string): void {\n this.lastCloseTimestamps.set(overlayType, Date.now());\n }\n\n /**\n * Check if the overlay type is within its cooldown period.\n * @param overlayType The type identifier for the overlay group\n * @param duration The cooldown duration in milliseconds\n * @returns true if within cooldown period, false otherwise\n */\n isWithinCooldown(overlayType: string, duration: number): boolean {\n const lastClose = this.lastCloseTimestamps.get(overlayType);\n if (lastClose === undefined) {\n return false;\n }\n return Date.now() - lastClose < duration;\n }\n\n /**\n * Register an overlay as active for its type.\n * Any existing overlay of the same type will be closed immediately.\n * @param overlayType The type identifier for the overlay group\n * @param overlay The overlay instance\n * @param cooldown The cooldown duration - if > 0, enables instant transitions\n */\n registerActive(overlayType: string, overlay: CooldownOverlay, cooldown: number): void {\n const existing = this.activeOverlays.get(overlayType);\n\n // If there's an existing overlay and cooldown is enabled, close it immediately.\n // This ensures instant DOM swap when hovering between items of the same type.\n if (existing && existing !== overlay && cooldown > 0) {\n existing.instantTransition?.set(true);\n existing.hideImmediate();\n }\n\n this.activeOverlays.set(overlayType, overlay);\n }\n\n /**\n * Unregister an overlay when it closes.\n * @param overlayType The type identifier for the overlay group\n * @param overlay The overlay instance to remove\n */\n unregisterActive(overlayType: string, overlay: CooldownOverlay): void {\n if (this.activeOverlays.get(overlayType) === overlay) {\n this.activeOverlays.delete(overlayType);\n }\n }\n\n /**\n * Check if there's an active overlay of the given type.\n * @param overlayType The type identifier for the overlay group\n * @returns true if there's an active overlay, false otherwise\n */\n hasActiveOverlay(overlayType: string): boolean {\n return this.activeOverlays.has(overlayType);\n }\n}\n","import { inject, InjectionToken, Signal, ValueProvider } from '@angular/core';\n\nconst NgpOverlayContextToken = new InjectionToken<unknown>('NgpOverlayContextToken');\n\n/**\n * Injects the context for the overlay.\n * @internal\n */\nexport function injectOverlayContext<T>(): Signal<T> {\n return inject(NgpOverlayContextToken) as Signal<T>;\n}\n\n/**\n * Provides the context for the overlay.\n * @param value The value to provide as the context.\n * @internal\n */\nexport function provideOverlayContext<T>(value: Signal<T | undefined> | undefined): ValueProvider {\n return { provide: NgpOverlayContextToken, useValue: value };\n}\n","import { VERSION } from '@angular/cdk';\nimport { ComponentPortal, DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ApplicationRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgpExitAnimationRef, setupExitAnimation } from 'ng-primitives/internal';\n\nexport interface NgpPortalAttachOptions {\n /** If true, skip enter animation delay and set enter state immediately. */\n immediate?: boolean;\n}\n\nexport abstract class NgpPortal {\n constructor(\n protected readonly viewContainerRef: ViewContainerRef | null,\n protected readonly injector: Injector,\n ) {}\n\n /**\n * Get the elements of the portal.\n */\n abstract getElements(): HTMLElement[];\n\n /**\n * Detect changes in the portal.\n */\n abstract detectChanges(): void;\n\n /**\n * Whether the portal is attached to a DOM element.\n */\n abstract getAttached(): boolean;\n\n /**\n * Attach the portal to a DOM element.\n * @param container The DOM element to attach the portal to.\n * @param options Optional attach configuration\n */\n abstract attach(container: HTMLElement, options?: NgpPortalAttachOptions): this;\n\n /**\n * Detach the portal from the DOM.\n * @param immediate If true, skip exit animations and remove immediately\n */\n abstract detach(immediate?: boolean): Promise<void>;\n\n /**\n * Angular v20 removes `_unusedComponentFactoryResolver` and `_document` from DomPortalOutlet's\n * constructor signature as they have been deprecated since v18, and replaced with optional\n * `_appRef` and `_defaultInjector` params.\n * This temporary change ensures consistent behaviour for consumers using ng v20+.\n * @see {@link https://github.com/angular/components/pull/24504 The implementing PR} for the new implementation.\n * @see {@link https://github.com/angular/components/blob/732a0d7ab69ec25925cc06a0fb17b0fb16a4b0ae/src/cdk/portal/dom-portal-outlet.ts#L27 The latest v20 version comments}\n * describe the importance of passing the `_appRef` and `_defaultInjector` when it comes to component portals\n */\n // todo: remove this compat fix once support for v19 is dropped when v21 is released\n // - should aim to add appRef also to prevent unforeseen issues in certain edge cases\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected _getDomPortalOutletCtorParamsCompat(): (ApplicationRef | Injector | undefined | any)[] {\n return Number(VERSION.major) >= 20 ? [this.injector] : [undefined, this.injector];\n }\n}\n\nexport class NgpComponentPortal<T> extends NgpPortal {\n private readonly componentPortal: ComponentPortal<T>;\n private viewRef: ComponentRef<T> | null = null;\n private isDestroying = false;\n private exitAnimationRef: NgpExitAnimationRef | null = null;\n\n constructor(component: Type<T>, viewContainerRef: ViewContainerRef | null, injector: Injector) {\n super(viewContainerRef, injector);\n this.componentPortal = new ComponentPortal(component, viewContainerRef, injector);\n }\n\n /**\n * Attach the portal to a DOM element.\n * @param container The DOM element to attach the portal to.\n * @param options Optional attach configuration\n */\n attach(container: HTMLElement, options?: NgpPortalAttachOptions): this {\n const appRef = this.injector.get(ApplicationRef);\n const domOutlet =\n Number(VERSION.major) >= 20\n ? new DomPortalOutlet(container, appRef, this.injector)\n : // @ts-expect-error: Compatibility for Angular versions < 20\n new DomPortalOutlet(container, undefined, appRef, this.injector);\n\n this.viewRef = domOutlet.attach(this.componentPortal);\n\n const element = this.viewRef.location.nativeElement as HTMLElement;\n\n this.exitAnimationRef = setupExitAnimation({ element, immediate: options?.immediate });\n\n return this;\n }\n\n /**\n * Get the root elements of the portal.\n */\n getElements(): HTMLElement[] {\n return this.viewRef ? [this.viewRef.location.nativeElement] : [];\n }\n\n /**\n * Detect changes in the portal.\n */\n detectChanges(): void {\n this.viewRef?.changeDetectorRef.detectChanges();\n }\n\n /**\n * Whether the portal is attached to a DOM element.\n */\n getAttached(): boolean {\n return !!this.viewRef && (this.viewRef.location.nativeElement as HTMLElement).isConnected;\n }\n\n /**\n * Detach the portal from the DOM.\n * @param immediate If true, skip exit animations and remove immediately\n */\n async detach(immediate?: boolean): Promise<void> {\n if (this.isDestroying) {\n return;\n }\n this.isDestroying = true;\n\n // Only wait for exit animation if not immediate\n if (!immediate) {\n await this.exitAnimationRef?.exit();\n }\n\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n}\n\nexport class NgpTemplatePortal<T> extends NgpPortal {\n private readonly templatePortal: TemplatePortal<T>;\n private viewRef: EmbeddedViewRef<T> | null = null;\n private exitAnimationRefs: NgpExitAnimationRef[] = [];\n private isDestroying = false;\n\n constructor(\n template: TemplateRef<T>,\n viewContainerRef: ViewContainerRef,\n injector: Injector,\n context?: T,\n ) {\n super(viewContainerRef, injector);\n this.templatePortal = new TemplatePortal(template, viewContainerRef, context, injector);\n }\n\n /**\n * Attach the portal to a DOM element.\n * @param container The DOM element to attach the portal to.\n * @param options Optional attach configuration\n */\n attach(container: HTMLElement, options?: NgpPortalAttachOptions): this {\n const domOutlet = new DomPortalOutlet(\n container,\n undefined,\n ...this._getDomPortalOutletCtorParamsCompat(),\n );\n this.viewRef = domOutlet.attach(this.templatePortal);\n\n for (const rootNode of this.viewRef.rootNodes) {\n if (rootNode instanceof HTMLElement) {\n // Setup exit animation for each root node\n const exitAnimationRef = setupExitAnimation({\n element: rootNode,\n immediate: options?.immediate,\n });\n this.exitAnimationRefs.push(exitAnimationRef);\n }\n }\n\n return this;\n }\n\n /**\n * Get the root elements of the portal.\n */\n getElements(): HTMLElement[] {\n return this.viewRef ? this.viewRef.rootNodes : [];\n }\n\n /**\n * Detect changes in the portal.\n */\n detectChanges(): void {\n this.viewRef?.detectChanges();\n }\n\n /**\n * Whether the portal is attached to a DOM element.\n */\n getAttached(): boolean {\n return !!this.viewRef && this.viewRef.rootNodes.length > 0;\n }\n\n /**\n * Detach the portal from the DOM.\n * @param immediate If true, skip exit animations and remove immediately\n */\n async detach(immediate?: boolean): Promise<void> {\n if (this.isDestroying) {\n return;\n }\n\n this.isDestroying = true;\n\n // Only wait for exit animations if not immediate\n if (!immediate) {\n await Promise.all(this.exitAnimationRefs.map(ref => ref.exit()));\n }\n\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n}\n\nexport function createPortal<T>(\n componentOrTemplate: Type<T> | TemplateRef<T>,\n viewContainerRef: ViewContainerRef | null,\n injector: Injector,\n context?: T,\n): NgpPortal {\n if (componentOrTemplate instanceof TemplateRef) {\n if (!viewContainerRef) {\n throw new Error('A ViewContainerRef is required to create a TemplatePortal.');\n }\n\n return new NgpTemplatePortal(componentOrTemplate, viewContainerRef, injector, context);\n } else {\n return new NgpComponentPortal(componentOrTemplate, viewContainerRef, injector);\n }\n}\n","/**\n * This code is largely based on the CDK Overlay's scroll strategy implementation, however it\n * has been modified so that it does not rely on the CDK's global overlay styles.\n */\nimport { coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { ViewportRuler } from '@angular/cdk/overlay';\nimport { isFunction, isObject } from 'ng-primitives/utils';\n\nexport interface ScrollStrategy {\n enable(): void;\n disable(): void;\n}\n\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported: boolean | undefined;\n\nexport function supportsScrollBehavior(): boolean {\n if (scrollBehaviorSupported != null) {\n return scrollBehaviorSupported;\n }\n\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (!isObject(document) || !document || !isFunction(Element) || !Element) {\n return (scrollBehaviorSupported = false);\n }\n\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement!.style) {\n return (scrollBehaviorSupported = true);\n }\n\n // Check if scrollTo is supported and if it's been polyfilled\n const scrollToFunction = Element.prototype.scrollTo;\n if (!scrollToFunction) {\n return (scrollBehaviorSupported = false);\n }\n\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n return (scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString()));\n}\n\ninterface HTMLStyles {\n top: string;\n left: string;\n position: string;\n overflowY: string;\n width: string;\n}\n\nexport class BlockScrollStrategy implements ScrollStrategy {\n private readonly previousHTMLStyles: HTMLStyles = {\n top: '',\n left: '',\n position: '',\n overflowY: '',\n width: '',\n };\n private previousScrollPosition = { top: 0, left: 0 };\n private isEnabled = false;\n\n constructor(\n private readonly viewportRuler: ViewportRuler,\n private readonly document: Document,\n ) {}\n\n /** Blocks page-level scroll while the attached overlay is open. */\n enable() {\n if (this.canBeEnabled()) {\n const root = this.document.documentElement!;\n\n this.previousScrollPosition = this.viewportRuler.getViewportScrollPosition();\n\n // Cache the previous inline styles in case the user had set them.\n this.previousHTMLStyles.left = root.style.left || '';\n this.previousHTMLStyles.top = root.style.top || '';\n this.previousHTMLStyles.position = root.style.position || '';\n this.previousHTMLStyles.overflowY = root.style.overflowY || '';\n this.previousHTMLStyles.width = root.style.width || '';\n\n // Set the styles to block scrolling.\n root.style.position = 'fixed';\n\n // Necessary for the content not to lose its width. Note that we're using 100%, instead of\n // 100vw, because 100vw includes the width plus the scrollbar, whereas 100% is the width\n // that the element had before we made it `fixed`.\n root.style.width = '100%';\n\n // Note: this will always add a scrollbar to whatever element it is on, which can\n // potentially result in double scrollbars. It shouldn't be an issue, because we won't\n // block scrolling on a page that doesn't have a scrollbar in the first place.\n root.style.overflowY = 'scroll';\n\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this.previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this.previousScrollPosition.top);\n root.setAttribute('data-scrollblock', '');\n this.isEnabled = true;\n }\n }\n\n /** Unblocks page-level scroll while the attached overlay is open. */\n disable(): void {\n if (this.isEnabled) {\n const html = this.document.documentElement!;\n const body = this.document.body!;\n const htmlStyle = html.style;\n const bodyStyle = body.style;\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n\n this.isEnabled = false;\n\n htmlStyle.left = this.previousHTMLStyles.left;\n htmlStyle.top = this.previousHTMLStyles.top;\n htmlStyle.position = this.previousHTMLStyles.position;\n htmlStyle.overflowY = this.previousHTMLStyles.overflowY;\n htmlStyle.width = this.previousHTMLStyles.width;\n html.removeAttribute('data-scrollblock');\n\n // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n // because it can throw off feature detections in `supportsScrollBehavior` which\n // checks for `'scrollBehavior' in documentElement.style`.\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n }\n\n window.scroll(this.previousScrollPosition.left, this.previousScrollPosition.top);\n\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n }\n }\n }\n\n private canBeEnabled(): boolean {\n // Since the scroll strategies can't be singletons, we have to use a global CSS class\n // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n // scrolling multiple times.\n const html = this.document.documentElement!;\n\n if (html.classList.contains('cdk-global-scrollblock') || this.isEnabled) {\n return false;\n }\n\n const viewport = this.viewportRuler.getViewportSize();\n return html.scrollHeight > viewport.height || html.scrollWidth > viewport.width;\n }\n}\n\nexport class NoopScrollStrategy implements ScrollStrategy {\n enable(): void {\n // No operation for enabling\n }\n\n disable(): void {\n // No operation for disabling\n }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { ViewportRuler } from '@angular/cdk/overlay';\nimport { DOCUMENT } from '@angular/common';\nimport {\n DestroyRef,\n Injector,\n Provider,\n Signal,\n TemplateRef,\n Type,\n ViewContainerRef,\n computed,\n inject,\n runInInjectionContext,\n signal,\n} from '@angular/core';\nimport {\n Middleware,\n Placement,\n Strategy,\n VirtualElement,\n arrow,\n autoUpdate,\n computePosition,\n flip,\n offset,\n shift,\n size,\n} from '@floating-ui/dom';\nimport { explicitEffect, fromResizeEvent } from 'ng-primitives/internal';\nimport { injectDisposables, safeTakeUntilDestroyed, uniqueId } from 'ng-primitives/utils';\nimport { Subject, fromEvent } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { NgpOffset } from './offset';\nimport { CooldownOverlay, NgpOverlayCooldownManager } from './overlay-cooldown';\nimport { provideOverlayContext } from './overlay-token';\nimport { NgpPortal, createPortal } from './portal';\nimport { NgpPosition } from './position';\nimport { BlockScrollStrategy, NoopScrollStrategy } from './scroll-strategy';\nimport { NgpShift } from './shift';\n\n/**\n * Configuration options for creating an overlay\n * @internal\n */\nexport interface NgpOverlayConfig<T = unknown> {\n /** Content to display in the overlay (component or template) */\n content: NgpOverlayContent<T>;\n\n /** The element that triggers the overlay */\n triggerElement: HTMLElement;\n\n /** The element to use for positioning the overlay (if different from trigger) */\n anchorElement?: HTMLElement | null;\n\n /** The injector to use for creating the portal */\n injector: Injector;\n /** ViewContainerRef to use for creating the portal */\n viewContainerRef: ViewContainerRef;\n\n /** Context data to pass to the overlay content */\n context?: Signal<T | undefined>;\n\n /** Container element or selector to attach the overlay to (defaults to document.body) */\n container?: HTMLElement | string | null;\n\n /** Preferred placement of the overlay relative to the trigger. */\n placement?: Signal<Placement>;\n\n /** Offset distance between the overlay and trigger. Can be a number or an object with axis-specific offsets */\n offset?: NgpOffset;\n\n /** Shift configuration to keep the overlay in view. Can be a boolean, an object with options, or undefined */\n shift?: NgpShift;\n\n /** Whether to enable flip behavior when space is limited */\n flip?: boolean;\n\n /** Delay before showing the overlay in milliseconds */\n showDelay?: number;\n\n /** Delay before hiding the overlay in milliseconds */\n hideDelay?: number;\n\n /** Whether the overlay should be positioned with fixed or absolute strategy */\n strategy?: Strategy;\n\n /** The scroll strategy to use for the overlay */\n scrollBehaviour?: 'reposition' | 'block';\n /** Whether to close the overlay when clicking outside */\n closeOnOutsideClick?: boolean;\n /** Whether to close the overlay when pressing escape */\n closeOnEscape?: boolean;\n /**\n * Whether to restore focus to the trigger element when hiding the overlay.\n * Can be a boolean or a signal that returns a boolean.\n */\n restoreFocus?: boolean | Signal<boolean>;\n\n /**\n * Optional callback to update an external close origin signal.\n * Called when the overlay is hidden with the focus origin.\n * @internal\n */\n onClose?: (origin: FocusOrigin) => void;\n /** Additional middleware for floating UI positioning */\n additionalMiddleware?: Middleware[];\n\n /** Additional providers */\n providers?: Provider[];\n\n /** Whether to track the trigger element position on every animation frame. Useful for moving elements like slider thumbs. */\n trackPosition?: boolean;\n\n /**\n * Programmatic position for the overlay. When provided, the overlay will be positioned\n * at these coordinates instead of anchoring to the trigger element.\n * Use with trackPosition for smooth cursor following.\n */\n position?: Signal<NgpPosition | null>;\n\n /**\n * Overlay type identifier for cooldown grouping.\n * When set, overlays of the same type share a cooldown period.\n * For example, 'tooltip' ensures quickly moving between tooltips shows\n * the second one immediately without the showDelay.\n */\n overlayType?: string;\n\n /**\n * Cooldown duration in milliseconds.\n * When moving from one overlay of the same type to another within this duration,\n * the showDelay is skipped for the new overlay.\n * @default 300\n */\n cooldown?: number;\n}\n\n/** Type for overlay content which can be either a template or component */\nexport type NgpOverlayContent<T> = TemplateRef<NgpOverlayTemplateContext<T>> | Type<unknown>;\n\n/** Context for template-based overlays */\nexport type NgpOverlayTemplateContext<T> = {\n $implicit: T;\n};\n\n/**\n * NgpOverlay manages the lifecycle and positioning of overlay UI elements.\n * It abstracts the common behavior shared by tooltips, popovers, menus, etc.\n * @internal\n */\nexport class NgpOverlay<T = unknown> implements CooldownOverlay {\n private readonly disposables = injectDisposables();\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly viewContainerRef: ViewContainerRef;\n private readonly viewportRuler = inject(ViewportRuler);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly cooldownManager = inject(NgpOverlayCooldownManager);\n /** Access any parent overlays */\n private readonly parentOverlay = inject(NgpOverlay, { optional: true });\n /** Signal tracking the portal instance */\n private readonly portal = signal<NgpPortal | null>(null);\n\n /** Signal tracking the overlay position */\n readonly position = signal<{ x: number | undefined; y: number | undefined }>({\n x: undefined,\n y: undefined,\n });\n\n /**\n * Determine if the overlay has been positioned\n * @internal\n */\n readonly isPositioned = computed(\n () => this.position().x !== undefined && this.position().y !== undefined,\n );\n\n /** Signal tracking the trigger element width */\n readonly triggerWidth = signal<number | null>(null);\n\n /** The transform origin for the overlay */\n readonly transformOrigin = signal<string>('center center');\n\n /** Signal tracking the available width before the overlay overflows the viewport */\n readonly availableWidth = signal<number | null>(null);\n\n /** Signal tracking the available height before the overlay overflows the viewport */\n readonly availableHeight = signal<number | null>(null);\n\n /** Signal tracking the final placement of the overlay */\n readonly finalPlacement = signal<Placement | undefined>(undefined);\n\n /** Function to dispose the positioning auto-update */\n private disposePositioning?: () => void;\n\n /** Timeout handle for showing the overlay */\n private openTimeout?: () => void;\n\n /** Timeout handle for hiding the overlay */\n private closeTimeout?: () => void;\n\n /** Signal tracking whether the overlay is open */\n readonly isOpen = signal(false);\n\n /** A unique id for the overlay */\n readonly id = signal<string>(uniqueId('ngp-overlay'));\n\n /**\n * Signal tracking the focus origin used to close the overlay.\n * Updated when hide() is called.\n * @internal\n */\n readonly closeOrigin = signal<FocusOrigin>('program');\n\n /** The aria-describedby attribute for accessibility */\n readonly ariaDescribedBy = computed(() => (this.isOpen() ? this.id() : undefined));\n\n /** The scroll strategy */\n private scrollStrategy = new NoopScrollStrategy();\n\n /** An observable that emits when the overlay is closing */\n readonly closing = new Subject<void>();\n\n /**\n * Signal tracking whether the current transition is instant due to cooldown.\n * When true, CSS can skip animations using the data-instant attribute.\n */\n readonly instantTransition = signal(false);\n\n /** Store the arrow element */\n private arrowElement: HTMLElement | null = null;\n\n /** Store the arrow padding signal */\n private arrowPadding: Signal<number | undefined> | undefined = undefined;\n\n /** @internal The position of the arrow */\n readonly arrowPosition = signal<{ x: number | undefined; y: number | undefined }>({\n x: undefined,\n y: undefined,\n });\n\n /**\n * Creates a new overlay instance\n * @param config Initial configuration for the overlay\n * @param destroyRef Reference for automatic cleanup\n */\n constructor(private config: NgpOverlayConfig<T>) {\n // we cannot inject the viewContainerRef as this can throw an error during hydration in SSR\n this.viewContainerRef = config.viewContainerRef;\n\n // Listen for placement signal changes to update position\n if (config.placement) {\n explicitEffect([config.placement], () => this.updatePosition());\n }\n\n // Listen for position signal changes to update position\n if (config.position) {\n explicitEffect([config.position], () => this.updatePosition());\n }\n\n // this must be done after the config is set\n this.transformOrigin.set(this.getTransformOrigin());\n\n // Monitor trigger element resize\n const elementToMonitor = this.config.anchorElement || this.config.triggerElement;\n fromResizeEvent(elementToMonitor)\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(({ width, height }) => {\n this.triggerWidth.set(width);\n\n // if the element has been hidden, hide immediately\n if (width === 0 || height === 0) {\n this.hideImmediate();\n }\n });\n\n // if there is a parent overlay and it is closed, close this overlay\n this.parentOverlay?.closing\n // we add a debounce here to ensure any dom events like clicks are processed first\n .pipe(debounceTime(0), safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.isOpen()) {\n this.hideImmediate();\n }\n });\n\n // If closeOnOutsideClick is enabled, set up a click listener\n fromEvent<MouseEvent>(this.document, 'mouseup', { capture: true })\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (!this.config.closeOnOutsideClick) {\n return;\n }\n\n const overlay = this.portal();\n\n if (!overlay || !this.isOpen()) {\n return;\n }\n\n const path = event.composedPath();\n const isInsideOverlay = overlay.getElements().some(el => path.includes(el));\n const isInsideTrigger = path.includes(this.config.triggerElement);\n const isInsideAnchor = this.config.anchorElement\n ? path.includes(this.config.anchorElement)\n : false;\n\n if (!isInsideOverlay && !isInsideTrigger && !isInsideAnchor) {\n this.hide();\n }\n });\n\n // If closeOnEscape is enabled, set up a keydown listener\n fromEvent<KeyboardEvent>(this.document, 'keydown', { capture: true })\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (!this.config.closeOnEscape) return;\n if (event.key === 'Escape' && this.isOpen()) {\n this.hide({ origin: 'keyboard', immediate: true });\n }\n });\n\n // Ensure cleanup on destroy\n this.destroyRef.onDestroy(() => this.destroy());\n }\n\n /**\n * Show the overlay with the specified delay\n * @param options Optional options for showing the overlay\n */\n show(options?: { skipCooldown?: boolean }): Promise<void> {\n return new Promise<void>(resolve => {\n // If closing is in progress, cancel it\n if (this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n\n // Don't proceed if already opening or open\n if (this.openTimeout || this.isOpen()) {\n return;\n }\n\n // Use the provided delay or fall back to config\n let delay = this.config.showDelay ?? 0;\n let isInstantDueToCooldown = false;\n\n // Check cooldown regardless of delay value - we need to detect instant transitions\n // even when showDelay is 0, so CSS can skip animations via data-instant attribute.\n // However, if cooldown is explicitly set to 0, disable cooldown behavior entirely.\n // Skip cooldown detection entirely when skipCooldown is true (e.g. programmatic show).\n if (!options?.skipCooldown && this.config.overlayType) {\n const cooldownDuration = this.config.cooldown ?? 300;\n if (\n cooldownDuration > 0 &&\n (this.cooldownManager.isWithinCooldown(this.config.overlayType, cooldownDuration) ||\n this.cooldownManager.hasActiveOverlay(this.config.overlayType))\n ) {\n delay = 0; // Skip delay (no-op if already 0)\n isInstantDueToCooldown = true;\n }\n }\n\n // Set instant transition flag based on whether delay was skipped due to cooldown\n this.instantTransition.set(isInstantDueToCooldown);\n\n this.openTimeout = this.disposables.setTimeout(() => {\n this.openTimeout = undefined;\n this.createOverlay(options?.skipCooldown);\n resolve();\n }, delay);\n });\n }\n\n /**\n * Stop any pending close operation. This is useful for example, if we move the mouse from the tooltip trigger to the tooltip itself.\n * This will prevent the tooltip from closing immediately when the mouse leaves the trigger.\n * @internal\n */\n cancelPendingClose(): void {\n if (this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n }\n\n /**\n * Hide the overlay with the specified delay\n * @param options Optional options for hiding the overlay\n */\n hide(options?: OverlayTriggerOptions): void {\n // If opening is in progress, cancel it\n if (this.openTimeout) {\n this.openTimeout();\n this.openTimeout = undefined;\n }\n\n // Don't proceed if already closing or closed unless immediate is true\n if ((this.closeTimeout && !options?.immediate) || !this.isOpen()) {\n return;\n }\n\n // If immediate and there's a pending close, cancel it first\n // (we'll dispose immediately instead of waiting for the old timeout)\n if (options?.immediate && this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n\n this.closing.next();\n\n // Check cooldown BEFORE recording, then record for the next overlay\n let delay = this.config.hideDelay ?? 0;\n if (this.config.overlayType) {\n // Skip delay if within cooldown period for this overlay type\n if (delay > 0) {\n const cooldownDuration = this.config.cooldown ?? 300;\n if (this.cooldownManager.isWithinCooldown(this.config.overlayType, cooldownDuration)) {\n delay = 0;\n }\n }\n // Record close timestamp so the next overlay of the same type can see it\n this.cooldownManager.recordClose(this.config.overlayType);\n }\n\n const dispose = async () => {\n this.closeTimeout = undefined;\n\n // If show() was called while we were waiting, abort the close\n if (this.openTimeout) {\n return;\n }\n\n const origin = options?.origin ?? 'program';\n\n // Update the close origin signal so computed signals can react\n this.closeOrigin.set(origin);\n\n // Call the onClose callback if provided (for external signal updates)\n this.config.onClose?.(origin);\n\n // Determine if focus should be restored\n const shouldRestoreFocus =\n typeof this.config.restoreFocus === 'function'\n ? this.config.restoreFocus()\n : (this.config.restoreFocus ?? false);\n\n if (shouldRestoreFocus) {\n this.focusMonitor.focusVia(this.config.triggerElement, options?.origin ?? 'program', {\n preventScroll: true,\n });\n }\n\n await this.destroyOverlay();\n };\n\n if (options?.immediate) {\n // If immediate, dispose right away\n dispose();\n } else {\n // Reset instant transition for normal closes so exit animations can play.\n // When being replaced by another overlay during cooldown, hideImmediate()\n // is called instead (which doesn't come through here), and registerActive\n // sets instantTransition to true before that call.\n this.instantTransition.set(false);\n // Remove data-instant attribute so CSS exit animations can play\n for (const element of this.getElements()) {\n element.removeAttribute('data-instant');\n }\n this.closeTimeout = this.disposables.setTimeout(dispose, delay);\n }\n }\n\n /**\n * Update the configuration of this overlay\n * @param config New configuration (partial)\n */\n updateConfig(config: Partial<NgpOverlayConfig<T>>): void {\n this.config = { ...this.config, ...config };\n\n // If the overlay is already open, update its position\n if (this.isOpen()) {\n this.updatePosition();\n }\n }\n\n /**\n * Immediately hide the overlay without any delay.\n * When called during cooldown transitions, this destroys the overlay\n * immediately without exit animations.\n */\n hideImmediate(): void {\n // Cancel any pending operations\n if (this.openTimeout) {\n this.openTimeout();\n this.openTimeout = undefined;\n }\n if (this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n\n // Emit closing event\n this.closing.next();\n\n // Update close origin and call callback (default to 'program' for immediate closes)\n this.closeOrigin.set('program');\n this.config.onClose?.('program');\n\n // Destroy immediately without animations\n this.destroyOverlay(true);\n }\n\n /**\n * Toggle the overlay open/closed state\n */\n toggle(): void {\n if (this.isOpen()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Force update the position of the overlay\n */\n updatePosition(): void {\n const portal = this.portal();\n\n if (!portal) {\n return;\n }\n\n const elements = portal.getElements();\n\n if (elements.length === 0) {\n return;\n }\n\n const overlayElement = elements[0] as HTMLElement;\n\n // Compute new position\n this.computePosition(overlayElement);\n }\n\n /**\n * Completely destroy this overlay instance\n */\n destroy(): void {\n this.hideImmediate();\n this.disposePositioning?.();\n this.scrollStrategy.disable();\n }\n\n /**\n * Get the elements of the overlay\n */\n getElements(): HTMLElement[] {\n return this.portal()?.getElements() ?? [];\n }\n\n /**\n * Internal method to create the overlay\n * @param skipCooldown If true, skip registering with the cooldown manager\n */\n private createOverlay(skipCooldown?: boolean): void {\n if (!this.config.content) {\n throw new Error('Overlay content must be provided');\n }\n\n // Create a new portal with context\n const portal = createPortal(\n this.config.content,\n this.viewContainerRef,\n Injector.create({\n parent: this.config.injector,\n providers: [\n ...(this.config.providers || []),\n { provide: NgpOverlay, useValue: this },\n provideOverlayContext<T>(this.config.context),\n ],\n }),\n { $implicit: this.config.context } as NgpOverlayTemplateContext<T>,\n );\n\n // Attach portal to container (skip enter animation delay if instant transition)\n const container = this.resolveContainer();\n const isInstant = this.instantTransition();\n portal.attach(container, { immediate: isInstant });\n\n // Update portal signal\n this.portal.set(portal);\n\n // If instant transition is active, set data-instant attribute synchronously\n // so CSS can use it for styling purposes\n if (isInstant) {\n for (const element of portal.getElements()) {\n element.setAttribute('data-instant', '');\n }\n }\n\n // Ensure view is up to date\n portal.detectChanges();\n\n // find a dedicated outlet element\n // this is the element that has the `data-overlay` attribute\n // if no such element exists, we use the first element in the portal\n const outletElement =\n portal.getElements().find(el => el.hasAttribute('data-overlay')) ?? portal.getElements()[0];\n\n if (!outletElement) {\n throw new Error('Overlay element is not available.');\n }\n\n // Set up positioning\n this.setupPositioning(outletElement);\n\n // Mark as open\n this.isOpen.set(true);\n\n // Register as active overlay for this type (skip when cooldown is bypassed)\n if (this.config.overlayType && !skipCooldown) {\n this.cooldownManager.registerActive(this.config.overlayType, this, this.config.cooldown ?? 0);\n }\n\n this.scrollStrategy =\n this.config.scrollBehaviour === 'block'\n ? new BlockScrollStrategy(this.viewportRuler, this.document)\n : new NoopScrollStrategy();\n\n this.scrollStrategy.enable();\n }\n\n /**\n * Internal method to setup positioning of the overlay\n */\n private setupPositioning(overlayElement: HTMLElement): void {\n // Determine positioning strategy based on overlay element's CSS\n const strategy =\n getComputedStyle(overlayElement).position === 'fixed'\n ? 'fixed'\n : this.config.strategy || 'absolute';\n\n // Get the reference for auto-update - use trigger element for resize/scroll tracking\n // even when using programmatic position (the virtual element is created dynamically in computePosition)\n const referenceElement = this.config.anchorElement || this.config.triggerElement;\n\n // Setup auto-update for positioning\n this.disposePositioning = autoUpdate(\n referenceElement,\n overlayElement,\n () => this.computePosition(overlayElement, strategy),\n { animationFrame: this.config.trackPosition ?? false },\n );\n }\n\n /**\n * Compute the overlay position using floating-ui\n */\n private async computePosition(\n overlayElement: HTMLElement,\n strategy: Strategy = 'absolute',\n ): Promise<void> {\n // Create middleware array\n const middleware: Middleware[] = [offset(this.config.offset ?? 0)];\n\n // Add shift middleware (enabled by default for backward compatibility)\n // Shift keeps the overlay in view by shifting it along its axis when it would otherwise overflow the viewport\n const shiftConfig = this.config.shift;\n if (shiftConfig !== false) {\n const shiftOptions = shiftConfig === undefined || shiftConfig === true ? {} : shiftConfig;\n middleware.push(shift(shiftOptions));\n }\n\n // Add flip middleware if requested\n if (this.config.flip !== false) {\n middleware.push(flip());\n }\n\n // Add size middleware to expose available dimensions\n middleware.push(\n size({\n apply: ({ availableWidth, availableHeight }) => {\n this.availableWidth.set(availableWidth);\n this.availableHeight.set(availableHeight);\n },\n }),\n );\n\n // Add any additional middleware\n if (this.config.additionalMiddleware) {\n middleware.push(...this.config.additionalMiddleware);\n }\n\n // If the arrow element is registered, add arrow middleware\n if (this.arrowElement) {\n middleware.push(arrow({ element: this.arrowElement, padding: this.arrowPadding?.() }));\n }\n\n // Compute the position\n const placement = this.config.placement?.() ?? 'top';\n\n // Use programmatic position if provided, otherwise use anchor/trigger element\n const referenceElement = this.getPositionReference();\n\n const position = await computePosition(referenceElement, overlayElement, {\n placement,\n middleware,\n strategy,\n });\n\n // Update position signal\n this.position.set({ x: position.x, y: position.y });\n\n // Update final placement signal\n this.finalPlacement.set(position.placement);\n\n // Update arrow position if available\n if (this.arrowElement) {\n this.arrowPosition.set({\n x: position.middlewareData.arrow?.x,\n y: position.middlewareData.arrow?.y,\n });\n }\n\n // Ensure view is updated\n this.portal()?.detectChanges();\n }\n\n /**\n * Get the reference element for positioning. When a programmatic position is provided,\n * creates a virtual element at that position. Otherwise returns the anchor or trigger element.\n */\n private getPositionReference(): HTMLElement | VirtualElement {\n const pos = this.config.position?.();\n if (pos) {\n // Create virtual element that reads position fresh on each call\n return {\n getBoundingClientRect: () => {\n const currentPos = this.config.position?.() ?? pos;\n return new DOMRect(currentPos.x, currentPos.y, 0, 0);\n },\n contextElement: this.config.triggerElement,\n };\n }\n return this.config.anchorElement || this.config.triggerElement;\n }\n\n /**\n * Internal method to destroy the overlay portal\n * @param immediate If true, skip exit animations and remove immediately\n */\n private async destroyOverlay(immediate?: boolean): Promise<void> {\n const portal = this.portal();\n\n if (!portal) {\n return;\n }\n\n // Unregister from active overlays\n if (this.config.overlayType) {\n this.cooldownManager.unregisterActive(this.config.overlayType, this);\n }\n\n // Clear portal reference to prevent double destruction\n this.portal.set(null);\n\n // Clean up positioning\n this.disposePositioning?.();\n this.disposePositioning = undefined;\n\n // Detach the portal (skip animations if immediate)\n await portal.detach(immediate);\n\n // Mark as closed\n this.isOpen.set(false);\n\n // Reset final placement\n this.finalPlacement.set(undefined);\n\n // Reset instant transition flag\n this.instantTransition.set(false);\n\n // disable scroll strategy\n this.scrollStrategy.disable();\n this.scrollStrategy = new NoopScrollStrategy();\n }\n\n /**\n * Get the transform origin for the overlay\n */\n private getTransformOrigin(): string {\n const placement = this.config.placement?.() ?? 'top';\n const basePlacement = placement.split('-')[0]; // Extract \"top\", \"bottom\", etc.\n const alignment = placement.split('-')[1]; // Extract \"start\" or \"end\"\n\n const map: Record<string, string> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n };\n\n let x = 'center';\n let y = 'center';\n\n if (basePlacement === 'top' || basePlacement === 'bottom') {\n y = map[basePlacement];\n if (alignment === 'start') x = 'left';\n else if (alignment === 'end') x = 'right';\n } else {\n x = map[basePlacement];\n if (alignment === 'start') y = 'top';\n else if (alignment === 'end') y = 'bottom';\n }\n\n return `${y} ${x}`;\n }\n\n /**\n * Register the arrow element for positioning\n * @param arrowElement The arrow element\n * @param padding Optional padding signal between the arrow and the edges of the floating element\n * @internal\n */\n registerArrow(arrowElement: HTMLElement | null, padding?: Signal<number | undefined>): void {\n this.arrowElement = arrowElement;\n this.arrowPadding = padding;\n }\n\n /**\n * Remove the registered arrow element\n * @internal\n */\n unregisterArrow(): void {\n this.arrowElement = null;\n this.arrowPadding = undefined;\n }\n\n /**\n * Resolve the container element from the configuration\n * @internal\n */\n private resolveContainer(): HTMLElement {\n if (!this.config.container) {\n return this.document.body;\n }\n\n if (typeof this.config.container === 'string') {\n const element = this.document.querySelector(this.config.container);\n if (!element) {\n // Fallback to document.body if the container is not found\n console.warn(\n `NgPrimitives: Container element with selector \"${this.config.container}\" not found. Falling back to document.body.`,\n );\n return this.document.body;\n }\n\n return element as HTMLElement;\n }\n\n return this.config.container;\n }\n}\n\n/**\n * Helper function to create an overlay in a single call\n * @internal\n */\nexport function createOverlay<T>(config: NgpOverlayConfig<T>): NgpOverlay<T> {\n // we run the overlay creation in the injector context to ensure that it can call the inject function\n return runInInjectionContext(config.injector, () => new NgpOverlay<T>(config));\n}\n\n/**\n * Helper function to inject the NgpOverlay instance\n * @internal\n */\nexport function injectOverlay<T>(): NgpOverlay<T> {\n return inject(NgpOverlay);\n}\n\nexport interface OverlayTriggerOptions {\n /**\n * Whether the visibility change should be immediate.\n */\n immediate?: boolean;\n /**\n * The origin of the focus event that triggered the visibility change.\n */\n origin?: FocusOrigin;\n}\n","import { computed, signal, Signal, WritableSignal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n controlled,\n createPrimitive,\n dataBinding,\n onDestroy,\n styleBinding,\n} from 'ng-primitives/state';\nimport { injectOverlay } from './overlay';\n\n/**\n * The state interface for the overlay arrow.\n */\nexport interface NgpOverlayArrowState {\n /**\n * The x position of the arrow.\n */\n readonly x: Signal<number | undefined>;\n /**\n * The y position of the arrow.\n */\n readonly y: Signal<number | undefined>;\n /**\n * The final placement of the overlay.\n */\n readonly placement: Signal<string | undefined>;\n /**\n * The padding between the arrow and the edges of the floating element.\n */\n readonly padding: WritableSignal<number | undefined>;\n /**\n * Set the padding between the arrow and the edges of the floating element.\n * @param value The padding value in pixels\n */\n setPadding(value: number | undefined): void;\n}\n\n/**\n * The props interface for the overlay arrow.\n */\nexport interface NgpOverlayArrowProps {\n /**\n * Padding between the arrow and the edges of the floating element.\n * This prevents the arrow from overflowing the rounded corners.\n */\n readonly padding?: Signal<number | undefined>;\n}\n\nexport const [\n NgpOverlayArrowStateToken,\n ngpOverlayArrow,\n injectOverlayArrowState,\n provideOverlayArrowState,\n] = createPrimitive(\n 'NgpOverlayArrow',\n ({ padding: _padding = signal(undefined) }: NgpOverlayArrowProps) => {\n const overlay = injectOverlay();\n const element = injectElementRef();\n const padding = controlled(_padding);\n\n // register the arrow element with the overlay\n overlay.registerArrow(element.nativeElement, padding);\n\n // cleanup the arrow element on destroy\n onDestroy(() => overlay.unregisterArrow());\n\n const x = computed(() => overlay.arrowPosition().x);\n const y = computed(() => overlay.arrowPosition().y);\n const placement = computed(() => overlay.finalPlacement());\n\n // bind the arrow position styles\n styleBinding(element, 'inset-inline-start.px', () => x() ?? null);\n styleBinding(element, 'inset-block-start.px', () => y() ?? null);\n dataBinding(element, 'data-placement', () => placement() ?? null);\n\n function setPadding(value: number | undefined): void {\n padding.set(value);\n }\n\n return {\n x,\n y,\n placement,\n padding,\n setPadding,\n } satisfies NgpOverlayArrowState;\n },\n);\n","import { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isNil, isObject } from 'ng-primitives/utils';\n\n/**\n * Options for configuring shift behavior to keep the floating element in view.\n * The shift middleware ensures the floating element stays visible by shifting it\n * within the viewport when it would otherwise overflow.\n */\nexport interface NgpShiftOptions {\n /**\n * The minimum padding between the floating element and the viewport edges.\n * Prevents the floating element from touching the edges of the viewport.\n * @default 0\n */\n padding?: number;\n\n /**\n * The limiter function that determines how much the floating element can shift.\n * Common limiters from @floating-ui/dom include:\n * - limitShift: Limits shifting to prevent the reference element from being obscured\n * @default undefined\n */\n limiter?: {\n fn: (state: unknown) => { x: number; y: number };\n options?: unknown;\n };\n}\n\n/**\n * Type representing all valid shift values.\n * Can be a boolean (enable/disable), undefined, or an object with detailed options.\n */\nexport type NgpShift = boolean | NgpShiftOptions | undefined;\n\n/**\n * Input type for shift that also accepts string representations of booleans\n */\nexport type NgpShiftInput = NgpShift | string;\n\n/**\n * Transform function to coerce shift input values to the correct type\n * @param value The input value to coerce\n * @returns The coerced shift value\n */\nexport function coerceShift(value: NgpShiftInput | null | undefined): NgpShift {\n if (isNil(value)) {\n return undefined;\n }\n\n if (isObject(value)) {\n return value;\n }\n\n // Handle boolean values\n if (typeof value === 'boolean') {\n return value;\n }\n\n // Handle string boolean values\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n // Handle string number values for padding shorthand\n const numValue = coerceNumberProperty(value, null);\n if (numValue !== null && !isNaN(numValue)) {\n return { padding: numValue };\n }\n\n return undefined;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAyCA;;;;AAIG;AACG,SAAU,YAAY,CAAC,KAAwC,EAAA;AACnE,IAAA,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE;AAChB,QAAA,OAAO,CAAC;IACV;AAEA,IAAA,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACnB,QAAA,OAAO,KAAK;IACd;;;AAIA,IAAA,OAAO,oBAAoB,CAAC,KAAK,EAAE,CAAC,CAAC;AACvC;;ACjDA;;;;;;AAMG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAAkB;AAC/C,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,GAAG,EAA2B;AA+DrE,IAAA;AA7DC;;;AAGG;AACH,IAAA,WAAW,CAAC,WAAmB,EAAA;AAC7B,QAAA,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IACvD;AAEA;;;;;AAKG;IACH,gBAAgB,CAAC,WAAmB,EAAE,QAAgB,EAAA;QACpD,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC;AAC3D,QAAA,IAAI,SAAS,KAAK,SAAS,EAAE;AAC3B,YAAA,OAAO,KAAK;QACd;QACA,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,GAAG,QAAQ;IAC1C;AAEA;;;;;;AAMG;AACH,IAAA,cAAc,CAAC,WAAmB,EAAE,OAAwB,EAAE,QAAgB,EAAA;QAC5E,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAA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AAW,CAAC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,EAAE,IAAI,IAAI,CAAC;IAEjE,SAAS,UAAU,CAAC,KAAyB,EAAA;AAC3C,QAAA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;IACpB;IAEA,OAAO;QACL,CAAC;QACD,CAAC;QACD,SAAS;QACT,OAAO;QACP,UAAU;KACoB;AAClC,CAAC;;AChDH;;;;AAIG;AACG,SAAU,WAAW,CAAC,KAAuC,EAAA;AACjE,IAAA,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE;AAChB,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACnB,QAAA,OAAO,KAAK;IACd;;AAGA,IAAA,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE;AAC9B,QAAA,OAAO,KAAK;IACd;;AAGA,IAAA,IAAI,KAAK,KAAK,MAAM,EAAE;AACpB,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,IAAI,KAAK,KAAK,OAAO,EAAE;AACrB,QAAA,OAAO,KAAK;IACd;;IAGA,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC;IAClD,IAAI,QAAQ,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;AACzC,QAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC9B;AAEA,IAAA,OAAO,SAAS;AAClB;;AC1EA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-portal.mjs","sources":["../../../../packages/ng-primitives/portal/src/offset.ts","../../../../packages/ng-primitives/portal/src/overlay-cooldown.ts","../../../../packages/ng-primitives/portal/src/overlay-token.ts","../../../../packages/ng-primitives/portal/src/portal.ts","../../../../packages/ng-primitives/portal/src/scroll-strategy.ts","../../../../packages/ng-primitives/portal/src/overlay.ts","../../../../packages/ng-primitives/portal/src/overlay-arrow-state.ts","../../../../packages/ng-primitives/portal/src/shift.ts","../../../../packages/ng-primitives/portal/src/ng-primitives-portal.ts"],"sourcesContent":["import { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isObject, isNil } from 'ng-primitives/utils';\n\n/**\n * Options for configuring offset between a floating element and its reference element.\n * Can be a single number for uniform offset or an object for axis-specific control.\n */\nexport interface NgpOffsetOptions {\n /**\n * The offset along the main axis (the axis that runs along the side of the floating element).\n * Represents the distance between the floating element and the reference element.\n * @default 0\n */\n mainAxis?: number;\n\n /**\n * The offset along the cross axis (the axis that runs along the alignment of the floating element).\n * Represents the skidding between the floating element and the reference element.\n * @default 0\n */\n crossAxis?: number;\n\n /**\n * Same axis as crossAxis but applies only to aligned placements and inverts the end alignment.\n * When set to a number, it overrides the crossAxis value.\n * @default null\n */\n alignmentAxis?: number | null;\n}\n\n/**\n * Type representing all valid offset values.\n * Can be a number (applies to mainAxis) or an object with axis-specific offsets.\n */\nexport type NgpOffset = number | NgpOffsetOptions;\n\n/**\n * Input type for offset that also accepts string representations of numbers\n */\nexport type NgpOffsetInput = NgpOffset | string;\n\n/**\n * Transform function to coerce offset input values to the correct type\n * @param value The input value to coerce\n * @returns The coerced offset value\n */\nexport function coerceOffset(value: NgpOffsetInput | null | undefined): NgpOffset {\n if (isNil(value)) {\n return 0;\n }\n\n if (isObject(value)) {\n return value;\n }\n\n // Use CDK's coerceNumberProperty for consistent number coercion\n // This handles strings, numbers, and other input types just like Angular CDK inputs\n return coerceNumberProperty(value, 0);\n}\n","import { Injectable, WritableSignal } from '@angular/core';\n\n/** Interface for overlays that can be closed immediately */\nexport interface CooldownOverlay {\n hideImmediate(): void;\n /** Optional signal to mark the transition as instant due to cooldown */\n instantTransition?: WritableSignal<boolean>;\n}\n\n/**\n * Singleton service that tracks close timestamps and active overlays per overlay type.\n * This enables the cooldown feature where quickly moving between triggers\n * of the same overlay type (e.g., tooltip to tooltip) shows the second\n * overlay immediately without the showDelay, and closes the first immediately.\n * @internal\n */\n@Injectable({ providedIn: 'root' })\nexport class NgpOverlayCooldownManager {\n private readonly lastCloseTimestamps = new Map<string, number>();\n private readonly activeOverlays = new Map<string, CooldownOverlay>();\n\n /**\n * Record the close timestamp for an overlay type.\n * @param overlayType The type identifier for the overlay group\n */\n recordClose(overlayType: string): void {\n this.lastCloseTimestamps.set(overlayType, Date.now());\n }\n\n /**\n * Check if the overlay type is within its cooldown period.\n * @param overlayType The type identifier for the overlay group\n * @param duration The cooldown duration in milliseconds\n * @returns true if within cooldown period, false otherwise\n */\n isWithinCooldown(overlayType: string, duration: number): boolean {\n const lastClose = this.lastCloseTimestamps.get(overlayType);\n if (lastClose === undefined) {\n return false;\n }\n return Date.now() - lastClose < duration;\n }\n\n /**\n * Register an overlay as active for its type.\n * Any existing overlay of the same type will be closed immediately.\n * @param overlayType The type identifier for the overlay group\n * @param overlay The overlay instance\n * @param cooldown The cooldown duration - if > 0, enables instant transitions\n */\n registerActive(overlayType: string, overlay: CooldownOverlay, cooldown: number): void {\n const existing = this.activeOverlays.get(overlayType);\n\n // If there's an existing overlay and cooldown is enabled, close it immediately.\n // This ensures instant DOM swap when hovering between items of the same type.\n if (existing && existing !== overlay && cooldown > 0) {\n existing.instantTransition?.set(true);\n existing.hideImmediate();\n }\n\n this.activeOverlays.set(overlayType, overlay);\n }\n\n /**\n * Unregister an overlay when it closes.\n * @param overlayType The type identifier for the overlay group\n * @param overlay The overlay instance to remove\n */\n unregisterActive(overlayType: string, overlay: CooldownOverlay): void {\n if (this.activeOverlays.get(overlayType) === overlay) {\n this.activeOverlays.delete(overlayType);\n }\n }\n\n /**\n * Check if there's an active overlay of the given type.\n * @param overlayType The type identifier for the overlay group\n * @returns true if there's an active overlay, false otherwise\n */\n hasActiveOverlay(overlayType: string): boolean {\n return this.activeOverlays.has(overlayType);\n }\n}\n","import { inject, InjectionToken, Signal, ValueProvider } from '@angular/core';\n\nconst NgpOverlayContextToken = new InjectionToken<unknown>('NgpOverlayContextToken');\n\n/**\n * Injects the context for the overlay.\n * @internal\n */\nexport function injectOverlayContext<T>(): Signal<T> {\n return inject(NgpOverlayContextToken) as Signal<T>;\n}\n\n/**\n * Provides the context for the overlay.\n * @param value The value to provide as the context.\n * @internal\n */\nexport function provideOverlayContext<T>(value: Signal<T | undefined> | undefined): ValueProvider {\n return { provide: NgpOverlayContextToken, useValue: value };\n}\n","import { VERSION } from '@angular/cdk';\nimport { ComponentPortal, DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ApplicationRef,\n ComponentRef,\n EmbeddedViewRef,\n Injector,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { NgpExitAnimationRef, setupExitAnimation } from 'ng-primitives/internal';\n\nexport interface NgpPortalAttachOptions {\n /** If true, skip enter animation delay and set enter state immediately. */\n immediate?: boolean;\n}\n\nexport abstract class NgpPortal {\n constructor(\n protected readonly viewContainerRef: ViewContainerRef | null,\n protected readonly injector: Injector,\n ) {}\n\n /**\n * Get the elements of the portal.\n */\n abstract getElements(): HTMLElement[];\n\n /**\n * Detect changes in the portal.\n */\n abstract detectChanges(): void;\n\n /**\n * Whether the portal is attached to a DOM element.\n */\n abstract getAttached(): boolean;\n\n /**\n * Attach the portal to a DOM element.\n * @param container The DOM element to attach the portal to.\n * @param options Optional attach configuration\n */\n abstract attach(container: HTMLElement, options?: NgpPortalAttachOptions): this;\n\n /**\n * Detach the portal from the DOM.\n * @param immediate If true, skip exit animations and remove immediately\n */\n abstract detach(immediate?: boolean): Promise<void>;\n\n /**\n * Angular v20 removes `_unusedComponentFactoryResolver` and `_document` from DomPortalOutlet's\n * constructor signature as they have been deprecated since v18, and replaced with optional\n * `_appRef` and `_defaultInjector` params.\n * This temporary change ensures consistent behaviour for consumers using ng v20+.\n * @see {@link https://github.com/angular/components/pull/24504 The implementing PR} for the new implementation.\n * @see {@link https://github.com/angular/components/blob/732a0d7ab69ec25925cc06a0fb17b0fb16a4b0ae/src/cdk/portal/dom-portal-outlet.ts#L27 The latest v20 version comments}\n * describe the importance of passing the `_appRef` and `_defaultInjector` when it comes to component portals\n */\n // todo: remove this compat fix once support for v19 is dropped when v21 is released\n // - should aim to add appRef also to prevent unforeseen issues in certain edge cases\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n protected _getDomPortalOutletCtorParamsCompat(): (ApplicationRef | Injector | undefined | any)[] {\n return Number(VERSION.major) >= 20 ? [this.injector] : [undefined, this.injector];\n }\n}\n\nexport class NgpComponentPortal<T> extends NgpPortal {\n private readonly componentPortal: ComponentPortal<T>;\n private viewRef: ComponentRef<T> | null = null;\n private isDestroying = false;\n private exitAnimationRef: NgpExitAnimationRef | null = null;\n\n constructor(component: Type<T>, viewContainerRef: ViewContainerRef | null, injector: Injector) {\n super(viewContainerRef, injector);\n this.componentPortal = new ComponentPortal(component, viewContainerRef, injector);\n }\n\n /**\n * Attach the portal to a DOM element.\n * @param container The DOM element to attach the portal to.\n * @param options Optional attach configuration\n */\n attach(container: HTMLElement, options?: NgpPortalAttachOptions): this {\n const appRef = this.injector.get(ApplicationRef);\n const domOutlet =\n Number(VERSION.major) >= 20\n ? new DomPortalOutlet(container, appRef, this.injector)\n : // @ts-expect-error: Compatibility for Angular versions < 20\n new DomPortalOutlet(container, undefined, appRef, this.injector);\n\n this.viewRef = domOutlet.attach(this.componentPortal);\n\n const element = this.viewRef.location.nativeElement as HTMLElement;\n\n this.exitAnimationRef = setupExitAnimation({ element, immediate: options?.immediate });\n\n return this;\n }\n\n /**\n * Get the root elements of the portal.\n */\n getElements(): HTMLElement[] {\n return this.viewRef ? [this.viewRef.location.nativeElement] : [];\n }\n\n /**\n * Detect changes in the portal.\n */\n detectChanges(): void {\n this.viewRef?.changeDetectorRef.detectChanges();\n }\n\n /**\n * Whether the portal is attached to a DOM element.\n */\n getAttached(): boolean {\n return !!this.viewRef && (this.viewRef.location.nativeElement as HTMLElement).isConnected;\n }\n\n /**\n * Detach the portal from the DOM.\n * @param immediate If true, skip exit animations and remove immediately\n */\n async detach(immediate?: boolean): Promise<void> {\n if (this.isDestroying) {\n return;\n }\n this.isDestroying = true;\n\n // Only wait for exit animation if not immediate\n if (!immediate) {\n await this.exitAnimationRef?.exit();\n }\n\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n}\n\nexport class NgpTemplatePortal<T> extends NgpPortal {\n private readonly templatePortal: TemplatePortal<T>;\n private viewRef: EmbeddedViewRef<T> | null = null;\n private exitAnimationRefs: NgpExitAnimationRef[] = [];\n private isDestroying = false;\n\n constructor(\n template: TemplateRef<T>,\n viewContainerRef: ViewContainerRef,\n injector: Injector,\n context?: T,\n ) {\n super(viewContainerRef, injector);\n this.templatePortal = new TemplatePortal(template, viewContainerRef, context, injector);\n }\n\n /**\n * Attach the portal to a DOM element.\n * @param container The DOM element to attach the portal to.\n * @param options Optional attach configuration\n */\n attach(container: HTMLElement, options?: NgpPortalAttachOptions): this {\n const domOutlet = new DomPortalOutlet(\n container,\n undefined,\n ...this._getDomPortalOutletCtorParamsCompat(),\n );\n this.viewRef = domOutlet.attach(this.templatePortal);\n\n for (const rootNode of this.viewRef.rootNodes) {\n if (rootNode instanceof HTMLElement) {\n // Setup exit animation for each root node\n const exitAnimationRef = setupExitAnimation({\n element: rootNode,\n immediate: options?.immediate,\n });\n this.exitAnimationRefs.push(exitAnimationRef);\n }\n }\n\n return this;\n }\n\n /**\n * Get the root elements of the portal.\n */\n getElements(): HTMLElement[] {\n return this.viewRef ? this.viewRef.rootNodes : [];\n }\n\n /**\n * Detect changes in the portal.\n */\n detectChanges(): void {\n this.viewRef?.detectChanges();\n }\n\n /**\n * Whether the portal is attached to a DOM element.\n */\n getAttached(): boolean {\n return !!this.viewRef && this.viewRef.rootNodes.length > 0;\n }\n\n /**\n * Detach the portal from the DOM.\n * @param immediate If true, skip exit animations and remove immediately\n */\n async detach(immediate?: boolean): Promise<void> {\n if (this.isDestroying) {\n return;\n }\n\n this.isDestroying = true;\n\n // Only wait for exit animations if not immediate\n if (!immediate) {\n await Promise.all(this.exitAnimationRefs.map(ref => ref.exit()));\n }\n\n if (this.viewRef) {\n this.viewRef.destroy();\n this.viewRef = null;\n }\n }\n}\n\nexport function createPortal<T>(\n componentOrTemplate: Type<T> | TemplateRef<T>,\n viewContainerRef: ViewContainerRef | null,\n injector: Injector,\n context?: T,\n): NgpPortal {\n if (componentOrTemplate instanceof TemplateRef) {\n if (!viewContainerRef) {\n throw new Error('A ViewContainerRef is required to create a TemplatePortal.');\n }\n\n return new NgpTemplatePortal(componentOrTemplate, viewContainerRef, injector, context);\n } else {\n return new NgpComponentPortal(componentOrTemplate, viewContainerRef, injector);\n }\n}\n","/**\n * This code is largely based on the CDK Overlay's scroll strategy implementation, however it\n * has been modified so that it does not rely on the CDK's global overlay styles.\n */\nimport { coerceCssPixelValue } from '@angular/cdk/coercion';\nimport { ViewportRuler } from '@angular/cdk/overlay';\nimport { isFunction, isObject } from 'ng-primitives/utils';\n\nexport interface ScrollStrategy {\n enable(): void;\n disable(): void;\n}\n\n/** Cached result of the check that indicates whether the browser supports scroll behaviors. */\nlet scrollBehaviorSupported: boolean | undefined;\n\nexport function supportsScrollBehavior(): boolean {\n if (scrollBehaviorSupported != null) {\n return scrollBehaviorSupported;\n }\n\n // If we're not in the browser, it can't be supported. Also check for `Element`, because\n // some projects stub out the global `document` during SSR which can throw us off.\n if (!isObject(document) || !document || !isFunction(Element) || !Element) {\n return (scrollBehaviorSupported = false);\n }\n\n // If the element can have a `scrollBehavior` style, we can be sure that it's supported.\n if ('scrollBehavior' in document.documentElement!.style) {\n return (scrollBehaviorSupported = true);\n }\n\n // Check if scrollTo is supported and if it's been polyfilled\n const scrollToFunction = Element.prototype.scrollTo;\n if (!scrollToFunction) {\n return (scrollBehaviorSupported = false);\n }\n\n // We can detect if the function has been polyfilled by calling `toString` on it. Native\n // functions are obfuscated using `[native code]`, whereas if it was overwritten we'd get\n // the actual function source. Via https://davidwalsh.name/detect-native-function. Consider\n // polyfilled functions as supporting scroll behavior.\n return (scrollBehaviorSupported = !/\\{\\s*\\[native code\\]\\s*\\}/.test(scrollToFunction.toString()));\n}\n\ninterface HTMLStyles {\n top: string;\n left: string;\n position: string;\n overflowY: string;\n width: string;\n}\n\nexport class BlockScrollStrategy implements ScrollStrategy {\n private readonly previousHTMLStyles: HTMLStyles = {\n top: '',\n left: '',\n position: '',\n overflowY: '',\n width: '',\n };\n private previousScrollPosition = { top: 0, left: 0 };\n private isEnabled = false;\n\n constructor(\n private readonly viewportRuler: ViewportRuler,\n private readonly document: Document,\n ) {}\n\n /** Blocks page-level scroll while the attached overlay is open. */\n enable() {\n if (this.canBeEnabled()) {\n const root = this.document.documentElement!;\n\n this.previousScrollPosition = this.viewportRuler.getViewportScrollPosition();\n\n // Cache the previous inline styles in case the user had set them.\n this.previousHTMLStyles.left = root.style.left || '';\n this.previousHTMLStyles.top = root.style.top || '';\n this.previousHTMLStyles.position = root.style.position || '';\n this.previousHTMLStyles.overflowY = root.style.overflowY || '';\n this.previousHTMLStyles.width = root.style.width || '';\n\n // Set the styles to block scrolling.\n root.style.position = 'fixed';\n\n // Necessary for the content not to lose its width. Note that we're using 100%, instead of\n // 100vw, because 100vw includes the width plus the scrollbar, whereas 100% is the width\n // that the element had before we made it `fixed`.\n root.style.width = '100%';\n\n // Note: this will always add a scrollbar to whatever element it is on, which can\n // potentially result in double scrollbars. It shouldn't be an issue, because we won't\n // block scrolling on a page that doesn't have a scrollbar in the first place.\n root.style.overflowY = 'scroll';\n\n // Note: we're using the `html` node, instead of the `body`, because the `body` may\n // have the user agent margin, whereas the `html` is guaranteed not to have one.\n root.style.left = coerceCssPixelValue(-this.previousScrollPosition.left);\n root.style.top = coerceCssPixelValue(-this.previousScrollPosition.top);\n root.setAttribute('data-scrollblock', '');\n this.isEnabled = true;\n }\n }\n\n /** Unblocks page-level scroll while the attached overlay is open. */\n disable(): void {\n if (this.isEnabled) {\n const html = this.document.documentElement!;\n const body = this.document.body!;\n const htmlStyle = html.style;\n const bodyStyle = body.style;\n const previousHtmlScrollBehavior = htmlStyle.scrollBehavior || '';\n const previousBodyScrollBehavior = bodyStyle.scrollBehavior || '';\n\n this.isEnabled = false;\n\n htmlStyle.left = this.previousHTMLStyles.left;\n htmlStyle.top = this.previousHTMLStyles.top;\n htmlStyle.position = this.previousHTMLStyles.position;\n htmlStyle.overflowY = this.previousHTMLStyles.overflowY;\n htmlStyle.width = this.previousHTMLStyles.width;\n html.removeAttribute('data-scrollblock');\n\n // Disable user-defined smooth scrolling temporarily while we restore the scroll position.\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior\n // Note that we don't mutate the property if the browser doesn't support `scroll-behavior`,\n // because it can throw off feature detections in `supportsScrollBehavior` which\n // checks for `'scrollBehavior' in documentElement.style`.\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = bodyStyle.scrollBehavior = 'auto';\n }\n\n window.scroll(this.previousScrollPosition.left, this.previousScrollPosition.top);\n\n if (scrollBehaviorSupported) {\n htmlStyle.scrollBehavior = previousHtmlScrollBehavior;\n bodyStyle.scrollBehavior = previousBodyScrollBehavior;\n }\n }\n }\n\n private canBeEnabled(): boolean {\n // Since the scroll strategies can't be singletons, we have to use a global CSS class\n // (`cdk-global-scrollblock`) to make sure that we don't try to disable global\n // scrolling multiple times.\n const html = this.document.documentElement!;\n\n if (html.classList.contains('cdk-global-scrollblock') || this.isEnabled) {\n return false;\n }\n\n const viewport = this.viewportRuler.getViewportSize();\n return html.scrollHeight > viewport.height || html.scrollWidth > viewport.width;\n }\n}\n\nexport class NoopScrollStrategy implements ScrollStrategy {\n enable(): void {\n // No operation for enabling\n }\n\n disable(): void {\n // No operation for disabling\n }\n}\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { ViewportRuler } from '@angular/cdk/overlay';\nimport { DOCUMENT } from '@angular/common';\nimport {\n DestroyRef,\n Injector,\n Provider,\n Signal,\n TemplateRef,\n Type,\n ViewContainerRef,\n computed,\n inject,\n runInInjectionContext,\n signal,\n} from '@angular/core';\nimport { ControlContainer } from '@angular/forms';\nimport {\n Middleware,\n Placement,\n Strategy,\n VirtualElement,\n arrow,\n autoUpdate,\n computePosition,\n flip,\n offset,\n shift,\n size,\n} from '@floating-ui/dom';\nimport { explicitEffect, fromResizeEvent } from 'ng-primitives/internal';\nimport { injectDisposables, safeTakeUntilDestroyed, uniqueId } from 'ng-primitives/utils';\nimport { Subject, fromEvent } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { NgpOffset } from './offset';\nimport { CooldownOverlay, NgpOverlayCooldownManager } from './overlay-cooldown';\nimport { provideOverlayContext } from './overlay-token';\nimport { NgpPortal, createPortal } from './portal';\nimport { NgpPosition } from './position';\nimport { BlockScrollStrategy, NoopScrollStrategy } from './scroll-strategy';\nimport { NgpShift } from './shift';\n\n/**\n * Configuration options for creating an overlay\n * @internal\n */\nexport interface NgpOverlayConfig<T = unknown> {\n /** Content to display in the overlay (component or template) */\n content: NgpOverlayContent<T>;\n\n /** The element that triggers the overlay */\n triggerElement: HTMLElement;\n\n /** The element to use for positioning the overlay (if different from trigger) */\n anchorElement?: HTMLElement | null;\n\n /** The injector to use for creating the portal */\n injector: Injector;\n /** ViewContainerRef to use for creating the portal */\n viewContainerRef: ViewContainerRef;\n\n /** Context data to pass to the overlay content */\n context?: Signal<T | undefined>;\n\n /** Container element or selector to attach the overlay to (defaults to document.body) */\n container?: HTMLElement | string | null;\n\n /** Preferred placement of the overlay relative to the trigger. */\n placement?: Signal<Placement>;\n\n /** Offset distance between the overlay and trigger. Can be a number or an object with axis-specific offsets */\n offset?: NgpOffset;\n\n /** Shift configuration to keep the overlay in view. Can be a boolean, an object with options, or undefined */\n shift?: NgpShift;\n\n /** Whether to enable flip behavior when space is limited */\n flip?: boolean;\n\n /** Delay before showing the overlay in milliseconds */\n showDelay?: number;\n\n /** Delay before hiding the overlay in milliseconds */\n hideDelay?: number;\n\n /** Whether the overlay should be positioned with fixed or absolute strategy */\n strategy?: Strategy;\n\n /** The scroll strategy to use for the overlay */\n scrollBehaviour?: 'reposition' | 'block';\n /** Whether to close the overlay when clicking outside */\n closeOnOutsideClick?: boolean;\n /** Whether to close the overlay when pressing escape */\n closeOnEscape?: boolean;\n /**\n * Whether to restore focus to the trigger element when hiding the overlay.\n * Can be a boolean or a signal that returns a boolean.\n */\n restoreFocus?: boolean | Signal<boolean>;\n\n /**\n * Optional callback to update an external close origin signal.\n * Called when the overlay is hidden with the focus origin.\n * @internal\n */\n onClose?: (origin: FocusOrigin) => void;\n /** Additional middleware for floating UI positioning */\n additionalMiddleware?: Middleware[];\n\n /** Additional providers */\n providers?: Provider[];\n\n /** Whether to track the trigger element position on every animation frame. Useful for moving elements like slider thumbs. */\n trackPosition?: boolean;\n\n /**\n * Programmatic position for the overlay. When provided, the overlay will be positioned\n * at these coordinates instead of anchoring to the trigger element.\n * Use with trackPosition for smooth cursor following.\n */\n position?: Signal<NgpPosition | null>;\n\n /**\n * Overlay type identifier for cooldown grouping.\n * When set, overlays of the same type share a cooldown period.\n * For example, 'tooltip' ensures quickly moving between tooltips shows\n * the second one immediately without the showDelay.\n */\n overlayType?: string;\n\n /**\n * Cooldown duration in milliseconds.\n * When moving from one overlay of the same type to another within this duration,\n * the showDelay is skipped for the new overlay.\n * @default 300\n */\n cooldown?: number;\n}\n\n/** Type for overlay content which can be either a template or component */\nexport type NgpOverlayContent<T> = TemplateRef<NgpOverlayTemplateContext<T>> | Type<unknown>;\n\n/** Context for template-based overlays */\nexport type NgpOverlayTemplateContext<T> = {\n $implicit: T;\n};\n\n/**\n * NgpOverlay manages the lifecycle and positioning of overlay UI elements.\n * It abstracts the common behavior shared by tooltips, popovers, menus, etc.\n * @internal\n */\nexport class NgpOverlay<T = unknown> implements CooldownOverlay {\n private readonly disposables = injectDisposables();\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly viewContainerRef: ViewContainerRef;\n private readonly viewportRuler = inject(ViewportRuler);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly cooldownManager = inject(NgpOverlayCooldownManager);\n /** Access any parent overlays */\n private readonly parentOverlay = inject(NgpOverlay, { optional: true });\n /** Signal tracking the portal instance */\n private readonly portal = signal<NgpPortal | null>(null);\n\n /** Signal tracking the overlay position */\n readonly position = signal<{ x: number | undefined; y: number | undefined }>({\n x: undefined,\n y: undefined,\n });\n\n /**\n * Determine if the overlay has been positioned\n * @internal\n */\n readonly isPositioned = computed(\n () => this.position().x !== undefined && this.position().y !== undefined,\n );\n\n /** Signal tracking the trigger element width */\n readonly triggerWidth = signal<number | null>(null);\n\n /** The transform origin for the overlay */\n readonly transformOrigin = signal<string>('center center');\n\n /** Signal tracking the available width before the overlay overflows the viewport */\n readonly availableWidth = signal<number | null>(null);\n\n /** Signal tracking the available height before the overlay overflows the viewport */\n readonly availableHeight = signal<number | null>(null);\n\n /** Signal tracking the final placement of the overlay */\n readonly finalPlacement = signal<Placement | undefined>(undefined);\n\n /** Function to dispose the positioning auto-update */\n private disposePositioning?: () => void;\n\n /** Timeout handle for showing the overlay */\n private openTimeout?: () => void;\n\n /** Timeout handle for hiding the overlay */\n private closeTimeout?: () => void;\n\n /** Signal tracking whether the overlay is open */\n readonly isOpen = signal(false);\n\n /** A unique id for the overlay */\n readonly id = signal<string>(uniqueId('ngp-overlay'));\n\n /**\n * Signal tracking the focus origin used to close the overlay.\n * Updated when hide() is called.\n * @internal\n */\n readonly closeOrigin = signal<FocusOrigin>('program');\n\n /** The aria-describedby attribute for accessibility */\n readonly ariaDescribedBy = computed(() => (this.isOpen() ? this.id() : undefined));\n\n /** The scroll strategy */\n private scrollStrategy = new NoopScrollStrategy();\n\n /** An observable that emits when the overlay is closing */\n readonly closing = new Subject<void>();\n\n /**\n * Signal tracking whether the current transition is instant due to cooldown.\n * When true, CSS can skip animations using the data-instant attribute.\n */\n readonly instantTransition = signal(false);\n\n /** Store the arrow element */\n private arrowElement: HTMLElement | null = null;\n\n /** Store the arrow padding signal */\n private arrowPadding: Signal<number | undefined> | undefined = undefined;\n\n /** @internal The position of the arrow */\n readonly arrowPosition = signal<{ x: number | undefined; y: number | undefined }>({\n x: undefined,\n y: undefined,\n });\n\n /**\n * Creates a new overlay instance\n * @param config Initial configuration for the overlay\n * @param destroyRef Reference for automatic cleanup\n */\n constructor(private config: NgpOverlayConfig<T>) {\n // we cannot inject the viewContainerRef as this can throw an error during hydration in SSR\n this.viewContainerRef = config.viewContainerRef;\n\n // Listen for placement signal changes to update position\n if (config.placement) {\n explicitEffect([config.placement], () => this.updatePosition());\n }\n\n // Listen for position signal changes to update position\n if (config.position) {\n explicitEffect([config.position], () => this.updatePosition());\n }\n\n // this must be done after the config is set\n this.transformOrigin.set(this.getTransformOrigin());\n\n // Monitor trigger element resize\n const elementToMonitor = this.config.anchorElement || this.config.triggerElement;\n fromResizeEvent(elementToMonitor)\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(({ width, height }) => {\n this.triggerWidth.set(width);\n\n // if the element has been hidden, hide immediately\n if (width === 0 || height === 0) {\n this.hideImmediate();\n }\n });\n\n // if there is a parent overlay and it is closed, close this overlay\n this.parentOverlay?.closing\n // we add a debounce here to ensure any dom events like clicks are processed first\n .pipe(debounceTime(0), safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n if (this.isOpen()) {\n this.hideImmediate();\n }\n });\n\n // If closeOnOutsideClick is enabled, set up a click listener\n fromEvent<MouseEvent>(this.document, 'mouseup', { capture: true })\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (!this.config.closeOnOutsideClick) {\n return;\n }\n\n const overlay = this.portal();\n\n if (!overlay || !this.isOpen()) {\n return;\n }\n\n const path = event.composedPath();\n const isInsideOverlay = overlay.getElements().some(el => path.includes(el));\n const isInsideTrigger = path.includes(this.config.triggerElement);\n const isInsideAnchor = this.config.anchorElement\n ? path.includes(this.config.anchorElement)\n : false;\n\n if (!isInsideOverlay && !isInsideTrigger && !isInsideAnchor) {\n this.hide();\n }\n });\n\n // If closeOnEscape is enabled, set up a keydown listener\n fromEvent<KeyboardEvent>(this.document, 'keydown', { capture: true })\n .pipe(safeTakeUntilDestroyed(this.destroyRef))\n .subscribe(event => {\n if (!this.config.closeOnEscape) return;\n if (event.key === 'Escape' && this.isOpen()) {\n this.hide({ origin: 'keyboard', immediate: true });\n }\n });\n\n // Ensure cleanup on destroy\n this.destroyRef.onDestroy(() => this.destroy());\n }\n\n /**\n * Show the overlay with the specified delay\n * @param options Optional options for showing the overlay\n */\n show(options?: { skipCooldown?: boolean }): Promise<void> {\n return new Promise<void>(resolve => {\n // If closing is in progress, cancel it\n if (this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n\n // Don't proceed if already opening or open\n if (this.openTimeout || this.isOpen()) {\n return;\n }\n\n // Use the provided delay or fall back to config\n let delay = this.config.showDelay ?? 0;\n let isInstantDueToCooldown = false;\n\n // Check cooldown regardless of delay value - we need to detect instant transitions\n // even when showDelay is 0, so CSS can skip animations via data-instant attribute.\n // However, if cooldown is explicitly set to 0, disable cooldown behavior entirely.\n // Skip cooldown detection entirely when skipCooldown is true (e.g. programmatic show).\n if (!options?.skipCooldown && this.config.overlayType) {\n const cooldownDuration = this.config.cooldown ?? 300;\n if (\n cooldownDuration > 0 &&\n (this.cooldownManager.isWithinCooldown(this.config.overlayType, cooldownDuration) ||\n this.cooldownManager.hasActiveOverlay(this.config.overlayType))\n ) {\n delay = 0; // Skip delay (no-op if already 0)\n isInstantDueToCooldown = true;\n }\n }\n\n // Set instant transition flag based on whether delay was skipped due to cooldown\n this.instantTransition.set(isInstantDueToCooldown);\n\n this.openTimeout = this.disposables.setTimeout(() => {\n this.openTimeout = undefined;\n this.createOverlay(options?.skipCooldown);\n resolve();\n }, delay);\n });\n }\n\n /**\n * Stop any pending close operation. This is useful for example, if we move the mouse from the tooltip trigger to the tooltip itself.\n * This will prevent the tooltip from closing immediately when the mouse leaves the trigger.\n * @internal\n */\n cancelPendingClose(): void {\n if (this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n }\n\n /**\n * Hide the overlay with the specified delay\n * @param options Optional options for hiding the overlay\n */\n hide(options?: OverlayTriggerOptions): void {\n // If opening is in progress, cancel it\n if (this.openTimeout) {\n this.openTimeout();\n this.openTimeout = undefined;\n }\n\n // Don't proceed if already closing or closed unless immediate is true\n if ((this.closeTimeout && !options?.immediate) || !this.isOpen()) {\n return;\n }\n\n // If immediate and there's a pending close, cancel it first\n // (we'll dispose immediately instead of waiting for the old timeout)\n if (options?.immediate && this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n\n this.closing.next();\n\n // Check cooldown BEFORE recording, then record for the next overlay\n let delay = this.config.hideDelay ?? 0;\n if (this.config.overlayType) {\n // Skip delay if within cooldown period for this overlay type\n if (delay > 0) {\n const cooldownDuration = this.config.cooldown ?? 300;\n if (this.cooldownManager.isWithinCooldown(this.config.overlayType, cooldownDuration)) {\n delay = 0;\n }\n }\n // Record close timestamp so the next overlay of the same type can see it\n this.cooldownManager.recordClose(this.config.overlayType);\n }\n\n const dispose = async () => {\n this.closeTimeout = undefined;\n\n // If show() was called while we were waiting, abort the close\n if (this.openTimeout) {\n return;\n }\n\n const origin = options?.origin ?? 'program';\n\n // Update the close origin signal so computed signals can react\n this.closeOrigin.set(origin);\n\n // Call the onClose callback if provided (for external signal updates)\n this.config.onClose?.(origin);\n\n // Determine if focus should be restored\n const shouldRestoreFocus =\n typeof this.config.restoreFocus === 'function'\n ? this.config.restoreFocus()\n : (this.config.restoreFocus ?? false);\n\n if (shouldRestoreFocus) {\n this.focusMonitor.focusVia(this.config.triggerElement, options?.origin ?? 'program', {\n preventScroll: true,\n });\n }\n\n await this.destroyOverlay();\n };\n\n if (options?.immediate) {\n // If immediate, dispose right away\n dispose();\n } else {\n // Reset instant transition for normal closes so exit animations can play.\n // When being replaced by another overlay during cooldown, hideImmediate()\n // is called instead (which doesn't come through here), and registerActive\n // sets instantTransition to true before that call.\n this.instantTransition.set(false);\n // Remove data-instant attribute so CSS exit animations can play\n for (const element of this.getElements()) {\n element.removeAttribute('data-instant');\n }\n this.closeTimeout = this.disposables.setTimeout(dispose, delay);\n }\n }\n\n /**\n * Update the configuration of this overlay\n * @param config New configuration (partial)\n */\n updateConfig(config: Partial<NgpOverlayConfig<T>>): void {\n this.config = { ...this.config, ...config };\n\n // If the overlay is already open, update its position\n if (this.isOpen()) {\n this.updatePosition();\n }\n }\n\n /**\n * Immediately hide the overlay without any delay.\n * When called during cooldown transitions, this destroys the overlay\n * immediately without exit animations.\n */\n hideImmediate(): void {\n // Cancel any pending operations\n if (this.openTimeout) {\n this.openTimeout();\n this.openTimeout = undefined;\n }\n if (this.closeTimeout) {\n this.closeTimeout();\n this.closeTimeout = undefined;\n }\n\n // Emit closing event\n this.closing.next();\n\n // Update close origin and call callback (default to 'program' for immediate closes)\n this.closeOrigin.set('program');\n this.config.onClose?.('program');\n\n // Destroy immediately without animations\n this.destroyOverlay(true);\n }\n\n /**\n * Toggle the overlay open/closed state\n */\n toggle(): void {\n if (this.isOpen()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n /**\n * Force update the position of the overlay\n */\n updatePosition(): void {\n const portal = this.portal();\n\n if (!portal) {\n return;\n }\n\n const elements = portal.getElements();\n\n if (elements.length === 0) {\n return;\n }\n\n const overlayElement = elements[0] as HTMLElement;\n\n // Compute new position\n this.computePosition(overlayElement);\n }\n\n /**\n * Completely destroy this overlay instance\n */\n destroy(): void {\n this.hideImmediate();\n this.disposePositioning?.();\n this.scrollStrategy.disable();\n }\n\n /**\n * Get the elements of the overlay\n */\n getElements(): HTMLElement[] {\n return this.portal()?.getElements() ?? [];\n }\n\n /**\n * Internal method to create the overlay\n * @param skipCooldown If true, skip registering with the cooldown manager\n */\n private createOverlay(skipCooldown?: boolean): void {\n if (!this.config.content) {\n throw new Error('Overlay content must be provided');\n }\n\n // Create a new portal with context\n const portal = createPortal(\n this.config.content,\n this.viewContainerRef,\n Injector.create({\n parent: this.config.injector,\n providers: [\n ...(this.config.providers || []),\n { provide: NgpOverlay, useValue: this },\n provideOverlayContext<T>(this.config.context),\n { provide: ControlContainer, useValue: null },\n ],\n }),\n { $implicit: this.config.context } as NgpOverlayTemplateContext<T>,\n );\n\n // Attach portal to container (skip enter animation delay if instant transition)\n const container = this.resolveContainer();\n const isInstant = this.instantTransition();\n portal.attach(container, { immediate: isInstant });\n\n // Update portal signal\n this.portal.set(portal);\n\n // If instant transition is active, set data-instant attribute synchronously\n // so CSS can use it for styling purposes\n if (isInstant) {\n for (const element of portal.getElements()) {\n element.setAttribute('data-instant', '');\n }\n }\n\n // Ensure view is up to date\n portal.detectChanges();\n\n // find a dedicated outlet element\n // this is the element that has the `data-overlay` attribute\n // if no such element exists, we use the first element in the portal\n const outletElement =\n portal.getElements().find(el => el.hasAttribute('data-overlay')) ?? portal.getElements()[0];\n\n if (!outletElement) {\n throw new Error('Overlay element is not available.');\n }\n\n // Set up positioning\n this.setupPositioning(outletElement);\n\n // Mark as open\n this.isOpen.set(true);\n\n // Register as active overlay for this type (skip when cooldown is bypassed)\n if (this.config.overlayType && !skipCooldown) {\n this.cooldownManager.registerActive(this.config.overlayType, this, this.config.cooldown ?? 0);\n }\n\n this.scrollStrategy =\n this.config.scrollBehaviour === 'block'\n ? new BlockScrollStrategy(this.viewportRuler, this.document)\n : new NoopScrollStrategy();\n\n this.scrollStrategy.enable();\n }\n\n /**\n * Internal method to setup positioning of the overlay\n */\n private setupPositioning(overlayElement: HTMLElement): void {\n // Determine positioning strategy based on overlay element's CSS\n const strategy =\n getComputedStyle(overlayElement).position === 'fixed'\n ? 'fixed'\n : this.config.strategy || 'absolute';\n\n // Get the reference for auto-update - use trigger element for resize/scroll tracking\n // even when using programmatic position (the virtual element is created dynamically in computePosition)\n const referenceElement = this.config.anchorElement || this.config.triggerElement;\n\n // Setup auto-update for positioning\n this.disposePositioning = autoUpdate(\n referenceElement,\n overlayElement,\n () => this.computePosition(overlayElement, strategy),\n { animationFrame: this.config.trackPosition ?? false },\n );\n }\n\n /**\n * Compute the overlay position using floating-ui\n */\n private async computePosition(\n overlayElement: HTMLElement,\n strategy: Strategy = 'absolute',\n ): Promise<void> {\n // Create middleware array\n const middleware: Middleware[] = [offset(this.config.offset ?? 0)];\n\n // Add shift middleware (enabled by default for backward compatibility)\n // Shift keeps the overlay in view by shifting it along its axis when it would otherwise overflow the viewport\n const shiftConfig = this.config.shift;\n if (shiftConfig !== false) {\n const shiftOptions = shiftConfig === undefined || shiftConfig === true ? {} : shiftConfig;\n middleware.push(shift(shiftOptions));\n }\n\n // Add flip middleware if requested\n if (this.config.flip !== false) {\n middleware.push(flip());\n }\n\n // Add size middleware to expose available dimensions\n middleware.push(\n size({\n apply: ({ availableWidth, availableHeight }) => {\n this.availableWidth.set(availableWidth);\n this.availableHeight.set(availableHeight);\n },\n }),\n );\n\n // Add any additional middleware\n if (this.config.additionalMiddleware) {\n middleware.push(...this.config.additionalMiddleware);\n }\n\n // If the arrow element is registered, add arrow middleware\n if (this.arrowElement) {\n middleware.push(arrow({ element: this.arrowElement, padding: this.arrowPadding?.() }));\n }\n\n // Compute the position\n const placement = this.config.placement?.() ?? 'top';\n\n // Use programmatic position if provided, otherwise use anchor/trigger element\n const referenceElement = this.getPositionReference();\n\n const position = await computePosition(referenceElement, overlayElement, {\n placement,\n middleware,\n strategy,\n });\n\n // Update position signal\n this.position.set({ x: position.x, y: position.y });\n\n // Update final placement signal\n this.finalPlacement.set(position.placement);\n\n // Update arrow position if available\n if (this.arrowElement) {\n this.arrowPosition.set({\n x: position.middlewareData.arrow?.x,\n y: position.middlewareData.arrow?.y,\n });\n }\n\n // Ensure view is updated\n this.portal()?.detectChanges();\n }\n\n /**\n * Get the reference element for positioning. When a programmatic position is provided,\n * creates a virtual element at that position. Otherwise returns the anchor or trigger element.\n */\n private getPositionReference(): HTMLElement | VirtualElement {\n const pos = this.config.position?.();\n if (pos) {\n // Create virtual element that reads position fresh on each call\n return {\n getBoundingClientRect: () => {\n const currentPos = this.config.position?.() ?? pos;\n return new DOMRect(currentPos.x, currentPos.y, 0, 0);\n },\n contextElement: this.config.triggerElement,\n };\n }\n return this.config.anchorElement || this.config.triggerElement;\n }\n\n /**\n * Internal method to destroy the overlay portal\n * @param immediate If true, skip exit animations and remove immediately\n */\n private async destroyOverlay(immediate?: boolean): Promise<void> {\n const portal = this.portal();\n\n if (!portal) {\n return;\n }\n\n // Unregister from active overlays\n if (this.config.overlayType) {\n this.cooldownManager.unregisterActive(this.config.overlayType, this);\n }\n\n // Clear portal reference to prevent double destruction\n this.portal.set(null);\n\n // Clean up positioning\n this.disposePositioning?.();\n this.disposePositioning = undefined;\n\n // Detach the portal (skip animations if immediate)\n await portal.detach(immediate);\n\n // Mark as closed\n this.isOpen.set(false);\n\n // Reset final placement\n this.finalPlacement.set(undefined);\n\n // Reset instant transition flag\n this.instantTransition.set(false);\n\n // disable scroll strategy\n this.scrollStrategy.disable();\n this.scrollStrategy = new NoopScrollStrategy();\n }\n\n /**\n * Get the transform origin for the overlay\n */\n private getTransformOrigin(): string {\n const placement = this.config.placement?.() ?? 'top';\n const basePlacement = placement.split('-')[0]; // Extract \"top\", \"bottom\", etc.\n const alignment = placement.split('-')[1]; // Extract \"start\" or \"end\"\n\n const map: Record<string, string> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n };\n\n let x = 'center';\n let y = 'center';\n\n if (basePlacement === 'top' || basePlacement === 'bottom') {\n y = map[basePlacement];\n if (alignment === 'start') x = 'left';\n else if (alignment === 'end') x = 'right';\n } else {\n x = map[basePlacement];\n if (alignment === 'start') y = 'top';\n else if (alignment === 'end') y = 'bottom';\n }\n\n return `${y} ${x}`;\n }\n\n /**\n * Register the arrow element for positioning\n * @param arrowElement The arrow element\n * @param padding Optional padding signal between the arrow and the edges of the floating element\n * @internal\n */\n registerArrow(arrowElement: HTMLElement | null, padding?: Signal<number | undefined>): void {\n this.arrowElement = arrowElement;\n this.arrowPadding = padding;\n }\n\n /**\n * Remove the registered arrow element\n * @internal\n */\n unregisterArrow(): void {\n this.arrowElement = null;\n this.arrowPadding = undefined;\n }\n\n /**\n * Resolve the container element from the configuration\n * @internal\n */\n private resolveContainer(): HTMLElement {\n if (!this.config.container) {\n return this.document.body;\n }\n\n if (typeof this.config.container === 'string') {\n const element = this.document.querySelector(this.config.container);\n if (!element) {\n // Fallback to document.body if the container is not found\n console.warn(\n `NgPrimitives: Container element with selector \"${this.config.container}\" not found. Falling back to document.body.`,\n );\n return this.document.body;\n }\n\n return element as HTMLElement;\n }\n\n return this.config.container;\n }\n}\n\n/**\n * Helper function to create an overlay in a single call\n * @internal\n */\nexport function createOverlay<T>(config: NgpOverlayConfig<T>): NgpOverlay<T> {\n // we run the overlay creation in the injector context to ensure that it can call the inject function\n return runInInjectionContext(config.injector, () => new NgpOverlay<T>(config));\n}\n\n/**\n * Helper function to inject the NgpOverlay instance\n * @internal\n */\nexport function injectOverlay<T>(): NgpOverlay<T> {\n return inject(NgpOverlay);\n}\n\nexport interface OverlayTriggerOptions {\n /**\n * Whether the visibility change should be immediate.\n */\n immediate?: boolean;\n /**\n * The origin of the focus event that triggered the visibility change.\n */\n origin?: FocusOrigin;\n}\n","import { computed, signal, Signal, WritableSignal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n controlled,\n createPrimitive,\n dataBinding,\n onDestroy,\n styleBinding,\n} from 'ng-primitives/state';\nimport { injectOverlay } from './overlay';\n\n/**\n * The state interface for the overlay arrow.\n */\nexport interface NgpOverlayArrowState {\n /**\n * The x position of the arrow.\n */\n readonly x: Signal<number | undefined>;\n /**\n * The y position of the arrow.\n */\n readonly y: Signal<number | undefined>;\n /**\n * The final placement of the overlay.\n */\n readonly placement: Signal<string | undefined>;\n /**\n * The padding between the arrow and the edges of the floating element.\n */\n readonly padding: WritableSignal<number | undefined>;\n /**\n * Set the padding between the arrow and the edges of the floating element.\n * @param value The padding value in pixels\n */\n setPadding(value: number | undefined): void;\n}\n\n/**\n * The props interface for the overlay arrow.\n */\nexport interface NgpOverlayArrowProps {\n /**\n * Padding between the arrow and the edges of the floating element.\n * This prevents the arrow from overflowing the rounded corners.\n */\n readonly padding?: Signal<number | undefined>;\n}\n\nexport const [\n NgpOverlayArrowStateToken,\n ngpOverlayArrow,\n injectOverlayArrowState,\n provideOverlayArrowState,\n] = createPrimitive(\n 'NgpOverlayArrow',\n ({ padding: _padding = signal(undefined) }: NgpOverlayArrowProps) => {\n const overlay = injectOverlay();\n const element = injectElementRef();\n const padding = controlled(_padding);\n\n // register the arrow element with the overlay\n overlay.registerArrow(element.nativeElement, padding);\n\n // cleanup the arrow element on destroy\n onDestroy(() => overlay.unregisterArrow());\n\n const x = computed(() => overlay.arrowPosition().x);\n const y = computed(() => overlay.arrowPosition().y);\n const placement = computed(() => overlay.finalPlacement());\n\n // bind the arrow position styles\n styleBinding(element, 'inset-inline-start.px', () => x() ?? null);\n styleBinding(element, 'inset-block-start.px', () => y() ?? null);\n dataBinding(element, 'data-placement', () => placement() ?? null);\n\n function setPadding(value: number | undefined): void {\n padding.set(value);\n }\n\n return {\n x,\n y,\n placement,\n padding,\n setPadding,\n } satisfies NgpOverlayArrowState;\n },\n);\n","import { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { isNil, isObject } from 'ng-primitives/utils';\n\n/**\n * Options for configuring shift behavior to keep the floating element in view.\n * The shift middleware ensures the floating element stays visible by shifting it\n * within the viewport when it would otherwise overflow.\n */\nexport interface NgpShiftOptions {\n /**\n * The minimum padding between the floating element and the viewport edges.\n * Prevents the floating element from touching the edges of the viewport.\n * @default 0\n */\n padding?: number;\n\n /**\n * The limiter function that determines how much the floating element can shift.\n * Common limiters from @floating-ui/dom include:\n * - limitShift: Limits shifting to prevent the reference element from being obscured\n * @default undefined\n */\n limiter?: {\n fn: (state: unknown) => { x: number; y: number };\n options?: unknown;\n };\n}\n\n/**\n * Type representing all valid shift values.\n * Can be a boolean (enable/disable), undefined, or an object with detailed options.\n */\nexport type NgpShift = boolean | NgpShiftOptions | undefined;\n\n/**\n * Input type for shift that also accepts string representations of booleans\n */\nexport type NgpShiftInput = NgpShift | string;\n\n/**\n * Transform function to coerce shift input values to the correct type\n * @param value The input value to coerce\n * @returns The coerced shift value\n */\nexport function coerceShift(value: NgpShiftInput | null | undefined): NgpShift {\n if (isNil(value)) {\n return undefined;\n }\n\n if (isObject(value)) {\n return value;\n }\n\n // Handle boolean values\n if (typeof value === 'boolean') {\n return value;\n }\n\n // Handle string boolean values\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n // Handle string number values for padding shorthand\n const numValue = coerceNumberProperty(value, null);\n if (numValue !== null && !isNaN(numValue)) {\n return { padding: numValue };\n }\n\n return undefined;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAyCA;;;;AAIG;AACG,SAAU,YAAY,CAAC,KAAwC,EAAA;AACnE,IAAA,IAAI,KAAK,CAAC,KAAK,CAAC,EAAE;AAChB,QAAA,OAAO,CAAC;IACV;AAEA,IAAA,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACnB,QAAA,OAAO,KAAK;IACd;;;AAIA,IAAA,OAAO,oBAAoB,CAAC,KAAK,EAAE,CAAC,CAAC;AACvC;;ACjDA;;;;;;AAMG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,GAAG,EAAkB;AAC/C,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,GAAG,EAA2B;AA+DrE,IAAA;AA7DC;;;AAGG;AACH,IAAA,WAAW,CAAC,WAAmB,EAAA;AAC7B,QAAA,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IACvD;AAEA;;;;;AAKG;IACH,gBAAgB,CAAC,WAAmB,EAAE,QAAgB,EAAA;QACpD,MAAM,SAAS,GAAG,IAA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C,QAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;IAC9B;AAEA,IAAA,OAAO,SAAS;AAClB;;AC1EA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "ng-primitives",
|
|
3
3
|
"description": "Angular Primitives is a low-level headless UI component library with a focus on accessibility, customization, and developer experience. ",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.109.
|
|
5
|
+
"version": "0.109.4",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"angular",
|
|
8
8
|
"primitives",
|