1 | import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
|
2 | import { MenuChangeEventDetail, MenuI, Side } from '../../interface';
|
3 | /**
|
4 | * @part container - The container for the menu content.
|
5 | * @part backdrop - The backdrop that appears over the main content when the menu is open.
|
6 | */
|
7 | export declare class Menu implements ComponentInterface, MenuI {
|
8 | private animation?;
|
9 | private lastOnEnd;
|
10 | private gesture?;
|
11 | private blocker;
|
12 | isAnimating: boolean;
|
13 | width: number;
|
14 | _isOpen: boolean;
|
15 | backdropEl?: HTMLElement;
|
16 | menuInnerEl?: HTMLElement;
|
17 | contentEl?: HTMLElement;
|
18 | el: HTMLIonMenuElement;
|
19 | isPaneVisible: boolean;
|
20 | isEndSide: boolean;
|
21 | /**
|
22 | * The `id` of the main content. When using
|
23 | * a router this is typically `ion-router-outlet`.
|
24 | * When not using a router, this is typically
|
25 | * your main view's `ion-content`. This is not the
|
26 | * id of the `ion-content` inside of your `ion-menu`.
|
27 | */
|
28 | contentId?: string;
|
29 | /**
|
30 | * An id for the menu.
|
31 | */
|
32 | menuId?: string;
|
33 | /**
|
34 | * The display type of the menu.
|
35 | * Available options: `"overlay"`, `"reveal"`, `"push"`.
|
36 | */
|
37 | type?: string;
|
38 | typeChanged(type: string, oldType: string | undefined): void;
|
39 | /**
|
40 | * If `true`, the menu is disabled.
|
41 | */
|
42 | disabled: boolean;
|
43 | protected disabledChanged(): void;
|
44 | /**
|
45 | * Which side of the view the menu should be placed.
|
46 | */
|
47 | side: Side;
|
48 | protected sideChanged(): void;
|
49 | /**
|
50 | * If `true`, swiping the menu is enabled.
|
51 | */
|
52 | swipeGesture: boolean;
|
53 | protected swipeGestureChanged(): void;
|
54 | /**
|
55 | * The edge threshold for dragging the menu open.
|
56 | * If a drag/swipe happens over this value, the menu is not triggered.
|
57 | */
|
58 | maxEdgeStart: number;
|
59 | /**
|
60 | * Emitted when the menu is about to be opened.
|
61 | */
|
62 | ionWillOpen: EventEmitter<void>;
|
63 | /**
|
64 | * Emitted when the menu is about to be closed.
|
65 | */
|
66 | ionWillClose: EventEmitter<void>;
|
67 | /**
|
68 | * Emitted when the menu is open.
|
69 | */
|
70 | ionDidOpen: EventEmitter<void>;
|
71 | /**
|
72 | * Emitted when the menu is closed.
|
73 | */
|
74 | ionDidClose: EventEmitter<void>;
|
75 | /**
|
76 | * Emitted when the menu state is changed.
|
77 | * @internal
|
78 | */
|
79 | protected ionMenuChange: EventEmitter<MenuChangeEventDetail>;
|
80 | connectedCallback(): Promise<void>;
|
81 | componentDidLoad(): Promise<void>;
|
82 | disconnectedCallback(): void;
|
83 | onSplitPaneChanged(ev: CustomEvent): void;
|
84 | onBackdropClick(ev: any): void;
|
85 | /**
|
86 | * Returns `true` is the menu is open.
|
87 | */
|
88 | isOpen(): Promise<boolean>;
|
89 | /**
|
90 | * Returns `true` is the menu is active.
|
91 | *
|
92 | * A menu is active when it can be opened or closed, meaning it's enabled
|
93 | * and it's not part of a `ion-split-pane`.
|
94 | */
|
95 | isActive(): Promise<boolean>;
|
96 | /**
|
97 | * Opens the menu. If the menu is already open or it can't be opened,
|
98 | * it returns `false`.
|
99 | */
|
100 | open(animated?: boolean): Promise<boolean>;
|
101 | /**
|
102 | * Closes the menu. If the menu is already closed or it can't be closed,
|
103 | * it returns `false`.
|
104 | */
|
105 | close(animated?: boolean): Promise<boolean>;
|
106 | /**
|
107 | * Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.
|
108 | * If the operation can't be completed successfully, it returns `false`.
|
109 | */
|
110 | toggle(animated?: boolean): Promise<boolean>;
|
111 | /**
|
112 | * Opens or closes the button.
|
113 | * If the operation can't be completed successfully, it returns `false`.
|
114 | */
|
115 | setOpen(shouldOpen: boolean, animated?: boolean): Promise<boolean>;
|
116 | _setOpen(shouldOpen: boolean, animated?: boolean): Promise<boolean>;
|
117 | private loadAnimation;
|
118 | private startAnimation;
|
119 | private _isActive;
|
120 | private canSwipe;
|
121 | private canStart;
|
122 | private onWillStart;
|
123 | private onStart;
|
124 | private onMove;
|
125 | private onEnd;
|
126 | private beforeAnimation;
|
127 | private afterAnimation;
|
128 | private updateState;
|
129 | private forceClosing;
|
130 | render(): any;
|
131 | }
|