Skip to content

Commit c198454

Browse files
authored
Merge pull request pnp#172 from SharePoint/dev
Merge for v1.10.0 release
2 parents b54fda7 + c36799c commit c198454

36 files changed

+1710
-160
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defaults: &defaults
22
working_directory: ~/sp-dev-fx-controls-react
33
docker:
4-
- image: circleci/node:6.11.5
4+
- image: circleci/node:8.9.1
55

66
version: 2
77
jobs:

CHANGELOG.JSON

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
{
22
"versions": [
3+
{
4+
"version": "1.10.0",
5+
"changes": {
6+
"new": [
7+
"`ListItemPicker`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)"
8+
],
9+
"enhancements": [
10+
"Dutch localization added [#100](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/100)",
11+
"German localization added [#101](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/101)",
12+
"French localization added [#102](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/102)",
13+
"`PeoplePicker`: Move defaultSelectedUsers from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/135)",
14+
"`PeoplePicker`: Initialize with users from a list item [#138](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/138)",
15+
"`PeoplePicker`: Remove Messagebar error handling to match Office UI Fabric field error styling [#140](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/140)",
16+
"`PeoplePicker`: REST API filter and nometadata header added to reduce payload [#139](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/139)",
17+
"`PeoplePicker`: Allow to set the maximum number of suggestions `suggestionsLimit` [#143](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/143) [#148](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/148)",
18+
"`TaxonomyPicker`: retreiving the terms in the correct custom sort order [#146](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/146)",
19+
"`PeoplePicker`: Documentation format updated to make it easier to check the default values [#159](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/159)"
20+
],
21+
"fixes": []
22+
},
23+
"contributions": [
24+
"[Marc D Anderson](https://github.com/sympmarc)",
25+
"[Ole Bergtun](https://github.com/trillian74)",
26+
"[João Mendes](https://github.com/joaojmendes)",
27+
"[Markus Möller](https://github.com/mmsharepoint)",
28+
"[Asish Padhy](https://github.com/AsishP)",
29+
"[PooLP](https://github.com/PooLP)",
30+
"[Gautam Sheth](https://github.com/gautamdsheth)",
31+
"[Tse Kit Yam](https://github.com/tsekityam)"
32+
]
33+
},
334
{
435
"version": "1.9.0",
536
"changes": {

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Releases
22

3+
## 1.10.0
4+
5+
**New control(s)**
6+
7+
- `ListItemPicker`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)
8+
9+
**Enhancements**
10+
11+
- Dutch localization added [#100](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/100)
12+
- German localization added [#101](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/101)
13+
- French localization added [#102](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/102)
14+
- `PeoplePicker`: Move defaultSelectedUsers from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/135)
15+
- `PeoplePicker`: Initialize with users from a list item [#138](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/138)
16+
- `PeoplePicker`: Remove Messagebar error handling to match Office UI Fabric field error styling [#140](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/140)
17+
- `PeoplePicker`: REST API filter and nometadata header added to reduce payload [#139](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/139)
18+
- `PeoplePicker`: Allow to set the maximum number of suggestions `suggestionsLimit` [#143](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/143) [#148](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/148)
19+
- `TaxonomyPicker`: retreiving the terms in the correct custom sort order [#146](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/146)
20+
- `PeoplePicker`: Documentation format updated to make it easier to check the default values [#159](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/159)
21+
22+
### Contributors
23+
24+
Special thanks to our contributors (in alphabetical order): [Marc D Anderson](https://github.com/sympmarc), [Ole Bergtun](https://github.com/trillian74), [João Mendes](https://github.com/joaojmendes), [Markus Möller](https://github.com/mmsharepoint), [Asish Padhy](https://github.com/AsishP), [PooLP](https://github.com/PooLP), [Gautam Sheth](https://github.com/gautamdsheth), [Tse Kit Yam](https://github.com/tsekityam).
25+
326
## 1.9.0
427

528
**Enhancements**
@@ -12,6 +35,10 @@
1235
- `IFrameDialog`: Unnecessary horizontal scroll in IFrame dialog [#132](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/132)
1336
- `PeoplePicker`: Suggested People not loading after first selection [#134](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/134)
1437

38+
### Contributors
39+
40+
Special thanks to our contributors (in alphabetical order): [Gautam Sheth](https://github.com/gautamdsheth), [Alex Terentiev](https://github.com/AJIXuMuK).
41+
1542
## 1.8.0
1643

1744
**Enhancements**
@@ -32,6 +59,10 @@
3259
- `IFrameDialog`: dialog width is not correct in IE11 [#118](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/118)
3360
- `PeoplePicker`: fix freezes when typing in search values [#117](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/117)
3461

62+
### Contributors
63+
64+
Special thanks to our contributors (in alphabetical order): [Thomas Lamb](https://github.com/ThomasLamb), [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mikael Svenson](https://github.com/wobba), [Alex Terentiev](https://github.com/AJIXuMuK).
65+
3566
## 1.7.0
3667

3768
**Enhancements**
@@ -45,6 +76,10 @@
4576

4677
- `FieldNameRenderer` onClick does not suppress default link behavior [#103](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/103)
4778

79+
### Contributors
80+
81+
Special thanks to our contributors (in alphabetical order): Octavie van Haaften, Asish Padhy, Mikael Svenson, Alex Terentiev.
82+
4883
## 1.6.0
4984

5085
**Enhancements**
@@ -56,6 +91,10 @@
5691
- New telemetry approach which allows you to use Application Insights [#81](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/81)
5792
- PeoplePicker property selectedItems not implemented? [#90](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/90)
5893

94+
### Contributors
95+
96+
Special thanks to our contributor: Octavie van Haaften.
97+
5998
## 1.5.0
6099

61100
**New control(s)**
@@ -72,6 +111,10 @@
72111
- `FieldUserRenderer` uses email prop for `GetPropertiesFor` [#84](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/84)
73112
- Fixed issue in single selection mode when all group items were selected in the `ListView` when user clicked on the group header [#86](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/86)
74113

114+
### Contributors
115+
116+
Special thanks to our contributors (in alphabetical order): Asish Padhy, Alex Terentiev.
117+
75118
## 1.4.0
76119

77120
**New control(s)**

docs/documentation/docs/about/release-notes.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Releases
22

3+
## 1.10.0
4+
5+
**New control(s)**
6+
7+
- `ListItemPicker`: New field control [#165](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/165)
8+
9+
**Enhancements**
10+
11+
- Dutch localization added [#100](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/100)
12+
- German localization added [#101](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/101)
13+
- French localization added [#102](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/102)
14+
- `PeoplePicker`: Move defaultSelectedUsers from ComponentWillMount to ComponentDidUpdate Lifecycle [#135](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/135)
15+
- `PeoplePicker`: Initialize with users from a list item [#138](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/138)
16+
- `PeoplePicker`: Remove Messagebar error handling to match Office UI Fabric field error styling [#140](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/140)
17+
- `PeoplePicker`: REST API filter and nometadata header added to reduce payload [#139](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/139)
18+
- `PeoplePicker`: Allow to set the maximum number of suggestions `suggestionsLimit` [#143](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/143) [#148](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/148)
19+
- `TaxonomyPicker`: retreiving the terms in the correct custom sort order [#146](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/146)
20+
- `PeoplePicker`: Documentation format updated to make it easier to check the default values [#159](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/159)
21+
22+
### Contributors
23+
24+
Special thanks to our contributors (in alphabetical order): [Marc D Anderson](https://github.com/sympmarc), [Ole Bergtun](https://github.com/trillian74), [João Mendes](https://github.com/joaojmendes), [Markus Möller](https://github.com/mmsharepoint), [Asish Padhy](https://github.com/AsishP), [PooLP](https://github.com/PooLP), [Gautam Sheth](https://github.com/gautamdsheth), [Tse Kit Yam](https://github.com/tsekityam).
25+
326
## 1.9.0
427

528
**Enhancements**
@@ -12,6 +35,10 @@
1235
- `IFrameDialog`: Unnecessary horizontal scroll in IFrame dialog [#132](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/132)
1336
- `PeoplePicker`: Suggested People not loading after first selection [#134](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/134)
1437

38+
### Contributors
39+
40+
Special thanks to our contributors (in alphabetical order): [Gautam Sheth](https://github.com/gautamdsheth), [Alex Terentiev](https://github.com/AJIXuMuK).
41+
1542
## 1.8.0
1643

1744
**Enhancements**
@@ -32,6 +59,10 @@
3259
- `IFrameDialog`: dialog width is not correct in IE11 [#118](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/118)
3360
- `PeoplePicker`: fix freezes when typing in search values [#117](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/117)
3461

62+
### Contributors
63+
64+
Special thanks to our contributors (in alphabetical order): [Thomas Lamb](https://github.com/ThomasLamb), [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mikael Svenson](https://github.com/wobba), [Alex Terentiev](https://github.com/AJIXuMuK).
65+
3566
## 1.7.0
3667

3768
**Enhancements**
@@ -45,6 +76,10 @@
4576

4677
- `FieldNameRenderer` onClick does not suppress default link behavior [#103](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/103)
4778

79+
### Contributors
80+
81+
Special thanks to our contributors (in alphabetical order): Octavie van Haaften, Asish Padhy, Mikael Svenson, Alex Terentiev.
82+
4883
## 1.6.0
4984

5085
**Enhancements**
@@ -56,6 +91,10 @@
5691
- New telemetry approach which allows you to use Application Insights [#81](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/81)
5792
- PeoplePicker property selectedItems not implemented? [#90](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/90)
5893

94+
### Contributors
95+
96+
Special thanks to our contributor: Octavie van Haaften.
97+
5998
## 1.5.0
6099

61100
**New control(s)**
@@ -72,6 +111,10 @@
72111
- `FieldUserRenderer` uses email prop for `GetPropertiesFor` [#84](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/84)
73112
- Fixed issue in single selection mode when all group items were selected in the `ListView` when user clicked on the group header [#86](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/86)
74113

114+
### Contributors
115+
116+
Special thanks to our contributors (in alphabetical order): Asish Padhy, Alex Terentiev.
117+
75118
## 1.4.0
76119

77120
**New control(s)**
Loading
Loading
Loading
Loading
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# ListItemPicker control
2+
3+
This control allows you to select one or more items from a list. The item selection is based from a column value. The control will suggest items based on the inserted value.
4+
5+
Here is an example of the control:
6+
7+
![ListItemPicker select list items](../assets/ListItemPicker-selectlist.png)
8+
9+
![ListItemPicker select list items](../assets/ListItemPicker-selectlist2.png)
10+
11+
![ListItemPicker selected Items](../assets/ListItemPicker-selectedItems.png)
12+
13+
## How to use this control in your solutions
14+
15+
- Check that you installed the `@pnp/spfx-controls-react` dependency. Check out the [getting started](../#getting-started) page for more information about installing the dependency.
16+
- Import the control into your component:
17+
18+
```TypeScript
19+
import { ListItemPicker } from '@pnp/spfx-controls-react/listItemPicker';
20+
```
21+
- Use the `ListItemPicker` control in your code as follows:
22+
23+
```TypeScript
24+
<ListItemPicker listId='da8daf15-d84f-4ab1-9800-7568f82fed3f'
25+
columnInternalName='Title'
26+
itemLimit={2}
27+
onSelectedItem={this.onSelectedItem}
28+
context={this.props.context} />
29+
```
30+
31+
- The `onSelectedItem` change event returns the list items selected and can be implemented as follows:
32+
33+
```TypeScript
34+
private onSelectedItem(data: { key: string; name: string }[]) {
35+
for (const item of data) {
36+
console.log(`Item value: ${item.name}`);
37+
}
38+
}
39+
```
40+
## Implementation
41+
42+
The `ListItemPicker` control can be configured with the following properties:
43+
44+
45+
| Property | Type | Required | Description |
46+
| ---- | ---- | ---- | ---- |
47+
| columnInternalName | string | yes | InternalName of column to search and get values. |
48+
| context | WebPartContext \| ApplicationCustomizerContext | yes | SPFx web part or extention context |
49+
| listId | string | yes | Guid of the list. |
50+
| itemLimit | number | yes | Number of items which can be selected |
51+
| onSelectItem | (items: any[]) => void | yes | Callback function which returns the selected items. |
52+
| className | string | no | ClassName for the picker. |
53+
| webUrl | string | no | URL of the site. By default it uses the current site URL. |
54+
| defaultSelectedItems | any[] | no | Initial items that have already been selected and should appear in the people picker. |
55+
| suggestionsHeaderText | string | no | The text that should appear at the top of the suggestion box. |
56+
| noResultsFoundText | string | no | The text that should appear when no results are returned. |
57+
| disabled | boolean | no | Specifies if the control is disabled or not. |
58+
59+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/ListItemPicker)

docs/documentation/docs/controls/PeoplePicker.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,27 @@ private _getPeoplePickerItems(items: any[]) {
5252

5353
The People picker control can be configured with the following properties:
5454

55-
| Property | Type | Required | Description |
56-
| ---- | ---- | ---- | ---- |
57-
| context | WebPartContext | yes | Context of the current web part. |
58-
| titleText | string | yes | Text to be displayed on the control |
59-
| groupName | string | no | group from which users are fetched. Leave it blank if need to filter all users |
60-
| personSelectionLimit | number | no | Defines the limit of people that can be selected in the control|
61-
| isRequired | boolean | no | Set if the control is required or not |
62-
| disabled | boolean | no | Set if the control is disabled or not |
63-
| errorMessage | string | no | Specify the error message to display |
64-
| errorMessageclassName | string | no | applies custom styling to the error message section|
65-
| showtooltip | boolean | no | Defines if need a tooltip or not |
66-
| tooltip | string | no | Specify the tooltip message to display |
67-
| tooltipDirectional | DirectionalHint | no | Direction where the tooltip would be shown |
68-
| selectedItems | function | no | get the selected users in the control |
69-
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element |
70-
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only |
71-
| defaultSelectedUsers | string[] | no | Default selected user emails |
72-
| webAbsoluteUrl | string | no | Specify the site URL on which you want to perform the user query call. Default is the current site URL. |
73-
| showHiddenInUI | boolean | no | Show users which are hidden from the UI. By default these users/groups hidden for the UI will not be shown. |
74-
| principleTypes | PrincipleType[] | no | Define which type of data you want to retrieve: User, SharePoint groups, Security groups. Multiple are possible. |
55+
| Property | Type | Required | Description | Default |
56+
| ---- | ---- | ---- | ---- | ---- |
57+
| context | WebPartContext | yes | Context of the current web part. | |
58+
| titleText | string | yes | Text to be displayed on the control | |
59+
| groupName | string | no | group from which users are fetched. Leave it blank if need to filter all users | _none_ |
60+
| personSelectionLimit | number | no | Defines the limit of people that can be selected in the control | |
61+
| isRequired | boolean | no | Set if the control is required or not | false |
62+
| disabled | boolean | no | Set if the control is disabled or not | false |
63+
| errorMessage | string | no | Specify the error message to display | |
64+
| errorMessageClassName | string | no | applies custom styling to the error message section | |
65+
| showtooltip | boolean | no | Defines if need a tooltip or not | false |
66+
| tooltip | string | no | Specify the tooltip message to display | |
67+
| tooltipDirectional | DirectionalHint | no | Direction where the tooltip would be shown | |
68+
| selectedItems | function | no | get the selected users in the control | |
69+
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element | |
70+
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only | |
71+
| defaultSelectedUsers | string[] | no | Default selected user emails | |
72+
| webAbsoluteUrl | string | no | Specify the site URL on which you want to perform the user query call. | Current site URL |
73+
| showHiddenInUI | boolean | no | Show users which are hidden from the UI. By default these users/groups hidden for the UI will not be shown. | false |
74+
| principleTypes | PrincipleType[] | no | Define which type of data you want to retrieve: User, SharePoint groups, Security groups. Multiple are possible. | |
75+
| suggestionsLimit | number | no | Maximum number of suggestions to show in the full suggestion list. | 5 |
7576

7677
Enum `PrincipalType`
7778

0 commit comments

Comments
 (0)