import * as i0 from '@angular/core'; import { InjectionToken, OnInit, OnDestroy, QueryList, TemplateRef, EnvironmentProviders } from '@angular/core'; import { Observable } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { FormGroup, FormControl, ControlValueAccessor } from '@angular/forms'; type TableColumnSortStrategy = 'asc' | 'desc' | 'none'; declare const TABLE_CONFIG: InjectionToken; interface TableConfig { icons?: { actionsSearch?: string; actionsClose?: string; pagerArrowPrevious?: string; pagerArrowNext?: string; }; } interface DataSourcePageRequest { pageNumber: number; pageSize: number; query: string | null; queryFields: string[]; sort: { name: string; direction: 'asc' | 'desc'; }[]; } interface DataSourcePageResponse { totalPages: number; totalEntries: number; pageSize: number; pageNumber: number; data: T[]; } declare class DataSourceRequest { private _request$; private _loading$; get loading(): Observable; get when(): Observable; startLoading(): void; stopLoading(): void; update(params?: Partial): void; } declare abstract class DataSource { abstract handle(request: DataSourceRequest): Observable>; } declare class GenericDataSource extends DataSource { private readonly _httpClient; private readonly _endpoint$; private _items$; private _fn; private _rawFn; constructor(httpClient: HttpClient, endpoint: Observable | string); append(item: Observable<{ [key: string]: string; } | null>): this; data(fn: (data: T[]) => T[]): this; raw(fn: (data: unknown) => void): this; handle(request: DataSourceRequest): Observable<{ data: T[]; pageSize: number; pageNumber: number; totalPages: number; totalEntries: number; }>; private formatResponse; private formatParams; } declare class BbTableColumnDef { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class BbTableRowDef { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class BbTable implements OnInit, OnDestroy { private readonly _config?; readonly actionsSearchIconName: string; readonly actionsCloseIconName: string; tableColumnTemplates: QueryList>; tableRowTemplate?: TemplateRef; identifier: string | null; dataSource: DataSource; queryFields: string[]; sortingStrategy: 'single' | 'multiple'; header: TemplateRef | boolean; footer: TemplateRef | boolean; private _sizes; get sizes(): number[]; set sizes(newValue: number[]); request: DataSourceRequest; data$: Observable<{ state: string; statusCode?: number; result?: DataSourcePageResponse; }>; isLoading$: Observable; form: FormGroup; queryControl: FormControl; private _headerCount; private _subscription; ngOnInit(): void; ngOnDestroy(): void; get headerCount(): number; get sortControl(): FormGroup; get pageNumberControl(): FormControl; get pageSizeControl(): FormControl; refresh(): void; setHeaderCount(amount: -1 | 1): void; private updateSizes; private composeForm; private watchDataChanges; private subscribeToChanges; private getQueryChanges; private getFormChanges; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class BbTableCell { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class BbTableHeaderCell implements OnInit, OnDestroy { private _table?; private _name?; private readonly _sortDirections; private readonly _control; disabled: boolean; valueChanges$: Observable; set sort(value: TableColumnSortStrategy); get sort(): TableColumnSortStrategy; constructor(_table?: BbTable, _name?: string); ngOnInit(): void; ngOnDestroy(): void; get isDisabled(): boolean; onClick(): void; private updateTableAndHeaderCell; private handleSingleSortingStrategy; private logWarning; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_disabled: unknown; } declare class BbTablePager implements OnInit, ControlValueAccessor { private readonly _config?; readonly arrowPreviousIconName: string; readonly arrowNextIconName: string; amountOfButtons: number; showArrowButtons: boolean; disabled: boolean; isPreviousDisabled$: Observable; isNextDisabled$: Observable; list$: Observable<{ page: number; active: boolean; }[]>; onChange: (newValue: number) => void; onTouched: () => void; private _totalPages$; private _pageNumber$; ngOnInit(): void; get pageNumber(): number; set pageNumber(newValue: number); get totalPages(): number; set totalPages(newValue: number); registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; writeValue(newValue: number): void; goToPrevious(): void; goToNext(): void; goToIndex(index: number): void; private update; private calculatePages; private filterActivePages; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; static ngAcceptInputType_disabled: unknown; } declare class TableModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare function provideTableConfig(config: TableConfig): EnvironmentProviders; export { BbTable, BbTableCell, BbTableColumnDef, BbTableHeaderCell, BbTablePager, BbTableRowDef, DataSource, DataSourceRequest, GenericDataSource, TABLE_CONFIG, TableModule, provideTableConfig }; export type { DataSourcePageRequest, DataSourcePageResponse, TableColumnSortStrategy, TableConfig };