import { BooleanInput } from '@angular/cdk/coercion'; import { ListboxChild, ListboxComponent, OptionComponent } from '../../../listbox/public_api'; import { ControlValueAccessor } from '@angular/forms'; import { AfterContentInit, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core'; import { FocusOrigin, ListKeyManager, ListKeyManagerOption } from '@angular/cdk/a11y'; import { PopoverTriggerDirective } from '../../../popover/src/popover-trigger.directive'; import { SelectValueHolder } from './select-value-holder'; import { SelectionTextDirective } from '../select/selection-text.directive'; import * as i0 from "@angular/core"; export declare abstract class SelectComponentBase implements ControlValueAccessor, AfterContentInit, OnDestroy { protected valueHolder: SelectValueHolder; /** * Whether the component is disabled. */ disabled: BooleanInput; /** A unique id for the select. If none is supplied, it will be auto-generated. */ id: string; /** The name of the input, used when submitting an HTML form. */ name?: string; /** The autocomplete behavior */ autocomplete?: string; /** * Placeholder to be shown if no value has been selected. */ placeholder?: string; /** * Emitted when the popover is opened */ readonly opened: EventEmitter; /** * Emitted when the popover is closed */ readonly closed: EventEmitter; options: QueryList; listboxChildren: QueryList; /** * Manages keyboard events for options in the panel. */ protected keyManager: ListKeyManager<{ value: string; } & ListKeyManagerOption> | undefined; /** * Emits whenever the dropdown is closed as a result of an option (already * selected or not) being selected. */ selected: EventEmitter; ariaLabel: string | null; ariaLabelledby?: string | null; selectionText?: SelectionTextDirective; /** * Used to provide custom empty state content. * When not provided, the default "No results" (in given language) message is shown. * Passing `null` will hide the popover with the empty state message. */ emptyState?: ListboxComponent['emptyState']; /** * Used to work around ExpressionChangedAfterItHasBeenCheckedError error thrown from HiddenSelect, * when the select component is rendered from a template (e.g. with *ngIf). It's set to true * asynchronously after content is initialized, to delay rendering of things that depend on * options. It's not clear why the issue happens, and it only happens when select is used with * *ngIf, or generally in a template. */ _initialized: boolean; set listboxValue(value: readonly string[]); get listboxValue(): readonly string[]; get selectedOptions(): OptionComponent[]; private changeDetectorRef; constructor(valueHolder: SelectValueHolder); protected abstract triggerRef: PopoverTriggerDirective | undefined; protected abstract triggerElementRef: ElementRef | undefined; protected abstract listbox: ListboxComponent | undefined; abstract focus(focusOrigin: FocusOrigin): void; abstract isFocused(): boolean; handleKeyDown($event: KeyboardEvent): void; getSelectionText(): string; /** * Whether multiple selection is allowed. */ get multiple(): boolean; ngAfterContentInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** * Called when an item in the listbox is selected. */ _handleSelected(): void; isOpen(): boolean; open(): void; close(): void; toggle(): void; protected getFieldLabel?(): string; getLabelText(): string | undefined; protected controlValueAccessorChangeFn: (value: any) => void; onTouched: () => any; _onOpen(): void; _onClose(): void; /** * Implemented as part of ControlValueAccessor. */ registerOnChange(fn: any): void; /** * Implemented as part of ControlValueAccessor. */ registerOnTouched(fn: any): void; /** * Implemented as part of ControlValueAccessor. */ setDisabledState(isDisabled: boolean): void; /** * Implemented as part of ControlValueAccessor. */ writeValue(value: unknown): void; protected getNextEnabledOptionValue(direction?: 'left' | 'right'): string | undefined; protected initKeyManager(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }