53 lines
2.7 KiB
TypeScript
53 lines
2.7 KiB
TypeScript
import * as React from 'react';
|
|
import { Autofill } from '../../Autofill';
|
|
import { BaseFloatingPicker } from '../../FloatingPicker';
|
|
import { BaseSelectedItemsList } from '../../SelectedItemsList';
|
|
import { Selection } from '../../Selection';
|
|
import type { IBaseExtendedPickerProps, IBaseExtendedPicker } from './BaseExtendedPicker.types';
|
|
import type { IBaseFloatingPickerProps } from '../../FloatingPicker';
|
|
import type { IBaseSelectedItemsListProps } from '../../SelectedItemsList';
|
|
import type { JSXElement } from '@fluentui/utilities';
|
|
export interface IBaseExtendedPickerState<T> {
|
|
queryString: string | null;
|
|
}
|
|
export declare class BaseExtendedPicker<T extends {}, P extends IBaseExtendedPickerProps<T>> extends React.Component<P, IBaseExtendedPickerState<T>> implements IBaseExtendedPicker<T> {
|
|
floatingPicker: React.RefObject<BaseFloatingPicker<T, IBaseFloatingPickerProps<T>> | null>;
|
|
selectedItemsList: React.RefObject<BaseSelectedItemsList<T, IBaseSelectedItemsListProps<T>> | null>;
|
|
protected root: React.RefObject<HTMLDivElement | null>;
|
|
protected input: React.RefObject<Autofill | null>;
|
|
protected selection: Selection;
|
|
constructor(basePickerProps: P);
|
|
get items(): any;
|
|
componentDidMount(): void;
|
|
focus(): void;
|
|
clearInput(): void;
|
|
get inputElement(): HTMLInputElement | null;
|
|
get highlightedItems(): T[];
|
|
render(): JSXElement;
|
|
protected get floatingPickerProps(): IBaseFloatingPickerProps<T>;
|
|
protected get selectedItemsListProps(): IBaseSelectedItemsListProps<T>;
|
|
protected onSelectionChange: () => void;
|
|
protected canAddItems(): boolean;
|
|
protected renderFloatingPicker(): JSXElement;
|
|
protected renderSelectedItemsList(): JSXElement;
|
|
protected onInputChange: (value: string, composing?: boolean) => void;
|
|
protected onInputFocus: (ev: React.FocusEvent<HTMLInputElement | Autofill>) => void;
|
|
protected onInputClick: (ev: React.MouseEvent<HTMLInputElement | Autofill>) => void;
|
|
protected onBackspace: (ev: React.KeyboardEvent<HTMLElement>) => void;
|
|
protected onCopy: (ev: React.ClipboardEvent<HTMLElement>) => void;
|
|
protected onPaste: (ev: React.ClipboardEvent<Autofill | HTMLInputElement>) => void;
|
|
protected _onSuggestionSelected: (item: T) => void;
|
|
protected _onSelectedItemsChanged: () => void;
|
|
/**
|
|
* The floating picker is the source of truth for if the menu has been opened or not.
|
|
*
|
|
* Because this isn't tracked inside the state of this component, we need to
|
|
* force an update here to keep the rendered output that depends on the picker being open
|
|
* in sync with the state
|
|
*
|
|
* Called when the suggestions is shown or closed
|
|
*/
|
|
private _onSuggestionsShownOrHidden;
|
|
private _addProcessedItem;
|
|
}
|