@netgrif/components-core
Version:
Netgrif Application engine frontend core Angular library
46 lines (45 loc) • 2.68 kB
TypeScript
import { ConfigurationInput } from '../models/configuration-input';
import { ElementRef } from '@angular/core';
import { Category } from '../models/category/category';
import { OperatorTemplatePart } from '../models/operator-template-part';
import { SearchAutocompleteOption } from '../models/category/search-autocomplete-option';
import { Observable } from 'rxjs';
import { MatSelect } from '@angular/material/select';
import * as i0 from "@angular/core";
export declare abstract class AbstractSearchConfigurationInputComponent {
/**
* Whether the contents displayed in this component can be edited by the user or not.
*
* Defaults to `true`
*/
editable: boolean;
configuration: ConfigurationInput;
selectedCategory: Category<any>;
set configurationInput(input: MatSelect | ElementRef<HTMLInputElement>);
trackByTemplateParts: (a: number, b: OperatorTemplatePart) => any;
/**
* Lambda that is used to preserve `this` reference in HTML binding.
*
* See [_renderSelection()]{@link AbstractSearchPredicateComponent#_renderSelection} for information about the transform function.
* @param option the {@link SearchAutocompleteOption} object that was selected in the autocomplete list.
*/
renderSelection: (option: SearchAutocompleteOption<unknown>) => string;
clearConfigurationInput(): void;
clearOperatorInput(): void;
filterOptions: (userInput: Observable<string>) => Observable<Array<SearchAutocompleteOption<unknown>>>;
/**
* Function for tracking Template parts in ngFor.
* @param index index of the ngFor element
* @param item template part
*/
protected _trackByTemplateParts(index: number, item: OperatorTemplatePart): any;
/**
* Transforms a {@link SearchAutocompleteOption} object into it's name.
* Used for displaying user selection in the input field, when an autocomplete option is selected.
* @param option the object we want to transform. It might not exist if user input doesn't match any autocomplete option
* @returns option name if it exists, empty string otherwise
*/
protected _renderSelection(option: SearchAutocompleteOption<unknown>): string;
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractSearchConfigurationInputComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AbstractSearchConfigurationInputComponent, "ncc-abstract-search-configuration-input", never, { "editable": { "alias": "editable"; "required": false; }; "configuration": { "alias": "configuration"; "required": false; }; "selectedCategory": { "alias": "selectedCategory"; "required": false; }; }, {}, never, never, false, never>;
}