a zip code crypto-currency system good for red ONLY

list.js 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 { Directive, ElementRef, Input, Renderer } from '@angular/core';
  12. import { Config } from '../../config/config';
  13. import { DomController } from '../../platform/dom-controller';
  14. import { GestureController } from '../../gestures/gesture-controller';
  15. import { Ion } from '../ion';
  16. import { isTrueProperty } from '../../util/util';
  17. import { ItemSlidingGesture } from '../item/item-sliding-gesture';
  18. import { Platform } from '../../platform/platform';
  19. /**
  20. * The List is a widely used interface element in almost any mobile app,
  21. * and can include content ranging from basic text all the way to
  22. * buttons, toggles, icons, and thumbnails.
  23. *
  24. * Both the list, which contains items, and the list items themselves
  25. * can be any HTML element.
  26. *
  27. * Using the List and Item components make it easy to support various
  28. * interaction modes such as swipe to edit, drag to reorder, and
  29. * removing items.
  30. *
  31. * @demo /docs/demos/src/list/
  32. * @see {@link /docs/components#lists List Component Docs}
  33. * @advanced
  34. *
  35. * Enable the sliding items.
  36. *
  37. * ```ts
  38. * import { Component, ViewChild } from '@angular/core';
  39. * import { List } from 'ionic-angular';
  40. *
  41. * @Component({...})
  42. * export class MyClass {
  43. * @ViewChild(List) list: List;
  44. *
  45. * constructor() { }
  46. *
  47. * stopSliding() {
  48. * this.list.enableSlidingItems(false);
  49. * }
  50. * }
  51. * ```
  52. *
  53. */
  54. var List = (function (_super) {
  55. __extends(List, _super);
  56. function List(config, elementRef, renderer, _plt, _gestureCtrl, _domCtrl) {
  57. var _this = _super.call(this, config, elementRef, renderer, 'list') || this;
  58. _this._plt = _plt;
  59. _this._gestureCtrl = _gestureCtrl;
  60. _this._domCtrl = _domCtrl;
  61. _this._enableSliding = true;
  62. _this._containsSlidingItems = false;
  63. return _this;
  64. }
  65. Object.defineProperty(List.prototype, "sliding", {
  66. /**
  67. * @input {boolean} If true, the sliding items will be enabled.
  68. */
  69. get: function () {
  70. return this._enableSliding;
  71. },
  72. set: function (val) {
  73. this._enableSliding = isTrueProperty(val);
  74. this._updateSlidingState();
  75. },
  76. enumerable: true,
  77. configurable: true
  78. });
  79. /**
  80. * @hidden
  81. */
  82. List.prototype.containsSlidingItem = function (contains) {
  83. this._containsSlidingItems = contains;
  84. this._updateSlidingState();
  85. };
  86. List.prototype._updateSlidingState = function () {
  87. var shouldSlide = this._enableSliding && this._containsSlidingItems;
  88. if (!shouldSlide) {
  89. this._slidingGesture && this._slidingGesture.destroy();
  90. this._slidingGesture = null;
  91. }
  92. else if (!this._slidingGesture) {
  93. (void 0) /* console.debug */;
  94. this._slidingGesture = new ItemSlidingGesture(this._plt, this, this._gestureCtrl, this._domCtrl);
  95. this._slidingGesture.listen();
  96. }
  97. };
  98. /**
  99. * Close any sliding items that are open.
  100. */
  101. List.prototype.closeSlidingItems = function () {
  102. this._slidingGesture && this._slidingGesture.closeOpened();
  103. };
  104. /**
  105. * @hidden
  106. */
  107. List.prototype.destroy = function () {
  108. this._slidingGesture && this._slidingGesture.destroy();
  109. };
  110. List.decorators = [
  111. { type: Directive, args: [{
  112. selector: 'ion-list',
  113. },] },
  114. ];
  115. /** @nocollapse */
  116. List.ctorParameters = function () { return [
  117. { type: Config, },
  118. { type: ElementRef, },
  119. { type: Renderer, },
  120. { type: Platform, },
  121. { type: GestureController, },
  122. { type: DomController, },
  123. ]; };
  124. List.propDecorators = {
  125. 'sliding': [{ type: Input },],
  126. };
  127. return List;
  128. }(Ion));
  129. export { List };
  130. //# sourceMappingURL=list.js.map