import { AsyncPipe, NgClass } from '@angular/common'; import { ChangeDetectionStrategy, Component, Input, Optional } from '@angular/core'; import { MatIcon } from '@angular/material/icon'; import { MatTooltip } from '@angular/material/tooltip'; import { TranslateModule } from '@ngx-translate/core'; import { SortingOrders, SortingService } from '../../sorting'; import { KeysOf } from '../../utils'; import { Id, IListable } from '../models'; @Component({ selector: 'iqser-table-column-name [label]', templateUrl: './table-column-name.component.html', styleUrls: ['./table-column-name.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatIcon, MatTooltip, TranslateModule, AsyncPipe, NgClass], }) export class TableColumnNameComponent, PrimaryKey extends Id = T['id']> { readonly sortingOrders = SortingOrders; @Input() label!: string; @Input() sortByKey?: KeysOf; @Input() class?: string; @Input() leftIcon?: string; @Input() rightIcon?: string; @Input() rightIconTooltip?: string; constructor(@Optional() readonly sortingService: SortingService) {} }