@totvs-agro/mobile-components
Version:
Componentes Mobile Totvs (Front-End) para utilização dos estilos do T-Faces e Ionic v3
29 lines • 2.29 kB
JavaScript
import { Component, Input } from '@angular/core';
var HTML_TEMPLATE = "\n<ion-item [ngClass]=\"{ 'disabled' : card.disabled}\" no-lines no-padding (click)=\"onClickCard(card)\">\n\t<ion-checkbox class=\"card-checkbox\" *ngIf=\"card.checkbox\" item-start [(ngModel)]=\"card.checked\"></ion-checkbox>\n\n\t<ion-thumbnail class=\"card-thumbnail\" *ngIf=\"card.img\" item-start>\n\t\t<img width=\"72px\" height=\"72px\" src=\"{{card.img}}\">\n\t</ion-thumbnail>\n\n\t<thf-icon *ngIf=\"card.icon\" item-start class=\"card-icon\" [style.color]=\"card.iconColor\" name=\"{{card.icon}}\"></thf-icon>\n\n\t<ion-label class=\"card-label\">\n\t\t<h2 *ngIf=\"card.title\" [ngClass]=\"{'card-title': card.icon}\" class=\"card-title\">\n\t\t\t{{card.title}}\n\t\t\t<span *ngIf=\"card.complement\" class=\"card-complement\"> - {{card.complement}}</span>\n\t\t</h2>\n\t\t<span *ngIf=\"card.subTitle\" class=\"card-subtitle\">{{card.subTitle}}</span>\n\t</ion-label>\n\n\t<button *ngIf=\"!card.buttons\" ion-button clear item-end>\n\t\t<ion-icon name=\"ios-arrow-forward\"></ion-icon>\n\t</button>\n\t<button class=\"button-icon-container\" *ngFor=\"let button of card.buttons\" ion-button clear item-end>\n\t\t<thf-icon class=\"button-icon\" name=\"{{button.icon}}\" (click)=\"clickButton(button)\"></thf-icon>\n\t</button>\n\n</ion-item>\n<hr>\n";
var CardItemComponent = /** @class */ (function () {
function CardItemComponent() {
}
CardItemComponent.prototype.ngAfterViewInit = function () {
};
CardItemComponent.prototype.onClickCard = function (card) {
this.clickCard(card);
};
CardItemComponent.prototype.clickButton = function (button) {
button.action(this.card.data);
};
CardItemComponent.decorators = [
{ type: Component, args: [{
selector: 'card-item',
template: HTML_TEMPLATE
},] },
];
/** @nocollapse */
CardItemComponent.ctorParameters = function () { return []; };
CardItemComponent.propDecorators = {
"card": [{ type: Input, args: ['card',] },],
"clickCard": [{ type: Input, args: ['clickCard',] },],
};
return CardItemComponent;
}());
export { CardItemComponent };
//# sourceMappingURL=card-item.js.map