a zip code crypto-currency system good for red ONLY

tab-button.js 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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", "@angular/core", "../../config/config", "../ion"], factory);
  18. }
  19. })(function (require, exports) {
  20. "use strict";
  21. Object.defineProperty(exports, "__esModule", { value: true });
  22. var core_1 = require("@angular/core");
  23. var config_1 = require("../../config/config");
  24. var ion_1 = require("../ion");
  25. /**
  26. * @hidden
  27. */
  28. var TabButton = (function (_super) {
  29. __extends(TabButton, _super);
  30. function TabButton(config, elementRef, renderer) {
  31. var _this = _super.call(this, config, elementRef, renderer) || this;
  32. _this.ionSelect = new core_1.EventEmitter();
  33. _this.disHover = (config.get('hoverCSS') === false);
  34. _this.layout = config.get('tabsLayout');
  35. return _this;
  36. }
  37. TabButton.prototype.ngOnInit = function () {
  38. this.tab.btn = this;
  39. this.layout = this.tab.parent.tabsLayout || this.layout;
  40. this.hasTitle = !!this.tab.tabTitle;
  41. this.hasIcon = !!this.tab.tabIcon && this.layout !== 'icon-hide';
  42. this.hasTitleOnly = (this.hasTitle && !this.hasIcon);
  43. this.hasIconOnly = (this.hasIcon && !this.hasTitle);
  44. this.hasBadge = !!this.tab.tabBadge;
  45. };
  46. TabButton.prototype.onClick = function () {
  47. this.ionSelect.emit(this.tab);
  48. return false;
  49. };
  50. TabButton.prototype.updateHref = function (href) {
  51. this.setElementAttribute('href', href);
  52. };
  53. TabButton.decorators = [
  54. { type: core_1.Component, args: [{
  55. selector: '.tab-button',
  56. template: '<ion-icon *ngIf="tab.tabIcon" [name]="tab.tabIcon" [isActive]="tab.isSelected" class="tab-button-icon"></ion-icon>' +
  57. '<span *ngIf="tab.tabTitle" class="tab-button-text">{{tab.tabTitle}}</span>' +
  58. '<ion-badge *ngIf="tab.tabBadge" class="tab-badge" [color]="tab.tabBadgeStyle">{{tab.tabBadge}}</ion-badge>' +
  59. '<div class="button-effect"></div>',
  60. host: {
  61. '[attr.id]': 'tab._btnId',
  62. '[attr.aria-controls]': 'tab._tabId',
  63. '[attr.aria-selected]': 'tab.isSelected',
  64. '[class.has-title]': 'hasTitle',
  65. '[class.has-icon]': 'hasIcon',
  66. '[class.has-title-only]': 'hasTitleOnly',
  67. '[class.icon-only]': 'hasIconOnly',
  68. '[class.has-badge]': 'hasBadge',
  69. '[class.disable-hover]': 'disHover',
  70. '[class.tab-disabled]': '!tab.enabled',
  71. '[class.tab-hidden]': '!tab.show',
  72. }
  73. },] },
  74. ];
  75. /** @nocollapse */
  76. TabButton.ctorParameters = function () { return [
  77. { type: config_1.Config, },
  78. { type: core_1.ElementRef, },
  79. { type: core_1.Renderer, },
  80. ]; };
  81. TabButton.propDecorators = {
  82. 'tab': [{ type: core_1.Input },],
  83. 'ionSelect': [{ type: core_1.Output },],
  84. 'onClick': [{ type: core_1.HostListener, args: ['click',] },],
  85. };
  86. return TabButton;
  87. }(ion_1.Ion));
  88. exports.TabButton = TabButton;
  89. });
  90. //# sourceMappingURL=tab-button.js.map