import { BehaviorSubject, Observable, ObservableInput, OperatorFunction } from "rxjs"; import { SourceBuilder } from "../Factories/SourceBuilder"; import { SearchResponse } from "../Models/search-response"; export declare class CommonTableFunctions { static appendRefresh(appender: any, appendee: ObservableInput): any | any[]; /** * Turns a function into a method that can be used in the observable pipe * @source * @param project - Delegate to be used when the next in subscription is called * @returns - Returns OperatorFunction to use in observable pipe */ static asOperatorFunction(project: (value: T) => R): OperatorFunction; static defaultTrigger(isUpdateRow: (signalSource: TSource, tableRowUpdate: TtableData) => boolean, sourceName?: string | null, isUpdatable?: (inputProperty: any) => boolean): (source: TSource, tableData: BehaviorSubject) => void; static appendTrigger(targetSource: any[], isUpdateRow: (signalSource: TSource, tableRowUpdate: TtableData) => boolean, sourceName?: string | null, isUpdatable?: (inputProperty: any) => boolean): any[]; } /** * Appends a `$refresh` property to each row in the dataset * @source * @param appendee - Observable that triggers the refresh everytime the next is called for the `appendee` * @returns - ObservableFunction that can be used in the Observable Pipe */ export declare function setRefresh(appendee: ObservableInput): OperatorFunction; /** * Appends a `$trigger` property to each row in the dataset * @source * @param isUpdateRow - Determines which row should be update based on the refresh data object (signalSource) * @param sourceName - Parses the data object (signalSource) to get the value from possibly multiple signalSources in 1 object * @param isUpdatable - Delegate that grabs the row attempting to be updated and allows you to select specific properties to update * @returns - ObservableFunction that can be used in the Observable Pipe */ export declare function setTrigger(isUpdateRow: (signalSource: TSource, tableRowUpdate: TtableData) => boolean, sourceName?: string | null, isUpdatable?: (inputProperty: any) => boolean): OperatorFunction; /** * Appends a `$trigger` property to each row in the dataset for Observable Pipe. Auto-ID selection * @source * @param propCompare - Delegate that gets the property of Signal and table objects based on the sourceName and uses them in the comparison for setTrigger. Logic. propCompare(signal[sourceName]) == propCompare(tableRow) * @param sourceName - Parses the data object (signalSource) to get the value from possibly multiple signalSources in 1 object * @param isUpdatable - Delegate that grabs the row attempting to be updated and allows you to select specific properties to update * @returns - ObservableFunction that can be used in the Observable Pipe */ export declare function setTriggerSimple(propCompare: (obj?: any) => any, sourceName: string, isUpdatable?: (inputProperty: any) => boolean): OperatorFunction; /** * Appends a nestedSource property to each row in the dataset for Observable Pipes * @source * @param nestedSources - A name/Observable object array. Where the name is the property name and the observable is the value for the property * @returns - ObservableFunction that can be used in the Observable Pipe */ export declare function setNestedSources(nestedSources: { Name: string; SourceDefinition: (row: T) => Observable; }[]): OperatorFunction; /** * Configures all $refresh/$trigger and nestedSources all in one source builder * @source * @param buildOptions - A name/Observable object array. Where the name is the property name and the observable is the value for the property * @returns - ObservableFunction that can be used in the Observable Pipe */ export declare function configSources>(buildOptions: (builder: SourceBuilder) => void): OperatorFunction | T[], R | undefined>;