import "../../CommonImports"; import "../../Core/core.css"; import "./Dropdown.css"; import * as React from "react"; import { ObservableArray, ObservableValue } from '../../Core/Observable'; import { IExpandable } from '../../Expandable'; import { FilteredListSelection, IListSelection } from '../../List'; import { getUnselectableRanges, IListBoxItem } from '../../ListBox'; import { ITableColumn } from '../../Table'; import { IFocusable } from '../../Utilities/Focus'; import { IDropdownProps, IFilterResults } from "./Dropdown.Props"; import { DropdownCallout } from "./DropdownCallout"; import { DropdownExpandableTextField } from "./DropdownExpandableTextField"; interface IDropdownState { expanded: ObservableValue; props: IDropdownProps; wrappedItems?: IListBoxItem[]; filteredSelection: FilteredListSelection; filterText: ObservableValue; filteredItems: ObservableArray>; } export declare class Dropdown extends React.Component, IDropdownState> implements IExpandable, IFocusable<{}> { static defaultProps: { filterByText: boolean; filterItem: typeof filterItemByText; getUnselectableRanges: typeof getUnselectableRanges; renderCallout: typeof DropdownCallout; renderExpandable: typeof DropdownExpandableTextField; renderSelectedItems: typeof renderDropdownSelectedItemText; }; static getDerivedStateFromProps(props: IDropdownProps, state: IDropdownState): { props: IDropdownProps; wrappedItems: IListBoxItem[]; expanded: ObservableValue; filteredSelection: FilteredListSelection; filterText: ObservableValue; filteredItems: ObservableArray>; }; private expandable; private expandableContainer; private filterText; private parentSelection; private timerManagement; constructor(props: IDropdownProps); componentDidMount(): void; render(): JSX.Element; collapse: () => void; expand: () => void; focus(): void; private onDismiss; private onExpand; private onCollapse; private onActivate; private onFilterTextChanged; private onSelect; private selectionChanged; private renderCallout; private updateFilteredItems; private debouncedUpdateFilteredItems; } export declare function filterItemByText(filterText: string, item: IListBoxItem<{}>): boolean; export declare function filterItemByTextStartsWith(filterText: string, item: IListBoxItem<{}>): boolean; export declare function renderDropdownSelectedItemText(selection: IListSelection, items: IListBoxItem<{}>[]): string; export declare function filterItems(items: IListBoxItem[], filterTextValue: string, currentFilteredIndexMap?: number[], filterItem?: (filterText: string, item: IListBoxItem, items: IListBoxItem[]) => boolean | number[], startsWithSort?: boolean): { filteredItems: IListBoxItem[]; filteredIndexMap: number[]; filterMatches: number[][]; }; /** * Filter the tree of items using user-entered text. Include all items with text matching * the filter and all their predecessors and descendants in the tree. * @returns items matching filter and all their predecessors and descendants in the tree, and the index of the first actual match (since we're returning predecessors) */ export declare function filterTreeItems(items: IListBoxItem[], filterText: string, currentFilteredIndexMap?: number[], filterItem?: (filterText: string, item: IListBoxItem, items: IListBoxItem[]) => boolean | number[], filterMatchedItem?: (item: IListBoxItem) => boolean): [IFilterResults, number]; export declare function filterMatchedItemByListboxType(item: IListBoxItem): boolean; export declare function renderHighlightedText(rowIndex: number, columnIndex: number, tableColumn: ITableColumn, tableItem: IListBoxItem, filterResults?: number[]): JSX.Element; export declare function getHighlightedText(text: string, matchingIndices: number[], className?: string): JSX.Element; export {};