a zip code crypto-currency system good for red ONLY

mock-providers.d.ts 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import { ChangeDetectorRef, ComponentRef, ElementRef, NgZone, Renderer } from '@angular/core';
  2. import { Location } from '@angular/common';
  3. import { App } from '../components/app/app';
  4. import { Config } from '../config/config';
  5. import { Content } from '../components/content/content';
  6. import { DeepLinker } from '../navigation/deep-linker';
  7. import { DomController } from '../platform/dom-controller';
  8. import { GestureController } from '../gestures/gesture-controller';
  9. import { Haptic } from '../tap-click/haptic';
  10. import { IonicApp } from '../components/app/app-root';
  11. import { Menu } from '../components/menu/menu';
  12. import { NavOptions } from '../navigation/nav-util';
  13. import { NavControllerBase } from '../navigation/nav-controller-base';
  14. import { OverlayPortal } from '../components/app/overlay-portal';
  15. import { Platform } from '../platform/platform';
  16. import { QueryParams } from '../platform/query-params';
  17. import { Tab } from '../components/tabs/tab';
  18. import { Tabs } from '../components/tabs/tabs';
  19. import { TransitionController } from '../transitions/transition-controller';
  20. import { ViewController } from '../navigation/view-controller';
  21. import { ModuleLoader } from './module-loader';
  22. import { NgModuleLoader } from './ng-module-loader';
  23. import { DeepLinkConfig } from '../navigation/nav-util';
  24. import { Ion } from '../components/ion';
  25. import { Item } from '../components/item/item';
  26. import { Form } from './form';
  27. export declare function mockConfig(config?: any, _url?: string, platform?: Platform): Config;
  28. export declare function mockQueryParams(url?: string): QueryParams;
  29. export declare function mockPlatform(): MockPlatform;
  30. export declare class MockPlatform extends Platform {
  31. private timeoutIds;
  32. private timeouts;
  33. private rafIds;
  34. private timeStamps;
  35. private rafs;
  36. constructor();
  37. timeout(callback: Function, timeout: number): number;
  38. cancelTimeout(timeoutId: number): void;
  39. flushTimeouts(done: Function): void;
  40. flushTimeoutsUntil(timeout: number, done: Function): void;
  41. raf(callback: {
  42. (timeStamp?: number): void;
  43. } | Function): number;
  44. cancelRaf(rafId: number): void;
  45. flushRafs(done: Function): void;
  46. }
  47. export declare function mockDomController(platform?: MockPlatform): MockDomController;
  48. export declare class MockDomController extends DomController {
  49. private mockedPlatform;
  50. constructor(mockedPlatform: MockPlatform);
  51. flush(done: any): void;
  52. flushUntil(timeout: number, done: any): void;
  53. }
  54. export declare function mockApp(config?: Config, platform?: MockPlatform): App;
  55. export declare function mockIonicApp(app: App, config: Config, plt: MockPlatform): IonicApp;
  56. export declare const mockTrasitionController: (config: Config) => TransitionController;
  57. export declare function mockContent(): Content;
  58. export declare function mockZone(): NgZone;
  59. export declare function mockChangeDetectorRef(): ChangeDetectorRef;
  60. export declare function mockGestureController(app?: App): GestureController;
  61. export declare class MockElementRef implements ElementRef {
  62. nativeElement: any;
  63. constructor(ele: any);
  64. }
  65. export declare class MockElement {
  66. children: any[];
  67. classList: ClassList;
  68. attributes: {
  69. [name: string]: any;
  70. };
  71. style: {
  72. [property: string]: any;
  73. };
  74. nodeName: string;
  75. clientWidth: number;
  76. clientHeight: number;
  77. clientTop: number;
  78. clientLeft: number;
  79. offsetWidth: number;
  80. offsetHeight: number;
  81. offsetTop: number;
  82. offsetLeft: number;
  83. scrollTop: number;
  84. scrollHeight: number;
  85. className: string;
  86. hasAttribute(name: string): boolean;
  87. getAttribute(name: string): any;
  88. setAttribute(name: string, val: any): void;
  89. addEventListener(_type: string, _listener: Function, _options?: any): void;
  90. removeEventListener(_type: string, _listener: Function, _options?: any): void;
  91. removeAttribute(name: string): void;
  92. }
  93. export declare class ClassList {
  94. classes: string[];
  95. add(className: string): void;
  96. remove(className: string): void;
  97. toggle(className: string): void;
  98. contains(className: string): boolean;
  99. }
  100. export declare function mockElementRef(): ElementRef;
  101. export declare function mockElementRefEle(ele: any): ElementRef;
  102. export declare class MockRenderer {
  103. setElementAttribute(renderElement: MockElement, name: string, val: any): void;
  104. setElementClass(renderElement: MockElement, className: string, isAdd: boolean): void;
  105. setElementStyle(renderElement: MockElement, styleName: string, styleValue: string): void;
  106. }
  107. export declare function mockRenderer(): Renderer;
  108. export declare function mockLocation(): Location;
  109. export declare function mockView(component?: any, data?: any): ViewController;
  110. export declare function mockViews(nav: NavControllerBase, views: ViewController[]): void;
  111. export declare function mockComponentRef(): ComponentRef<any>;
  112. export declare function mockDeepLinker(linkConfig?: DeepLinkConfig, app?: App): DeepLinker;
  113. export declare function mockNavController(): NavControllerBase;
  114. export declare function mockOverlayPortal(app: App, config: Config, plt: MockPlatform): OverlayPortal;
  115. export declare function mockTab(parentTabs: Tabs, overrideLoad?: boolean): Tab;
  116. export declare function mockForm(): Form;
  117. export declare function mockIon(): Ion;
  118. export declare function mockItem(): Item;
  119. export declare function mockTabs(app?: App): Tabs;
  120. export declare function mockMenu(platform?: MockPlatform): Menu;
  121. export declare function mockDeepLinkConfig(links?: any[]): DeepLinkConfig;
  122. export declare function mockHaptic(): Haptic;
  123. export declare class MockView {
  124. }
  125. export declare class MockView1 {
  126. }
  127. export declare class MockView2 {
  128. }
  129. export declare class MockView3 {
  130. }
  131. export declare class MockView4 {
  132. }
  133. export declare class MockView5 {
  134. }
  135. export declare function noop(): any;
  136. export declare function mockModuleLoader(ngModuleLoader?: NgModuleLoader): ModuleLoader;
  137. export declare function mockNgModuleLoader(): NgModuleLoader;
  138. export declare function mockOverlay(): {
  139. present: (_opts?: NavOptions) => Promise<void>;
  140. dismiss: (_data?: any, _role?: string, _navOptions?: NavOptions) => Promise<void>;
  141. onDidDismiss: (_callback: Function) => void;
  142. onWillDismiss: (_callback: Function) => void;
  143. };