Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.9.0 #1262

Merged
merged 102 commits into from
Jul 12, 2022
Merged

v3.9.0 #1262

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
8dfbaa0
3.9.0
May 3, 2022
9c4c89e
prep for 3.9.0
May 3, 2022
bc73b28
pre-commit
May 3, 2022
2ababec
Added 'EnhancedThemeProvider' Control
fabiofranzini May 4, 2022
4306d9a
finalized the default, dark, hc theme for teams
fabiofranzini May 6, 2022
d3b2394
fix spelling
May 6, 2022
912895e
Fix docs index and mkdocs
fabiofranzini May 8, 2022
81219ed
Merge pull request #1206 from fabiofranzini/enhanced-theme-provider
joelfmrodrigues May 8, 2022
6dabd92
changelog
joelfmrodrigues May 8, 2022
92f4c7b
Merge pull request #1207 from Annie-Johnson/master
joelfmrodrigues May 8, 2022
c6e696f
changelog
joelfmrodrigues May 8, 2022
e20f7bd
Fixed save typo
milanholemans May 8, 2022
338c964
Merge pull request #1209 from milanholemans/docs-typo
joelfmrodrigues May 9, 2022
ab2ccaf
changelog
joelfmrodrigues May 9, 2022
854ed14
Merge pull request #1211 from pnp/fix-build
AJIXuMuK May 9, 2022
1d107b6
DateTimePicker-cleardate
RicoNL May 20, 2022
513d1bc
PeoplePicker validation bugfix
May 23, 2022
65d589d
PeoplePicker - Implement validateOnFocusOut
May 23, 2022
340a86b
Implemented FieldPicker
milanholemans May 25, 2022
22a2f29
fix: test for pageContext.cultureinfo before use
DennisKuhn May 30, 2022
a385c67
Merge pull request #1218 from RicoNL/datepicker-cleardate
joelfmrodrigues Jun 3, 2022
1a28b1a
changelog
joelfmrodrigues Jun 3, 2022
57a585e
Merge pull request #1227 from mauriora/fix-missing-pagecontext-language
joelfmrodrigues Jun 3, 2022
891b467
changelog
joelfmrodrigues Jun 3, 2022
35e7da8
update lock file
joelfmrodrigues Jun 3, 2022
ee31666
Merge pull request #1223 from milanholemans/fieldpicker
AJIXuMuK Jun 6, 2022
edc0c44
changelog
Jun 6, 2022
b4a2b15
precommit
Jun 6, 2022
4b790f6
field picker reference in docs index
Jun 6, 2022
83d6a9d
small refactoring of FieldPicker
Jun 6, 2022
62c7f0f
Bump eventsource from 1.1.0 to 1.1.1
dependabot[bot] Jun 7, 2022
378452f
wip
Jun 7, 2022
bbb4b31
wip
Jun 10, 2022
78cf0ab
fixed
AJIXuMuK Jun 11, 2022
2e97845
Merge pull request #1230 from pnp/1215
AJIXuMuK Jun 11, 2022
99ffea4
cache fix for ListItemPicker
AJIXuMuK Jun 11, 2022
b7ba9dd
Allow filters on a Toolbar to be controlled externally (#1222)
danwatford Jun 13, 2022
aa1d9d5
feat: add new `allowUnvalidated` option to allow adding non-tenant users
Jun 13, 2022
549eaa6
Changed bad translation for RichText Headers
spcph Jun 14, 2022
ef5e786
Add contentTypePicker control
milanholemans Jun 15, 2022
6c475e9
Changed the duplicated itemsperpage
ryanexner Jun 15, 2022
daa7c86
Added 'AdaptiveCardDesignerHost' Control
fabiofranzini Jun 16, 2022
221a2d0
Merge pull request #1231 from danwatford/1222-controlled-toolbar-filters
joelfmrodrigues Jun 21, 2022
e85952d
changelog
joelfmrodrigues Jun 21, 2022
ddd578b
Update IPeoplePicker.ts
joelfmrodrigues Jun 21, 2022
06f8ac5
Merge pull request #1232 from JakeStanger/feat/peoplepicker-guests
joelfmrodrigues Jun 21, 2022
614bfec
changelog
joelfmrodrigues Jun 21, 2022
25131f9
Add new prop to PeoplePicker docs
joelfmrodrigues Jun 21, 2022
f76d0c7
add missing contributor
joelfmrodrigues Jun 21, 2022
e73ef7b
Merge pull request #1233 from spcph/dkTranslationFix
joelfmrodrigues Jun 21, 2022
db2dbba
changelog
joelfmrodrigues Jun 21, 2022
f0d977e
Merge pull request #1236 from ryanexner/patch-1
joelfmrodrigues Jun 21, 2022
37beb8e
changelog
joelfmrodrigues Jun 21, 2022
c090c7e
Fix changelog script by setting CHANGELOG.JSON filename extension to …
danwatford Jun 22, 2022
1084bf7
Merge pull request #1242 from danwatford/changelog-script-fix
joelfmrodrigues Jun 22, 2022
14a2be7
Changelog
joelfmrodrigues Jun 22, 2022
752278d
New Modern Audio control
mmsharepoint Jun 22, 2022
090882b
New Modern Audio control
mmsharepoint Jun 22, 2022
f4ac23d
Add support for webAbsoluteUrl
Jun 22, 2022
36d923a
Fixed LivePersona not showing card on hover
AlexAccelerator Jun 23, 2022
75bac1e
Merge pull request #1245 from SharePickle/issue-1241
joelfmrodrigues Jun 23, 2022
87bdb33
changelog
joelfmrodrigues Jun 23, 2022
1e0ab6c
Merge pull request #1221 from HardluckHalvey/master
joelfmrodrigues Jun 23, 2022
75d37aa
changelog
joelfmrodrigues Jun 23, 2022
3620c0f
Merge branch 'master' of https://github.com/pnp/sp-dev-fx-controls-re…
joelfmrodrigues Jun 24, 2022
107cf0a
Merge pull request #1243 from mmsharepoint/audio
AJIXuMuK Jun 24, 2022
d8bb301
links in the docs for ModernAudio
AJIXuMuK Jun 24, 2022
c914a0a
changelog
AJIXuMuK Jun 24, 2022
d3ca92c
pre-commit
AJIXuMuK Jun 24, 2022
59db6d6
merge with dev
AJIXuMuK Jun 24, 2022
51ef2de
Merge pull request #1228 from pnp/dependabot/npm_and_yarn/eventsource…
AJIXuMuK Jun 24, 2022
0bc4640
bump codecov
AJIXuMuK Jun 24, 2022
eb4ea24
fix getting lookup values for fields with special characters
AJIXuMuK Jun 27, 2022
5053fa6
changelog
AJIXuMuK Jun 27, 2022
a157cec
pre-commit
AJIXuMuK Jun 27, 2022
ca16d28
PR review
milanholemans Jun 28, 2022
cbc1854
Merge branch 'dev' of https://github.com/pnp/sp-dev-fx-controls-react…
Jun 29, 2022
df2911f
Merge branch 'pnp-dev' into svillaltav3
Jun 29, 2022
86f48e3
Added support for defining the Web URL.
Jun 29, 2022
fbc285b
added the right parameters
Jun 30, 2022
cb8e35b
Merge pull request #1244 from 6gal6ler6/svillaltav3
AJIXuMuK Jul 1, 2022
0632ad5
Merge pull request #1234 from milanholemans/contentTypePicker
AJIXuMuK Jul 1, 2022
ec1661c
docs for new prop in DynamicForm
AJIXuMuK Jul 1, 2022
d585779
changelog
AJIXuMuK Jul 1, 2022
2739a96
changelog and link to control on index page
AJIXuMuK Jul 1, 2022
3478d79
pre-commit
AJIXuMuK Jul 1, 2022
444b8ec
requested changes
fabiofranzini Jul 7, 2022
1e6b0f4
fix(FilePicker) : correction for Bing search image api endpoint #1256
Jul 8, 2022
1e6a1b1
doc(FilePicker) : add precision for Bing Search image API
Jul 8, 2022
c3c9c60
fix(filePicker): wrong attribut for error message
Jul 9, 2022
a079011
fix(GeneralHelper) : fix performance problem with regEx method "toRel…
Jul 9, 2022
dd9b4c5
fix(FilePicker) : fix url endpoint for Organisation Assets
Jul 9, 2022
aec4a5a
fix(FilePicker) : fix url endpoint for Organisation Assets
Jul 9, 2022
93546a7
fix(FilePicker) : url build for root site vs collection site
Jul 10, 2022
f8e0c70
Added more detailed imports
fabiofranzini Jul 11, 2022
e2fbc3d
Added comments to AdaptiveCardDesigner.Helpers.ts
fabiofranzini Jul 11, 2022
f2e7a46
Merge branch 'dev' into adaptive-card-designer-host
fabiofranzini Jul 11, 2022
d08781c
Update package-lock.json
fabiofranzini Jul 11, 2022
2612e46
Merge pull request #1238 from fabiofranzini/adaptive-card-designer-host
AJIXuMuK Jul 11, 2022
1cd6499
Merge pull request #1258 from PooLP/dev
AJIXuMuK Jul 11, 2022
fa1c76f
changelog
AJIXuMuK Jul 11, 2022
53af1b3
pre-commit
AJIXuMuK Jul 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions CHANGELOG.JSON → CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
{
"versions": [
{
"version": "3.9.0",
"changes": {
"new": [
"`EnhancedThemeProvider`: Added 'EnhancedThemeProvider' control [#1202](https://github.com/pnp/sp-dev-fx-controls-react/issues/1202)",
"`FieldPicker`: Added `FieldPicker` control [#1219](https://github.com/pnp/sp-dev-fx-controls-react/issues/1219)",
"`ContentTypePicler`: Added `ContentTypePicker` control [#1220](https://github.com/pnp/sp-dev-fx-controls-react/issues/1220)",
"`ModernAudio`: Added `ModernAudio` control [#1224](https://github.com/pnp/sp-dev-fx-controls-react/issues/1224)",
"`AdaptiveCardDesignerHost`: Added `AdaptiveCardDesignerHost` control [#1237](https://github.com/pnp/sp-dev-fx-controls-react/issues/1237)"
],
"enhancements": [
"`DateTimePicker`: Added button to clear date [#1217](https://github.com/pnp/sp-dev-fx-controls-react/issues/1217)",
"`Toolbar`: Allow filters on a Toolbar to be controlled externally [#1222](https://github.com/pnp/sp-dev-fx-controls-react/issues/1222)",
"`PeoplePicker`: add new allowUnvalidated option to allow adding non-tenant users [#1232](https://github.com/pnp/sp-dev-fx-controls-react/pull/1232)",
"`DynamicForm`: Add support for `webAbsoluteUrl` [#1244](https://github.com/pnp/sp-dev-fx-controls-react/pull/1244)"
],
"fixes": [
"`Localization`: Updates to English localizations [#1207](https://github.com/pnp/sp-dev-fx-controls-react/issues/1207)",
"`Localization`: Updates to Dutch localizations [#1209](https://github.com/pnp/sp-dev-fx-controls-react/issues/1209)",
"`Localization`: Updates to Danish localizations [#1233](https://github.com/pnp/sp-dev-fx-controls-react/pull/1233)",
"`TaxonomyPicker`: Check if cultureInfo is valid [#1226](https://github.com/pnp/sp-dev-fx-controls-react/issues/1226)",
"`FieldCollectionData`: Updated docs to fix duplicated property [#1236](https://github.com/pnp/sp-dev-fx-controls-react/pull/1236)",
"`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)",
"`PeoplePicker`: PeoplePicker validation on focus out [#1221](https://github.com/pnp/sp-dev-fx-controls-react/pull/1221)",
"`DynamicForm`: Cannot display lookup value when the source field is not Title [#1215](https://github.com/pnp/sp-dev-fx-controls-react/issues/1215)",
"`FilePicker`: the endPoint for webSearch do not work [#1256](https://github.com/pnp/sp-dev-fx-controls-react/issues/1256)"

]
},
"contributions": [
"[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)",
"[Richard Gigan](https://github.com/PooLP)",
"[Rico van de Ven](https://github.com/RicoNL)",
"[ryanexner](https://github.com/ryanexner)",
"[Sergio Villalta](https://github.com/6gal6ler6)"
]
},
{
"version": "3.8.1",
"changes": {
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Releases

## 3.9.0

### New control(s)

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

### Enhancements

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

### Fixes

- `Localization`: Updates to English localizations [#1207](https://github.com/pnp/sp-dev-fx-controls-react/issues/1207)
- `Localization`: Updates to Dutch localizations [#1209](https://github.com/pnp/sp-dev-fx-controls-react/issues/1209)
- `Localization`: Updates to Danish localizations [#1233](https://github.com/pnp/sp-dev-fx-controls-react/pull/1233)
- `TaxonomyPicker`: Check if cultureInfo is valid [#1226](https://github.com/pnp/sp-dev-fx-controls-react/issues/1226)
- `FieldCollectionData`: Updated docs to fix duplicated property [#1236](https://github.com/pnp/sp-dev-fx-controls-react/pull/1236)
- `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)
- `PeoplePicker`: PeoplePicker validation on focus out [#1221](https://github.com/pnp/sp-dev-fx-controls-react/pull/1221)
- `DynamicForm`: Cannot display lookup value when the source field is not Title [#1215](https://github.com/pnp/sp-dev-fx-controls-react/issues/1215)
- `FilePicker`: the endPoint for webSearch do not work [#1256](https://github.com/pnp/sp-dev-fx-controls-react/issues/1256)

### Contributors

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), [Richard Gigan](https://github.com/PooLP), [Rico van de Ven](https://github.com/RicoNL), [ryanexner](https://github.com/ryanexner), [Sergio Villalta](https://github.com/6gal6ler6).

## 3.8.1

### Fixes
Expand Down
33 changes: 33 additions & 0 deletions docs/documentation/docs/about/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Releases

## 3.9.0

### New control(s)

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

### Enhancements

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

### Fixes

- `Localization`: Updates to English localizations [#1207](https://github.com/pnp/sp-dev-fx-controls-react/issues/1207)
- `Localization`: Updates to Dutch localizations [#1209](https://github.com/pnp/sp-dev-fx-controls-react/issues/1209)
- `Localization`: Updates to Danish localizations [#1233](https://github.com/pnp/sp-dev-fx-controls-react/pull/1233)
- `TaxonomyPicker`: Check if cultureInfo is valid [#1226](https://github.com/pnp/sp-dev-fx-controls-react/issues/1226)
- `FieldCollectionData`: Updated docs to fix duplicated property [#1236](https://github.com/pnp/sp-dev-fx-controls-react/pull/1236)
- `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)
- `PeoplePicker`: PeoplePicker validation on focus out [#1221](https://github.com/pnp/sp-dev-fx-controls-react/pull/1221)
- `DynamicForm`: Cannot display lookup value when the source field is not Title [#1215](https://github.com/pnp/sp-dev-fx-controls-react/issues/1215)
- `FilePicker`: the endPoint for webSearch do not work [#1256](https://github.com/pnp/sp-dev-fx-controls-react/issues/1256)

### Contributors

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), [Richard Gigan](https://github.com/PooLP), [Rico van de Ven](https://github.com/RicoNL), [ryanexner](https://github.com/ryanexner), [Sergio Villalta](https://github.com/6gal6ler6).

## 3.8.1

### Fixes
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions docs/documentation/docs/controls/AdaptiveCardDesignerHost.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Adaptive Card Designer Host

This control allows you to embed the official Adaptive Cards designer inside a React SPFx solution.

The control consists of 2 components:

* **AdaptiveCardDesigner**: implements all the logic to embed the designer control as a React component;
* **AdaptiveCardDesignerHost**: main control to render the designer in a full page Fluent UI panel;

**Due to the nature in which the original Adaptive Card Designer control was implemented**, it is not possible at this time to adapt it to the current theme applied to the site and especially to localize it to give multilingual support. **The designer, therefore, is only available in the English language**.

This control shares a lot of code with another control in this library, the "AdaptiveCardHost" control. In this way you have a uniformity of display between the cards created with this designer and those rendered with "AdaptiveCardHost". The same thing goes for the various HostContainer objects, so that you can test the cards with the themes available for "AdaptiveCardHost".

The Adaptive Cards version supported is 1.5, by using the 'adaptivecards' npm package version 2.10.0.

All Inputs Elements and Actions of Adaptive Cards have been redefined using Fluent UI React, adding and improving features that are not managed in Microsoft's implementation of the "adaptivecards-fluentui" library (Theme support for example).

Thanks to the "context" property that allows you to pass the SPFx context, whether the "data" property is passed or not, a new field called @context will be injected into the data object.

This allows, using Adaptive Cards templating syntax and binding feature of the Designer, to access to the context informations.

For more info please to refear tot he documentation of [AdaptiveCardHost ](http://www.google.com)control

Here is an example of the control in action inside a Web Part:

![Adaptive Card Host control](../assets/AdaptiveCardDesignerHost.gif)

## How to use this control in your solutions

* 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.

* In your component file, import the `AdaptiveCardDesignerHost` control as follows:
```Typescript
import { AdaptiveCardDesignerHost, HostContainer, BindingPreviewMode, Versions } from "@pnp/spfx-controls-react/lib/AdaptiveCardDesignerHost";
```

- Example on use the `AdaptiveCardDesignerHost` control with only required properties:
```Typescript
<AdaptiveCardDesignerHost
headerText="Adaptive Card Designer"
buttonText="Open the Designer"
context={props.context}
onSave={(payload: object) => setCard(payload)}
/>
```

- Example on use the `AdaptiveCardDesignerHost` control with all properties:
```Typescript
<AdaptiveCardDesignerHost
headerText="Adaptive Card Designer"
buttonText="Open the Designer"
context={props.context}
onSave={(payload: object) => setCard(payload)}
addDefaultAdaptiveCardHostContainer={true}
bindingPreviewMode={BindingPreviewMode.SampleData}
theme={props.theme}
card={card}
data={data}
enableDataBindingSupport={true}
hostConfig={hostConfig}
hostContainers={[]}
injectAdaptiveCardHostContextProperty={true}
newCardPayload={newCard}
selectedHostContainerControlsTargetVersion={false}
showCopyToJsonToolbarCommand={true}
showDataStructureToolbox={true}
showFluentBreakpointsPicker={true}
showSampleDataEditorToolbox={true}
showTargetVersionMismatchWarning={true}
showVersionPicker={true}
supportedTargetVersions={[Versions.v1_5]}
snippets={snippets}
/>
```
## Implementation

The `AdaptiveCardDesignerHost` control can be configured with the following properties:

| Property | Type | Required | Description | Default Value |
| ---- | ---- | ---- | ---- | ---- |
| context | BaseComponentContext | true | Set the context from SPFx component | - |
| theme | IPartialTheme or ITheme | false | Set Fluent UI Theme | - |
| onSave | (payload: object) => void | true | Callback for saving the card | - |
| card | object | false | Set Adaptive Card payload | - |
| data | { "$root": object } | false | Set Data Source for template rendering | - |
| newCardPayload | object | false | Set Adaptive Card payload for the New Card | - |
| hostContainers | HostContainer[] | false | Set custom HostContainers | [] |
| supportedTargetVersions | Version[] | false | Set the suported Versions | [Versions.v1_5] |
| snippets | IToolboxSnippet[] | false | Set the Toolbox Snippets | [] |
| bindingPreviewMode | BindingPreviewMode | false | Set the Binding preview mode | BindingPreviewMode.GeneratedData |
| enableDataBindingSupport | boolean | false | Enable the support for Data Binding | true |
| selectedHostContainerControlsTargetVersion | boolean | false | Enable the support for Data Binding | false |
| showTargetVersionMismatchWarning | boolean | false | Show the target version mismatch warning | true |
| showVersionPicker | boolean | false | Show the Version Picker | false |
| showSampleDataEditorToolbox | boolean | false | Show the Sample Data Editor Toolbox | false |
| showDataStructureToolbox | boolean | false | Show the Data Structure Toolbox | true |
| showFluentBreakpointsPicker | boolean | false | Show the Fluent UI Breakpoint Picker | true |
| showCopyToJsonToolbarCommand | boolean | false | Show the copy to json button | false |
| addDefaultAdaptiveCardHostContainer | boolean | false | Add the default Host Containers to the Picker | true |
| injectAdaptiveCardHostContextProperty | boolean | false | Inject the SPFx Context Property inside the Adaptive Card data object | true |
| headerText | boolean | false | Set the Header text for the Adaptive Card Designer | - |
| buttonText | boolean | false | Set the Button text for open the Adaptive Card Designer | - |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/AdaptiveCardDesignerHost)
82 changes: 82 additions & 0 deletions docs/documentation/docs/controls/ContentTypePicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# ContentTypePicker control

This control allows you to select one or multiple available site content types or list content types.

Here is an example of the control:

![ContentTypePicker initial](../assets/ContentTypePicker-initial.png)

`ContentTypePicker` single selection mode:

![ContentTypePicker single selection](../assets/ContentTypePicker-single.png)

`ContentTypePicker` multi selection mode:

![ContentTypePicker multi selection](../assets/ContentTypePicker-multi.png)

## How to use this control in your solutions

- 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.
- Import the control into your component:

```TypeScript
import { ContentTypePicker } from "@pnp/spfx-controls-react/lib/ContentTypePicker";
```

- Use the `ContentTypePicker` control in your code as follows:

```TypeScript
<ContentTypePicker
context={this.props.context}
group="Content Feedback"
includeHidden={false}
includeReadOnly={false}
label="Select your content type"
multiSelect={false}
orderBy={ContentTypesOrderBy.Name}
listId="00000000-0000-0000-0000-000000000000"
onSelectionChanged={this.onContentTypePickerChanged}
showBlankOption={true}
/>
```

- The `onSelectionChanged` change event returns the content type(s) and can be implemented as follows:

```TypeScript
private onContentTypePickerChanged (contentTypes: ISPContentType | ISPContentType[]) {
console.log("Content types:", contentTypes);
}
```

## Implementation

The `ContentTypePicker` control can be configured with the following properties:

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| context | BaseComponentContext | yes | The context object of the SPFx loaded webpart or customizer. |
| 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.|
| className | string | no | If provided, additional class name to provide on the dropdown element. |
disabled | boolean | no | Whether or not the control is disabled. |
includeHidden | boolean | no | Whether or not to include hidden content types. Default is true. |
includeReadOnly | boolean | no | Whether or not to include read-only content types. Default is true. |
group | string | no | Only show content types of a certain group. |
filter | string | no | Filter content types from OData query (takes the upperhand of `hidden`, `readOnly` and `group` Filters). |
orderBy | ContentTypesOrderBy | no | How to order the content types. |
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.
multiSelect | boolean | no | Indicates if multi-choice selections is allowed. Default is false. |
label | string | no | The label to display. |
placeholder | string | no | Input placeholder text. Displayed until option is selected. |
onSelectionChanged | (newValue: ISPContentType \| ISPContentType[]): void | no | Callback issued when the selected option changes. |
filterItems | (contentTypes: ISPContentType[]): ISPContentType[] | no | This function is invoked after the filtering has been done. This allows you to add additional custom filtering.
webAbsoluteUrl | string | no | Absolute Web Url of target site (user requires permissions). |
showBlankOption | boolean | no | Whether or not to show a blank option. Default is false. Works only when `multiSelect` is false. |

Enum `ContentTypesOrderBy`

| Value |
| ---- |
| Name |
| Id |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/ContentTypePicker)
Loading