{"version":3,"file":"talenra-ngx-base-overlay.mjs","sources":["../../../projects/ngx-base/overlay/src/backdrop/backdrop.component.ts","../../../projects/ngx-base/overlay/src/close-overlay/close-overlay.component.ts","../../../projects/ngx-base/overlay/src/close-overlay/close-overlay.component.html","../../../projects/ngx-base/overlay/src/layouts/overlay-layout/overlay-layout.component.ts","../../../projects/ngx-base/overlay/src/layouts/overlay-layout/overlay-layout.component.html","../../../projects/ngx-base/overlay/src/overlay/overlay.ref.ts","../../../projects/ngx-base/overlay/src/overlay/overlay.config.ts","../../../projects/ngx-base/overlay/src/layouts/confirmation/confirmation.component.ts","../../../projects/ngx-base/overlay/src/layouts/confirmation/confirmation.component.html","../../../projects/ngx-base/overlay/src/layouts/confirmation/confirmation.types.ts","../../../projects/ngx-base/overlay/src/overlay/zindex.util.ts","../../../projects/ngx-base/overlay/src/dom-handler/dom-handler.service.ts","../../../projects/ngx-base/overlay/src/overlay/overlay.component.ts","../../../projects/ngx-base/overlay/src/overlay/overlay.component.html","../../../projects/ngx-base/overlay/src/overlay/overlay.injector.ts","../../../projects/ngx-base/overlay/src/overlay/overlay.service.ts","../../../projects/ngx-base/overlay/talenra-ngx-base-overlay.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n/**\n * Backdrop to cover underlying content when a (custom) overlay is displayed.\n *\n * ```html\n * <!-- Custom Overlay Component -->\n * <div>Your custom overlay content goes here</div>\n * <talenra-backdrop></talenra-backdrop>\n * ```\n *\n * ### Import\n *\n * ```typescript\n * import { BackdropComponent } from '@talenra/ngx-base/overlay';\n * ```\n *\n */\n@Component({\n  selector: 'talenra-backdrop',\n  template: ``,\n  styleUrl: './backdrop.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BackdropComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { IconComponent } from '@talenra/ngx-base/icons';\n\n/**\n * Renders a close button as used in Overlay Layout.\n *\n * ```html\n * <talenra-close-overlay (click)=\"close()\"></talenra-close-overlay>\n * ```\n *\n * ### Import\n *\n * ```typescript\n *  import { CloseOverlayComponent } from '@talenra/ngx-base/overlay';\n * ```\n */\n@Component({\n  selector: 'talenra-close-overlay',\n  imports: [IconComponent],\n  templateUrl: './close-overlay.component.html',\n  styleUrl: './close-overlay.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CloseOverlayComponent {}\n","<talenra-icon class=\"icon\" name=\"close\"/>\n","import { Component, Input, input, numberAttribute } from '@angular/core';\nimport { TWorkspaceWidth, WorkspaceWidth } from '@talenra/ngx-base/app-layout';\nimport { WorkspaceSimpleComponent } from '@talenra/ngx-base/workspace-simple';\nimport { WorkspaceHeaderComponent } from '@talenra/ngx-base/workspace-header';\nimport { IconComponent } from '@talenra/ngx-base/icons';\nimport { CloseOverlayComponent } from '../../close-overlay/close-overlay.component';\nimport { OverlayRef } from '../../overlay/overlay.ref';\n\n/**\n * The overlay layout component is a layout component that can be used to display the content of an overlay\n *\n * ```html\n * <talenra-overlay-layout [overlayRef]=\"overlayRef\" [title]=\"title\" [subtitle]=\"subTitle\" [wideLayout]=\"false\">\n *   <app-pane class=\"sticky-bar\" sticky-bar>\n *     ...\n *   </app-pane>\n *   <app-pane class=\"pane\">\n *     ...\n *   </app-pane>\n *   <app-pane class=\"sticky-footer button-pane\" sticky-footer>\n *     ...\n *   </app-pane>\n * </talenra-overlay-layout>\n * ```\n *\n * ### Import\n *\n * ```typescript\n *  import { OverlayModule } from '@talenra/ngx-base/overlay';\n * ```\n *\n */\n@Component({\n  selector: 'talenra-overlay-layout',\n  templateUrl: './overlay-layout.component.html',\n  styleUrls: ['./overlay-layout.component.scss'],\n  imports: [WorkspaceSimpleComponent, WorkspaceHeaderComponent, IconComponent, CloseOverlayComponent],\n})\nexport class OverlayLayoutComponent {\n  /**\n   * Reference to overlay component\n   */\n  @Input({ required: true }) public overlayRef?: OverlayRef;\n\n  /**\n   * The title displayed to the user\n   */\n  @Input() public title: string = '';\n\n  /**\n   * The subtitle displayed to the user\n   */\n  @Input() public subtitle: string = '';\n\n  /**\n   * A numeric counter value attached to the title (visually represented as badge/call-out). Typically a number that\n   * represents the number of items contained in this section.\n   *\n   * ```html\n   * <talenra-overlay-layout ... counter=\"42\"></talenra-overlay-layout>\n   * ```\n   */\n  counter = input(undefined, { transform: numberAttribute });\n\n  /**\n   * The maximum value of the counter. If the counter value exceeds this limit, \"<counterMax>+\" will be displayed (e.g.\n   * \"99+\").\n   *\n   * ```html\n   * <talenra-overlay-layout ... counterMax=\"99\"></talenra-overlay-layout>\n   * ```\n   */\n  counterMax = input(undefined, { transform: numberAttribute });\n\n  /**\n   * Determines the maximum width of the layout. Defaults to `WorkspaceWidth.L`.\n   *\n   * ```html\n   * <talenra-overlay-layout width=\"s\"></talenra-overlay-layout>\n   * ```\n   *\n   * @see {@link WorkspaceWidth}\n   */\n  @Input() public width: TWorkspaceWidth = WorkspaceWidth.L;\n\n  /**\n   * Determines whether the overlay uses a header element.\n   *\n   * @see {@link ContentLayoutComponent#useHeader} for more information.\n   *\n   *\n   * ```html\n   * <!-- As `useHeader` defaults `true`, you could safely omit the input in this case. -->\n   * <talenra-overlay-layout [useHeader]=\"true\">\n   *   <div header>My header</div>\n   * </talenra-overlay-layout>\n   * ```\n   */\n  @Input() public useHeader = true;\n\n  /**\n   * Determines whether the overlay uses a sticky bar element.\n   *\n   * @see {@link ContentLayoutComponent#useStickyBar} for more information.\n   *\n   * ```html\n   * <!-- As `useStickyBar` defaults `true`, you could safely omit the input in this case. -->\n   * <talenra-overlay-layout [useStickyBar]=\"true\">\n   *   <div sticky-bar>My sticky bar</div>\n   * </talenra-overlay-layout>\n   * ```\n   */\n  @Input() public useStickyBar = true;\n\n  /**\n   * Determines whether the overlay uses a sticky footer element.\n   *\n   * @see {@link ContentLayoutComponent#useStickyFooter} for more information.\n   *\n   * ```html\n   * <!-- As `useStickyFooter` defaults `true`, you could safely omit the input in this case. -->\n   * <talenra-overlay-layout [useStickyFooter]=\"true\">\n   *   <div sticky-footer>My sticky footer</div>\n   * </talenra-overlay-layout>\n   * ```\n   */\n  @Input() public useStickyFooter = true;\n\n  /**\n   * Determines whether the content is allowed to take the full height and to cover the\n   * header when scrolled.\n   *\n   * @see {@link ContentLayoutComponent#overscrollHeader} for more information.\n   *\n   * ```html\n   * <talenra-overlay-layout [overscrollHeader]=\"false\">\n   *   <div header>My header</div>\n   *   <div>My scrollable Content</div>\n   * </talenra-overlay-layout>\n   * ```\n   */\n  @Input() public overscrollHeader = true;\n\n  /** @internal */\n  public close(): void {\n    this.overlayRef?.close();\n  }\n}\n","<talenra-workspace-simple\n  class=\"workspace\"\n  [width]=\"width\"\n  [useContentLayout]=\"true\"\n  [useHeader]=\"useHeader\"\n  [useStickyBar]=\"useStickyBar\"\n  [overscrollHeader]=\"overscrollHeader\">\n  <talenra-workspace-header\n    [title]=\"title\"\n    [subtitle]=\"subtitle\"\n    [counter]=\"counter()\"\n    [counterMax]=\"counterMax()\"\n    header />\n  <ng-container sticky-bar>\n    <ng-content select=\"[sticky-bar]\" />\n  </ng-container>\n  <ng-content />\n  <ng-container sticky-footer>\n    <ng-content select=\"[sticky-footer]\" />\n  </ng-container>\n</talenra-workspace-simple>\n\n<talenra-close-overlay class=\"close\" (click)=\"close()\" />\n\n<div class=\"backdrop\"></div>\n","import { Observable, Subject } from 'rxjs';\n\n/**\n * The `OverlayRef` is a reference to an overlay that has been created using the `OverlayService`.\n */\nexport class OverlayRef {\n  // private properties\n  private readonly _onHide = new Subject<void>();\n  private readonly _onReveal = new Subject<void>();\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  private readonly _onClose = new Subject<any>();\n  private readonly _onDestroy = new Subject<void>();\n  private _closeCallback?: () => Promise<boolean>;\n\n  // public methods\n\n  /**\n   * Closes the overlay.\n   *\n   * @param result The result to be passed to the onClose observable.\n   *\n   * The result can be accessed in the overlay component as follows:\n   *\n   * ```typescript\n   * const overlayRef = this.overlayService.open(OverlayComponent);\n   *\n   * overlayRef.onClose.subscribe((myString) => {\n   *    console.log('[OverlayDemo] onClose Subscription: ', myString);\n   *  });\n   * ```\n   *\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  close(result?: any) {\n    if (this._closeCallback) {\n      this._closeCallback().then((canClose) => {\n        if (canClose) {\n          this._onClose.next(result);\n          this._onClose.complete();\n        }\n      });\n    } else {\n      this._onClose.next(result);\n      this._onClose.complete();\n    }\n  }\n\n  /**\n   * Registers a custom close callback.\n   *\n   * @param callback The callback to be called when the overlay is closed.\n   *\n   * The callback must return a promise that resolves to a boolean value.\n   *\n   * Can be used to show the user a confirmation dialog before closing the overlay, e.g. if the form is invalid\n   *\n   * If the promise resolves to true, the overlay will be closed.\n   * If the promise resolves to false, the overlay will not be closed.\n   *\n   * ```typescript\n   * overlayRef.registerCloseCallback(() => {\n   *   return new Promise((resolve, _reject) => {\n   *     resolve(true);\n   *    }) as Promise<boolean>;\n   * });\n   * ```\n   *\n   */\n  registerCloseCallback(callback: () => Promise<boolean>) {\n    this._closeCallback = callback;\n  }\n\n  /**\n   * Removes the custom close callback\n   *\n   */\n  clearCloseCallback() {\n    this._closeCallback = undefined;\n  }\n\n  /**\n   * Destroys the overlay.\n   *\n   * This method is called by the `OverlayService` when the overlay is destroyed and does not need be called by the consumer.\n   */\n  destroy() {\n    this._onDestroy.next();\n  }\n\n  /**\n   * Hides the overlay.\n   *\n   * This method is called by the `OverlayService` when the overlay is hidden behind another overlay and does not need be called by the consumer.\n   */\n  hide() {\n    this._onHide.next();\n  }\n\n  /**\n   * Reveals the overlay.\n   *\n   * This method is called by the `OverlayService` when the overlay is revealed by closing the topmost overlay and does not need be called by the consumer.\n   */\n  reveal() {\n    this._onReveal.next();\n  }\n\n  // observables\n  /** @internal */\n  onHide: Observable<void> = this._onHide.asObservable();\n\n  /** @internal */\n  onReveal: Observable<void> = this._onReveal.asObservable();\n\n  /** @internal */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  onClose: Observable<any> = this._onClose.asObservable();\n\n  /** @internal */\n  onDestroy: Observable<void> = this._onDestroy.asObservable();\n}\n","/**\n * Configuration for the overlay service.\n * @see {@link OverlayService#open} for more information.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport class OverlayConfig<T = any> {\n  /**\n   * Prevents the overlay to be closed by hitting the 'Escape' key.\n   * @default false (not set)\n   *\n   * If set to true, the overlay will not be closed by hitting the 'Escape' key but only by calling the close() method on the overlayRef.\n   */\n  preventCloseOnEscape?: boolean;\n\n  /**\n   * Additional data to be passed to the overlay component.\n   *\n   * ```typescript\n   * const overlayRef = this.overlayService.open(OverlayComponent, {\n   *   data: {\n   *     title: 'Overlay Demo Title',\n   *     subTitle: 'Overlay Demo Subtitle',\n   *     },\n   *  });\n   * ```\n   *\n   *  The data can be accessed in the overlay component as follows:\n   *\n   * ```typescript\n   * export class OverlayComponent {\n   *   constructor(private overlayRef: OverlayRef, config: OverlayConfig) {\n   *     console.log(config.data.title); // 'Overlay Demo Title'\n   *     console.log(config.data.subTitle); // 'Overlay Demo Subtitle'\n   *   }\n   * }\n   * ```\n   */\n  data?: T;\n}\n","import { ChangeDetectionStrategy, Component, computed, effect, inject, signal } from '@angular/core';\nimport { ButtonComponent } from '@talenra/ngx-base/button';\nimport { CopyContentButtonComponent } from '@talenra/ngx-base/copy-content';\nimport { IConfirmationButtonConfig, IConfirmationConfig } from './confirmation.types';\nimport { OverlayRef } from '../../overlay/overlay.ref';\nimport { OverlayConfig } from '../../overlay/overlay.config';\nimport { BackdropComponent } from '../../backdrop/backdrop.component';\n\n/**\n * Max length of additional information text in chars. Will be displayed truncated if exceeding this value.\n * CopyContent will always copy the full text to clipboard.\n *\n * @internal\n */\nconst MAX_ADDITIONAL_INFORMATION_LENGTH = 500;\n\n/**\n * Component representing a confirmation dialog.\n *\n * ### Import\n *\n * ```typescript\n * import { ConfirmationComponent } from '@talenra/ngx-base/overlay';\n * ```\n */\n@Component({\n  selector: 'talenra-confirmation',\n  templateUrl: './confirmation.component.html',\n  styleUrl: './confirmation.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  imports: [BackdropComponent, ButtonComponent, CopyContentButtonComponent],\n})\nexport class ConfirmationComponent {\n  private overlayRef = inject(OverlayRef, { optional: true });\n  private overlayConfig = inject(OverlayConfig, { optional: true });\n\n  /** @internal */\n  public dialogConfig = signal<IConfirmationConfig>(this.overlayConfig?.data as IConfirmationConfig);\n  protected additionalInformationExpanded = signal<boolean>(false);\n\n  protected additionalInformationTruncated = computed<string>(() => {\n    const value: string = this.dialogConfig()?.additionalInformation || '';\n    return value?.length > MAX_ADDITIONAL_INFORMATION_LENGTH\n      ? value.substring(0, MAX_ADDITIONAL_INFORMATION_LENGTH - 1) + '…'\n      : value;\n  });\n\n  /** @internal */\n  constructor() {\n    // Additional information: Update expanded state when dialog conifg changes\n    effect(() => {\n      this.additionalInformationExpanded.set(!this.dialogConfig()?.isAdditionalInformationCollapsible);\n    });\n  }\n\n  /** Additional information: Toggle expanded state */\n  protected toggleExpanded(): void {\n    this.additionalInformationExpanded.update((value) => !value);\n  }\n\n  protected close() {\n    this.overlayRef?.close();\n  }\n\n  protected handle(buttonConfig: IConfirmationButtonConfig) {\n    buttonConfig.action();\n    this.close();\n  }\n}\n","<div class=\"card\" data-testid=\"confirmation\">\n  @if (dialogConfig() !== null) {\n    @if (dialogConfig().cancel || dialogConfig().additionalCancel) {\n      <button\n        talenra-button\n        class=\"close-button\"\n        tabindex=\"0\"\n        name=\"close\"\n        kind=\"ghost\"\n        size=\"s\"\n        icon=\"close\"\n        (click)=\"close()\"></button>\n    }\n\n    <div class=\"icon\" [class]=\"'level--' + dialogConfig().level?.toString()\" data-testid=\"confirmation-level\"></div>\n\n    <div class=\"content-container\">\n      <div class=\"content\">\n        <p data-testid=\"confirmation-message\">{{ dialogConfig().message }}</p>\n        @if (dialogConfig().additionalInformation) {\n          <div\n            class=\"additional-information\"\n            data-testid=\"confirmation-additional-information\"\n            [class.expanded]=\"additionalInformationExpanded()\">\n            <div class=\"inner\">\n              <p>{{ additionalInformationTruncated() }}</p>\n            </div>\n          </div>\n        }\n      </div>\n      @if (\n        (dialogConfig().additionalInformation && dialogConfig().isAdditionalInformationCollapsible) ||\n        dialogConfig().isContentCopyable\n      ) {\n        <div class=\"mini-buttons\">\n          @if (dialogConfig().additionalInformation && dialogConfig().isAdditionalInformationCollapsible) {\n            <button\n              talenra-button\n              size=\"s\"\n              kind=\"ghost\"\n              [icon]=\"additionalInformationExpanded() ? 'expand-less' : 'expand-more'\"\n              (click)=\"toggleExpanded()\"\n              data-testid=\"confirmation-toggle-additional-information-button\"></button>\n          }\n          @if (dialogConfig().isContentCopyable) {\n            <talenra-copy-content-button\n              class=\"copy-content\"\n              data-testid=\"confirmation-copy-content-button\"\n              [toCopy]=\"dialogConfig().message + '\\r\\n' + dialogConfig().additionalInformation\"\n              position=\"east\" />\n          }\n        </div>\n      }\n    </div>\n\n    <div class=\"actions\">\n      <button\n        talenra-button\n        autofocus\n        tabindex=\"1\"\n        [label]=\"dialogConfig().confirm.label\"\n        (click)=\"handle(dialogConfig().confirm)\"\n        data-testid=\"confirmation-confirm-button\"></button>\n      @if (dialogConfig().additionalConfirm) {\n        <button\n          talenra-button\n          tabindex=\"1\"\n          [label]=\"dialogConfig().additionalConfirm!.label\"\n          (click)=\"handle(dialogConfig().additionalConfirm!)\"\n          data-testid=\"confirmation-additional-confirm-button\"></button>\n      }\n      @if (dialogConfig().cancel) {\n        <button\n          talenra-button\n          tabindex=\"1\"\n          kind=\"secondary\"\n          [label]=\"dialogConfig().cancel!.label\"\n          (click)=\"handle(dialogConfig().cancel!)\"\n          data-testid=\"confirmation-cancel-button\"></button>\n      }\n      @if (dialogConfig().additionalCancel) {\n        <button\n          talenra-button\n          tabindex=\"1\"\n          kind=\"secondary\"\n          [label]=\"dialogConfig().additionalCancel!.label\"\n          (click)=\"handle(dialogConfig().additionalCancel!)\"\n          data-testid=\"confirmation-additional-cancel-button\"></button>\n      }\n    </div>\n  }\n</div>\n\n<talenra-backdrop />\n","/**\n * Values accepted by `IConfirmationConfig`'s `level` property. `ConfirmationLevel` represents the different levels of\n * confirmation dialogs.\n *\n * ```typescript\n * private config: IConfirmationConfig = {\n *   level: ConfirmationLevel.Info,\n *   message: 'My Confirmation Message',\n *   confirm: {\n *     label: 'Button Label',\n *     action: () => {\n *       console.log('Confirm clicked');\n *     },\n *   },\n * };\n * ```\n *\n * ### Import\n *\n * ```typescript\n * import { ConfigurationLevel } from '@talenra/ngx-base/overlay';\n * ```\n *\n * @see {@link ConfirmationComponent}\n */\nexport const ConfirmationLevel = {\n  Info: 'information',\n  Warning: 'warning',\n  Error: 'error',\n} as const;\n\n/**\n * Type of values accepted by `ConfirmationConfig`'s `level` property. `ConfirmationLevel` represents the different\n * levels of confirmation dialogs.\n *\n * ### Import\n *\n * ```typescript\n * import { TConfirmationLevel } from '@talenra/ngx-base/overlay';\n * ```\n *\n * @see {@link ConfirmationLevel}\n * @see {@link ConfirmationComponent}\n */\nexport type TConfirmationLevel = (typeof ConfirmationLevel)[keyof typeof ConfirmationLevel];\n\n/**\n * Configuration of the buttons in the dialog.\n *\n * ### Import\n *\n * ```typescript\n * import { IConfirmationButtonConfig } from '@talenra/ngx-base/overlay';\n * ```\n * @see {@link IConfirmationConfig}\n * @see {@link ConfirmationComponent}\n */\nexport interface IConfirmationButtonConfig {\n  /** The label of the button. */\n  label: string;\n  /** The action to be executed when the button is clicked. */\n  action: () => void;\n}\n\n/**\n * Configuration of the confirmation dialog.\n *\n * ```typescript\n * private config: IConfirmationConfig = {\n *   level: ConfirmationLevel.Info,\n *   message: 'My Confirmation Message',\n *   confirm: {\n *     label: 'Button Label',\n *     action: () => {\n *       console.log('Confirm clicked');\n *     },\n *   },\n * };\n * ```\n *\n * ### Import\n *\n * ```typescript\n * import { IConfirmationConfig } from '@talenra/ngx-base/overlay';\n * ```\n *\n * @see {@link ConfirmationComponent}\n */\nexport interface IConfirmationConfig {\n  /** The name of the icon to be displayed in the dialog. */\n  level: TConfirmationLevel;\n  /** The main text to be displayed in the dialog. */\n  message?: string;\n  /** The additional information to be displayed in the dialog. */\n  additionalInformation?: string;\n  /** Whether additional information's visibility can be toggled.  */\n  isAdditionalInformationCollapsible?: boolean;\n  /** Whether a CopyContent button is shown. */\n  isContentCopyable?: boolean;\n  /** The configuration for the confirm button. */\n  confirm: IConfirmationButtonConfig;\n  /** The configuration for the additional action button. */\n  additionalConfirm?: IConfirmationButtonConfig;\n  /** The configuration for the cancel button. */\n  cancel?: IConfirmationButtonConfig;\n  /** The configuration for the additional cancel button. */\n  additionalCancel?: IConfirmationButtonConfig;\n}\n","/** @internal */\nfunction ZIndexUtil() {\n  /**\n   * Lowest z-index value that will be used.\n   */\n  const minZIndex = 1;\n\n  /**\n   * Stack of existing z-indexes\n   */\n  let zIndexes: number[] = [];\n\n  /**\n   * Return a new z-index value. The returned z-index will be greater than all existing z-indexes so the consuming\n   * element will be on top.\n   */\n  const generateZIndex = (): number => {\n    const lastZIndex: number = zIndexes.length > 0 ? zIndexes[zIndexes.length - 1] : minZIndex - 1;\n    const newZIndex: number = lastZIndex + 1;\n    zIndexes.push(newZIndex);\n    return newZIndex;\n  };\n\n  /**\n   * Removes the given z-index from the list of existing z-indexes.\n   */\n  const revertZIndex = (zIndex: number): void => {\n    zIndexes = zIndexes.filter((item) => item !== zIndex);\n  };\n\n  /**\n   * Returns the current z-index of the given element or 0.\n   */\n  const getZIndex = (el: HTMLElement): number => {\n    return el ? parseInt(el.style.zIndex, 10) || 0 : 0;\n  };\n\n  return {\n    /**\n     * Sets the z-index of the given element to a new value os it will be on top.\n     */\n    set: (el?: HTMLElement | null): void => {\n      if (!el) return;\n      el.style.zIndex = String(generateZIndex());\n    },\n\n    /**\n     * Removes the z-index from the given element.\n     */\n    clear: (el?: HTMLElement | null): void => {\n      if (!el) return;\n      revertZIndex(getZIndex(el));\n      el.style.zIndex = '';\n    },\n  };\n}\n\nexport default ZIndexUtil();\n","import { Injectable, inject } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\n\n/** @internal */\n@Injectable({\n  providedIn: 'root',\n})\nexport class DomHandler {\n  public getTalenraOverlayContainer(): HTMLElement | null {\n    const appFrame = document.querySelector('talenra-app-frame') as HTMLElement;\n    return appFrame?.querySelector('.overlay-container') as HTMLElement;\n  }\n\n  public getCdkOverlayContainer(): HTMLElement | null {\n    return document.querySelector('.cdk-overlay-container') as HTMLElement;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public addClass(element: any, className: string): void {\n    if (element && className) {\n      if (element.classList) element.classList.add(className);\n      else element.className += ' ' + className;\n    }\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public removeClass(element: any, className: string): void {\n    if (element && className) {\n      if (element.classList) element.classList.remove(className);\n      else\n        element.className = element.className.replace(\n          new RegExp('(^|\\\\b)' + className.split(' ').join('|') + '(\\\\b|$)', 'gi'),\n          ' '\n        );\n    }\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public appendChild(element: any, target: any) {\n    if (this.isElement(target)) target.appendChild(element);\n    else if (target && target.el && target.el.nativeElement) target.el.nativeElement.appendChild(element);\n    else throw 'Cannot append ' + target + ' to ' + element;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public isElement(obj: any) {\n    return typeof HTMLElement === 'object'\n      ? obj instanceof HTMLElement\n      : obj && typeof obj === 'object' && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === 'string';\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public findSingle(element: any, selector: string): any {\n    return this.isElement(element) ? element.querySelector(selector) : null;\n  }\n\n  public getFocusableElements(element: HTMLElement) {\n    const focusableElements = this.find(\n      element,\n      `button:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]),\n                [href]:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]),\n                input:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), select:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]),\n                textarea:not([tabindex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]), [tabIndex]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]),\n                [contenteditable]:not([tabIndex = \"-1\"]):not([disabled]):not([style*=\"display:none\"]):not([hidden]):not(.p-disabled)`\n    );\n\n    const visibleFocusableElements = [];\n    for (const focusableElement of focusableElements) {\n      if (!!(focusableElement.offsetWidth || focusableElement.offsetHeight || focusableElement.getClientRects().length))\n        visibleFocusableElements.push(focusableElement);\n    }\n    return visibleFocusableElements;\n  }\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public find(element: any, selector: string): any[] {\n    if (!this.isElement(element)) {\n      return [];\n    }\n    if (!element.querySelectorAll) {\n      return [];\n    }\n    return Array.from(element.querySelectorAll(selector));\n  }\n\n  /**\n   * Get CSS value of a given property of a given element or empty string.\n   */\n  public static cssValue(element: Element, property: string): string {\n    return element ? getComputedStyle(element).getPropertyValue(property) : '';\n  }\n\n  /**\n   * Converts CSS time values to numbers (ms)\n   * '0.3s' → 300\n   * '300ms' → 300\n   * '12' → 0 (invalid CSS time value)\n   */\n  public static cssTimeToMs(cssValue: string): number {\n    const value: number = parseFloat(cssValue);\n    return cssValue.endsWith('ms') ? value : cssValue.endsWith('s') ? value * 1000 : 0;\n  }\n}\n","import {\n  AfterViewInit,\n  ChangeDetectorRef,\n  Component,\n  ComponentRef,\n  DestroyRef,\n  ElementRef,\n  inject,\n  NgZone,\n  OnDestroy,\n  Renderer2,\n  Type,\n  ViewChild,\n  ViewContainerRef,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { OverlayConfig } from './overlay.config';\nimport { OverlayRef } from './overlay.ref';\nimport ZIndexUtil from './zindex.util';\nimport { DomHandler } from '../dom-handler/dom-handler.service';\n\n/** @internal */\n@Component({\n  selector: 'talenra-overlay',\n  templateUrl: './overlay.component.html',\n  styleUrls: ['./overlay.component.scss'],\n  host: {\n    '[inert]': 'inert',\n  },\n})\nexport class OverlayComponent implements AfterViewInit, OnDestroy {\n  private document = inject<Document>(DOCUMENT);\n  private cd = inject(ChangeDetectorRef);\n  config = inject(OverlayConfig);\n  renderer = inject(Renderer2);\n  private overlayRef = inject(OverlayRef);\n  zone = inject(NgZone);\n  private domHandler = inject(DomHandler);\n\n  @ViewChild('contentViewRef', { read: ViewContainerRef }) contentViewRef: ViewContainerRef | undefined;\n  @ViewChild('mask') maskViewChild: ElementRef | undefined;\n  @ViewChild('container') containerRef: ElementRef | undefined;\n\n  private destroyRef = inject(DestroyRef);\n\n  private container: HTMLDivElement | null | undefined;\n  private wrapper: HTMLElement | null | undefined;\n\n  private documentKeydownListenerFnForRemoving: VoidFunction | null | undefined;\n\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  private componentRef: ComponentRef<any> | undefined;\n  public identifier: number | undefined;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  public childComponentType: Type<any> | undefined;\n\n  private inert: true | null = null;\n\n  constructor() {\n    this.overlayRef.onHide.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n      this.onHide();\n    });\n    this.overlayRef.onReveal.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n      this.onReveal();\n    });\n  }\n\n  // framework methods\n  ngAfterViewInit() {\n    if (!this.childComponentType) return;\n    this.loadChildComponent(this.childComponentType);\n\n    this.container = this.containerRef?.nativeElement as HTMLDivElement;\n    this.wrapper = (this.container as HTMLDivElement).parentElement;\n\n    this.cd.detectChanges();\n    setTimeout(() => {\n      this.domHandler.addClass(this.wrapper, 'is-visible');\n    });\n\n    this.moveOnTop();\n    this.bindGlobalListeners();\n    this.focusFirstFocusableElement();\n\n    this.cd.detectChanges();\n  }\n\n  ngOnDestroy() {\n    ZIndexUtil.clear(this.wrapper);\n    if (this.componentRef) {\n      this.componentRef.destroy();\n    }\n  }\n\n  // public methods\n  close() {\n    this.domHandler.removeClass(this.wrapper, 'is-visible');\n    this.onContainerDestroy();\n    this.overlayRef.destroy();\n    this.cd.markForCheck();\n  }\n\n  // creation methods\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  private loadChildComponent(componentType: Type<any>) {\n    this.contentViewRef?.clear();\n    this.componentRef = this.contentViewRef?.createComponent(componentType);\n  }\n\n  private bindGlobalListeners() {\n    this.bindDocumentKeydownListener();\n  }\n\n  private bindDocumentKeydownListener() {\n    if (this.documentKeydownListenerFnForRemoving) {\n      return;\n    } else {\n      this.zone.runOutsideAngular(() => {\n        this.documentKeydownListenerFnForRemoving = this.renderer.listen(\n          this.document,\n          'keydown',\n          this.onKeydown.bind(this)\n        );\n      });\n    }\n  }\n\n  // lifecycle methods\n  private onHide() {\n    this.inert = true;\n    this.unbindGlobalListeners();\n  }\n\n  private onReveal() {\n    this.inert = null;\n    this.bindGlobalListeners();\n    this.focusFirstFocusableElement();\n  }\n\n  // cleanup methods\n  private closeViaComponentRef() {\n    if (this.overlayRef) {\n      this.overlayRef.close();\n    }\n  }\n\n  private unbindGlobalListeners() {\n    this.unbindDocumentKeydownListener();\n  }\n\n  private unbindDocumentKeydownListener() {\n    if (this.documentKeydownListenerFnForRemoving) {\n      this.documentKeydownListenerFnForRemoving();\n      this.documentKeydownListenerFnForRemoving = null;\n    }\n  }\n\n  // helper methods\n  private moveOnTop() {\n    ZIndexUtil.set(this.wrapper);\n  }\n\n  private onContainerDestroy() {\n    this.unbindGlobalListeners();\n    this.container = null;\n  }\n\n  private onKeydown(event: KeyboardEvent) {\n    // escape\n    if (event.key === 'Escape') {\n      const cdkContainer = this.domHandler.getCdkOverlayContainer();\n      const cdkOverlayActive = cdkContainer && cdkContainer.children.length > 0;\n      if (!this.config.preventCloseOnEscape && !cdkOverlayActive) {\n        event.preventDefault();\n        this.closeViaComponentRef();\n      }\n    }\n  }\n\n  private focusFirstFocusableElement() {\n    const autoFocusElement = this.domHandler.findSingle(this.container, '[autofocus]');\n    if (autoFocusElement) {\n      this.focus(autoFocusElement);\n      return;\n    }\n\n    const focusableElements = this.domHandler.getFocusableElements(this.container as HTMLDivElement);\n    if (focusableElements && focusableElements.length > 0) {\n      this.focus(focusableElements[0]);\n    }\n  }\n\n  private focus(element: HTMLElement) {\n    this.zone.runOutsideAngular(() => {\n      element.focus();\n    });\n  }\n}\n","<div #container class=\"container\">\n  <div #contentViewRef></div>\n</div>\n<div class=\"mask\" #mask></div>\n","import { Injector, ProviderToken } from '@angular/core';\n\n/** @internal */\nexport class OverlayInjector implements Injector {\n  constructor(\n    private _parentInjector: Injector,\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    private _additionalTokens: WeakMap<any, any>\n  ) {}\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  get<T>(token: ProviderToken<T>, notFoundValue?: T): T {\n    const value = this._additionalTokens.get(token);\n\n    if (value) return value;\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    return this._parentInjector.get<any>(token, notFoundValue);\n  }\n}\n","import {\n  ApplicationRef,\n  ComponentRef,\n  createComponent,\n  EmbeddedViewRef,\n  Injectable,\n  Injector,\n  NgZone,\n  Renderer2,\n  RendererFactory2,\n  Type,\n  inject,\n} from '@angular/core';\nimport { OverlayComponent } from './overlay.component';\nimport { OverlayRef } from './overlay.ref';\nimport { OverlayConfig } from './overlay.config';\nimport { OverlayInjector } from './overlay.injector';\nimport { DomHandler } from '../dom-handler/dom-handler.service';\n\n/**\n * The `OverlayService` is a service that provides an overlay for displaying content on top of other content.\n *\n * ```typescript\n * displayOverlay() {\n *   this.overlayRef = this.overlayService.open(CustomOverlayComponent, {\n *     data: {\n *       title: 'title',\n *     },\n *   });\n *   this.overlayRef.onClose.subscribe((myString) => {\n *     console.log('[OverlayDemo] onClose Subscription: ', myString);\n *   });\n * }\n * ```\n *\n * ### Import\n *\n * ```typescript\n *  import { OverlayModule } from '@talenra/ngx-base/overlay';\n * ```\n *\n */\n@Injectable({\n  providedIn: 'root',\n})\nexport class OverlayService {\n  private overlayComponentRefMap: Map<OverlayRef, ComponentRef<OverlayComponent>> = new Map();\n  private overlayStack: OverlayRef[] = [];\n  private talenraOverlayContainer: HTMLElement | null | undefined;\n  private renderer: Renderer2;\n\n  private appRef = inject(ApplicationRef);\n  private injector = inject(Injector);\n  private domHandler = inject(DomHandler);\n  private zone = inject(NgZone);\n\n  /** @internal */\n  constructor() {\n    const renderFactory = inject(RendererFactory2);\n\n    this.renderer = renderFactory.createRenderer(null, null);\n  }\n\n  /**\n   * Opens an overlay with a given component type and configuration.\n   *\n   * @param componentType The type of the component to load into the overlay.\n   * @param config The configuration for the overlay (can be null).\n   * @returns A reference to the newly-opened overlay.\n   *\n   * ```typescript\n   * const overlayRef = this.overlayService.open(CustomComponentForOverlayComponent, {\n   *   data: {\n   *     title: 'Overlay Demo Title',\n   *     subTitle: 'Overlay Demo Subtitle',\n   *   },\n   * });\n   * ```\n   */\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  open(componentType: Type<any>, config?: OverlayConfig) {\n    this.talenraOverlayContainer = this.domHandler.getTalenraOverlayContainer();\n    const dialogRef = this.appendDialogComponentToAppFrame(config || ({} as OverlayConfig));\n\n    const componentInstance = this.overlayComponentRefMap.get(dialogRef)?.instance;\n    if (componentInstance) {\n      componentInstance.identifier = this.overlayStack.length;\n      componentInstance.childComponentType = componentType;\n      // clear the cdk container if this is the first overlay\n      if (this.overlayStack.length === 1) {\n        this.closePotentiallyOpenElementsOnTheCdkOverlayLayer();\n      }\n    }\n\n    return dialogRef;\n  }\n\n  private appendDialogComponentToAppFrame(config: OverlayConfig) {\n    const map = new WeakMap();\n    map.set(OverlayConfig, config);\n\n    const overlayRef = new OverlayRef();\n    map.set(OverlayRef, overlayRef);\n\n    const sub = overlayRef.onClose.subscribe(() => {\n      const overlayRefInstance = this.overlayComponentRefMap.get(overlayRef)?.instance;\n      if (overlayRefInstance) overlayRefInstance.close();\n    });\n\n    const destroySub = overlayRef.onDestroy.subscribe(() => {\n      this.removeDialogComponentFromAppFrame(overlayRef);\n      this.revealTopOverlay();\n      destroySub.unsubscribe();\n      sub.unsubscribe();\n    });\n\n    const componentRef = createComponent(OverlayComponent, {\n      environmentInjector: this.appRef.injector,\n      elementInjector: new OverlayInjector(this.injector, map),\n    });\n\n    this.appRef.attachView(componentRef.hostView);\n\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const domElem = (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n    this.domHandler.appendChild(domElem, this.talenraOverlayContainer);\n\n    this.overlayStack.push(overlayRef);\n    this.updateDom();\n\n    this.overlayComponentRefMap.forEach((_component, componentRef) => {\n      componentRef.hide();\n    });\n    this.overlayComponentRefMap.set(overlayRef, componentRef);\n\n    return overlayRef;\n  }\n\n  private removeDialogComponentFromAppFrame(overlayRef: OverlayRef) {\n    if (!overlayRef || !this.overlayComponentRefMap.has(overlayRef)) {\n      return;\n    }\n\n    // Read transition duration from stylesheet. Requires value to be stored in variable named `--transition-duration`.\n    const overlayElement: Element | undefined = document.getElementsByTagName('talenra-overlay')[0];\n    const durationStr: string = DomHandler.cssValue(overlayElement, '--transition-duration');\n    const transitionDuration: number = DomHandler.cssTimeToMs(durationStr);\n\n    const overlayComponentRef = this.overlayComponentRefMap.get(overlayRef);\n    if (overlayComponentRef) {\n      setTimeout(() => {\n        this.zone.run(() => {\n          this.appRef.detachView(overlayComponentRef.hostView);\n          overlayComponentRef.destroy();\n        });\n      }, transitionDuration);\n    }\n    this.overlayComponentRefMap.delete(overlayRef);\n    this.overlayStack.pop();\n    this.updateDom();\n  }\n\n  private revealTopOverlay() {\n    if (this.overlayStack.length > 0) {\n      this.overlayStack[this.overlayStack.length - 1].reveal();\n    }\n  }\n\n  /**\n   * Handles DOM manipulations required by other components (currently AppFrame only). Setting classes/attributes\n   * directly has the advantage that consuming components don't need to import the OverlayService (they might not\n   * even make use of overlays).\n   */\n  private updateDom(): void {\n    const hasOverlay: boolean = this.overlayStack.length > 0;\n    // Set/remove .has-overlay class on the body element\n    hasOverlay\n      ? this.renderer.addClass(document.body, 'has-overlay')\n      : this.renderer.removeClass(document.body, 'has-overlay');\n    // Set/remove inert attribute on talenra-app-frame .body element\n    const selector = 'talenra-app-frame .body';\n    if (!document.querySelector(selector)) return;\n    const frameBody: HTMLElement | null = this.renderer.selectRootElement(selector, true) as HTMLElement;\n    hasOverlay\n      ? this.renderer.setAttribute(frameBody, 'inert', 'true')\n      : this.renderer.removeAttribute(frameBody, 'inert');\n  }\n\n  private closePotentiallyOpenElementsOnTheCdkOverlayLayer() {\n    /**\n     * There is a rare edge case. If you open an talenra UI Select and the List option is displayed and\n     * an overlay is opened at this moment (e.g. via `setTimeout`), the List option remains on the\n     * CDK overlay layer and is displayed above the talenra UI overlay.\n     *\n     * If such a case should occur, this would be the right place to search for and close the List option.\n     *\n     * \"ContentOverlay: Dispose content on Material CDK overlay\"\n     * https://gitlab.svanet.ch/talenra/talenra-workspace/-/issues/297\n     * - There is also a video of this behavior in the issue.\n     *\n     * In an earlier version, we removed all elements on the CDK overlay layer from the DOM. However,\n     * this leads to problems in the client apps:\n     *\n     * \"Opening an Overlay erases CDK overlays which later results in errors and bugs\n     * https://gitlab.svanet.ch/talenra/talenra-workspace/-/issues/380\n     */\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ZIndexUtil"],"mappings":";;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;AAeG;MAOU,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA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