import * as rxjs from 'rxjs'; import { Subscription } from 'rxjs'; import * as i0 from '@angular/core'; import { InjectionToken, ViewContainerRef, AfterViewInit, OnDestroy, TemplateRef } from '@angular/core'; import * as _ng_nest_ui_core from '@ng-nest/ui/core'; import { XPosition, XTemplate, XNumber, XBoolean, XProperty, XDrawerConfig } from '@ng-nest/ui/core'; import { XPortalOverlayRef } from '@ng-nest/ui/portal'; import { Portal, CdkPortalOutlet, ComponentType } from '@angular/cdk/portal'; import { OverlayRef } from '@angular/cdk/overlay'; declare class XDrawerPortalComponent { _has: boolean; placement: i0.InputSignal; portal: Portal; get animateEnter(): string; get animateLeave(): string; portalOutlet: i0.Signal; ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XDrawerRef { overlayRef: OverlayRef; containerInstance: XDrawerPortalComponent; componentInstance: C; constructor(overlayRef: OverlayRef, containerInstance: XDrawerPortalComponent); close(): void; } /** * Drawer * @selector x-drawer * @decorator component */ declare const XDrawerPrefix = "x-drawer"; declare const X_DRAWER_CONFIG_NAME = "drawer"; declare const X_DRAWER_DATA: InjectionToken; declare const XDrawerProperty_base: new () => { config: _ng_nest_ui_core.XDrawerConfig | undefined; }; /** * Drawer Property */ declare class XDrawerProperty extends XDrawerProperty_base { /** * @zh_CN 标题 * @en_US Title */ readonly title: i0.InputSignal; /** * @zh_CN 显示/隐藏 * @en_US Show/hide */ readonly visible: i0.ModelSignal; /** * @zh_CN 展示方向 * @en_US Display direction */ readonly placement: i0.InputSignal; /** * @zh_CN 尺寸,支持固定值 * @en_US Size, supports fixed value */ readonly size: i0.InputSignalWithTransform; /** * @zh_CN 点击遮罩关闭 * @en_US Click the mask to close */ readonly backdropClose: i0.InputSignalWithTransform; /** * @zh_CN 是否显示背景遮罩 * @en_US Whether to display the background mask */ readonly hasBackdrop: i0.InputSignalWithTransform; /** * @zh_CN 自定义样式名 * @en_US Custom style name */ readonly className: i0.InputSignal; /** * @zh_CN 关闭的事件 * @en_US Closed event */ readonly close: i0.OutputEmitterRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Drawer Option */ interface XDrawerOption { /** * @zh_CN 展示方向 * @en_US Display direction * @default 'right' * @withConfig true */ placement?: XPosition; /** * @zh_CN 尺寸,支持固定值 * @en_US Size, supports fixed value * @default '30%' * @withConfig true */ size?: 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 数据,通过 "@Inject(X_DRAWER_DATA)" 来接收数据 * @en_US Data. Receive data by "@Inject(X_DRAWER_DATA)" */ data?: any; /** * @zh_CN 视图容器实例可以包含其他视图容器。 * @en_US A view container instance can contain other view containers. */ viewContainerRef?: ViewContainerRef; } /** * Drawer Container * @selector x-drawer-container * @decorator component */ declare const XDrawerContainerPrefix = "x-drawer-container"; declare const X_DRAWER_CONTAINER: InjectionToken; /** * Drawer Container Property */ declare class XDrawerContainerProperty extends XProperty { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @zh_CN 创建的抽屉对象 * @en_US Drawer object created */ interface XDrawerPortalOverlayRef extends XPortalOverlayRef { drawerRef?: XDrawerRef; } /** * @zh_CN 抽屉动画状态 * @en_US Drawer animation status */ type XDrawerAnimationState = XPosition | 'void'; /** * @zh_CN 抽屉动画事件 * @en_US Drawer animation event */ interface XDrawerAnimationEvent { state: XDrawerAnimationState; action: 'start' | 'done'; totalTime: number; } declare class XDrawerContainerComponent extends XDrawerContainerProperty { className: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XDrawerComponent extends XDrawerProperty implements AfterViewInit, OnDestroy { get getVisible(): boolean; drawerTpl: i0.Signal>; portal: XPortalOverlayRef; back$: Subscription | null; width: i0.Signal; height: i0.Signal; private overlay; private portalService; private viewContainerRef; private unSubject; container: XDrawerContainerComponent | null; hasContainer: i0.WritableSignal; classMap: i0.Signal<{ [x: string]: boolean; "x-drawer-no-title": boolean; }>; visibleChanged: rxjs.Observable; constructor(); ngAfterViewInit(): void; ngOnDestroy(): void; setVisible(): void; createPortal(): void; portalAttached(): boolean | undefined; closePortal(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class XDrawerCloseDirective { onCloseClick(): void; drawerRef: XDrawerRef | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class XDrawerTitleDirective { _has: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class XDrawerContentDirective { _has: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class XDrawerModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class XDrawerService { default: XDrawerOption; configDefault?: XDrawerConfig; private portalService; private configService; private overlay; constructor(); create(content: TemplateRef | ComponentType, option?: XDrawerOption): XDrawerRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { XDrawerCloseDirective, XDrawerComponent, XDrawerContainerComponent, XDrawerContainerPrefix, XDrawerContainerProperty, XDrawerContentDirective, XDrawerModule, XDrawerPortalComponent, XDrawerPrefix, XDrawerProperty, XDrawerRef, XDrawerService, XDrawerTitleDirective, X_DRAWER_CONFIG_NAME, X_DRAWER_CONTAINER, X_DRAWER_DATA }; export type { XDrawerAnimationEvent, XDrawerAnimationState, XDrawerOption, XDrawerPortalOverlayRef };