UNPKG

ng2-stable-nxtc

Version:

Angular Smart Table neXtCode Version

64 lines 3.03 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 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; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { Component, Input, Output, EventEmitter } from '@angular/core'; import { Grid } from '../../../lib/grid'; import { DataSource } from '../../../lib/data-source/data-source'; let TheadTitlesRowComponent = class TheadTitlesRowComponent { constructor() { this.sort = new EventEmitter(); this.selectAllRows = new EventEmitter(); } ngOnChanges() { this.isMultiSelectVisible = this.grid.isMultiSelectVisible(); this.showActionColumnLeft = this.grid.showActionColumn('left'); this.showActionColumnRight = this.grid.showActionColumn('right'); } }; __decorate([ Input(), __metadata("design:type", Grid) ], TheadTitlesRowComponent.prototype, "grid", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], TheadTitlesRowComponent.prototype, "isAllSelected", void 0); __decorate([ Input(), __metadata("design:type", DataSource) ], TheadTitlesRowComponent.prototype, "source", void 0); __decorate([ Output(), __metadata("design:type", Object) ], TheadTitlesRowComponent.prototype, "sort", void 0); __decorate([ Output(), __metadata("design:type", Object) ], TheadTitlesRowComponent.prototype, "selectAllRows", void 0); TheadTitlesRowComponent = __decorate([ Component({ selector: '[ng2-st-thead-titles-row]', template: ` <th ng2-st-checkbox-select-all *ngIf="isMultiSelectVisible" [grid]="grid" [source]="source" [isAllSelected]="isAllSelected" (click)="selectAllRows.emit($event)"> </th> <th ng2-st-actions-title *ngIf="showActionColumnLeft" [grid]="grid"></th> <th *ngFor="let column of grid.getColumns()" class="ng2-smart-th {{ column.id }}" [ngClass]="column.class" [style.width]="column.width" > <ng2-st-column-title [source]="source" [column]="column" (sort)="sort.emit($event)"></ng2-st-column-title> </th> <th ng2-st-actions-title *ngIf="showActionColumnRight" [grid]="grid"></th> `, }) ], TheadTitlesRowComponent); export { TheadTitlesRowComponent }; //# sourceMappingURL=thead-titles-row.component.js.map