import { DataSource, ListRange } from '@angular/cdk/collections';
import { EventEmitter } from '@angular/core';
import { MatPaginator } from '@angular/material/paginator';
import { BehaviorSubject, Observable, Subject } from 'rxjs';
import { OTableDataSource } from '../../../interfaces/o-table-datasource.interface';
import { OTableOptions } from '../../../interfaces/o-table-options.interface';
import { OColumnValueFilter } from '../../../types/table/o-column-value-filter.type';
import type { OColumn } from '../column/o-column.class';
import { OTableComponent } from '../o-table.component';
import { OTableDao } from './o-table.dao';
import { OTableGroupedRow } from './row/o-table-row-group.class';
import { OMatSort } from './sort/o-mat-sort';
import { AggregateFunction } from '../../../types/aggregate-function.type';
export declare class OnRangeChangeVirtualScroll {
    range: ListRange;
    constructor(data: ListRange);
}
export type GroupByChangeReason = 'column-update' | 'toggle' | 'level-expansion';
export declare class DefaultOTableDataSource extends DataSource<any> implements OTableDataSource {
    protected table: OTableComponent;
    dataTotalsChange: BehaviorSubject<any[]>;
    get data(): any[];
    protected _database: OTableDao;
    protected _paginator: MatPaginator;
    protected _tableOptions: OTableOptions;
    protected _sort: OMatSort;
    protected _virtualPageChange: BehaviorSubject<OnRangeChangeVirtualScroll>;
    protected _quickFilterChange: BehaviorSubject<string>;
    protected _columnValueFilterChange: BehaviorSubject<any>;
    protected groupByColumnChange: Subject<GroupByChangeReason>;
    protected filteredData: any[];
    protected aggregateData: any;
    onRenderedDataChange: EventEmitter<any>;
    protected _renderedData: any[];
    resultsLength: number;
    get quickFilter(): string;
    set quickFilter(filter: string);
    private columnValueFilters;
    private groupedRowState;
    private activeAggregates;
    private groupedRowsSubscription;
    private levelsExpansionState;
    private readonly ngZone;
    constructor(table: OTableComponent);
    sortFunction(a: any, b: any): number;
    get renderedData(): any[];
    set renderedData(arg: any[]);
    initializeRenderedData(): void;
    connect(): Observable<any[]>;
    private processDataOutsideAngular;
    private updateTableState;
    private executeDataProcessing;
    getGroupedData(data: any[]): any[];
    getSubGroupsOfGroupedRow(data: any[]): any[];
    getAggregatesData(data: any[]): any;
    getColumnCalculatedData(data: any[]): any[];
    protected transformFormula(formulaArg: any, row: any): string;
    getQuickFilterData(data: any[]): any[];
    getPaginationData(data: any[]): any[];
    getVirtualScrollData(data: any[], x: OnRangeChangeVirtualScroll): any[];
    disconnect(): void;
    protected fulfillsCustomFilterFunctions(filter: string, item: any): boolean;
    protected fulfillsQuickfilter(filter: string, item: any): boolean;
    protected getSortedData(data: any[]): any[];
    getTableData(): any[];
    getCurrentData(): any[];
    getCurrentAllData(): any[];
    getCurrentRendererData(): any[];
    getAllRendererData(): any[];
    get sqlTypes(): any;
    protected getData(): any[];
    getRenderedData(data: any[]): any[];
    getDataToSort(data: any[]): any[];
    protected getAllData(usingRendererers?: boolean, onlyVisibleColumns?: boolean): {}[];
    private getRenderersData;
    getColumnData(ocolumn: string): {}[];
    initializeColumnsFilters(filters: OColumnValueFilter[]): void;
    isColumnValueFilterActive(): boolean;
    getColumnValueFilters(): OColumnValueFilter[];
    getColumnValueFilterByAttr(attr: string): OColumnValueFilter;
    clearColumnFilters(trigger?: boolean, columnsAttr?: string[]): void;
    clearColumnFilter(attr: string, trigger?: boolean): void;
    addColumnFilter(filter: OColumnValueFilter): void;
    getColumnValueFilterData(data: any[]): any[];
    getAggregateData(column: OColumn): string | {}[];
    protected calculateAggregate(data: any[], columnAttr: string, operator: string | AggregateFunction): number | Promise<number>;
    protected sum(column: any, data: any): number;
    protected count(column: any, data: any): number;
    protected avg(column: any, data: any): number;
    protected min(column: any, data: any): number;
    protected max(column: any, data: any): number;
    private isFirstLevelTableGroupRow;
    private getDataFromFirstLevelTableGroupRow;
    protected existsAnyCalculatedColumn(): boolean;
    updateRenderedRowData(rowData: any): void;
    private getDataInformationByGroup;
    private recalculateColumnAggregate;
    private getSublevel;
    filterCollapsedRowGroup(data: any): any[];
    belongsToExpandedGroupedRow(data: any, row: any): boolean;
    updateGroupedColumns(reason?: GroupByChangeReason): void;
    toggleGroupByColumn(rowGroup: OTableGroupedRow): void;
    setRowGroupLevelExpansion(rowGroup: OTableGroupedRow, value: boolean): void;
    private updateStateRowGrouped;
    private getTextGroupRow;
    private getExpansionState;
}
