import { InitModelOf, LookupCall, LookupResult, LookupRow, StaticLookupCallModel } from '../index'; /** * Base class for lookup calls with static or local data. Implement the _data() and _dataToLookupRow() * functions to provide data for lookup calls. Results are resolved as a Promise, the delay * property controls how long it takes until the promise is resolved. You can set it to a higher value for testing purposes. */ export declare class StaticLookupCall extends LookupCall implements StaticLookupCallModel { model: StaticLookupCallModel; delay: number; data: any[]; protected _deferred: JQuery.Deferred>; constructor(); protected _init(model: InitModelOf): void; refreshData(data?: any[]): void; abort(): void; protected _getAll(): JQuery.Promise>; protected _queryByAll(): void; /** * Limits the data to 'maxRowCount' results, converts the data to LookupRows and filters * the rows by their 'active' state. If a subclass overrides this method it can omit the * super call, if it must avoid the maxRowCount limit and does its own filtering. In that * case the subclass may choose to call #_mapAndFilterData and * #_limitMaxRows when suitable. */ protected _lookupRowsByAll(): LookupRow[]; protected _limitMaxRows(array: any[]): any[]; protected _mapAndFilterData(datas: any[]): LookupRow[]; protected _filterActiveLookupRow(dataRow: LookupRow): boolean; protected _getByText(text: string): JQuery.Promise>; protected _queryByText(text: string): void; protected _lookupRowsByText(text: string): LookupRow[]; _createSearchPattern(text: string): RegExp; protected _getByKey(key: TKey): JQuery.Promise>; protected _queryByKey(key: TKey): void; protected _getByKeys(keys: TKey[]): JQuery.Promise>; protected _queryByKeys(keys: TKey[]): void; protected _lookupRowByKey(key: TKey): LookupRow; protected _getByRec(rec: TKey): JQuery.Promise>; protected _queryByRec(rec: TKey): void; protected _lookupRowsByRec(rec: TKey): LookupRow[]; setDelay(delay: number): void; /** * Implement this function to convert a single data array into an instance of LookupRow. */ protected _dataToLookupRow(data: any[], index?: number): LookupRow; /** * Implement this function to provide static data. * * The result is expected to be a list of tuples. Each tuple will be converted to a lookup row via * {@link _dataToLookupRow}. The first three elements of each tuple have a predefined meaning and * are used by the lookup call (e.g. to filter rows by text). More elements can be added freely. * * - [0] = key * - [1] = text * - [2] = parentKey */ protected _data(): any[]; } //# sourceMappingURL=StaticLookupCall.d.ts.map