{"version":3,"file":"siemens-element-ng-popover.mjs","sources":["../../../../projects/element-ng/popover/si-popover.component.ts","../../../../projects/element-ng/popover/si-popover.component.html","../../../../projects/element-ng/popover/si-popover.directive.ts","../../../../projects/element-ng/popover/si-popover-title.directive.ts","../../../../projects/element-ng/popover/si-popover-body.directive.ts","../../../../projects/element-ng/popover/index.ts","../../../../projects/element-ng/popover/siemens-element-ng-popover.ts"],"sourcesContent":["/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';\nimport { ConnectedOverlayPositionChange } from '@angular/cdk/overlay';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n  Component,\n  ElementRef,\n  inject,\n  Injector,\n  input,\n  OnDestroy,\n  OnInit,\n  signal,\n  TemplateRef,\n  viewChild,\n  DOCUMENT,\n  computed,\n  ChangeDetectionStrategy\n} from '@angular/core';\nimport { calculateOverlayArrowPosition, OverlayArrowPosition } from '@siemens/element-ng/common';\nimport { SiIconComponent } from '@siemens/element-ng/icon';\nimport { SiTranslatePipe } from '@siemens/element-translate-ng/translate';\n\nimport { SiPopoverDirective } from './si-popover.directive';\n\n@Component({\n  selector: 'si-popover',\n  imports: [NgTemplateOutlet, SiIconComponent, SiTranslatePipe],\n  templateUrl: './si-popover.component.html',\n  changeDetection: ChangeDetectionStrategy.Eager,\n  host: {\n    '[id]': 'this.popoverDirective().popoverId'\n  }\n})\nexport class PopoverComponent implements OnInit, OnDestroy {\n  /** The directive that supplies and controls the popover content. */\n  readonly popoverDirective = input.required<SiPopoverDirective>();\n  readonly popoverWrapper = viewChild.required<ElementRef>('popoverWrapper');\n\n  /** @internal */\n  labelledBy: string | undefined;\n  /**\n   * This property is set by the {@link SiPopoverTitleDirective} if present.\n   *\n   * @internal\n   */\n  readonly hasTemplateTitle = signal(false);\n  /** @internal */\n  describedBy: string | undefined;\n  protected readonly positionClass = signal('');\n  protected readonly ariaLabelledBy = computed(() =>\n    this.popoverDirective().title() || this.hasTemplateTitle()\n      ? this.labelledBy\n      : this.popoverDirective().id()\n  );\n  protected readonly arrowPos = signal<OverlayArrowPosition | undefined>(undefined);\n  protected readonly description = computed(() => {\n    const description = this.popoverDirective().siPopover();\n    return !(description instanceof TemplateRef) ? description : undefined;\n  });\n  protected popoverTemplate: TemplateRef<any> | null = null;\n  protected injector = inject(Injector);\n\n  private elementRef = inject(ElementRef);\n  private focusTrapFactory = inject(ConfigurableFocusTrapFactory);\n  private focusTrap?: ConfigurableFocusTrap;\n  private focusTimeoutId?: ReturnType<typeof setTimeout>;\n  private readonly previouslyActiveElement = inject(DOCUMENT).activeElement;\n\n  ngOnInit(): void {\n    const popoverDirective = this.popoverDirective();\n    const popover = popoverDirective.siPopover();\n    if (popover instanceof TemplateRef) {\n      this.popoverTemplate = popover;\n    }\n    this.labelledBy = `__popover-title_${popoverDirective.popoverCounter}`;\n    this.describedBy = `__popover-body_${popoverDirective.popoverCounter}`;\n\n    this.applyFocus();\n  }\n\n  ngOnDestroy(): void {\n    clearTimeout(this.focusTimeoutId);\n    this.focusTrap?.destroy();\n    if (\n      this.previouslyActiveElement &&\n      'focus' in this.previouslyActiveElement &&\n      typeof this.previouslyActiveElement.focus === 'function'\n    ) {\n      this.previouslyActiveElement.focus();\n    }\n  }\n\n  /** @internal */\n  updateArrow(change: ConnectedOverlayPositionChange, anchor?: ElementRef): void {\n    const positionClass = `popover-${change.connectionPair.overlayX}-${change.connectionPair.overlayY}`;\n    // need two updates as class changes affect the position\n    this.positionClass.set(positionClass);\n    const arrowPos = calculateOverlayArrowPosition(change, this.elementRef, anchor);\n    this.arrowPos.set(arrowPos);\n  }\n\n  hide(): void {\n    this.popoverDirective().hide();\n  }\n\n  private applyFocus(): void {\n    // Using setTimeout ensures that SR first read `expanded` before we move the focus.\n    this.focusTimeoutId = setTimeout(async () => {\n      const popoverWrapperEl = this.popoverWrapper().nativeElement;\n      this.focusTrap = this.focusTrapFactory.create(this.popoverWrapper().nativeElement);\n      const moved = await this.focusTrap.focusFirstTabbableElementWhenReady();\n      if (!moved) {\n        popoverWrapperEl.tabIndex = 0;\n        popoverWrapperEl.focus();\n      }\n    });\n  }\n}\n","@let popover = popoverDirective();\n<div\n  #popoverWrapper\n  role=\"dialog\"\n  [class]=\"[\n    'popover',\n    'position-relative',\n    'focus-inside',\n    positionClass(),\n    popover.containerClass()\n  ]\"\n  [attr.aria-labelledby]=\"ariaLabelledBy()\"\n  [attr.aria-describedby]=\"describedBy\"\n  (keydown.escape)=\"hide()\"\n>\n  <div\n    class=\"popover-arrow\"\n    [style.left.px]=\"arrowPos()?.left\"\n    [style.right.px]=\"arrowPos()?.right\"\n  ></div>\n  @if (popover.title()) {\n    <div class=\"popover-header\">\n      @let iconValue = popover.icon();\n      @if (iconValue) {\n        <si-icon class=\"icon me-1\" [icon]=\"iconValue\" />\n      }\n      <span class=\"si-h5\" [id]=\"labelledBy\">{{ popover.title() | translate }}</span>\n    </div>\n  }\n  @if (!popoverTemplate) {\n    <div class=\"popover-body\">\n      <div class=\"si-body\" [id]=\"describedBy\">{{ description() | translate }}</div>\n    </div>\n  } @else {\n    <!-- If title is already provided, we wrap the template with the `popover-body` class\n    since the template may not be in the popover body directive. Also used by SiHelpButtonComponent -->\n    @if (popover.title()) {\n      <div class=\"popover-body\">\n        <ng-template\n          [ngTemplateOutlet]=\"popoverTemplate\"\n          [ngTemplateOutletContext]=\"popover.context()\"\n          [ngTemplateOutletInjector]=\"injector\"\n        />\n      </div>\n    } @else {\n      <ng-template\n        [ngTemplateOutlet]=\"popoverTemplate\"\n        [ngTemplateOutletContext]=\"popover.context()\"\n        [ngTemplateOutletInjector]=\"injector\"\n      />\n    }\n  }\n</div>\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n  ComponentRef,\n  computed,\n  Directive,\n  ElementRef,\n  inject,\n  input,\n  OnDestroy,\n  output,\n  signal,\n  TemplateRef\n} from '@angular/core';\nimport {\n  defaultConnectedOverlayScrollStrategy,\n  isRTL,\n  positions\n} from '@siemens/element-ng/common';\nimport { TranslatableString } from '@siemens/element-translate-ng/translate-types';\nimport { Subject, takeUntil } from 'rxjs';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n  selector: '[siPopover]',\n  host: {\n    '[id]': 'id()',\n    'aria-haspopup': 'dialog',\n    '[attr.aria-expanded]': 'isOpen()',\n    '[attr.aria-controls]': 'popoverId',\n    '(click)': 'onClick()'\n  },\n  exportAs: 'si-popover'\n})\nexport class SiPopoverDirective implements OnDestroy {\n  private static idCounter = 0;\n\n  /**\n   * The popover text to be displayed\n   */\n  readonly siPopover = input<TranslatableString | TemplateRef<unknown>>();\n\n  /**\n   * The placement of the popover. One of 'top', 'start', 'end', 'bottom'\n   *\n   * @defaultValue 'auto'\n   */\n  readonly placement = input<keyof typeof positions>('auto', { alias: 'siPopoverPlacement' });\n\n  readonly placementInternal = computed(() => {\n    if (\n      this.placement() !== 'top' &&\n      this.placement() !== 'bottom' &&\n      this.placement() !== 'start' &&\n      this.placement() !== 'end'\n    ) {\n      return 'auto';\n    } else {\n      return this.placement();\n    }\n  });\n\n  /**\n   * The title to be displayed on top for the popover\n   *\n   * @defaultValue undefined\n   */\n  readonly title = input<TranslatableString>(undefined, { alias: 'siPopoverTitle' });\n\n  /**\n   * The class that will be applied to container of the popover\n   *\n   * @defaultValue ''\n   */\n  readonly containerClass = input('', { alias: 'siPopoverContainerClass' });\n\n  /**\n   * The icon to be displayed besides popover title\n   *\n   * @defaultValue undefined\n   */\n  readonly icon = input<string>(undefined, { alias: 'siPopoverIcon' });\n\n  /**\n   * The context for the attached template\n   *\n   * @defaultValue undefined\n   */\n  readonly context = input<unknown>(undefined, { alias: 'siPopoverContext' });\n\n  /**\n   * CDK scroll strategy used for the popover overlay.\n   *\n   * @defaultValue defaultConnectedOverlayScrollStrategy()\n   */\n  readonly scrollStrategy = input(defaultConnectedOverlayScrollStrategy(), {\n    alias: 'siPopoverScrollStrategy'\n  });\n\n  /**\n   * Emits `true` when the popover is shown, `false` when the popover is hidden.\n   */\n  readonly visibilityChange = output<boolean>({ alias: 'siPopoverVisibilityChange' });\n\n  /** @internal */\n  readonly popoverCounter = SiPopoverDirective.idCounter++;\n  /** @internal */\n  readonly popoverId = `__popover_${this.popoverCounter}`;\n\n  /**\n   * The ID of the trigger element.\n   *\n   * @defaultValue\n   * ```\n   * `__popover-trigger_${this.popoverCounter}`\n   * ```\n   */\n  readonly id = input(`__popover-trigger_${this.popoverCounter}`);\n\n  /** @internal */\n  protected readonly isOpen = signal<boolean>(false);\n\n  private overlayref?: OverlayRef;\n  private popoverRef?: ComponentRef<PopoverComponent>;\n  private overlay = inject(Overlay);\n  private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n  private destroyer = new Subject<void>();\n\n  ngOnDestroy(): void {\n    this.overlayref?.dispose();\n    this.destroyer.next();\n    this.destroyer.complete();\n  }\n\n  /**\n   * Displays popover and emits 'shown' event.\n   */\n  show(): void {\n    if (this.overlayref?.hasAttached()) {\n      return;\n    }\n\n    this.overlayref ??= this.createOverlay();\n\n    const popoverPortal = new ComponentPortal(PopoverComponent);\n    this.popoverRef = this.overlayref.attach(popoverPortal);\n\n    this.popoverRef.setInput('popoverDirective', this);\n\n    this.isOpen.set(true);\n    this.visibilityChange.emit(true);\n  }\n\n  /**\n   * Hides the popover and emits 'hidden' event.\n   */\n  hide(): void {\n    this.overlayref?.detach();\n  }\n\n  /**\n   * Updates the position of the popover based on the position strategy.\n   */\n  updatePosition(): void {\n    this.overlayref?.updatePosition();\n  }\n\n  protected onClick(): void {\n    if (this.overlayref?.hasAttached()) {\n      this.hide();\n    } else {\n      this.show();\n    }\n  }\n\n  private createOverlay(): OverlayRef {\n    const positionStrategy = this.overlay\n      .position()\n      .flexibleConnectedTo(this.elementRef)\n      .withPush(false)\n      .withGrowAfterOpen(true)\n      .withFlexibleDimensions(false)\n      .withPositions(positions[this.placementInternal()]);\n    const overlayRef = this.overlay.create({\n      positionStrategy,\n      scrollStrategy: this.scrollStrategy(),\n      direction: isRTL() ? 'rtl' : 'ltr'\n    });\n    overlayRef\n      .detachments()\n      .pipe(takeUntil(this.destroyer))\n      .subscribe(() => {\n        this.popoverRef = undefined;\n        if (this.isOpen()) {\n          this.isOpen.set(false);\n          this.visibilityChange.emit(false);\n        }\n      });\n    overlayRef\n      .outsidePointerEvents()\n      .pipe(takeUntil(this.destroyer))\n      .subscribe(({ target }) => {\n        if (target !== this.elementRef.nativeElement) {\n          this.hide();\n        }\n      });\n    positionStrategy.positionChanges\n      .pipe(takeUntil(this.destroyer))\n      .subscribe(change => this.popoverRef?.instance.updateArrow(change, this.elementRef));\n    return overlayRef;\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { DestroyRef, Directive, inject } from '@angular/core';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n  // eslint-disable-next-line @angular-eslint/directive-selector\n  selector: 'si-popover-title',\n  host: {\n    '[id]': 'this.popover.labelledBy',\n    'class': 'popover-header'\n  }\n})\nexport class SiPopoverTitleDirective {\n  readonly popover = inject(PopoverComponent);\n\n  constructor() {\n    this.popover.hasTemplateTitle.set(true);\n    inject(DestroyRef).onDestroy(() => this.popover.hasTemplateTitle.set(false));\n  }\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nimport { Directive, inject } from '@angular/core';\n\nimport { PopoverComponent } from './si-popover.component';\n\n@Directive({\n  // eslint-disable-next-line @angular-eslint/directive-selector\n  selector: 'si-popover-body',\n  host: {\n    '[id]': 'this.popover.describedBy',\n    'class': 'popover-body d-block'\n  }\n})\nexport class SiPopoverBodyDirective {\n  readonly popover = inject(PopoverComponent);\n}\n","/**\n * Copyright (c) Siemens 2016 - 2026\n * SPDX-License-Identifier: MIT\n */\nexport * from './si-popover.directive';\nexport * from './si-popover-title.directive';\nexport * from './si-popover-body.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;;;AAGG;MAkCU,gBAAgB,CAAA;;IAElB,gBAAgB,GAAG,KAAK,CAAC,QAAQ;yFAAsB;AACvD,IAAA,cAAc,GAAG,SAAS,CAAC,QAAQ,CAAa,gBAAgB;uFAAC;;AAG1E,IAAA,UAAU;AACV;;;;AAIG;IACM,gBAAgB,GAAG,MAAM,CAAC,KAAK;yFAAC;;AAEzC,IAAA,WAAW;IACQ,aAAa,GAAG,MAAM,CAAC,EAAE;sFAAC;AAC1B,IAAA,cAAc,GAAG,QAAQ,CAAC,MAC3C,IAAI,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,IAAI,IAAI,CAAC,gBAAgB;UACpD,IAAI,CAAC;AACP,UAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,EAAE,EAAE;uFACjC;IACkB,QAAQ,GAAG,MAAM,CAAmC,SAAS;iFAAC;AAC9D,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAK;QAC7C,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC,SAAS,EAAE;AACvD,QAAA,OAAO,EAAE,WAAW,YAAY,WAAW,CAAC,GAAG,WAAW,GAAG,SAAS;IACxE,CAAC;oFAAC;IACQ,eAAe,GAA4B,IAAI;AAC/C,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAE7B,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,gBAAgB,GAAG,MAAM,CAAC,4BAA4B,CAAC;AACvD,IAAA,SAAS;AACT,IAAA,cAAc;AACL,IAAA,uBAAuB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa;IAEzE,QAAQ,GAAA;AACN,QAAA,MAAM,gBAAgB,GAAG,IAAI,CAA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