Skip to content

Commit 361a5e4

Browse files
authored
Merge pull request #192 from SharePoint/dev
Merge for 1.16.0
2 parents 6390b9b + 30f6c12 commit 361a5e4

Some content is hidden

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

42 files changed

+265
-62
lines changed

CHANGELOG.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"versions": [
3+
{
4+
"version": "1.16.0",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [
8+
"`PropertyFieldCollectionData`: Add the ability for field validation to the custom fields [#187](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/190)",
9+
"`PropertyFieldCollectionData`: Ability to provide custom labels for the save and cancel buttons [#187](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/187)",
10+
"`PropertyFieldListPicker`: add ability to filter the control via OData [#184](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/184)"
11+
],
12+
"fixes": [
13+
"Documentation getting started links fixed [#191](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/191)",
14+
"Fix for callout controls missing icon since SPFx `1.8.2` [#182](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/182)"
15+
]
16+
},
17+
"contributions": [
18+
"[araver](https://github.com/araver)",
19+
"[Chad Eiserloh](https://github.com/c-eiser13)"
20+
]
21+
},
322
{
423
"version": "1.15.0",
524
"changes": {
@@ -168,7 +187,7 @@
168187
"new": [],
169188
"enhancements": [
170189
"New telemetry approach which allows you to use Application Insights instance [#79](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/79)",
171-
"`PropertyFieldListPicker` add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)"
190+
"`PropertyFieldListPicker`: add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)"
172191
],
173192
"fixes": []
174193
},

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Releases
22

3+
## 1.16.0
4+
5+
### Enhancements
6+
7+
- `PropertyFieldCollectionData`: Add the ability for field validation to the custom fields [#187](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/190)
8+
- `PropertyFieldCollectionData`: Ability to provide custom labels for the save and cancel buttons [#187](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/187)
9+
- `PropertyFieldListPicker`: add ability to filter the control via OData [#184](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/184)
10+
11+
### Fixes
12+
13+
- Documentation getting started links fixed [#191](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/191)
14+
- Fix for callout controls missing icon since SPFx `1.8.2` [#182](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/182)
15+
16+
### Contributors
17+
18+
Special thanks to our contributors (in alphabetical order): [araver](https://github.com/araver), [Chad Eiserloh](https://github.com/c-eiser13).
19+
320
## 1.15.0
421

522
### Enhancements
@@ -147,7 +164,7 @@ Special thanks to our contributors (in alphabetical order): [Paul Bullock](https
147164
### Enhancements
148165

149166
- New telemetry approach which allows you to use Application Insights instance [#79](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/79)
150-
- `PropertyFieldListPicker` add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)
167+
- `PropertyFieldListPicker`: add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)
151168

152169
### Contributors
153170

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Releases
22

3+
## 1.16.0
4+
5+
### Enhancements
6+
7+
- `PropertyFieldCollectionData`: Add the ability for field validation to the custom fields [#187](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/190)
8+
- `PropertyFieldCollectionData`: Ability to provide custom labels for the save and cancel buttons [#187](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/187)
9+
- `PropertyFieldListPicker`: add ability to filter the control via OData [#184](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/184)
10+
11+
### Fixes
12+
13+
- Documentation getting started links fixed [#191](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/191)
14+
- Fix for callout controls missing icon since SPFx `1.8.2` [#182](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/182)
15+
16+
### Contributors
17+
18+
Special thanks to our contributors (in alphabetical order): [araver](https://github.com/araver), [Chad Eiserloh](https://github.com/c-eiser13).
19+
320
## 1.15.0
421

522
### Enhancements
@@ -147,7 +164,7 @@ Special thanks to our contributors (in alphabetical order): [Paul Bullock](https
147164
### Enhancements
148165

149166
- New telemetry approach which allows you to use Application Insights instance [#79](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/79)
150-
- `PropertyFieldListPicker` add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)
167+
- `PropertyFieldListPicker`: add optional property for target site [#21](https://github.com/SharePoint/sp-dev-fx-property-controls/issues/21)
151168

152169
### Contributors
153170

docs/documentation/docs/controls/PropertyFieldButtonWithCallout.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This control generates a button control with a callout.
1313

1414
## How to use this control in your solutions
1515

16-
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.
16+
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.
1717
2. Import the following modules to your component:
1818

1919
```TypeScript
@@ -53,4 +53,4 @@ Enum `CalloutTriggers`
5353
| Hover | Shows the callout when you click on the icon |
5454

5555

56-
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldButtonWithCallout)
56+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldButtonWithCallout)

docs/documentation/docs/controls/PropertyFieldCheckboxWithCallout.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This control generates a checkbox control with a callout.
1313

1414
## How to use this control in your solutions
1515

16-
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.
16+
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.
1717
2. Import the following modules to your component:
1818

1919
```TypeScript
@@ -61,4 +61,4 @@ Enum `CalloutTriggers`
6161
| Hover | Shows the callout when you click on the icon |
6262

6363

64-
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldCheckboxWithCallout)
64+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldCheckboxWithCallout)

docs/documentation/docs/controls/PropertyFieldChoiceGroupWithCallout.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This control generates a choice group control with a callout.
1313

1414
## How to use this control in your solutions
1515

16-
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.
16+
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.
1717
2. Import the following modules to your component:
1818

1919
```TypeScript
@@ -72,4 +72,4 @@ Enum `CalloutTriggers`
7272
| Hover | Shows the callout when you click on the icon |
7373

7474

75-
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldChoiceGroupWithCallout)
75+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldChoiceGroupWithCallout)

docs/documentation/docs/controls/PropertyFieldCodeEditor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This control generates a code editor which can be used to add custom styling or
1212

1313
## How to use this control in your solutions
1414

15-
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.
15+
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.
1616
2. Import the following modules to your component:
1717

1818
```TypeScript

docs/documentation/docs/controls/PropertyFieldCollectionData.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The type of data you get returned depends on the fields you defined. For the exa
1919

2020
## How to use this control in your solutions
2121

22-
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.
22+
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.
2323
2. Import the following modules to your component:
2424

2525
```TypeScript
@@ -103,7 +103,14 @@ Here is an example of how you can render your own controls in the `PropertyField
103103
onCustomRender: (field, value, onUpdate, item, itemId) => {
104104
return (
105105
React.createElement("div", null,
106-
React.createElement("input", { key: itemId, value: value, onChange: (event: React.FormEvent<HTMLInputElement>) => onUpdate(field.id, event.currentTarget.value) }), " 🎉"
106+
React.createElement("input", { key: itemId, value: value, onChange: (event: React.FormEvent<HTMLInputElement>) => {
107+
if (event.currentTarget.value === "error") {
108+
onError(field.id, "Value shouldn't be equal to error");
109+
} else {
110+
onError(field.id, "");
111+
}
112+
onUpdate(field.id, event.currentTarget.value);
113+
}}), " 🎉"
107114
)
108115
);
109116
}
@@ -121,6 +128,9 @@ The `PropertyFieldCollectionData` control can be configured with the following p
121128
| panelHeader | string | yes | Label to be used as the header in the panel. | |
122129
| panelDescription | string | no | Property that allows you to specify a description in the collection panel. | |
123130
| manageBtnLabel | string | yes | Label of the button to open the panel. | |
131+
| saveBtnLabel | string | no | Label of the save button. | |
132+
| saveAndAddBtnLabel | string | yes | Label of the save and add button. | |
133+
| cancelBtnLabel | string | yes | Label of the cancel button. | |
124134
| fields | ICustomCollectionField[] | yes | The fields to be used for the list of collection data. | |
125135
| value | string | yes | The collection data value. | |
126136
| enableSorting | boolean | no | Specify if you want to be able to sort the items in the collection. | false |
@@ -145,7 +155,7 @@ Interface `ICustomCollectionField`
145155
| defaultValue | any | no | Specify a default value for the input field. |
146156
| deferredValidationTime | number | no | Field will start to validate after users stop typing for `deferredValidationTime` milliseconds. Default: 200ms. |
147157
| 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. |
148-
| onCustomRender | (field: ICustomCollectionField, value: any, onUpdate: (fieldId: string, value: any) => void, item: any, itemUniqueId: string) => JSX.Element | no | This property is only required if you are using the `custom` field type and it can be used to specify the custom rendering of your control in the collection data. |
158+
| onCustomRender | (field: ICustomCollectionField, value: any, onUpdate: (fieldId: string, value: any) => void, item: any, itemUniqueId: string, onCustomFieldValidation: (fieldId: string, errorMessage: string) => void) => JSX.Element | no | This property is only required if you are using the `custom` field type and it can be used to specify the custom rendering of your control in the collection data. |
149159

150160
Enum `CustomCollectionFieldType`
151161

docs/documentation/docs/controls/PropertyFieldColorPicker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This control generates a color picker that you can use inside the property pane.
1212

1313
## How to use this control in your solutions
1414

15-
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.
15+
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.
1616
2. Import the following modules to your component:
1717

1818
```TypeScript

docs/documentation/docs/controls/PropertyFieldDateTimePicker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The control can be configured to be date only or date and time.
1919

2020
## How to use this control in your solutions
2121

22-
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.
22+
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.
2323
2. Import the following modules to your component:
2424

2525
```TypeScript
@@ -93,4 +93,4 @@ Enum `TimeConvention`
9393
| Hours12 | Specify the hours in 12-hours (AM / PM) time convention. |
9494
| Hours24 | Specify the hours in 24-hours time convention. |
9595

96-
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldDateTimePicker)
96+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-property-controls/wiki/PropertyFieldDateTimePicker)

0 commit comments

Comments
 (0)