import { ChangeDetectionStrategy, Component, Input, TemplateRef } from '@angular/core'; import { Required } from '../../utils'; import { FilterService } from '../../filtering'; import { EntitiesService } from '../services'; import { Listable, TableColumnConfig } from '../models'; export const ListingModes = { list: 'list', workflow: 'workflow' } as const; export type ListingMode = keyof typeof ListingModes; @Component({ selector: 'iqser-table-header', templateUrl: './table-header.component.html', styleUrls: ['./table-header.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) export class TableHeaderComponent { @Input() @Required() tableHeaderLabel!: string; @Input() @Required() tableColumnConfigs!: readonly TableColumnConfig[]; @Input() hasEmptyColumn = false; @Input() selectionEnabled = false; @Input() mode: ListingMode = ListingModes.list; @Input() bulkActions?: TemplateRef; constructor(readonly entitiesService: EntitiesService, readonly filterService: FilterService) {} }