{"version":3,"file":"babybeet-angular-tooltip.mjs","sources":["../../../projects/angular-tooltip/src/lib/utils/is-mobile.ts","../../../projects/angular-tooltip/src/lib/utils/watch-for-long-press.ts","../../../projects/angular-tooltip/src/lib/tooltip.component.ts","../../../projects/angular-tooltip/src/lib/tooltip.component.html","../../../projects/angular-tooltip/src/lib/tooltip.service.ts","../../../projects/angular-tooltip/src/lib/tooltip.directive.ts","../../../projects/angular-tooltip/src/babybeet-angular-tooltip.ts"],"sourcesContent":["export function isMobile() {\n  return /iPhone|iPad|Android/i.test(navigator.userAgent);\n}\n","import { Subject } from 'rxjs';\nimport { finalize } from 'rxjs/operators';\n\nexport function watchForLongPress(target: HTMLElement) {\n  let timeoutId: number;\n  const notifier = new Subject<PointerEvent>();\n\n  const pointerdown = (event: PointerEvent) => {\n    timeoutId = window.setTimeout(() => notifier.next(event), 500);\n  };\n\n  const pointerup = () => {\n    window.clearTimeout(timeoutId);\n  };\n\n  target.addEventListener('pointerdown', pointerdown, false);\n  window.addEventListener('pointerup', pointerup, false);\n\n  target.oncontextmenu = event => {\n    event.preventDefault();\n  };\n\n  return notifier.pipe(\n    finalize(() => {\n      target.removeEventListener('pointerdown', pointerdown, false);\n      window.removeEventListener('pointerup', pointerup, false);\n    })\n  );\n}\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  ElementRef,\n  Host,\n  OnDestroy,\n  signal,\n  ViewEncapsulation\n} from '@angular/core';\n\nimport { Placement } from './placement';\nimport { Theme } from './theme';\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n  host: {\n    class: 'lc-tooltip-container'\n  },\n  selector: 'lc-tooltip',\n  standalone: true,\n  styleUrls: ['./tooltip.component.scss'],\n  templateUrl: './tooltip.component.html'\n})\nexport class TooltipComponent implements OnDestroy {\n  protected readonly _content = signal('');\n  protected _idForAriaDescribedBy = `__${btoa(String(Math.random() + Math.random()))\n    .substring(5, 15)\n    .toLowerCase()}__`;\n\n  /**\n   * Optional class to add to this component\n   */\n  protected readonly _className = signal<string | undefined>(undefined);\n\n  /**\n   * The current theme for this tooltip.\n   */\n  protected readonly _theme = signal<Theme>('light');\n\n  private _placement: Placement = 'vertical';\n\n  /**\n   * The DOM element representing this tooltip\n   */\n  private _tooltip!: HTMLDivElement;\n\n  /**\n   * The callback to run after this tooltip is closed\n   */\n  private _afterClosedListener?: () => void;\n\n  private _isVisible = false;\n\n  constructor(@Host() private readonly _host: ElementRef<HTMLElement>) {}\n\n  hide() {\n    this._isVisible = false;\n    this._tooltip.classList.remove('enter');\n    this._tooltip.classList.add('leave');\n  }\n\n  ngOnDestroy() {\n    this._afterClosedListener = undefined;\n  }\n\n  setClassName(className: string) {\n    this._className.set(className);\n  }\n\n  setTheme(theme: Theme) {\n    this._theme.set(theme);\n  }\n\n  setAfterClosedListener(listener: () => void) {\n    this._afterClosedListener = listener;\n  }\n\n  setPlacement(placement: Placement) {\n    this._placement = placement;\n  }\n\n  /**\n   * Show a tooltip anchored at `anchor` with the provided content.\n   *\n   * @param anchor The target at which to place this tooltip.\n   * @param content The tooltip content to show.\n   */\n  show(anchor: Element, content: Element) {\n    if (document.body.contains(anchor)) {\n      anchor.setAttribute('aria-describedby', this._idForAriaDescribedBy);\n      this._showTooltip(anchor.getBoundingClientRect(), content);\n    }\n  }\n\n  private _showTooltip(anchorBoundingBox: Omit<DOMRect, 'toJSON'>, content: Element) {\n    this._tooltip = this._host.nativeElement.firstElementChild as HTMLDivElement;\n    this._tooltip.querySelector('.lc-tooltip__content')?.appendChild(content);\n\n    switch (this._placement) {\n      case 'vertical':\n        this._showBottom(anchorBoundingBox);\n        break;\n      case 'horizontal':\n        this._showRight(anchorBoundingBox);\n        break;\n\n      default:\n        throw new Error(`Invalid placement: ${String(this._placement)}`);\n    }\n  }\n\n  private _showBottom(anchorBoundingBox: Omit<DOMRect, 'toJSON'>) {\n    this._tooltip.classList.add('bottom');\n\n    setTimeout(() => {\n      const tooltipBoundingBox = this._tooltip.getBoundingClientRect();\n      const arrowHeight = 15;\n      const spaceBetweenArrowAndAnchor = 10;\n      // The tooltip will be placed centered horizontally with the anchor.\n      const tooltipLeft = anchorBoundingBox.left + (anchorBoundingBox.width - tooltipBoundingBox.width) / 2;\n      let tooltipTop = anchorBoundingBox.bottom + spaceBetweenArrowAndAnchor;\n      const isOverflowingBottomEdgeOfViewport =\n        tooltipTop + arrowHeight + tooltipBoundingBox.height + spaceBetweenArrowAndAnchor >= window.innerHeight;\n\n      /**\n       * If the tooltip overflows the bottom of the viewport, we want to shift the tooltip to the top of the anchor,\n       * but if this shifting causes the tooltip to overflow the top of the viewport which is when `tooltipTop`\n       * is negative, then we want to limit the height of the tooltip to the distance between the anchor's top\n       * position and the viewport's top edge minus some spacing.\n       */\n      if (isOverflowingBottomEdgeOfViewport) {\n        tooltipTop = anchorBoundingBox.top - tooltipBoundingBox.height - spaceBetweenArrowAndAnchor;\n\n        if (tooltipTop < 0) {\n          const newTooltipHeight = anchorBoundingBox.top - spaceBetweenArrowAndAnchor * 1.5;\n\n          this._tooltip.style.height = `${newTooltipHeight}px`;\n          tooltipTop = spaceBetweenArrowAndAnchor / 2;\n        }\n\n        this._tooltip.classList.remove('bottom');\n        this._tooltip.classList.add('top');\n      } else {\n        /**\n         * If the tooltip overflows the bottom edge of viewport, we want to shrink\n         * its height by the amount of overflowing distance and some spacing.\n         */\n        // const effectiveTooltipBottom = tooltipTop + tooltipBoundingBox.height;\n        // const differenceBetweenTooltipBottomAndViewportBottom = effectiveTooltipBottom - window.innerHeight;\n        // if (differenceBetweenTooltipBottomAndViewportBottom > 0) {\n        //   const newTooltipHeight =\n        //     tooltipBoundingBox.height -\n        //     differenceBetweenTooltipBottomAndViewportBottom -\n        //     spaceBetweenArrowAndAnchor / 2;\n        //   this._tooltip.style.height = `${newTooltipHeight}px`;\n        // }\n      }\n\n      const horizontalDifference =\n        this._calculateRightEdgeOverflowingDistance(tooltipLeft, tooltipBoundingBox.width) ||\n        this._calculateLeftEdgeOverflowingDistance(tooltipLeft);\n      this._tooltip.style.left = `${tooltipLeft - horizontalDifference}px`;\n      this._tooltip.style.top = `${tooltipTop}px`;\n      this._tooltip.style.visibility = 'visible';\n\n      this._isVisible = true;\n      this._tooltip.classList.add('enter');\n    }, 0);\n  }\n\n  /**\n   * Returns a value greater than 0 for the overflowing distance\n   * if tooltip box overflows the right edge of the screen, 0 otherwise\n   */\n  private _calculateRightEdgeOverflowingDistance(left: number, width: number) {\n    const spacing = 5;\n    const difference = left + width - window.innerWidth + spacing;\n\n    if (difference > spacing) {\n      (this._tooltip.querySelector('.lc-tooltip__arrow') as HTMLElement).style.left = `calc(50% + ${difference}px)`;\n\n      return difference;\n    }\n\n    return 0;\n  }\n\n  /**\n   * Returns a value greater than 0 for the overflowing distance\n   * if tooltip box overflows the left edge of the screen, 0 otherwise\n   */\n  private _calculateLeftEdgeOverflowingDistance(left: number) {\n    if (left < 0) {\n      const spacing = 5;\n      const newLeft = `calc(50% - ${Math.abs(left) + spacing}px)`;\n\n      (this._tooltip.querySelector('.lc-tooltip__arrow') as HTMLElement).style.left = newLeft;\n\n      return left - spacing;\n    }\n\n    return 0;\n  }\n\n  private _showRight(anchorBoundingBox: Omit<DOMRect, 'toJSON'>) {\n    this._tooltip.classList.add('right');\n\n    setTimeout(() => {\n      const tooltipBoundingBox = this._tooltip.getBoundingClientRect();\n      const spaceBetweenArrowAndAnchor = 10;\n      const arrowWidth = 15;\n      // The tooltip will be placed centered vertically with the anchor.\n      const tooltipTop = anchorBoundingBox.top + (anchorBoundingBox.height - tooltipBoundingBox.height) / 2;\n      let tooltipLeft = anchorBoundingBox.right + 10;\n\n      const isOverflowingRightEdgeOfViewport =\n        anchorBoundingBox.right + arrowWidth + tooltipBoundingBox.width + spaceBetweenArrowAndAnchor >=\n        window.innerWidth;\n\n      /**\n       * If the tooltip overflows the right edge of the viewport, we want to shift the tooltip to the left\n       * of the anchor, but if this shifting causes the tooltip to overflow the left edge of the viewport\n       * which is when `tooltipLeft` is negative, then we want to limit the width of the tooltip to\n       * the distance between the anchor's left position and the viewport's left edge minus some spacing.\n       */\n      if (isOverflowingRightEdgeOfViewport) {\n        tooltipLeft = anchorBoundingBox.left - tooltipBoundingBox.width - spaceBetweenArrowAndAnchor;\n\n        if (tooltipLeft < 0) {\n          const newTooltipWidth = anchorBoundingBox.left - spaceBetweenArrowAndAnchor * 1.5;\n\n          this._tooltip.style.width = `${newTooltipWidth}px`;\n          tooltipLeft = spaceBetweenArrowAndAnchor / 2;\n        }\n\n        this._tooltip.classList.remove('right');\n        this._tooltip.classList.add('left');\n      } else {\n        /**\n         * If the tooltip overflows the right edge of viewport, we want to shrink\n         * its width by the amount of overflowing distance and some spacing.\n         */\n        const effectiveTooltipRight = tooltipLeft + tooltipBoundingBox.width;\n        const differenceBetweenTooltipRightAndViewportRight = effectiveTooltipRight - window.innerWidth;\n\n        if (differenceBetweenTooltipRightAndViewportRight > 0) {\n          const newTooltipWidth =\n            tooltipBoundingBox.width - differenceBetweenTooltipRightAndViewportRight - spaceBetweenArrowAndAnchor / 2;\n          this._tooltip.style.width = `${newTooltipWidth}px`;\n        }\n      }\n\n      const horizontalDifference =\n        this._calculateRightEdgeOverflowingDistance(tooltipLeft, tooltipBoundingBox.width) ||\n        this._calculateLeftEdgeOverflowingDistance(tooltipLeft);\n      this._tooltip.style.left = `${tooltipLeft - horizontalDifference}px`;\n      this._tooltip.style.top = `${tooltipTop}px`;\n      this._tooltip.style.visibility = 'visible';\n\n      this._isVisible = true;\n\n      this._tooltip.classList.add('enter');\n    }, 0);\n  }\n\n  /**\n   * @private To be used by template\n   */\n  _onAnimationDone() {\n    if (!this._isVisible && this._afterClosedListener) {\n      this._afterClosedListener();\n    }\n  }\n\n  /**\n   * Show a tooltip at the specified x/y location.\n   */\n  showAt(x: number, y: number, content: Element) {\n    const anchorBoundingBox: Omit<DOMRect, 'toJSON'> = {\n      bottom: y + 1,\n      height: 1,\n      left: x,\n      right: x + 1,\n      top: y,\n      width: 1,\n      x,\n      y\n    };\n\n    this._showTooltip(anchorBoundingBox, content);\n  }\n}\n","<div\n    class=\"lc-tooltip {{ _theme() }}{{ _className() ? ' ' + _className() : '' }}\"\n    (animationend)=\"_onAnimationDone()\">\n    <div class=\"lc-tooltip__arrow\"></div>\n    <div\n        class=\"lc-tooltip__content\"\n        [id]=\"_idForAriaDescribedBy\"\n        [innerHTML]=\"_content()\"></div>\n</div>\n","import { ApplicationRef, createComponent, Injectable, TemplateRef } from '@angular/core';\n\nimport { Theme } from './theme';\nimport { TooltipComponent } from './tooltip.component';\nimport { TooltipConfiguration } from './tooltip-configuration';\n\n/**\n * This class allows to programmatically show a tooltip anchored at an element.\n * See {@see TooltipConfiguration} for the different options to configure the tooltip.\n * Please note that even though this class can create as many tooltips as desired,\n * it cannot selectively close a tooltip, it can only close all currently opened tooltips.\n */\n@Injectable({\n  providedIn: 'root'\n})\nexport class TooltipService {\n  private static _defaultTheme: Theme = 'light';\n\n  private readonly _openedTooltips = new Set<TooltipComponent>();\n\n  constructor(private readonly _applicationRef: ApplicationRef) {}\n\n  /**\n   * Set the default theme that will be used for all tooltip created in the future.\n   *\n   * @param theme The new theme to be used as the default.\n   */\n  static setDefaultTheme(theme: Theme) {\n    TooltipService._defaultTheme = theme;\n  }\n\n  /**\n   * Show a tooltip anchored at `anchor` with a configuration object specified by `configuration`.\n   * Ensure that the last opened tooltip has been closed before calling this method.\n   *\n   * @param anchor The target at which to place the tooltip.\n   * @param configuration The configuration object for this tooltip instance.\n   */\n  show(anchor: Element, configuration: TooltipConfiguration) {\n    const result = this._prepareTooltip(configuration);\n\n    result.tooltipRef.instance.show(anchor, result.content.rootNode);\n\n    this._openedTooltips.add(result.tooltipRef.instance);\n  }\n\n  private _prepareTooltip(configuration: TooltipConfiguration) {\n    const tooltipRef = createComponent(TooltipComponent, {\n      environmentInjector: this._applicationRef.injector\n    });\n\n    const createdContent = this._createContent(configuration);\n\n    if (configuration.className) {\n      tooltipRef.instance.setClassName(configuration.className);\n    }\n\n    if (configuration.placement) {\n      tooltipRef.instance.setPlacement(configuration.placement);\n    }\n\n    tooltipRef.instance.setTheme(configuration.theme || TooltipService._defaultTheme);\n\n    tooltipRef.instance.setAfterClosedListener(() => {\n      this._applicationRef.detachView(tooltipRef.hostView);\n      tooltipRef.destroy();\n      createdContent.ref?.destroy();\n    });\n\n    this._applicationRef.attachView(tooltipRef.hostView);\n\n    tooltipRef.changeDetectorRef.detectChanges();\n\n    document.body.appendChild(tooltipRef.location.nativeElement);\n\n    return {\n      content: createdContent,\n      tooltipRef\n    };\n  }\n\n  private _createContent(configuration: TooltipConfiguration) {\n    if (typeof configuration.content === 'string') {\n      const contentRoot: Element = document.createElement('div');\n      contentRoot.innerHTML = configuration.content;\n\n      return {\n        ref: null,\n        rootNode: contentRoot\n      };\n    }\n\n    if (configuration.content instanceof TemplateRef) {\n      const embeddedView = configuration.content.createEmbeddedView(configuration.context || {});\n\n      this._applicationRef.attachView(embeddedView);\n\n      return {\n        ref: embeddedView,\n        /**\n         * If the markups inside the provided template ref aren't being wrapped inside\n         * a containing DOM element, then there will be multiple root nodes, in this case,\n         * we want to add them all as the content by appending them to a document fragment\n         */\n        rootNode: embeddedView.rootNodes.reduce((contentRoot: Element, next) => {\n          contentRoot.appendChild(next);\n\n          return contentRoot;\n        }, document.createDocumentFragment())\n      };\n    }\n\n    const componentRef = createComponent(configuration.content, { environmentInjector: this._applicationRef.injector });\n\n    this._applicationRef.attachView(componentRef.hostView);\n\n    return {\n      ref: componentRef,\n      rootNode: componentRef.location.nativeElement as Element\n    };\n  }\n\n  /**\n   * Show a tooltip anchored at the provided x/y coordinates with a configuration object specified by `configuration`.\n   * Ensure that the last opened tooltip has been closed before calling this method.\n   *\n   * @param x The x coordinate to place the tooltip.\n   * @param y The y coordinate to place the tooltip.\n   * @param configuration The configuration object for this tooltip instance.\n   */\n  showAt(x: number, y: number, configuration: TooltipConfiguration) {\n    const result = this._prepareTooltip(configuration);\n\n    result.tooltipRef.instance.showAt(x, y, result.content.rootNode);\n\n    this._openedTooltips.add(result.tooltipRef.instance);\n  }\n\n  /**\n   * Hide all opened tooltips.\n   */\n  hide() {\n    for (const openedTooltip of this._openedTooltips) {\n      openedTooltip.hide();\n    }\n\n    this._openedTooltips.clear();\n  }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n  AfterViewInit,\n  Directive,\n  ElementRef,\n  Host,\n  HostListener,\n  Inject,\n  Input,\n  OnDestroy,\n  PLATFORM_ID\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { Placement } from './placement';\nimport { Theme } from './theme';\nimport { TooltipService } from './tooltip.service';\nimport { isMobile, watchForLongPress } from './utils';\n\n@Directive({\n  selector: '[lcTooltip]',\n  standalone: true\n})\nexport class TooltipDirective implements OnDestroy, AfterViewInit {\n  @Input('lcTooltip')\n  _content = '';\n\n  // eslint-disable-next-line @angular-eslint/no-input-rename\n  @Input('lcTooltipPlacement')\n  _placement?: 'vertical' | 'horizontal' | Placement;\n\n  // eslint-disable-next-line @angular-eslint/no-input-rename\n  @Input('lcTooltipTheme')\n  _theme: Theme = 'light';\n\n  private _longPressEventSubscription?: Subscription;\n  private _isLongPressing = false;\n  private _timeoutId = -1;\n\n  constructor(\n    @Host() private readonly _hostElement: ElementRef<HTMLElement>,\n    @Inject(PLATFORM_ID) private readonly _platformId: object,\n    private readonly _tooltipService: TooltipService\n  ) {}\n\n  ngOnDestroy() {\n    this._tooltipService.hide();\n    this._longPressEventSubscription?.unsubscribe();\n  }\n\n  ngAfterViewInit() {\n    if (!isPlatformBrowser(this._platformId)) {\n      return;\n    }\n\n    if (isMobile()) {\n      this._longPressEventSubscription = watchForLongPress(this._hostElement.nativeElement).subscribe({\n        next: event => {\n          this._isLongPressing = true;\n          this._showTooltip(event);\n        }\n      });\n    }\n  }\n\n  private _showTooltip(event: MouseEvent | KeyboardEvent | PointerEvent) {\n    event.stopPropagation();\n\n    this._hideTooltip(event);\n\n    const tooltipAnchor = event.target as Element;\n\n    if ((tooltipAnchor instanceof HTMLButtonElement && tooltipAnchor.disabled) || this._content === '') {\n      return;\n    }\n\n    this._timeoutId = window.setTimeout(() => {\n      this._tooltipService.show(tooltipAnchor, {\n        content: this._content,\n        placement: this._placement as Placement,\n        theme: this._theme as Theme\n      });\n    }, 500);\n  }\n\n  private _hideTooltip(event: MouseEvent | KeyboardEvent) {\n    event.stopPropagation();\n    clearTimeout(this._timeoutId);\n\n    this._tooltipService.hide();\n  }\n\n  /**\n   * Tooltip is only shown on pointerover events iff we are not on a mobile device\n   */\n  @HostListener('pointerover', ['$event'])\n  protected _onShowTooltipOnHover(event: MouseEvent) {\n    if (!isMobile()) {\n      this._showTooltip(event);\n    }\n  }\n\n  @HostListener('keyup', ['$event'])\n  protected _onShowTooltipOnFocus(event: KeyboardEvent) {\n    if (document.activeElement === this._hostElement.nativeElement) {\n      this._showTooltip(event);\n    }\n  }\n\n  @HostListener('pointerout', ['$event'])\n  @HostListener('blur', ['$event'])\n  @HostListener('click', ['$event'])\n  protected _onHideTooltip(event: MouseEvent | KeyboardEvent) {\n    if (!this._isLongPressing) {\n      this._hideTooltip(event);\n    }\n  }\n\n  @HostListener('window:pointerup', ['$event'])\n  protected _onHideTooltipOnWindowPointerUp(event: PointerEvent) {\n    if (this._isLongPressing && event.target !== this._hostElement.nativeElement) {\n      this._hideTooltip(event);\n    }\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TooltipService"],"mappings":";;;;;;SAAgB,QAAQ,GAAA;IACtB,OAAO,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;AAC1D;;ACCM,SAAU,iBAAiB,CAAC,MAAmB,EAAA;AACnD,IAAA,IAAI,SAAiB,CAAC;AACtB,IAAA,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAgB,CAAC;AAE7C,IAAA,MAAM,WAAW,GAAG,CAAC,KAAmB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