-
Notifications
You must be signed in to change notification settings - Fork 382
/
IPeoplePicker.ts
112 lines (109 loc) · 2.58 KB
/
IPeoplePicker.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import { WebPartContext } from '@microsoft/sp-webpart-base';
import { DirectionalHint } from "office-ui-fabric-react/lib/common/DirectionalHint";
import { IPersonaProps } from "office-ui-fabric-react/lib/components/Persona/Persona.types";
import { PrincipalType } from ".";
/**
* Used to display a placeholder in case of no or temporary content. Button is optional.
*
*/
export interface IPeoplePickerProps {
/**
* Context of the component
*/
context: WebPartContext;
/**
* Text of the Control
*/
titleText: string;
/**
* Web Absolute Url of source site
*/
webAbsoluteUrl?: string;
/**
* Whether the control is enabled or not
*/
disabled?: boolean;
/**
* Name of SharePoint Group
*/
groupName?: string;
/**
* Maximum number of suggestions to show in the full suggestion list. (default: 5)
*/
suggestionsLimit?: number;
/**
* Selection Limit of Control
*/
personSelectionLimit?: number;
/**
* Show or Hide Tooltip
*/
showtooltip? : boolean;
/**
* People Field is mandatory
*/
isRequired? : boolean;
/**
* Mandatory field error message
*/
errorMessage? : string;
/**
* Method to check value of People Picker text
*/
selectedItems?: (items: any[]) => void;
/**
* Tooltip Message
*/
tooltipMessage? : string;
/**
* Directional Hint of tool tip
*/
tooltipDirectional? : DirectionalHint;
/**
* Class Name for the whole People picker control
*/
peoplePickerWPclassName?:string;
/**
* Class Name for the People picker control
*/
peoplePickerCntrlclassName?: string;
/**
* Class Name for the Error Section
*/
errorMessageclassName?: string;
/**
* Default Selected User Emails
*/
defaultSelectedUsers? : string[];
/**
* Show users which are hidden from the UI
*/
showHiddenInUI?: boolean;
/**
* Specify the user / group types to retrieve
*/
principleTypes?: PrincipalType[];
}
export interface IPeoplePickerState {
selectedPersons?: IPersonaProps[];
mostRecentlyUsedPersons: IPersonaProps[];
currentSelectedPersons: IPersonaProps[];
allPersons: IPeoplePickerUserItem[];
delayResults?: boolean;
currentPicker?: number | string;
peoplePersonaMenu?: IPersonaProps[];
peoplePartTitle: string;
peoplePartTooltip : string;
isLoading : boolean;
peopleValidatorText? : string;
showmessageerror: boolean;
}
export interface IPeoplePickerUserItem {
id: string;
imageUrl: string;
imageInitials: string;
text: string; // name
secondaryText: string; // role
tertiaryText: string; // status
optionalText: string; // anything
}