import * as _angular_core from '@angular/core'; import { InjectionToken, TemplateRef, OnInit, OnDestroy, ElementRef, ViewContainerRef, Injector, PipeTransform } from '@angular/core'; import { MobileMode, MobileModeBase, MobileModeConfig } from '@fundamental-ngx/core/mobile-mode'; import { Subject, Observable } from 'rxjs'; import { FocusableOption, LiveAnnouncer } from '@angular/cdk/a11y'; import { DynamicComponentService, AutoCompleteEvent } from '@fundamental-ngx/cdk/utils'; import * as i2 from '@fundamental-ngx/core/content-density'; import { ContentDensityObserver } from '@fundamental-ngx/core/content-density'; import { ListComponent, ListItemComponent } from '@fundamental-ngx/core/list'; import { PopoverComponent } from '@fundamental-ngx/core/popover'; import { SelectComponent } from '@fundamental-ngx/core/select'; import { SearchComponent, Appearance } from '@fundamental-ngx/core/shared'; import { Shellbar } from '@fundamental-ngx/core/shellbar'; import { BaseComponent, SearchFieldDataSource } from '@fundamental-ngx/platform/shared'; declare const SEARCH_FIELD_COMPONENT: InjectionToken; interface SearchFieldMobileInterface extends MobileMode { inputText: string; isOpenChange: Subject; isOpen: boolean; dialogApprove(): void; dialogDismiss(): void; } interface SearchFieldChildContent { inputFieldTemplate: TemplateRef; suggestionMenuTemplate: TemplateRef; } declare class SearchFieldMobileComponent extends MobileModeBase implements OnInit { /** @hidden */ dialogTemplate: TemplateRef; /** @hidden */ childContent: SearchFieldChildContent | null; /** @hidden */ _inShellbar: boolean; /** @hidden */ constructor(searchFieldComponent: SearchFieldMobileInterface); /** @hidden */ ngOnInit(): void; /** @hidden */ listenChanges(): void; /** @hidden */ _handleDismiss(): void; /** @hidden */ _handleApprove(): void; /** @hidden */ private _open; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface SearchInput { text: string; category: string | null; } interface SuggestionItem { value: string; isHistorical?: string; data?: any; isGroupHeader?: boolean; children?: SuggestionItem[]; searchInScopeText?: string; searchInScopeCounter?: number; searchInScopeCallback?: () => any; showMoreText?: string; showMoreCounter?: number; showMoreCallback?: () => any; } interface ValueLabelItem { value: string; label: string; } interface SearchResultsActionButton { glyph?: string; label?: string; id?: string; callback?: () => any; } declare class SearchFieldSuggestionDirective implements FocusableOption { element: ElementRef; /** @hidden */ constructor(element: ElementRef); /** @hidden */ focus(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class SearchFieldComponent extends BaseComponent implements OnInit, OnDestroy, SearchComponent { elementRef: ElementRef; private readonly _viewContainerRef; private readonly _injector; private readonly _liveAnnouncer; readonly _dynamicComponentService: DynamicComponentService; /** Input change event. */ readonly inputChange: _angular_core.OutputEmitterRef; /** Search submit event. */ readonly searchSubmit: _angular_core.OutputEmitterRef; /** Cancel search event. */ readonly cancelSearch: _angular_core.OutputEmitterRef; /** Open mobile mode event. */ readonly isOpenChange: _angular_core.OutputEmitterRef; /** Event emitted when the advanced filter button is clicked. */ readonly advancedFilterButtonClick: _angular_core.OutputEmitterRef; /** @hidden */ readonly categoryDropdown: _angular_core.Signal; /** @hidden */ readonly categorySelectComponent: _angular_core.Signal | undefined>; /** @hidden */ readonly inputGroup: _angular_core.Signal | undefined>; /** @hidden */ readonly inputField: _angular_core.Signal>; /** @hidden */ readonly inputFieldTemplate: _angular_core.Signal | undefined>; /** @hidden */ readonly suggestionMenuTemplate: _angular_core.Signal | undefined>; /** @hidden */ readonly suggestionList: _angular_core.Signal; /** @hidden */ readonly suggestionItems: _angular_core.Signal; /** @hidden */ readonly listItems: _angular_core.Signal[]>; /** Type of component used to render the categories dropdown. */ readonly categoryMode: _angular_core.ModelSignal<"menu" | "select">; /** Additional appearance configuration. */ readonly appearance: _angular_core.ModelSignal; /** Placeholder text for search input field. */ readonly placeholder: _angular_core.InputSignal; /** Set Mobile Mode */ readonly mobile: _angular_core.InputSignalWithTransform; /** Search Field Mobile configuration */ readonly mobileConfig: _angular_core.InputSignal; /** Whether display Refresh button */ readonly disableRefresh: _angular_core.ModelSignal; /** Whether display search button */ readonly disableSearch: _angular_core.InputSignalWithTransform; /** List of string values to populate suggestion dropdown selection. */ readonly suggestions: _angular_core.InputSignal>; /** Datasource for suggestion list */ readonly dataSource: _angular_core.InputSignal | undefined>; /** Initial input text. */ readonly inputText: _angular_core.ModelSignal; /** List of categories. */ readonly categories: _angular_core.InputSignal; /** Current category, value should be present in categories array */ readonly currentCategory: _angular_core.InputSignal; /** Set label for category dropdown button. */ readonly categoryLabel: _angular_core.InputSignal; /** Hide display of category label */ readonly hideCategoryLabel: _angular_core.InputSignalWithTransform; /** Toggle "loading" mode. */ readonly isLoading: _angular_core.InputSignalWithTransform; /** Whether to always show search button. */ readonly forceSearchButton: _angular_core.ModelSignal; /** Whether to disable the "suggestions found" live announcer. */ readonly disableSuggestionsFoundAnnouncer: _angular_core.InputSignalWithTransform; /** Whether to show the "All" option in the category select. */ readonly showCategoryAllOption: _angular_core.InputSignalWithTransform; /** @hidden */ get searchFieldValue(): SearchInput; /** Title of the initial suggestion, if a suggestion list is displayed. */ readonly initialSuggestionTitle: _angular_core.InputSignal; /** Subline of the initial suggestion, if a suggestion list is displayed. */ readonly initialSuggestionSubline: _angular_core.InputSignal; /** Title of the initial suggestion if the user has entered some text and there are no results to display, and an initial suggestion title should be shown. */ readonly initialSuggestionEmptyTitle: _angular_core.InputSignal; /** Title of the initial suggestion if the user has entered some text and there are no results to display, and an initial suggestion subline should be shown. */ readonly initialSuggestionEmptySubline: _angular_core.InputSignal; /** Subline of the initial suggestion, if a suggestion list is displayed. */ readonly suggestionFooter: _angular_core.InputSignal | null>; /** Template to display when the search results list has no items to display. */ readonly searchResultsEmptyTemplate: _angular_core.InputSignal | null>; /** Options to display when the user has entered a string into the input that returns no results. */ readonly searchResultsEmptyDefaultSuggestions: _angular_core.InputSignal; /** Whether to show the advanced filter button, which emits the event `advancedFilterButtonClick`. If this input is set to true, it will override any other category button settings. */ readonly showAdvancedFilter: _angular_core.InputSignal; /** Whether to allow empty searches when using a data source, meaning all results will be displayed when the search input is empty. */ readonly allowEmptySearch: _angular_core.InputSignal; /** Whether to display a suggestion item as selected after it has been clicked. */ readonly enableSelection: _angular_core.InputSignal; /** Whether to display the busy indicator over the suggestion list. */ readonly suggestionsLoading: _angular_core.InputSignal; /** Title for the busy indicator. */ readonly busyIndicatorTitle: _angular_core.InputSignal; /** Aria value text for the busy indicator. */ readonly busyIndicatorAriaValueText: _angular_core.InputSignal; /** @hidden Focus state */ _isFocused: _angular_core.WritableSignal; /** * Signal list of suggestion items to populate dropdown menu. * @hidden */ dropdownValues: _angular_core.WritableSignal; /** * Currently set category. * @hidden */ _currentCategory: _angular_core.WritableSignal; /** * Whether or not to show category dropdown. This is dependent on length of `categoryValues` property. * @hidden */ _showCategoryDropdown: boolean; /** @hidden */ _inputId: string; /** @hidden */ _submitId: string; /** @hidden */ _menuId: string; /** @hidden */ _refreshId: string; /** @hidden */ _clearId: string; /** @hidden */ _popoverHeaderId: string; /** @hidden */ _popoverBodyId: _angular_core.WritableSignal; /** @hidden */ isOpen: boolean; /** @hidden */ _isRefresh: boolean; /** @hidden */ _isSearchDone: boolean; /** @hidden */ _isSuggestionMenuOpen: _angular_core.WritableSignal; /** @hidden */ autoCompleteSuggestions: SuggestionItem[]; /** @hidden */ _selectedSuggestionItem: SuggestionItem | null; /** @hidden */ _autoCompleteMostRecentSuggestionItem: SuggestionItem; /** @hidden */ _selectedSuggestionItemId: _angular_core.WritableSignal; /** @hidden */ _categorySelectDescription: _angular_core.WritableSignal; /** @hidden */ _actionButtonTabIndex: _angular_core.WritableSignal<0 | -1>; /** @hidden */ protected readonly contentDensityObserver: ContentDensityObserver; /** @hidden */ protected readonly _shellbar: Shellbar | null; /** @hidden */ private _currentSearchSuggestionAnnouncementMessage; /** @hidden */ private _suggestionkeyManager; /** @hidden */ private resolveTranslation; /** @hidden */ private readonly _destroyRef; /** @hidden */ private readonly _dataSourceChanged$; /** @hidden */ private _mobileComponent; /** @hidden */ private _suggestionsSubscription; /** @hidden */ constructor(elementRef: ElementRef, _viewContainerRef: ViewContainerRef, _injector: Injector, _liveAnnouncer: LiveAnnouncer, _dynamicComponentService: DynamicComponentService); /** @hidden */ ngOnInit(): void; /** @hidden */ ngOnDestroy(): void; /** * Focuses the search input field. */ focus(): void; /** Capturing onKeydown of input element */ onKeydown(event: KeyboardEvent): void; /** * Capturing value change in input text field of combobox. * @hidden */ onValueChange(event: string): void; /** * Capturing item selection from dropdown menu of combobox. * @hidden */ onItemClick(event: SuggestionItem | string, suggestionListItem?: ListItemComponent): void; /** * Callback function which gets executed on keyboard enter of input text field. * @hidden */ onSearchSubmit(event?: Event): void; /** * Sets current category. * @hidden */ setCurrentCategory(currentCategory: ValueLabelItem | null): void; /** * Open suggestion menu */ openSuggestionMenu(): void; /** @hidden */ openMobileMode(): void; /** @hidden */ dialogApprove(): void; /** @hidden */ dialogDismiss(): void; /** @hidden */ showDialog(isOpen: boolean): void; /** @hidden */ closeSuggestionMenu(focus?: boolean): void; /** Resets the current category to its initial state. */ resetCategory(): void; /** @hidden */ clearTextInput(): void; /** @hidden Method that handles complete event from auto complete directive, setting the new value, and closing popover */ handleAutoComplete(event: AutoCompleteEvent): void; /** @hidden */ _categorySelectClicked(event: MouseEvent): void; /** @hidden */ _handleInputTabKey(event: Event): void; /** @hidden */ _inputValueMatchesFirstSuggestion(): boolean; /** @hidden */ _focusActionButton(event: Event, suggestion: ListItemComponent): void; /** @hidden */ _focusParentListItem(event: Event, suggestion: ListItemComponent): void; /** @hidden */ _initializeDataSource(dataSource: SearchFieldDataSource): void; /** @hidden helper function needed by template */ _isString(suggestion: string | object): boolean; /** @hidden */ _performButtonClick(event: Event | null, callbackFn: (() => any) | undefined): void; /** @hidden */ _searchResultIsHoveredOrFocusedOrMobile(suggestion: ListItemComponent): boolean; /** @hidden */ _advancedFilterButtonClicked(): void; /** @hidden */ _onlyHeadersFiltered(suggestions: (SuggestionItem | undefined)[]): boolean; /** @hidden */ _inputFocus(): void; /** @hidden */ _handlePopoverKeydown(event: KeyboardEvent): void; /** @hidden */ _autoCompleteDisplayFn: (event: SuggestionItem) => string; /** @hidden */ private _resetKeyManager; /** @hidden */ private _getDomRowOrderIndex; /** * @hidden return count for matching suggestion with input text * @returns number */ private _getSuggestionsLength; /** @hidden */ private _setAriaOwns; /** @hidden */ private _updateSearchAnnouncementText; /** @hidden */ private _setUpMobileMode; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class SuggestionMatchesPipe implements PipeTransform { /** @hidden */ transform(suggestions: SuggestionItem[] | null | undefined, match: string): (SuggestionItem | undefined)[]; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵpipe: _angular_core.ɵɵPipeDeclaration; } /** * @deprecated * Use direct imports of components and directives. */ declare class PlatformSearchFieldModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { PlatformSearchFieldModule, SEARCH_FIELD_COMPONENT, SearchFieldComponent, SearchFieldMobileComponent, SearchFieldSuggestionDirective, SuggestionMatchesPipe }; export type { SearchFieldChildContent, SearchFieldMobileInterface, SearchInput, SearchResultsActionButton, SuggestionItem, ValueLabelItem };