import { LitElement } from 'lit'; import { PaginatedSearchOptions } from './mixins'; /** * The data that will be passed to the search function by the * {@link LisQTLSearchElement | `LisQTLSearchElement`} class when a search is * performed. */ export type QTLSearchData = { page: number; query: string; }; /** * A single result of a QTL search performed by the * {@link LisQTLSearchElement | `LisQTLSearchElement`} class. */ export type QTLSearchResult = { trait_name: string; identifier: string; linkageGroup_geneticMap_identifier: string; linkageGroup_identifier: string; start: number; end: number; markerNames: string; }; /** * The signature of the function the * {@link LisQTLSearchElement | `LisQTLSearchElement`} class requires for * performing a QTL search. * * @param query The search term in the input element when the search form was * submitted. * new search is performed. * @param options Optional parameters that aren't required to perform a QTL * search but may be useful. * * @returns A {@link !Promise | `Promise`} that resolves to an * {@link !Array | `Array`} of {@link QTLSearchResult | `QTLSearchResult`} * objects. */ export type QTLSearchFunction = (searchData: QTLSearchData, options: PaginatedSearchOptions) => Promise>; declare const LisQTLSearchElement_base: import("./mixins").Constructor, any[]> & typeof LitElement; /** * @htmlElement `` * * A Web Component that provides an interface for performing keyword searches * for QTLs and displaying results in a paginated table. Note that the * component saves its state to the URL query string parameters and a search * will be automatically performed if the parameters are present when the * componnent is loaded. The component uses the * {@link mixins!LisPaginatedSearchMixin | `LisPaginatedSearchMixin`} mixin. See * the mixin docs for further details. * * @queryStringParameters * - **query:** The text in the query field of the search form. * - **page:** What page of results is loaded. * * @example * {@link !HTMLElement | `HTMLElement`} properties can only be set via * JavaScript. This means the {@link searchFunction | `searchFunction`} property * must be set on a `` tag's instance of the * {@link LisQTLSearchElement | `LisQTLSearchElement`} class. For example: * ```html * * * * * * ``` * * @example * The {@link LisQTLSearchElement | `LisQTLSearchElement`} class inherits the * {@link resultAttributes | `resultAttributes`} and * {@link tableHeader | `tableHeader`} properties from * {@link mixins!LisPaginatedSearchMixin | `LisPaginatedSearchMixin`} mixin. These are * used to define what attributes of the results provided by the * {@link searchFunction | `searchFunction`} will be shown in the results table and * what their corresponding headers will be in the table. These properties can be * overridden via JavaScript. For example: * ```html * * * * * * ``` * * @example * The {@link traitExample | `traitExample`} property can be used to set the * example text in the search form. For example: * * ```html * * * * * * * */ export declare class LisQTLSearchElement extends LisQTLSearchElement_base { /** @ignore */ static styles: import("lit").CSSResult; /** * An optional property to set the example text for the QTL trait name search field. * * @attribute */ traitExample?: string; constructor(); /** @ignore */ renderForm(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'lis-qtl-search-element': LisQTLSearchElement; } } export {}; //# sourceMappingURL=lis-qtl-search-element.d.ts.map