UNPKG

@progress/kendo-angular-listbox

Version:
187 lines (186 loc) 5.85 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, Renderer2 } from '@angular/core'; import { ListBoxSelectionEvent, ListBoxSelectionService } from './selection.service'; import { ItemTemplateDirective } from './item-template.directive'; import { Direction } from './util'; import { ListBoxSize } from './size'; import { ActionName, ListBoxToolbarConfig, Tool } from './toolbar'; import { Button } from '@progress/kendo-angular-buttons'; import { KeyboardNavigationService } from './keyboard-navigation.service'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { SVGIcon } from '@progress/kendo-svg-icons'; import * as i0 from "@angular/core"; /** * Represents the [Kendo UI ListBox component for Angular]({% slug overview_listbox %}). */ export declare class ListBoxComponent implements OnInit, AfterViewInit, OnDestroy { keyboardNavigationService: KeyboardNavigationService; selectionService: ListBoxSelectionService; private hostElement; private renderer; private zone; private localization; private changeDetector; /** * @hidden */ listboxClassName: boolean; /** * @hidden */ direction: Direction; /** * @hidden */ itemTemplate: ItemTemplateDirective; /** * @hidden */ listboxElement: ElementRef; /** * @hidden */ listboxItems: QueryList<any>; /** * @hidden */ toolbarElement: ElementRef; /** * @hidden */ tools: QueryList<Button>; /** * The fields of the data item that provide the text content of the nodes. */ textField: string; /** * The data which will be displayed by the ListBox. */ data: any[]; /** * Sets the size of the component. * * The possible values are: * - `'small'` * - `'medium'` (default) * - `'large'` */ set size(size: ListBoxSize); get size(): ListBoxSize; /** * Sets whether a toolbar should be displayed with the ListBox, as well as what tools and position should be used. */ set toolbar(config: ListBoxToolbarConfig); /** * The value of the aria-label attribute of the Listbox element. */ listboxLabel: string; /** * The value of the aria-label attribute of the Listbox toolbar element. */ listboxToolbarLabel: string; /** * A function which determines if a specific item is disabled. */ itemDisabled: (item: any) => boolean; /** * Fires when the user selects a different ListBox item. Also fires when a node is moved, since that also changes its index. */ selectionChange: EventEmitter<ListBoxSelectionEvent>; /** * Fires when the user clicks a ListBox item. */ actionClick: EventEmitter<ActionName>; /** * @hidden */ getChildListbox: EventEmitter<any>; /** * @hidden */ get listClasses(): string; /** * @hidden */ messageFor(key: string): string; /** * @hidden */ selectedTools: Tool[]; /** * @hidden */ listboxId: string; /** * @hidden */ toolbarId: string; /** * @hidden */ childListbox: ListBoxComponent; /** * @hidden */ parentListbox: ListBoxComponent; /** * @hidden */ caretAltLeftIcon: SVGIcon; /** * @hidden */ caretAltRightIcon: SVGIcon; private localizationSubscription; private _size; private subs; private shouldFireFocusIn; constructor(keyboardNavigationService: KeyboardNavigationService, selectionService: ListBoxSelectionService, hostElement: ElementRef, renderer: Renderer2, zone: NgZone, localization: LocalizationService, changeDetector: ChangeDetectorRef); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** * @hidden */ performAction(actionName: ActionName): void; /** * Programmatically selects a ListBox node. */ selectItem(index: number): void; /** * Programmatically clears the ListBox selection. */ clearSelection(): void; /** * The index of the currently selected item in the ListBox. */ get selectedIndex(): number; /** * @hidden */ get getListboxId(): string; /** * @hidden */ getText(dataItem: any): string; /** * @hidden */ toolIcon(icon: string): string; /** * @hidden */ toolSVGIcon(icon: SVGIcon): SVGIcon; private onClickEvent; private initSubscriptions; private onFocusIn; private setIds; private onDeleteEvent; private setToolbarClass; private setSizingClass; static ɵfac: i0.ɵɵFactoryDeclaration<ListBoxComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<ListBoxComponent, "kendo-listbox", never, { "textField": { "alias": "textField"; "required": false; }; "data": { "alias": "data"; "required": false; }; "size": { "alias": "size"; "required": false; }; "toolbar": { "alias": "toolbar"; "required": false; }; "listboxLabel": { "alias": "listboxLabel"; "required": false; }; "listboxToolbarLabel": { "alias": "listboxToolbarLabel"; "required": false; }; "itemDisabled": { "alias": "itemDisabled"; "required": false; }; }, { "selectionChange": "selectionChange"; "actionClick": "actionClick"; "getChildListbox": "getChildListbox"; }, ["itemTemplate"], never, true, never>; }