Skip to content

Commit

Permalink
Merge pull request #117 from SharePoint/dev
Browse files Browse the repository at this point in the history
Merge for 1.12.0
  • Loading branch information
estruyf authored Nov 14, 2018
2 parents 29921d3 + b7bf4e3 commit 322a6b1
Show file tree
Hide file tree
Showing 49 changed files with 1,943 additions and 113 deletions.
24 changes: 23 additions & 1 deletion CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
{
"versions": [
{
"version": "1.12.0",
"changes": {
"new": [
"`PropertyPaneWebPartInformation`: New control to show more information about the current web part [#108](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/108)",
"`PropertyPanePropertyEditor`: New control that allows you to export/import property pane settings [#114](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/114)"
],
"enhancements": [
"Dutch localization added [#82](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/82)",
"French localization added [#84](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/84)",
"`PropertyFieldCollectionData`: Allow the user to specify a deferred validation time for each field [#98](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/98)",
"`PropertyFieldCollectionData`: added a onRenderOption option to allow custom option rendering [#102](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/102)",
"`PropertyFieldNumber`: Introduced the aria label [#104](https://github.com/SharePoint/sp-dev-fx-property-controls/pull/104)",
"Hide callout from the controls with callout if no message is provided [#107](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/107)",
"`PropertyFieldListPicker`: Add the ability to refresh target site while pane is open [#109](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/109)"
],
"fixes": [
"`PropertyFieldCollectionData`: Fixed catastrophic backtracking regex issue for URL validation [#99](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/99)"
]
},
"contributions": ["[Junle Li](https://github.com/lijunle)", "[PooLP](https://github.com/PooLP)", "[Erwin van Hunen](https://github.com/erwinvanhunen)"]
},
{
"version": "1.11.0",
"changes": {
Expand Down Expand Up @@ -55,7 +77,7 @@
],
"fixes": []
},
"contributions": ["Joel Rodrigues"]
"contributions": ["[Joel Rodrigues](https://github.com/joelfmrodrigues)"]
},
{
"version": "1.7.0",
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Releases

## 1.12.0

**New control(s)**

- `PropertyPaneWebPartInformation`: New control to show more information about the current web part [#108](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/108)
- `PropertyPanePropertyEditor`: New control that allows you to export/import property pane settings [#114](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/114)

**Enhancements**

- Dutch localization added [#82](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/82)
- French localization added [#84](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/84)
- `PropertyFieldCollectionData`: Allow the user to specify a deferred validation time for each field [#98](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/98)
- `PropertyFieldCollectionData`: added a onRenderOption option to allow custom option rendering [#102](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/102)
- `PropertyFieldNumber`: Introduced the aria label [#104](https://github.com/SharePoint/sp-dev-fx-property-controls/pull/104)
- Hide callout from the controls with callout if no message is provided [#107](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/107)
- `PropertyFieldListPicker`: Add the ability to refresh target site while pane is open [#109](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/109)

**Fixes**

- `PropertyFieldCollectionData`: Fixed catastrophic backtracking regex issue for URL validation [#99](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/99)

### Contributors

Special thanks to our contributors (in alphabetical order): [Junle Li](https://github.com/lijunle), [PooLP](https://github.com/PooLP), [Erwin van Hunen](https://github.com/erwinvanhunen).

## 1.11.0

**Enhancements**
Expand Down Expand Up @@ -43,6 +68,10 @@
- New telemetry approach which allows you to use Application Insights instance [#79](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/79)
- `PropertyFieldListPicker` add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)

### Contributors

Special thanks to our contributor: [Joel Rodrigues](https://github.com/joelfmrodrigues).

## 1.7.0

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

## 1.12.0

**New control(s)**

- `PropertyPaneWebPartInformation`: New control to show more information about the current web part [#108](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/108)
- `PropertyPanePropertyEditor`: New control that allows you to export/import property pane settings [#114](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/114)

**Enhancements**

- Dutch localization added [#82](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/82)
- French localization added [#84](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/84)
- `PropertyFieldCollectionData`: Allow the user to specify a deferred validation time for each field [#98](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/98)
- `PropertyFieldCollectionData`: added a onRenderOption option to allow custom option rendering [#102](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/102)
- `PropertyFieldNumber`: Introduced the aria label [#104](https://github.com/SharePoint/sp-dev-fx-property-controls/pull/104)
- Hide callout from the controls with callout if no message is provided [#107](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/107)
- `PropertyFieldListPicker`: Add the ability to refresh target site while pane is open [#109](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/109)

**Fixes**

- `PropertyFieldCollectionData`: Fixed catastrophic backtracking regex issue for URL validation [#99](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/99)

### Contributors

Special thanks to our contributors (in alphabetical order): [Junle Li](https://github.com/lijunle), [PooLP](https://github.com/PooLP), [Erwin van Hunen](https://github.com/erwinvanhunen).

## 1.11.0

**Enhancements**
Expand Down Expand Up @@ -43,6 +68,10 @@
- New telemetry approach which allows you to use Application Insights instance [#79](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/79)
- `PropertyFieldListPicker` add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)

### Contributors

Special thanks to our contributor: [Joel Rodrigues](https://github.com/joelfmrodrigues).

## 1.7.0

**Enhancements**
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.
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ Interface `ICustomCollectionField`
| type | CustomCollectionFieldType | yes | Specifies the type of field to render. |
| required | boolean | no | Specify if the field is required. |
| options | [IDropdownOption[]](https://developer.microsoft.com/en-us/fabric#/components/dropdown) | no | Dropdown options. Only necessary when dropdown type is used. |
| onRenderOption | IRenderFunction<ISelectableOption> | no | Dropdown custom options render method. Only for the **dropdown** field type. |
| placeholder | string | no | Placehoder text which will be used for the input field. If not provided the input title will be used. |
| defaultValue | any | no | Specify a default value for the input field. |
| deferredValidationTime | number | no | Field will start to validate after users stop typing for `deferredValidationTime` milliseconds. Default: 200ms. |
| onGetErrorMessage | (value: any, index: number, crntItem: any): string \| Promise<string> | no | The method is used to get the validation error message and determine whether the input value is valid or not. It provides you the current row index and the item you are currently editing. |

Enum `CustomCollectionFieldType`
Expand Down
1 change: 1 addition & 0 deletions docs/documentation/docs/controls/PropertyFieldNumber.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ The `PropertyFieldNumber` control can be configured with the following propertie
| value | number | no | Value to be displayed in the number field. |
| maxValue | number | no | Maximum number that can be inserted. |
| minValue | number | no | Minimum number that can be inserted. |
| ariaLabel | string | no | The aria label for the number field. |
| disabled | boolean | no | Specify if the control needs to be disabled. |
| errorMessage | string | no | If set, this will be displayed as an error message. |
| onGetErrorMessage | (value: number) => string | no | If set, this method is used to get the validation error message and determine whether the input value is valid or not. |
Expand Down
49 changes: 49 additions & 0 deletions docs/documentation/docs/controls/PropertyPanePropertyEditor.md
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 docs/documentation/docs/controls/PropertyPaneWebPartInformation.md
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)
3 changes: 2 additions & 1 deletion docs/documentation/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ The following controls are currently available:
- [PropertyFieldTermPicker](./controls/PropertyFieldTermPicker) (Property pane managed metadata term selector)
- [PropertyFieldMultiSelect](./controls/PropertyFieldMultiSelect) (Property pane field which allows multi-value selection)
- [PropertyFieldNumber](./controls/PropertyFieldNumber) (Property pane field which allows only number values)

- [PropertyPaneWebPartInformation](./controls/PropertyPaneWebPartInformation) (Property pane webpart information panel)
- [PropertyPanePropertyEditor](./controls/PropertyPanePropertyEditor) (Property pane control that allows raw editing, export and import of webpart properties)
The following controls are extended controls that show a callout next to the label

- [PropertyFieldButtonWithCallout](./controls/PropertyFieldButtonWithCallout) (Property button field with callout)
Expand Down
Loading

0 comments on commit 322a6b1

Please sign in to comment.