import * as i0 from '@angular/core'; import { InjectionToken, ElementRef, OnDestroy, OnInit, TemplateRef, StaticProvider } from '@angular/core'; import * as i1 from '@angular/common'; import * as i2 from 'ngx-tethys/shared'; import * as i3 from 'ngx-tethys/icon'; import * as i4 from '@angular/cdk/overlay'; import { OverlayConfig, OverlayRef } from '@angular/cdk/overlay'; import * as i5 from '@angular/cdk/portal'; import * as i6 from 'ngx-tethys/action'; import { ThyAbstractOverlayConfig, ThyAbstractOverlayOptions, ThyAbstractOverlayContainer, ThyPortalOutlet, ThyAbstractInternalOverlayRef, ThyAbstractOverlayRef, ThyAbstractOverlayPosition, ThyAbstractOverlayService, ComponentTypeOrTemplateRef } from 'ngx-tethys/core'; import { Observable } from 'rxjs'; import { AnimationEvent, AnimationTriggerMetadata } from '@angular/animations'; type ThySlideFromTypes = 'left' | 'right' | 'top' | 'bottom' | 'void' | 'exit' | 'offsetLeft' | 'offsetRight' | 'offsetTop' | 'offsetBottom'; type ThySlideMode = 'over' | 'push' | 'side'; /** * @public * @order 20 */ declare class ThySlideConfig extends ThyAbstractOverlayConfig { /** * Origin Element, for overlay flexible connected to * @type ElementRef | HTMLElement | any */ origin?: ElementRef | HTMLElement | any; /** * slide 进场的方向,可选 left | right | top | bottom * @description.en-us set the direction when slide enter * @default right */ from?: ThySlideFromTypes; /** * 从距离屏幕边缘 offset 出滑入滑出,单位 px */ offset?: number; /** * set class to trigger element. * @type string | string[] */ originActiveClass?: string | string[]; /** * slide 弹出的容器,可传入id、HTMLElement 或 ElementRef * @description.en-us set the drawerContainer by id、HTMLElement or ElementRef. e.g. drawerContainer = '#offset-host' * @type string | HTMLElement | ElementRef */ drawerContainer?: string | HTMLElement | ElementRef; /** * slide 进场的方向,可选 push | over | slide * @description.en-us set the render way. one of 'over' or 'push'. Default is 'over' * @default over */ mode?: ThySlideMode; /** * 是否禁用关闭上一个已打开的 slideRef * @description.en-us set whether to disable close the latest item. Default is false * @default false */ disableCloseLatest?: boolean; } declare class ThySlideOption extends ThySlideConfig { } declare const THY_SLIDE_DEFAULT_CONFIG: InjectionToken>; declare const slideAbstractOverlayOptions: ThyAbstractOverlayOptions; declare const slideDefaultConfigValue: { hasBackdrop: boolean; backdropClass: string; backdropClosable: boolean; closeOnNavigation: boolean; autoFocus: boolean; restoreFocus: boolean; from: string; panelClass: string; containerClass: string; role: string; offset: number; originActiveClass: string; mode: string; drawerContainer: string; disableCloseLatest: boolean; }; declare const THY_SLIDE_DEFAULT_CONFIG_PROVIDER: { provide: InjectionToken>; useValue: {}; }; /** * @private */ declare class ThySlideContainer extends ThyAbstractOverlayContainer implements OnDestroy { private elementRef; private document; config: ThySlideConfig; private renderer; private viewportRuler; private readonly ngZone; portalOutlet: ThyPortalOutlet; animationOpeningDone: Observable; animationClosingDone: Observable; animationState: ThySlideFromTypes; slideContainerStyles: { width?: number; height?: number; }; private drawerContainerElement; private ngUnsubscribe$; private hostRenderer; get isPush(): boolean; get isSide(): boolean; private get isLeftOrRight(); private get hostOffset(); private get transform(); private get drawerContainerElementClass(); constructor(); private setDrawerContainerElement; private setSlideContainerStyles; private checkContainerWithinViewport; private addDrawerContainerElementClass; private removeDrawerContainerElementClass; private setDrawerContainerElementStyle; private removeDrawerContainerElementStyle; beforeAttachPortal(): void; beforeDetachPortal(): void; onAnimationDone(event: AnimationEvent): void; onAnimationStart(event: AnimationEvent): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @name thy-slide-layout * @order 35 */ declare class ThySlideLayout implements OnInit { slideLayout: boolean; constructor(); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * 滑动弹出框的头部组件 * @name thy-slide-header * @order 40 */ declare class ThySlideHeader implements OnInit { private thySlideService; /** * 标题 */ readonly thyTitle: i0.InputSignal; /** * 标题的图标 */ readonly thyIcon: i0.InputSignal; readonly isIconFont: i0.Signal; /** * 自定义头模板 * @type TemplateRef */ readonly headerTemplate: i0.Signal | undefined>; /** * 头部操作区域模板 * @type TemplateRef */ readonly headerOperateTemplate: i0.Signal | undefined>; ngOnInit(): void; closeModal(event: Event): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @name thy-slide-body * @order 45 */ declare class ThySlideBody { slideLayoutBody: boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @name thy-slide-body-section * @order 50 */ declare class ThySlideBodySection implements OnInit { /** * 是否有分割线 * @default false */ readonly thyDividerBorder: i0.InputSignalWithTransform; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @name thy-slide-footer * @order 55 */ declare class ThySlideFooter implements OnInit { slideLayoutFooter: boolean; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @name thyDrawerContainer * @order 60 */ declare class ThyDrawerContainerDirective { elementRef: ElementRef; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ThySlideModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** * @public * @order 30 */ declare abstract class ThySlideRef extends ThyAbstractOverlayRef { } /** * @internal */ declare class ThyInternalSlideRef extends ThyAbstractInternalOverlayRef implements ThySlideRef { constructor(); protected get options(): ThyAbstractOverlayOptions; updatePosition(position?: ThyAbstractOverlayPosition): this; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } /** * @public * @order 10 */ declare class ThySlideService extends ThyAbstractOverlayService implements OnDestroy { private originElementAddActiveClass; private originElementRemoveActiveClass; protected buildOverlayConfig(config: ThySlideConfig): OverlayConfig; protected attachOverlayContainer(overlay: OverlayRef, config: ThySlideConfig): ThySlideContainer; protected createAbstractOverlayRef(overlayRef: OverlayRef, containerInstance: ThySlideContainer, config: ThySlideConfig): ThyAbstractOverlayRef; protected createInjectorProviders(overlayRef: ThyAbstractOverlayRef, containerInstance: ThySlideContainer): StaticProvider[]; private overlayIsOpened; constructor(); /** * 打开滑动弹出框 */ open(componentOrTemplateRef: ComponentTypeOrTemplateRef, config: ThySlideConfig): ThySlideRef | undefined; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare const thySlideAnimations: { readonly slideContainer: AnimationTriggerMetadata; }; export { THY_SLIDE_DEFAULT_CONFIG, THY_SLIDE_DEFAULT_CONFIG_PROVIDER, ThyDrawerContainerDirective, ThyInternalSlideRef, ThySlideBody, ThySlideBodySection, ThySlideConfig, ThySlideContainer, ThySlideFooter, ThySlideHeader, ThySlideLayout, ThySlideModule, ThySlideOption, ThySlideRef, ThySlideService, slideAbstractOverlayOptions, slideDefaultConfigValue, thySlideAnimations }; export type { ThySlideFromTypes, ThySlideMode };