jitz-sharepoint-utilities 2.0.21 → 2.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -39,6 +39,7 @@ export interface IJitzPeoplePickerProps {
|
|
|
39
39
|
errorMessage?: string;
|
|
40
40
|
errorCss?: string;
|
|
41
41
|
multiSelect: boolean;
|
|
42
|
+
placeholderText?: string;
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
export class JitzPeoplePicker extends React.Component<
|
|
@@ -113,6 +114,7 @@ export class JitzPeoplePicker extends React.Component<
|
|
|
113
114
|
<NormalPeoplePicker
|
|
114
115
|
onChange={this._onChange.bind(this)}
|
|
115
116
|
disabled={this.state.disabled}
|
|
117
|
+
inputProps={{ placeholder: this.props.placeholderText || "" }}
|
|
116
118
|
onResolveSuggestions={this._onFilterChanged}
|
|
117
119
|
getTextFromItem={(persona: IPersonaProps) =>
|
|
118
120
|
persona.primaryText || ""
|
|
@@ -136,6 +138,7 @@ export class JitzPeoplePicker extends React.Component<
|
|
|
136
138
|
onChange={this._onChange.bind(this)}
|
|
137
139
|
onResolveSuggestions={this._onFilterChanged}
|
|
138
140
|
disabled={this.state.disabled}
|
|
141
|
+
inputProps={{ placeholder: this.props.placeholderText || "" }}
|
|
139
142
|
getTextFromItem={(persona: IPersonaProps) =>
|
|
140
143
|
persona.primaryText || ""
|
|
141
144
|
}
|
|
@@ -208,7 +211,8 @@ export class JitzPeoplePicker extends React.Component<
|
|
|
208
211
|
);
|
|
209
212
|
pers.imageUrl = UtilityService.getProfilePictureUrl(
|
|
210
213
|
this.props.hostSiteUrl || this.props.context.siteUrl,
|
|
211
|
-
pers.User.Email || ""
|
|
214
|
+
pers.User.Email || "",
|
|
215
|
+
"1"
|
|
212
216
|
);
|
|
213
217
|
// (this.props.hostSiteUrl || this.props.context.siteUrl) +
|
|
214
218
|
// `/_layouts/15/userphoto.aspx?size=S&accountname=${pers.User.Email}`;
|
|
@@ -312,7 +316,8 @@ export class JitzPeoplePicker extends React.Component<
|
|
|
312
316
|
persons[index].User.Email ||
|
|
313
317
|
persons[index].User.Key.substr(
|
|
314
318
|
persons[index].User.Key.lastIndexOf("|") + 1
|
|
315
|
-
)
|
|
319
|
+
),
|
|
320
|
+
"1"
|
|
316
321
|
);
|
|
317
322
|
// (this.props.hostSiteUrl || this.props.context.siteUrl) +
|
|
318
323
|
// `/_layouts/15/userphoto.aspx?size=S&accountname=${
|
|
@@ -81,7 +81,8 @@ export class JitzPersonInfo extends React.Component<
|
|
|
81
81
|
const userDetails = {
|
|
82
82
|
imageUrl: UtilityService.getProfilePictureUrl(
|
|
83
83
|
this.props.siteUrl || this.props.context!.siteUrl,
|
|
84
|
-
this.props.email || this.state.user.email || ""
|
|
84
|
+
this.props.email || this.state.user.email || "",
|
|
85
|
+
"1"
|
|
85
86
|
),
|
|
86
87
|
// this.props.imageUrl ||
|
|
87
88
|
// (this.props.siteUrl || this.props.context!.siteUrl) +
|
|
@@ -17,6 +17,7 @@ export interface IJitzPeoplePickerProps {
|
|
|
17
17
|
errorMessage?: string;
|
|
18
18
|
errorCss?: string;
|
|
19
19
|
multiSelect: boolean;
|
|
20
|
+
placeholderText?: string;
|
|
20
21
|
}
|
|
21
22
|
export declare class JitzPeoplePicker extends React.Component<IJitzPeoplePickerProps, IJitzPeoplePickerState> {
|
|
22
23
|
private _peopleList;
|
|
@@ -74,7 +74,7 @@ var JitzPeoplePicker = /** @class */ (function (_super) {
|
|
|
74
74
|
})
|
|
75
75
|
.then(function (res) {
|
|
76
76
|
var pers = new IObjects_1.SharePointUserPersona(res);
|
|
77
|
-
pers.imageUrl = UtilityService_1.default.getProfilePictureUrl(_this.props.hostSiteUrl || _this.props.context.siteUrl, pers.User.Email || "");
|
|
77
|
+
pers.imageUrl = UtilityService_1.default.getProfilePictureUrl(_this.props.hostSiteUrl || _this.props.context.siteUrl, pers.User.Email || "", "1");
|
|
78
78
|
// (this.props.hostSiteUrl || this.props.context.siteUrl) +
|
|
79
79
|
// `/_layouts/15/userphoto.aspx?size=S&accountname=${pers.User.Email}`;
|
|
80
80
|
var prepopulatedItems = _this.state.selectedItems;
|
|
@@ -128,7 +128,7 @@ var JitzPeoplePicker = /** @class */ (function (_super) {
|
|
|
128
128
|
};
|
|
129
129
|
JitzPeoplePicker.prototype.render = function () {
|
|
130
130
|
if (this.props.typePicker == "Normal") {
|
|
131
|
-
return (React.createElement(react_1.NormalPeoplePicker, { onChange: this._onChange.bind(this), disabled: this.state.disabled, onResolveSuggestions: this._onFilterChanged, getTextFromItem: function (persona) {
|
|
131
|
+
return (React.createElement(react_1.NormalPeoplePicker, { onChange: this._onChange.bind(this), disabled: this.state.disabled, inputProps: { placeholder: this.props.placeholderText || "" }, onResolveSuggestions: this._onFilterChanged, getTextFromItem: function (persona) {
|
|
132
132
|
return persona.primaryText || "";
|
|
133
133
|
}, pickerSuggestionsProps: suggestionProps, selectedItems: this.state.selectedItems, className: "ms-PeoplePicker " +
|
|
134
134
|
(this.props.errorMessage != null &&
|
|
@@ -138,7 +138,7 @@ var JitzPeoplePicker = /** @class */ (function (_super) {
|
|
|
138
138
|
: ""), key: "normal" }));
|
|
139
139
|
}
|
|
140
140
|
else {
|
|
141
|
-
return (React.createElement(react_1.CompactPeoplePicker, { onChange: this._onChange.bind(this), onResolveSuggestions: this._onFilterChanged, disabled: this.state.disabled, getTextFromItem: function (persona) {
|
|
141
|
+
return (React.createElement(react_1.CompactPeoplePicker, { onChange: this._onChange.bind(this), onResolveSuggestions: this._onFilterChanged, disabled: this.state.disabled, inputProps: { placeholder: this.props.placeholderText || "" }, getTextFromItem: function (persona) {
|
|
142
142
|
return persona.primaryText || "";
|
|
143
143
|
}, pickerSuggestionsProps: suggestionProps, selectedItems: this.state.selectedItems, className: "ms-PeoplePicker" +
|
|
144
144
|
(this.props.errorMessage != null &&
|
|
@@ -228,7 +228,7 @@ var JitzPeoplePicker = /** @class */ (function (_super) {
|
|
|
228
228
|
var persons = userQueryResults.map(function (p) { return new IObjects_1.SharePointUserPersona(p); });
|
|
229
229
|
persons.map(function (p, index) {
|
|
230
230
|
persons[index].imageUrl = UtilityService_1.default.getProfilePictureUrl(_this.props.hostSiteUrl || _this.props.context.siteUrl, persons[index].User.Email ||
|
|
231
|
-
persons[index].User.Key.substr(persons[index].User.Key.lastIndexOf("|") + 1));
|
|
231
|
+
persons[index].User.Key.substr(persons[index].User.Key.lastIndexOf("|") + 1), "1");
|
|
232
232
|
// (this.props.hostSiteUrl || this.props.context.siteUrl) +
|
|
233
233
|
// `/_layouts/15/userphoto.aspx?size=S&accountname=${
|
|
234
234
|
// persons[index].User.Email ||
|
|
@@ -71,7 +71,7 @@ var JitzPersonInfo = /** @class */ (function (_super) {
|
|
|
71
71
|
JitzPersonInfo.prototype.render = function () {
|
|
72
72
|
// const userDetails = this.state.user;
|
|
73
73
|
var userDetails = {
|
|
74
|
-
imageUrl: UtilityService_1.default.getProfilePictureUrl(this.props.siteUrl || this.props.context.siteUrl, this.props.email || this.state.user.email || ""),
|
|
74
|
+
imageUrl: UtilityService_1.default.getProfilePictureUrl(this.props.siteUrl || this.props.context.siteUrl, this.props.email || this.state.user.email || "", "1"),
|
|
75
75
|
// this.props.imageUrl ||
|
|
76
76
|
// (this.props.siteUrl || this.props.context!.siteUrl) +
|
|
77
77
|
// `/_layouts/15/userphoto.aspx?size=${
|