import { FocusMonitor } from '@angular/cdk/a11y'; import { BooleanInput } from '@angular/cdk/coercion'; import { ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit, TemplateRef } from '@angular/core'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import { CanColor, CanColorCtor, MatOptionSelectionChange } from '@angular/material/core'; import { MatSelect } from '@angular/material/select'; import { MtnaChip } from '@mtna/lib-ui/chips'; import { MtnaPopoverConfig } from '@mtna/lib-ui/popover'; import { SearchFieldValue } from '@mtna/search-manager-ui'; import { ReplaySubject } from 'rxjs'; import * as i0 from "@angular/core"; declare class FilterSelectBase { _elementRef: ElementRef; constructor(_elementRef: ElementRef); } export declare const _FilterSelectMixinBase: CanColorCtor & typeof FilterSelectBase; /** * Select control to select filters, uses a virtual scroll, search, and supports reactive forms. * @author Will Davis */ export declare class FilterSelectComponent extends _FilterSelectMixinBase implements CanColor, ControlValueAccessor, DoCheck, OnDestroy, OnInit { _control: NgControl; private _changeDetectorRef; private _focusMonitor; static ngAcceptInputType_disabled: BooleanInput; /** Popover configuration to describe the control */ config: MtnaPopoverConfig | null | undefined; /** Whether the control is disabled */ get disabled(): boolean; set disabled(value: boolean); private _disabled; /** Maximum number of selections */ maxSelection: number | null; /** Whether the user can make multiple selections. Default true */ multiSelect: boolean; /** All the filters to choose from in the select */ set options(options: Array); get options(): Array; private _options; /** Whether the filters can be reorderd in the chip list */ orderable: boolean; /** Whether the control is required */ required: boolean; /** Label for mat-select, defaults to "Filter(s)" */ selectLabel: string; /** Placeholder for mat-select, defaults to "Choose filters..." */ selectPlaceholder: string; /** Suffix icon for the select, defaults to null */ suffixIcon: string | null; /** The selected filters and value for this control, if it exists */ set value(value: Array); get value(): Array; private _value; /** Changed value of the form control */ readonly selectionChange: EventEmitter; customOptionRef: TemplateRef | undefined; /** Internal */ matSelect: MatSelect; /** Whether any search results were found */ _noSearchResults: boolean; /** A subset of all the facets, filtered by the search text */ _filteredFacets$: ReplaySubject; private _onDestroy; _onTouched: () => void; private _controlValueAccessorChangeFn; constructor(_control: NgControl, elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _focusMonitor: FocusMonitor); /** * When the mtna-select-search emits search text, filter the visible facets in the select. * * @param text search text to filter the facets */ filterFacets(text: string): void; /** * When the select panel is opened or closed, manipulate the options visible. * When the panel is opened, show the full list of facets. * When the panel is closed, set the selected value on the filtered subject so it will work with the MatSelect's internal selection model. * * @param opened Whether the panel is being opened */ handleOpenedChange(opened: boolean): void; ngDoCheck(): void; ngOnDestroy(): void; ngOnInit(): void; registerOnChange(fn: (value: unknown) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; writeValue(obj: SearchFieldValue[] | null | undefined): void; /** * Comparison function for use with `compareWith` */ _compareFacets(v1: SearchFieldValue, v2: SearchFieldValue): boolean; _emitChangeEvent(newValue: Array): void; /** * Manually handle when options are selected/unselected. * @param event option selection event */ _handleOptionSelectionChange(event: MatOptionSelectionChange): void; /** * Removes a variable from the array of selected facets; * @param id the variable identifier */ _removeFacet(id: string): void; _reorderFacets(event: Array): void; _trackByFacetKey(_: number, facet: SearchFieldValue): string | null; /** * Manually handle when options are selected/unselected in a multi select * @param event option selection event */ private _handleMultiOptionSelectionChange; /** * Manually handle when options are selected/unselected in a single select * @param event option selection event */ private _handleSingleOptionSelectionChange; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};