a zip code crypto-currency system good for red ONLY

modal-impl.js 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. var __extends = (this && this.__extends) || (function () {
  2. var extendStatics = Object.setPrototypeOf ||
  3. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  4. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  5. return function (d, b) {
  6. extendStatics(d, b);
  7. function __() { this.constructor = d; }
  8. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  9. };
  10. })();
  11. import { isPresent } from '../../util/util';
  12. import { PORTAL_MODAL } from '../app/app-constants';
  13. import { ModalCmp } from './modal-component';
  14. import { ModalMDSlideIn, ModalMDSlideOut, ModalSlideIn, ModalSlideOut } from './modal-transitions';
  15. import { ViewController } from '../../navigation/view-controller';
  16. /**
  17. * @hidden
  18. */
  19. var ModalImpl = (function (_super) {
  20. __extends(ModalImpl, _super);
  21. function ModalImpl(app, component, data, opts, config) {
  22. if (opts === void 0) { opts = {}; }
  23. var _this = this;
  24. data = data || {};
  25. data.component = component;
  26. opts.showBackdrop = isPresent(opts.showBackdrop) ? !!opts.showBackdrop : true;
  27. opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true;
  28. data.opts = opts;
  29. _this = _super.call(this, ModalCmp, data, null) || this;
  30. _this._app = app;
  31. _this._enterAnimation = opts.enterAnimation;
  32. _this._leaveAnimation = opts.leaveAnimation;
  33. _this.isOverlay = true;
  34. config.setTransition('modal-slide-in', ModalSlideIn);
  35. config.setTransition('modal-slide-out', ModalSlideOut);
  36. config.setTransition('modal-md-slide-in', ModalMDSlideIn);
  37. config.setTransition('modal-md-slide-out', ModalMDSlideOut);
  38. return _this;
  39. }
  40. /**
  41. * @hidden
  42. */
  43. ModalImpl.prototype.getTransitionName = function (direction) {
  44. var key;
  45. if (direction === 'back') {
  46. if (this._leaveAnimation) {
  47. return this._leaveAnimation;
  48. }
  49. key = 'modalLeave';
  50. }
  51. else {
  52. if (this._enterAnimation) {
  53. return this._enterAnimation;
  54. }
  55. key = 'modalEnter';
  56. }
  57. return this._nav && this._nav.config.get(key);
  58. };
  59. /**
  60. * Present the action sheet instance.
  61. *
  62. * @param {NavOptions} [navOptions={}] Nav options to go with this transition.
  63. * @returns {Promise} Returns a promise which is resolved when the transition has completed.
  64. */
  65. ModalImpl.prototype.present = function (navOptions) {
  66. if (navOptions === void 0) { navOptions = {}; }
  67. navOptions.minClickBlockDuration = navOptions.minClickBlockDuration || 400;
  68. return this._app.present(this, navOptions, PORTAL_MODAL);
  69. };
  70. return ModalImpl;
  71. }(ViewController));
  72. export { ModalImpl };
  73. //# sourceMappingURL=modal-impl.js.map