Front end of the Slack clone application.

nav-util.d.ts 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. import { Renderer, TypeDecorator } from '@angular/core';
  2. import { DeepLinker } from './deep-linker';
  3. import { IonicPageMetadata } from './ionic-page';
  4. import { ViewController } from './view-controller';
  5. import { NavControllerBase } from './nav-controller-base';
  6. import { Transition } from '../transitions/transition';
  7. export declare function getComponent(linker: DeepLinker, nameOrPageOrView: any, params?: any): Promise<ViewController>;
  8. export declare function convertToView(linker: DeepLinker, nameOrPageOrView: any, params: any): Promise<ViewController>;
  9. export declare function convertToViews(linker: DeepLinker, pages: any[]): Promise<ViewController[]>;
  10. export declare function setZIndex(nav: NavControllerBase, enteringView: ViewController, leavingView: ViewController, direction: string, renderer: Renderer): void;
  11. export declare function isTabs(nav: any): boolean;
  12. export declare function isTab(nav: any): boolean;
  13. export declare function isNav(nav: any): boolean;
  14. export declare function linkToSegment(navId: string, type: string, secondaryId: string, link: NavLink): NavSegment;
  15. /**
  16. * @hidden
  17. */
  18. export 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. }
  26. export interface DeepLinkDecorator extends TypeDecorator {
  27. }
  28. export interface DeepLinkMetadataFactory {
  29. (obj: IonicPageMetadata): DeepLinkDecorator;
  30. new (obj: IonicPageMetadata): DeepLinkMetadata;
  31. }
  32. /**
  33. * @hidden
  34. */
  35. export declare var DeepLinkMetadataFactory: DeepLinkMetadataFactory;
  36. /**
  37. * @hidden
  38. */
  39. export interface DeepLinkConfig {
  40. links: DeepLinkMetadata[];
  41. }
  42. export 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. }
  56. export interface NavResult {
  57. hasCompleted: boolean;
  58. requiresTransition: boolean;
  59. enteringName?: string;
  60. leavingName?: string;
  61. direction?: string;
  62. }
  63. export interface NavSegment extends DehydratedSegment {
  64. type: string;
  65. navId: string;
  66. secondaryId: string;
  67. requiresExplicitNavPrefix?: boolean;
  68. }
  69. export interface DehydratedSegment {
  70. id: string;
  71. name: string;
  72. component?: any;
  73. loadChildren?: string;
  74. data: any;
  75. defaultHistory?: NavSegment[];
  76. secondaryId?: string;
  77. }
  78. export interface DehydratedSegmentPair {
  79. segments: DehydratedSegment[];
  80. navGroup: NavGroup;
  81. }
  82. export interface NavGroup {
  83. type: string;
  84. navId: string;
  85. secondaryId: string;
  86. segmentPieces?: string[];
  87. tabSegmentPieces?: string[];
  88. }
  89. export 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. }
  104. export interface Page extends Function {
  105. new (...args: any[]): any;
  106. }
  107. export interface TransitionResolveFn {
  108. (hasCompleted: boolean, requiresTransition: boolean, enteringName?: string, leavingName?: string, direction?: string): void;
  109. }
  110. export interface TransitionRejectFn {
  111. (rejectReason: any, transition?: Transition): void;
  112. }
  113. export interface TransitionDoneFn {
  114. (hasCompleted: boolean, requiresTransition: boolean, enteringName?: string, leavingName?: string, direction?: string): void;
  115. }
  116. export 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. }
  130. export declare const STATE_NEW = 1;
  131. export declare const STATE_INITIALIZED = 2;
  132. export declare const STATE_ATTACHED = 3;
  133. export declare const STATE_DESTROYED = 4;
  134. export declare const INIT_ZINDEX = 100;
  135. export declare const DIRECTION_BACK = "back";
  136. export declare const DIRECTION_FORWARD = "forward";
  137. export declare const DIRECTION_SWITCH = "switch";
  138. export declare const NAV = "nav";
  139. export declare const TABS = "tabs";