Skip to content

Commit 285cb32

Browse files
Merge pull request #1757 from pnp/dev
3.17.0
2 parents 8893c3c + 289b059 commit 285cb32

File tree

84 files changed

+4635
-1512
lines changed

Some content is hidden

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

84 files changed

+4635
-1512
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ obj
3535
*.tgz
3636

3737
# VSCode
38-
.vscode
38+
.vscode/*
39+
40+
# Included VSCode files
41+
!.vscode/example-tasks.json
42+
!.vscode/example-launch.json
3943

4044
# Documentation
4145
docs/documentation/site

.vscode/example-launch.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
/**
3+
* Populate and rename this file to launch.json to configure debugging
4+
*/
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Hosted workbench (chrome)",
9+
"type": "chrome",
10+
"request": "launch",
11+
"url": "https://enter-your-SharePoint-site.sharepoint.com/sites/mySite/_layouts/15/workbench.aspx",
12+
"webRoot": "${workspaceRoot}",
13+
"sourceMaps": true,
14+
"sourceMapPathOverrides": {
15+
"webpack:///.././src/*": "${webRoot}/src/*",
16+
"webpack:///../../../src/*": "${webRoot}/src/*",
17+
"webpack:///../../../../src/*": "${webRoot}/src/*",
18+
"webpack:///../../../../../src/*": "${webRoot}/src/*"
19+
},
20+
"preLaunchTask": "npm: serve",
21+
"runtimeArgs": [
22+
"--remote-debugging-port=9222",
23+
]
24+
},
25+
{
26+
"name": "Hosted workbench (edge)",
27+
"type": "edge",
28+
"request": "launch",
29+
"url": "https://enter-your-SharePoint-site.sharepoint.com/sites/mySite/_layouts/15/workbench.aspx",
30+
"webRoot": "${workspaceRoot}",
31+
"sourceMaps": true,
32+
"sourceMapPathOverrides": {
33+
"webpack:///.././src/*": "${webRoot}/src/*",
34+
"webpack:///../../../src/*": "${webRoot}/src/*",
35+
"webpack:///../../../../src/*": "${webRoot}/src/*",
36+
"webpack:///../../../../../src/*": "${webRoot}/src/*"
37+
},
38+
"preLaunchTask": "npm: serve",
39+
"runtimeArgs": [
40+
"--remote-debugging-port=9222",
41+
]
42+
},
43+
]
44+
}

.vscode/example-tasks.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
/**
3+
* Populate and rename this file to launch.json to configure debugging
4+
*/
5+
"version": "2.0.0",
6+
"tasks": [
7+
{
8+
"type": "npm",
9+
"script": "serve",
10+
"isBackground": true,
11+
"problemMatcher": {
12+
"owner": "custom",
13+
"pattern": {
14+
"regexp": "."
15+
},
16+
"background": {
17+
"activeOnStart": true,
18+
"beginsPattern": "Starting 'bundle'",
19+
"endsPattern": "\\[\\sFinished\\s\\]"
20+
}
21+
},
22+
"label": "npm: serve",
23+
"detail": "gulp bundle --custom-serve --max_old_space_size=4096 && fast-serve",
24+
"group": {
25+
"kind": "build",
26+
"isDefault": true
27+
}
28+
},
29+
]
30+
}

