a zip code crypto-currency system good for red ONLY

action-sheet.js 4.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. (function (factory) {
  12. if (typeof module === "object" && typeof module.exports === "object") {
  13. var v = factory(require, exports);
  14. if (v !== undefined) module.exports = v;
  15. }
  16. else if (typeof define === "function" && define.amd) {
  17. define(["require", "exports", "./action-sheet-component", "./action-sheet-transitions", "../../util/util", "../../navigation/view-controller"], factory);
  18. }
  19. })(function (require, exports) {
  20. "use strict";
  21. Object.defineProperty(exports, "__esModule", { value: true });
  22. var action_sheet_component_1 = require("./action-sheet-component");
  23. var action_sheet_transitions_1 = require("./action-sheet-transitions");
  24. var util_1 = require("../../util/util");
  25. var view_controller_1 = require("../../navigation/view-controller");
  26. /**
  27. * @hidden
  28. */
  29. var ActionSheet = (function (_super) {
  30. __extends(ActionSheet, _super);
  31. function ActionSheet(app, opts, config) {
  32. var _this = this;
  33. opts.buttons = opts.buttons || [];
  34. opts.enableBackdropDismiss = util_1.isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true;
  35. _this = _super.call(this, action_sheet_component_1.ActionSheetCmp, opts, null) || this;
  36. _this._app = app;
  37. _this.isOverlay = true;
  38. config.setTransition('action-sheet-slide-in', action_sheet_transitions_1.ActionSheetSlideIn);
  39. config.setTransition('action-sheet-slide-out', action_sheet_transitions_1.ActionSheetSlideOut);
  40. config.setTransition('action-sheet-md-slide-in', action_sheet_transitions_1.ActionSheetMdSlideIn);
  41. config.setTransition('action-sheet-md-slide-out', action_sheet_transitions_1.ActionSheetMdSlideOut);
  42. config.setTransition('action-sheet-wp-slide-in', action_sheet_transitions_1.ActionSheetWpSlideIn);
  43. config.setTransition('action-sheet-wp-slide-out', action_sheet_transitions_1.ActionSheetWpSlideOut);
  44. return _this;
  45. }
  46. /**
  47. * @hidden
  48. */
  49. ActionSheet.prototype.getTransitionName = function (direction) {
  50. var key = 'actionSheet' + (direction === 'back' ? 'Leave' : 'Enter');
  51. return this._nav && this._nav.config.get(key);
  52. };
  53. /**
  54. * @param {string} title Action sheet title
  55. */
  56. ActionSheet.prototype.setTitle = function (title) {
  57. this.data.title = title;
  58. return this;
  59. };
  60. /**
  61. * @param {string} subTitle Action sheet subtitle
  62. */
  63. ActionSheet.prototype.setSubTitle = function (subTitle) {
  64. this.data.subTitle = subTitle;
  65. return this;
  66. };
  67. /**
  68. * @param {object} button Action sheet button
  69. */
  70. ActionSheet.prototype.addButton = function (button) {
  71. this.data.buttons.push(button);
  72. return this;
  73. };
  74. /**
  75. * Present the action sheet instance.
  76. *
  77. * @param {NavOptions} [navOptions={}] Nav options to go with this transition.
  78. * @returns {Promise} Returns a promise which is resolved when the transition has completed.
  79. */
  80. ActionSheet.prototype.present = function (navOptions) {
  81. if (navOptions === void 0) { navOptions = {}; }
  82. navOptions.minClickBlockDuration = navOptions.minClickBlockDuration || 400;
  83. return this._app.present(this, navOptions);
  84. };
  85. return ActionSheet;
  86. }(view_controller_1.ViewController));
  87. exports.ActionSheet = ActionSheet;
  88. });
  89. //# sourceMappingURL=action-sheet.js.map