a zip code crypto-currency system good for red ONLY

action-sheet.js 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { ActionSheetCmp } from './action-sheet-component';
  2. import { ActionSheetMdSlideIn, ActionSheetMdSlideOut, ActionSheetSlideIn, ActionSheetSlideOut, ActionSheetWpSlideIn, ActionSheetWpSlideOut } from './action-sheet-transitions';
  3. import { isPresent } from '../../util/util';
  4. import { ViewController } from '../../navigation/view-controller';
  5. /**
  6. * @hidden
  7. */
  8. export class ActionSheet extends ViewController {
  9. constructor(app, opts, config) {
  10. opts.buttons = opts.buttons || [];
  11. opts.enableBackdropDismiss = isPresent(opts.enableBackdropDismiss) ? !!opts.enableBackdropDismiss : true;
  12. super(ActionSheetCmp, opts, null);
  13. this._app = app;
  14. this.isOverlay = true;
  15. config.setTransition('action-sheet-slide-in', ActionSheetSlideIn);
  16. config.setTransition('action-sheet-slide-out', ActionSheetSlideOut);
  17. config.setTransition('action-sheet-md-slide-in', ActionSheetMdSlideIn);
  18. config.setTransition('action-sheet-md-slide-out', ActionSheetMdSlideOut);
  19. config.setTransition('action-sheet-wp-slide-in', ActionSheetWpSlideIn);
  20. config.setTransition('action-sheet-wp-slide-out', ActionSheetWpSlideOut);
  21. }
  22. /**
  23. * @hidden
  24. */
  25. getTransitionName(direction) {
  26. const key = 'actionSheet' + (direction === 'back' ? 'Leave' : 'Enter');
  27. return this._nav && this._nav.config.get(key);
  28. }
  29. /**
  30. * @param {string} title Action sheet title
  31. */
  32. setTitle(title) {
  33. this.data.title = title;
  34. return this;
  35. }
  36. /**
  37. * @param {string} subTitle Action sheet subtitle
  38. */
  39. setSubTitle(subTitle) {
  40. this.data.subTitle = subTitle;
  41. return this;
  42. }
  43. /**
  44. * @param {object} button Action sheet button
  45. */
  46. addButton(button) {
  47. this.data.buttons.push(button);
  48. return this;
  49. }
  50. /**
  51. * Present the action sheet instance.
  52. *
  53. * @param {NavOptions} [navOptions={}] Nav options to go with this transition.
  54. * @returns {Promise} Returns a promise which is resolved when the transition has completed.
  55. */
  56. present(navOptions = {}) {
  57. navOptions.minClickBlockDuration = navOptions.minClickBlockDuration || 400;
  58. return this._app.present(this, navOptions);
  59. }
  60. }
  61. //# sourceMappingURL=action-sheet.js.map