import * as rxjs from 'rxjs'; import { Subscription, Subject } from 'rxjs'; import * as _angular_core from '@angular/core'; import { ViewContainerRef, ComponentRef, EmbeddedViewRef, EventEmitter, InjectionToken, OnInit, AfterViewInit, TemplateRef, Renderer2, ChangeDetectorRef } from '@angular/core'; import * as _ng_nest_ui_core from '@ng-nest/ui/core'; import { XTemplate, XPlace, XNumber, XStatus, XBoolean, XEffect, XProperty, XConfigService, XDialogConfig } from '@ng-nest/ui/core'; import { XPortalOverlayRef, XPortalService } from '@ng-nest/ui/portal'; import * as i1 from '@angular/cdk/drag-drop'; import { CdkDragEnd, CdkDrag } from '@angular/cdk/drag-drop'; import { ComponentPortal, TemplatePortal, BasePortalOutlet, CdkPortalOutlet, ComponentType } from '@angular/cdk/portal'; import { BlockScrollStrategy, OverlayRef } from '@angular/cdk/overlay'; import { XI18nDialog } from '@ng-nest/ui/i18n'; /** * Dialog * @selector x-dialog * @decorator component */ declare const XDialogPrefix = "x-dialog"; declare const X_DIALOG_CONFIG_NAME = "dialog"; declare const XDialogContainer = "x-dialog-overlay"; declare const X_DIALOG_DATA: InjectionToken; declare const XDialogProperty_base: new () => { config: _ng_nest_ui_core.XDialogConfig | undefined; }; /** * Dialog Property */ declare class XDialogProperty extends XDialogProperty_base { /** * @zh_CN 标题 * @en_US Title */ readonly title: _angular_core.InputSignal; /** * @zh_CN 显示/隐藏 * @en_US Show/hide */ readonly visible: _angular_core.ModelSignal; /** * @zh_CN 方位,九宫格 * @en_US Direction, nine grid */ readonly placement: _angular_core.InputSignal; /** * @zh_CN 偏移距离 * @en_US Offset distance */ readonly offset: _angular_core.InputSignalWithTransform; /** * @zh_CN 类型 * @en_US Types of */ readonly type: _angular_core.InputSignal; /** * @zh_CN 隐藏关闭按钮 * @en_US Hide close button */ readonly hideClose: _angular_core.InputSignalWithTransform; /** * @zh_CN 使用文本关闭按钮 * @en_US Use the text to close button */ readonly closeText: _angular_core.InputSignal; /** * @zh_CN 调整弹框的大小(弃用) * @en_US Adjust the size of the box, Abandoned * @deprecated abandoned */ readonly resizable: _angular_core.InputSignalWithTransform; /** * @zh_CN 开启 resizable 调整大小,偏移屏幕左边(弃用) * @en_US Open the resizable resize, offset screen left, Abandoned * @deprecated abandoned */ readonly offsetLeft: _angular_core.InputSignalWithTransform; /** * @zh_CN 开启 resizable 调整大小,偏移屏幕顶部(弃用) * @en_US Open the resizable resize, offset screen top, Abandoned * @deprecated abandoned */ readonly offsetTop: _angular_core.InputSignalWithTransform; /** * @zh_CN 宽度 * @en_US Width */ readonly width: _angular_core.InputSignalWithTransform; /** * @zh_CN 高度 * @en_US Height */ readonly height: _angular_core.InputSignalWithTransform; /** * @zh_CN 最小宽度 * @en_US Min width */ readonly minWidth: _angular_core.InputSignalWithTransform; /** * @zh_CN 最小高度 * @en_US Min height */ readonly minHeight: _angular_core.InputSignalWithTransform; /** * @zh_CN 样式主题 * @en_US Style theme */ readonly effect: _angular_core.InputSignal; /** * @zh_CN 底部自定义模板 * @en_US Custom template at the bottom */ readonly footer: _angular_core.InputSignal; /** * @zh_CN 显示取消按钮 * @en_US Show cancel button */ readonly showCancel: _angular_core.InputSignalWithTransform; /** * @zh_CN 取消按钮文字 * @en_US Cancel button text * @default '取消' */ readonly cancelText: _angular_core.InputSignal; /** * @zh_CN 显示确认按钮 * @en_US Show confirmation button */ readonly showConfirm: _angular_core.InputSignalWithTransform; /** * @zh_CN 确认按钮文字 * @en_US Confirm button text * @default '确认' */ readonly confirmText: _angular_core.InputSignal; /** * @zh_CN 点击遮罩关闭 * @en_US Click the mask to close */ readonly backdropClose: _angular_core.InputSignalWithTransform; /** * @zh_CN 是否显示背景遮罩 * @en_US Whether to display the background mask */ readonly hasBackdrop: _angular_core.InputSignalWithTransform; /** * @zh_CN 是否支持键盘 esc 关闭 * @en_US Whether to support keyboard esc to close */ readonly keyboard: _angular_core.InputSignalWithTransform; /** * @zh_CN 自定义样式名 * @en_US Custom style name */ readonly className: _angular_core.InputSignal; /** * @zh_CN 按钮居中 * @en_US Button center */ readonly buttonsCenter: _angular_core.InputSignalWithTransform; /** * @zh_CN 拖动对话框 * @en_US Drag dialog */ readonly draggable: _angular_core.InputSignalWithTransform; /** * @zh_CN 最大化弹出框按钮,当启用 resizable 时也会显示 * @en_US Maximize the bullet box button, Will also display when resizable is enabled */ readonly maximize: _angular_core.InputSignalWithTransform; /** * @zh_CN 关闭前处理函数 * @en_US Processing function before closing */ readonly beforeClose: _angular_core.InputSignal<((action: XDialogAction) => void) | undefined>; /** * @zh_CN 取消按钮的事件 * @en_US Cancel button event */ readonly cancel: _angular_core.OutputEmitterRef; /** * @zh_CN 确认按钮的事件 * @en_US Confirm button event */ readonly confirm: _angular_core.OutputEmitterRef; /** * @zh_CN 确认按钮的事件 * @en_US Confirm button event */ readonly close: _angular_core.OutputEmitterRef; /** * @zh_CN 弹出完成动画加载 * @en_US Pop up complete animation loading */ readonly showDone: _angular_core.OutputEmitterRef; /** * @zh_CN 关闭完成动画 * @en_US Close complete animation */ readonly closeDone: _angular_core.OutputEmitterRef; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Dialog Container * @selector x-dialog-container * @decorator component */ declare const XDialogContainerPrefix = "x-dialog-container"; declare const X_DIALOG_CONTAINER: InjectionToken; /** * Dialog Container Property */ declare class XDialogContainerProperty extends XProperty { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Dialog option by service */ interface XDialogRefOption { /** * @zh_CN 展示方向 * @en_US Display direction * @default 'center' * @withConfig true */ placement?: XPlace; /** * @zh_CN 偏移距离 * @en_US Offset distance * @default '1rem' * @withConfig true */ offset?: string; /** * @zh_CN 宽度 * @en_US Width * @default '32rem' * @withConfig true */ width?: string; /** * @zh_CN 高度 * @en_US Height */ height?: string; /** * @zh_CN 自定义样式名 * @en_US Custom style name */ className?: string; /** * @zh_CN 点击遮罩关闭 * @en_US Click the mask to close * @default true * @withConfig true */ backdropClose?: boolean; /** * @zh_CN 是否显示背景遮罩 * @en_US Whether to display the background mask * @default true * @withConfig true */ hasBackdrop?: boolean; /** * @zh_CN 拖动对话框 * @en_US Drag dialog * @default false * @withConfig true */ draggable?: boolean; /** * @zh_CN 调整弹框的大小(弃用) * @en_US Adjust the size of the box, Abandoned * @default false * @withConfig true * @deprecated abandoned */ resizable?: boolean; /** * @zh_CN 最小宽度 * @en_US Min width * @default '18rem' * @withConfig true */ minWidth?: string; /** * @zh_CN 最小高度 * @en_US Min height * @default '8rem' * @withConfig true */ minHeight?: string; /** * @zh_CN 最大宽度 * @en_US max width * @withConfig true */ maxWidth?: string; /** * @zh_CN 最大高度 * @en_US Max height * @withConfig true */ maxHeight?: string; /** * @zh_CN 是否支持键盘 esc 关闭 * @en_US Whether to support keyboard esc to close * @default true * @withConfig true */ keyboard?: boolean; /** * @zh_CN 数据,通过 "@Inject(X_DIALOG_DATA)" 来接收数据 * @en_US Data. Receive data by "@Inject(X_DIALOG_DATA)" */ data?: any; /** * @zh_CN 视图容器实例可以包含其他视图容器。 * @en_US A view container instance can contain other view containers. */ viewContainerRef?: ViewContainerRef; } /** * @zh_CN 弹框动画状态 * @en_US Dialog animation status */ type XDialogAnimationState = XPlace | 'void'; /** * @zh_CN 弹框动画事件 * @en_US Dialog animation Event */ interface XDialogAnimationEvent { animationName: string; action: 'start' | 'end'; } /** * @zh_CN 关闭的回调函数类型 * @en_US Closed callback function type */ interface XDialogCallback { (action: XDialogAction, message?: string): void; } /** * @zh_CN 触发关闭的类型 * @en_US Type of trigger closure */ type XDialogAction = 'confirm' | 'cancel' | 'close'; /** * @zh_CN 创建的弹框对象 * @en_US Dialog object created */ interface XDialogOverlayRef extends XPortalOverlayRef { } /** * @zh_CN 创建的弹框组件定义 * @en_US Dialog object created */ interface XDialogHandle { create(): void; onClose(action: XDialogAction, execFunction?: boolean): void; onDragEnded(event: CdkDragEnd): void; onSize(): void; onMaximize(): void; onMinimize(): void; moveDone(event: AnimationEvent): void; portalAttached(): boolean; setVisible(): void; setWidthHeight(): void; } /** * @zh_CN 创建的弹框对象,通过服务 * @en_US Dialog object created by service */ interface XDialogPortalOverlayRef extends XPortalOverlayRef { } /** * @zh_CN 创建的弹框对象定义 * @en_US Dialog object created definition */ interface XDialogPortalHandle { option: XDialogRefOption; defaultMaximize: boolean; dialogBox: { draggable?: boolean; resizable?: boolean; width?: string; height?: string; minWidth?: string; minHeight?: string; distance?: { x: number; y: number; }; marginTop?: string; marginLeft?: string; marginRight?: string; marginBottom?: string; }; hostElement?: HTMLElement; overlayElement?: HTMLElement; distance: { x: number; y: number; }; offsetLeft: number; offsetTop: number; initHeight: number; dialogContent?: HTMLElement; initContentHeight: number; attachComponentPortal(portal: ComponentPortal): ComponentRef; attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef; animationChanged: EventEmitter; } /** * @zh_CN 类型 * @en_US Types of */ type XDialogType = XStatus; declare class XDialogContainerComponent extends XDialogContainerProperty { _has: boolean; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class XDialogComponent extends XDialogProperty implements OnInit, AfterViewInit, XDialogHandle { private static dialogOverlayRefs; private viewContainerRef; private protalService; private overlay; private i18n; private unSubject; private document; get getVisible(): boolean; clsName: string; dialogTpl: _angular_core.Signal>; dialogRef: XDialogOverlayRef; backdropClick$: Subscription; keyboard$: Subscription; scrollStrategy: BlockScrollStrategy; locale: _angular_core.Signal; overlayElement: _angular_core.WritableSignal; dialogContent?: HTMLElement; initHeight?: number | undefined; initContentHeight?: number | undefined; isMaximize: _angular_core.WritableSignal; isDefaultMaximize: _angular_core.WritableSignal; dialogBox: { [key: string]: any; }; distance: { x: number; y: number; }; viewInit: _angular_core.WritableSignal; action: XDialogAction | null; containerInit: boolean; draggableSignal: _angular_core.WritableSignal; maximizeSignal: _angular_core.WritableSignal; getCancelText: _angular_core.Signal; getConfirmText: _angular_core.Signal; getStyle: _angular_core.Signal<{}>; container: XDialogContainerComponent | null; configService: XConfigService; styleOffsetLeft: _angular_core.WritableSignal; styleOffsetTop: _angular_core.WritableSignal; visibleChanged: rxjs.Observable; draggableChanged: rxjs.Observable; destroy: _angular_core.WritableSignal; private destroyRef; constructor(); ngOnInit(): void; ngAfterViewInit(): void; setVisible(): void; create(): void; setWidthHeight(): void; portalAttached(): boolean; onClose(action: XDialogAction, execFunction?: boolean): void; onDragEnded($event: CdkDragEnd): void; onSize(): void; onMaximize(): void; onMinimize(): void; moveDone($event: AnimationEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface XDialogRefHandle { fullscreen: boolean; option: { draggable?: boolean; }; close(result?: any): void; onFullscreen(): void; } declare class XDialogRef implements XDialogRefHandle { componentInstance: C; option: XDialogRefOption; fullscreen: boolean; afterClose: Subject; unsubject: Subject; private _isFristFullscreen; overlayRef: OverlayRef; containerInstance: XDialogPortalHandle; renderer: Renderer2; portalService: XPortalService; constructor(params: { overlayRef: OverlayRef; containerInstance: XDialogPortalHandle; renderer: Renderer2; option: XDialogRefOption; fullscreen: boolean; portalService: XPortalService; }); close(result?: any): void; onFullscreen(): void; } declare class XDialogCloseDirective { onCloseClick(): void; dialogRef: XDialogRef | null; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class XDialogTitleDirective { _has: boolean; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class XDialogContentDirective { _has: boolean; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class XDialogActionsDirective { _has: boolean; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class XDialogDragHandleDirective { get getDraggable(): boolean | undefined; dialogRef: XDialogRef | null; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class XDialogFullscreenDirective { onFullscreenClick(): void; dialogRef: XDialogRef | null; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class XDialogPortalComponent extends BasePortalOutlet implements XDialogPortalHandle { placement: _angular_core.ModelSignal; get enimateEnter(): string; get enimateLeave(): string; done(event: AnimationEvent): void; start(event: AnimationEvent): void; renderer: Renderer2; changeDetectorRef: ChangeDetectorRef; portalOutlet: _angular_core.Signal; dragRef: _angular_core.Signal>; handles: _angular_core.Signal; animationChanged: EventEmitter; option: XDialogRefOption; offsetLeft: number; offsetTop: number; minWidth: string; minHeight: string; initHeight: number; initContentHeight: number; dialogContent?: HTMLElement; defaultMaximize: boolean; overlayElement?: HTMLElement; hostElement?: HTMLElement; distance: { x: number; y: number; }; dialogBox: { [key: string]: any; }; ngOnInit(): void; ngAfterViewInit(): void; attachComponentPortal(portal: ComponentPortal): ComponentRef; attachTemplatePortal(portal: TemplatePortal): EmbeddedViewRef; onDragEnded(event: CdkDragEnd): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class XDialogModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } declare class XDialogService { default: XDialogRefOption; configDefault?: XDialogConfig; private portalService; private configService; private overlay; private rendererFactory; private document; private renderer; private dialogRefs; constructor(); create(content: TemplateRef | ComponentType, option?: XDialogRefOption): XDialogRef; private setMaximize; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } export { XDialogActionsDirective, XDialogCloseDirective, XDialogComponent, XDialogContainer, XDialogContainerComponent, XDialogContainerPrefix, XDialogContainerProperty, XDialogContentDirective, XDialogDragHandleDirective, XDialogFullscreenDirective, XDialogModule, XDialogPortalComponent, XDialogPrefix, XDialogProperty, XDialogRef, XDialogService, XDialogTitleDirective, X_DIALOG_CONFIG_NAME, X_DIALOG_CONTAINER, X_DIALOG_DATA }; export type { XDialogAction, XDialogAnimationEvent, XDialogAnimationState, XDialogCallback, XDialogHandle, XDialogOverlayRef, XDialogPortalHandle, XDialogPortalOverlayRef, XDialogRefOption, XDialogType };