All files / element-ng/filter-bar si-filter-bar.component.html

100% Statements 25/25
100% Branches 2/2
100% Functions 3/3
100% Lines 19/19

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 4412x 38x 25x 25x 110x 110x     2x       4x   12x     38x 38x                     12x   38x 3x       6x 1x   6x 3x   12x  
<div class="responsive py-2" siAutoCollapsableList>
  @for (filter of filters(); track $index) {
    <div class="pill-wrapper" siAutoCollapsableListItem>
      <si-filter-pill
        [class.dark-background]="colorVariant() === 'base-0'"
        [totalPills]="$count"
        [filter]="filter"
        [disabled]="disabled()"
        (deleteFilters)="deleteFilters($event)"
      />
    </div>
  } @empty {
    <span class="list-text">{{ filterDefaultText() | translate }}</span>
  }
  <si-filter-pill
    #overflowItem="siAutoCollapsableListOverflowItem"
    siAutoCollapsableListOverflowItem
    [class.dark-background]="colorVariant() === 'base-0'"
    [disabled]="disabled()"
    [filter]="{
      description:
        collapsedFiltersDescription()
        | translate
          : {
              count: overflowItem.hiddenItemCount()
            },
      title: '',
      filterName: ''
    }"
    (deleteFilters)="deleteOverflowFilter()"
  />
  @if (allowReset() && this.filters().length) {
    <button
      siAutoCollapsableListAdditionalContent
      type="button"
      class="text-nowrap btn btn-tertiary"
      [disabled]="disabled()"
      (click)="onResetFilters()"
    >
      {{ resetText() | translate }}
    </button>
  }
</div>