{"version":3,"file":"eui-components-eui-popover.mjs","sources":["../../eui-popover/models/eui-popover-position.model.ts","../../eui-popover/directives/eui-popover-arrow-position.directive.ts","../../eui-popover/eui-popover.component.ts","../../eui-popover/eui-popover.component.html","../../eui-popover/index.ts","../../eui-popover/eui-components-eui-popover.ts"],"sourcesContent":["import { ConnectedOverlayPositionChange, ConnectionPositionPair } from '@angular/cdk/overlay';\n\n/**\n * Represents the four possible positions for a popover element.\n */\nexport type EuiPopoverPosition = 'top' | 'right' | 'bottom' | 'left';\n\n/**\n * Position configuration for a popover appearing above its origin element.\n * Centers the popover horizontally relative to the origin.\n */\nexport const TOP = new ConnectionPositionPair(\n    { originX: 'center', originY: 'top' },\n    { overlayX: 'center', overlayY: 'bottom' },\n    0, 0,\n    ['eui-popover-position', 'eui-popover-position--top'],\n);\n\n/**\n * Position configuration for a popover appearing below its origin element.\n * Centers the popover horizontally relative to the origin.\n */\nexport const BOTTOM = new ConnectionPositionPair(\n    { originX: 'center', originY: 'bottom' },\n    { overlayX: 'center', overlayY: 'top' },\n    0, 0,\n    ['eui-popover-position', 'eui-popover-position--bottom'],\n);\n\n/**\n * Position configuration for a popover appearing to the left of its origin element.\n * Centers the popover vertically relative to the origin.\n */\nexport const LEFT = new ConnectionPositionPair(\n    { originX: 'start', originY: 'center' },\n    { overlayX: 'end', overlayY: 'center' },\n    0, 0,\n    ['eui-popover-position', 'eui-popover-position--left'],\n);\n\n/**\n * Position configuration for a popover appearing to the right of its origin element.\n * Centers the popover vertically relative to the origin.\n */\nexport const RIGHT = new ConnectionPositionPair(\n    { originX: 'end', originY: 'center' },\n    { overlayX: 'start', overlayY: 'center' },\n    0, 0,\n    ['eui-popover-position', 'eui-popover-position--right'],\n);\n\n/**\n * Converts a ConnectedOverlayPositionChange object to an EuiPopoverPosition string.\n * Used to determine which predefined position the overlay has settled on.\n *\n * @param connectionPair - The position change event from the CDK overlay\n * @returns The string representation of the popover position ('top', 'right', 'bottom', 'left')\n */\nexport const getPosition = ({ connectionPair }: ConnectedOverlayPositionChange): EuiPopoverPosition => {\n    switch (connectionPair) {\n        case TOP:\n            return 'top';\n        case BOTTOM:\n            return 'bottom';\n        case LEFT:\n            return 'left';\n        case RIGHT:\n            return 'right';\n    }\n};\n","import { DOCUMENT } from '@angular/common';\nimport { Directive, ElementRef, Input, OnDestroy, OnInit, Renderer2, inject } from '@angular/core';\nimport { Observable, Subject, takeUntil } from 'rxjs';\n\nimport { EuiPopoverPosition } from '../models/eui-popover-position.model';\n\n/**\n * @description\n * Directive that positions an arrow element for a popover relative to its origin element.\n *\n * This directive calculates and applies the appropriate positioning style to ensure\n * the arrow correctly points to the origin element regardless of the popover's position.\n * It adjusts arrow placement dynamically based on the position strategy ('top', 'bottom',\n * 'left', or 'right') and the dimensions and position of the origin element.\n *\n * @usageNotes\n * ### Basic usage\n * ```html\n * <div class=\"popover-arrow\" [euiPopoverArrowPosition]=\"position$\"></div>\n * ```\n *\n * ### In component\n * ```typescript\n * position$ = new BehaviorSubject<[EuiPopoverPosition, DOMRect]>(['bottom', originRect]);\n * \n * updatePosition(position: EuiPopoverPosition, rect: DOMRect) {\n *   this.position$.next([position, rect]);\n * }\n * ```\n *\n * ### Accessibility\n * - Arrow is purely decorative and does not affect accessibility\n * - Ensure arrow color has sufficient contrast with background\n *\n * ### Notes\n * - Automatically calculates arrow position based on origin element bounds\n * - Handles edge cases where popover is near viewport boundaries\n * - Used internally by EuiPopoverComponent\n */\n@Directive({\n    selector: '[euiPopoverArrowPosition]',\n})\nexport class EuiPopoverArrowPositionDirective implements OnInit, OnDestroy {\n    /**\n     * Observable that emits a tuple containing the popover position strategy\n     * and the DOMRect of the origin element.\n     *\n     * The directive uses this information to calculate the appropriate\n     * position for the arrow element.\n     */\n    @Input('euiPopoverArrowPosition')\n    public position$: Observable<[EuiPopoverPosition, DOMRect]>;\n\n    private destroy$: Subject<void> = new Subject();\n    private renderer = inject(Renderer2);\n    private elementRef = inject(ElementRef);\n    private document = inject<Document>(DOCUMENT);\n\n    ngOnInit(): void {\n        this.position$.pipe(takeUntil(this.destroy$)).subscribe(([position, originRect]) => {\n            this.renderer.setProperty(this.elementRef.nativeElement, 'style', this.getStyle(position, originRect));\n        });\n    }\n\n    ngOnDestroy(): void {\n        this.destroy$.next();\n        this.destroy$.complete();\n    }\n\n    private getStyle(position: EuiPopoverPosition, originRect: DOMRect): string {\n        const arrowRect: DOMRect = this.elementRef.nativeElement.getBoundingClientRect();\n\n        if (position === 'left' || position === 'right') {\n            const verticalDiff: number =\n                Math.floor(arrowRect.top + arrowRect.height / 2) - Math.floor(originRect.top + originRect.height / 2);\n\n            if (verticalDiff > 0) {\n                return `top: ${originRect.top + originRect.height / 2}px`;\n            } else if (verticalDiff < 0) {\n                return `bottom: ${\n                    this.document.body.clientHeight - originRect.bottom + originRect.height / 2 - arrowRect.height\n                }px`;\n            }\n        }\n        if (position === 'top' || position === 'bottom') {\n            const horizontalDiff: number =\n                Math.floor(arrowRect.left + arrowRect.width / 2) - Math.floor(originRect.left + originRect.width / 2);\n\n            if (horizontalDiff > 0) {\n                return `left: ${originRect.left + originRect.width / 2}px`;\n            } else if (horizontalDiff < 0) {\n                return `right: ${\n                    this.document.body.clientWidth - originRect.right + originRect.width / 2 - arrowRect.width\n                }px`;\n            }\n        }\n        return '';\n    }\n}\n","import {\n    Component,\n    ChangeDetectionStrategy,\n    ViewEncapsulation,\n    Input,\n    ViewChild,\n    TemplateRef,\n    ViewContainerRef,\n    AfterViewInit,\n    OnDestroy,\n    OnInit,\n    Output,\n    EventEmitter,\n    ElementRef,\n    OnChanges,\n    SimpleChanges,\n    booleanAttribute,\n    inject,\n} from '@angular/core';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n    Overlay,\n    OverlayRef,\n    ConnectionPositionPair,\n    FlexibleConnectedPositionStrategyOrigin,\n    ScrollDispatcher,\n    CdkScrollable,\n    FlexibleConnectedPositionStrategy,\n    OverlayModule,\n} from '@angular/cdk/overlay';\n\nimport { A11yModule, CdkTrapFocus } from '@angular/cdk/a11y';\nimport { ObserversModule } from '@angular/cdk/observers';\nimport { BehaviorSubject, Observable, Subject, Subscription } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap, takeUntil } from 'rxjs/operators';\nimport { EUI_ICON_BUTTON } from '@eui/components/eui-icon-button';\n\nimport { BaseStatesDirective } from '@eui/components/shared';\n\nimport { EuiPopoverPosition, BOTTOM, LEFT, RIGHT, TOP, getPosition } from './models/eui-popover-position.model';\nimport { EuiPopoverArrowPositionDirective } from './directives/eui-popover-arrow-position.directive';\nimport { NgTemplateOutlet } from '@angular/common';\n\n/**\n * @description\n * A flexible popover component that displays content in an overlay positioned relative to an origin element.\n *\n * The popover can be positioned at four different positions (top, right, bottom, left) relative to the\n * origin element, with automatic fallback positions if the preferred position doesn't fit in the viewport.\n * It supports various visual styles, dismissal behaviors, and size variants.\n *\n * @usageNotes\n * ### Basic usage\n * ```typescript\n * @ViewChild('popover') popover: EuiPopoverComponent;\n * @ViewChild('trigger') trigger: ElementRef;\n * \n * openPopover() {\n *   this.popover.openPopover(this.trigger);\n * }\n * ```\n * ```html\n * <button #trigger (click)=\"openPopover()\">Open</button>\n * <eui-popover #popover title=\"Popover Title\">\n *   <p>Popover content goes here</p>\n * </eui-popover>\n * ```\n *\n * ### With positioning\n * ```html\n * <eui-popover position=\"top\" [width]=\"'300px'\">\n *   Content\n * </eui-popover>\n * ```\n *\n * ### With backdrop\n * ```html\n * <eui-popover [hasBackDrop]=\"true\" [isDismissable]=\"true\">\n *   Content\n * </eui-popover>\n * ```\n *\n * ### Accessibility\n * - Escape key closes the popover when focused\n * - Focus trap keeps keyboard navigation within popover when open\n * - Close button provides clear dismissal option\n * - Backdrop click dismissal when `isDismissable` is true\n *\n * ### Notes\n * - Popover automatically repositions if preferred position doesn't fit viewport\n * - Use `hasNoContentPadding` to remove default content padding for custom layouts\n * - Listen to `popoverOpen` and `popoverClose` events for state management\n * - Popover closes automatically when origin element scrolls out of view\n */\n@Component({\n    selector: 'eui-popover',\n    templateUrl: './eui-popover.component.html',\n    styleUrls: ['./styles/_index.scss'],\n    changeDetection: ChangeDetectionStrategy.OnPush,\n    encapsulation: ViewEncapsulation.None,\n    hostDirectives: [\n        {\n            directive: BaseStatesDirective,\n            inputs: [\n                'euiSizeS',\n                'euiSizeM',\n                'euiSizeL',\n                'euiSizeXL',\n                'euiSize2XL',\n                'euiSizeAuto',\n                'euiSizeVariant',\n            ],\n        },\n    ],\n    imports: [\n        NgTemplateOutlet,\n        OverlayModule,\n        A11yModule,\n        ObserversModule,\n        EuiPopoverArrowPositionDirective,\n        CdkTrapFocus,\n        ...EUI_ICON_BUTTON,\n    ],\n})\nexport class EuiPopoverComponent implements AfterViewInit, OnDestroy, OnInit, OnChanges {\n    /**\n     * Optional title text to display in the popover header.\n     * When provided, adds a title element at the top of the popover content.\n     */\n    @Input() title: string;\n\n    /**\n     * Determines the preferred placement of the popover relative to its origin element.\n     * The component will attempt to use this position first, falling back to alternatives\n     * if there's not enough space in the viewport.\n     *\n     * @default 'bottom'\n     */\n    @Input() position: EuiPopoverPosition = 'bottom';\n\n    /**\n     * Custom width for the popover.\n     * Can be specified in any valid CSS unit (px, %, em, etc).\n     * When null, the popover width is determined by its content.\n     *\n     * @default null\n     */\n    @Input() width: string = null;\n\n    /**\n     * Whether to show a semi-transparent backdrop behind the popover.\n     * When true, creates a visual overlay that dims the rest of the UI.\n     *\n     * @default false\n     */\n    @Input({ transform: booleanAttribute }) hasBackDrop = false;\n\n    /**\n     * Whether to show a close button in the top-right corner of the popover.\n     * When clicked, the close button will dismiss the popover.\n     *\n     * @default true\n     */\n    @Input({ transform: booleanAttribute }) hasCloseButton = true;\n\n    /**\n     * Whether the popover can be dismissed by clicking outside its boundaries.\n     * When false, the popover will remain open until explicitly closed via code\n     * or by clicking the close button (if available).\n     *\n     * @default true\n     */\n    @Input({ transform: booleanAttribute }) isDismissable = true;\n\n    /**\n     * If the content of the popover should receive a default padding\n     *\n     * @default false\n     */\n    @Input({ transform: booleanAttribute }) hasNoContentPadding = false;\n\n    /**\n     * Event emitted when a click occurs outside the popover boundaries.\n     * Only emitted when isDismissable is true.\n     */\n    @Output() outsideClick = new EventEmitter();\n\n    /**\n     * Event emitted when the popover is opened.\n     * Fires after the popover content has been attached to the DOM and positioned.\n     */\n    @Output() popoverOpen = new EventEmitter();\n\n    /**\n     * Event emitted when the popover is closed.\n     * Fires after the popover content has been removed from the DOM.\n     */\n    @Output() popoverClose = new EventEmitter();\n\n    public position$: Observable<[EuiPopoverPosition, DOMRect]>;\n\n    @ViewChild('templatePortalContent') templatePortalContent: TemplateRef<unknown>;\n\n    private templatePortal: TemplatePortal;\n    private overlayRef: OverlayRef;\n    private destroy$: Subject<boolean> = new Subject<boolean>();\n    private isOpen$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n    private scrollDispatcherSubscription = new Subscription();\n    private origin: ElementRef;\n    private preferredPositons: ConnectionPositionPair[] = [BOTTOM, TOP, LEFT, RIGHT];\n    private positionStrategy: FlexibleConnectedPositionStrategy;\n    private positionStrategyUpdate$: Subject<void> = new Subject();\n    private overlay = inject(Overlay);\n    private viewContainerRef = inject(ViewContainerRef);\n    private scrollDispatcher = inject(ScrollDispatcher);\n    private baseStatesDirective = inject(BaseStatesDirective);\n\n    ngOnChanges(c: SimpleChanges): void {\n        if (this.position === 'top') {\n            this.preferredPositons = [TOP, BOTTOM, LEFT, RIGHT];\n        } else if (this.position === 'right') {\n            this.preferredPositons = [RIGHT, LEFT, TOP, BOTTOM];\n        } else if (this.position === 'left') {\n            this.preferredPositons = [LEFT, RIGHT, TOP, BOTTOM];\n        } else {\n            this.preferredPositons = [BOTTOM, TOP, LEFT, RIGHT];\n        }\n    }\n\n    ngOnInit(): void {\n        this.setPositionStream();\n    }\n\n    ngAfterViewInit(): void {\n        this.templatePortal = new TemplatePortal(this.templatePortalContent, this.viewContainerRef);\n    }\n\n    ngOnDestroy(): void {\n        this.destroy$.next(true);\n        this.destroy$.unsubscribe();\n        this.scrollDispatcherSubscription.unsubscribe();\n        this.overlayRef?.dispose();\n        this.overlayRef = null;\n    }\n\n    /**\n     * Whether the eui-popover is open.\n     *\n     * @usageNotes\n     * ```HTML\n     * <eui-popover #popover>\n     *     @if (popover.isOpen) {\n     *          <my-component></my-component>\n     *     }\n     * </eui-popover>\n     * ```\n     * @returns A boolean with value `true` when open, otherwise `false`.\n     */\n    get isOpen(): boolean {\n        return this.isOpen$.value;\n    }\n\n    /**\n     * Updates the position strategy when content changes.\n     * Recalculates and updates the overlay position to handle content size changes.\n     */\n    public onContentChange(): void {\n        this.positionStrategy = this.getPositionStrategy();\n        this.positionStrategyUpdate$.next();\n        this.overlayRef.updatePositionStrategy(this.positionStrategy);\n    }\n\n    /**\n     * Opens the popover relative to the provided origin element.\n     * Sets up scroll monitoring, position strategy, and attaches the popover content to the overlay.\n     * Emits the popoverOpen event when complete.\n     *\n     * @param origin - Reference to the element that triggers the popover\n     */\n    public openPopover(origin: ElementRef): void {\n        if (!this.isOpen) {\n            this.scrollDispatcherSubscription = this.scrollDispatcher.ancestorScrolled(origin).subscribe((event: CdkScrollable) => {\n                const scrollableParent = event ? event.getElementRef().nativeElement : document.querySelector('body');\n                if (!this.isVisible(origin as unknown as HTMLElement, scrollableParent)) {\n                    this.closePopover();\n                }\n            });\n\n            this.origin = origin;\n            const positionStrategy = this.getPositionStrategy();\n\n            const scrollStrategy = this.overlay.scrollStrategies.reposition({ scrollThrottle: 10 });\n\n            this.overlayRef = this.overlay.create({\n                positionStrategy,\n                scrollStrategy,\n                disposeOnNavigation: true,\n                width: this.width,\n                panelClass: this.baseStatesDirective.getCssClasses('eui-popover').split(' '),\n            });\n            this.overlayRef.attach(this.templatePortal);\n\n            document.querySelectorAll('.cdk-overlay-container')?.forEach(el => {\n                if (!el.classList.contains('eui-21')) {\n                    el.classList.add('eui-21');\n                }\n            });\n\n            this.positionStrategy = positionStrategy;\n            this.positionStrategyUpdate$.next();\n\n            this.overlayRef\n                .outsidePointerEvents()\n                .pipe(takeUntil(this.destroy$))\n                .subscribe(() => {\n                    if (this.isDismissable) {\n                        this.outsideClick.emit();\n                        this.closePopover();\n                    }\n                });\n\n            this.isOpen$.next(true);\n            this.popoverOpen.emit();\n        }\n    }\n\n    /**\n     * Closes the popover.\n     * Cleans up subscriptions, disposes the overlay, and emits the popoverClose event.\n     */\n    public closePopover(): void {\n        this.scrollDispatcherSubscription.unsubscribe();\n        this.overlayRef.dispose();\n        this.overlayRef = null;\n        this.isOpen$.next(false);\n        this.popoverClose.emit();\n    }\n\n    /**\n     * Handles keyboard events to allow closing the popover with the Escape key.\n     * Can be used as an alternative to the close button or when hasCloseButton is false.\n     *\n     * @param event - The keyboard event\n     */\n    public onKeyDown(event: KeyboardEvent): void {\n        if (event.key === 'Escape') {\n            this.closePopover();\n        }\n    }\n\n    /**\n     * Checks whether the origin element is currently visible within the scrollable parent's viewport.\n     * Used to determine if the popover should remain open during scroll events.\n     *\n     * @param origin - The HTML element that triggers the popover\n     * @param scrollableParent - The scrollable container element\n     * @returns True if the origin element is visible in the viewport, otherwise false\n     */\n    private isVisible(origin: HTMLElement, scrollableParent: HTMLElement): boolean {\n        const originY = origin.getBoundingClientRect().y;\n        const scrollableParentY = Math.abs(scrollableParent.getBoundingClientRect().y);\n        const scrollableParentHeight = scrollableParent.getBoundingClientRect().height - 50;\n\n        return (\n            (originY > 0 && originY < scrollableParentHeight) ||\n            (originY - scrollableParentY > 0 && originY < scrollableParentY + scrollableParentHeight)\n        );\n    }\n\n    /**\n     * Creates and returns a position strategy for the overlay.\n     * Configures the overlay to be positioned relative to the origin element\n     * with fallback positions if the preferred one doesn't fit.\n     *\n     * @returns A flexible connected position strategy configured for the popover\n     */\n    private getPositionStrategy(): FlexibleConnectedPositionStrategy {\n        return this.overlay\n            .position()\n            .flexibleConnectedTo(this.origin as FlexibleConnectedPositionStrategyOrigin)\n            .withPositions(this.preferredPositons)\n            .withFlexibleDimensions(false)\n            .withLockedPosition(true);\n    }\n\n    /**\n     * Sets up the position stream for the arrow positioning directive.\n     * Creates an observable that emits the current popover position and the origin element's bounding rectangle\n     * whenever the popover's position changes.\n     */\n    private setPositionStream(): void {\n        this.position$ = this.positionStrategyUpdate$.pipe(\n            switchMap(() => this.positionStrategy.positionChanges),\n            map(getPosition),\n            distinctUntilChanged(),\n            map((position) => {\n                const rect = this.origin.nativeElement ?\n                    this.origin.nativeElement.getBoundingClientRect() :\n                    (this.origin as unknown as HTMLElement).getBoundingClientRect();\n                return [position, rect];\n            }),\n        );\n    }\n}\n","<ng-template #templatePortalContent>\n    <ng-container *ngTemplateOutlet=\"template\" />\n</ng-template>\n\n<ng-template #template>\n    <div class=\"eui-popover__container\" cdkTrapFocus cdkTrapFocusAutoCapture (keydown)=\"onKeyDown($event)\">\n        <div class=\"eui-popover__arrow\" [euiPopoverArrowPosition]=\"position$\">\n            <div class=\"eui-popover__arrow-inner\"></div>\n        </div>\n        @if (title) {\n            <div class=\"eui-popover__header\">\n                <div class=\"eui-popover__header-title\">{{ title }}</div>\n                @if (hasCloseButton) {\n                <eui-icon-button class=\"eui-popover__header-close\"\n                    icon=\"eui-close\"\n                    euiRounded\n                    (buttonClick)=\"closePopover()\"\n                    fillColor=\"secondary\"\n                    ariaLabel=\"Dialog close icon\"/>                    \n                }\n            </div>\n        }\n        <div (cdkObserveContent)=\"onContentChange()\" class=\"eui-popover__content\" [class.eui-popover__content--no-padding]=\"hasNoContentPadding\">\n            <ng-content></ng-content>\n        </div>\n    </div>\n</ng-template>\n","import { EuiPopoverComponent } from './eui-popover.component';\n\nexport * from './eui-popover.component';\n\nexport const EUI_POPOVER = [\n    EuiPopoverComponent,\n] as const;\n\n// export { EuiPopoverComponent as EuiPopover } from './eui-popover.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["takeUntil"],"mappings":";;;;;;;;;;;;;;;;AAOA;;;AAGG;AACI,MAAM,GAAG,GAAG,IAAI,sBAAsB,CACzC,EAAE,OAAO,EAAE,QAA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