UNPKG

@netgrif/components-core

Version:

Netgrif Application engine frontend core Angular library

46 lines (45 loc) 1.73 kB
import { Predicate } from './predicate'; import { Category } from '../category/category'; import { Query } from '../query/query'; /** * A predicate wrapper, that can contain a generator of a Predicate. * * This class is used to transfer search predicates added by other means into the search GUI. */ export declare class PredicateWithGenerator extends Predicate { protected _predicate: Predicate; protected _generator?: Category<any>; /** * @param _predicate the wrapped predicate * @param _generator the `Category` instance that generates this predicate. * If a generator is provided, the predicate is marked as initially hidden. * @param initiallyVisible overrides the initial visibility inferred from the presence/absence of the generator */ constructor(_predicate: Predicate, _generator?: Category<any>, initiallyVisible?: boolean); get query(): Query; /** * Can only be called if the wrapped predicate allows setting of the query. * Throws an error otherwise. * @param query the new query */ set query(query: Query); /** * @returns the Category that generates the predicate, or `undefined` if none was provided during the creation of this instance. */ get generator(): Category<any>; /** * @returns the wrapped Predicate */ getWrappedPredicate(): Predicate; /** * @returns result [getWrappedPredicate()]{@link PredicateWithGenerator#getWrappedPredicate} */ get wrappedPredicate(): Predicate; show(): void; /** * Cleans-up the inner state of this object. */ destroy(): void; private initializeMetadataGenerator; private initializeFilterTextSegmentsGenerator; }