All files / lib/element-list element-list.component.ts

100% Statements 46/46
100% Branches 9/9
100% Functions 4/4
100% Lines 46/46

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 43 44 45 46 471x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 50x 50x 1x 1x 1x 1x 1x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 8x 1x 1x  
/*******************************************************************************
 * Copyright bei
 * Entwicklungs- und Pflegeverbund für das gemeinsame Fachverfahren gefa
 *
 *******************************************************************************/
import {
  Component,
  ContentChildren,
  Directive,
  Input,
  QueryList,
  TemplateRef,
} from '@angular/core';
 
@Directive({
  selector: '[data-gc-element-list-item]',
})
export class ElementListItemDirective {
  public itemTemplate: TemplateRef<unknown>;
 
  constructor(private templateRef: TemplateRef<unknown>) {
    this.itemTemplate = this.templateRef;
  }
}
 
/**
 * An Element List component that enables several elements to be combined into a group.
 */
@Component({
  selector: 'gc-element-list',
  templateUrl: './element-list.component.html',
  styleUrls: ['./element-list.component.css'],
})
export class ElementListComponent {
  /**
   * Label that shows above the group.
   */
  @Input()
  public label = '';
 
  /**
   * @ignore
   */
  @ContentChildren(ElementListItemDirective)
  public _items?: QueryList<ElementListItemDirective>;
}