All files / lib/table table-headercell-simple.component.ts

100% Statements 42/42
100% Branches 6/6
100% Functions 5/5
100% Lines 42/42

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 431x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1155x 1155x 1155x 1155x 1155x 1155x 1155x 1155x 1155x 1155x 1155x 1155x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 7x 7x 1x  
/*******************************************************************************
 * Copyright bei
 * Entwicklungs- und Pflegeverbund für das gemeinsame Fachverfahren gefa
 *
 *******************************************************************************/
import { Component, EventEmitter, Input, Output } from '@angular/core';
 
import { TableHeaderCellContext } from './table.common';
 
/**
 * A simple table header cell.
 */
@Component({
  selector: 'gc-table-headercell-simple',
  templateUrl: './table-headercell-simple.component.html',
  styleUrls: [
    './../utils/styles/reset-button.css',
    './table-headercell-simple.component.css',
  ],
})
export class TableHeaderCellSimpleComponent {
  /** Notified when this header is activated. Only sortable headers can be activated. */
  @Output()
  public readonly onActivate = new EventEmitter();
 
  /** The text to be shown */
  @Input()
  public text?: string;
 
  /** The current sort direction. undefined means this header is not sortable. */
  @Input()
  public sort?: 'none' | 'asc' | 'desc';
 
  /** Needs to be bound to the th context `[th]="th"` */
  @Input()
  public th?: TableHeaderCellContext<unknown>;
 
  /** @ignore */
  emitActivate(): void {
    this.onActivate.emit();
  }
}