-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from SharePoint/dev
Merge for 1.12.0
- Loading branch information
Showing
49 changed files
with
1,943 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
docs/documentation/docs/controls/PropertyPanePropertyEditor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# PropertyPanePropertyEditor control | ||
|
||
This control allows the user to edit the webpart properties in JSON. It can also be used to export properties of a webpart and later import them again to a similar webpart on a different page. If the user clicks 'export' a file named 'webpartproperties.json' is presented for download. The same file can be uploaded to a new instance of the same webpart on for instance another site or page. | ||
|
||
**PropertyPanePropertyEditor rendering in property pane** | ||
|
||
![PropertyPanePropertyEditor rendering](../assets/propertyeditorinpane.png) | ||
|
||
|
||
**PropertyPanePropertyEditor rendering when expanded** | ||
|
||
![PropertyPanePropertyEditor rendering](../assets/propertyeditorexpanded.png) | ||
|
||
## How to use this control in your solutions | ||
|
||
1. Check that you installed the `@pnp/spfx-property-controls` dependency. Check out The [getting started](../#getting-started) page for more information about installing the dependency. | ||
2. Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { PropertyWebPartInformation } from '@pnp/spfx-property-controls/lib/PropertyPanePropertyEditor'; | ||
``` | ||
|
||
3. Create a new property for your web part, for example: | ||
|
||
```TypeScript | ||
export interface IPropertyControlsTestWebPartProps { | ||
toggleInfoHeaderValue: boolean; | ||
} | ||
``` | ||
|
||
4. Add the custom property control to the `groupFields` of the web part property pane configuration: | ||
|
||
```TypeScript | ||
PropertyPanePropertyEditor({ | ||
webpart: this, | ||
key: 'propertyEditor' | ||
}) | ||
``` | ||
|
||
## Implementation | ||
|
||
The `PropertyEditor` control has the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| webpart | BaseClientSideWebPart | yes | The webpart, which is in principle the current webpart, of which you want to be able to edit the properties from | | ||
|
||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyPanePropertyEditor) |
63 changes: 63 additions & 0 deletions
63
docs/documentation/docs/controls/PropertyPaneWebPartInformation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# PropertyPaneWebPartInformation control | ||
|
||
This control allows you to specify a description, a 'read more' link, and an optional embedded video | ||
|
||
**PropertyPaneWebPartInformation rendering** | ||
|
||
![WebPart Information](../assets/webpartinformation.png) | ||
|
||
|
||
## How to use this control in your solutions | ||
|
||
1. Check that you installed the `@pnp/spfx-property-controls` dependency. Check out The [getting started](../#getting-started) page for more information about installing the dependency. | ||
2. Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { PropertyWebPartInformation } from '@pnp/spfx-property-controls/lib/PropertyPaneWebPartInformation'; | ||
``` | ||
|
||
3. Create a new property for your web part, for example: | ||
|
||
```TypeScript | ||
export interface IPropertyControlsTestWebPartProps { | ||
toggleInfoHeaderValue: boolean; | ||
} | ||
``` | ||
|
||
4. Add the custom property control to the `groupFields` of the web part property pane configuration: | ||
|
||
```TypeScript | ||
PropertyPaneWebPartInformation({ | ||
description: `This is a <strong>demo webpart</strong>, used to demonstrate all the <a href="https://aka.ms/sppnp">PnP</a> property controls`, | ||
moreInfoLink: `https://sharepoint.github.io/sp-dev-fx-property-controls/`, | ||
videoProperties: { | ||
embedLink: `https://www.youtube.com/embed/d_9o3tQ90zo`, | ||
properties: { allowFullScreen: true} | ||
}, | ||
key: 'webPartInfoId' | ||
}) | ||
``` | ||
|
||
## Implementation | ||
|
||
The `PropertyPaneWebPartInformation` control has the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| description | string | yes | Description content - any HTML | | ||
| moreInfoLink | string | no | A URL providing optional additional information | | ||
| moreInfoLinkTarget | string | no | An optional target for the link. Defaults to '_blank' | | ||
| videoProperties | IVideoEmbedProperties | no | A video properties object specifying an optionally embedded video | | ||
|
||
Class `IVideoEmbedProperties` | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| embedLink | string | yes | A link to an embeddable video. The video will be embedded in an iframe. See the example above for details | | ||
| width | number | no | optional width of the iframe | | ||
| height | number | no | optional height of the iframe | | ||
| properties | object | no | additional properties to set on the iframe element | | ||
|
||
|
||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyPaneWebPartInformation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.