UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

51 lines (50 loc) 2.13 kB
/// <reference types="react" /> import { BaseComponent } from 'office-ui-fabric-react/lib/Utilities'; import { IPersonaProps } from 'office-ui-fabric-react/lib/Persona'; import './PeoplePicker.Types.Example.scss'; export interface IPeoplePickerExampleState { currentPicker?: number | string; delayResults?: boolean; peopleList: IPersonaProps[]; mostRecentlyUsed: IPersonaProps[]; currentSelectedItems?: IPersonaProps[]; } export declare class PeoplePickerTypesExample extends BaseComponent<any, IPeoplePickerExampleState> { private _picker; constructor(props: {}); render(): JSX.Element; private _getTextFromItem(persona); private _renderListPicker(); private _renderNormalPicker(); private _renderCompactPicker(); private _renderPreselectedItemsPicker(); private _renderLimitedSearch(); private _renderProcessSelectionPicker(); private _renderControlledPicker(); private _onItemsChange(items); private _onSetFocusButtonClicked(); private _renderFooterText(); private _onRemoveSuggestion(item); private _onItemSelected(item); private _onFilterChanged(filterText, currentPersonas, limitResults?); private _returnMostRecentlyUsed(currentPersonas); private _returnMostRecentlyUsedWithLimit(currentPersonas); private _onFilterChangedWithLimit(filterText, currentPersonas); private _filterPromise(personasToReturn); private _listContainsPersona(persona, personas); private _filterPersonasByText(filterText); private _doesTextStartWith(text, filterText); private _convertResultsToPromise(results); private _removeDuplicates(personas, possibleDupes); private _toggleDelayResultsChange(toggleState); private _dropDownSelected(option); private _validateInput(input); /** * Takes in the picker input and modifies it in whichever way * the caller wants, i.e. parsing entries copied from Outlook (sample * input: "Aaron Reid <aaron>"). * * @param input The text entered into the picker. */ private _onInputChange(input); }