All files / src/app/shared/components/search/suggest-categories suggest-categories.component.ts

88.88% Statements 8/9
100% Branches 0/0
50% Functions 1/2
88.88% Lines 8/9

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 255x 5x 5x 5x   5x                 5x     2x 2x            
import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { ReplaySubject } from 'rxjs';
 
import { SuggestCategoriesTileComponent } from 'ish-shared/components/search/suggest-categories-tile/suggest-categories-tile.component';
 
@Component({
  selector: 'ish-suggest-categories',
  templateUrl: './suggest-categories.component.html',
  standalone: true,
  imports: [CommonModule, TranslateModule, SuggestCategoriesTileComponent],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SuggestCategoriesComponent {
  @Input({ required: true }) categories: string[];
  @Input() maxAutoSuggests: number;
  @Input() inputTerms$ = new ReplaySubject<string>(1);
  @Output() routeChange = new EventEmitter<void>();
 
  handleInputFocus(): void {
    this.routeChange.emit();
  }
}