{"version":3,"file":"ng-nest-ui-message-box.mjs","sources":["../../../../lib/ng-nest/ui/message-box/message-box.property.ts","../../../../lib/ng-nest/ui/message-box/message-box.component.ts","../../../../lib/ng-nest/ui/message-box/message-box.component.html","../../../../lib/ng-nest/ui/message-box/message-box.service.ts","../../../../lib/ng-nest/ui/message-box/message-box.module.ts","../../../../lib/ng-nest/ui/message-box/ng-nest-ui-message-box.ts"],"sourcesContent":["import type { XStatus, XPlace } from '@ng-nest/ui/core';\r\nimport type { XAlertOption } from '@ng-nest/ui/alert';\r\nimport type { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport type { XInputType } from '@ng-nest/ui/input';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * MessageBox\r\n * @selector x-message-box\r\n * @decorator component\r\n */\r\nexport const XMessageBoxPrefix = 'x-message-box';\r\n\r\nexport const XMessageBoxPortal = 'x-message-box-portal';\r\n\r\n/**\r\n * MessageBox Option\r\n */\r\nexport interface XMessageBoxOption extends XAlertOption {\r\n  /**\r\n   * @zh_CN 方位，九宫格\r\n   * @en_US Direction, nine grid\r\n   * @default 'top'\r\n   */\r\n  placement?: XPlace;\r\n  /**\r\n   * @zh_CN 偏移距离\r\n   * @en_US Offset distance\r\n   * @default '2rem'\r\n   */\r\n  offset?: string | string[];\r\n  /**\r\n   * @zh_CN 类型\r\n   * @en_US Types of\r\n   * @default 'info'\r\n   */\r\n  type?: XMessageBoxType;\r\n  /**\r\n   * @zh_CN 宽度\r\n   * @en_US Width\r\n   * @default '16rem'\r\n   */\r\n  width?: string;\r\n  /**\r\n   * @zh_CN 高度\r\n   * @en_US Height\r\n   */\r\n  height?: string;\r\n  /**\r\n   * @zh_CN 隐藏关闭按钮\r\n   * @en_US Hide close button\r\n   * @default true\r\n   */\r\n  hideClose?: boolean;\r\n  /**\r\n   * @zh_CN 显示图标\r\n   * @en_US Show icon\r\n   * @default true\r\n   */\r\n  showIcon?: boolean;\r\n  /**\r\n   * @zh_CN 显示取消按钮\r\n   * @en_US Show cancel button\r\n   */\r\n  showCancel?: boolean;\r\n  /**\r\n   * @zh_CN 关闭事件\r\n   * @en_US Close event\r\n   */\r\n  callback?: XMessageBoxCallback;\r\n  /**\r\n   * @zh_CN 点击遮罩关闭\r\n   * @en_US Click the mask to close\r\n   * @default false\r\n   */\r\n  backdropClose?: boolean;\r\n  /**\r\n   * @zh_CN 确认按钮文字\r\n   * @en_US Confirm button text\r\n   * @default '确定'\r\n   */\r\n  confirmText?: string;\r\n  /**\r\n   * @zh_CN 取消按钮文字\r\n   * @en_US Cancel button text\r\n   * @default '取消'\r\n   */\r\n  cancelText?: string;\r\n  /**\r\n   * @zh_CN 是否显示输入框，显示单行文本框后，将不能显示多行文本框\r\n   * @en_US Do not display input box. After displaying a single line text box, multi line text boxes cannot be displayed\r\n   */\r\n  showInput?: boolean;\r\n  /**\r\n   * @zh_CN 匹配规则\r\n   * @en_US Matching rules\r\n   */\r\n  inputPattern?: RegExp;\r\n  /**\r\n   * @zh_CN 匹配失败的信息提示\r\n   * @en_US Information prompt for matching failure\r\n   */\r\n  inputInvalidMessage?: string;\r\n  /**\r\n   * @zh_CN 输入框的占位符\r\n   * @en_US Placeholder for input box\r\n   */\r\n  inputPlaceholder?: string;\r\n  /**\r\n   * @zh_CN 输入框的类型\r\n   * @en_US Type of input box\r\n   */\r\n  inputType?: XInputType;\r\n  /**\r\n   * @zh_CN 输入框的值\r\n   * @en_US Value of input box\r\n   */\r\n  inputValue?: string;\r\n  /**\r\n   * @zh_CN 输入框的验证函数\r\n   * @en_US Validation function of input box\r\n   */\r\n  inputValidator?: (value: any) => boolean;\r\n  /**\r\n   * @zh_CN 关闭前处理函数\r\n   * @en_US Processing function before closing\r\n   */\r\n  beforeClose?: XMessageBoxCallback;\r\n  /**\r\n   * @zh_CN 确认加载\r\n   * @en_US confirm Loading\r\n   */\r\n  confirmLoading?: XMessageBoxConfirmLoading;\r\n  /**\r\n   * @zh_CN 是否显示多行文本框\r\n   * @en_US Whether to show the input box\r\n   */\r\n  showTextarea?: boolean;\r\n  /**\r\n   * @zh_CN 输入最大长度\r\n   * @en_US Enter the maximum length\r\n   */\r\n  textareaMaxlength?: number;\r\n  /**\r\n   * @zh_CN 高度\r\n   * @en_US height\r\n   */\r\n  textareaHeight?: string;\r\n}\r\n\r\n/**\r\n * @zh_CN 关闭的回调函数类型\r\n * @en_US Closed callback function type\r\n */\r\nexport interface XMessageBoxCallback {\r\n  (action: XMessageBoxAction, message?: string): void;\r\n}\r\n\r\n/**\r\n * @zh_CN 确认加载\r\n * @en_US confirm Loading\r\n */\r\nexport type XMessageBoxConfirmLoading = () => Observable<boolean>;\r\n\r\n/**\r\n * @zh_CN 触发关闭的类型\r\n * @en_US Type of trigger closure\r\n */\r\nexport type XMessageBoxAction = 'confirm' | 'cancel' | 'close';\r\n\r\n/**\r\n * @zh_CN 创建的消息对象\r\n * @en_US Message object created\r\n */\r\nexport interface XMessageBoxOverlayRef extends XPortalOverlayRef<XMessageBoxHandle> {}\r\n\r\n/**\r\n * @zh_CN 创建的消息组件定义\r\n * @en_US Message object created\r\n */\r\nexport interface XMessageBoxHandle {\r\n  messageBox: XMessageBoxRef;\r\n  onClose(): void;\r\n  onCancel(): void;\r\n  hideBox(): void;\r\n  onConfirm(): void;\r\n  moveDone($event: AnimationEvent): void;\r\n  getInputValue(): any;\r\n}\r\n\r\nexport interface XMessageBoxRef {\r\n  ref: XMessageBoxOverlayRef;\r\n  input: XMessageBoxOption;\r\n  close: () => void;\r\n}\r\n\r\n/**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n */\r\nexport type XMessageBoxType = XStatus;\r\n","import {\r\n  Component,\r\n  ViewEncapsulation,\r\n  Renderer2,\r\n  ElementRef,\r\n  ChangeDetectorRef,\r\n  ChangeDetectionStrategy,\r\n  OnInit,\r\n  HostListener,\r\n  HostBinding\r\n} from '@angular/core';\r\nimport { XIsFunction } from '@ng-nest/ui/core';\r\nimport { XMessageBoxPrefix, XMessageBoxRef, XMessageBoxAction, XMessageBoxHandle } from './message-box.property';\r\nimport { UntypedFormGroup, UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XFormInputValidator } from '@ng-nest/ui/base-form';\r\nimport { XAlertComponent } from '@ng-nest/ui/alert';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XInputComponent } from '@ng-nest/ui/input';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { XTextareaComponent } from '@ng-nest/ui/textarea';\r\n\r\n@Component({\r\n  selector: `${XMessageBoxPrefix}`,\r\n  imports: [\r\n    NgTemplateOutlet,\r\n    FormsModule,\r\n    ReactiveFormsModule,\r\n    XInputComponent,\r\n    XTextareaComponent,\r\n    XButtonComponent,\r\n    XButtonsComponent,\r\n    XAlertComponent,\r\n    XOutletDirective\r\n  ],\r\n  templateUrl: './message-box.component.html',\r\n  styleUrls: ['./message-box.component.scss'],\r\n  encapsulation: ViewEncapsulation.None,\r\n  changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XMessageBoxComponent implements OnInit, XMessageBoxHandle {\r\n  messageBox!: XMessageBoxRef;\r\n  action: XMessageBoxAction = 'close';\r\n  formGroup: UntypedFormGroup = new UntypedFormGroup({});\r\n  loading = false;\r\n\r\n  @HostBinding('animate.enter') get animateEnter() {\r\n    return `x-move-${this.msgInput.placement}-enter`;\r\n  }\r\n  @HostBinding('animate.leave') get animateLeave() {\r\n    return `x-move-${this.msgInput.placement}-leave`;\r\n  }\r\n\r\n  @HostListener('animationend', ['$event']) animationend($event: AnimationEvent) {\r\n    this.moveDone($event);\r\n  }\r\n\r\n  constructor(\r\n    public renderer: Renderer2,\r\n    public elementRef: ElementRef<HTMLElement>,\r\n    public cdr: ChangeDetectorRef\r\n  ) {}\r\n\r\n  get msgInput() {\r\n    return this.messageBox.input!;\r\n  }\r\n\r\n  get msgOverlayRef() {\r\n    return this.messageBox.ref!;\r\n  }\r\n\r\n  get getLabel() {\r\n    return this.msgInput.content as string;\r\n  }\r\n\r\n  get getPattern() {\r\n    return this.msgInput.inputPattern as RegExp;\r\n  }\r\n\r\n  ngOnInit() {\r\n    (this.msgInput.showInput || this.msgInput.showTextarea) && this.createFormGroup();\r\n  }\r\n\r\n  onClose() {\r\n    this.action = 'close';\r\n    this.hideBox();\r\n  }\r\n\r\n  onCancel() {\r\n    this.action = 'cancel';\r\n    this.hideBox();\r\n  }\r\n\r\n  hideBox() {\r\n    if (XIsFunction(this.msgInput.beforeClose)) {\r\n      this.msgInput.beforeClose!(this.action, this.getInputValue());\r\n    } else {\r\n      this.close();\r\n    }\r\n  }\r\n\r\n  close() {\r\n    this.msgOverlayRef?.overlayRef?.detach();\r\n  }\r\n\r\n  onConfirm() {\r\n    const hide = () => {\r\n      if (!this.msgInput.showInput || (this.msgInput.showInput && this.formGroup.valid)) {\r\n        this.action = 'confirm';\r\n        this.hideBox();\r\n      } else if (!this.msgInput.showTextarea || (this.msgInput.showTextarea && this.formGroup.valid)) {\r\n        this.action = 'confirm';\r\n        this.hideBox();\r\n      }\r\n    };\r\n    if (this.msgInput.confirmLoading && XIsFunction(this.msgInput.confirmLoading)) {\r\n      this.loading = true;\r\n      this.msgInput.confirmLoading().subscribe((x) => {\r\n        this.loading = false;\r\n        this.cdr.markForCheck();\r\n        if (!x) return;\r\n        this.action = 'confirm';\r\n        hide();\r\n      });\r\n    } else {\r\n      hide();\r\n    }\r\n  }\r\n\r\n  moveDone($event: AnimationEvent) {\r\n    if ($event.animationName.endsWith('-leave')) {\r\n      XIsFunction(this.msgInput.callback) && this.msgInput.callback!(this.action, this.getInputValue());\r\n      this.msgOverlayRef.overlayRef?.dispose();\r\n    }\r\n  }\r\n\r\n  getInputValue() {\r\n    return this.formGroup.controls['inputValue']?.value;\r\n  }\r\n\r\n  createFormGroup() {\r\n    this.formGroup.addControl(\r\n      'inputValue',\r\n      new UntypedFormControl(this.msgInput.inputValue, [\r\n        Validators.pattern(this.msgInput.inputPattern as RegExp),\r\n        XFormInputValidator(this.msgInput.inputValidator!)\r\n      ])\r\n    );\r\n  }\r\n}\r\n","<div class=\"x-message-box\">\r\n  <x-alert\r\n    (close)=\"onClose()\"\r\n    [title]=\"msgInput.title\"\r\n    [content]=\"contentTpl\"\r\n    [type]=\"msgInput.type!\"\r\n    [effect]=\"msgInput.effect!\"\r\n    [hideClose]=\"msgInput.hideClose!\"\r\n    [closeText]=\"msgInput.closeText\"\r\n    [showIcon]=\"false\"\r\n    [duration]=\"0\"\r\n    manual\r\n    disabledAnimation\r\n  ></x-alert>\r\n  <ng-template #contentTpl let-iconTpl=\"$iconTpl\">\r\n    <div class=\"x-message-box-inner\">\r\n      <div class=\"x-message-box-content\">\r\n        @if (msgInput.showInput) {\r\n          <form [formGroup]=\"formGroup\">\r\n            <x-input\r\n              formControlName=\"inputValue\"\r\n              [type]=\"msgInput.inputType!\"\r\n              [label]=\"getLabel\"\r\n              [placeholder]=\"msgInput.inputPlaceholder!\"\r\n              [pattern]=\"getPattern\"\r\n              [message]=\"msgInput.inputInvalidMessage!\"\r\n              [inputValidator]=\"msgInput.inputValidator!\"\r\n            ></x-input>\r\n          </form>\r\n        } @else if (msgInput.showTextarea) {\r\n          <form [formGroup]=\"formGroup\">\r\n            <x-textarea\r\n              formControlName=\"inputValue\"\r\n              [placeholder]=\"msgInput.inputPlaceholder!\"\r\n              [label]=\"getLabel\"\r\n              [pattern]=\"getPattern\"\r\n              [message]=\"msgInput.inputInvalidMessage!\"\r\n              [inputValidator]=\"msgInput.inputValidator!\"\r\n              [maxlength]=\"msgInput.textareaMaxlength!\"\r\n              [height]=\"msgInput.textareaHeight!\"\r\n            ></x-textarea>\r\n          </form>\r\n        } @else {\r\n          @if (msgInput.showIcon) {\r\n            <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n          }\r\n          <ng-container *xOutlet=\"msgInput.content\">\r\n            {{ msgInput.content }}\r\n          </ng-container>\r\n        }\r\n      </div>\r\n      <x-buttons space=\"0.5rem\">\r\n        @if (msgInput.showCancel) {\r\n          <x-button (click)=\"onCancel()\" flat plain>{{ msgInput.cancelText }}</x-button>\r\n        }\r\n        <x-button type=\"primary\" flat (click)=\"onConfirm()\" [disabled]=\"formGroup!.invalid\" [loading]=\"loading\">{{\r\n          msgInput.confirmText\r\n        }}</x-button>\r\n      </x-buttons>\r\n    </div>\r\n  </ng-template>\r\n</div>\r\n","import { ComponentRef, Injectable, inject } from '@angular/core';\r\nimport { XTemplate, XIsXTemplate, XFillDefault, XIsString } from '@ng-nest/ui/core';\r\nimport { XMessageBoxOption, XMessageBoxOverlayRef, XMessageBoxRef, XMessageBoxPortal } from './message-box.property';\r\nimport { XMessageBoxComponent } from './message-box.component';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\nimport { XI18nService } from '@ng-nest/ui/i18n';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XMessageBoxService {\r\n  default: XMessageBoxOption = {\r\n    type: 'info',\r\n    width: '20rem',\r\n    placement: 'center',\r\n    offset: '2rem',\r\n    effect: 'white',\r\n    duration: 3000,\r\n    showIcon: false,\r\n    showInput: false,\r\n    showTextarea: false,\r\n    backdropClose: false,\r\n    cancelText: '取消',\r\n    confirmText: '确认',\r\n    inputPlaceholder: '',\r\n    textareaHeight: '6rem'\r\n  };\r\n\r\n  private portal = inject(XPortalService);\r\n  private i18n = inject(XI18nService);\r\n\r\n  alert(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n    return this.createMessageBox(option, { showIcon: false, showCancel: false, showInput: false });\r\n  }\r\n\r\n  confirm(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n    return this.createMessageBox(option, { showIcon: true, showCancel: true, showInput: false });\r\n  }\r\n\r\n  prompt(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n    const opt = option as XMessageBoxOption;\r\n    let def: XMessageBoxOption = { showIcon: false, showCancel: true, showInput: true };\r\n    if (!opt.showInput && opt.showTextarea) {\r\n      def = { showIcon: false, showCancel: true, showTextarea: true };\r\n    }\r\n    return this.createMessageBox(option, def);\r\n  }\r\n\r\n  create(option: XMessageBoxOption): XMessageBoxOverlayRef {\r\n    const offset = XIsString(option.offset) ? [option.offset as string] : (option.offset as string[]);\r\n    return this.portal.attach({\r\n      content: XMessageBoxComponent,\r\n      overlayConfig: {\r\n        panelClass: XMessageBoxPortal,\r\n        hasBackdrop: true,\r\n        width: option.width,\r\n        height: option.height,\r\n        positionStrategy: this.portal.setPlace(option.placement, ...offset)\r\n      }\r\n    });\r\n  }\r\n\r\n  private createMessageBox(option: XTemplate | XMessageBoxOption, def: XMessageBoxOption): XMessageBoxRef {\r\n    let opt: XMessageBoxOption;\r\n    if (XIsXTemplate(option)) {\r\n      opt = { title: option as XTemplate };\r\n    } else {\r\n      opt = option as XMessageBoxOption;\r\n    }\r\n    this.setLocal();\r\n    XFillDefault(opt, Object.assign({ ...this.default }, def));\r\n    return this.createMessageBoxPlacement(opt);\r\n  }\r\n\r\n  private createMessageBoxPlacement(option: XMessageBoxOption): XMessageBoxRef {\r\n    const ref = this.create(option);\r\n    const { overlayRef, componentRef } = ref;\r\n    const { instance } = componentRef as ComponentRef<XMessageBoxComponent>;\r\n    const result = {\r\n      ref: ref,\r\n      input: option,\r\n      close: () => {\r\n        instance.close();\r\n      }\r\n    };\r\n    instance.messageBox = result;\r\n    if (option.backdropClose && overlayRef) {\r\n      overlayRef.backdropClick().subscribe(() => instance.onClose());\r\n    }\r\n    return result;\r\n  }\r\n\r\n  private setLocal() {\r\n    const messageBoxLocale = this.i18n.getLocale().messageBox;\r\n    this.default = { ...this.default, ...messageBoxLocale };\r\n  }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule({\r\n  exports: [],\r\n  imports: []\r\n})\r\nexport class XMessageBoxModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA;;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