import { DataSource } from '@angular/cdk/table'; import { BehaviorSubject, Subscription } from 'rxjs'; /** * Data source that accepts a client-side data array and includes native support of filtering, * sorting (using {@link TsSortDirective}), and paginator (using {@link TsPaginatorComponent}). */ export declare class TsTableDataSource implements DataSource { /** * Stream that emits when a new data array is set on the data source. */ private _data; /** * Stream emitting render data to the table (depends on ordered data changes). */ private _renderData; /** * Subscription to the changes that should trigger an update to the table's rendered rows, such * as filtering, sorting, pagination, or base data changes. */ _renderChangesSubscription: Subscription; /** * The filtered set of data that has been matched by the filter string, or all the data if there * is no filter. Useful for knowing the set of data the table represents. * For example, a 'selectAll()' function would likely want to select the set of filtered data * shown to the user rather than all the data. */ filteredData: T[]; /** * Array of data that should be rendered by the table, where each object represents one row. * * @param data */ set data(data: T[]); get data(): T[]; /** * Set up data and change subscriptions * * @param initialData */ constructor(initialData?: T[]); /** * Subscribe to changes that should trigger an update to the table's rendered rows. When the * changes occur, process the current state of the filter, sort, and pagination along with the * provided base data and send it to the table for rendering. */ _updateChangeSubscription(): void; /** * Used by the {@link TsTableComponent}. Called when it connects to the data source. */ connect(): BehaviorSubject; /** * Used by the {@link TsTableComponent}. Called when it is destroyed. No-op. */ disconnect(): void; }