All files / app/shared/components/article-history-list article-history-list.component.ts

100% Statements 13/13
100% Branches 0/0
100% Functions 1/1
100% Lines 12/12

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 253x 3x 3x   3x                 3x 25x 25x 25x   25x 25x   25x 25x    
import { ArticleHistoryService, trackByFn } from '../../../services/articles/article-history/article-history.service';
import { ArticlesHistoryItemComponent } from '../articles-history-item/articles-history-item.component';
import { ChangeDetectionStrategy, Component, inject, input, output } from '@angular/core';
import { ArticleHistoryItem } from '@drevo-web/shared';
import { SpinnerComponent, VirtualScrollerComponent, VirtualScrollerItemDirective } from '@drevo-web/ui';
 
@Component({
    selector: 'app-article-history-list',
    imports: [ArticlesHistoryItemComponent, SpinnerComponent, VirtualScrollerComponent, VirtualScrollerItemDirective],
    templateUrl: './article-history-list.component.html',
    styleUrl: './article-history-list.component.scss',
    changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ArticleHistoryListComponent {
    readonly selectedVersionIds = input<ReadonlySet<number>>(new Set());
    readonly selectable = input(false);
    readonly canCompare = input(false);
 
    readonly selectItem = output<ArticleHistoryItem>();
    readonly compareItems = output<void>();
 
    protected readonly service = inject(ArticleHistoryService);
    protected readonly trackByFn = trackByFn;
}