UNPKG

1.05 kBTypeScriptView Raw
1import { Subject } from "rxjs";
2import { CompleterItem } from "../components/completer-item";
3import { CompleterData } from "./completer-data";
4export declare abstract class CompleterBaseData extends Subject<CompleterItem[] | null> implements CompleterData {
5 protected _searchFields: string | null;
6 protected _titleField: string | null;
7 protected _descriptionField: string | undefined;
8 protected _imageField: string | undefined;
9 constructor();
10 abstract search(term: string): void;
11 cancel(): void;
12 searchFields(searchFields: string | null): this;
13 titleField(titleField: string | null): this;
14 descriptionField(descriptionField: string): this;
15 imageField(imageField: string): this;
16 convertToItem(data: any): CompleterItem | null;
17 protected extractMatches(data: any[], term: string): any[];
18 protected extractTitle(item: any): any;
19 protected extractValue(obj: any, key: string | null): any;
20 protected processResults(matches: string[]): CompleterItem[];
21 private extractBySearchFields;
22}