import * as _odx_angular_components_select from '@odx/angular/components/select'; import * as i0 from '@angular/core'; import { OnInit, ElementRef, PipeTransform, AfterViewInit, QueryList, TemplateRef, InjectionToken } from '@angular/core'; import { OptionControl } from '@odx/angular/cdk/option-control'; import { Highlightable } from '@angular/cdk/a11y'; import { InputControlDirective } from '@odx/angular/cdk/custom-form-control'; import { DynamicContent } from '@odx/angular/cdk/dynamic-view'; import { BaseSearchFilterPipe, AutocompleteControl } from '@odx/angular/cdk/autocomplete-control'; import * as i5 from '@odx/angular'; import { IdentityMatcher } from '@odx/angular'; /** * SelectOptionComponent is a customizable option element for use within a SelectComponent. * It supports complex data structures, integration with checkbox components for multi-select, * and can be disabled as needed. * It extends OptionControl to provide additional behavior specific to select components. * * @template T - The type of the value selected in the option. * @see {OptionControl} */ declare class SelectOptionComponent extends OptionControl implements OnInit { private _isDisabled; protected readonly selectControl: _odx_angular_components_select.SelectComponent; /** * Indicates whether the option is currently selected. * * @type {boolean} */ isSelected: boolean; /** * Indicates whether a not found message should be displayed, used typically for search results. * * @type {boolean} * @default false */ notFoundMessage: boolean; /** * Setter for the disabled state of the select option. * * @param value - The new value for the disabled state. */ set disabled(value: boolean); /** * Getter for the disabled state of the select option. * * @returns {boolean} The current disabled state of the option. */ get disabled(): boolean; constructor(); ngOnInit(): void; /** * Sets active styles for the option when it becomes the target of keyboard navigation or mouse hover. */ setActiveStyles(): void; /** * Toggles the selection state of the option when it is part of a multi-select control. */ switchCheckbox(): void; protected selectOption(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "odx-select-option, odx-option", never, { "notFoundMessage": { "alias": "notFoundMessage"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>; static ngAcceptInputType_notFoundMessage: unknown; static ngAcceptInputType_disabled: unknown; } declare class SelectAllDirective implements Highlightable { protected isActive: boolean; protected readonly element: ElementRef; disabled: boolean; setActiveStyles(): void; setInactiveStyles(): void; getLabel?(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * SelectInputControlDirective extends InputControlDirective to provide additional behavior * specific to select components with search functionality. This directive manages interactions * within the search input field, such as resetting the field content upon specific key events. * * @see {InputControlDirective} */ declare class SelectInputControlDirective extends InputControlDirective { /** * @internal */ protected isReadonly: i0.Signal; /** * @internal */ isVisible: i0.WritableSignal; /** * Dynamic content to be displayed when no matching search results are found. * This can be specified as HTML content or a string. * * @type {DynamicContent | null} * @default null */ notFoundContent: DynamicContent | null; protected handleDelete(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * SelectSearchFilterPipe extends BaseSearchFilterPipe to provide search filtering functionality * specifically for select components. It filters options based on the input query, supporting * complex filtering logic as defined in the BaseSearchFilterPipe. * * This pipe is not pure, meaning it updates and reevaluates when inputs change or when * impure actions occur in the application. * * @see {BaseSearchFilterPipe} */ declare class SelectSearchFilterPipe extends BaseSearchFilterPipe implements PipeTransform { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } /** * SelectComponent provides an advanced dropdown list that supports autocomplete, multiple selection, * and accessibility features. It extends AutocompleteControl for seamless integration with Angular forms. * * @template T - The type of the value selected in the select. * * @see {AutocompleteControl} */ declare class SelectComponent extends AutocompleteControl implements AfterViewInit { protected selectedOption: SelectOptionComponent | null; protected selectedOptionText: string | null; protected options?: QueryList>; protected selectAllDirective?: SelectAllDirective; protected isIndeterminateSelection: i0.WritableSignal; protected allOptionSelected: i0.WritableSignal; /** * Directive managing the search input field within the select. * * @type {SelectInputControlDirective | undefined} */ searchField?: SelectInputControlDirective; /** * Returns the content of the selected option for display. This can be a template or plain text. * * @type {TemplateRef<{ $implicit: T | null }> | string | null} */ get selectedOptionContent(): TemplateRef<{ $implicit: T | null; }> | string | null; /** * Helper flag: show selected value when search field is hidden and there's selected content. */ get showSelectedValue(): boolean; /** * Helper flag: show placeholder when search field is hidden and there's no selected content. */ get showPlaceholder(): boolean; /** * Placeholder text for the select input when no option is selected. * * @type {string} * @default '' */ placeholder: string; /** * When set to true, the select will display a reset button. * * @type {boolean} * @default false */ clearable: i0.InputSignalWithTransform; /** * When set to true, the select will display a select all button. * * @type {boolean} * @default false */ hasSelectAll: i0.InputSignalWithTransform; /** * Text to display for the select all button. * * @type {string} * @default 'Select all' */ hasSelectAllText: i0.InputSignal; /** * Sets whether multiple options can be selected. * * @type {boolean} * @default false */ multiple: boolean; /** * Custom template for displaying the selected option. * * @type {TemplateRef<{ $implicit: T }> | null} * @default null */ selectedOptionTemplate?: TemplateRef<{ $implicit: T; }> | null; /** * Function to determine if two options are identical, useful for detecting changes in selection. * * @type {IdentityMatcher} * @default ODX_DEFAULT_IDENTITY_MATCHER * * @example * ```ts * (item1, item2) => item1.id === item2.id * ``` */ identityMatcher: IdentityMatcher; ngAfterViewInit(): void; /** * Registers a function to be called when the value of the select changes. * * @param {Function} fn The function to be called when the value changes. * @returns {void} */ registerOnChange(fn: (value: T | null) => void): void; /** * Selects a given option and updates the component's value accordingly. * * @param {SelectOptionComponent | null} option The option to select. * @returns {void} */ selectOption(option?: SelectOptionComponent | null): void; /** * Checks whether a given option is selected. * * @param {SelectOptionComponent} option The option to check. * @returns {boolean} Whether the option is selected. */ isOptionSelected(option: SelectOptionComponent): boolean; protected initKeyManager(options: Highlightable[]): void; protected handleQueryListOption(options: QueryList>): void; protected handleSearchFieldChanges(): void; protected clickSelectAll(event: Event): void; protected handleControllerEvent(event: Event): void; protected activateSelectedOption(): void; protected onDropdownOpen(): void; protected onDropdownClose(): void; protected onDropdownOpened(): void; protected onDropdownClosed(): void; protected resetValue(event: Event): void; private updateSelectedOption; private multipleSelectValueResolver; private selectAllHandler; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "odx-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "hasSelectAll": { "alias": "hasSelectAll"; "required": false; "isSignal": true; }; "hasSelectAllText": { "alias": "hasSelectAllText"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; }; "selectedOptionTemplate": { "alias": "selectedOptionTemplate"; "required": false; }; "identityMatcher": { "alias": "identityMatcher"; "required": false; }; }, {}, ["searchField", "options"], ["[odxSelectSearchField]", "*"], true, never>; static ngAcceptInputType_multiple: unknown; } declare class SelectModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const SELECT_CONTROL: InjectionToken>; export { SELECT_CONTROL, SelectAllDirective, SelectComponent, SelectInputControlDirective, SelectModule, SelectOptionComponent, SelectSearchFilterPipe };