Skip to content

Commit

Permalink
Merge pull request #310 from pnp/dev
Browse files Browse the repository at this point in the history
Merge for v2.1.0 release
  • Loading branch information
estruyf authored Oct 21, 2020
2 parents 2223d03 + f54b8b1 commit 3578eff
Show file tree
Hide file tree
Showing 80 changed files with 8,836 additions and 2,428 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
{
"versions": [
{
"version": "2.1.0",
"changes": {
"new": [
],
"enhancements": [
"Auto-generated localizations",
"`PropertyFieldNumber`: ability to set float values [#299](https://github.com/pnp/sp-dev-fx-property-controls/pull/299)",
"`PropertyFieldGuid`: new GUID editor control [#300](https://github.com/pnp/sp-dev-fx-property-controls/pull/300)",
"`FolderExplorerService`: support special characters if folder name [#305](https://github.com/pnp/sp-dev-fx-property-controls/pull/305)",
"`FilePicker`: Stock Images support [#306](https://github.com/pnp/sp-dev-fx-property-controls/pull/306)"
],
"fixes": [
"Documentation: Fixed formatting of list of Controls [#298](https://github.com/pnp/sp-dev-fx-property-controls/pull/298)",
"`PropertyFieldNumber`: gives \"Maximum update depth exceeded\" error [#282](https://github.com/pnp/sp-dev-fx-property-controls/issues/282)",
"Documentation fix: `PropertyFieldCollectionData` - required custom field should call `onUpdate` before `onError` to correctly display required error message [#284](https://github.com/pnp/sp-dev-fx-property-controls/issues/284)",
"`PropertyFieldNumber`: Improper handling of falsey minValue or maxValue [#150](https://github.com/pnp/sp-dev-fx-property-controls/issues/150)",
"`PropertyFieldFilePicker`: Org Assets library is not displayed [#295](https://github.com/pnp/sp-dev-fx-property-controls/issues/295)"
]
},
"contributions": [
"[Anoop Tatti](https://github.com/anoopt)",
"[Gautam Sheth](https://github.com/gautamdsheth)",
"[Jim Love](https://github.com/jimmywim)"
]
},
{
"version": "2.0.0",
"changes": {
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Releases

## 2.1.0

### Enhancements

- Auto-generated localizations
- `PropertyFieldNumber`: ability to set float values [#299](https://github.com/pnp/sp-dev-fx-property-controls/pull/299)
- `PropertyFieldGuid`: new GUID editor control [#300](https://github.com/pnp/sp-dev-fx-property-controls/pull/300)
- `FolderExplorerService`: support special characters if folder name [#305](https://github.com/pnp/sp-dev-fx-property-controls/pull/305)
- `FilePicker`: Stock Images support [#306](https://github.com/pnp/sp-dev-fx-property-controls/pull/306)

### Fixes

- Documentation: Fixed formatting of list of Controls [#298](https://github.com/pnp/sp-dev-fx-property-controls/pull/298)
- `PropertyFieldNumber`: gives "Maximum update depth exceeded" error [#282](https://github.com/pnp/sp-dev-fx-property-controls/issues/282)
- Documentation fix: `PropertyFieldCollectionData` - required custom field should call `onUpdate` before `onError` to correctly display required error message [#284](https://github.com/pnp/sp-dev-fx-property-controls/issues/284)
- `PropertyFieldNumber`: Improper handling of falsey minValue or maxValue [#150](https://github.com/pnp/sp-dev-fx-property-controls/issues/150)
- `PropertyFieldFilePicker`: Org Assets library is not displayed [#295](https://github.com/pnp/sp-dev-fx-property-controls/issues/295)

### Contributors

Special thanks to our contributors (in alphabetical order): [Anoop Tatti](https://github.com/anoopt), [Gautam Sheth](https://github.com/gautamdsheth), [Jim Love](https://github.com/jimmywim).

## 2.0.0

### New control(s)
Expand Down
3 changes: 3 additions & 0 deletions config/supported.localization.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"langs": ["bg-bg", "ca-es", "da-dk", "de-de", "el-gr", "es-es", "et-ee", "fi-fi", "fr-fr", "it-it", "ja-jp", "lt-lt", "lv-lv", "nb-no", "nl-nl", "pl-pl", "pt-pt", "ro-ro", "ru-ru", "sk-sk", "sr-latn-rs", "sv-se", "tr-tr", "vi-vn", "zh-cn", "zh-tw"]
}
22 changes: 22 additions & 0 deletions docs/documentation/docs/about/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Releases

## 2.1.0

### Enhancements

- Auto-generated localizations
- `PropertyFieldNumber`: ability to set float values [#299](https://github.com/pnp/sp-dev-fx-property-controls/pull/299)
- `PropertyFieldGuid`: new GUID editor control [#300](https://github.com/pnp/sp-dev-fx-property-controls/pull/300)
- `FolderExplorerService`: support special characters if folder name [#305](https://github.com/pnp/sp-dev-fx-property-controls/pull/305)
- `FilePicker`: Stock Images support [#306](https://github.com/pnp/sp-dev-fx-property-controls/pull/306)

### Fixes

- Documentation: Fixed formatting of list of Controls [#298](https://github.com/pnp/sp-dev-fx-property-controls/pull/298)
- `PropertyFieldNumber`: gives "Maximum update depth exceeded" error [#282](https://github.com/pnp/sp-dev-fx-property-controls/issues/282)
- Documentation fix: `PropertyFieldCollectionData` - required custom field should call `onUpdate` before `onError` to correctly display required error message [#284](https://github.com/pnp/sp-dev-fx-property-controls/issues/284)
- `PropertyFieldNumber`: Improper handling of falsey minValue or maxValue [#150](https://github.com/pnp/sp-dev-fx-property-controls/issues/150)
- `PropertyFieldFilePicker`: Org Assets library is not displayed [#295](https://github.com/pnp/sp-dev-fx-property-controls/issues/295)

### Contributors

Special thanks to our contributors (in alphabetical order): [Anoop Tatti](https://github.com/anoopt), [Gautam Sheth](https://github.com/gautamdsheth), [Jim Love](https://github.com/jimmywim).

## 2.0.0

### New control(s)
Expand Down
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 @@ -104,12 +104,12 @@ Here is an example of how you can render your own controls in the `PropertyField
return (
React.createElement("div", null,
React.createElement("input", { key: itemId, value: value, onChange: (event: React.FormEvent<HTMLInputElement>) => {
onUpdate(field.id, event.currentTarget.value);
if (event.currentTarget.value === "error") {
onError(field.id, "Value shouldn't be equal to error");
} else {
onError(field.id, "");
}
onUpdate(field.id, event.currentTarget.value);
}}), " 🎉"
)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ The `PropertyFieldFilePicker` control can be configured with the following prope
| itemsCountQueryLimit | number | no | Number of items to obtain when executing REST queries. Default 100. |
| hideRecentTab | boolean | no | Specifies if RecentTab should be hidden. |
| hideWebSearchTab | boolean | no | Specifies if WebSearchTab should be hidden. |
| hideStockImages | boolean | no | Specifies if StockImagesTab should be hidden. |
| hideOrganisationalAssetTab | boolean | no | Specifies if OrganisationalAssetTab should be hidden. |
| hideOneDriveTab | boolean | no | Specifies if OneDriveTab should be hidden. |
| hideSiteFilesTab | boolean | no | Specifies if SiteFilesTab should be hidden. |
Expand Down
58 changes: 58 additions & 0 deletions docs/documentation/docs/controls/PropertyFieldGuid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# PropertyFieldGuid control

This control generates an input field for GUID. Incorrect GUID entered will result into an invalid input.

**PropertyFieldGuid example usage**

![PropertyFieldGuid example](../assets/PropertyFieldGuid.gif)

## How to use this control in your solutions

- 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.
- Import the following modules to your component:

```TypeScript
import { PropertyFieldGuid } from '@pnp/spfx-property-controls/lib/PropertyFieldGuid';
```

- Create a new property for your web part, for example:

```TypeScript
export interface IPropertyControlsTestWebPartProps {
guid: string;
}
```

- Add the custom property control to the `groupFields` of the web part property pane configuration:

```TypeScript
PropertyFieldGuid('guid', {
key: 'guid',
label: "GUID",
value: this.properties.guid
})
```

- You can also implement the property your own error message with the `errorMessage` property with the following syntax:

```TypeScript
PropertyFieldGuid('guid', {
key: 'guid',
label: "GUID",
value: this.properties.guid,
errorMessage: "Please enter a correct GUID"
})
```

## Implementation

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

| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| key | string | yes | An unique key that indicates the identity of this control. |
| label | string | yes | Property field label displayed on top. |
| value | string | no | Value to be displayed in the Guid field. |
| errorMessage | string | no | If set, this will be displayed as an error message. |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldGuid)
1 change: 1 addition & 0 deletions docs/documentation/docs/controls/PropertyFieldNumber.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ The `PropertyFieldNumber` control can be configured with the following propertie
| 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. |
| deferredValidationTime | number | no | Number field will start to validate after users stop typing for `deferredValidationTime` milliseconds. |
| precision | number | no | Precision to round the value to. If the precision is not defined the value is not rounded. |


![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldNumber)
5 changes: 4 additions & 1 deletion docs/documentation/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This repository provides developers with a set of reusable property pane control
In order to migrate to `v2` it is advicded to follow this guide: [Migrating from V1](./guides/migrate-from-v1).

!!! attention
The controls project has a minimal dependency on SharePoint Framework version `1.3.0`. Be aware that the controls might not work in solutions your building for on-premises. As for on-premises solutions version `1.1.0` will get used.
`v2` version of the controls project has a minimal dependency on SharePoint Framework version `1.11.0`. `v1` has a minimal dependency on SharePoint Framework version `1.3.0`. Be aware that the controls might not work in solutions your building for on-premises. As for on-premises solutions version `1.1.0` will get used.

## Getting started

Expand Down Expand Up @@ -49,12 +49,14 @@ telemetry.optOut();
## Controls

The following controls are currently available:

- [PropertyFieldCodeEditor](./controls/PropertyFieldCodeEditor) (Property pane code editor)
- [PropertyFieldCollectionData](./controls/PropertyFieldCollectionData) (Property pane collection data editor)
- [PropertyFieldColorPicker](./controls/PropertyFieldColorPicker) (Property pane color picker)
- [PropertyFieldDateTimePicker](./controls/PropertyFieldDateTimePicker) (Property pane date and time selector)
- [PropertyFieldFilePicker](./controls/PropertyFieldFilePicker) (Property pane file picker)
- [PropertyFieldFolderPicker](./controls/PropertyFieldFolderPicker) (Property pane folder picker)
- [PropertyFieldGuid](./controls/PropertyFieldGuid) (Property pane GUID editor)
- [PropertyFieldListPicker](./controls/PropertyFieldListPicker) (Property pane list selector)
- [PropertyFieldMessage](./controls/PropertyFieldMessage) (Property pane message)
- [PropertyFieldMultiSelect](./controls/PropertyFieldMultiSelect) (Property pane multi select dropdown)
Expand All @@ -76,6 +78,7 @@ The following controls are currently available:
- [PropertyPaneWebPartInformation](./controls/PropertyPaneWebPartInformation) (Property pane webpart information panel)

The following controls are extended controls that show a callout next to the label

- [PropertyFieldButtonWithCallout](./controls/PropertyFieldButtonWithCallout) (Property button field with callout)
- [PropertyFieldCheckboxWithCallout](./controls/PropertyFieldCheckboxWithCallout) (Property checkbox field with callout)
- [PropertyFieldChoiceGroupWithCallout](./controls/PropertyFieldChoiceGroupWithCallout) (Property choice group field with callout)
Expand Down
1 change: 1 addition & 0 deletions docs/documentation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ nav:
- PropertyFieldEnterpriseTermPicker: 'controls/PropertyFieldEnterpriseTermPicker.md'
- PropertyFieldFilePicker: 'controls/PropertyFieldFilePicker.md'
- PropertyFieldFolderPicker: 'controls/PropertyFieldFolderPicker.md'
- PropertyFieldGuidPicker: 'controls/PropertyFieldGuid.md'
- PropertyFieldListPicker: 'controls/PropertyFieldListPicker.md'
- PropertyFieldMessage: 'controls/PropertyFieldMessage.md'
- PropertyFieldMultiSelect: 'controls/PropertyFieldMultiSelect.md'
Expand Down
Loading

0 comments on commit 3578eff

Please sign in to comment.