Skip to content

Commit

Permalink
Merge pull request #941 from pnp/dev
Browse files Browse the repository at this point in the history
Merge for 3.2.0
  • Loading branch information
estruyf committed Jun 23, 2021
2 parents c1b1598 + c91987a commit 442607e
Show file tree
Hide file tree
Showing 96 changed files with 5,213 additions and 31,121 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ docs/documentation/site

# release
release
*.scss.d.ts
61 changes: 61 additions & 0 deletions CHANGELOG.JSON
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
{
"versions": [
{
"version": "3.2.0",
"changes": {
"new": [
"`DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)",
"`LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)"
],
"enhancements": [
"`fast-serve`: Add fast-serve support [#916](https://github.com/pnp/sp-dev-fx-controls-react/pull/916)",
"`ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#914](https://github.com/pnp/sp-dev-fx-controls-react/pull/914)",
"`PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)",
"`ListPicker`: add contenttype id to list picker [#894](https://github.com/pnp/sp-dev-fx-controls-react/issues/894)",
"`ListPicker`: Few more tests with a little better description [#906](https://github.com/pnp/sp-dev-fx-controls-react/pull/906)",
"Translations: Improved Finnish translations [#937](https://github.com/pnp/sp-dev-fx-controls-react/pull/937)"
],
"fixes": [
"Documentation for `RichText`: correct event handler name [#898](https://github.com/pnp/sp-dev-fx-controls-react/pull/898)",
"`SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)",
"`DatePicker`: Fix Spanish loc strings [#923](https://github.com/pnp/sp-dev-fx-controls-react/issues/923)",
"`FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)",
"`MyTeams`: Update MyTeams to use new library mgt-spfx [#918](https://github.com/pnp/sp-dev-fx-controls-react/issues/918)",
"`FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)"
]
},
"contributions": [
"[Nikolay Belykh](https://github.com/nbelyh)",
"[Eduard Paul](https://github.com/eduardpaul)",
"[Patrik Hellgren](https://github.com/patrikhellgren)",
"[Peter Paul Kirschner](https://github.com/petkir)",
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)",
"[Russell gove](https://github.com/russgove)",
"[Sergei Sergeev](https://github.com/s-KaiNet)",
"[João Mendes](https://github.com/joaojmendes)",
"[Marcin Wojciechowski](https://github.com/mgwojciech)",
"[Gautam Sheth](https://github.com/gautamdsheth)"
]
},
{
"version": "3.1.0",
"changes": {
Expand Down Expand Up @@ -56,6 +93,30 @@
},
"contributions": []
},
{
"version": "2.8.0",
"changes": {
"new": [
"`DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)",
"`LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)"
],
"enhancements": [
"`ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)",
"`PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)"
],
"fixes": [
"`SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)",
"`FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)",
"`FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)"
]
},
"contributions": [
"[Nikolay Belykh](https://github.com/nbelyh)",
"[Patrik Hellgren](https://github.com/patrikhellgren)",
"[Peter Paul Kirschner](https://github.com/petkir)",
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)"
]
},
{
"version": "2.7.0",
"changes": {
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Releases

## 3.2.0

### New control(s)

- `DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)
- `LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)

### Enhancements

- `fast-serve`: Add fast-serve support [#916](https://github.com/pnp/sp-dev-fx-controls-react/pull/916)
- `ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#914](https://github.com/pnp/sp-dev-fx-controls-react/pull/914)
- `PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)
- `ListPicker`: add contenttype id to list picker [#894](https://github.com/pnp/sp-dev-fx-controls-react/issues/894)
- `ListPicker`: Few more tests with a little better description [#906](https://github.com/pnp/sp-dev-fx-controls-react/pull/906)
- Translations: Improved Finnish translations [#937](https://github.com/pnp/sp-dev-fx-controls-react/pull/937)

### Fixes

- Documentation for `RichText`: correct event handler name [#898](https://github.com/pnp/sp-dev-fx-controls-react/pull/898)
- `SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)
- `DatePicker`: Fix Spanish loc strings [#923](https://github.com/pnp/sp-dev-fx-controls-react/issues/923)
- `FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)
- `MyTeams`: Update MyTeams to use new library mgt-spfx [#918](https://github.com/pnp/sp-dev-fx-controls-react/issues/918)
- `FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)

### Contributors

Special thanks to our contributors (in alphabetical order): [Nikolay Belykh](https://github.com/nbelyh), [Eduard Paul](https://github.com/eduardpaul), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [Russell gove](https://github.com/russgove), [Sergei Sergeev](https://github.com/s-KaiNet), [João Mendes](https://github.com/joaojmendes), [Marcin Wojciechowski](https://github.com/mgwojciech), [Gautam Sheth](https://github.com/gautamdsheth).

## 3.1.0

### New control(s)
Expand Down Expand Up @@ -45,6 +74,28 @@ Special thanks to our contributors (in alphabetical order): [Ari Gunawan](https:
- SharePoint Framework v1.12 support (breaking change)
- Fluent UI v7 support

## 2.8.0

### New control(s)

- `DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)
- `LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)

### Enhancements

- `ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)
- `PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)

### Fixes

- `SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)
- `FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)
- `FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)

### Contributors

Special thanks to our contributors (in alphabetical order): [Nikolay Belykh](https://github.com/nbelyh), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog).

## 2.7.0

### New control(s)
Expand Down
51 changes: 51 additions & 0 deletions docs/documentation/docs/about/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Releases

## 3.2.0

### New control(s)

- `DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)
- `LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)

### Enhancements

- `fast-serve`: Add fast-serve support [#916](https://github.com/pnp/sp-dev-fx-controls-react/pull/916)
- `ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#914](https://github.com/pnp/sp-dev-fx-controls-react/pull/914)
- `PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)
- `ListPicker`: add contenttype id to list picker [#894](https://github.com/pnp/sp-dev-fx-controls-react/issues/894)
- `ListPicker`: Few more tests with a little better description [#906](https://github.com/pnp/sp-dev-fx-controls-react/pull/906)
- Translations: Improved Finnish translations [#937](https://github.com/pnp/sp-dev-fx-controls-react/pull/937)

### Fixes

- Documentation for `RichText`: correct event handler name [#898](https://github.com/pnp/sp-dev-fx-controls-react/pull/898)
- `SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)
- `DatePicker`: Fix Spanish loc strings [#923](https://github.com/pnp/sp-dev-fx-controls-react/issues/923)
- `FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)
- `MyTeams`: Update MyTeams to use new library mgt-spfx [#918](https://github.com/pnp/sp-dev-fx-controls-react/issues/918)
- `FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)

### Contributors

Special thanks to our contributors (in alphabetical order): [Nikolay Belykh](https://github.com/nbelyh), [Eduard Paul](https://github.com/eduardpaul), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [Russell gove](https://github.com/russgove), [Sergei Sergeev](https://github.com/s-KaiNet), [João Mendes](https://github.com/joaojmendes), [Marcin Wojciechowski](https://github.com/mgwojciech), [Gautam Sheth](https://github.com/gautamdsheth).

## 3.1.0

### New control(s)
Expand Down Expand Up @@ -45,6 +74,28 @@ Special thanks to our contributors (in alphabetical order): [Ari Gunawan](https:
- SharePoint Framework v1.12 support (breaking change)
- Fluent UI v7 support

## 2.8.0

### New control(s)

- `DynamicForm`: New Control: Dynamic form [#878](https://github.com/pnp/sp-dev-fx-controls-react/issues/878)
- `LocationPicker`: New Control - Location Picker [#915](https://github.com/pnp/sp-dev-fx-controls-react/issues/915)

### Enhancements

- `ComboBoxListItemPicker` and `ListItemPicker`: Add label to control [#910](https://github.com/pnp/sp-dev-fx-controls-react/pull/910)
- `PeoplePicker`: new property `groupId`. [#917](https://github.com/pnp/sp-dev-fx-controls-react/pull/917)

### Fixes

- `SitePicker`: `SitePicker` does not display initial sites until you click the dropdown to select [#895](https://github.com/pnp/sp-dev-fx-controls-react/issues/895)
- `FilePicker`: invalid CSS: relative in quotes. [#930](https://github.com/pnp/sp-dev-fx-controls-react/pull/930)
- `FieldCollectionData`: FieldCollectionData is not setting sortIdx on resulting collection when using 'Add and Save' [#929](https://github.com/pnp/sp-dev-fx-controls-react/issues/929)

### Contributors

Special thanks to our contributors (in alphabetical order): [Nikolay Belykh](https://github.com/nbelyh), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog).

## 2.7.0

### New control(s)
Expand Down
Binary file added docs/documentation/docs/assets/DynamicForm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/documentation/docs/assets/location1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/documentation/docs/assets/location2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/documentation/docs/assets/location3.png
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.
1 change: 1 addition & 0 deletions docs/documentation/docs/controls/ComboBoxListItemPicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@ The `ComboBoxListItemPicker` control can be configured with the following proper
| multiSelect | boolean | no | Allows multiple selection|
| onInitialized | () => void | no | Calls when component is ready|
| itemLimit | number | no | Maximum number of items to be displayed in the combobox. Default: 100 |
| label | string | no | Specifies the text describing the combobox ListItemPicker. |

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

This control can dynamically generate SharePoint list or SharePoint document library form and everything controlled through list setting.

## 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 following modules to your component:

```TypeScript
import { DynamicForm } from "fx-controls-react/lib/DynamicForm";
```

- Use the DynamicForm control in your code as follows:

```jsx
<DynamicForm
context={this.props.context}
listId={"3071c058-549f-461d-9d73-8b9a52049a80"}
listItemId={1}>
onCancelled={() => { console.log('Cancelled') }}
onBeforeSubmit={(async listItem) => { return true; }}
onSubmitError={(listItem, error) => { alert(error.message); }}
onSubmitted={async (listItemData) => { console.log(listItemData); }}>
</DynamicForm>
```
![DynamicForm](../assets/DynamicForm.png)

## Implementation

The `DynamicForm` 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 | yes | Guid of the list.|
| listItemId | number | no | list item ID. |
| contentTypeId | string | no | content type ID |
| disabled | boolean | no | Option allow to be enable or disable. Default value is `false`|
| onBeforeSubmit | (listItemData: any) => Promise&lt;boolean&gt; | no | Before submit handler. Allows to modify the object to be submitted or cancel the submission. |
| onSubmitted | (listItem: any) => void | no | Method that returns listItem data JSON object. |
| onSubmitError | (listItemData: any, error: Error) => void | no | Handler of submission error. |
| onCancelled | () => void | no | Handler when form has been cancelled. |
21 changes: 20 additions & 1 deletion docs/documentation/docs/controls/ListItemAttachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@ import { ListItemAttachments } from '@pnp/spfx-controls-react/lib/ListItemAttach
disabled={false} />
```

- If You want to use `ListItemAttachments` controls with new form You have to use React.createRef.

Following example will add selected attachments to list item with id = 1

```TypeScript
let listItemAttachmentsComponentReference = React.createRef<ListItemAttachments>();
...
<ListItemAttachments
ref={listItemAttachmentsComponentReference}
context={this.props.context}
listId="dfcfdb95-2488-4757-b55b-14d94166ad87"
itemId={0} />
...
<PrimaryButton text="Save to Item with id 1" onClick={()=>{
//@ts-ignore
listItemAttachmentsComponentReference.current.uploadAttachments(1);
}} />
```

## Implementation

The `ListItemAttachments` control can be configured with the following properties:
Expand All @@ -37,7 +56,7 @@ The `ListItemAttachments` control can be configured with the following propertie
| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| context | BaseComponentContext | yes | SPFx web part or extention context |
| itemId | number | yes | List Item Id |
| itemId | number | no | List Item Id |
| listId | string | yes | Guid of the list. |
| webUrl | string | no | URL of the site. By default it uses the current site URL. |
| disabled | boolean | no | Specifies if the control is disabled or not. |
Expand Down
1 change: 1 addition & 0 deletions docs/documentation/docs/controls/ListItemPicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ The `ListItemPicker` control can be configured with the following properties:
| orderBy | string | no | condition to order by list Item, same as $orderby ODATA parameter|
| placeholder | string | no | Short text hint to display in empty picker |
| substringSearch | boolean | no | Specifies if substring search should be used |
| label | string | no | Specifies the text describing the ListItemPicker. |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/ListItemPicker)
5 changes: 4 additions & 1 deletion docs/documentation/docs/controls/ListPicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { ListPicker } from "@pnp/spfx-controls-react/lib/ListPicker";
label="Select your list(s)"
placeHolder="Select your list(s)"
baseTemplate={100}
contentTypeId="0x0101"
includeHidden={false}
multiSelect={false}
onSelectionChanged={this.onListPickerChange} />
Expand All @@ -56,13 +57,15 @@ The `ListPicker` control can be configured with the following properties:
| filter | string | no | Filter list from OData query (takes precendents over Hidden and BaseTemplate Filters). |
| includeHidden | boolean | no | Whether or not to include hidden lists. Default is `true`. |
| orderBy | LibsOrderBy | no | How to order the lists retrieved from SharePoint. |
| selectedList | string OR string[] | no | Keys 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. |
| selectedList | string OR string[] | no | Keys(list 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 | Optional mode indicates if multi-choice selections is allowed. Default to `false`. |
| label | string | no | Label to use for the control. |
| placeHolder | string | no | Placeholder label to show in the dropdown. **Deprecated. Use `placeholder` instead.** |
| placeholder | string | no | Placeholder label to show in the dropdown. |
| onSelectionChanged | (newValue: string OR string[]): void | no | Callback function when the selected option changes. |
| webAbsoulteUrl | string | no | Absolute Web Url of target site (user requires permissions) |
| contentTypeId | string | no | The Id if a content type which must be present in a list in order for the list to appear in the picker.|
| refreshToggle | boolean | no | If present can be used to force the control to refresh the list of lists by toggling its value|

Enum `LibsOrderBy`

Expand Down
Loading

0 comments on commit 442607e

Please sign in to comment.