UNPKG

4.52 kBTypeScriptView Raw
1import { Renderer, TypeDecorator } from '@angular/core';
2import { DeepLinker } from './deep-linker';
3import { IonicPageMetadata } from './ionic-page';
4import { ViewController } from './view-controller';
5import { NavControllerBase } from './nav-controller-base';
6import { Transition } from '../transitions/transition';
7export declare function getComponent(linker: DeepLinker, nameOrPageOrView: any, params?: any): Promise<ViewController>;
8export declare function convertToView(linker: DeepLinker, nameOrPageOrView: any, params: any): Promise<ViewController>;
9export declare function convertToViews(linker: DeepLinker, pages: any[]): Promise<ViewController[]>;
10export declare function setZIndex(nav: NavControllerBase, enteringView: ViewController, leavingView: ViewController, direction: string, renderer: Renderer): void;
11export declare function isTabs(nav: any): boolean;
12export declare function isTab(nav: any): boolean;
13export declare function isNav(nav: any): boolean;
14export declare function linkToSegment(navId: string, type: string, secondaryId: string, link: NavLink): NavSegment;
15/**
16 * @hidden
17 */
18export declare class DeepLinkMetadata implements IonicPageMetadata {
19 component?: any;
20 loadChildren?: string;
21 name?: string;
22 segment?: string;
23 defaultHistory?: string[] | any[];
24 priority?: string;
25}
26export interface DeepLinkDecorator extends TypeDecorator {
27}
28export interface DeepLinkMetadataFactory {
29 (obj: IonicPageMetadata): DeepLinkDecorator;
30 new (obj: IonicPageMetadata): DeepLinkMetadata;
31}
32/**
33 * @hidden
34 */
35export declare var DeepLinkMetadataFactory: DeepLinkMetadataFactory;
36/**
37 * @hidden
38 */
39export interface DeepLinkConfig {
40 links: DeepLinkMetadata[];
41}
42export interface NavLink {
43 component?: any;
44 loadChildren?: string;
45 name?: string;
46 segment?: string;
47 segmentParts?: string[];
48 segmentPartsLen?: number;
49 staticLen?: number;
50 dataLen?: number;
51 dataKeys?: {
52 [key: string]: boolean;
53 };
54 defaultHistory?: any[];
55}
56export interface NavResult {
57 hasCompleted: boolean;
58 requiresTransition: boolean;
59 enteringName?: string;
60 leavingName?: string;
61 direction?: string;
62}
63export interface NavSegment extends DehydratedSegment {
64 type: string;
65 navId: string;
66 secondaryId: string;
67 requiresExplicitNavPrefix?: boolean;
68}
69export interface DehydratedSegment {
70 id: string;
71 name: string;
72 component?: any;
73 loadChildren?: string;
74 data: any;
75 defaultHistory?: NavSegment[];
76 secondaryId?: string;
77}
78export interface DehydratedSegmentPair {
79 segments: DehydratedSegment[];
80 navGroup: NavGroup;
81}
82export interface NavGroup {
83 type: string;
84 navId: string;
85 secondaryId: string;
86 segmentPieces?: string[];
87 tabSegmentPieces?: string[];
88}
89export interface NavOptions {
90 animate?: boolean;
91 animation?: string;
92 direction?: string;
93 duration?: number;
94 easing?: string;
95 id?: string;
96 keyboardClose?: boolean;
97 progressAnimation?: boolean;
98 disableApp?: boolean;
99 minClickBlockDuration?: number;
100 ev?: any;
101 updateUrl?: boolean;
102 isNavRoot?: boolean;
103}
104export interface Page extends Function {
105 new (...args: any[]): any;
106}
107export interface TransitionResolveFn {
108 (hasCompleted: boolean, requiresTransition: boolean, enteringName?: string, leavingName?: string, direction?: string): void;
109}
110export interface TransitionRejectFn {
111 (rejectReason: any, transition?: Transition): void;
112}
113export interface TransitionDoneFn {
114 (hasCompleted: boolean, requiresTransition: boolean, enteringName?: string, leavingName?: string, direction?: string): void;
115}
116export interface TransitionInstruction {
117 opts: NavOptions;
118 insertStart?: number;
119 insertViews?: any[];
120 removeView?: ViewController;
121 removeStart?: number;
122 removeCount?: number;
123 resolve?: (hasCompleted: boolean) => void;
124 reject?: (rejectReason: string) => void;
125 done?: TransitionDoneFn;
126 leavingRequiresTransition?: boolean;
127 enteringRequiresTransition?: boolean;
128 requiresTransition?: boolean;
129}
130export declare const STATE_NEW = 1;
131export declare const STATE_INITIALIZED = 2;
132export declare const STATE_ATTACHED = 3;
133export declare const STATE_DESTROYED = 4;
134export declare const INIT_ZINDEX = 100;
135export declare const DIRECTION_BACK = "back";
136export declare const DIRECTION_FORWARD = "forward";
137export declare const DIRECTION_SWITCH = "switch";
138export declare const NAV = "nav";
139export declare const TABS = "tabs";