CHANGELOG.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
{
22
"versions": [
3+
{
4+
"version": "3.17.0",
5+
"changes":{
6+
"new": [],
7+
"enhancements": [
8+
"`DyanmicForm`: Added file handling [#1625](https://github.com/pnp/sp-dev-fx-controls-react/pull/1625)",
9+
"`DynamicForm`: Custom Formatting and Validation, ControlsTestWebPart updates [#1672](https://github.com/pnp/sp-dev-fx-controls-react/pull/1672)",
10+
"`PeoplePicker`: Added custom filter to PeoplePicker selection [#1657](https://github.com/pnp/sp-dev-fx-controls-react/issues/1657)",
11+
"`RichText`: Align RichText heading styles and font sizes with OOB SharePoint text web part [#1706](https://github.com/pnp/sp-dev-fx-controls-react/pull/1706)"
12+
],
13+
"fixes": [
14+
"Build fails due to missing @iconify/react dependency after upgrade to 3.16.0 [#1719](https://github.com/pnp/sp-dev-fx-controls-react/issues/1719)",
15+
"`ModernTaxonomyPicker`: not displaying suggestions when typing in values - API not found error [#1688](https://github.com/pnp/sp-dev-fx-controls-react/issues/1688)",
16+
"`DynamicForm`: Disable issue on fieldOverrides field control when onBeforeSubmit return true [#1715](https://github.com/pnp/sp-dev-fx-controls-react/issues/1715)",
17+
"`PeoplePicker`: PeoplePicker returns no results with webAbsoluteUrl and ensureUser [#1669](https://github.com/pnp/sp-dev-fx-controls-react/issues/1669)",
18+
"`DynamicForm`: [DynamicForm] Fixing multi taxonomy field (loading + saving existing item) [#1739](https://github.com/pnp/sp-dev-fx-controls-react/pull/1739)"
19+
]
20+
},
21+
"contributions": [
22+
"[Guido Zambarda](https://github.com/GuidoZam)",
23+
"[Lars Fernhomberg](https://github.com/lafe)",
24+
"[Mark Bice](https://github.com/mbice)",
25+
"[Michaël Maillot](https://github.com/michaelmaillot)",
26+
"[Nishkalank Bezawada](https://github.com/NishkalankBezawada)",
27+
"[Tom G](https://github.com/t0mgerman)",
28+
"[wuxiaojun514](https://github.com/wuxiaojun514)"
29+
]
30+
},
331
{
432
"version": "3.16.2",
533
"changes": {

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Releases
22

3+
## 3.17.0
4+
5+
### Enhancements
6+
7+
- `DyanmicForm`: Added file handling [#1625](https://github.com/pnp/sp-dev-fx-controls-react/pull/1625)
8+
- `DynamicForm`: Custom Formatting and Validation, ControlsTestWebPart updates [#1672](https://github.com/pnp/sp-dev-fx-controls-react/pull/1672)
9+
- `PeoplePicker`: Added custom filter to PeoplePicker selection [#1657](https://github.com/pnp/sp-dev-fx-controls-react/issues/1657)
10+
- `RichText`: Align RichText heading styles and font sizes with OOB SharePoint text web part [#1706](https://github.com/pnp/sp-dev-fx-controls-react/pull/1706)
11+
12+
### Fixes
13+
14+
- Build fails due to missing @iconify/react dependency after upgrade to 3.16.0 [#1719](https://github.com/pnp/sp-dev-fx-controls-react/issues/1719)
15+
- `ModernTaxonomyPicker`: not displaying suggestions when typing in values - API not found error [#1688](https://github.com/pnp/sp-dev-fx-controls-react/issues/1688)
16+
- `DynamicForm`: Disable issue on fieldOverrides field control when onBeforeSubmit return true [#1715](https://github.com/pnp/sp-dev-fx-controls-react/issues/1715)
17+
- `PeoplePicker`: PeoplePicker returns no results with webAbsoluteUrl and ensureUser [#1669](https://github.com/pnp/sp-dev-fx-controls-react/issues/1669)
18+
- `DynamicForm`: [DynamicForm] Fixing multi taxonomy field (loading + saving existing item) [#1739](https://github.com/pnp/sp-dev-fx-controls-react/pull/1739)
19+
20+
### Contributors
21+
22+
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Lars Fernhomberg](https://github.com/lafe), [Mark Bice](https://github.com/mbice), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Tom G](https://github.com/t0mgerman), [wuxiaojun514](https://github.com/wuxiaojun514).
23+
324
## 3.16.2
425

526
### Fixes

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Releases
22

3+
## 3.17.0
4+
5+
### Enhancements
6+
7+
- `DyanmicForm`: Added file handling [#1625](https://github.com/pnp/sp-dev-fx-controls-react/pull/1625)
8+
- `DynamicForm`: Custom Formatting and Validation, ControlsTestWebPart updates [#1672](https://github.com/pnp/sp-dev-fx-controls-react/pull/1672)
9+
- `PeoplePicker`: Added custom filter to PeoplePicker selection [#1657](https://github.com/pnp/sp-dev-fx-controls-react/issues/1657)
10+
- `RichText`: Align RichText heading styles and font sizes with OOB SharePoint text web part [#1706](https://github.com/pnp/sp-dev-fx-controls-react/pull/1706)
11+
12+
### Fixes
13+
14+
- Build fails due to missing @iconify/react dependency after upgrade to 3.16.0 [#1719](https://github.com/pnp/sp-dev-fx-controls-react/issues/1719)
15+
- `ModernTaxonomyPicker`: not displaying suggestions when typing in values - API not found error [#1688](https://github.com/pnp/sp-dev-fx-controls-react/issues/1688)
16+
- `DynamicForm`: Disable issue on fieldOverrides field control when onBeforeSubmit return true [#1715](https://github.com/pnp/sp-dev-fx-controls-react/issues/1715)
17+
- `PeoplePicker`: PeoplePicker returns no results with webAbsoluteUrl and ensureUser [#1669](https://github.com/pnp/sp-dev-fx-controls-react/issues/1669)
18+
- `DynamicForm`: [DynamicForm] Fixing multi taxonomy field (loading + saving existing item) [#1739](https://github.com/pnp/sp-dev-fx-controls-react/pull/1739)
19+
20+
### Contributors
21+
22+
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Lars Fernhomberg](https://github.com/lafe), [Mark Bice](https://github.com/mbice), [Michaël Maillot](https://github.com/michaelmaillot), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Tom G](https://github.com/t0mgerman), [wuxiaojun514](https://github.com/wuxiaojun514).
23+
324
## 3.16.2
425

526
### Fixes
Loading

docs/documentation/docs/controls/DynamicForm.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ import { DynamicForm } from "@pnp/spfx-controls-react/lib/DynamicForm";
2626
```
2727
![DynamicForm](../assets/DynamicForm.png)
2828

29+
## File selection
30+
31+
To upload a file when creating a new document in a document library you need to specify:
32+
- enableFileSelection: Set this parameter to true to enable file selection.
33+
- contentTypeId: This parameter specifies the target content type ID of the document you are creating.
34+
- supportedFileExtensions: This parameter is optional and is used to specify the supported file extensions if they are different from the default ones.
35+
36+
Enabling the file selection will display a new button on top of the form that allow the user to select a file from the recent files, browsing OneDrive or select and upload a file from the computer.
37+
38+
![DynamicFormWithFileSelection](../assets/DynamicFormWithFileSelection.png)
39+
2940
## Implementation
3041

3142
The `DynamicForm` can be configured with the following properties:
@@ -38,13 +49,15 @@ The `DynamicForm` can be configured with the following properties:
3849
| contentTypeId | string | no | content type ID |
3950
| disabled | boolean | no | Allows form to be disabled. Default value is `false`|
4051
| disabledFields | string[] | no | InternalName of fields that should be disabled. Default value is `false`|
52+
| enableFileSelection | boolean | no | Specify if the form should support the creation of a new list item in a document library attaching a file to it. This option is only available for document libraries and works only when the contentTypeId is specified and has a base type of type Document. Default value is `false`|
4153
| hiddenFields | string[] | no | InternalName of fields that should be hidden. Default value is `false`|
4254
| onListItemLoaded | (listItemData: any) => Promise<void> | no | List item loaded handler. Allows to access list item information after it's loaded.|
4355
| onBeforeSubmit | (listItemData: any) => Promise<boolean> | no | Before submit handler. Allows to modify the object to be submitted or cancel the submission. To cancel, return `true`.|
4456
| onSubmitted | (listItemData: any, listItem?: IItem) => void | no | Method that returns listItem data JSON object and PnPJS list item instance (`IItem`). |
4557
| onSubmitError | (listItemData: any, error: Error) => void | no | Handler of submission error. |
4658
| onCancelled | () => void | no | Handler when form has been cancelled. |
4759
| returnListItemInstanceOnSubmit | boolean | no | Specifies if `onSubmitted` event should pass PnPJS list item (`IItem`) as a second parameter. Default - `true` |
60+
| supportedFileExtensions | string[] | no | Specify the supported file extensions for the file picker. Only used when enableFileSelection is `true`. Default value is `["docx", "doc", "pptx", "ppt", "xlsx", "xls", "pdf"]`. |
4861
| webAbsoluteUrl | string | no | Absolute Web Url of target site (user requires permissions). |
4962
| fieldOverrides | {[columnInternalName: string] : {(fieldProperties: IDynamicFieldProps): React.ReactElement\<IDynamicFieldProps\>}} | no | Key value pair for fields you want to override. Key is the internal field name, value is the function to be called for the custom element to render. |
5063
| respectEtag | boolean | no | Specifies if the form should respect the ETag of the item. Default - `true` |

docs/documentation/docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ The following controls are currently available:
112112
- [TreeView](./controls/TreeView) (Tree View)
113113
- [UploadFiles](./controls/UploadFiles) (Upload Files)
114114
- [VariantThemeProvider](./controls/VariantThemeProvider) (Variant Theme Provider)
115+
- [ViewPicker](./controls/ViewPicker.md) (View Picker Control)
115116
- [WebPartTitle](./controls/WebPartTitle) (Customizable web part title control)
116117

117118

docs/documentation/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ nav:
7373
- TreeView: 'controls/TreeView.md'
7474
- UploadFiles: 'controls/UploadFiles.md'
7575
- VariantThemeProvider: 'controls/VariantThemeProvider.md'
76+
- ViewPicker: 'controls/ViewPicker.md'
7677
- WebPartTitle: 'controls/WebPartTitle.md'
7778
- 'Field Controls':
7879
- 'Getting started': 'controls/fields/main.md'

0 commit comments

Comments
 (0)