Skip to content

Commit f2e7a46

Browse files
committed
Merge branch 'dev' into adaptive-card-designer-host
2 parents e2fbc3d + 3478d79 commit f2e7a46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+976
-186
lines changed

CHANGELOG.JSON renamed to CHANGELOG.json

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,54 @@
55
"changes": {
66
"new": [
77
"`EnhancedThemeProvider`: Added 'EnhancedThemeProvider' control [#1202](https://github.com/pnp/sp-dev-fx-controls-react/issues/1202)",
8-
"`FieldPicker`: Added `FieldPicker` control [#1219](https://github.com/pnp/sp-dev-fx-controls-react/issues/1219)"
8+
"`FieldPicker`: Added `FieldPicker` control [#1219](https://github.com/pnp/sp-dev-fx-controls-react/issues/1219)",
9+
"`ContentTypePicler`: Added `ContentTypePicker` control [#1220](https://github.com/pnp/sp-dev-fx-controls-react/issues/1220)",
10+
"`ModernAudio`: Added `ModernAudio` control [#1224](https://github.com/pnp/sp-dev-fx-controls-react/issues/1224)"
911
],
1012
"enhancements": [
11-
"`DateTimePicker`: Added button to clear date [#1217](https://github.com/pnp/sp-dev-fx-controls-react/issues/1217)"
13+
"`DateTimePicker`: Added button to clear date [#1217](https://github.com/pnp/sp-dev-fx-controls-react/issues/1217)",
14+
"`Toolbar`: Allow filters on a Toolbar to be controlled externally [#1222](https://github.com/pnp/sp-dev-fx-controls-react/issues/1222)",
15+
"`PeoplePicker`: add new allowUnvalidated option to allow adding non-tenant users [#1232](https://github.com/pnp/sp-dev-fx-controls-react/pull/1232)",
16+
"`DynamicForm`: Add support for `webAbsoluteUrl` [#1244](https://github.com/pnp/sp-dev-fx-controls-react/pull/1244)"
1217
],
1318
"fixes": [
1419
"`Localization`: Updates to English localizations [#1207](https://github.com/pnp/sp-dev-fx-controls-react/issues/1207)",
1520
"`Localization`: Updates to Dutch localizations [#1209](https://github.com/pnp/sp-dev-fx-controls-react/issues/1209)",
16-
"`TaxonomyPicker`: Check if cultureInfo is valid [#1226](https://github.com/pnp/sp-dev-fx-controls-react/issues/1226)"
21+
"`Localization`: Updates to Danish localizations [#1233](https://github.com/pnp/sp-dev-fx-controls-react/pull/1233)",
22+
"`TaxonomyPicker`: Check if cultureInfo is valid [#1226](https://github.com/pnp/sp-dev-fx-controls-react/issues/1226)",
23+
"`FieldCollectionData`: Updated docs to fix duplicated property [#1236](https://github.com/pnp/sp-dev-fx-controls-react/pull/1236)",
24+
"`Changelog`: Fix changelog script by setting CHANGELOG.JSON filename extension to lower case [#1242](https://github.com/pnp/sp-dev-fx-controls-react/pull/1242)",
25+
"`PeoplePicker`: PeoplePicker validation on focus out [#1221](https://github.com/pnp/sp-dev-fx-controls-react/pull/1221)",
26+
"`DynamicForm`: Cannot display lookup value when the source field is not Title [#1215](https://github.com/pnp/sp-dev-fx-controls-react/issues/1215)"
27+
1728
]
1829
},
1930
"contributions": [
2031
"[Annie-Johnson](https://github.com/Annie-Johnson)",
32+
"[Daniel Watford](https://github.com/danwatford)",
2133
"[Dennis Kuhn](https://github.com/DennisKuhn)",
2234
"[Fabio Franzini](https://github.com/fabiofranzini)",
35+
"[Jake Stanger](https://github.com/JakeStanger)",
36+
"[Joseph Halvey](https://github.com/HardluckHalvey)",
37+
"[Markus Möller](https://github.com/mmsharepoint)",
2338
"[Milan Holemans](https://github.com/milanholemans)",
24-
"[Rico van de Ven](https://github.com/RicoNL)"
39+
"[Morten Andersen](https://github.com/spcph)",
40+
"[Rico van de Ven](https://github.com/RicoNL)",
41+
"[ryanexner](https://github.com/ryanexner)",
42+
"[Sergio Villalta](https://github.com/6gal6ler6)"
43+
]
44+
},
45+
{
46+
"version": "3.8.1",
47+
"changes": {
48+
"new": [],
49+
"enhancements": [],
50+
"fixes": [
51+
"`LivePersona`: Fix LivePersona not showing card on hover [#1241](https://github.com/pnp/sp-dev-fx-controls-react/issues/1241)"
52+
]
53+
},
54+
"contributors": [
55+
"[Alexander Kleshcheov](https://github.com/SharePickle)"
2556
]
2657
},
2758
{

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,36 @@
66

77
- `EnhancedThemeProvider`: Added 'EnhancedThemeProvider' control [#1202](https://github.com/pnp/sp-dev-fx-controls-react/issues/1202)
88
- `FieldPicker`: Added `FieldPicker` control [#1219](https://github.com/pnp/sp-dev-fx-controls-react/issues/1219)
9+
- `ContentTypePicler`: Added `ContentTypePicker` control [#1220](https://github.com/pnp/sp-dev-fx-controls-react/issues/1220)
10+
- `ModernAudio`: Added `ModernAudio` control [#1224](https://github.com/pnp/sp-dev-fx-controls-react/issues/1224)
911

1012
### Enhancements
1113

1214
- `DateTimePicker`: Added button to clear date [#1217](https://github.com/pnp/sp-dev-fx-controls-react/issues/1217)
15+
- `Toolbar`: Allow filters on a Toolbar to be controlled externally [#1222](https://github.com/pnp/sp-dev-fx-controls-react/issues/1222)
16+
- `PeoplePicker`: add new allowUnvalidated option to allow adding non-tenant users [#1232](https://github.com/pnp/sp-dev-fx-controls-react/pull/1232)
17+
- `DynamicForm`: Add support for `webAbsoluteUrl` [#1244](https://github.com/pnp/sp-dev-fx-controls-react/pull/1244)
1318

1419
### Fixes
1520

1621
- `Localization`: Updates to English localizations [#1207](https://github.com/pnp/sp-dev-fx-controls-react/issues/1207)
1722
- `Localization`: Updates to Dutch localizations [#1209](https://github.com/pnp/sp-dev-fx-controls-react/issues/1209)
23+
- `Localization`: Updates to Danish localizations [#1233](https://github.com/pnp/sp-dev-fx-controls-react/pull/1233)
1824
- `TaxonomyPicker`: Check if cultureInfo is valid [#1226](https://github.com/pnp/sp-dev-fx-controls-react/issues/1226)
25+
- `FieldCollectionData`: Updated docs to fix duplicated property [#1236](https://github.com/pnp/sp-dev-fx-controls-react/pull/1236)
26+
- `Changelog`: Fix changelog script by setting CHANGELOG.JSON filename extension to lower case [#1242](https://github.com/pnp/sp-dev-fx-controls-react/pull/1242)
27+
- `PeoplePicker`: PeoplePicker validation on focus out [#1221](https://github.com/pnp/sp-dev-fx-controls-react/pull/1221)
28+
- `DynamicForm`: Cannot display lookup value when the source field is not Title [#1215](https://github.com/pnp/sp-dev-fx-controls-react/issues/1215)
1929

2030
### Contributors
2131

22-
Special thanks to our contributors (in alphabetical order): [Annie-Johnson](https://github.com/Annie-Johnson), [Dennis Kuhn](https://github.com/DennisKuhn), [Fabio Franzini](https://github.com/fabiofranzini), [Milan Holemans](https://github.com/milanholemans), [Rico van de Ven](https://github.com/RicoNL).
32+
Special thanks to our contributors (in alphabetical order): [Annie-Johnson](https://github.com/Annie-Johnson), [Daniel Watford](https://github.com/danwatford), [Dennis Kuhn](https://github.com/DennisKuhn), [Fabio Franzini](https://github.com/fabiofranzini), [Jake Stanger](https://github.com/JakeStanger), [Joseph Halvey](https://github.com/HardluckHalvey), [Markus Möller](https://github.com/mmsharepoint), [Milan Holemans](https://github.com/milanholemans), [Morten Andersen](https://github.com/spcph), [Rico van de Ven](https://github.com/RicoNL), [ryanexner](https://github.com/ryanexner), [Sergio Villalta](https://github.com/6gal6ler6).
33+
34+
## 3.8.1
35+
36+
### Fixes
37+
38+
- `LivePersona`: Fix LivePersona not showing card on hover [#1241](https://github.com/pnp/sp-dev-fx-controls-react/issues/1241)
2339

2440
## 3.8.0
2541

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,36 @@
66

77
- `EnhancedThemeProvider`: Added 'EnhancedThemeProvider' control [#1202](https://github.com/pnp/sp-dev-fx-controls-react/issues/1202)
88
- `FieldPicker`: Added `FieldPicker` control [#1219](https://github.com/pnp/sp-dev-fx-controls-react/issues/1219)
9+
- `ContentTypePicler`: Added `ContentTypePicker` control [#1220](https://github.com/pnp/sp-dev-fx-controls-react/issues/1220)
10+
- `ModernAudio`: Added `ModernAudio` control [#1224](https://github.com/pnp/sp-dev-fx-controls-react/issues/1224)
911

1012
### Enhancements
1113

1214
- `DateTimePicker`: Added button to clear date [#1217](https://github.com/pnp/sp-dev-fx-controls-react/issues/1217)
15+
- `Toolbar`: Allow filters on a Toolbar to be controlled externally [#1222](https://github.com/pnp/sp-dev-fx-controls-react/issues/1222)
16+
- `PeoplePicker`: add new allowUnvalidated option to allow adding non-tenant users [#1232](https://github.com/pnp/sp-dev-fx-controls-react/pull/1232)
17+
- `DynamicForm`: Add support for `webAbsoluteUrl` [#1244](https://github.com/pnp/sp-dev-fx-controls-react/pull/1244)
1318

1419
### Fixes
1520

1621
- `Localization`: Updates to English localizations [#1207](https://github.com/pnp/sp-dev-fx-controls-react/issues/1207)
1722
- `Localization`: Updates to Dutch localizations [#1209](https://github.com/pnp/sp-dev-fx-controls-react/issues/1209)
23+
- `Localization`: Updates to Danish localizations [#1233](https://github.com/pnp/sp-dev-fx-controls-react/pull/1233)
1824
- `TaxonomyPicker`: Check if cultureInfo is valid [#1226](https://github.com/pnp/sp-dev-fx-controls-react/issues/1226)
25+
- `FieldCollectionData`: Updated docs to fix duplicated property [#1236](https://github.com/pnp/sp-dev-fx-controls-react/pull/1236)
26+
- `Changelog`: Fix changelog script by setting CHANGELOG.JSON filename extension to lower case [#1242](https://github.com/pnp/sp-dev-fx-controls-react/pull/1242)
27+
- `PeoplePicker`: PeoplePicker validation on focus out [#1221](https://github.com/pnp/sp-dev-fx-controls-react/pull/1221)
28+
- `DynamicForm`: Cannot display lookup value when the source field is not Title [#1215](https://github.com/pnp/sp-dev-fx-controls-react/issues/1215)
1929

2030
### Contributors
2131

22-
Special thanks to our contributors (in alphabetical order): [Annie-Johnson](https://github.com/Annie-Johnson), [Dennis Kuhn](https://github.com/DennisKuhn), [Fabio Franzini](https://github.com/fabiofranzini), [Milan Holemans](https://github.com/milanholemans), [Rico van de Ven](https://github.com/RicoNL).
32+
Special thanks to our contributors (in alphabetical order): [Annie-Johnson](https://github.com/Annie-Johnson), [Daniel Watford](https://github.com/danwatford), [Dennis Kuhn](https://github.com/DennisKuhn), [Fabio Franzini](https://github.com/fabiofranzini), [Jake Stanger](https://github.com/JakeStanger), [Joseph Halvey](https://github.com/HardluckHalvey), [Markus Möller](https://github.com/mmsharepoint), [Milan Holemans](https://github.com/milanholemans), [Morten Andersen](https://github.com/spcph), [Rico van de Ven](https://github.com/RicoNL), [ryanexner](https://github.com/ryanexner), [Sergio Villalta](https://github.com/6gal6ler6).
33+
34+
## 3.8.1
35+
36+
### Fixes
37+
38+
- `LivePersona`: Fix LivePersona not showing card on hover [#1241](https://github.com/pnp/sp-dev-fx-controls-react/issues/1241)
2339

2440
## 3.8.0
2541

1.45 KB
Loading
4.8 KB
Loading
3.63 KB
Loading
3.73 KB
Loading
3.7 KB
Loading
66.3 KB
Loading
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# ContentTypePicker control
2+
3+
This control allows you to select one or multiple available site content types or list content types.
4+
5+
Here is an example of the control:
6+
7+
![ContentTypePicker initial](../assets/ContentTypePicker-initial.png)
8+
9+
`ContentTypePicker` single selection mode:
10+
11+
![ContentTypePicker single selection](../assets/ContentTypePicker-single.png)
12+
13+
`ContentTypePicker` multi selection mode:
14+
15+
![ContentTypePicker multi selection](../assets/ContentTypePicker-multi.png)
16+
17+
## How to use this control in your solutions
18+
19+
- 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.
20+
- Import the control into your component:
21+
22+
```TypeScript
23+
import { ContentTypePicker } from "@pnp/spfx-controls-react/lib/ContentTypePicker";
24+
```
25+
26+
- Use the `ContentTypePicker` control in your code as follows:
27+
28+
```TypeScript
29+
<ContentTypePicker
30+
context={this.props.context}
31+
group="Content Feedback"
32+
includeHidden={false}
33+
includeReadOnly={false}
34+
label="Select your content type"
35+
multiSelect={false}
36+
orderBy={ContentTypesOrderBy.Name}
37+
listId="00000000-0000-0000-0000-000000000000"
38+
onSelectionChanged={this.onContentTypePickerChanged}
39+
showBlankOption={true}
40+
/>
41+
```
42+
43+
- The `onSelectionChanged` change event returns the content type(s) and can be implemented as follows:
44+
45+
```TypeScript
46+
private onContentTypePickerChanged (contentTypes: ISPContentType | ISPContentType[]) {
47+
console.log("Content types:", contentTypes);
48+
}
49+
```
50+
51+
## Implementation
52+
53+
The `ContentTypePicker` control can be configured with the following properties:
54+
55+
| Property | Type | Required | Description |
56+
| --- | --- | --- | --- |
57+
| context | BaseComponentContext | yes | The context object of the SPFx loaded webpart or customizer. |
58+
| listId | string | no | The ID of the list or library you wish to select content type(s) from. When not specified, picker will be populated with site content types.|
59+
| className | string | no | If provided, additional class name to provide on the dropdown element. |
60+
disabled | boolean | no | Whether or not the control is disabled. |
61+
includeHidden | boolean | no | Whether or not to include hidden content types. Default is true. |
62+
includeReadOnly | boolean | no | Whether or not to include read-only content types. Default is true. |
63+
group | string | no | Only show content types of a certain group. |
64+
filter | string | no | Filter content types from OData query (takes the upperhand of `hidden`, `readOnly` and `group` Filters). |
65+
orderBy | ContentTypesOrderBy | no | How to order the content types. |
66+
selectedContentTypes | string \| string[] | no | IDs of the selected item(s). If you provide this, you must maintain selection state by observing `onSelectionChanged` events and passing a new value in when changed.
67+
multiSelect | boolean | no | Indicates if multi-choice selections is allowed. Default is false. |
68+
label | string | no | The label to display. |
69+
placeholder | string | no | Input placeholder text. Displayed until option is selected. |
70+
onSelectionChanged | (newValue: ISPContentType \| ISPContentType[]): void | no | Callback issued when the selected option changes. |
71+
filterItems | (contentTypes: ISPContentType[]): ISPContentType[] | no | This function is invoked after the filtering has been done. This allows you to add additional custom filtering.
72+
webAbsoluteUrl | string | no | Absolute Web Url of target site (user requires permissions). |
73+
showBlankOption | boolean | no | Whether or not to show a blank option. Default is false. Works only when `multiSelect` is false. |
74+
75+
Enum `ContentTypesOrderBy`
76+
77+
| Value |
78+
| ---- |
79+
| Name |
80+
| Id |
81+
82+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/ContentTypePicker)

0 commit comments

Comments
 (0)