ng-primitives 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion-trigger/accordion-trigger.d.ts +4 -0
- package/dialog/dialog-overlay/dialog-overlay.d.ts +7 -1
- package/dialog/dialog-trigger/dialog-trigger.d.ts +0 -2
- package/example-theme/index.css +2 -0
- package/fesm2022/ng-primitives-a11y.mjs +3 -3
- package/fesm2022/ng-primitives-accordion.mjs +18 -13
- package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/ng-primitives-autofill.mjs +4 -4
- package/fesm2022/ng-primitives-avatar.mjs +9 -9
- package/fesm2022/ng-primitives-button.mjs +3 -3
- package/fesm2022/ng-primitives-checkbox.mjs +4 -4
- package/fesm2022/ng-primitives-common.mjs +3 -3
- package/fesm2022/ng-primitives-date-picker.mjs +27 -27
- package/fesm2022/ng-primitives-dialog.mjs +30 -22
- package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/ng-primitives-file-upload.mjs +12 -8
- package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
- package/fesm2022/ng-primitives-focus-trap.mjs +31 -8
- package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
- package/fesm2022/ng-primitives-form-field.mjs +15 -15
- package/fesm2022/ng-primitives-input.mjs +3 -3
- package/fesm2022/ng-primitives-interactions.mjs +15 -15
- package/fesm2022/ng-primitives-internal.mjs +20 -47
- package/fesm2022/ng-primitives-internal.mjs.map +1 -1
- package/fesm2022/ng-primitives-listbox.mjs +12 -12
- package/fesm2022/ng-primitives-menu.mjs +13 -13
- package/fesm2022/ng-primitives-meter.mjs +164 -0
- package/fesm2022/ng-primitives-meter.mjs.map +1 -0
- package/fesm2022/ng-primitives-pagination.mjs +19 -19
- package/fesm2022/ng-primitives-popover.mjs +25 -15
- package/fesm2022/ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/ng-primitives-progress.mjs +6 -6
- package/fesm2022/ng-primitives-radio.mjs +9 -9
- package/fesm2022/ng-primitives-resize.mjs +3 -3
- package/fesm2022/ng-primitives-roving-focus.mjs +6 -6
- package/fesm2022/ng-primitives-search.mjs +7 -7
- package/fesm2022/ng-primitives-select.mjs +3 -3
- package/fesm2022/ng-primitives-separator.mjs +3 -3
- package/fesm2022/ng-primitives-slider.mjs +12 -12
- package/fesm2022/ng-primitives-switch.mjs +6 -6
- package/fesm2022/ng-primitives-tabs.mjs +21 -29
- package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/ng-primitives-textarea.mjs +3 -3
- package/fesm2022/ng-primitives-toast.mjs +3 -3
- package/fesm2022/ng-primitives-toggle-group.mjs +9 -14
- package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/ng-primitives-toggle.mjs +4 -4
- package/fesm2022/ng-primitives-toolbar.mjs +38 -14
- package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/ng-primitives-tooltip.mjs +25 -19
- package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
- package/focus-trap/focus-trap/focus-trap-state.d.ts +41 -0
- package/focus-trap/focus-trap/focus-trap.d.ts +4 -0
- package/focus-trap/index.d.ts +1 -0
- package/form-field/form-control/form-control-state.d.ts +23 -23
- package/listbox/listbox/listbox-state.d.ts +2 -2
- package/meter/README.md +3 -0
- package/meter/index.d.ts +6 -0
- package/meter/meter/meter-state.d.ts +25 -0
- package/meter/meter/meter.d.ts +27 -0
- package/meter/meter-indicator/meter-indicator.d.ts +15 -0
- package/meter/meter-label/meter-label.d.ts +18 -0
- package/meter/meter-track/meter-track.d.ts +5 -0
- package/meter/meter-value/meter-value.d.ts +5 -0
- package/package.json +9 -5
- package/pagination/pagination/pagination-state.d.ts +2 -2
- package/pagination/pagination-first/pagination-first.d.ts +2 -2
- package/pagination/pagination-next/pagination-next.d.ts +2 -2
- package/pagination/pagination-previous/pagination-previous.d.ts +2 -2
- package/popover/popover/popover.d.ts +31 -1
- package/progress/progress/progress-state.d.ts +2 -2
- package/progress/progress-indicator/progress-indicator.d.ts +2 -2
- package/roving-focus/roving-focus-group/roving-focus-group-state.d.ts +6 -6
- package/schematics/ng-generate/schema.d.ts +2 -1
- package/schematics/ng-generate/schema.json +1 -0
- package/schematics/ng-generate/templates/meter/meter.__fileSuffix@dasherize__.ts.template +78 -0
- package/schematics/ng-generate/templates/pagination/pagination.__fileSuffix@dasherize__.ts.template +11 -11
- package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +8 -3
- package/schematics/ng-generate/templates/toolbar/toolbar.__fileSuffix@dasherize__.ts.template +10 -2
- package/slider/slider/slider-state.d.ts +4 -4
- package/slider/slider-range/slider-range.d.ts +4 -4
- package/slider/slider-thumb/slider-thumb.d.ts +4 -4
- package/slider/slider-track/slider-track.d.ts +4 -4
- package/tabs/tab-button/tab-button.d.ts +7 -8
- package/tabs/tab-list/tab-list.d.ts +6 -7
- package/tabs/tab-panel/tab-panel.d.ts +11 -9
- package/tabs/tabset/tabset-state.d.ts +6 -7
- package/tabs/tabset/tabset.d.ts +3 -4
- package/toggle-group/toggle-group/toggle-group-state.d.ts +6 -6
- package/toggle-group/toggle-group/toggle-group.d.ts +1 -1
- package/toggle-group/toggle-group-item/toggle-group-item-state.d.ts +12 -12
- package/toolbar/index.d.ts +1 -0
- package/toolbar/toolbar/toolbar-state.d.ts +39 -0
- package/toolbar/toolbar/toolbar.d.ts +10 -1
- package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng-primitives-popover.mjs","sources":["../../../../packages/ng-primitives/popover/src/config/popover-config.ts","../../../../packages/ng-primitives/popover/src/popover/popover-token.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger-state.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger.ts","../../../../packages/ng-primitives/popover/src/utils/transform-origin.ts","../../../../packages/ng-primitives/popover/src/popover/popover.ts","../../../../packages/ng-primitives/popover/src/ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * Define the delay before the popover is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the popover should be attached.\n * @default document.body\n */\n container: HTMLElement | null;\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n closeOnOutsideClick: boolean;\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n closeOnEscape: boolean;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block';\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: null,\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n};\n\nexport const NgpPopoverConfigToken = new InjectionToken<NgpPopoverConfig>('NgpPopoverConfigToken');\n\n/**\n * Provide the default Popover configuration\n * @param config The Popover configuration\n * @returns The provider\n */\nexport function providePopoverConfig(config: Partial<NgpPopoverConfig>): Provider[] {\n return [\n {\n provide: NgpPopoverConfigToken,\n useValue: { ...defaultPopoverConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Popover configuration\n * @returns The global Popover configuration\n */\nexport function injectPopoverConfig(): NgpPopoverConfig {\n return inject(NgpPopoverConfigToken, { optional: true }) ?? defaultPopoverConfig;\n}\n","import { inject, InjectionToken, ValueProvider } from '@angular/core';\n\nexport const NgpPopoverContextToken = new InjectionToken<unknown>('NgpPopoverContextToken');\n\n/**\n * Inject the Popover context\n */\nexport function injectPopoverContext<T>(): T {\n return inject(NgpPopoverContextToken) as T;\n}\n\n/**\n * Provide the Popover context\n */\nexport function providePopoverContext<T>(context: T): ValueProvider {\n return { provide: NgpPopoverContextToken, useValue: context };\n}\n","import { InjectOptions, Signal } from '@angular/core';\nimport {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n State,\n} from 'ng-primitives/state';\nimport type { NgpPopoverTrigger } from './popover-trigger';\n\n/**\n * The state token for the PopoverTrigger primitive.\n */\nexport const NgpPopoverTriggerStateToken = createStateToken<NgpPopoverTrigger>('PopoverTrigger');\n\n/**\n * Provides the PopoverTrigger state.\n */\nexport const providePopoverTriggerState = createStateProvider(NgpPopoverTriggerStateToken);\n\n/**\n * Injects the PopoverTrigger state.\n */\nexport const injectPopoverTriggerState = createStateInjector<NgpPopoverTrigger>(\n NgpPopoverTriggerStateToken,\n) as <T>(options?: InjectOptions) => Signal<State<NgpPopoverTrigger<T>>>;\n\n/**\n * The PopoverTrigger state registration function.\n */\nexport const popoverTriggerState = createState(NgpPopoverTriggerStateToken);\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { BlockScrollStrategy, NoopScrollStrategy, ViewportRuler } from '@angular/cdk/overlay';\nimport { ComponentPortal, DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n booleanAttribute,\n ComponentRef,\n computed,\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n signal,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n autoUpdate,\n computePosition,\n flip,\n Middleware,\n offset,\n Placement,\n shift,\n} from '@floating-ui/dom';\nimport {\n injectElementRef,\n injectExitAnimationManager,\n provideExitAnimationManager,\n} from 'ng-primitives/internal';\nimport { fromResizeEvent } from 'ng-primitives/resize';\nimport { injectDisposables } from 'ng-primitives/utils';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport type { NgpPopover } from '../popover/popover';\nimport { providePopoverContext } from '../popover/popover-token';\nimport {\n injectPopoverTriggerState,\n popoverTriggerState,\n providePopoverTriggerState,\n} from './popover-trigger-state';\n\n/**\n * Apply the `ngpPopoverTrigger` directive to an element that triggers the popover to show.\n */\n@Directive({\n selector: '[ngpPopoverTrigger]',\n exportAs: 'ngpPopoverTrigger',\n providers: [providePopoverTriggerState({ inherit: false }), provideExitAnimationManager()],\n host: {\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.data-placement]': 'state.placement()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '(click)': 'toggleOpenState($event)',\n '(document:keydown.escape)': 'handleEscapeKey()',\n },\n})\nexport class NgpPopoverTrigger<T = null> implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = injectElementRef();\n\n /**\n * Access the exit animation state.\n */\n private readonly exitAnimationState = injectExitAnimationManager();\n\n /**\n * Inject the parent popover trigger if available.\n */\n private readonly parentTrigger = injectPopoverTriggerState<T>({\n skipSelf: true,\n optional: true,\n });\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the document.\n */\n private readonly document = inject(DOCUMENT);\n\n /**\n * Access the viewport ruler.\n */\n private readonly viewportRuler = inject(ViewportRuler);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the disposable utilities\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input<NgpPopoverContent<T> | null>(null, {\n alias: 'ngpPopoverTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPopoverTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpPopoverTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpPopoverTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n readonly closeOnOutsideClick = input<boolean, BooleanInput>(this.config.closeOnOutsideClick, {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: booleanAttribute,\n });\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n readonly closeOnEscape = input<boolean, BooleanInput>(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: booleanAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the popover.\n * @default null\n */\n readonly context = input<T | null>(null, {\n alias: 'ngpPopoverTriggerContext',\n });\n\n /**\n * Store the popover view ref.\n */\n protected readonly viewRef = signal<ComponentRef<unknown> | EmbeddedViewRef<void> | null>(null);\n\n /**\n * Determines if the popover is open.\n */\n readonly open = computed(() => this.viewRef() !== null);\n\n /**\n * Derive the popover middleware from the provided configuration.\n */\n private readonly middleware = computed(() => {\n const middleware: Middleware[] = [offset(this.state.offset()), shift()];\n\n if (this.state.flip()) {\n middleware.push(flip());\n }\n\n return middleware;\n });\n\n /**\n * Store the computed position of the popover.\n * @internal\n */\n readonly position = signal<{ x: number; y: number }>({\n x: 0,\n y: 0,\n });\n\n /**\n * @internal\n * Store the trigger width.\n */\n readonly width = signal<number | null>(null);\n\n /**\n * The dispose function to stop computing the position of the popover.\n */\n private dispose?: () => void;\n\n /**\n * A document-wide click listener that checks if the click\n * occurred outside of the popover and trigger elements.\n */\n private documentClickListener?: (event: MouseEvent) => void;\n\n /**\n * Store the popover instance.\n * @internal\n */\n private popoverInstance: NgpPopover | null = null;\n\n /**\n * Get the scroll strategy based on the configuration.\n */\n private readonly scrollStrategy = computed(() =>\n this.state.scrollBehavior() === 'block'\n ? new BlockScrollStrategy(this.viewportRuler, this.document)\n : new NoopScrollStrategy(),\n );\n\n /**\n * @internal\n * Register any child popover to the stack.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly stack: NgpPopoverTrigger<any>[] = [];\n\n /**\n * @internal\n * The timeout to open the popover.\n */\n private openTimeout?: () => void;\n\n /**\n * @internal\n * The timeout to close the popover.\n */\n private closeTimeout?: () => void;\n\n /**\n * The popover trigger state.\n */\n readonly state = popoverTriggerState<NgpPopoverTrigger<T>>(this);\n\n constructor() {\n // if the trigger has a parent trigger then register it to the stack\n this.parentTrigger()?.stack.push(this);\n\n // update the width of the trigger when it resizes\n fromResizeEvent(this.trigger.nativeElement)\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.width.set(this.trigger.nativeElement.offsetWidth));\n }\n\n ngOnDestroy(): void {\n // remove the trigger from the parent trigger's stack\n this.parentTrigger()?.stack.splice(this.parentTrigger()?.stack.indexOf(this), 1);\n\n this.destroyPopover();\n }\n\n protected toggleOpenState(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the popover is open then hide it\n if (this.open()) {\n this.hide(origin);\n } else {\n this.show(origin);\n }\n }\n\n /**\n * Show the popover.\n */\n show(origin: FocusOrigin): void {\n // if closing is in progress then clear the timeout to stop the popover from closing\n this.closeTimeout?.();\n\n // if the trigger is disabled or the popover is already open then do not show the popover\n if (this.state.disabled() || this.openTimeout) {\n return;\n }\n\n this.openTimeout = this.disposables.setTimeout(() => {\n this.openTimeout = undefined;\n this.createPopover(origin);\n }, this.state.showDelay());\n\n // Add document click listener to detect outside clicks\n if (this.state.closeOnOutsideClick()) {\n this.documentClickListener = this.onDocumentClick.bind(this);\n this.document.addEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Hide the popover.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // if opening is in progress then clear the timeout to stop the popover from opening\n this.openTimeout?.();\n\n // if the trigger is disabled or the popover is not open then do not hide the popover\n if (this.state.disabled() || this.closeTimeout || !this.open()) {\n return;\n }\n\n // close all child popovers\n for (const child of this.stack) {\n child.hide(origin);\n }\n\n this.closeTimeout = this.disposables.setTimeout(async () => {\n this.closeTimeout = undefined;\n\n await this.destroyPopover();\n // ensure the trigger is focused after closing the popover\n this.disposables.setTimeout(() => this.focusTrigger(origin), 0);\n }, this.state.hideDelay());\n }\n\n private onDocumentClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n const viewRef = this.viewRef();\n\n // get the popover element\n const popoverElement =\n viewRef instanceof ComponentRef ? viewRef.location.nativeElement : viewRef?.rootNodes[0];\n\n // Check if the click is outside the trigger or the popover\n const isOutside =\n !this.trigger.nativeElement.contains(target) && !popoverElement?.contains(target);\n\n // Determine if this is a click inside another popover\n\n if (isOutside) {\n // Close the popover\n this.hide('mouse');\n }\n }\n\n private createPopover(origin: FocusOrigin): void {\n // clear the open timeout\n this.openTimeout = undefined;\n\n const popover = this.state.popover();\n\n let portal: TemplatePortal | ComponentPortal<unknown>;\n\n // Create a new inject with the tooltip context\n const injector = Injector.create({\n parent: this.injector,\n providers: [providePopoverContext(this.state.context())],\n });\n\n if (popover instanceof TemplateRef) {\n portal = new TemplatePortal<NgpPopoverTemplateContext<T>>(\n popover,\n this.viewContainerRef,\n { $implicit: this.state.context() } as NgpPopoverTemplateContext<T>,\n injector,\n );\n } else if (popover instanceof Type) {\n portal = new ComponentPortal(popover, this.viewContainerRef, injector);\n } else {\n throw new Error('Popover must be either a TemplateRef or a ComponentType');\n }\n\n const domOutlet = new DomPortalOutlet(\n this.state.container() ?? this.document.body,\n undefined,\n undefined,\n injector,\n );\n\n const viewRef = domOutlet.attach(portal);\n this.viewRef.set(viewRef);\n\n let outletElement: HTMLElement | null = null;\n\n if (viewRef instanceof ComponentRef) {\n viewRef.changeDetectorRef.detectChanges();\n outletElement = viewRef.location.nativeElement;\n } else if (viewRef) {\n viewRef.detectChanges();\n outletElement = viewRef.rootNodes[0] as HTMLElement;\n }\n\n if (!outletElement) {\n throw new Error('Outlet element is not available.');\n }\n\n // determine if the popover is fixed or absolute\n const strategy = getComputedStyle(outletElement).position === 'fixed' ? 'fixed' : 'absolute';\n\n this.dispose = autoUpdate(this.trigger.nativeElement, outletElement, async () => {\n const position = await computePosition(this.trigger.nativeElement, outletElement, {\n placement: this.state.placement(),\n middleware: this.middleware(),\n strategy,\n });\n\n this.position.set({ x: position.x, y: position.y });\n viewRef?.detectChanges();\n });\n\n // activate the scroll strategy\n this.scrollStrategy().enable();\n\n // set the initial focus to the first tabbable element in the popover\n this.popoverInstance?.setInitialFocus(origin);\n }\n\n private async destroyPopover(): Promise<void> {\n // clear the close timeout\n this.closeTimeout = undefined;\n\n await this.exitAnimationState.exit();\n\n const viewRef = this.viewRef();\n\n // if the view is already destroyed then do not destroy it again\n const isDestroyed = viewRef instanceof ComponentRef ? false : viewRef?.destroyed;\n\n if (viewRef && !isDestroyed) {\n // destroy the view ref\n viewRef.destroy();\n }\n\n this.viewRef.set(null);\n this.dispose?.();\n\n // deactivate the scroll strategy\n this.scrollStrategy().disable();\n\n // Remove the document click listener when the popover is hidden\n if (this.documentClickListener) {\n this.document.removeEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Handle escape key press to close the popover.\n */\n protected handleEscapeKey(): void {\n if (this.state.closeOnEscape()) {\n this.hide('keyboard');\n }\n }\n\n private focusTrigger(origin: FocusOrigin): void {\n this.focusMonitor.focusVia(this.trigger.nativeElement, origin);\n }\n\n /**\n * Set the popover instance.\n * @internal\n */\n setPopover(instance: NgpPopover): void {\n this.popoverInstance = instance;\n }\n}\n\ntype NgpPopoverTemplateContext<T> = {\n $implicit: T;\n};\ntype NgpPopoverContent<T> = TemplateRef<NgpPopoverTemplateContext<T>> | Type<unknown>;\n","import type { Placement } from '@floating-ui/dom';\n\nexport function getTransformOrigin(placement: Placement): string {\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","import { FocusMonitor, FocusOrigin, InteractivityChecker } from '@angular/cdk/a11y';\nimport { computed, Directive, inject } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { injectElementRef, NgpExitAnimation } from 'ng-primitives/internal';\nimport { injectPopoverTriggerState } from '../popover-trigger/popover-trigger-state';\nimport { getTransformOrigin } from '../utils/transform-origin';\n\n/**\n * Apply the `ngpPopover` directive to an element that represents the popover. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpPopover]',\n exportAs: 'ngpPopover',\n hostDirectives: [NgpFocusTrap, NgpExitAnimation],\n host: {\n role: 'menu',\n '[style.left.px]': 'x()',\n '[style.top.px]': 'y()',\n '[style.--ngp-popover-trigger-width.px]': 'trigger().width()',\n '[style.--ngp-popover-transform-origin]': 'transformOrigin()',\n '(keydown.escape)': 'trigger().handleEscapeKey()',\n },\n})\nexport class NgpPopover {\n /**\n * Access the popover element.\n */\n private readonly popover = injectElementRef();\n\n /**\n * Access the interactivity checker.\n */\n private readonly interactivity = inject(InteractivityChecker);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the trigger instance.\n */\n protected readonly trigger = injectPopoverTriggerState();\n\n /**\n * Compute the x position of the popover.\n */\n protected readonly x = computed(() => this.trigger().position().x);\n\n /**\n * Compute the y position of the popover.\n */\n protected readonly y = computed(() => this.trigger().position().y);\n\n /**\n * Derive the transform origin of the popover.\n */\n protected readonly transformOrigin = computed(() =>\n getTransformOrigin(this.trigger().placement()),\n );\n\n constructor() {\n this.trigger().setPopover(this);\n }\n\n /**\n * Focus the first tabbable element inside the popover.\n * If no tabbable element is found, focus the popover itself.\n * @internal\n */\n setInitialFocus(origin: FocusOrigin): void {\n // use a tree walker to find the first tabbable child\n const treeWalker = document.createTreeWalker(\n this.popover.nativeElement,\n NodeFilter.SHOW_ELEMENT,\n {\n acceptNode: node =>\n node instanceof HTMLElement && this.interactivity.isTabbable(node)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP,\n },\n );\n\n const tabbableNode = treeWalker.nextNode() as HTMLElement | null;\n\n if (tabbableNode) {\n this.focusMonitor.focusVia(tabbableNode, origin);\n } else {\n // if no tabbable child is found, focus the popover element itself\n this.popover.nativeElement.focus();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA2DO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,cAAc,EAAE,YAAY;CAC7B;AAEM,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC;AAElG;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAAiC,EAAA;IACpE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,QAAQ,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,EAAE;AACjD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,oBAAoB;AAClF;;MC3Fa,sBAAsB,GAAG,IAAI,cAAc,CAAU,wBAAwB;AAE1F;;AAEG;SACa,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,sBAAsB,CAAM;AAC5C;AAEA;;AAEG;AACG,SAAU,qBAAqB,CAAI,OAAU,EAAA;IACjD,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,E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Q,EAAE,YAAY;AACtB,oBAAA,cAAc,EAAE,CAAC,YAAY,EAAE,gBAAgB,CAAC;AAChD,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,iBAAiB,EAAE,KAAK;AACxB,wBAAA,gBAAgB,EAAE,KAAK;AACvB,wBAAA,wCAAwC,EAAE,mBAAmB;AAC7D,wBAAA,wCAAwC,EAAE,mBAAmB;AAC7D,wBAAA,kBAAkB,EAAE,6BAA6B;AAClD,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ng-primitives-popover.mjs","sources":["../../../../packages/ng-primitives/popover/src/config/popover-config.ts","../../../../packages/ng-primitives/popover/src/popover/popover-token.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger-state.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger.ts","../../../../packages/ng-primitives/popover/src/utils/transform-origin.ts","../../../../packages/ng-primitives/popover/src/popover/popover.ts","../../../../packages/ng-primitives/popover/src/ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * Define the delay before the popover is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the popover should be attached.\n * @default document.body\n */\n container: HTMLElement | null;\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n closeOnOutsideClick: boolean;\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n closeOnEscape: boolean;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block';\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: null,\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n};\n\nexport const NgpPopoverConfigToken = new InjectionToken<NgpPopoverConfig>('NgpPopoverConfigToken');\n\n/**\n * Provide the default Popover configuration\n * @param config The Popover configuration\n * @returns The provider\n */\nexport function providePopoverConfig(config: Partial<NgpPopoverConfig>): Provider[] {\n return [\n {\n provide: NgpPopoverConfigToken,\n useValue: { ...defaultPopoverConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Popover configuration\n * @returns The global Popover configuration\n */\nexport function injectPopoverConfig(): NgpPopoverConfig {\n return inject(NgpPopoverConfigToken, { optional: true }) ?? defaultPopoverConfig;\n}\n","import { inject, InjectionToken, ValueProvider } from '@angular/core';\n\nexport const NgpPopoverContextToken = new InjectionToken<unknown>('NgpPopoverContextToken');\n\n/**\n * Inject the Popover context\n */\nexport function injectPopoverContext<T>(): T {\n return inject(NgpPopoverContextToken) as T;\n}\n\n/**\n * Provide the Popover context\n */\nexport function providePopoverContext<T>(context: T): ValueProvider {\n return { provide: NgpPopoverContextToken, useValue: context };\n}\n","import { InjectOptions, Signal } from '@angular/core';\nimport {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n State,\n} from 'ng-primitives/state';\nimport type { NgpPopoverTrigger } from './popover-trigger';\n\n/**\n * The state token for the PopoverTrigger primitive.\n */\nexport const NgpPopoverTriggerStateToken = createStateToken<NgpPopoverTrigger>('PopoverTrigger');\n\n/**\n * Provides the PopoverTrigger state.\n */\nexport const providePopoverTriggerState = createStateProvider(NgpPopoverTriggerStateToken);\n\n/**\n * Injects the PopoverTrigger state.\n */\nexport const injectPopoverTriggerState = createStateInjector<NgpPopoverTrigger>(\n NgpPopoverTriggerStateToken,\n) as <T>(options?: InjectOptions) => Signal<State<NgpPopoverTrigger<T>>>;\n\n/**\n * The PopoverTrigger state registration function.\n */\nexport const popoverTriggerState = createState(NgpPopoverTriggerStateToken);\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { BlockScrollStrategy, NoopScrollStrategy, ViewportRuler } from '@angular/cdk/overlay';\nimport { ComponentPortal, DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n booleanAttribute,\n ComponentRef,\n computed,\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n signal,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n autoUpdate,\n computePosition,\n flip,\n Middleware,\n offset,\n Placement,\n shift,\n} from '@floating-ui/dom';\nimport {\n injectElementRef,\n injectExitAnimationManager,\n provideExitAnimationManager,\n} from 'ng-primitives/internal';\nimport { fromResizeEvent } from 'ng-primitives/resize';\nimport { injectDisposables } from 'ng-primitives/utils';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport type { NgpPopover } from '../popover/popover';\nimport { providePopoverContext } from '../popover/popover-token';\nimport {\n injectPopoverTriggerState,\n popoverTriggerState,\n providePopoverTriggerState,\n} from './popover-trigger-state';\n\n/**\n * Apply the `ngpPopoverTrigger` directive to an element that triggers the popover to show.\n */\n@Directive({\n selector: '[ngpPopoverTrigger]',\n exportAs: 'ngpPopoverTrigger',\n providers: [providePopoverTriggerState({ inherit: false }), provideExitAnimationManager()],\n host: {\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.data-placement]': 'state.placement()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '(click)': 'toggleOpenState($event)',\n '(document:keydown.escape)': 'handleEscapeKey()',\n },\n})\nexport class NgpPopoverTrigger<T = null> implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = injectElementRef();\n\n /**\n * Access the exit animation state.\n */\n private readonly exitAnimationState = injectExitAnimationManager();\n\n /**\n * Inject the parent popover trigger if available.\n */\n private readonly parentTrigger = injectPopoverTriggerState<T>({\n skipSelf: true,\n optional: true,\n });\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the document.\n */\n private readonly document = inject(DOCUMENT);\n\n /**\n * Access the viewport ruler.\n */\n private readonly viewportRuler = inject(ViewportRuler);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the disposable utilities\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input<NgpPopoverContent<T> | null>(null, {\n alias: 'ngpPopoverTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPopoverTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpPopoverTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpPopoverTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n readonly closeOnOutsideClick = input<boolean, BooleanInput>(this.config.closeOnOutsideClick, {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: booleanAttribute,\n });\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n readonly closeOnEscape = input<boolean, BooleanInput>(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: booleanAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the popover.\n * @default null\n */\n readonly context = input<T | null>(null, {\n alias: 'ngpPopoverTriggerContext',\n });\n\n /**\n * Store the popover view ref.\n */\n protected readonly viewRef = signal<ComponentRef<unknown> | EmbeddedViewRef<void> | null>(null);\n\n /**\n * Determines if the popover is open.\n */\n readonly open = computed(() => this.viewRef() !== null);\n\n /**\n * Derive the popover middleware from the provided configuration.\n */\n private readonly middleware = computed(() => {\n const middleware: Middleware[] = [offset(this.state.offset()), shift()];\n\n if (this.state.flip()) {\n middleware.push(flip());\n }\n\n return middleware;\n });\n\n /**\n * Store the computed position of the popover.\n * @internal\n */\n readonly position = signal<{ x: number; y: number }>({\n x: 0,\n y: 0,\n });\n\n /**\n * @internal\n * Store the trigger width.\n */\n readonly width = signal<number | null>(null);\n\n /**\n * The dispose function to stop computing the position of the popover.\n */\n private dispose?: () => void;\n\n /**\n * A document-wide click listener that checks if the click\n * occurred outside of the popover and trigger elements.\n */\n private documentClickListener?: (event: MouseEvent) => void;\n\n /**\n * Store the popover instance.\n * @internal\n */\n private popoverInstance: NgpPopover | null = null;\n\n /**\n * Get the scroll strategy based on the configuration.\n */\n private readonly scrollStrategy = computed(() =>\n this.state.scrollBehavior() === 'block'\n ? new BlockScrollStrategy(this.viewportRuler, this.document)\n : new NoopScrollStrategy(),\n );\n\n /**\n * @internal\n * Register any child popover to the stack.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly stack: NgpPopoverTrigger<any>[] = [];\n\n /**\n * @internal\n * The timeout to open the popover.\n */\n private openTimeout?: () => void;\n\n /**\n * @internal\n * The timeout to close the popover.\n */\n private closeTimeout?: () => void;\n\n /**\n * The popover trigger state.\n */\n readonly state = popoverTriggerState<NgpPopoverTrigger<T>>(this);\n\n constructor() {\n // if the trigger has a parent trigger then register it to the stack\n this.parentTrigger()?.stack.push(this);\n\n // update the width of the trigger when it resizes\n fromResizeEvent(this.trigger.nativeElement)\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.width.set(this.trigger.nativeElement.offsetWidth));\n }\n\n ngOnDestroy(): void {\n // remove the trigger from the parent trigger's stack\n this.parentTrigger()?.stack.splice(this.parentTrigger()?.stack.indexOf(this), 1);\n\n this.destroyPopover();\n }\n\n protected toggleOpenState(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the popover is open then hide it\n if (this.open()) {\n this.hide(origin);\n } else {\n this.show(origin);\n }\n }\n\n /**\n * Show the popover.\n */\n show(origin: FocusOrigin): void {\n // if closing is in progress then clear the timeout to stop the popover from closing\n this.closeTimeout?.();\n\n // if the trigger is disabled or the popover is already open then do not show the popover\n if (this.state.disabled() || this.openTimeout) {\n return;\n }\n\n this.openTimeout = this.disposables.setTimeout(() => {\n this.openTimeout = undefined;\n this.createPopover(origin);\n }, this.state.showDelay());\n\n // Add document click listener to detect outside clicks\n if (this.state.closeOnOutsideClick()) {\n this.documentClickListener = this.onDocumentClick.bind(this);\n this.document.addEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Hide the popover.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // if opening is in progress then clear the timeout to stop the popover from opening\n this.openTimeout?.();\n\n // if the trigger is disabled or the popover is not open then do not hide the popover\n if (this.state.disabled() || this.closeTimeout || !this.open()) {\n return;\n }\n\n // close all child popovers\n for (const child of this.stack) {\n child.hide(origin);\n }\n\n // disable the focus trap in the popover to prevent it trying to return focus to the popover\n // when the popover is closed/closing\n this.popoverInstance?.focusTrap().disabled.set(true);\n\n // ensure the trigger is focused after closing the popover\n this.focusTrigger(origin);\n\n this.closeTimeout = this.disposables.setTimeout(async () => {\n this.closeTimeout = undefined;\n\n await this.destroyPopover();\n }, this.state.hideDelay());\n }\n\n private onDocumentClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n const viewRef = this.viewRef();\n\n // get the popover element\n const popoverElement =\n viewRef instanceof ComponentRef ? viewRef.location.nativeElement : viewRef?.rootNodes[0];\n\n // Check if the click is outside the trigger or the popover\n const isOutside =\n !this.trigger.nativeElement.contains(target) && !popoverElement?.contains(target);\n\n // Determine if this is a click inside another popover\n\n if (isOutside) {\n // Close the popover\n this.hide('mouse');\n }\n }\n\n private createPopover(origin: FocusOrigin): void {\n // clear the open timeout\n this.openTimeout = undefined;\n\n const popover = this.state.popover();\n\n let portal: TemplatePortal | ComponentPortal<unknown>;\n\n // Create a new inject with the tooltip context\n const injector = Injector.create({\n parent: this.injector,\n providers: [providePopoverContext(this.state.context())],\n });\n\n if (popover instanceof TemplateRef) {\n portal = new TemplatePortal<NgpPopoverTemplateContext<T>>(\n popover,\n this.viewContainerRef,\n { $implicit: this.state.context() } as NgpPopoverTemplateContext<T>,\n injector,\n );\n } else if (popover instanceof Type) {\n portal = new ComponentPortal(popover, this.viewContainerRef, injector);\n } else {\n throw new Error('Popover must be either a TemplateRef or a ComponentType');\n }\n\n const domOutlet = new DomPortalOutlet(\n this.state.container() ?? this.document.body,\n undefined,\n undefined,\n injector,\n );\n\n const viewRef = domOutlet.attach(portal);\n this.viewRef.set(viewRef);\n\n let outletElement: HTMLElement | null = null;\n\n if (viewRef instanceof ComponentRef) {\n viewRef.changeDetectorRef.detectChanges();\n outletElement = viewRef.location.nativeElement;\n } else if (viewRef) {\n viewRef.detectChanges();\n outletElement = viewRef.rootNodes[0] as HTMLElement;\n }\n\n if (!outletElement) {\n throw new Error('Outlet element is not available.');\n }\n\n // determine if the popover is fixed or absolute\n const strategy = getComputedStyle(outletElement).position === 'fixed' ? 'fixed' : 'absolute';\n\n this.dispose = autoUpdate(this.trigger.nativeElement, outletElement, async () => {\n const position = await computePosition(this.trigger.nativeElement, outletElement, {\n placement: this.state.placement(),\n middleware: this.middleware(),\n strategy,\n });\n\n this.position.set({ x: position.x, y: position.y });\n viewRef?.detectChanges();\n });\n\n // activate the scroll strategy\n this.scrollStrategy().enable();\n\n // set the initial focus to the first tabbable element in the popover\n this.popoverInstance?.setInitialFocus(origin);\n }\n\n private async destroyPopover(): Promise<void> {\n // clear the close timeout\n this.closeTimeout = undefined;\n\n const viewRef = this.viewRef();\n\n if (!viewRef) {\n return;\n }\n\n // we remove this to prevent the popover from being destroyed twice\n // because ngOnDestroy will be called on the viewRef\n // when the popover is destroyed triggering this method again\n this.viewRef.set(null);\n\n await this.exitAnimationState.exit();\n\n // destroy the view ref\n viewRef.destroy();\n\n this.dispose?.();\n\n // deactivate the scroll strategy\n this.scrollStrategy().disable();\n\n // Remove the document click listener when the popover is hidden\n if (this.documentClickListener) {\n this.document.removeEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Handle escape key press to close the popover.\n */\n protected handleEscapeKey(): void {\n if (this.state.closeOnEscape()) {\n this.hide('keyboard');\n }\n }\n\n private focusTrigger(origin: FocusOrigin): void {\n this.focusMonitor.focusVia(this.trigger.nativeElement, origin);\n }\n\n /**\n * Set the popover instance.\n * @internal\n */\n setPopover(instance: NgpPopover): void {\n this.popoverInstance = instance;\n }\n}\n\ntype NgpPopoverTemplateContext<T> = {\n $implicit: T;\n};\ntype NgpPopoverContent<T> = TemplateRef<NgpPopoverTemplateContext<T>> | Type<unknown>;\n","import type { Placement } from '@floating-ui/dom';\n\nexport function getTransformOrigin(placement: Placement): string {\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","import { FocusMonitor, FocusOrigin, InteractivityChecker } from '@angular/cdk/a11y';\nimport { computed, Directive, inject } from '@angular/core';\nimport { injectFocusTrapState, NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { injectElementRef, NgpExitAnimation } from 'ng-primitives/internal';\nimport { injectPopoverTriggerState } from '../popover-trigger/popover-trigger-state';\nimport { getTransformOrigin } from '../utils/transform-origin';\n\n/**\n * Apply the `ngpPopover` directive to an element that represents the popover. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpPopover]',\n exportAs: 'ngpPopover',\n hostDirectives: [NgpFocusTrap, NgpExitAnimation],\n host: {\n role: 'menu',\n '[style.left.px]': 'x()',\n '[style.top.px]': 'y()',\n '[style.--ngp-popover-trigger-width.px]': 'trigger().width()',\n '[style.--ngp-popover-transform-origin]': 'transformOrigin()',\n '(keydown.escape)': 'trigger().handleEscapeKey()',\n },\n})\nexport class NgpPopover {\n /**\n * Access the popover element.\n */\n private readonly popover = injectElementRef();\n\n /**\n * Access the interactivity checker.\n */\n private readonly interactivity = inject(InteractivityChecker);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the focus trap.\n * @internal\n */\n readonly focusTrap = injectFocusTrapState();\n\n /**\n * Access the trigger instance.\n */\n protected readonly trigger = injectPopoverTriggerState();\n\n /**\n * Compute the x position of the popover.\n */\n protected readonly x = computed(() => this.trigger().position().x);\n\n /**\n * Compute the y position of the popover.\n */\n protected readonly y = computed(() => this.trigger().position().y);\n\n /**\n * Derive the transform origin of the popover.\n */\n protected readonly transformOrigin = computed(() =>\n getTransformOrigin(this.trigger().placement()),\n );\n\n constructor() {\n this.trigger().setPopover(this);\n }\n\n /**\n * Focus the first tabbable element inside the popover.\n * If no tabbable element is found, focus the popover itself.\n * @internal\n */\n setInitialFocus(origin: FocusOrigin): void {\n // use a tree walker to find the first tabbable child\n const treeWalker = document.createTreeWalker(\n this.popover.nativeElement,\n NodeFilter.SHOW_ELEMENT,\n {\n acceptNode: node =>\n node instanceof HTMLElement && this.interactivity.isTabbable(node)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP,\n },\n );\n\n const tabbableNode = treeWalker.nextNode() as HTMLElement | null;\n\n if (tabbableNode) {\n this.focusMonitor.focusVia(tabbableNode, origin);\n } else {\n // if no tabbable child is found, focus the popover element itself\n this.popover.nativeElement.focus();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA2DO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EA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ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
34
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
33
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgressIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
34
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpProgressIndicator, isStandalone: true, selector: "[ngpProgressIndicator]", host: { properties: { "attr.data-state": "state().dataState()", "attr.data-value": "state().value()", "attr.data-max": "state().max()" } }, ngImport: i0 }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgressIndicator, decorators: [{
|
|
37
37
|
type: Directive,
|
|
38
38
|
args: [{
|
|
39
39
|
selector: '[ngpProgressIndicator]',
|
|
@@ -94,10 +94,10 @@ class NgpProgress {
|
|
|
94
94
|
*/
|
|
95
95
|
this.state = progressState(this);
|
|
96
96
|
}
|
|
97
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
98
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
97
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
98
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpProgress, isStandalone: true, selector: "[ngpProgress]", inputs: { value: { classPropertyName: "value", publicName: "ngpProgressValue", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpProgressMax", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "ngpProgressValueLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-valuemax": "state.max()", "attr.aria-valuemin": "0", "attr.aria-valuenow": "state.value()", "attr.aria-valuetext": "label()", "attr.data-state": "dataState()", "attr.data-value": "state.value()", "attr.data-max": "state.max()" } }, providers: [provideProgressState()], ngImport: i0 }); }
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgress, decorators: [{
|
|
101
101
|
type: Directive,
|
|
102
102
|
args: [{
|
|
103
103
|
selector: '[ngpProgress]',
|
|
@@ -88,10 +88,10 @@ class NgpRadioGroup {
|
|
|
88
88
|
this.state.value.set(value);
|
|
89
89
|
this.valueChange.emit(value);
|
|
90
90
|
}
|
|
91
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
92
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
91
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
92
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpRadioGroup, isStandalone: true, selector: "[ngpRadioGroup]", inputs: { value: { classPropertyName: "value", publicName: "ngpRadioGroupValue", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRadioGroupDisabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpRadioGroupOrientation", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "ngpRadioGroupCompareWith", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpRadioGroupValueChange" }, host: { attributes: { "role": "radiogroup" }, properties: { "attr.aria-orientation": "state.orientation()", "attr.data-orientation": "state.orientation()", "attr.data-disabled": "state.disabled() ? \"\" : null" } }, providers: [provideRadioGroupState()], hostDirectives: [{ directive: i1.NgpRovingFocusGroup, inputs: ["ngpRovingFocusGroupOrientation", "ngpRadioGroupOrientation", "ngpRovingFocusGroupDisabled", "ngpRadioGroupDisabled"] }, { directive: i2.NgpFormControl }], ngImport: i0 }); }
|
|
93
93
|
}
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRadioGroup, decorators: [{
|
|
95
95
|
type: Directive,
|
|
96
96
|
args: [{
|
|
97
97
|
selector: '[ngpRadioGroup]',
|
|
@@ -150,10 +150,10 @@ class NgpRadioIndicator {
|
|
|
150
150
|
*/
|
|
151
151
|
this.checked = computed(() => this.radioGroupState().value() === this.radioItemState().value());
|
|
152
152
|
}
|
|
153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
154
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
153
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
154
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpRadioIndicator, isStandalone: true, selector: "[ngpRadioIndicator]", host: { properties: { "attr.data-checked": "checked() ? \"\" : null", "attr.data-disabled": "radioItemState().disabled() ? \"\" : null" } }, hostDirectives: [{ directive: i2$1.NgpHover }, { directive: i2$1.NgpPress }], ngImport: i0 }); }
|
|
155
155
|
}
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
156
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRadioIndicator, decorators: [{
|
|
157
157
|
type: Directive,
|
|
158
158
|
args: [{
|
|
159
159
|
selector: '[ngpRadioIndicator]',
|
|
@@ -209,10 +209,10 @@ class NgpRadioItem {
|
|
|
209
209
|
onClick() {
|
|
210
210
|
this.radioGroupState().select(this.value());
|
|
211
211
|
}
|
|
212
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
213
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
212
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRadioItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
213
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpRadioItem, isStandalone: true, selector: "[ngpRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "ngpRadioItemValue", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRadioItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "focus": "onFocus()", "click": "onClick()" }, properties: { "attr.aria-checked": "checked() ? \"true\" : \"false\"", "attr.data-disabled": "state.disabled() ? \"\" : null", "attr.data-checked": "checked() ? \"\" : null" } }, providers: [provideRadioItemState()], hostDirectives: [{ directive: i1.NgpRovingFocusItem }, { directive: i2$1.NgpHover }, { directive: i2$1.NgpFocusVisible }, { directive: i2$1.NgpPress }], ngImport: i0 }); }
|
|
214
214
|
}
|
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRadioItem, decorators: [{
|
|
216
216
|
type: Directive,
|
|
217
217
|
args: [{
|
|
218
218
|
selector: '[ngpRadioItem]',
|
|
@@ -66,10 +66,10 @@ class NgpResize {
|
|
|
66
66
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
67
67
|
.subscribe(event => this.ngZone.run(() => this.didResize.emit(event)));
|
|
68
68
|
}
|
|
69
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
70
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
69
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpResize, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
70
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpResize, isStandalone: true, selector: "[ngpResize]", outputs: { didResize: "ngpResize" }, ngImport: i0 }); }
|
|
71
71
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpResize, decorators: [{
|
|
73
73
|
type: Directive,
|
|
74
74
|
args: [{
|
|
75
75
|
selector: '[ngpResize]',
|
|
@@ -282,10 +282,10 @@ class NgpRovingFocusGroup {
|
|
|
282
282
|
break;
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
286
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
285
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRovingFocusGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
286
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpRovingFocusGroup, isStandalone: true, selector: "[ngpRovingFocusGroup]", inputs: { orientation: { classPropertyName: "orientation", publicName: "ngpRovingFocusGroupOrientation", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "ngpRovingFocusGroupWrap", isSignal: true, isRequired: false, transformFunction: null }, homeEnd: { classPropertyName: "homeEnd", publicName: "ngpRovingFocusGroupHomeEnd", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpRovingFocusGroupDisabled", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideRovingFocusGroup(NgpRovingFocusGroup), provideRovingFocusGroupState()], exportAs: ["ngpRovingFocusGroup"], ngImport: i0 }); }
|
|
287
287
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRovingFocusGroup, decorators: [{
|
|
289
289
|
type: Directive,
|
|
290
290
|
args: [{
|
|
291
291
|
selector: '[ngpRovingFocusGroup]',
|
|
@@ -361,10 +361,10 @@ class NgpRovingFocusItem {
|
|
|
361
361
|
focus(origin) {
|
|
362
362
|
this.focusMonitor.focusVia(this.elementRef, origin);
|
|
363
363
|
}
|
|
364
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
365
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
364
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRovingFocusItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
365
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpRovingFocusItem, isStandalone: true, selector: "[ngpRovingFocusItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpRovingFocusItemDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)", "click": "activate()" }, properties: { "attr.tabindex": "tabindex()" } }, exportAs: ["ngpRovingFocusItem"], ngImport: i0 }); }
|
|
366
366
|
}
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
367
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpRovingFocusItem, decorators: [{
|
|
368
368
|
type: Directive,
|
|
369
369
|
args: [{
|
|
370
370
|
selector: '[ngpRovingFocusItem]',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { HostListener, Directive, inject, DestroyRef, signal, computed } from '@angular/core';
|
|
3
3
|
import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { fromEvent } from 'rxjs';
|
|
@@ -37,10 +37,10 @@ class NgpSearchClear {
|
|
|
37
37
|
clear() {
|
|
38
38
|
this.search().clear();
|
|
39
39
|
}
|
|
40
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
41
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
40
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSearchClear, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
41
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpSearchClear, isStandalone: true, selector: "[ngpSearchClear]", host: { listeners: { "click": "clear()" }, properties: { "tabindex": "-1", "attr.data-empty": "search().empty() ? \"\" : null" } }, exportAs: ["ngpSearchClear"], ngImport: i0 }); }
|
|
42
42
|
}
|
|
43
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSearchClear, decorators: [{
|
|
44
44
|
type: Directive,
|
|
45
45
|
args: [{
|
|
46
46
|
selector: '[ngpSearchClear]',
|
|
@@ -102,10 +102,10 @@ class NgpSearch {
|
|
|
102
102
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
103
103
|
.subscribe(() => this.value.set(input.value));
|
|
104
104
|
}
|
|
105
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
106
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSearch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
106
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpSearch, isStandalone: true, selector: "[ngpSearch]", host: { listeners: { "keydown.escape": "clear()" }, properties: { "attr.data-empty": "empty() ? \"\" : null" } }, providers: [provideSearchState()], exportAs: ["ngpSearch"], ngImport: i0 }); }
|
|
107
107
|
}
|
|
108
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSearch, decorators: [{
|
|
109
109
|
type: Directive,
|
|
110
110
|
args: [{
|
|
111
111
|
selector: '[ngpSearch]',
|
|
@@ -47,10 +47,10 @@ class NgpSelect {
|
|
|
47
47
|
});
|
|
48
48
|
syncFormControl({ disabled: this.state.disabled });
|
|
49
49
|
}
|
|
50
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
51
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
50
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSelect, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
51
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpSelect, isStandalone: true, selector: "select[ngpSelect]", inputs: { disabled: { classPropertyName: "disabled", publicName: "ngpSelectDisabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "disabled() || null" } }, providers: [provideSelectState()], exportAs: ["ngpSelect"], hostDirectives: [{ directive: i1.NgpFormControl }], ngImport: i0 }); }
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSelect, decorators: [{
|
|
54
54
|
type: Directive,
|
|
55
55
|
args: [{
|
|
56
56
|
selector: 'select[ngpSelect]',
|
|
@@ -36,10 +36,10 @@ class NgpSeparator {
|
|
|
36
36
|
alias: 'ngpSeparatorOrientation',
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
40
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
39
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
40
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpSeparator, isStandalone: true, selector: "[ngpSeparator]", inputs: { orientation: { classPropertyName: "orientation", publicName: "ngpSeparatorOrientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "separator" }, properties: { "attr.aria-orientation": "orientation()", "attr.data-orientation": "orientation()" } }, exportAs: ["ngpSeparator"], ngImport: i0 }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSeparator, decorators: [{
|
|
43
43
|
type: Directive,
|
|
44
44
|
args: [{
|
|
45
45
|
selector: '[ngpSeparator]',
|
|
@@ -32,10 +32,10 @@ class NgpSliderRange {
|
|
|
32
32
|
*/
|
|
33
33
|
this.sliderState = injectSliderState();
|
|
34
34
|
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
36
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSliderRange, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
36
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpSliderRange, isStandalone: true, selector: "[ngpSliderRange]", host: { properties: { "attr.data-orientation": "sliderState().orientation()", "attr.data-disabled": "sliderState().disabled() ? \"\" : null", "style.width.%": "sliderState().orientation() === \"horizontal\" ? sliderState().percentage() : undefined", "style.height.%": "sliderState().orientation() === \"vertical\" ? sliderState().percentage() : undefined" } }, exportAs: ["ngpSliderRange"], ngImport: i0 }); }
|
|
37
37
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSliderRange, decorators: [{
|
|
39
39
|
type: Directive,
|
|
40
40
|
args: [{
|
|
41
41
|
selector: '[ngpSliderRange]',
|
|
@@ -130,10 +130,10 @@ class NgpSliderThumb {
|
|
|
130
130
|
break;
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
134
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
133
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSliderThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
134
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpSliderThumb, isStandalone: true, selector: "[ngpSliderThumb]", host: { attributes: { "role": "slider" }, listeners: { "pointerdown": "handlePointerDown($event)", "document:pointerup": "handlePointerUp()", "document:pointermove": "handlePointerMove($event)", "keydown": "handleKeydown($event)" }, properties: { "attr.aria-valuemin": "sliderState().min()", "attr.aria-valuemax": "sliderState().max()", "attr.aria-valuenow": "sliderState().value()", "attr.aria-orientation": "sliderState().orientation()", "tabindex": "sliderState().disabled() ? -1 : 0", "attr.data-orientation": "sliderState().orientation()", "attr.data-disabled": "sliderState().disabled() ? \"\" : null", "style.inset-inline-start.%": "sliderState().orientation() === \"horizontal\" ? sliderState().percentage() : undefined", "style.inset-block-start.%": "sliderState().orientation() === \"vertical\" ? sliderState().percentage() : undefined" } }, exportAs: ["ngpSliderThumb"], ngImport: i0 }); }
|
|
135
135
|
}
|
|
136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSliderThumb, decorators: [{
|
|
137
137
|
type: Directive,
|
|
138
138
|
args: [{
|
|
139
139
|
selector: '[ngpSliderThumb]',
|
|
@@ -197,10 +197,10 @@ class NgpSliderTrack {
|
|
|
197
197
|
this.sliderState().value.set(this.sliderState().min() + (this.sliderState().max() - this.sliderState().min()) * percentage);
|
|
198
198
|
this.sliderState().valueChange.emit(this.sliderState().value());
|
|
199
199
|
}
|
|
200
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
201
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
200
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSliderTrack, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
201
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpSliderTrack, isStandalone: true, selector: "[ngpSliderTrack]", host: { listeners: { "pointerdown": "handlePointerDown($event)" }, properties: { "attr.data-orientation": "sliderState().orientation()", "attr.data-disabled": "sliderState().disabled() ? \"\" : null" } }, exportAs: ["ngpSliderTrack"], ngImport: i0 }); }
|
|
202
202
|
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSliderTrack, decorators: [{
|
|
204
204
|
type: Directive,
|
|
205
205
|
args: [{
|
|
206
206
|
selector: '[ngpSliderTrack]',
|
|
@@ -283,10 +283,10 @@ class NgpSlider {
|
|
|
283
283
|
this.state = sliderState(this);
|
|
284
284
|
syncFormControl({ disabled: this.state.disabled });
|
|
285
285
|
}
|
|
286
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
287
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
286
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSlider, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
287
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpSlider, isStandalone: true, selector: "[ngpSlider]", inputs: { value: { classPropertyName: "value", publicName: "ngpSliderValue", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "ngpSliderMin", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpSliderMax", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "ngpSliderStep", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "ngpSliderOrientation", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpSliderDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "ngpSliderValueChange" }, host: { properties: { "attr.data-orientation": "state.orientation()" } }, providers: [provideSliderState()], exportAs: ["ngpSlider"], hostDirectives: [{ directive: i1.NgpFormControl }], ngImport: i0 }); }
|
|
288
288
|
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSlider, decorators: [{
|
|
290
290
|
type: Directive,
|
|
291
291
|
args: [{
|
|
292
292
|
selector: '[ngpSlider]',
|
|
@@ -38,10 +38,10 @@ class NgpSwitchThumb {
|
|
|
38
38
|
disabled: this.state().disabled,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
42
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
|
41
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
42
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpSwitchThumb, isStandalone: true, selector: "[ngpSwitchThumb]", host: { properties: { "attr.data-checked": "state().checked() ? \"\" : null", "attr.data-disabled": "state().disabled() ? \"\" : null" } }, ngImport: i0 }); }
|
|
43
43
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSwitchThumb, decorators: [{
|
|
45
45
|
type: Directive,
|
|
46
46
|
args: [{
|
|
47
47
|
selector: '[ngpSwitchThumb]',
|
|
@@ -119,10 +119,10 @@ class NgpSwitch {
|
|
|
119
119
|
this.toggle();
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
123
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
|
122
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSwitch, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
123
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpSwitch, isStandalone: true, selector: "[ngpSwitch]", inputs: { checked: { classPropertyName: "checked", publicName: "ngpSwitchChecked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpSwitchDisabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "ngpSwitchCheckedChange" }, host: { attributes: { "role": "switch" }, listeners: { "click": "toggle()", "keydown.space": "onKeyDown()" }, properties: { "attr.type": "isButton ? \"button\" : null", "attr.aria-checked": "state.checked()", "attr.data-checked": "state.checked() ? \"\" : null", "attr.disabled": "isButton && state.disabled() ? \"\" : null", "attr.data-disabled": "state.disabled() ? \"\" : null", "attr.aria-disabled": "state.disabled()", "attr.tabindex": "state.disabled() ? -1 : 0" } }, providers: [provideSwitchState()], exportAs: ["ngpSwitch"], hostDirectives: [{ directive: i1.NgpFormControl }], ngImport: i0 }); }
|
|
124
124
|
}
|
|
125
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpSwitch, decorators: [{
|
|
126
126
|
type: Directive,
|
|
127
127
|
args: [{
|
|
128
128
|
selector: '[ngpSwitch]',
|