import { IObservable, IObservableArrayEventArgs, ObservableArray, ObservableArrayAction } from '../Core/Observable'; import { IListSelection } from '../List'; import { IListBoxItem } from '../ListBox'; import { IItemProvider } from '../Utilities/Provider'; export declare class EditableDropdownItemProvider implements IItemProvider>, IObservable>, ObservableArrayAction> { private itemCollection; private listItems; private extraItem; private internalFilteredIndexMap; private selection; private internalFocusedIndex; /** * Create a Provider that manages focus on rows with a focused class. * @param listItems the current set of filtered items. * @param selection The selection object associstaed with items. */ constructor(listItems: ObservableArray> | IListBoxItem[] | string[], selection: IListSelection); updateFilteredItems(filteredIndexMap: number[]): void; /** * Get the length of the listItems array. */ readonly length: number; /** * Get the interal array of listItems. */ readonly value: IListBoxItem[]; /** * Get the currently focused index in the item set. */ readonly focusedIndex: number; /** * Get the current mapping of filtered items to the complete item set. */ readonly filteredIndexMap: number[]; /** * Return whether or not there is currently an extra item added for a freeform EditableDropdown. */ readonly hasExtraItem: boolean; /** * Subscribe to changes in the underlying set of items. * @param observer the delegate to be called when there are updates. * @param action the action on the set to observe. */ subscribe(observer: (value: IObservableArrayEventArgs>, action?: ObservableArrayAction) => void, action?: ObservableArrayAction): void; /** * Unsubscribe from changes in the underlying set of items. * @param observer the delegate that was used to subscribe. * @param action the action that was used to subsribe. */ unsubscribe(observer: (value: IObservableArrayEventArgs>, action?: ObservableArrayAction) => void, action?: ObservableArrayAction): void; /** * Add a class to the next selectable item to show it as focused. */ focusNextItem(): void; /** * Add a class to the previous selectable item to show it as focused. */ focusPreviousItem(): void; /** * Set the text value currently typed in the EditableDropdown to see if an extra item needs to be added * to represent that value. Only call this if allowFreeform is true. * @param value */ setTextValue(value: string): void; private focusItem; private notifyChange; }