a zip code crypto-currency system good for red ONLY

action-sheet.js 3.1KB

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