UNPKG

4.63 kBTypeScriptView Raw
1import { ActionSheetOptions, AlertOptions, Animation, AnimationBuilder, HTMLIonOverlayElement, IonicConfig, LoadingOptions, ModalOptions, OverlayInterface, PickerOptions, PopoverOptions, ToastOptions } from '../interface';
2export declare const activeAnimations: WeakMap<OverlayInterface, Animation[]>;
3export declare const alertController: {
4 create(options: AlertOptions): Promise<HTMLIonAlertElement>;
5 dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;
6 getTop(): Promise<HTMLIonAlertElement | undefined>;
7};
8export declare const actionSheetController: {
9 create(options: ActionSheetOptions): Promise<HTMLIonActionSheetElement>;
10 dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;
11 getTop(): Promise<HTMLIonActionSheetElement | undefined>;
12};
13export declare const loadingController: {
14 create(options: LoadingOptions): Promise<HTMLIonLoadingElement>;
15 dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;
16 getTop(): Promise<HTMLIonLoadingElement | undefined>;
17};
18export declare const modalController: {
19 create(options: ModalOptions<import("../interface").ComponentRef>): Promise<HTMLIonModalElement>;
20 dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;
21 getTop(): Promise<HTMLIonModalElement | undefined>;
22};
23export declare const pickerController: {
24 create(options: PickerOptions): Promise<HTMLIonPickerElement>;
25 dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;
26 getTop(): Promise<HTMLIonPickerElement | undefined>;
27};
28export declare const popoverController: {
29 create(options: PopoverOptions<import("../interface").ComponentRef>): Promise<HTMLIonPopoverElement>;
30 dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;
31 getTop(): Promise<HTMLIonPopoverElement | undefined>;
32};
33export declare const toastController: {
34 create(options: ToastOptions): Promise<HTMLIonToastElement>;
35 dismiss(data?: any, role?: string | undefined, id?: string | undefined): Promise<boolean>;
36 getTop(): Promise<HTMLIonToastElement | undefined>;
37};
38export declare const prepareOverlay: <T extends HTMLIonOverlayElement>(el: T) => void;
39export declare const createOverlay: <T extends HTMLIonOverlayElement>(tagName: string, opts: object | undefined) => Promise<T>;
40export declare const connectListeners: (doc: Document) => void;
41export declare const dismissOverlay: (doc: Document, data: any, role: string | undefined, overlayTag: string, id?: string | undefined) => Promise<boolean>;
42export declare const getOverlays: (doc: Document, selector?: string | undefined) => HTMLIonOverlayElement[];
43export declare const getOverlay: (doc: Document, overlayTag?: string | undefined, id?: string | undefined) => HTMLIonOverlayElement | undefined;
44/**
45 * When an overlay is presented, the main
46 * focus is the overlay not the page content.
47 * We need to remove the page content from the
48 * accessibility tree otherwise when
49 * users use "read screen from top" gestures with
50 * TalkBack and VoiceOver, the screen reader will begin
51 * to read the content underneath the overlay.
52 *
53 * We need a container where all page components
54 * exist that is separate from where the overlays
55 * are added in the DOM. For most apps, this element
56 * is the top most ion-router-outlet. In the event
57 * that devs are not using a router,
58 * they will need to add the "ion-view-container-root"
59 * id to the element that contains all of their views.
60 *
61 * TODO: If Framework supports having multiple top
62 * level router outlets we would need to update this.
63 * Example: One outlet for side menu and one outlet
64 * for main content.
65 */
66export declare const setRootAriaHidden: (hidden?: boolean) => void;
67export declare const present: (overlay: OverlayInterface, name: keyof IonicConfig, iosEnterAnimation: AnimationBuilder, mdEnterAnimation: AnimationBuilder, opts?: any) => Promise<void>;
68export declare const dismiss: (overlay: OverlayInterface, data: any | undefined, role: string | undefined, name: keyof IonicConfig, iosLeaveAnimation: AnimationBuilder, mdLeaveAnimation: AnimationBuilder, opts?: any) => Promise<boolean>;
69export declare const eventMethod: <T>(element: HTMLElement, eventName: string) => Promise<T>;
70export declare const onceEvent: (element: HTMLElement, eventName: string, callback: (ev: Event) => void) => void;
71export declare const isCancel: (role: string | undefined) => boolean;
72export declare const safeCall: (handler: any, arg?: any) => any;
73export declare const BACKDROP = "backdrop";