card.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. "use strict";
  2. var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  3. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  4. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  5. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  6. return c > 3 && r && Object.defineProperty(target, key, r), r;
  7. };
  8. var __metadata = (this && this.__metadata) || function (k, v) {
  9. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
  10. };
  11. Object.defineProperty(exports, "__esModule", { value: true });
  12. var core_1 = require("@angular/core");
  13. var common_1 = require("@angular/common");
  14. var shared_1 = require("../common/shared");
  15. var Card = /** @class */ (function () {
  16. function Card(el) {
  17. this.el = el;
  18. }
  19. Card.prototype.getBlockableElement = function () {
  20. return this.el.nativeElement.children[0];
  21. };
  22. __decorate([
  23. core_1.Input(),
  24. __metadata("design:type", String)
  25. ], Card.prototype, "header", void 0);
  26. __decorate([
  27. core_1.Input(),
  28. __metadata("design:type", String)
  29. ], Card.prototype, "subheader", void 0);
  30. __decorate([
  31. core_1.Input(),
  32. __metadata("design:type", Object)
  33. ], Card.prototype, "style", void 0);
  34. __decorate([
  35. core_1.Input(),
  36. __metadata("design:type", String)
  37. ], Card.prototype, "styleClass", void 0);
  38. __decorate([
  39. core_1.ContentChild(shared_1.Header, { static: false }),
  40. __metadata("design:type", Object)
  41. ], Card.prototype, "headerFacet", void 0);
  42. __decorate([
  43. core_1.ContentChild(shared_1.Footer, { static: false }),
  44. __metadata("design:type", Object)
  45. ], Card.prototype, "footerFacet", void 0);
  46. Card = __decorate([
  47. core_1.Component({
  48. selector: 'p-card',
  49. template: "\n <div [ngClass]=\"'ui-card ui-widget ui-widget-content ui-corner-all'\" [ngStyle]=\"style\" [class]=\"styleClass\">\n <div class=\"ui-card-header\" *ngIf=\"headerFacet\">\n <ng-content select=\"p-header\"></ng-content>\n </div>\n <div class=\"ui-card-body\">\n <div class=\"ui-card-title\" *ngIf=\"header\">{{header}}</div>\n <div class=\"ui-card-subtitle\" *ngIf=\"subheader\">{{subheader}}</div>\n <div class=\"ui-card-content\">\n <ng-content></ng-content>\n </div>\n <div class=\"ui-card-footer\" *ngIf=\"footerFacet\">\n <ng-content select=\"p-footer\"></ng-content>\n </div>\n </div>\n </div>\n "
  50. }),
  51. __metadata("design:paramtypes", [core_1.ElementRef])
  52. ], Card);
  53. return Card;
  54. }());
  55. exports.Card = Card;
  56. var CardModule = /** @class */ (function () {
  57. function CardModule() {
  58. }
  59. CardModule = __decorate([
  60. core_1.NgModule({
  61. imports: [common_1.CommonModule],
  62. exports: [Card, shared_1.SharedModule],
  63. declarations: [Card]
  64. })
  65. ], CardModule);
  66. return CardModule;
  67. }());
  68. exports.CardModule = CardModule;
  69. //# sourceMappingURL=card.js.map