import { ElementRef, Injector, OnInit, TemplateRef } from '@angular/core'; import { FormControl } from '@angular/forms'; import { DropdownComponent } from '../../../dropdown/dropdown.component'; import { ValidationAlerts } from '../../../form/validation-alert/validation-alert'; import { SimplePropertySchemaFieldLoaderComponent } from '../../../schema/schema-field-host.component'; import { SmeInternalOptionsFormFieldComponent } from '../options-form-field/options-form-field.component'; import * as i0 from "@angular/core"; export declare type ValueOrArray = T | T[]; export declare class ComboboxFormFieldLoaderComponent extends SimplePropertySchemaFieldLoaderComponent { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Accessible Implementation of a form field combo box */ export declare class ComboboxFormFieldComponent extends SmeInternalOptionsFormFieldComponent> implements OnInit { /** * The source name to use for logging */ protected get logSourceName(): string; singleSelectTemplate: TemplateRef; multiSelectTemplate: TemplateRef; listboxElement: ElementRef; dropDown: DropdownComponent; multiple: boolean; overflowWrap: boolean; /** * Determine if reset search string on collapse dropdown */ maintainSearch: boolean; /** * Determine if the dropdown will use the sme-form-field to limit its max-width */ dropdownApplyFormFieldOffsetWidth: boolean; private dropdownService; get isFiltered(): boolean; get itemTemplate(): TemplateRef; private keyBoardEvent; /** * Initializes a new instance of the ComboboxFormFieldComponent */ constructor(injector: Injector); /** * Implementation of angular OnInit interface */ ngOnInit(): void; /** * Handles keypress events on the dropdown toggle */ onToggleKeyPress(event: KeyboardEvent): void; /** * Handles toggled state changes */ onDropdownToggled(expanded: boolean): void; /** * Handles event emitted when focus leaves input field */ onBlur(): void; /** * Handles event emitted on key press in search form input field * @param event */ onKeyDownEvent(event: KeyboardEvent): void; private getFirstOption; /** * Handles keydown events on the dropdown toggle */ onToggleKeydown(event: KeyboardEvent): void; /** * Handles keydown events on option changes */ onListboxKeydown(event: KeyboardEvent): void; onSearchFormKeydown(event: KeyboardEvent): void; /** * Creates the idBag used by this component to store unique element ids. * id values will be assigned be the @see BaseComponent super class. */ protected createIdBag(): MsftSme.StringMap; /** * Performs validation that is internal to this control * @param c The form control attached to this instance */ protected validate(c: FormControl): ValidationAlerts; /** * On searchString model change */ onSearchStringChange(): void; private updatePosition; /** * It handles calculating and updating the styles for each of the options inside * of the dropdown container, because the dropdown container's width is dynamic, * have to calculate option as well. */ private applySingleOptionWidth; /** * This handles getting the current width being applied by the dropdown service */ private getSingleDropdownOptionWidth; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "sme-form-field[type=\"combobox\"],sme-form-field[type=\"select\"]", never, { "multiple": "multiple"; "overflowWrap": "overflowWrap"; "maintainSearch": "maintainSearch"; "dropdownApplyFormFieldOffsetWidth": "dropdownApplyFormFieldOffsetWidth"; }, {}, never, never, false, never>; }