a zip code crypto-currency system good for red ONLY

show-when.js 3.4KB

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", "./display-when", "../../platform/platform"], 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 display_when_1 = require("./display-when");
  24. var platform_1 = require("../../platform/platform");
  25. /**
  26. *
  27. * @name ShowWhen
  28. * @description
  29. * The `showWhen` attribute takes a string that represents a platform or screen orientation.
  30. * The element the attribute is added to will only be shown when that platform or screen orientation is active.
  31. *
  32. * Complements the [hideWhen attribute](../HideWhen). If the `showWhen` attribute is used on an
  33. * element that also has the `hideWhen` attribute, the element will not show if `hideWhen` evaluates
  34. * to `true` or `showWhen` evaluates to `false`. If the `hidden` attribute is also added, the element
  35. * will not show if `hidden` evaluates to `true`.
  36. *
  37. * View the [Platform API docs](../../../platform/Platform) for more information on the different
  38. * platforms you can use.
  39. *
  40. * @usage
  41. * ```html
  42. * <div showWhen="android">
  43. * I am visible on Android!
  44. * </div>
  45. *
  46. * <div showWhen="ios">
  47. * I am visible on iOS!
  48. * </div>
  49. *
  50. * <div showWhen="android,ios">
  51. * I am visible on Android and iOS!
  52. * </div>
  53. *
  54. * <div showWhen="portrait">
  55. * I am visible on Portrait!
  56. * </div>
  57. *
  58. * <div showWhen="landscape">
  59. * I am visible on Landscape!
  60. * </div>
  61. * ```
  62. * @demo /docs/demos/src/show-when/
  63. * @see {@link ../HideWhen HideWhen API Docs}
  64. * @see {@link ../../../platform/Platform Platform API Docs}
  65. */
  66. var ShowWhen = (function (_super) {
  67. __extends(ShowWhen, _super);
  68. function ShowWhen(showWhen, plt, zone) {
  69. return _super.call(this, showWhen, plt, zone) || this;
  70. }
  71. // ngOnDestroy is implemented in DisplayWhen
  72. ShowWhen.decorators = [
  73. { type: core_1.Directive, args: [{
  74. selector: '[showWhen]',
  75. host: {
  76. '[class.hidden-show-when]': '!isMatch'
  77. }
  78. },] },
  79. ];
  80. /** @nocollapse */
  81. ShowWhen.ctorParameters = function () { return [
  82. { type: undefined, decorators: [{ type: core_1.Attribute, args: ['showWhen',] },] },
  83. { type: platform_1.Platform, },
  84. { type: core_1.NgZone, },
  85. ]; };
  86. return ShowWhen;
  87. }(display_when_1.DisplayWhen));
  88. exports.ShowWhen = ShowWhen;
  89. });
  90. //# sourceMappingURL=show-when.js.map