Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge for v1.18.0 release #554

Merged
merged 79 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
d3d5535
Updated import statement
siddharth-vaghasia Mar 24, 2020
9b92ba2
Update index.md
PrasadKasireddy Mar 24, 2020
cc4752c
Fix: additional check for OrgAssets HTTP request
gautamdsheth Mar 26, 2020
5fcadd8
Merge pull request #510 from siddharth-vaghasia/patch-2
AJIXuMuK Mar 27, 2020
fd00cea
1.18.0
AJIXuMuK Mar 27, 2020
645a54c
changelog, correct import for ListItemPicker and ComboBoxListItemPicker
AJIXuMuK Mar 27, 2020
8bc6018
changelog contributor
AJIXuMuK Mar 27, 2020
43f70d9
Merge pull request #511 from PrasadKasireddy/PrasadKasireddy-patch-1
AJIXuMuK Mar 27, 2020
e1c2dc8
changelog
AJIXuMuK Mar 27, 2020
b491e9a
Merge pull request #514 from gautamdsheth/filePickerFixes
AJIXuMuK Mar 27, 2020
5fc3a09
changelog
AJIXuMuK Mar 27, 2020
fbc7d93
Fix: icon picker search not working
gautamdsheth Mar 30, 2020
4f556ac
Minor improvements to icon picker, added it in test webpart
gautamdsheth Mar 31, 2020
07a7431
Fix: fileName not visible on upload tab #518
gautamdsheth Mar 31, 2020
4e74520
Fix: comboBoxListItemPicker onSelectedItem callback fix , fixed lodas…
gautamdsheth Mar 31, 2020
c433286
Add folder picker control
joelfmrodrigues Mar 31, 2020
8be1ec2
update test label
joelfmrodrigues Mar 31, 2020
2501ead
add missing export for FolderPicker
joelfmrodrigues Mar 31, 2020
16ddb57
Add missing documentation for FolderPicker control
joelfmrodrigues Mar 31, 2020
670f4b0
Change attachments filename boundaries
Gregghis Apr 2, 2020
3d591d6
Change to IconPicker Fix Search and refresh Icons
joaojmendes Apr 8, 2020
bbb04f9
Commit changes
joaojmendes Apr 8, 2020
bfe730d
Add support for selecting libraries if site url is provided as root
joelfmrodrigues Apr 9, 2020
04b6511
FolderExplorer - Allow additional items on breadcrumb
joelfmrodrigues Apr 9, 2020
92c26ea
added treeview control
siddharth-vaghasia Apr 10, 2020
c4f6b3a
Implemented IconProps and code formatting
nanddeepn Apr 10, 2020
d818fc6
fix issues related to aligment on icon due to removal of React.fragment
siddharth-vaghasia Apr 10, 2020
169ca11
added telementry to treeview.tsx
siddharth-vaghasia Apr 10, 2020
8f500fe
FolderExplorer - add support for other sites and fix breadcrumb names
joelfmrodrigues Apr 10, 2020
19273e0
Merge branch 'master' of https://github.com/siddharth-vaghasia/sp-dev…
siddharth-vaghasia Apr 11, 2020
e207992
Implemented renderCustomTreeItem
nanddeepn Apr 11, 2020
5760187
Updated images path
nanddeepn Apr 11, 2020
f4c775f
Updated style Without check boxes
nanddeepn Apr 11, 2020
1ad5749
Adding new Pagination Control
Apr 11, 2020
a14ea85
Merge pull request #535 from DRamalho92/pagination
AJIXuMuK Apr 11, 2020
31970d7
Merge branch 'dev' into folder-explorer-libraries
AJIXuMuK Apr 11, 2020
185b723
Merge pull request #534 from joelfmrodrigues/folder-explorer-libraries
AJIXuMuK Apr 11, 2020
44fcc5b
Merge pull request #533 from joaojmendes/newsControls
AJIXuMuK Apr 11, 2020
13c2559
changelog
AJIXuMuK Apr 11, 2020
646cebc
Final touches and updated documentation
siddharth-vaghasia Apr 12, 2020
77f990f
Merge branch 'dev' into master
AJIXuMuK Apr 12, 2020
170e11d
Merge pull request #536 from siddharth-vaghasia/master
AJIXuMuK Apr 12, 2020
c54acc6
new rederOption on IconPicker
joaojmendes Apr 12, 2020
cc30d3c
TreeView merge fix
AJIXuMuK Apr 12, 2020
f8b4b4c
changelog, TreeView documentation small updates
AJIXuMuK Apr 12, 2020
50125ef
Merge branch 'dev' into iconPickerNewViewOptions
AJIXuMuK Apr 12, 2020
f0e7aa1
Merge pull request #537 from joaojmendes/iconPickerNewViewOptions
AJIXuMuK Apr 12, 2020
8c034db
Merge pull request #529 from Gregghis/patch-1
AJIXuMuK Apr 12, 2020
b7acb1c
changelog, fix of #513, small improvements in IconPicker code
AJIXuMuK Apr 12, 2020
01ecbcd
Fix mistranslation in Japanese
karamem0 Apr 27, 2020
cb37469
Create sp-dev-fx-controls-react.yml
nokafor Apr 27, 2020
8618bcc
Merge branch 'dev' into add-folder-picker
AJIXuMuK Apr 28, 2020
a16abdb
merge with dev
AJIXuMuK Apr 28, 2020
5b08293
Merge branch 'joelfmrodrigues-add-folder-picker' into dev
AJIXuMuK Apr 28, 2020
69a6eab
changelog
AJIXuMuK Apr 28, 2020
8c8efc7
Merge pull request #523 from gautamdsheth/comboboxFix
AJIXuMuK Apr 28, 2020
6aa7577
changelog
AJIXuMuK Apr 28, 2020
81e808e
Merge branch 'filePickerUploadFix' of https://github.com/gautamdsheth…
AJIXuMuK Apr 28, 2020
fbc21e4
label style, display label with preview as well
AJIXuMuK Apr 28, 2020
5144958
Merge branch 'gautamdsheth-filePickerUploadFix' into dev
AJIXuMuK Apr 28, 2020
3a96e7b
changelog
AJIXuMuK Apr 28, 2020
5cd85e1
merge with dev and updates
AJIXuMuK Apr 28, 2020
75f277c
Merge branch 'gautamdsheth-iconPickerSearchFix' into dev
AJIXuMuK Apr 28, 2020
151fe35
changelog
AJIXuMuK Apr 28, 2020
84b9c81
Updating documenation for callback method
siddharth-vaghasia Apr 28, 2020
83c479b
Merge pull request #546 from nokafor/master
estruyf Apr 28, 2020
5a7a91b
Merge pull request #547 from siddharth-vaghasia/patch-3
AJIXuMuK Apr 29, 2020
bb5bd9a
changelog
AJIXuMuK Apr 29, 2020
7a58eda
ComboboxListItemPicker onSelectedItem doc update
AJIXuMuK Apr 29, 2020
92b8f1d
Merge branch 'master' of https://github.com/karamem0/sp-dev-fx-contro…
AJIXuMuK Apr 29, 2020
38d61e8
fixed ListItemAttachmentsfileDeleteError
AJIXuMuK Apr 29, 2020
65fa348
Merge branch 'karamem0-master' into dev
AJIXuMuK Apr 29, 2020
aebc832
changelog
AJIXuMuK Apr 29, 2020
81d88bb
ComboBoxListItemPicker documentation: `webUrl` was mentioned twice in…
AJIXuMuK Apr 30, 2020
e0e48d6
Fix of #542
AJIXuMuK May 5, 2020
fe3bf21
changelog
AJIXuMuK May 5, 2020
1170167
Updated all SP links
estruyf May 7, 2020
5e654f8
Updated changelog for v1.18.0 release
estruyf May 7, 2020
4d2e68b
Updated old repo links
estruyf May 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Thank you for reporting an issue, suggesting an enhancement, or asking a question. We appreciate your feedback - to help the team understand your
needs please complete the below template to ensure we have the details to help. Thanks!

