import { IObservable, IObservableArrayEventArgs, ObservableArrayAction } from '../Core/Observable'; import { IDropdownPivot } from '../Dropdown'; import { IListBoxItem } from '../ListBox'; import { IItemProvider } from '../Utilities/Provider'; export declare class PivotItemProvider implements IItemProvider>, IObservable>, ObservableArrayAction> { private listItems; private internalPivots; /** * Create a Provider that arranges IListBoxItems in different pivots. * @param pivots */ constructor(pivots: IDropdownPivot[]); /** * Get the array of pivots. */ readonly pivots: IDropdownPivot[]; /** * Get the length of the listItems array. */ readonly length: number; /** * Get the interal array of listItems. */ readonly value: IListBoxItem[]; /** * 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 items to the end of whichever pivot they belong to. * @param pivotId the id of the pivot to operate on. * @param items a list of items to add. */ push(pivotId: string, ...items: IListBoxItem[]): number; /** * Remove the last item in the pivot's item set and return it. * @param pivotId the id of the pivot to operate on. */ pop(pivotId: string): IListBoxItem | undefined; /** * Remove all items that match the given filter from a pivot's item set. * @param pivotId the id of the pivot to operate on. * @param filter the filter function to run on all items. If this returns true, the item will be deleted. */ removeAll(pivotId: string, filter?: (item: IListBoxItem) => boolean): IListBoxItem[]; /** * Remove and add items from a pivot's item set using a provided index. * @param pivotId the id of the pivot to operate on. * @param start the index to start insertion and deletion. * @param deleteCount the number of items to delete. * @param itemsToAdd the items to insert at the start index. */ splice(pivotId: string, start: number, deleteCount: number, ...itemsToAdd: IListBoxItem[]): IListBoxItem[]; }