/** * @license * Copyright 厦门乾元盛世科技有限公司 All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file. */ import { EventEmitter, ElementRef, Renderer, OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core'; import { ComponentFactoryResolver, ApplicationRef, Injector, Type, AfterViewInit } from '@angular/core'; import { Popup } from './popup'; /** * Abstract Trigger。 * 参考 https://github.com/react-component/trigger */ export declare class Trigger implements OnInit, OnDestroy, OnChanges, AfterViewInit { private _renderer; private _elementRef; private _componentFactoryResolver; private _appRef; private _injector; prefixCls: string; destroyPopupOnHide: boolean; popupClass: string; /** * 气泡框位置,可选 top left right bottom topLeft topRight bottomLeft bottomRight leftTop leftBottom rightTop rightBottom。 * 默认值为top。 */ placement: string; popupAlign: {}; popupStyle: {}; popupAnimation: any; popupTransitionName: string | Object; /** * 是否不可用 */ disabled: boolean; /** * 是否已遮罩 */ mask: boolean; /** * 点击遮罩是否可关闭冒泡 */ maskClosable: boolean; /** * 遮罩动画名 */ maskAnimation: string; /** * 遮罩过渡效果 */ maskTransitionName: string | Object; /** * 鼠标移入后显示延迟时间(秒) */ mouseEnterDelay: number; /** * 鼠标移出后隐藏延迟时间(秒) */ mouseLeaveDelay: number; /** * 聚焦后显示延迟时间(秒) */ focusDelay: number; /** * 失焦后显示延迟时间(秒) */ blurDelay: number; zIndex: number; action: string | string[]; showAction: string | string[]; hideAction: string | string[]; autoMountPopup: boolean; autoDestroyPopup: boolean; /** * 冒泡可视事件变更 */ popupVisibleChange: EventEmitter; /** * 记录聚焦时的开始时间 */ private focusTime; /** * 记录点击(MouseDown)的开始时间 */ private preClickTime; /** * 记录触摸(TouchStart)的开始时间 */ private preTouchTime; private clickOutsideHandler; private touchOutsideHandler; popupComponentType: Type; private _popup_container; private _popupComponentRef; protected _popup: Popup; protected _popupVisible: boolean; /** * 延迟计时器(显示或隐藏冒泡) */ private delayTimer; constructor(_renderer: Renderer, _elementRef: ElementRef, _componentFactoryResolver: ComponentFactoryResolver, _appRef: ApplicationRef, _injector: Injector); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** * The underlying host native element */ getHostElement(): HTMLElement; popupVisible: boolean; protected _getPopupContainer(): HTMLElement; getPopupContainer(): HTMLElement; removePopupContainer(): void; renderPopupComponent(): void; afterRenderPopupComponent(): void; registerTriggerElement(triggerElement: HTMLElement): void; setPopupAttribute(name: string, value: any): void; ngOnChanges(changes: SimpleChanges): void; setPopupComponentType(popupComponentType: Type): void; onClick(event: MouseEvent): void; onMouseDown(e: MouseEvent): void; onTouchStart(e: MouseEvent): void; onFocus(e: any): void; onBlur(e: MouseEvent): void; onMouseEnter(e: MouseEvent): void; onMouseLeave(e: MouseEvent): void; onPopupMouseEnter(): void; onPopupMouseLeave(e: MouseEvent): void; onDocumentClick(event: MouseEvent): void; getPopupElement(): HTMLElement; isPopupVisible(): boolean; setPopupVisible(popupVisible: boolean): void; afterPopupVisibleChange(popupVisible: boolean): void; /** * 显示或者隐藏冒泡 * * @param visible true-显示冒泡,false-隐藏冒泡 * @param delayS 延迟时间(单位:秒) */ delaySetPopupVisible(visible: boolean, delayS: number): void; clearDelayTimer(): void; clearOutsideHandler(): void; isClickToShow(): boolean; isClickToHide(): boolean; isMouseEnterToShow(): boolean; isMouseLeaveToHide(): boolean; isFocusToShow(): boolean; isBlurToHide(): boolean; forcePopupAlign(): void; close(): void; }