import { CoinSize as PersonaSize } from '../../Coin'; export { CoinSize as PersonaSize } from '../../Coin'; export interface IIdentityConnections { directReports?: IIdentity[]; successors?: IIdentity[]; managers?: IIdentity[]; } export interface IIdentity { active?: boolean; department?: string; description?: string; displayName?: string; entityId: string; entityType: string; guest?: boolean; image?: string; isHosted?: boolean; isMru?: boolean; jobTitle?: string; localDirectory?: string; localId?: string; mail?: string; mailNickname?: string; manager?: string; originDirectory: string; originId: string; physicalDeliveryOfficeName?: string; samAccountName?: string; scopeName?: string; signInAddress?: string; subjectDescriptor?: string; surname?: string; telephoneNumber?: string; } export interface IBasicIdentityRef { /** * Display name of the identity */ displayName: string; /** * Unique ID that the PersonaProvider can be used to look up complete information for the identity */ id: string; /** * Identity image url */ imageUrl?: string; } export interface IIdentityDetailsProvider { /** * Request connection information about a given Entity. */ onRequestConnectionInformation: (entity: IIdentity, getDirectReports?: boolean) => IIdentityConnections | PromiseLike; /** * Request Entity information given an entityId */ getEntityFromUniqueAttribute: (entityId: string) => IIdentity | PromiseLike; } export interface IPersonaProvider extends IIdentityDetailsProvider { renderIdentityCard?: (identity: IIdentity | IBasicIdentityRef, personaDetailsProvider: IIdentityDetailsProvider, onDismissCallback: () => void, target: HTMLElement | undefined) => void; } export interface IPeoplePickerProvider extends IIdentityDetailsProvider { /** * Add identities to the MRU * @returns A promise that returns true if successful false otherwise */ addIdentitiesToMRU?: (identities: IIdentity[]) => Promise; /** * Given a list of currently selected items and a filter string, return a list of suggestions to put in the suggestion list */ onFilterIdentities: (filter: string, selectedItems?: IIdentity[]) => IIdentity[] | PromiseLike | null; /** * If no input is in the search box when clicked, provide a set of identities to show (used for MRU) */ onEmptyInputFocus?: () => IIdentity[] | PromiseLike | null; /** * Add identities to the MRU * @returns A promise that returns true if successful false otherwise */ removeIdentitiesFromMRU?: (identities: IIdentity[]) => Promise; } /** * Props for Persona */ export interface IPersonaProps { /** * Sets aria-hidden for the persona * * @default false */ ariaHidden?: boolean; /** * ClassName of the persona */ className?: string; /** * Size of image to display. Use IdentitySize presets. */ size?: PersonaSize; /** * Identity to show the coin from. */ identity: IIdentity | IBasicIdentityRef; /** *Provides information about an identity. */ personaProvider?: IPersonaProvider; }