@kronscht/former
Version:
Former is an Angular library that provides a declarative way to generate complex forms based on primeng components
31 lines (30 loc) • 1.62 kB
TypeScript
import { AfterViewInit, ElementRef, OnInit } from '@angular/core';
import { AutoCompleteCompleteEvent } from 'primeng/autocomplete';
import { BaseElementComponent } from '../base-element.component';
import { BehaviorSubject } from 'rxjs';
import { AutoCompleteElement, FilterProvider, StaticSuggestions } from '../../model/elements/autocomplete.model';
import * as i0 from "@angular/core";
export declare class AutocompleteElementComponent extends BaseElementComponent<AutoCompleteElement> implements OnInit, AfterViewInit {
elementRef?: ElementRef;
private readonly http;
internalSuggestions: any[];
filteredSuggestions$: BehaviorSubject<any[]>;
defaultFilter: (query: string, data: any[]) => any[];
defaultComplexFilter: (query: string, field: string, data: any[]) => any[];
/**
* Static suggestion can be a list of strings or a list of complex objects.
* @param suggestions
* @param query
* @param field
*/
handleStaticSuggestions(suggestions: StaticSuggestions, query: string, field?: string, filter?: FilterProvider): any[];
filter(event: AutoCompleteCompleteEvent): void;
getAvailableFields(data: any[]): string[] | "";
checkSuggestionsIncludesField(field: string): boolean;
ngOnInit(): void;
ngAfterViewInit(): void;
isArrayOfStrings(value: unknown): value is string[];
validateParameters(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteElementComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteElementComponent, "lib-autocomplete-element", never, {}, {}, never, never, false, never>;
}