a zip code crypto-currency system good for red ONLY

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. (function (factory) {
  2. if (typeof module === "object" && typeof module.exports === "object") {
  3. var v = factory(require, exports);
  4. if (v !== undefined) module.exports = v;
  5. }
  6. else if (typeof define === "function" && define.amd) {
  7. define(["require", "exports", "@angular/core", "../app/app", "../../config/config", "./modal", "../../navigation/deep-linker"], factory);
  8. }
  9. })(function (require, exports) {
  10. "use strict";
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var core_1 = require("@angular/core");
  13. var app_1 = require("../app/app");
  14. var config_1 = require("../../config/config");
  15. var modal_1 = require("./modal");
  16. var deep_linker_1 = require("../../navigation/deep-linker");
  17. /**
  18. * @name ModalController
  19. * @description
  20. * A Modal is a content pane that goes over the user's current page.
  21. * Usually it is used for making a choice or editing an item. A modal uses the
  22. * `NavController` to
  23. * {@link /docs/api/components/nav/NavController/#present present}
  24. * itself in the root nav stack. It is added to the stack similar to how
  25. * {@link /docs/api/components/nav/NavController/#push NavController.push}
  26. * works.
  27. *
  28. * When a modal (or any other overlay such as an alert or actionsheet) is
  29. * "presented" to a nav controller, the overlay is added to the app's root nav.
  30. * After the modal has been presented, from within the component instance, the
  31. * modal can later be closed or "dismissed" by using the ViewController's
  32. * `dismiss` method. Additionally, you can dismiss any overlay by using `pop`
  33. * on the root nav controller. Modals are not reusable. When a modal is dismissed
  34. * it is destroyed.
  35. *
  36. * Data can be passed to a new modal through `Modal.create()` as the second
  37. * argument. The data can then be accessed from the opened page by injecting
  38. * `NavParams`. Note that the page, which opened as a modal, has no special
  39. * "modal" logic within it, but uses `NavParams` no differently than a
  40. * standard page.
  41. *
  42. * @usage
  43. * ```ts
  44. * import { ModalController, NavParams } from 'ionic-angular';
  45. *
  46. * @Component(...)
  47. * class HomePage {
  48. *
  49. * constructor(public modalCtrl: ModalController) { }
  50. *
  51. * presentProfileModal() {
  52. * const profileModal = this.modalCtrl.create(Profile, { userId: 8675309 });
  53. * profileModal.present();
  54. * }
  55. *
  56. * }
  57. *
  58. * @Component(...)
  59. * class Profile {
  60. *
  61. * constructor(params: NavParams) {
  62. * console.log('UserId', params.get('userId'));
  63. * }
  64. *
  65. * }
  66. * ```
  67. *
  68. * @advanced
  69. *
  70. * | Option | Type | Description |
  71. * |-----------------------|------------|------------------------------------------------------------------------------------------------------------------|
  72. * | showBackdrop |`boolean` | Whether to show the backdrop. Default true. |
  73. * | enableBackdropDismiss |`boolean` | Whether the popover should be dismissed by tapping the backdrop. Default true. |
  74. * | cssClass |`string` | Additional classes for custom styles, separated by spaces. |
  75. *
  76. * A modal can also emit data, which is useful when it is used to add or edit
  77. * data. For example, a profile page could slide up in a modal, and on submit,
  78. * the submit button could pass the updated profile data, then dismiss the
  79. * modal.
  80. *
  81. * ```ts
  82. * import { Component } from '@angular/core';
  83. * import { ModalController, ViewController } from 'ionic-angular';
  84. *
  85. * @Component(...)
  86. * class HomePage {
  87. *
  88. * constructor(public modalCtrl: ModalController) {
  89. *
  90. * }
  91. *
  92. * presentContactModal() {
  93. * let contactModal = this.modalCtrl.create(ContactUs);
  94. * contactModal.present();
  95. * }
  96. *
  97. * presentProfileModal() {
  98. * let profileModal = this.modalCtrl.create(Profile, { userId: 8675309 });
  99. * profileModal.onDidDismiss(data => {
  100. * console.log(data);
  101. * });
  102. * profileModal.present();
  103. * }
  104. *
  105. * }
  106. *
  107. * @Component(...)
  108. * class Profile {
  109. *
  110. * constructor(public viewCtrl: ViewController) {
  111. *
  112. * }
  113. *
  114. * dismiss() {
  115. * let data = { 'foo': 'bar' };
  116. * this.viewCtrl.dismiss(data);
  117. * }
  118. *
  119. * }
  120. * ```
  121. *
  122. * A common issue is that a developer may try to implement navigation in a modal, but when you try NavController.push(),
  123. * you will notice that the status bar on iOS gets cut off. The proper way to implement navigation in a modal is to
  124. * make the modal component a navigation container, and set the root page to the page you want to show in your modal.
  125. *
  126. * ```ts
  127. * @Component({
  128. * template: '<ion-nav [root]="rootPage" [rootParams]="rootParams"></ion-nav>'
  129. * })
  130. * export class MyModalWrapper {
  131. * rootPage = 'MyModalContentPage'; // This is the page you want your modal to display
  132. * rootParams;
  133. *
  134. * constructor(navParams: NavParams, private viewCtrl: ViewController) {
  135. * this.rootParams = Object.assign({}, navParams.data, {viewCtrl: viewCtrl});
  136. * // This line will send the view controller into your child views, so you can dismiss the modals from there.
  137. * }
  138. * }
  139. * ```
  140. * @demo /docs/demos/src/modal/
  141. * @see {@link /docs/components#modals Modal Component Docs}
  142. */
  143. var ModalController = (function () {
  144. function ModalController(_app, config, deepLinker) {
  145. this._app = _app;
  146. this.config = config;
  147. this.deepLinker = deepLinker;
  148. }
  149. /**
  150. * Create a modal to display. See below for options.
  151. *
  152. * @param {object} component The Modal view
  153. * @param {object} data Any data to pass to the Modal view
  154. * @param {object} opts Modal options
  155. */
  156. ModalController.prototype.create = function (component, data, opts) {
  157. if (data === void 0) { data = {}; }
  158. if (opts === void 0) { opts = {}; }
  159. return new modal_1.Modal(this._app, component, data, opts, this.config, this.deepLinker);
  160. };
  161. ModalController.decorators = [
  162. { type: core_1.Injectable },
  163. ];
  164. /** @nocollapse */
  165. ModalController.ctorParameters = function () { return [
  166. { type: app_1.App, },
  167. { type: config_1.Config, },
  168. { type: deep_linker_1.DeepLinker, },
  169. ]; };
  170. return ModalController;
  171. }());
  172. exports.ModalController = ModalController;
  173. });
  174. //# sourceMappingURL=modal-controller.js.map