import { ActiveDescendantKeyManager } from '@angular/cdk/a11y'; import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, QueryList, TemplateRef } from '@angular/core'; import { TsOptgroupComponent, TsOptionComponent } from '@terminus/ui/option'; /** * Event object that is emitted when an autocomplete option is selected */ export declare class TsAutocompletePanelSelectedEvent { source: TsAutocompletePanelComponent; option: TsOptionComponent; constructor(source: TsAutocompletePanelComponent, option: TsOptionComponent); } /** * The panel used to display autocomplete options when {@link TsOptionComponent} is in autocomplete mode. * * @deprecated Please use `TsSelectionListPanel` * * @example * */ export declare class TsAutocompletePanelComponent implements AfterContentInit { private changeDetectorRef; elementRef: ElementRef; /** * Manages active item in option list based on key events * * NOTE: {@link TsAutocompleteTriggerDirective} needs access. */ keyManager: ActiveDescendantKeyManager; /** * Whether the autocomplete panel should be visible */ showPanel: boolean; /** * Define the default component ID */ readonly uid: string; /** * Access the template. Used by {@link TsAutocompleteTriggerDirective} */ template: TemplateRef; /** * Access the element for the panel containing the autocomplete options */ panel: ElementRef; /** * Whether the autocomplete panel is open */ isOpen: boolean; /** * Function that maps an option's control value to its display value in the trigger */ displayWith: ((value: any) => string) | null; /** * Define an ID for the component * * @param value */ set id(value: string); get id(): string; protected _id: string; /** * Access the list of option groups * * NOTE: Since we are nested so deep, the query selectors can't seem to find these components. So now we are letting the parent pass them * in explicitly. */ optionGroups: QueryList; /** * Access the list of options * * NOTE: Since we are nested so deep, the query selectors can't seem to find these components. So now we are letting the parent pass them * in explicitly. */ options: QueryList; /** * Event that is emitted whenever an option from the list is selected */ readonly optionSelected: EventEmitter; /** * Event that is emitted when the autocomplete panel is opened */ readonly opened: EventEmitter; /** * Event that is emitted when the autocomplete panel is closed */ readonly closed: EventEmitter; constructor(changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef); /** * Set up */ ngAfterContentInit(): void; /** * Emit the `select` event * * @param option */ emitSelectEvent(option: TsOptionComponent): void; /** * Return the panel's scrollTop * * @returns The scrolltop number */ getScrollTop(): number; /** * Set the panel scrollTop. * * This allows us to manually scroll to display options above or below the fold, as they are not actually being focused when active. * * @param scrollTop - The number of pixels to move */ setScrollTop(scrollTop: number): void; /** * Set the visibility of the panel based on whether options exist */ setVisibility(): void; }