/** * Generated bundle index. Do not edit. */ import * as i0 from "@angular/core"; import { AfterContentInit, AfterViewChecked, AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, InjectionToken, InputSignal, NgZone, OnDestroy, OnInit, QueryList, TemplateRef, WritableSignal } from "@angular/core"; import * as i2 from "@allianz/ng-aquila/formfield"; import { AppearanceType, NxFormfieldComponent, NxFormfieldControl } from "@allianz/ng-aquila/formfield"; import { NxAbstractControl } from "@allianz/ng-aquila/shared"; import { ErrorStateMatcher } from "@allianz/ng-aquila/utils"; import { NxVirtualViewportComponent } from "@allianz/ng-aquila/virtual-scroll"; import { Direction, Directionality } from "@angular/cdk/bidi"; import { BooleanInput } from "@angular/cdk/coercion"; import * as i4 from "@angular/cdk/overlay"; import { CdkConnectedOverlay, CdkOverlayOrigin, ConnectionPositionPair, Overlay, ScrollStrategy } from "@angular/cdk/overlay"; import * as i8 from "@angular/forms"; import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from "@angular/forms"; import { Observable, Subject } from "rxjs"; import * as i5 from "@angular/cdk/a11y"; import { ActiveDescendantKeyManager, FocusOrigin, Highlightable, ListKeyManagerOption, LiveAnnouncer } from "@angular/cdk/a11y"; import * as i1 from "@angular/common"; import * as i3 from "@allianz/ng-aquila/checkbox"; import * as i6 from "@allianz/ng-aquila/icon"; import * as i7 from "@angular/cdk/observers"; import * as i9 from "@allianz/ng-aquila/tooltip"; import * as i10 from "@allianz/ng-aquila/button"; import * as i11 from "@allianz/ng-aquila/input"; export declare class NxDropdownClosedLabelDirective { readonly templateRef: TemplateRef; constructor(templateRef: TemplateRef); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare abstract class NxDropdownControl extends NxFormfieldControl { /** * Whether the dropdown should allow multi selection and additional checkboxes are shown. * * Note: Please make sure the value you bind is an array. If not an error is thrown! */ abstract readonly isMultiSelect: InputSignal; ignoreItemTruncation: boolean; readonly filterChanges: Subject; readonly _closedStream: Observable; /** Virtual scrolling filters the options itself, so the items must not hide themselves. */ _isVirtual?(): boolean; abstract filterFn(search: string, itemValue: string, groupLabel?: string): boolean; abstract valueFormatter(value: any): string; /** @docs-private */ abstract formatValue?(value: any): string; } export declare class NxDropdownGroupComponent { id: string; /** Label displayed in the group. */ readonly label: import("@angular/core").InputSignal; private readonly _items; /** Registers an item of this group and returns a function to unregister it. */ _registerItem(item: { readonly _hidden: boolean; }): () => void; protected _allItemsHidden(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export declare class NxDropdownItemChange { /** Reference to the option that emitted the event. */ readonly item: NxDropdownItemComponent; /** Whether the change in the option's value was a result of a user action. */ readonly isUserInput: boolean; constructor( /** Reference to the option that emitted the event. */ item: NxDropdownItemComponent, /** Whether the change in the option's value was a result of a user action. */ isUserInput?: boolean); } export declare class NxDropdownItemComponent implements Highlightable, OnDestroy, AfterViewChecked, AfterViewInit { private readonly _dropdown; /** @docs-private */ readonly group: NxDropdownGroupComponent | null; private readonly _cdr; private readonly _elementRef; _hidden: boolean; private _mostRecentViewValue; /** Signal to track whether the projected content is empty. */ protected readonly _contentEmpty: import("@angular/core").WritableSignal; private readonly _generatedId; /** Optional ID input. If not provided, an auto-generated ID is used. */ readonly idInput: import("@angular/core").InputSignal; /** * The value of the dropdown item. * You can't use undefined, null and '' (empty strings) * as they are sentinel values signalling empty data. */ value: any; get label(): string; /** The unique ID of the option. Returns the input ID if provided, otherwise auto-generated. */ get id(): string; readonly idSignal: import("@angular/core").Signal; protected readonly _disabled: import("@angular/core").WritableSignal; /** Whether the dropdown item is disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; protected readonly _selectedFromInteraction: import("@angular/core").WritableSignal; protected readonly _selected: import("@angular/core").Signal; /** Whether the item is selected. */ get selected(): boolean; /** Whether the item is selected (reactive input for virtual scroll). */ readonly selectedInput: import("@angular/core").InputSignalWithTransform; /** Whether the item is active (reactive input for virtual scroll). */ readonly activeInput: import("@angular/core").InputSignalWithTransform; /** Internal active state set by setActiveStyles/setInactiveStyles. */ private readonly _activeFromStyles; /** Computed active state combining input and internal styles. */ readonly isActive: import("@angular/core").Signal; /** * Whether the parent dropdown is in multiselect mode. * @docs-private */ get multiselect(): boolean; protected readonly multiSelectSignal: import("@angular/core").Signal; private readonly _allianzOneOptions; protected readonly showRadioIndicator: import("@angular/core").Signal; /** Emits whenever the component is destroyed. */ private readonly _destroyed; /** Event emitted when the option is selected or deselected. */ readonly onSelectionChange: EventEmitter; /** Emits when the state of the option changes and any parents have to be notified. */ readonly _stateChanges: Subject; /** * The wrapping div in the template. Used by dropdown to use the container height for scrolling. * @docs-private */ containerElement: any; /** Reference to the content element for checking emptiness. */ private readonly contentElement; private readonly _renderer; private readonly _unregisterFromGroup?; constructor(_dropdown: NxDropdownControl, /** @docs-private */ group: NxDropdownGroupComponent | null, _cdr: ChangeDetectorRef, _elementRef: ElementRef); private readonly _updateHostAttribute; private readonly _updateClass; ngAfterViewInit(): void; ngAfterViewChecked(): void; private _updateViewValue; private _updateContentEmptyState; ngOnDestroy(): void; _onClick(event: Event): void; /** * Selects the option while indicating the selection came from the user. Used to * determine if the select's view -> model callback should be invoked. */ _selectViaInteraction(): void; /** * Gets the `aria-selected` value for the option. * For multiselect: returns true/false for all items * For single-select: returns true only for selected item, null for others * (Including aria-selected="false" on all unselected items adds noise for screen-reader users) * @docs-private */ _getAriaSelected(): boolean | null; /** @docs-private */ show(): void; /** @docs-private */ hide(): void; private _showOrHideByFilter; get _formattedValue(): string; /** @docs-private */ get viewValue(): any; /** @docs-private */ get elementRef(): ElementRef; select(): void; /** @docs-private */ deselect(): void; _initSelected(selected: boolean): void; /** @docs-private */ focus(): void; private _emitSelectionChangeEvent; /** @docs-private */ setActiveStyles(): void; /** @docs-private */ setInactiveStyles(): void; /** * Returns the list item's text label. Implemented as a part of the ListKeyManagerOption. * @docs-private */ getLabel(): string; _isContentEmpty(element: Element): boolean; _onLabelChange(): void; /** Returns the correct tabindex for the option depending on disabled state. */ _getTabIndex(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * An option of the dropdown. * Contains a value and an optional label. * If no label is specified, the value will be displayed instead. */ export interface NxDropdownOption { value: any; label?: string; disabled?: boolean; } interface NxDropdownOptionView extends NxDropdownOption { disabled: boolean; /** Index across all options, including the ones in other groups. */ index: number; group?: NxDropdownGroupView; option: S; } interface NxDropdownGroupView { id: string; label: string; options: NxDropdownOptionView[]; } type NxDropdownVirtualRow = { option: NxDropdownOptionView; index: number; /** Position and size of the set of options, counted per group if the option is in one. */ posinset: number; setsize: number; group?: undefined; } | { group: NxDropdownGroupView; divider: boolean; option?: undefined; }; /** * Context provided to custom item templates. * Use with `#nxDropdownItemTemplate` template reference. */ export interface NxDropdownItemTemplateContext { /** The option value (use `let-item` to access directly) */ $implicit: T; /** Index in the filtered options array */ index: number; /** Whether the item is currently selected */ selected: boolean; /** The option as passed to `options` */ option: unknown; } export type NxDropdownPanelMinWidth = 'trigger' | 'none'; /** Vertical alignment of dropdown checkmark */ export type VerticalAlignCheckmark = 'top' | 'center'; /** Dropdown data that requires internationalization. */ export declare class NxDropdownIntl { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ readonly changes: Subject; /** A label for the multi-select component. */ selectAll: string; /** * A label for the multi-select component. * @deprecated No longer used. * @deletion-target 18.0.0 */ clearAll: string; /** Hint announced to screen readers when locked (disabled & pre-selected) options exist. */ preselectedLockedHint(count: number): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** Change event object that is emitted when the select value has changed. */ export declare class NxDropdownSelectChange { /** Reference to the select that emitted the change event. */ readonly source: NxDropdownComponent; /** Current value of the select that emitted the event. */ readonly value: T; constructor( /** Reference to the select that emitted the change event. */ source: NxDropdownComponent, /** Current value of the select that emitted the event. */ value: T); } /** Injection token that determines the scroll handling while a dropdown is open. */ export declare const NX_DROPDOWN_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>; /** * @docs-private * @deprecated No longer used. * @deletion-target 18.0.0 */ export declare function NX_DROPDOWN_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy; /** * @docs-private * @deprecated No longer used. * @deletion-target 18.0.0 */ export declare const NX_DROPDOWN_SCROLL_STRATEGY_PROVIDER: { provide: InjectionToken<() => ScrollStrategy>; useFactory: typeof NX_DROPDOWN_SCROLL_STRATEGY_PROVIDER_FACTORY; deps: (typeof Overlay)[]; }; /** Default options for dropdown that can be overridden globally. */ export interface NxDropdownDefaultOptions { /** Enable virtual scrolling for all dropdowns and multi selects (default: false) */ virtualScroll?: boolean; } /** Injection token to be used to override the default options for dropdown. */ export declare const DROPDOWN_DEFAULT_OPTIONS: InjectionToken; export type FilterInputType = 'text' | 'number' | 'tel' | 'search' | 'date' | 'datetime' | 'month' | 'email'; /** `groupLabel` is only passed for items inside a group. */ export type NxDropdownFilterFn = (query: string, label: string, groupLabel?: string) => boolean; export type NxDropdownCompareWithFn = (o1: any, o2: any) => boolean; export type NxDropdownValueFormatterFn = (value: any) => any; export declare class NxDropdownComponent implements NxAbstractControl, NxDropdownControl, ControlValueAccessor, OnInit, AfterViewInit, AfterContentInit, OnDestroy, DoCheck { #private; private readonly _cdr; private readonly _elementRef; private readonly _ngZone; private readonly formFieldComponent; private readonly _errorStateMatcher; /** @docs-private */ readonly ngControl: NgControl | null; private readonly _parentForm; private readonly _parentFormGroup; private readonly _dir; private readonly _defaultScrollStrategyFactory; private readonly _defaultOptions; private readonly _injector; /** Whether the dropdown is readonly. */ set readonly(value: BooleanInput); get readonly(): boolean; private _readonly; /** set readonly state */ setReadonly(value: boolean): void; readonly ariaLabelledBy: import("@angular/core").InputSignal; /** * @docs-private * Internal writable signal for programmatic override of aria-labelledby */ private readonly _ariaLabelledSignal; /** * @docs-private * Set the aria-labelledby attribute value programmatically from another component */ _setAriaLabelledBy(value: string | null): void; /** @docs-private */ protected readonly _getAriaLabelledBy: import("@angular/core").Signal; readonly verticalAlignCheckmark: import("@angular/core").InputSignal; private _selectionModel; /** The ID of rendered dropdown html element. */ readonly renderedValueId: string; readonly modalId: string; private _focused; /** Whether or not the overlay panel is open. */ private _panelOpen; /** Whether the overlay is currently animating out. */ protected isClosing: boolean; private _closeAnimationTimeoutId; /** @docs-private */ errorState: boolean; _tooltipText: import("@angular/core").WritableSignal; /** Width of the overlay panel. */ _overlayWidth: string | number; /** Min-width of the overlay panel. */ _overlayMinWidth: string | number; /** * Name of this control that is used inside the formfield component. * @docs-private */ controlType: string; /** The minimal space between the viewport and the overlay */ _overlayViewportMargin: number; /** Holds the panelWidth after panel was attached. */ _panelWidth?: number; _positions: ConnectionPositionPair[]; /** * Emits when internal state changes to inform formfield about it. * @docs-private */ readonly stateChanges: Subject; /** @docs-private */ ariaDescribedby?: string; /** * Array of options for the dropdown, or array of groups when `grouped` is set. * Use `selectValue` and `selectLabel` for options that are not an `NxDropdownOption`. */ set options(value: S[]); get options(): S[] | null; private readonly _options; /** * Whether `options` contains groups instead of options. * Use `selectGroupLabel` and `selectGroupOptions` to define how to read a group. */ readonly grouped: import("@angular/core").InputSignalWithTransform; /** * Selector to get the value of an option. Can be either a property name or a selector function. * An empty string uses the whole option as value. */ readonly selectValue: import("@angular/core").InputSignal any)>; /** * Selector to get the label of an option. Can be either a property name or a selector function. * Options without a label display their formatted value. */ readonly selectLabel: import("@angular/core").InputSignal string)>; /** * Selector to get the disabled state of an option. Can be either a property name or a selector function. * An empty string disables no option. */ readonly selectDisabled: import("@angular/core").InputSignal boolean)>; /** * Selector to get the label of a group. Only used when `grouped` is set. * Can be either a property name or a selector function. */ readonly selectGroupLabel: import("@angular/core").InputSignal string)>; /** * Selector to get the options of a group. Only used when `grouped` is set. * Can be either a property name or a selector function. */ readonly selectGroupOptions: import("@angular/core").InputSignal unknown[])>; protected readonly _groups: import("@angular/core").Signal[]>; protected readonly _optionViews: import("@angular/core").Signal[] | null>; private readonly _optionsEffect; /** * Type of filter input (default: text). */ set filterInputType(value: FilterInputType); get filterInputType(): FilterInputType; private _filterInputType; set tabIndex(value: number); get tabIndex(): number; private _tabIndex; /** Selected value */ set value(newValue: any); get value(): any; /** Holds the value from nxValue. */ private _value; /** Whether the dropdown is disabled. */ set disabled(value: BooleanInput); get disabled(): boolean; protected _disabled: boolean; /** * Whether the dropdown should allow multi selection and additional checkboxes are shown. * Note: Please make sure the value you bind is an array. * @throws Error if true and the bound value is not an array. * @deprecated Please use the new `` component instead. */ readonly isMultiSelect: import("@angular/core").InputSignal; /** The id of the input. */ get id(): string; /** Whether the component is required. This adds an aria-required label to the component. */ set required(value: BooleanInput); get required(): boolean; protected _required: boolean; private _style; /** Whether the dropdown should render in its negative style or not. */ _negative: boolean; /** If set to 'negative', the component is displayed with the negative set of styles. */ set styles(value: string); /** Placeholder to be shown if no value has been selected. */ set placeholder(value: string); get placeholder(): string; private _placeholder; /** * Disable truncation of long item texts. * We recommend following UX guidelines and always truncating long items. * Please only disable truncation if it's impossible to use short descriptions. * @deprecated */ set ignoreItemTruncation(value: BooleanInput); get ignoreItemTruncation(): boolean; private _ignoreItemTruncation; /** Whether the dropdown should be shown with an additional filter input. */ readonly showFilter: import("@angular/core").InputSignal; /** * Enable virtual scrolling. * Requires using the `options` input (data-driven mode). */ readonly virtualScroll: import("@angular/core").InputSignalWithTransform; _isVirtual(): boolean; /** Text displayed as placeholder for the filter. */ readonly filterPlaceholder: import("@angular/core").InputSignal; /** Text that is displayed at the top of the overlay. If not set the formfield label is used by default. */ readonly overlayLabel: import("@angular/core").InputSignal; /** Can be used as a fallback to the CdkOverlayOrigin */ readonly overlayFallbackOrigin: import("@angular/core").InputSignal | undefined>; readonly panelMaxWidth: import("@angular/core").InputSignal; /** Event emitted when the select panel has been toggled. */ readonly openedChange: EventEmitter; /** Event emitted when the select panel has been focus out. */ readonly focusOut: EventEmitter; /** Event emitted when the dropdown items get filtered. Returns the currently visible dropdown items. */ readonly filterResultChange: EventEmitter; /** Event emitted when the select has been opened. */ readonly _openedStream: Observable; /** Event emitted when the select has been closed. */ readonly _closedStream: Observable; /** Event emitted when the user types in the filter input. */ readonly filterChanges: EventEmitter; /** * Event that emits whenever the raw value of the select changes. This is here primarily * to facilitate the two-way binding for the `value` input. * @docs-private */ readonly valueChange: EventEmitter; /** Event emitted when the selected value has been changed. */ readonly selectionChange: EventEmitter>; /** * Panel containing the select options. * @docs-private */ panel?: ElementRef; /** @docs-private */ panelBody?: ElementRef; /** @docs-private */ trigger: ElementRef; /** @docs-private */ fallbackOrigin: ElementRef | CdkOverlayOrigin; /** @docs-private */ filterInput?: ElementRef; /** @docs-private */ readonly _filterValue: import("@angular/core").WritableSignal; /** @docs-private - getter for template binding compatibility */ get filterValue(): string; /** @docs-private - setter for template binding compatibility */ set filterValue(value: string); /** * Overlay pane containing the options. * @docs-private */ overlayDir: CdkConnectedOverlay; _contentDropdownItems: QueryList; /** @docs-private */ groups: any; _customClosedDropdownLabel: NxDropdownClosedLabelDirective; /** * Custom template for rendering items when using the `options` array. * Use `#nxDropdownItemTemplate` as the template reference name. */ readonly _itemTemplate: import("@angular/core").Signal> | undefined>; private readonly _defaultClosedDropdownLabel; _lazyDropdownItems: QueryList; get dropdownItems(): QueryList; /** @docs-private */ get closedDropdownLabel(): TemplateRef; private _closedDropdownLabel; private readonly _destroyed; private _keyManager; private panelMinWidthWasSet; private panelGrowWasSet; private ignoreItemTruncationWasSet; set panelOpen(value: boolean); /** @docs-private */ get panelOpen(): boolean; /** Strategy factory that will be used to handle scrolling while the dropdown panel is open. */ private readonly _scrollStrategyFactory; /** Strategy that will be used to handle scrolling while the dropdown panel is open. */ _scrollStrategy: ScrollStrategy; /** @docs-private */ get label(): string; /** * Sets how the panel min width will be determined. * 'trigger' will set the panels min-width to the trigger width. * 'none' will not set a min-width and will let the panel grow naturally with its content so it can be smaller than the trigger. * This is mostly for special use cases like the country code dropdown in the phone input. * @deprecated Use `panelGrow` instead. */ set panelMinWidth(value: NxDropdownPanelMinWidth); get panelMinWidth(): NxDropdownPanelMinWidth; _panelMinWidth: NxDropdownPanelMinWidth; /** * panelGrow: true means the overlay can grow larger than the trigger and grows with the longest label * panelGrow: false means the overlay is the size of the trigger */ set panelGrow(value: boolean); get panelGrow(): boolean; _panelGrow: boolean; /** * Function that transforms the value into a string. * This function is used for displaying and filtering the content. * * Default: `(value: any) => value == null ? '' : value.toString()`. */ set valueFormatter(value: NxDropdownValueFormatterFn | null | undefined); get valueFormatter(): NxDropdownValueFormatterFn; /** * Function to compare the option values with the selected values. The first argument * is a value from an option. The second is a value from the selection. A boolean * should be returned. * * Defaults to object equality. */ set compareWith(value: NxDropdownCompareWithFn | null | undefined); get compareWith(): NxDropdownCompareWithFn; /** * Function to be used when the user types into the search filter. The first argument is the user input, * the second argument is the dropdown item value as displayed. For items in a group, the third argument * is the group label. The dropdown items will use this function to set their visibility state. * A boolean should be returned. * * Defaults to lower case inclusion, matching either the item label or the group label. */ set filterFn(value: NxDropdownFilterFn | null | undefined); get filterFn(): NxDropdownFilterFn; /** * Whether the select is focused. * @docs-private */ get focused(): boolean; /** `View -> model callback called when value changes` */ _onChange: (value: any) => void; /** `View -> model callback called when select has been touched` */ _onTouched: () => void; /** @docs-private */ get elementRef(): ElementRef; /** The text direction of the containing app. */ get dir(): Direction; /** Active value from key manager (traditional mode) */ protected readonly _keyManagerActiveValue: import("@angular/core").WritableSignal; /** ViewChild reference to virtual viewport component */ readonly virtualViewport: import("@angular/core").Signal; /** Active index in virtual scroll mode (index in filtered options array) */ protected readonly _virtualActiveIndex: import("@angular/core").WritableSignal; /** Active value in virtual mode - computed from index */ protected readonly _virtualActiveValue: import("@angular/core").Signal; /** Unified active value - switches based on mode */ protected readonly _activeValue: import("@angular/core").Signal; /** Computed ID for aria-activedescendant, works for both modes */ protected readonly activeDescendantId: import("@angular/core").Signal; /** Filtered options for virtual mode (respects filter) */ protected readonly _filteredOptions: import("@angular/core").Signal[]>; /** Filtered options for virtual mode, with a header row in front of each group. */ protected readonly _virtualRows: import("@angular/core").Signal[]>; protected readonly _virtualRowGroup: (row: NxDropdownVirtualRow) => NxDropdownGroupView | undefined; /** Maps an index in `_filteredOptions` to its index in `_virtualRows`. */ private readonly _virtualRowIndices; protected readonly _trackVirtualRow: (_: number, row: NxDropdownVirtualRow) => unknown; /** Typeahead buffer (shared) */ private _typeaheadBuffer; /** Typeahead timeout ID */ private _typeaheadTimeout; private _clearTypeahead; constructor(_cdr: ChangeDetectorRef, _elementRef: ElementRef, _ngZone: NgZone, tabIndex: string, formFieldComponent: NxFormfieldComponent | null, _errorStateMatcher: ErrorStateMatcher, /** @docs-private */ ngControl: NgControl | null, _parentForm: NgForm | null, _parentFormGroup: FormGroupDirective | null, _dir: Directionality | null, _defaultScrollStrategyFactory: () => ScrollStrategy); ngDoCheck(): void; ngOnInit(): void; ngAfterViewInit(): void; ngAfterContentInit(): void; ngOnDestroy(): void; /** @docs-private */ updateErrorState(): void; private _updateTooltipText; /** Sets up a key manager to listen to keyboard events on the overlay panel. */ private _initKeyManager; openedByKeyboard: boolean; private _initActiveItem; private _subscribeToOptionChanges; /** Invoked when an option is clicked. */ _onSelect(option: NxDropdownItemComponent, isUserInput: boolean, item?: NxDropdownOptionView): void; private _initializeSelection; /** * Sets the selected option based on a value. If no option can be * found with the designated value, the select trigger is cleared. */ private _setSelectionByValue; /** * Finds and selects and option based on its value. */ private _selectValue; /** Emits change event to set the model value. */ private _propagateChanges; /** Sorts the selected values in the selected based on their order in the panel. */ private _sortValues; private _updatePosition; /** Focuses the select element. */ focus(): void; /** Takes focus onto the trigger and opens the panel. */ onContainerClick(event: MouseEvent): void; /** * Scrolls to the option at the specified index. * Works for both virtual and non-virtual scroll modes. * @param index The zero-based index of the option to scroll to * @param behavior Scroll behavior ('auto' or 'smooth'). Default: 'auto' */ scrollToIndex(index: number, behavior?: ScrollBehavior): void; /** * Scrolls to the option with the specified value. * Uses the compareWith function to match values. * @param value The value of the option to scroll to * @param behavior Scroll behavior ('auto' or 'smooth'). Default: 'auto' */ scrollToValue(value: unknown, behavior?: ScrollBehavior): void; private _findIndexByValue; get overlayOrigin(): ElementRef | CdkOverlayOrigin; /** Opens the panel of the dropdown. */ openPanel($event: Event): void; private getOverlayWidth; /** Closes the panel of the dropdown. */ closePanel(): void; private _clearCloseAnimationTimeout; private _getOverlayAnimationDuration; private _scrollActiveOptionIntoCenter; /** Scrolls the active option into view. */ private _scrollActiveOptionIntoView; private _getItemOffset; /** * Formfield implementation. * @docs-private */ setDescribedByIds(ids: string[]): void; /** * Support for aria-label removed in favor of aria-labelledby * The NxFormfieldControl abstract class requires implementation * of below method. * @docs-private */ setAriaLabel(value: string): string; get _isInOutlineField(): boolean; /** * Whether the select has a value. * @docs-private */ get empty(): boolean; /** @docs-private */ get hasValue(): boolean; /** @docs-private */ get shouldLabelFloat(): boolean; /** End Formfield */ /** ControlValueAccessor */ /** * Sets the select's value. Part of the ControlValueAccessor interface * required to integrate with Angular's core forms API. * * Function `setTimeout()` allows to write value after ngOnInit (happens before it right now), * so that we have the input `options` set, and it's shown properly in the dropdown * https://github.com/angular/angular/issues/29218#issuecomment-592015773 * It can be removed after the Angular issue is resolved * @param value New value to be written to the model. */ writeValue(value: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: () => void): void; /** * Disables the select. Part of the ControlValueAccessor interface required * to integrate with Angular's core forms API. * @param isDisabled Sets whether the component is disabled. */ setDisabledState(isDisabled: boolean): void; /** End ControlValueAccessor */ _handleKeydown(event: KeyboardEvent): void; private get _isLazy(); private _handleClosedKeydown; private _handleOpenKeydown; /** @docs-private */ formatValue(value: any): string; /** Called when the user types in the filter input */ _onFilter(query: string): void; /** * The value displayed in the trigger. * @docs-private */ get triggerValue(): string; _getLabel(option: NxDropdownOption): string; /** Creates the context object for custom item templates */ _createItemTemplateContext(option: NxDropdownOptionView, index: number): NxDropdownItemTemplateContext; /** Extract value from NxDropdownOption for virtual scroll component */ readonly _getOptionValue: (option: NxDropdownOption) => unknown; /** Extract label from NxDropdownOption for virtual scroll component */ readonly _getOptionLabel: (option: NxDropdownOption) => string; private _createOptionView; private _readGroupLabel; private _readGroupOptions; /** Check if a value is currently selected */ _isValueSelected(value: unknown): boolean; /** Handle selection change from nx-dropdown-item in virtual scroll mode */ _onVirtualSelect(event: NxDropdownItemChange, item: NxDropdownOptionView, index: number): void; /** Select/toggle a virtual item */ private _selectVirtualItem; /** Initialize virtual scroll mode when panel opens */ private _initVirtualScrollMode; private _toVirtualRowIndex; private _scrollVirtualOptionIntoView; /** Index of the next enabled option in `step` direction, starting at `index`. */ private _findEnabledVirtualIndex; /** Handle keyboard events in virtual scroll mode */ private _handleVirtualKeydown; private _virtualArrowDown; private _virtualArrowUp; private _virtualHome; private _virtualEnd; private _virtualSelect; private _handleVirtualTypeahead; private _executeTypeaheadSearch; /** * Find a typeahead match in the options list. * Searches starting from startIndex + 1 and wraps around. */ private _findTypeaheadMatch; /** Handle filter changes in virtual scroll mode */ _onVirtualFilter(query: string): void; /** * Callback that is invoked when the overlay panel has been attached. */ _onAttached(): void; _onFocus(): void; /** * Calls the touched callback only if the panel is closed. Otherwise, the trigger will * "blur" to the panel when it opens, causing a false positive. */ _onBlur(): void; /** @docs-private */ get isFilterEmpty(): boolean; _clearFilter(): void; /** Determines the `aria-activedescendant` to be set on the host. */ _getAriaActiveDescendant(): string | null; private _tooltipUpdateRef; private _scheduleTooltipUpdate; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, { attribute: "tabindex"; }, { optional: true; }, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }, { optional: true; }, null]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-dropdown", never, { "readonly": { "alias": "readonly"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "verticalAlignCheckmark": { "alias": "verticalAlignCheckmark"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; }; "grouped": { "alias": "grouped"; "required": false; "isSignal": true; }; "selectValue": { "alias": "selectValue"; "required": false; "isSignal": true; }; "selectLabel": { "alias": "selectLabel"; "required": false; "isSignal": true; }; "selectDisabled": { "alias": "selectDisabled"; "required": false; "isSignal": true; }; "selectGroupLabel": { "alias": "selectGroupLabel"; "required": false; "isSignal": true; }; "selectGroupOptions": { "alias": "selectGroupOptions"; "required": false; "isSignal": true; }; "filterInputType": { "alias": "filterInputType"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "isMultiSelect": { "alias": "isMultiSelect"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; }; "styles": { "alias": "variant"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "ignoreItemTruncation": { "alias": "ignoreItemTruncation"; "required": false; }; "showFilter": { "alias": "showFilter"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "overlayLabel": { "alias": "overlayLabel"; "required": false; "isSignal": true; }; "overlayFallbackOrigin": { "alias": "overlayFallbackOrigin"; "required": false; "isSignal": true; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; "isSignal": true; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; }; "panelGrow": { "alias": "panelGrow"; "required": false; }; "valueFormatter": { "alias": "valueFormatter"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; }, { "openedChange": "openedChange"; "focusOut": "focusOut"; "filterResultChange": "filterResult"; "_openedStream": "opened"; "_closedStream": "closed"; "filterChanges": "filterInput"; "valueChange": "valueChange"; "selectionChange": "selectionChange"; }, ["_itemTemplate", "_customClosedDropdownLabel", "_contentDropdownItems", "groups"], ["*"], true, never>; static ngAcceptInputType_panelGrow: unknown; } /** * A single option witin the multi select. * @docs-private */ declare class NxMultiSelectAllComponent implements Highlightable, ListKeyManagerOption { private readonly _cdr; readonly elementRef: ElementRef; private readonly liveAnnouncer; private _active; id: string; /** * Value of this option. */ readonly value: import("@angular/core").InputSignal; /** * Label of this option. */ readonly label: import("@angular/core").InputSignal; /** * Indeterminate */ set indeterminate(value: boolean); get indeterminate(): boolean; _indeterminate: boolean; /** * Whether this option is selected. */ selected: boolean; /** * Whether thisoption is disabled. */ disabled: boolean; /** * Emits an event when this option is selected or unselected by the user. */ readonly selectedAllChange: EventEmitter; /** * Sets this option active highlighting it to the user. */ set active(value: boolean); get active(): boolean; constructor(_cdr: ChangeDetectorRef, elementRef: ElementRef, liveAnnouncer: LiveAnnouncer); setActiveStyles(): void; setInactiveStyles(): void; _onClick(e: Event): void; _onSelect(): void; /** * Selects this option as if the user clicked on it. */ selectViaInteraction(): void; getLabel(): string; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-multi-select-all", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectedAllChange": "selectedAllChange"; }, never, never, true, never>; } /** * A single option witin the multi select. * @docs-private */ export declare class NxMultiSelectOptionComponent implements Highlightable, ListKeyManagerOption { private readonly _cdr; readonly elementRef: ElementRef; private _active; id: string; readonly appearance: import("@angular/core").InputSignal; /** * Value of this option. */ readonly value: import("@angular/core").InputSignal; /** * Label of this option. */ readonly label: import("@angular/core").InputSignal; /** * Whether this option is selected. */ selected: boolean; /** * Whether this option is disabled. */ disabled: boolean; /** * Emits an event when this option is selected or unselected by the user. */ readonly selectedChange: EventEmitter; /** * Sets this option active highlighting it to the user. */ set active(value: boolean); get active(): boolean; constructor(_cdr: ChangeDetectorRef, elementRef: ElementRef); setActiveStyles(): void; setInactiveStyles(): void; _onClick(): void; /** * Selects this option as if the user clicked on it. */ selectViaInteraction(): void; getLabel(): string; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-multi-select-option", never, { "id": { "alias": "id"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "active": { "alias": "active"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>; } /** `groupLabel` is only passed when the multi select is `grouped`. */ export type NxMultiSelectFilterFn = (query: string, label: string, groupLabel?: string) => boolean; interface NxMultiSelectGroupView { id: string; label: string; options: S[]; } type NxMultiSelectVirtualRow = { option: S; /** Index in `listItems`. */ index: number; divider: boolean; /** Position and size of the set of options, counted per group if the option is in one. */ posinset: number; setsize: number; optionGroup?: NxMultiSelectGroupView; group?: undefined; } | { group: NxMultiSelectGroupView; divider: boolean; option?: undefined; index?: undefined; }; /** * Multi Select component. * @typeParam S Type of the items in the options array * @typeParam T Type of the ngModel value */ export declare class NxMultiSelectComponent implements ControlValueAccessor, NxFormfieldControl, DoCheck, OnDestroy, AfterViewInit { #private; readonly _intl: NxDropdownIntl; private readonly _elementRef; private readonly _errorStateMatcher; private readonly _cdr; private readonly _formFieldComponent; readonly ngControl: NgControl | null; private readonly _parentForm; private readonly _parentFormGroup; get value(): T[]; get _isOutline(): boolean; get _appearance(): AppearanceType; get _overlayLabel(): string | null | undefined; /** * Whether the value is empty. */ get empty(): boolean; get focused(): boolean; set required(value: boolean); get required(): boolean; private _required; /** Whether the multi select is disabled. */ set disabled(value: boolean); get disabled(): boolean; private _disabled; /** Whether the multi select should be read only. */ set readonly(value: BooleanInput); get readonly(): boolean; private _readonly; /** The placeholder shown in the multi select field. */ set placeholder(value: string); get placeholder(): string; private _placeholder; /** * Whether this multi select can be filtered. */ set filter(value: BooleanInput); get filter(): boolean; private _filter; /** Whether the (select all / clear all) should be disabled and hidden. */ set disableSelectAll(value: BooleanInput); get disableSelectAll(): boolean; /** * Function to be used when the user types into the search filter. The first argument is the user input, * the second argument is the dropdown item value as displayed. When `grouped` is set, the third argument * is the label of the option's group. The dropdown items will use this function * to set their visibility state. A boolean should be returned. * * Defaults to lower case inclusion, matching either the option label or the group label. */ set filterFn(value: NxMultiSelectFilterFn | null | undefined); get filterFn(): NxMultiSelectFilterFn; set tabIndex(value: number); get tabIndex(): number; private _tabIndex; /** @docs-private */ get shouldLabelFloat(): boolean; /** @docs-private */ get elementRef(): ElementRef; /** * Whether all *enabled* options are selected. Used to decide whether clicking * "select all" should select or clear the enabled options. Disabled options are * never touched by "select all", so they are excluded from this decision. */ get _allSelected(): boolean; get _someSelected(): boolean; /** Number of options that are both disabled and pre-selected (locked selections). */ get _lockedSelectedCount(): number; private readonly _options; private readonly _selectAll; /** Event emitted when the select panel has been toggled. */ readonly openedChange: EventEmitter; /** Event emitted when the select has been opened. */ readonly _openedStream: Observable; /** Event emitted when the select has been closed. */ readonly _closedStream: Observable; private _openedBy; /** @docs-private */ _divider: number; private readonly _trigger?; private readonly _origin?; get overlayOrigin(): ElementRef | CdkOverlayOrigin; private readonly _filterInput?; private readonly _optionsList?; private readonly _panelHeader?; private readonly _panelContent?; private readonly _virtualViewport; private readonly _overlayDir?; /** Event emitted when the selected value has been changed. */ readonly selectionChange: EventEmitter; /** Event emitted when the select panel has been focus out. */ readonly focusOut: EventEmitter; /** Event emitted when the user types in the filter input. */ readonly filterChanges: EventEmitter; /** @docs-private */ readonly controlType: string; /** @docs-private */ errorState: boolean; _positions: ConnectionPositionPair[]; _inputFocused: boolean; _ariaDescribedby: string; /** Width of the overlay panel. */ _width: string | number; /** Min-width of the overlay panel. */ _minWidth: string | number; _filterValue: string; protected _tooltipText: WritableSignal; listItems: S[]; /** Index of each of `listItems` in all options, so that a virtual option keeps its id while filtering. */ private _listItemSourceIndices; protected _listGroups: NxMultiSelectGroupView[]; selectedItems: Set; id: string; private readonly _injector; _comboboxId: string; /** Id of the visually-hidden hint describing locked (disabled & pre-selected) options. */ _lockedHintId: string; readonly stateChanges: Subject; _keyManager: ActiveDescendantKeyManager | NxMultiSelectAllComponent>; protected _focusOrigin: WritableSignal; /** The minimal space between the viewport and the overlay */ _overlayViewportMargin: number; /** * List of options to choose from, or list of groups when `grouped` is set. */ set options(value: S[]); get options(): S[]; private readonly _rawOptions; /** * Whether `options` contains groups instead of options. * Use `selectGroupLabel` and `selectGroupOptions` to define how to read a group. */ readonly grouped: import("@angular/core").InputSignalWithTransform; /** * Selector to get the label of a group. Only used when `grouped` is set. * Can be either a property name or a selector function. */ readonly selectGroupLabel: import("@angular/core").InputSignal string)>; /** * Selector to get the options of a group. Only used when `grouped` is set. * Can be either a property name or a selector function. */ readonly selectGroupOptions: import("@angular/core").InputSignal unknown[])>; private readonly _groups; private readonly _flatOptions; /** * Option for each value, so writing a value does not search all options for each selected value. * Rebuilt when the options or `selectValue` change. */ private readonly _optionsByValue; /** * Placeholder for the filter input. */ readonly filterPlaceholder: import("@angular/core").InputSignal; /** * Selector to get the value of an option. * Can be either a property name or a selector function. * When providing objects as options, it is recommended to set selectValue to specify a unique identifier for each option. If selectValue is empty, the whole object is used for selection, which may cause issues if object references change. */ readonly selectValue: import("@angular/core").InputSignal T)>; /** * Selector to get the label of an option. * Can be either a property name or a selector function. * When empty the whole option is treated as the label. */ readonly selectLabel: import("@angular/core").InputSignal string)>; /** * Selector to get the disabled state of an option. * Can be either a property name or a selector function. */ readonly selectDisabled: import("@angular/core").InputSignal boolean) | undefined>; /** * panelGrow: true means the overlay can grow larger than the trigger and grows with the longest label * panelGrow: false means the overlay is the size of the trigger */ readonly panelGrow: import("@angular/core").InputSignalWithTransform; readonly panelMaxWidth: import("@angular/core").InputSignal; /** * Enable virtual scrolling. Only the visible options are rendered, which keeps long lists fast. */ readonly virtualScroll: import("@angular/core").InputSignalWithTransform; protected readonly _virtualRows: WritableSignal[]>; /** Maps an index in `listItems` to its index in `_virtualRows`. */ private readonly _virtualRowIndices; /** Active item in virtual scroll mode, counted like the items of the key manager: select all first. */ private readonly _virtualActiveIndex; protected readonly _virtualRowGroup: (row: NxMultiSelectVirtualRow) => NxMultiSelectGroupView | undefined; protected readonly _trackVirtualRow: (_: number, row: NxMultiSelectVirtualRow) => string; _isOpen: boolean; isClosing: boolean; private _closeAnimationTimeoutId; private readonly _destroyed; private _isDestroyed; private readonly _allianzOneOptions; protected readonly _isA1: import("@angular/core").Signal; constructor(_intl: NxDropdownIntl, _elementRef: ElementRef, _errorStateMatcher: ErrorStateMatcher, _cdr: ChangeDetectorRef, _formFieldComponent: NxFormfieldComponent | null, ngControl: NgControl | null, _parentForm: NgForm | null, _parentFormGroup: FormGroupDirective | null); ngOnDestroy(): void; setDisabledState(isDisabled: boolean): void; private _onChange; private _onTouched; private readonly sortSelectedToTop; _selectValue(option: S): T; _selectLabel(option: S): string; private _selectGroupLabel; private _selectGroupOptions; private _updatePositions; _isDisabled(option: S): boolean; /** * Returns the html id used to label the combobox / panel / filter input. * * We label with the formfield label only. The combobox already exposes its rendered * value through its own text content, so referencing its own id here would make the * selected options be announced twice - once as the combobox value and once as part * of its accessible name. Fall back to the combobox id only when no label exists, so * the control still has an accessible name. */ _getAriaLabelledBy(valueId?: string): string; /** @docs-private */ setDescribedByIds(ids: string[]): void; /** Takes focus onto the trigger and opens the panel. */ onContainerClick(event: MouseEvent): void; ngAfterViewInit(): void; open($event: Event, origin: FocusOrigin): void; _open($event: Event, origin: FocusOrigin): void; private getOverlayWidth; _close(): void; _onSelect(option: S, selected: boolean): void; _onKeydown($event: KeyboardEvent): void; _onTriggerBlur(): void; _onFocusWithinOverlay($event: Event): void; _getAriaActiveDescendant(): string | null; _onFilterChange(query: string | null | undefined): void; private _updateListItems; private _createVirtualRows; _getValueText(): string; _onAttach(): void; _onDetach(): void; _onSelectAll(): void; _clear(): void; _clearFilter(): void; writeValue(value: T[]): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; ngDoCheck(): void; updateErrorState(): void; private _tooltipUpdateRef; private _scheduleTooltipUpdate; private _updateTooltipText; private _scrollActiveOptionIntoView; /** Highlights the first enabled option of new rows, also when select all was highlighted, and scrolls to it. */ private _setFirstVirtualOptionActive; private _getHighlight; /** Keeps the highlight on the same option or select all when the options are replaced, otherwise highlights the first one. */ private _restoreHighlight; private _findVirtualIndex; private _isHighlighted; private _setFirstOptionActive; private get _hasVirtualSelectAll(); /** Whether select all counts as the first option, which only the flat list without filter does: groups count their own. */ protected get _virtualListCountsSelectAll(): boolean; /** Number of items in front of the options in virtual scroll mode: the select all checkbox. */ private get _virtualOffset(); /** Id of the virtual option at `index` in `listItems`. */ protected _virtualOptionId(index: number): string; protected _isVirtualActive(index: number): boolean; private _virtualItemCount; private _isVirtualItemDisabled; private _virtualItemLabel; /** Index of the next enabled item in `step` direction, starting at `index`, or -1. */ private _findEnabledVirtualIndex; private _setVirtualActiveIndex; private _scrollVirtualActiveItemIntoView; /** Handles the keys that move the highlight. */ private _onNavigationKeydown; private _typeaheadBuffer; private _typeaheadTimeoutId; /** Highlights the next item that starts with the typed letters, once typing pauses. */ private _typeVirtual; private _clearVirtualTypeahead; private _selectActiveItem; /** * Scrolls to the option at the given index, counted in the order the options are currently displayed. * Only has an effect after the panel has opened. With virtual scrolling, the option is rendered asynchronously. */ scrollToIndex(index: number, behavior?: ScrollBehavior): void; /** Scrolls to the option with the given value. */ scrollToValue(value: T, behavior?: ScrollBehavior): void; private _getOverlayAnimationDuration; private _clearCloseAnimationTimeout; private _initKeyManager; private _addOptionToSelection; private _removeOptionFromSelection; protected _isOptionSelected(option: S): boolean; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, null, { optional: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>; static ɵcmp: i0.ɵɵComponentDeclaration, "nx-multi-select", never, { "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "disableSelectAll": { "alias": "disableSelectAll"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "options": { "alias": "options"; "required": false; }; "grouped": { "alias": "grouped"; "required": false; "isSignal": true; }; "selectGroupLabel": { "alias": "selectGroupLabel"; "required": false; "isSignal": true; }; "selectGroupOptions": { "alias": "selectGroupOptions"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "selectValue": { "alias": "selectValue"; "required": false; "isSignal": true; }; "selectLabel": { "alias": "selectLabel"; "required": false; "isSignal": true; }; "selectDisabled": { "alias": "selectDisabled"; "required": false; "isSignal": true; }; "panelGrow": { "alias": "panelGrow"; "required": false; "isSignal": true; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; "isSignal": true; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; "isSignal": true; }; }, { "openedChange": "openedChange"; "_openedStream": "opened"; "_closedStream": "closed"; "selectionChange": "selectionChange"; "focusOut": "focusOut"; "filterChanges": "filterInput"; }, never, never, true, never>; } export declare class NxDropdownModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export declare function getPositions(appearance: AppearanceType, offsetY: number): ConnectionPositionPair[]; export declare function getOverlayOffsetYForOutlineAppearance(origin: CdkOverlayOrigin | ElementRef): number; export declare function getOverlayOffsetYForNonOutlineAppearance(dropdownElement: Element, formFieldElement: Element, panelHeaderElement: Element | null): number; /** * Directive for select text from current focus element */ export declare class SelectOnFocusDirective { private readonly elementRef; constructor(elementRef: ElementRef); handleFocus(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export {};