import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; import { Observable } from 'rxjs'; import { FormBuilder, FormGroup } from '@angular/forms'; import { Section, TableColumn, TableColumnFilterTypes } from '../../interfaces/table-column'; import { Filter } from '../../interfaces/filter'; import { Moment } from 'moment'; export declare class FilterTableComponent implements OnInit, OnChanges, OnDestroy { protected formBuilder: FormBuilder; private data$; private filteredData$; /** * if true it means to create only the filter and pagination sections so it's content should be of type * if false then the content will be added inside the tbody and should be of type * @example * with default false * * * * * * * will be rendered like * ... *
foo
* ... * * * * * *
foo
* ... * * to render the same example with noFilter true * * * ... * * * * * *
foo
*
*/ noTable: boolean; /** * the columns of the data */ columns: TableColumn[]; /** * the data to be paginated and filtered * note: this will not be used if sections is provided */ data: { [key in keyof T]: string | number; }[]; /** * if the table has multiple level of headers * note: columns will be overwritten by columns inside this section */ sections: Section[]; /** * this event trigger when the user filter, change the current page or page limit * it emit the new filter criteria */ filter: EventEmitter>; /** * this attribute next values with same condition of filter event * it send the filtered data */ filteredData: Observable; random: number; hidden: boolean; pages: number; page: number; filterForm: FormGroup; type: TableColumnFilterTypes; limit: number; paginationOptions: number[]; private dataSubscription; items: number; displayedItems: number; sortBy: keyof T & string; sortOrder: 'asc' | 'desc'; constructor(formBuilder: FormBuilder); ngOnInit(): void; isT(array: unknown): array is T[]; ngOnChanges(changes: SimpleChanges): void; triggerResetFilter(): void; triggerFilter(page?: number): void; fieldChanged(): void; ngOnDestroy(): void; sort(name: keyof T & string): void; }