**Please check out the [documentation](https://sharepoint.github.io/sp-dev-fx-controls-react/) to see if your question is already addressed there. This will help us ensure our documentation is up to date.**
**Please check out the [documentation](https://pnp.github.io/sp-dev-fx-controls-react/) to see if your question is already addressed there. This will help us ensure our documentation is up to date.**

#### Category
[ ] Enhancement
Expand Down
343 changes: 191 additions & 152 deletions CHANGELOG.JSON

Large diffs are not rendered by default.

336 changes: 184 additions & 152 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@

This is a open source library that shares a set of reusable React control that can be used in your SharePoint Framework solutions.

> If you are looking for web part property controls, please check following repository for those - [https://github.com/SharePoint/sp-dev-fx-property-controls](https://github.com/SharePoint/sp-dev-fx-property-controls)
> If you are looking for web part property controls, please check following repository for those - [https://github.com/pnp/sp-dev-fx-property-controls](https://github.com/pnp/sp-dev-fx-property-controls)

## Get Started

More information to get started can be found documentation of this repository: [documentation](https://sharepoint.github.io/sp-dev-fx-controls-react/).
More information to get started can be found documentation of this repository: [documentation](https://pnp.github.io/sp-dev-fx-controls-react/).

# Have issues or questions?

Please use following logic on submitting your questions or issues to right location to ensure that they are noticed and addressed as soon as possible.

* You have general question or challenge with SPFx - use [sp-dev-docs repository issue list](https://github.com/SharePoint/sp-dev-docs/issues).
* You have issue on specific controls in this package - use [issue list in this repository](https://github.com/SharePoint/sp-dev-fx-controls-react/issues).
* You have general question or challenge with SPFx - use [sp-dev-docs repository issue list](https://github.com/sharepoint/sp-dev-docs/issues).
* You have issue on specific controls in this package - use [issue list in this repository](https://github.com/pnp/sp-dev-fx-controls-react/issues).


## Contributing
Expand Down
336 changes: 184 additions & 152 deletions docs/documentation/docs/about/release-notes.md

Large diffs are not rendered by default.

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.
Binary file added docs/documentation/docs/assets/FolderPicker.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.
Binary file added docs/documentation/docs/assets/Pagination.gif
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.
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.
2 changes: 1 addition & 1 deletion docs/documentation/docs/beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ npm install @pnp/spfx-controls-react@next --save

## Beta control documentation

The control documentation is only live for public releases, not for beta versions. If you want to checkout the markdown files of all controls in the `dev` branch: [beta documentation](https://github.com/SharePoint/sp-dev-fx-controls-react/tree/dev/docs/documentation/docs/controls).
The control documentation is only live for public releases, not for beta versions. If you want to checkout the markdown files of all controls in the `dev` branch: [beta documentation](https://github.com/pnp/sp-dev-fx-controls-react/tree/dev/docs/documentation/docs/controls).

## Next Steps

Expand Down
45 changes: 38 additions & 7 deletions docs/documentation/docs/controls/ComboBoxListItemPicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here is an example of the control:
- Import the control into your component:

```TypeScript
import { ComboBoxListItemPicker } from '@pnp/spfx-controls-react/lib/ComboBoxListItemPicker';
import { ComboBoxListItemPicker } from '@pnp/spfx-controls-react/lib/ListItemPicker';
```
- Use the `ComboBoxListItemPicker` control in your code as follows:

Expand Down Expand Up @@ -61,13 +61,45 @@ import { ComboBoxListItemPicker } from '@pnp/spfx-controls-react/lib/ComboBoxLis
- The `onSelectedItem` change event returns the list items selected and can be implemented as follows:

```TypeScript
private onSelectedItem(data: { key: string; name: string }[]) {
for (const item of data) {
console.log(`Item value: ${item.key}`);
console.log(`Item text: ${item.name}`);
}
private onSelectedItem(items: []) {
console.log("selected items:", items);
}
```

If you can provide typing details to the implementation based on `columnInternalName` and `keyColumnInternalName`.
For example above:

```typescript
columnInternalName='Title'
keyColumnInternalName='Id'
// ...
private onSelectedItem(items: { Title: string, Id: string }[]) {
console.log("selected items:", items);
}
```

If you use variables for `columnInternalName` and `keyColumnInternalName` the typing will look as follow:
``` typescript
const columnInternalName = 'Title';
const keyColumnInternalName = 'Id';

<ComboBoxListItemPicker listId='da8daf15-d84f-4ab1-9800-7568f82fed3f'
columnInternalName={columnInternalName}
keyColumnInternalName={keyColumnInternalName}
filter="Title eq 'SPFx'"
defaultSelectedItems: [2]
onSelectedItem={this.onSelectedItem}
webUrl={this.context.pageContext.web.absoluteUrl}
spHttpClient={this.context.spHttpClient} />

private onSelectedItem(items: {
[columnInternalName]: string,
[keyColumnInternalName]: string
}[]) {
console.log("selected items:", items);
}
```

## Implementation

The `ComboBoxListItemPicker` control can be configured with the following properties:
Expand All @@ -82,7 +114,6 @@ The `ComboBoxListItemPicker` control can be configured with the following proper
| listId | string | yes | Guid of the list. |
| onSelectItem | (items: any[]) => void | yes | Callback function which returns the selected items. |
| className | string | no | ClassName for the picker. |
| webUrl | string | no | URL of the site. By default it uses the current site URL. |
| defaultSelectedItems | any[] | no | Initial items that have already been selected and should appear in the people picker. Support objects and Ids only |
| suggestionsHeaderText | string | no | The text that should appear at the top of the suggestion box. |
| noResultsFoundText | string | no | The text that should appear when no results are returned. |
Expand Down
4 changes: 3 additions & 1 deletion docs/documentation/docs/controls/FolderExplorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ The `FolderExplorer` control can be configured with the following properties:
| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| context | WebPartContext \| ExtensionContext | yes | The context object of the SPFx loaded webpart or customizer. |
| rootFolder | IFolder | yes | The lowest level folder that can be explored. This can be the root folder of a library. |
| siteAbsoluteUrl | string | no | The absolute url of the target site. Only required if not the current site. |
| rootFolder | IFolder | yes | The lowest level folder that can be explored. This can be the root folder of a library. If site url is provided, it will allow the user to select a document library |
| defaultFolder | IFolder | yes | The default folder to be explored. |
| canCreateFolders | boolean | no | Allow current user to create folders on the target location. If enabled, you need to ensure that the user has the required permissions. |
| hiddenBreadcrumb | boolean | no | Hide the breadcrumb control. |
| initialBreadcrumbItems | IBreadcrumbItem | no | Additional items to be added to the beginning of the breadcrumb. |
| hiddenFilterBox | boolean | no | Hide the filter box |
| onSelect | (folder: IFolder): void | no | Callback function called after a folder is selected. |

Expand Down
68 changes: 68 additions & 0 deletions docs/documentation/docs/controls/FolderPicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# FolderPicker control

This control allows you to explore and select a folder.
It also allows the user to create a new folder at the current level being explored.

Here is an example of the control:

![FolderPicker](../assets/FolderPicker.png)

`FolderPicker` no selection:

![FolderPicker no selection](../assets/FolderPicker-no-selection.png)

`FolderPicker` selection:

![FolderPicker selection](../assets/FolderPicker-selection.png)

`FolderPicker` selected:

![FolderPicker selected](../assets/FolderPicker-selected.png)

## 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 control into your component:

```TypeScript
import { FolderPicker, IFolder } from "@pnp/spfx-controls-react/lib/FolderPicker";
```

- Use the `FolderPicker` control in your code as follows:

```TypeScript
<FolderPicker context={this.props.context}
label='Folder Picker'
required={true}
rootFolder={{
Name: 'Documents',
ServerRelativeUrl: `/sites/TestSite/Shared Documents`
}}
onSelect={this._onFolderSelect}
canCreateFolders={true} />
```

- The `onSelect` change event returns the selected folder and can be implemented as follows:

```TypeScript
private _onFolderSelect = (folder: IFolder): void => {
console.log('selected folder', folder);
}
```

## Implementation

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

| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| context | WebPartContext \| ExtensionContext | yes | The context object of the SPFx loaded webpart or customizer. |
| label | string | yes | The label for the control. |
| rootFolder | IFolder | yes | The lowest level folder that can be explored. This can be the root folder of a library. |
| defaultFolder | IFolder | no | The default folder to be selected or explored. |
| required | boolean | no | Is selection required. |
| disabled | boolean | no | Is the control disabled. |
| canCreateFolders | boolean | no | Allow current user to create folders on the target location. If enabled, you need to ensure that the user has the required permissions. |
| onSelect | (folder: IFolder): void | no | Callback function called after a folder is selected. |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/FolderPicker)
14 changes: 13 additions & 1 deletion docs/documentation/docs/controls/IconPicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Icon picker always opens a new panel where you can pick an icon. The panel displ
![Icon Picker panel](../assets/IconPickerPanel.gif)


## Displayed in the dialog
Icon picker always opens a new dialog where you can pick an icon. The dialog displays all the icons and maintains readability. Picker does not displays selected icon outside the dialog.
![Icon Picker panel](../assets/IconPicker_dialog.gif)

## How to use this control

- 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.
Expand All @@ -29,6 +33,13 @@ import { IconPicker } from '@pnp/spfx-controls-react/lib/IconPicker';
onSave={(iconName: string) => { this.setState({icon: iconName}); }} />
```

```TypeScript
<IconPicker buttonLabel={'Icon'}
renderOption={'Dialog'}
onChange={(iconName: string) => { this.setState({icon: iconName}); }}
onSave={(iconName: string) => { this.setState({icon: iconName}); }} />
```

## Implementation

The IconPicker component can be configured with the following properties:
Expand All @@ -41,6 +52,7 @@ The IconPicker component can be configured with the following properties:
| disabled | boolean | no | Specifies if the picker button is disabled |
| buttonClassName | boolean | no | If provided, additional class name will be added to the picker button |
| panelClassName | boolean | no | If provided, additional class name will be added to the picker panel |
| currentIcon | boolean | no | Specifies default selected icon |
| currentIcon | string | no | Specifies default selected icon |
| renderOption | `dialog`, `panel` | no | Specifies how to render list of Icons, Values : 'Panel' or 'Dialog' defualt value 'Panel' |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/IconPicker)
2 changes: 1 addition & 1 deletion docs/documentation/docs/controls/ListItemPicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Here is an example of the control:
- Import the control into your component:

```TypeScript
import { ListItemPicker } from '@pnp/spfx-controls-react/lib/listItemPicker';
import { ListItemPicker } from '@pnp/spfx-controls-react/lib/ListItemPicker';
```
- Use the `ListItemPicker` control in your code as follows:

Expand Down
53 changes: 53 additions & 0 deletions docs/documentation/docs/controls/Pagination.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Pagination Control

This control renders a Pagination component which can be used to show limited information of data. For example, you can set up your search result for the first 10 and then when clicking on a new page make a new request for other 10 elements.

**Pagination on the page**

![Pagination control](../assets/Pagination.gif)


## 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 { Pagination } from "@pnp/spfx-controls-react/lib/pagination";
```

- Use the `Pagination` control in your code as follows:

```typescript
<Pagination
currentPage={3}
totalPages={13}
onChange={(page) => this._getPage(page)}
limiter={3} // Optional - default value 3
hideFirstPageJump // Optional
hideLastPageJump // Optional
limiterIcon={"Emoji12"} // Optional
/>
```

- With the `onChange` property you can get the selected Page in the Pagination component:

```typescript
private _getPage(page: number){
console.log('Page:', page);
}
```

## Implementation

The Pagination control can be configured with the following properties:

| Property | Type | Required | Description | Default |
| ---- | ---- | ---- | ---- | ---- |
| currentPage | number | yes | The page initial selected | |
| totalPages | number | yes | The total of page that you want to show on control | |
| onChange | string | yes| When the page number change send the page number selected | |
| limiter | string | no | The number of pages showing before the icon | 3 |
| hideFirstPageJump | boolean | no | Hide the quick jump to the first page | false |
| hideLastPageJump | boolean | no | Hide the quick jump to the last page | false |
| limiterIcon | string | no | Limitir icon form Fluent IU | More |
Loading