UNPKG

@blackbaud/skyux

Version:
43 lines 2.49 kB
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; var SkyFilterSummaryItemComponent = (function () { function SkyFilterSummaryItemComponent() { this.dismissible = true; this.dismiss = new EventEmitter(); this.itemClick = new EventEmitter(); } SkyFilterSummaryItemComponent.prototype.onItemDismiss = function (event) { event.stopPropagation(); this.dismiss.emit(undefined); }; SkyFilterSummaryItemComponent.prototype.onItemDismissKeypress = function (event) { if (event.which === 13) { this.onItemDismiss(event); } }; SkyFilterSummaryItemComponent.prototype.onItemClick = function () { this.itemClick.emit(undefined); }; SkyFilterSummaryItemComponent.prototype.onItemKeypress = function (event) { if (event.which === 13) { this.itemClick.emit(undefined); } }; return SkyFilterSummaryItemComponent; }()); export { SkyFilterSummaryItemComponent }; SkyFilterSummaryItemComponent.decorators = [ { type: Component, args: [{ selector: 'sky-filter-summary-item', styles: [".sky-filter-summary-item{display:inline-block;background-color:#81d4f7;border:1px solid #00b4f1;border-radius:4px;padding:3px;color:#282b31;margin-right:5px}.sky-filter-summary-item .sky-filter-summary-item-close{color:#282b31;padding-left:5px;opacity:.8}.sky-filter-summary-item .sky-filter-summary-item-close:hover{text-decoration:none;opacity:1}\n"], template: "<div\n role=\"button\"\n tabindex=\"0\"\n class=\"sky-filter-summary-item\"\n (click)=\"onItemClick()\"\n (keypress)=\"onItemKeypress($event)\">\n <ng-content></ng-content>\n <span\n [attr.aria-label]=\"'filter_summary_close' | skyResources\"\n *ngIf=\"dismissible !== false\"\n role=\"button\"\n tabindex=\"0\"\n class=\"fa fa-times sky-filter-summary-item-close\"\n (click)=\"onItemDismiss($event)\"\n (keypress)=\"onItemDismissKeypress($event)\">\n </span>\n</div>\n", changeDetection: ChangeDetectionStrategy.OnPush },] }, ]; /** @nocollapse */ SkyFilterSummaryItemComponent.ctorParameters = function () { return []; }; SkyFilterSummaryItemComponent.propDecorators = { 'dismissible': [{ type: Input },], 'dismiss': [{ type: Output },], 'itemClick': [{ type: Output },], }; //# sourceMappingURL=filter-summary-item.component.js.map