{"version":3,"file":"plain-plain.mjs","sources":["../../../projects/plain/src/dialog/dialog.ts","../../../projects/plain/src/dialog/dialog-container.component.ts","../../../projects/plain/src/dialog/dialog-container.component.html","../../../projects/plain/src/dialog/confirmation-dialog/confirmation-dialog.component.ts","../../../projects/plain/src/dialog/confirmation-dialog/confirmation-dialog.component.html","../../../projects/plain/src/dialog/dialog.service.ts","../../../projects/plain/src/public-api.ts","../../../projects/plain/src/plain-plain.ts"],"sourcesContent":["import { ElementRef, InjectionToken } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nexport type ComponentType<T> = new (...args: any[]) => T;\n\nexport const DIALOG_CONFIG = new InjectionToken<DialogConfig>(\n  'DialogConfig'\n);\n\nexport const DIALOG_DATA = new InjectionToken<unknown>('DialogData');\n\n/** Possible overrides for a dialog's position. */\nexport interface DialogPosition {\n  /** Override for the dialog's top position. */\n  top?: string;\n\n  /** Override for the dialog's bottom position. */\n  bottom?: string;\n\n  /** Override for the dialog's left position. */\n  left?: string;\n\n  /** Override for the dialog's right position. */\n  right?: string;\n}\n\nexport interface DialogConfig<D = unknown> {\n  /** Data being injected into the modal component. */\n  data?: D;\n\n  /** Width of the dialog. */\n  width?: string;\n\n  /** Height of the dialog. */\n  height?: string;\n\n  /** Min-width of the dialog. */\n  minWidth?: string;\n\n  /** Min-height of the dialog. */\n  minHeight?: string;\n\n  /** Max-width of the dialog. Defaults to 80vw. */\n  maxWidth?: string;\n\n  /** Max-height of the dialog. */\n  maxHeight?: string;\n\n  /** Position overrides. */\n  position?: DialogPosition;\n\n  /** Element which will become host of dialog container */\n  hostElementRef?: ElementRef;\n\n  /** Should have the backdrop or not. True by default. */\n  hasBackdrop?: boolean;\n\n  /** Should close dialog in backdrop click. True by default. */\n  closeOnBackdropClick?: boolean;\n}\n\nexport const DEFAULT_CONFIG: DialogConfig = {\n  maxWidth: '80vw'\n};\n\nexport const IN_HOST_CONFIG: DialogConfig = {\n  maxWidth: '100vw',\n  width: '100vw',\n  position: { bottom: '0' }\n};\n\nexport class DialogRef<R = unknown> {\n  private closedSubject = new Subject<R | undefined>();\n\n  constructor(private closeHandler: () => void) { }\n\n  /**\n   * close dialog component\n   * @param dialogResult dialog closing result emitted to opener\n   */\n  public close(dialogResult?: R): void {\n    this.closeHandler();\n    this.closedSubject.next(dialogResult);\n    this.closedSubject.complete();\n  }\n\n  /**\n   * Observable that emits dialog result on dialog close\n   * It will emit dialog result and complete afterwards\n   */\n  public afterClosed(): Observable<R | undefined> {\n    return this.closedSubject.asObservable();\n  }\n}\n\nexport const DialogButtons = {\n  COLOR: {\n    DANGER: 'danger',\n    DARK: 'dark',\n    GRAY: 'gray',\n  },\n  TYPE: {\n    DEFAULT: 'button',\n    DASHED: 'button-dashed',\n    OUTLINE: 'button-outline',\n    TEXT: 'button-text'\n  }\n};\n","import { CommonModule } from '@angular/common';\nimport { Component, inject, ViewEncapsulation } from '@angular/core';\nimport { DialogConfig, DialogRef, DIALOG_CONFIG } from './dialog';\n\n@Component({\n  selector: 'plain-dialog-container',\n  templateUrl: './dialog-container.component.html',\n  styleUrls: ['./dialog-container.component.scss'],\n  standalone: true,\n  imports: [CommonModule],\n  encapsulation: ViewEncapsulation.None,\n})\nexport class DialogContainerComponent {\n\n  public containerStyle: Record<string, string | undefined>;\n\n  public dialogStyle: Record<string, string | undefined>;\n\n  public hasBackdrop = true;\n\n  private dialogRef = inject(DialogRef);\n\n  private config = inject(DIALOG_CONFIG);\n\n  constructor() {\n    this.containerStyle = this.getContainerStyle(this.config);\n    this.dialogStyle = this.getDialogStyle(this.config);\n    this.hasBackdrop = this.config.hasBackdrop ?? true;\n  }\n\n  public backdropClick(): void {\n    // if config.closeOnBackdropClick is not provided, it will be enabled by default\n    const closeOnBackdropClick = this.config.closeOnBackdropClick === true ||\n      this.config.closeOnBackdropClick === undefined;\n    if (closeOnBackdropClick) {\n      this.dialogRef.close();\n    }\n  }\n\n  public getContainerStyle(\n    config: DialogConfig\n  ): Record<string, string | undefined> {\n    const alignLeft: boolean =\n      config.position !== undefined && config.position.left !== undefined;\n    const alignRight: boolean =\n      config.position !== undefined && config.position.right !== undefined;\n    const justifyContent = alignLeft\n      ? 'flex-start'\n      : alignRight\n        ? 'flex-end'\n        : 'center';\n\n    const alignTop: boolean =\n      config.position !== undefined && config.position.top !== undefined;\n    const alignBottom: boolean =\n      config.position !== undefined && config.position.bottom !== undefined;\n    const alignItems = alignTop\n      ? 'flex-start'\n      : alignBottom\n        ? 'flex-end'\n        : 'center';\n\n    return {\n      'align-items': alignItems,\n      'justify-content': justifyContent\n    };\n  }\n\n  public getDialogStyle(\n    config: DialogConfig\n  ): Record<string, string | undefined> {\n    const marginLeft: string | undefined =\n      config.position !== undefined && config.position.left !== undefined\n        ? config.position.left\n        : undefined;\n    const marginRight: string | undefined =\n      config.position !== undefined && config.position.right !== undefined\n        ? config.position.right\n        : undefined;\n    const marginTop: string | undefined =\n      config.position !== undefined && config.position.top !== undefined\n        ? config.position.top\n        : undefined;\n    const marginBottom: string | undefined =\n      config.position !== undefined && config.position.bottom !== undefined\n        ? config.position.bottom\n        : undefined;\n\n    return {\n      width: config.width,\n      'max-width': config.maxWidth,\n      'min-width': config.minWidth,\n      height: config.height,\n      'max-height': config.maxHeight,\n      'min-height': config.minHeight,\n      'margin-left': marginLeft,\n      'margin-right': marginRight,\n      'margin-top': marginTop,\n      'margin-bottom': marginBottom\n    };\n  }\n}\n","<div class=\"dialog-container\" [ngStyle]=\"containerStyle\">\n  <div class=\"dialog\" [ngStyle]=\"dialogStyle\">\n    <ng-content></ng-content>\n  </div>\n  <div class=\"dialog-backdrop\" *ngIf=\"hasBackdrop\" (click)=\"backdropClick()\">\n  </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport {\n  Component,\n  Inject,\n  TemplateRef,\n  ViewEncapsulation\n} from '@angular/core';\nimport { DialogButtons, DialogRef, DIALOG_DATA } from '../dialog';\nimport { ConfirmationDialogData } from './confirmation-dialog';\n\n@Component({\n  selector: 'plain-confirmation-dialog',\n  templateUrl: './confirmation-dialog.component.html',\n  styleUrls: ['./confirmation-dialog.component.scss'],\n  standalone: true,\n  imports: [CommonModule],\n  encapsulation: ViewEncapsulation.None,\n})\nexport class ConfirmationDialogComponent {\n\n  public get hasPrimaryButton(): boolean {\n    return !!this.data.primaryButtonText;\n  }\n\n  public get hasSecondaryButton(): boolean {\n    return !!this.data.secondaryButtonText;\n  }\n\n  public primaryButtonClasses: string[] = this.data.primaryButtonClasses ?? [];\n  public secondaryButtonClasses: string[] = this.data.secondaryButtonClasses ?? [];\n\n  constructor(\n    @Inject(DIALOG_DATA) public data: ConfirmationDialogData,\n    private dialogRef: DialogRef<boolean>,\n  ) {\n    this.data.messages = this.data.messages.filter(message => !!message);\n    if (this.data.closeTimeout) {\n      setTimeout(() => this.close(false), this.data.closeTimeout);\n    }\n    // if the primary and secondary button classes array do not have any -button classes, add default button class\n    const buttonRegex = /-button/g;\n    const primaryCTAHasButtonClass = this.primaryButtonClasses.some(primaryButtonClass => buttonRegex.test(primaryButtonClass));\n    if (!primaryCTAHasButtonClass) {\n      this.primaryButtonClasses.push(DialogButtons.TYPE.DEFAULT);\n    }\n    const secondaryCTAHasButtonClass = this.secondaryButtonClasses.some(secondaryButtonClass => buttonRegex.test(secondaryButtonClass));\n    if (!secondaryCTAHasButtonClass && this.hasSecondaryButton) {\n      this.secondaryButtonClasses.push(DialogButtons.TYPE.DEFAULT);\n    }\n  }\n\n  public close(result: boolean): void {\n    this.dialogRef.close(result);\n  }\n\n  public isTemplate(message: string | TemplateRef<unknown>): message is TemplateRef<unknown> {\n    return message instanceof TemplateRef;\n  }\n\n}\n","<div class=\"confirmation-dialog-container\">\n  <button *ngIf=\"data.showCloseButton !== false\"\n    class=\"button-icon confirmation-close-button\" (click)=\"close(false)\">\n    <span class=\"icon-close\"></span>\n  </button>\n  <div class=\"confirmation-dialog-content\">\n    <h3 class=\"confirmation-dialog-title\" *ngIf=\"data.title\">\n      {{ data.title }}\n    </h3>\n    <ng-container *ngFor=\"let message of data.messages; first as isFirst\">\n      <div *ngIf=\"!isFirst\" class=\"divider confirmation-divider\">\n      </div>\n      <div class=\"confirmation-dialog-message\" *ngIf=\"!isTemplate(message)\"\n        [innerHTML]=\"message\">\n      </div>\n      <div class=\"confirmation-dialog-message\" *ngIf=\"isTemplate(message)\">\n        <ng-container [ngTemplateOutlet]=\"message\">\n        </ng-container>\n      </div>\n    </ng-container>\n  </div>\n  <div class=\"confirmation-dialog-actions\"\n    *ngIf=\"hasPrimaryButton || hasSecondaryButton\">\n    <button *ngIf=\"hasPrimaryButton\" data-test-id=\"primary-button\"\n      [ngClass]=\"primaryButtonClasses\" (click)=\"close(true)\">\n      {{ data.primaryButtonText }}\n    </button>\n    <button *ngIf=\"hasSecondaryButton\" data-test-id=\"secondary-button\"\n      [ngClass]=\"secondaryButtonClasses\" (click)=\"close(false)\">\n      {{ data.secondaryButtonText }}\n    </button>\n  </div>\n</div>\n","import {\n  ApplicationRef, ComponentRef,\n  createComponent,\n  createEnvironmentInjector, inject, Injectable\n} from '@angular/core';\nimport { ConfirmationDialogConfig } from './confirmation-dialog/confirmation-dialog';\nimport { ConfirmationDialogComponent } from './confirmation-dialog/confirmation-dialog.component';\nimport {\n  ComponentType, DEFAULT_CONFIG, DialogConfig,\n  DialogRef, DIALOG_CONFIG,\n  DIALOG_DATA,\n  IN_HOST_CONFIG\n} from './dialog';\nimport { DialogContainerComponent } from './dialog-container.component';\n\n@Injectable({ providedIn: 'root' })\nexport class DialogService {\n\n  /** Currently open modal component's dialog ref Stack, pop to get the most recent one */\n  private dialogRefStack: DialogRef[] = [];\n\n  private appRef = inject(ApplicationRef);\n\n  /**\n   * Opens a modal dialog containing the given component.\n   * @param component Type of the component to load into the dialog.\n   * @param config Extra configuration options.\n   * @returns Reference to the newly-opened dialog.\n   */\n  public open<T, D = unknown, R = unknown>(\n    component: ComponentType<T>,\n    config: DialogConfig<D>\n  ): DialogRef<R> {\n    let dialogRef: DialogRef;\n    let dialogContainerRef: ComponentRef<DialogContainerComponent>;\n    let componentRef: ComponentRef<T>;\n\n    config = (config.hostElementRef === undefined ?\n      { ...DEFAULT_CONFIG, ...config } :\n      { ...IN_HOST_CONFIG, ...config }) as DialogConfig<D>;\n    let hostElement = document.body;\n    if (config.hostElementRef) {\n      hostElement = config.hostElementRef.nativeElement;\n      // update host element stlyes\n      this.updateHostElement(hostElement);\n    }\n\n    const closeHandler = (): void => {\n      // clean up projected component\n      this.disposeComponentRef(componentRef);\n      // dispose dialog container itself\n      this.disposeComponentRef(dialogContainerRef);\n      // clean up host element\n      if (config && config.hostElementRef) {\n        this.clearHostElement(config.hostElementRef.nativeElement);\n      }\n      // clean up dialog ref from the stack\n      this.dialogRefStack = this.dialogRefStack.filter(ref => ref !== dialogRef);\n    };\n\n    // create dialog ref and provide dispose callback\n    dialogRef = new DialogRef(closeHandler);\n    this.dialogRefStack.push(dialogRef);\n\n    // create injector for dialog container\n    const injector = createEnvironmentInjector([\n      { provide: DIALOG_CONFIG, useValue: config },\n      { provide: DialogRef, useValue: dialogRef },\n      { provide: DIALOG_DATA, useValue: config.data },\n    ], this.appRef.injector);\n\n    // create a component reference\n    componentRef = createComponent(component, {\n      environmentInjector: injector,\n    });\n\n    // attach component to the appRef so that it's inside the ng component tree\n    this.appRef.attachView(componentRef.hostView);\n\n    // create a container reference\n    dialogContainerRef = createComponent(DialogContainerComponent, {\n      environmentInjector: injector,\n      projectableNodes: [\n        [componentRef.location.nativeElement],\n      ],\n    });\n\n    // attach container to the appRef so that it's inside the ng component tree\n    this.appRef.attachView(dialogContainerRef.hostView);\n\n    // append dialog container's DOM element inside the host element\n    hostElement.appendChild(dialogContainerRef.location.nativeElement);\n\n    return dialogRef as DialogRef<R>;\n  }\n\n  /**\n   * Opens a confirmation modal dialog.\n   * @param config configuration options.\n   * @returns Reference to the newly-opened dialog.\n   */\n  public openConfirmation(\n    config: ConfirmationDialogConfig\n  ): DialogRef<boolean | undefined> {\n    return this.open(ConfirmationDialogComponent, config);\n  }\n\n  /**\n   * Close currently open dialog component\n   */\n  public close(): void {\n    const dialogRef = this.dialogRefStack.pop();\n    // close through dialog ref so that subscribers are notified properly\n    if (dialogRef) {\n      dialogRef.close();\n    }\n  }\n\n  /**\n   * Dispose component ref that we manually attached to the application ref\n   */\n  private disposeComponentRef(ref: ComponentRef<unknown>): void {\n    this.appRef.detachView(ref.hostView);\n    ref.destroy();\n  }\n\n  /**\n   * Updates styles and classes on host element.\n   * @param hostElement HTMLElement to which overlay and dialog will be added.\n   */\n  private updateHostElement(hostElement: HTMLElement): void {\n    hostElement.classList.add('dialog-container-host');\n  }\n\n  /**\n   * Removes styles and classes from container element.\n   * @param hostElement HTMLElement which needs to be cleared.\n   */\n  private clearHostElement(hostElement: HTMLElement): void {\n    hostElement.classList.remove('dialog-container-host');\n  }\n}\n","/*\n * Public API Surface of plain\n */\n\nexport * from './dialog/dialog-container.component';\nexport * from './dialog/dialog.service';\nexport * from './dialog/dialog';\nexport * from './dialog/confirmation-dialog/confirmation-dialog.component';\nexport * from './dialog/confirmation-dialog/confirmation-dialog';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i1.DialogRef"],"mappings":";;;;;;MAKa,aAAa,GAAG,IAAI,cAAc,CAC7C,cAAc,EACd;MAEW,WAAW,GAAG,IAAI,cAAc,CAAU,YAAY,EAAE;AAoDxD,MAAA,cAAc,GAAiB;AAC1C,IAAA,QAAQ,EAAE,MAAM;EAChB;AAEW,MAAA,cAAc,GAAiB;AAC1C,IAAA,QAAQ,EAAE,OAAO;AACjB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE;EACzB;MAEW,SAAS,CAAA;AAGpB,IAAA,WAAA,CAAoB,YAAwB,EAAA;QAAxB,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAY;AAFpC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,OAAO,EAAiB,CAAC;KAEJ;AA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