refactor(popover): rename ev to event?

fixes #15014
This commit is contained in:
Manu Mtz.-Almeida
2018-08-07 23:16:47 +02:00
parent 2a4327f850
commit 8cc1ce253e
19 changed files with 83 additions and 82 deletions

View File

@ -0,0 +1,44 @@
import { EventEmitter } from '@stencil/core';
import { Animation, AnimationBuilder, Config, Mode } from '../interface';
export interface OverlayEventDetail<T = any> {
data?: T;
role?: string;
}
export interface OverlayInterface {
mode: Mode;
el: HTMLElement;
willAnimate: boolean;
keyboardClose: boolean;
config: Config;
overlayId: number;
presented: boolean;
animation?: Animation;
animationCtrl: HTMLIonAnimationControllerElement;
enterAnimation?: AnimationBuilder;
leaveAnimation?: AnimationBuilder;
didPresent: EventEmitter<void>;
willPresent: EventEmitter<void>;
willDismiss: EventEmitter<OverlayEventDetail>;
didDismiss: EventEmitter<OverlayEventDetail>;
present(): Promise<void>;
dismiss(data?: any, role?: string): Promise<void>;
}
export interface OverlayController {
create(opts?: any): Promise<HTMLElement>;
dismiss(data?: any, role?: string, alertId?: number): Promise<void>;
getTop(): HTMLElement;
}
export interface HTMLIonOverlayElement extends HTMLStencilElement {
overlayId: number;
dismiss(data?: any, role?: string): Promise<void>;
}
export type OverlayMap = Map<number, HTMLIonOverlayElement>;