All files / lib/grid/row grid-row.component.ts

100% Statements 46/46
100% Branches 8/8
100% Functions 2/2
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 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 154x 154x 154x 154x 147x 147x 147x 147x 147x 154x 147x 147x 147x 147x 1x  
/*******************************************************************************
 * Copyright bei
 * Entwicklungs- und Pflegeverbund für das gemeinsame Fachverfahren gefa
 *
 *******************************************************************************/
import {
  ChangeDetectionStrategy,
  Component,
  computed,
  inject,
} from '@angular/core';
 
import { GridComponent } from '../grid.component';
 
/**
 * A Row element is a wrapper for cells.
 */
@Component({
  selector: 'gc-grid-row',
  templateUrl: './grid-row.component.html',
  styleUrls: ['./grid-row.component.css'],
  host: {
    '[class]': 'cssClass()',
    '[style.--gc-grid-horizontal-column-inset.px]': 'horizontalInset()',
  },
  changeDetection: ChangeDetectionStrategy.Eager,
  standalone: false,
})
export class GridRowComponent {
  /** @ignore */
  protected readonly cssClass = computed(() => {
    return [
      `gc-reference-${this.grid.reference()}`,
      `gc-layout-${this.grid.layout()}`,
      ...(this.horizontalInset() !== undefined ? ['gc-horizontal-inset'] : []),
    ];
  });
 
  /** @ignore */
  protected readonly horizontalInset = computed(() =>
    this.grid.horizontalInset(),
  );
 
  /** @ignore */
  private readonly grid = inject(GridComponent);
}