a zip code crypto-currency system good for red ONLY

loading-controller.js 6.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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", "./loading"], 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 loading_1 = require("./loading");
  16. /**
  17. * @name LoadingController
  18. * @description
  19. * An overlay that can be used to indicate activity while blocking user
  20. * interaction. The loading indicator appears on top of the app's content,
  21. * and can be dismissed by the app to resume user interaction with
  22. * the app. It includes an optional backdrop, which can be disabled
  23. * by setting `showBackdrop: false` upon creation.
  24. *
  25. * ### Creating
  26. * You can pass all of the loading options in the first argument of
  27. * the create method: `create(opts)`. The spinner name should be
  28. * passed in the `spinner` property, and any optional HTML can be passed
  29. * in the `content` property. If you do not pass a value to `spinner`
  30. * the loading indicator will use the spinner specified by the mode. To
  31. * set the spinner name across the app, set the value of `loadingSpinner`
  32. * in your app's config. To hide the spinner, set `loadingSpinner: 'hide'`
  33. * in the app's config or pass `spinner: 'hide'` in the loading
  34. * options. See the [create](#create) method below for all available options.
  35. *
  36. * ### Dismissing
  37. * The loading indicator can be dismissed automatically after a specific
  38. * amount of time by passing the number of milliseconds to display it in
  39. * the `duration` of the loading options. By default the loading indicator
  40. * will show even during page changes, but this can be disabled by setting
  41. * `dismissOnPageChange` to `true`. To dismiss the loading indicator after
  42. * creation, call the `dismiss()` method on the Loading instance. The
  43. * `onDidDismiss` function can be called to perform an action after the loading
  44. * indicator is dismissed.
  45. *
  46. * >Note that after the component is dismissed, it will not be usable anymore
  47. * and another one must be created. This can be avoided by wrapping the
  48. * creation and presentation of the component in a reusable function as shown
  49. * in the `usage` section below.
  50. *
  51. * ### Limitations
  52. * The element is styled to appear on top of other content by setting its
  53. * `z-index` property. You must ensure no element has a stacking context with
  54. * a higher `z-index` than this element.
  55. *
  56. * @usage
  57. * ```ts
  58. * import { LoadingController } from 'ionic-angular';
  59. *
  60. * constructor(public loadingCtrl: LoadingController) { }
  61. *
  62. * presentLoadingDefault() {
  63. * const loading = this.loadingCtrl.create({
  64. * content: 'Please wait...'
  65. * });
  66. *
  67. * loading.present();
  68. *
  69. * setTimeout(() => {
  70. * loading.dismiss();
  71. * }, 5000);
  72. * }
  73. *
  74. * presentLoadingCustom() {
  75. * const loading = this.loadingCtrl.create({
  76. * spinner: 'hide',
  77. * content: `
  78. * <div class="custom-spinner-container">
  79. * <div class="custom-spinner-box"></div>
  80. * </div>`,
  81. * duration: 5000
  82. * });
  83. *
  84. * loading.onDidDismiss(() => {
  85. * console.log('Dismissed loading');
  86. * });
  87. *
  88. * loading.present();
  89. * }
  90. *
  91. * presentLoadingText() {
  92. * const loading = this.loadingCtrl.create({
  93. * spinner: 'hide',
  94. * content: 'Loading Please Wait...'
  95. * });
  96. *
  97. * loading.present();
  98. *
  99. * setTimeout(() => {
  100. * this.nav.push(Page2);
  101. * }, 1000);
  102. *
  103. * setTimeout(() => {
  104. * loading.dismiss();
  105. * }, 5000);
  106. * }
  107. * ```
  108. * @advanced
  109. *
  110. * Loading options
  111. *
  112. * | Option | Type | Description |
  113. * |-----------------------|------------|------------------------------------------------------------------------------------------------------------------|
  114. * | spinner |`string` | The name of the SVG spinner for the loading indicator. |
  115. * | content |`string` | The html content for the loading indicator. |
  116. * | cssClass |`string` | Additional classes for custom styles, separated by spaces. |
  117. * | showBackdrop |`boolean` | Whether to show the backdrop. Default true. |
  118. * | enableBackdropDismiss | `boolean` | Whether the loading indicator should be dismissed by tapping the backdrop. Default false. |
  119. * | dismissOnPageChange |`boolean` | Whether to dismiss the indicator when navigating to a new page. Default false. |
  120. * | duration |`number` | How many milliseconds to wait before hiding the indicator. By default, it will show until `dismiss()` is called. |
  121. *
  122. * @demo /docs/demos/src/loading/
  123. * @see {@link /docs/api/components/spinner/Spinner Spinner API Docs}
  124. */
  125. var LoadingController = (function () {
  126. function LoadingController(_app, config) {
  127. this._app = _app;
  128. this.config = config;
  129. }
  130. /**
  131. * Create a loading indicator. See below for options.
  132. * @param {LoadingOptions} [opts] Loading options
  133. * @returns {Loading} Returns a Loading Instance
  134. */
  135. LoadingController.prototype.create = function (opts) {
  136. if (opts === void 0) { opts = {}; }
  137. return new loading_1.Loading(this._app, opts, this.config);
  138. };
  139. LoadingController.decorators = [
  140. { type: core_1.Injectable },
  141. ];
  142. /** @nocollapse */
  143. LoadingController.ctorParameters = function () { return [
  144. { type: app_1.App, },
  145. { type: config_1.Config, },
  146. ]; };
  147. return LoadingController;
  148. }());
  149. exports.LoadingController = LoadingController;
  150. });
  151. //# sourceMappingURL=loading-controller.js.map