{"version":3,"file":"odx-angular-components-modal.mjs","sources":["../../../../libs/angular/components/modal/src/lib/models/modal-hero-variant.ts","../../../../libs/angular/components/modal/src/lib/models/modal-ref.ts","../../../../libs/angular/components/modal/src/lib/models/modal-size.ts","../../../../libs/angular/components/modal/src/lib/models/modal-variant.ts","../../../../libs/angular/components/modal/src/lib/helpers/inject-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/helpers/provide-modal-ref.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-close.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-content.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/modal-dismiss.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/prevent-form-method-dialog.directive.ts","../../../../libs/angular/components/modal/src/lib/directives/prevent-method-dialog.directive.ts","../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-footer/modal-footer.component.html","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-header/modal-header.component.html","../../../../libs/angular/components/modal/src/lib/components/modal-hero/modal-hero.component.ts","../../../../libs/angular/components/modal/src/lib/components/modal-hero/modal-hero.component.html","../../../../libs/angular/components/modal/src/lib/components/basic-modal/basic-modal.component.ts","../../../../libs/angular/components/modal/src/lib/components/basic-modal/basic-modal.component.html","../../../../libs/angular/components/modal/src/lib/modal.component.ts","../../../../libs/angular/components/modal/src/lib/modal.component.html","../../../../libs/angular/components/modal/src/lib/modal.config.ts","../../../../libs/angular/components/modal/src/lib/modal.service.ts","../../../../libs/angular/components/modal/src/lib/modal.directive.ts","../../../../libs/angular/components/modal/src/lib/modal.module.ts","../../../../libs/angular/components/modal/src/odx-angular-components-modal.ts"],"sourcesContent":["export type ModalHeroVariant = (typeof ModalHeroVariant)[keyof typeof ModalHeroVariant];\n\nexport const ModalHeroVariant = {\n  PRIMARY: 'primary',\n  SUCCESS: 'success',\n  CONFIRMATION: 'confirmation',\n  DANGER: 'danger',\n} as const;\n","import { Controller } from '@odx/angular';\nimport { deepmerge } from '@odx/angular/internal';\nimport { Subject } from 'rxjs';\nimport { ModalOptions } from './modal-options';\n\n/**\n * A reference to a dynamically created modal, providing methods to manipulate, close, or update the modal's state\n * and options.\n * This class extends the `Controller` base class from `@odx/angular`, adding modal-specific functionalities like\n * handling closures and dismissals.\n *\n * @template Data - The type of data passed to the modal.\n * @template Result - The type of the result emitted when the modal is closed.\n *\n * @see {Controller}\n */\nexport class ModalRef<Data = unknown, Result = unknown> extends Controller {\n  private readonly onClose$$ = new Subject<Result>();\n  private readonly onDismiss$$ = new Subject<void>();\n  private readonly onDestroy$$ = new Subject<void>();\n\n  /** An observable that emits when the modal is closed with a result. */\n  public readonly onClose$ = this.onClose$$.asObservable();\n\n  /** An observable that emits when the modal is dismissed without a result. */\n  public readonly onDismiss$ = this.onDismiss$$.asObservable();\n\n  /** An observable that emits when modal is destroyed regardless of the trigger path. */\n  public readonly onDestroy$ = this.onDestroy$$.asObservable();\n\n  /** A method that returns whether the modal is currently active. */\n  public readonly isActive: () => boolean;\n\n  /** Gets the unique identifier for the modal instance.\n   *\n   * @returns {string} The unique identifier for the modal instance.\n   */\n  public get id(): string {\n    return this.options.id;\n  }\n\n  /** Gets the ARIA label ID for the modal title, based on the modal's ID.\n   *\n   * @returns {string} The ARIA label ID for the modal title.\n   */\n  public get modalTitleId(): string {\n    return `${this.options.id}-title`;\n  }\n\n  /** Gets the data passed to the modal. This is useful for modal initialization.\n   *\n   * @returns {Data} The data passed to the modal.\n   */\n  public get data(): Data {\n    return this.internalOptions.data;\n  }\n\n  /** Gets the current options for the modal. These options include configurations.\n   *\n   * @template Data - The type of data passed to the modal.\n   * @returns {ModalOptions<Data>} The current options for the modal.\n   */\n  public get options(): ModalOptions<Data> {\n    return this.internalOptions;\n  }\n\n  constructor(\n    private internalOptions: ModalOptions<Data>,\n    isActive: (modalRef: ModalRef<Data, Result>) => boolean,\n  ) {\n    super();\n    this.isActive = () => isActive(this);\n  }\n\n  /**\n   * Updates the modal's options.\n   *\n   * @param {Partial<ModalOptions<Data>>} options A partial set of options to update.\n   */\n  public update(options: Partial<ModalOptions<Data>>): void {\n    this.internalOptions = deepmerge(this.internalOptions, options) as ModalOptions<Data>;\n    this.triggerControllerChange();\n  }\n\n  /**\n   * Dismisses the modal. This does not result in an output value.\n   *\n   * @param {boolean} [force=false] Whether to force dismissal regardless of the `canDismiss` condition.\n   */\n  public dismiss(force = false): void {\n    if (!force && !this.isActive()) return;\n    if (this.options.canDismiss?.(this.data) === false) return;\n    this.onDismiss$$.next();\n    this.destroy();\n  }\n\n  /**\n   * Closes the modal with a result.\n   *\n   * @param {Result} result The result to emit when the modal closes.\n   */\n  public close(result: Result): void {\n    if (!this.isActive()) return;\n    if (this.options.canClose?.(this.data) === false) return;\n    this.onClose$$.next(result);\n    this.destroy();\n  }\n\n  /** Completes the onClose and onDismiss streams and cleans up resources. */\n  public destroy(): void {\n    this.onDestroy$$.next();\n    this.onDestroy$$.complete();\n    this.onClose$$.complete();\n    this.onDismiss$$.complete();\n  }\n}\n","export type ModalSize = (typeof ModalSize)[keyof typeof ModalSize];\n\nexport const ModalSize = {\n  XSMALL: 'xsmall',\n  SMALL: 'small',\n  MEDIUM: 'medium',\n  LARGE: 'large',\n} as const;\n","export type ModalVariant = typeof ModalVariant[keyof typeof ModalVariant];\n\nexport const ModalVariant = {\n  DEFAULT: 'default',\n  SIDESHEET: 'sidesheet',\n} as const;\n","import { inject } from '@angular/core';\nimport { ModalRef } from '../models';\n\n/**\n * Utility function to inject a reference to a modal. This function simplifies the injection process by typing the `ModalRef` to the specific data and result expected by the consumer.\n *\n * This approach abstracts away Angular's inject function, providing direct access to the modal reference with the correct type. It is commonly used in components or services that interact with a modal dialog to manipulate its data, close it, or perform other related actions.\n *\n * @template Data The type of data passed to the modal.\n * @template Result The type of result expected when the modal closes.\n * @returns {ModalRef<Data, Result>} A strongly typed reference to the modal.\n *\n * @example\n * ```ts\n * // Injecting a modal reference in a component or service:\n * const modalRef = injectModalRef<SomeDataType, SomeResultType>();\n *\n * // Using the modal reference to close the modal and return a result:\n * modalRef.close(someResult);\n *\n * // Accessing the data provided to the modal:\n * const modalData = modalRef.data;\n * ```\n */\nexport function injectModalRef<Data, Result = unknown>(): ModalRef<Data, Result> {\n  return inject(ModalRef<Data, Result>);\n}\n","import { ValueProvider } from '@angular/core';\nimport { ModalRef } from '../models';\n\n/**\n * Provides a configuration for the Angular dependency injection system to inject a specific instance of `ModalRef`.\n * This function is particularly useful when you want to configure a provider for a `ModalRef` within an Angular module or component.\n *\n * @template D The data type expected by the modal.\n * @template R The result type that the modal will produce.\n * @param {ModalRef<D, R>} modalRef An instance of `ModalRef` to be provided.\n * @returns {ValueProvider} An Angular value provider that can be used in module or component providers arrays.\n */\nexport function provideModalRef<D = unknown, R = unknown>(modalRef: ModalRef<D, R>): ValueProvider {\n  return { provide: ModalRef, useValue: modalRef };\n}\n","import { Directive, HostListener, Input } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n/**\n * A directive that enables an element to close or dismiss a modal when clicked.\n * It can be used on any element within a modal to trigger the close or dismiss action, optionally passing a result back to the modal opener.\n *\n * The directive accepts an input value that determines the result to be passed back on modal close. If no value is provided, or it's explicitly set to `null`,\n * the modal is dismissed without sending a result. If the input value is `undefined`, the modal is dismissed via the `dismiss` method without passing any result.\n *\n * @template T - The type of the result to be emitted when the modal closes. Defaults to `unknown`.\n *\n * @example\n * Closing a modal and passing a result:\n * ```html\n * <button [odxModalClose]=\"myResult\">Close and send result</button>\n * ```\n *\n * Simply dismissing a modal without passing a result:\n * ```html\n * <button odxModalClose>Dismiss</button>\n * ```\n */\n@Directive({\n  standalone: true,\n  selector: '[odxModalClose]',\n})\nexport class ModalCloseDirective<T = unknown> {\n  private readonly modalRef = injectModalRef();\n\n  /**\n   * Represents the result to be passed back to the modal opener when the modal is closed.\n   * @template T - The type of the result returned.\n   */\n  @Input('odxModalClose')\n  public result?: T | null = null;\n\n  @HostListener('click')\n  protected onClick(): void {\n    const result = this.result === '' ? null : this.result;\n\n    if (result === undefined) {\n      this.modalRef.dismiss();\n    } else {\n      this.modalRef.close(result ?? null);\n    }\n  }\n}\n","import { Directive } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents a directive for the content of a modal.\n */\n@CSSComponent('modal__content')\n@Directive({\n  standalone: true,\n  selector: 'odx-modal-content',\n})\nexport class ModalContentDirective {\n  public readonly element = injectElement();\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectModalRef } from '../helpers';\n\n/**\n * A directive that enables an element to dismiss a modal when clicked. This can be applied\n * to any clickable element within a modal, such as buttons or links, to provide a declarative\n * approach to dismissing the modal.\n *\n * Utilizes `injectModalRef` to access the modal reference associated with the containing modal,\n * enabling the directive to call the `dismiss` method on the modal reference upon the click event.\n *\n * @example\n * Dismissing a modal using the odxModalDismiss directive on a button:\n * ```html\n * <button odxModalDismiss>Cancel</button>\n * ```\n *\n * This directive simplifies modal dismissal by removing the need for manually wiring click events\n * to dismiss methods in the component class, thereby enhancing template readability and maintainability.\n */\n@Directive({\n  standalone: true,\n  selector: '[odxModalDismiss]',\n})\nexport class ModalDismissDirective {\n  private readonly modalRef = injectModalRef();\n\n  @HostListener('click')\n  protected onClick(): void {\n    this.modalRef.dismiss();\n  }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n/**\n * Directive that prevents the default form method behavior on submit buttons inside an HTML Dialog form.\n */\n@Directive({\n  standalone: true,\n  selector: '[formmethod=dialog]',\n})\nexport class PreventFormMethodDialogDirective {\n  @HostListener('click', ['$event'])\n  protected onClick(event: Event): void {\n    event.preventDefault();\n  }\n}\n","import { Directive, HostListener } from '@angular/core';\n\n/**\n * Directive that prevents the default form submission behavior inside an HTML Dialog form.\n */\n@Directive({\n  standalone: true,\n  selector: 'form[method=dialog]',\n})\nexport class PreventMethodDialogDirective {\n  @HostListener('submit', ['$event'])\n  protected onFormSubmit(event: Event): void {\n    event.preventDefault();\n  }\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n/**\n * Represents the footer component of a modal.\n */\n@CSSComponent('modal__footer')\n@Component({\n  standalone: true,\n  selector: 'odx-modal-footer',\n  templateUrl: './modal-footer.component.html',\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalFooterComponent {\n  public readonly element = injectElement();\n}\n","<ng-content />\n","import { AfterContentInit, ChangeDetectionStrategy, Component, ContentChild, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { AreaHeaderComponent, AreaHeaderSize } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { ModalDismissDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\n\n/**\n * Represents the header component of a modal.\n */\n@CSSComponent('modal__header')\n@Component({\n  standalone: true,\n  selector: 'odx-modal-header',\n  templateUrl: './modal-header.component.html',\n  imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective],\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalHeaderComponent implements AfterContentInit {\n  protected readonly modalRef = injectModalRef();\n\n  public readonly element = injectElement();\n\n  /**\n   * The area header component associated with the modal header.\n   *\n   * @type {AreaHeaderComponent | undefined}\n   */\n  @ContentChild(AreaHeaderComponent)\n  public areaHeaderComponent?: AreaHeaderComponent;\n\n  constructor() {\n    detectControllerChanges(this.modalRef).subscribe();\n  }\n\n  public ngAfterContentInit(): void {\n    if (this.areaHeaderComponent) {\n      this.areaHeaderComponent.size = AreaHeaderSize.MEDIUM;\n    }\n  }\n}\n","<ng-content select=\"odx-area-header\" />\n@if (modalRef.options.dismissable) {\n  <odx-action-group class=\"odx-modal__dismiss\">\n    <button odxButton odxModalDismiss><odx-icon name=\"core::close\" /></button>\n  </odx-action-group>\n}\n","import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { ModalDismissDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\nimport { ModalHeroVariant } from '../../models';\n\n/**\n * Represents a modal hero component.\n */\n@CSSComponent('modal-hero')\n@Component({\n  selector: 'odx-modal-hero',\n  standalone: true,\n  imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective],\n  templateUrl: './modal-hero.component.html',\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ModalHeroComponent {\n  public readonly element = injectElement();\n\n  /**\n   * The modal reference of the modal hero component.\n   *\n   * @type {ModalRef}\n   */\n  public readonly modalRef = injectModalRef();\n\n  /**\n   * The icon of the modal hero component.\n   *\n   * @example `iconSet::iconName`.\n   * @type {string}\n   */\n  @Input()\n  public icon?: string | null;\n\n  /**\n   * The variant of the modal hero component.\n   *\n   * @type {ModalHeroVariant | null}\n   */\n  @CSSModifier()\n  @Input()\n  public variant?: ModalHeroVariant | null;\n\n  constructor() {\n    detectControllerChanges(this.modalRef).subscribe();\n  }\n}\n","@if (icon) {\n  <odx-icon class=\"odx-modal-hero__icon\" [name]=\"icon\" size=\"xlarge\" />\n}\n\n<div class=\"odx-modal-hero__title odx-heading-4\">\n  <ng-content />\n</div>\n@if (modalRef.options.dismissable) {\n  <odx-action-group class=\"odx-modal-hero__dismiss\">\n    <button odxButton odxModalDismiss>\n      <odx-icon name=\"core::close\" />\n    </button>\n  </odx-action-group>\n}\n","import { ChangeDetectionStrategy, Component, inject, Injector, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { AreaHeaderComponent } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { ModalCloseDirective, ModalContentDirective } from '../../directives';\nimport { injectModalRef } from '../../helpers';\nimport { BasicModalOptions, GetModalActionData, Modal } from '../../models';\nimport { ModalFooterComponent } from '../modal-footer/modal-footer.component';\nimport { ModalHeaderComponent } from '../modal-header/modal-header.component';\nimport { ModalHeroComponent } from '../modal-hero/modal-hero.component';\n\n/**\n * Represents a basic modal component that can be used to display dynamic content, handle modal actions, and interact\n * with other components through dependency injection. It includes common modal features such as headers, footers, and dynamic content areas.\n * This component uses the `ModalRef` to manage its state and interactions.\n *\n * The `BasicModalComponent` is designed to be flexible and reusable for various modal dialog needs within an application.\n *\n * @template Result The expected result type that the modal might produce, typically used when the modal closes.\n */\n@Component({\n  selector: 'odx-basic-modal',\n  standalone: true,\n  imports: [\n    CoreModule,\n    DynamicViewDirective,\n    ButtonComponent,\n    AreaHeaderComponent,\n    ModalHeaderComponent,\n    ModalHeroComponent,\n    ModalFooterComponent,\n    ModalContentDirective,\n    ModalCloseDirective,\n  ],\n  templateUrl: './basic-modal.component.html',\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BasicModalComponent<Result = unknown> implements Modal<BasicModalOptions<Result>, GetModalActionData<BasicModalOptions<Result>>> {\n  protected readonly injector = inject(Injector);\n\n  /**\n   * The reference to the modal.\n   *\n   * @type {ModalRef<BasicModalOptions<Result>>}\n   */\n  public readonly modalRef = injectModalRef<BasicModalOptions<Result>, GetModalActionData<BasicModalOptions<Result>>>();\n\n  protected get data(): BasicModalOptions<Result> {\n    return this.modalRef.data;\n  }\n}\n","@if (data.heroIcon; as icon) {\n  <odx-modal-hero [icon]=\"icon\" [variant]=\"data.heroVariant\">\n    <ng-template [odxDynamicView]=\"data.title\" />\n  </odx-modal-hero>\n} @else {\n  <odx-modal-header>\n    <odx-area-header>\n      <ng-template [odxDynamicView]=\"data.title\" />\n    </odx-area-header>\n  </odx-modal-header>\n}\n\n<odx-modal-content>\n  <ng-template [odxDynamicView]=\"data.content\" [odxDynamicViewInjector]=\"injector\" />\n</odx-modal-content>\n\n<odx-modal-footer>\n  @for (action of data.actions; track $index) {\n    <button odxButton [variant]=\"action.variant\" [odxModalClose]=\"action.data\">\n      {{ action.label }}\n    </button>\n  }\n</odx-modal-footer>\n","import { ChangeDetectionStrategy, Component, HostListener, Injector, Input, OnChanges, ViewEncapsulation, inject } from '@angular/core';\nimport { CoreModule, detectControllerChanges } from '@odx/angular';\nimport { A11yModule } from '@odx/angular/cdk/a11y';\nimport { DynamicContent, DynamicTextContent, DynamicViewDirective } from '@odx/angular/cdk/dynamic-view';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { NgChanges, hasChanged, injectElement, isTemplateRef } from '@odx/angular/utils';\nimport { injectModalRef } from './helpers';\n\n/**\n * A component that represents a modal dialog with dynamic content and customizable animations.\n * It supports both modal and sidesheet variants with configurable animations for each type.\n */\n@CSSComponent('modal')\n@Component({\n  standalone: true,\n  // eslint-disable-next-line @angular-eslint/component-selector\n  selector: 'dialog[odx-dialog-modal]',\n  templateUrl: './modal.component.html',\n  imports: [A11yModule, CoreModule, DynamicViewDirective],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  encapsulation: ViewEncapsulation.None,\n  host: {\n    '[attr.id]': 'modalRef.options.id',\n    '[attr.aria-labelledby]': 'modalRef.modalTitleId',\n    '[attr.role]': '\"dialog\"',\n  },\n})\nexport class ModalComponent implements OnChanges {\n  protected readonly modalRef = injectModalRef();\n  protected readonly injector = inject(Injector);\n  protected readonly context = { $implicit: this.modalRef };\n\n  public readonly element = injectElement<HTMLDialogElement>();\n\n  /**\n   * Size of the modal as a CSS modifier based on modal options.\n   *\n   * @type {ModalSize}\n   */\n  @CSSModifier()\n  public size = this.modalRef.options.size;\n\n  /**\n   * Variant of the modal as a CSS modifier that influences animation choices.\n   *\n   * @type {ModalVariant}\n   */\n  @CSSModifier()\n  public variant = this.modalRef.options.variant;\n\n  /**\n   * Boolean that indicates if the content is a component type rather than a template.\n   *\n   * @type {boolean}\n   * @default false\n   */\n  @CSSModifier()\n  public withComponent = false;\n\n  /**\n   * Dynamic content to be loaded into the modal. Excludes simple textual content\n   * to enable complex Angular components or templates.\n   *\n   * @type {Exclude<DynamicContent, DynamicTextContent>}\n   */\n  @Input()\n  public content!: Exclude<DynamicContent, DynamicTextContent>;\n\n  constructor() {\n    detectControllerChanges(this.modalRef).subscribe(() => {\n      this.size = this.modalRef.options.size;\n    });\n  }\n\n  public ngOnChanges(changes: NgChanges<ModalComponent>): void {\n    if (hasChanged(changes, 'content', false)) {\n      this.withComponent = !isTemplateRef(this.content);\n    }\n  }\n\n  @HostListener('keydown', ['$event'])\n  protected preventNativeDismiss(event: Event): void {\n    if ((event as KeyboardEvent).key === 'Escape') {\n      event.preventDefault();\n      this.modalRef.options.dismissable && this.modalRef.destroy();\n    }\n  }\n\n  @HostListener('cancel', ['$event'])\n  @HostListener('close', ['$event'])\n  protected handleDialogClose({ target }: Event): void {\n    if (target === this.element.nativeElement) this.modalRef.dismiss();\n  }\n}\n","<div\n  [odxClickOutsideActive]=\"modalRef.isActive() && modalRef.options.dismissable && modalRef.options.interactiveBackdrop\"\n  (odxClickOutside)=\"modalRef.dismiss()\"\n  class=\"odx-modal__container\"\n>\n  <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"withComponent ? {} : context\" [odxDynamicViewInjector]=\"injector\" />\n</div>\n","import { createConfigTokens } from '@odx/angular/utils';\nimport { ModalInstanceOptions, ModalSize } from './models';\nimport { ModalVariant } from './models/modal-variant';\n\nexport type ModalConfig = Omit<ModalInstanceOptions, 'id' | 'host' | 'data'>;\n\n/**\n * Utilizes `createConfigTokens` to create configuration tokens and utility functions for managing modal configurations.\n * This setup enables easy injection and provision of default global settings for modals throughout the application,\n * fostering consistency and ease of customization.\n *\n * The generated tokens and functions include:\n * - `ModalDefaultConfig`: The default configuration values for modals.\n * - `ModalConfig`: An Angular `InjectionToken` for injecting modal configuration into components or services.\n * - `injectModalConfig`: A utility function for retrieving the current modal configuration, considering any overrides.\n * - `provideModalConfig`: A function that allows specifying overrides to the default modal configuration.\n *\n * @example\n * ```ts\n * // Example of providing a custom modal configuration in an Angular module\n * @NgModule({\n *   providers: [\n *     provideModalConfig({\n *       size: ModalSize.LARGE,\n *       dismissable: false\n *     })\n *   ]\n * })\n * class AppModule {}\n *\n * // Example of injecting modal configuration in a component\n * @Component({...})\n * export class MyComponent {\n *   constructor(@Inject(ModalConfig) private modalConfig: ModalConfig) {\n *     console.log(this.modalConfig.size); // Outputs the size from the provided or default configuration\n *   }\n * }\n * ```\n */\nexport const { ModalDefaultConfig, ModalConfig, injectModalConfig, provideModalConfig } = createConfigTokens('Modal', '@odx/angular/components/modal', {\n  dismissable: true,\n  size: ModalSize.MEDIUM,\n  dismissOnNavigation: true,\n  interactiveBackdrop: true,\n  variant: ModalVariant.DEFAULT,\n} as ModalConfig);\n","import { DOCUMENT, Location } from '@angular/common';\nimport { inject, Injectable, Injector, TemplateRef } from '@angular/core';\nimport { DynamicContent, DynamicTextContent, DynamicViewService } from '@odx/angular/cdk/dynamic-view';\nimport { deepmerge } from '@odx/angular/internal';\nimport { deferFn, getUniqueId, Queue, waitForAnimations } from '@odx/angular/utils';\nimport { finalize } from 'rxjs';\nimport { BasicModalComponent } from './components';\nimport { provideModalRef } from './helpers';\nimport { ModalComponent } from './modal.component';\nimport { injectModalConfig } from './modal.config';\nimport { BasicModalOptions, GetModalActionData, ModalOptions, ModalRef, ModalSize, ModalType } from './models';\n/**\n * Service for managing modal dialogs within the application. It supports creating, opening,\n * and dismissing modals dynamically, with comprehensive options for customization and lifecycle management.\n * Utilizes Angular's dynamic view management to instantiate and render modals as needed.\n *\n * @example\n * ```ts\n * // Example of using ModalService to open a modal\n * constructor(private modalService: ModalService) {}\n *\n * openModal() {\n *   const modalRef = this.modalService.open(MyModalContentComponent, {\n *     data: { someData: 'test' },\n *     size: ModalSize.SMALL,\n *   });\n *\n *   modalRef.onClose$.subscribe(result => {\n *     console.log('Modal closed with result:', result);\n *   });\n * }\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ModalService {\n  private readonly config = injectModalConfig();\n  private readonly openModals = new Queue<ModalRef>();\n  private readonly injector = inject(Injector);\n  private readonly dynamicViewService = inject(DynamicViewService);\n  private readonly document = inject(DOCUMENT);\n\n  /**\n   * An observable that emits the current value of the openModals subject.\n   *\n   * @emits {ModalRef[]} openModals$ - The current array of open modals.\n   */\n  public readonly openModals$ = this.openModals.value$;\n\n  constructor() {\n    inject(Location).onUrlChange(() => {\n      for (const modalRef of this.openModals.toArray()) {\n        if (modalRef.options.dismissOnNavigation) {\n          modalRef.destroy();\n        }\n      }\n    });\n  }\n\n  /**\n   * Dismisses all open modals.\n   */\n  public dismissAll(): void {\n    for (const modalRef of this.openModals.toArray()) {\n      modalRef.dismiss();\n    }\n  }\n\n  /**\n   * Retrieves the modal reference by its ID.\n   *\n   * @template Data The type of data passed to the modal.\n   * @template Result The type of result returned by the modal.\n   * @param {ModalOptions['id']} id The ID of the modal.\n   * @returns {ModalRef<Data, Result> | null} - The modal reference if found, otherwise null.\n   */\n  public getModalById<Data = unknown, Result = unknown>(id: ModalOptions['id']): ModalRef<Data, Result> | null {\n    return this.openModals.get(id) as ModalRef<Data, Result>;\n  }\n\n  /**\n   * Creates a modal with the specified options.\n   * @template Data - The type of data passed to the modal for use in its content.\n   * @template Result - The type of result expected when the modal is closed.\n   * @param {Data} modal - The basic modal options.\n   * @param {Partial<ModalOptions<Data>> | undefined} options - Additional modal options.\n   * @returns {ModalRef<Data, Result>} The reference to the created modal.\n   */\n  public create<Data extends BasicModalOptions, Result = GetModalActionData<Data>>(modal: Data, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n  public create(modal: BasicModalOptions, options?: ModalOptions): ModalRef {\n    return this.open(BasicModalComponent, {\n      data: modal,\n      size: ModalSize.SMALL,\n      ...options,\n    });\n  }\n\n  /**\n   * Creates and opens a new modal with the specified content and options.\n   *\n   * @template Data - The type of data passed to the modal for use in its content.\n   * @template Result - The type of result expected when the modal is closed.\n   * @template T - The content type of the modal, either a `TemplateRef` or a component.\n   * @param {ModalType<T, Data, Result> | TemplateRef<T>} content - The content of the modal, either as a `TemplateRef` or a component type.\n   * @param {Partial<ModalOptions<Data>>} [options] - Optional configuration options for the modal.\n   * @returns {ModalRef<Data, Result>} A reference to the newly opened modal, allowing interaction with and control over the modal instance.\n   */\n  public open<Data, Result, T>(content: TemplateRef<T>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n  public open<Data, Result, T = unknown>(content: ModalType<T, Data, Result>, options?: Partial<ModalOptions<Data>>): ModalRef<Data, Result>;\n  public open(content: ModalType<unknown> | TemplateRef<unknown>, options?: Partial<ModalOptions>): ModalRef {\n    const mergedOptions = deepmerge(this.config, { id: getUniqueId('odx-modal') }, options ?? {}) as ModalOptions;\n    if (this.getModalById(mergedOptions.id)) {\n      throw Error(`Modal with ID ${mergedOptions.id} already open`);\n    }\n    const modalRef = new ModalRef(mergedOptions, (ref) => this.openModals.isFirst(ref));\n    this.attachModal(modalRef, content);\n    this.openModals.add(modalRef);\n    return modalRef;\n  }\n\n  private attachModal(modalRef: ModalRef, content: Exclude<DynamicContent, DynamicTextContent>): void {\n    const viewRef = this.dynamicViewService.createView(ModalComponent, {\n      context: { content },\n      injector: Injector.create({\n        providers: [provideModalRef(modalRef)],\n        parent: this.injector,\n      }),\n      host: modalRef.options.host,\n    });\n    const dialog = viewRef.getElement() as HTMLDialogElement;\n    const onDestroy = async () => {\n      this.openModals.remove(modalRef);\n\n      if (dialog?.isConnected) {\n        dialog.classList.add('is-hidden');\n        await waitForAnimations(dialog);\n      }\n\n      this.document.dispatchEvent(new Event('ODXModalOnBeforeClosed'));\n      if (dialog?.open) {\n        dialog?.close();\n      }\n      viewRef.destroy();\n    };\n\n    modalRef.onDestroy$.pipe(finalize(onDestroy)).subscribe();\n    deferFn(() => {\n      dialog?.isConnected && dialog?.showModal();\n    });\n  }\n}\n","import { Directive, EventEmitter, inject, Input, OnChanges, OnDestroy, Output, TemplateRef } from '@angular/core';\nimport { hasChanged, NgChanges } from '@odx/angular/utils';\nimport { ModalService } from './modal.service';\nimport { ModalOptions, ModalRef } from './models';\n\n/**\n * A directive that simplifies the creation and management of modals directly from Angular templates.\n * It allows for declarative modal instantiation with full control over modal options, and supports\n * capturing modal close and dismiss events.\n *\n * Usage:\n * Apply `odxModal` to an `<ng-template>` element and bind it to modal options.\n */\n@Directive({\n  standalone: true,\n  selector: 'ng-template[odxModal]',\n  exportAs: 'odxModal',\n})\nexport class ModalDirective implements OnChanges, OnDestroy {\n  private readonly modalService = inject(ModalService);\n  private modalRef: ModalRef | null = null;\n\n  protected readonly template = inject(TemplateRef);\n\n  /**\n   * Options for the modal directive.\n   *\n   * @type {Partial<ModalOptions> | '' | null}\n   */\n  @Input('odxModal')\n  public modalOptions?: Partial<ModalOptions> | '' | null;\n\n  /**\n   * Event emitter for closing the modal.\n   *\n   * @emits {any} The result of the modal close event.\n   */\n  // eslint-disable-next-line @angular-eslint/no-output-rename\n  @Output('odxModalClose')\n  public modalClose = new EventEmitter();\n\n  /**\n   * Event emitter for dismissing the modal.\n   *\n   * @emits {any} The result of the modal dismiss event.\n   */\n  // eslint-disable-next-line @angular-eslint/no-output-rename\n  @Output('odxModalDismiss')\n  public modalDismiss = new EventEmitter();\n\n  public ngOnChanges(changes: NgChanges<ModalDirective>): void {\n    if (hasChanged(changes, 'modalOptions') && this.modalOptions) {\n      this.modalRef?.update(this.modalOptions);\n    }\n  }\n\n  public ngOnDestroy() {\n    this.dismiss();\n  }\n\n  /**\n   * Opens the modal based on the provided template and options. Binds modal result and dismissal outputs to EventEmitter properties.\n   */\n  public open(): void {\n    this.modalRef = this.modalService.open(this.template, this.modalOptions || {});\n    this.modalRef.onClose$.subscribe((result) => this.modalClose.next(result));\n    this.modalRef.onDismiss$.subscribe((result) => this.modalDismiss.next(result));\n  }\n\n  /**\n   * Dismisses the currently opened modal.\n   */\n  public dismiss(): void {\n    this.modalRef?.dismiss();\n  }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { ButtonGroupComponent } from '@odx/angular/components/button-group';\nimport { ModalFooterComponent, ModalHeaderComponent, ModalHeroComponent } from './components';\nimport {\n  ModalCloseDirective,\n  ModalContentDirective,\n  ModalDismissDirective,\n  PreventFormMethodDialogDirective,\n  PreventMethodDialogDirective,\n} from './directives';\nimport { ModalComponent } from './modal.component';\nimport { ModalDirective } from './modal.directive';\n\nconst modules = [\n  ModalComponent,\n  ModalHeaderComponent,\n  ModalHeroComponent,\n  ModalFooterComponent,\n  ModalDirective,\n  ModalCloseDirective,\n  ModalContentDirective,\n  ModalDismissDirective,\n  PreventMethodDialogDirective,\n  PreventFormMethodDialogDirective,\n];\n\n@NgModule({\n  imports: [ButtonComponent, ButtonGroupComponent, ...modules],\n  exports: [CoreModule, AreaHeaderModule, ButtonComponent, ButtonGroupComponent, ...modules],\n})\nexport class ModalModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEO,MAAM,gBAAgB,GAAG;AAC9B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,MAAM,EAAE,QAA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