UNPKG

design-angular-kit

Version:

Un toolkit Angular conforme alle linee guida di design per i servizi web della PA

76 lines (75 loc) 3.8 kB
import { EventEmitter } from '@angular/core'; import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component'; import * as i0 from "@angular/core"; type functionSource = (query: string, populateResults: (results: string[]) => void) => void; export declare class ItAutocompleteComponent extends ItAbstractFormComponent<string | null | undefined> { /** * Autocomplete elements. * @default [] */ source: string[] | functionSource; /** * Autocomplete if required. * @default false */ required: boolean; /** * Input field name */ name: string | undefined; /** * The input description */ description: string | undefined; /** * Prevents suggestions from appearing if fewer than N characters are typed * @default 0 */ minLength: number; /** * Default value */ defaultValue: string | null; /** * Function to set assistive hint label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization */ assistiveHintLabel: () => string; /** * Function to set label in case of no result. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization */ noResultsLabel: () => string; /** * Function to set label that alerts you that query's too short. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization */ statusQueryTooShortLabel: (minQueryLength: number) => string; /** * Function to set no results label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization */ statusNoResultsLabel: () => string; /** * Function to set selected option label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization */ statusSelectedOptionLabel: (selectedOption: string, length: number, index: number) => string; /** * Function to set status results label. For more information https://github.com/alphagov/accessible-autocomplete?tab=readme-ov-file#internationalization */ statusResultsLabel: (length: number, contentSelectedOption: string) => string; /** * Fired when value changes */ selected: EventEmitter<any>; private selectAutocompleteEl?; private selectAutocomplete?; private value; private _interval; private _inputEl; ngOnInit(): void; clear(): void; _findInput(): void; private _setAndCheck; private _initInputEl; ngAfterViewInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration<ItAutocompleteComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ItAutocompleteComponent, "it-autocomplete", never, { "source": { "alias": "source"; "required": false; }; "required": { "alias": "required"; "required": false; }; "name": { "alias": "name"; "required": false; }; "description": { "alias": "description"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "assistiveHintLabel": { "alias": "assistiveHintLabel"; "required": false; }; "noResultsLabel": { "alias": "noResultsLabel"; "required": false; }; "statusQueryTooShortLabel": { "alias": "statusQueryTooShortLabel"; "required": false; }; "statusNoResultsLabel": { "alias": "statusNoResultsLabel"; "required": false; }; "statusSelectedOptionLabel": { "alias": "statusSelectedOptionLabel"; "required": false; }; "statusResultsLabel": { "alias": "statusResultsLabel"; "required": false; }; }, { "selected": "selected"; }, never, ["[error]"], true, never>; } export {};