Skip to content

Commit 8618bcc

Browse files
authored
Merge branch 'dev' into add-folder-picker
2 parents 16ddb57 + b7acb1c commit 8618bcc

Some content is hidden

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

48 files changed

+7299
-5073
lines changed

CHANGELOG.JSON

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,30 @@
33
{
44
"version": "1.18.0",
55
"changes": {
6-
"new": [],
7-
"enhancements": [],
6+
"new": [
7+
"Pagination Control [#535](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/535)",
8+
"TreeView Control [#536](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/536)"
9+
],
10+
"enhancements": [
11+
"`FolderExplorer` updates: allow selection of libraries if site url is used as the root, allow passing items to be passed as a property and added to the breadcrumb, add support for loading folders from a different site, fix breadcrumb names for document libraries [#534](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/534)",
12+
"`IconPicker`: `renderOption` property to render icons list as a panel or dialog [#537](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/537)"
13+
],
814
"fixes": [
915
"`ComboBoxListItemPicker` documentation fix: Updated import statement in docs for ComboBoxListItemPicker [#510](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/510)",
1016
"Documentation fix: add the new control `ComboBoxListItemPicker` component to landing page [#511](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/511)",
11-
"`FilePicker`: While using the control, if `hideOrganisationalAssetTab` is set to true, even then an additional HTTP request is made."
17+
"`FilePicker`: While using the control, if `hideOrganisationalAssetTab` is set to true, even then an additional HTTP request is made.",
18+
"`IconPicker`: search fix and updated list of icons [#533](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/533)",
19+
"`ListItemAttachment`: when I upload a file that contains an hyphen, the \"-\" char is replaced by an empty string [#526](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/526)",
20+
"`IconPicker` shows selected icon only during the first opening [#513](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/513)"
1221
]
1322
},
1423
"contributions": [
24+
"[David Ramalho](https://github.com/DRamalho92)",
1525
"[Gautam Sheth](https://github.com/gautamdsheth)",
26+
"[Gregghis](https://github.com/Gregghis)",
27+
"[João Mendes](https://github.com/joaojmendes)",
28+
"[Joel Rodrigues](https://github.com/joelfmrodrigues)",
29+
"[Nanddeep Nachan](https://github.com/nanddeepn)",
1630
"[Prasad Kasireddy](https://github.com/PrasadKasireddy)",
1731
"[Siddharth Vaghasia](https://github.com/siddharth-vaghasia)"
1832
]
10.9 MB
Loading
98 KB
Loading
12.7 KB
Loading
573 KB
Loading
10.2 KB
Loading
12.2 KB
Loading

docs/documentation/docs/controls/FolderExplorer.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ The `FolderExplorer` control can be configured with the following properties:
5151
| Property | Type | Required | Description |
5252
| ---- | ---- | ---- | ---- |
5353
| context | WebPartContext \| ExtensionContext | yes | The context object of the SPFx loaded webpart or customizer. |
54-
| rootFolder | IFolder | yes | The lowest level folder that can be explored. This can be the root folder of a library. |
54+
| siteAbsoluteUrl | string | no | The absolute url of the target site. Only required if not the current site. |
55+
| 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 |
5556
| defaultFolder | IFolder | yes | The default folder to be explored. |
5657
| 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. |
5758
| hiddenBreadcrumb | boolean | no | Hide the breadcrumb control. |
59+
| initialBreadcrumbItems | IBreadcrumbItem | no | Additional items to be added to the beginning of the breadcrumb. |
5860
| hiddenFilterBox | boolean | no | Hide the filter box |
5961
| onSelect | (folder: IFolder): void | no | Callback function called after a folder is selected. |
6062

docs/documentation/docs/controls/IconPicker.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Icon picker always opens a new panel where you can pick an icon. The panel displ
1212
![Icon Picker panel](../assets/IconPickerPanel.gif)
1313

1414

15+
## Displayed in the dialog
16+
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.
17+
![Icon Picker panel](../assets/IconPicker_dialog.gif)
18+
1519
## How to use this control
1620

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

36+
```TypeScript
37+
<IconPicker buttonLabel={'Icon'}
38+
renderOption={'Dialog'}
39+
onChange={(iconName: string) => { this.setState({icon: iconName}); }}
40+
onSave={(iconName: string) => { this.setState({icon: iconName}); }} />
41+
```
42+
3243
## Implementation
3344

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

4658
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/IconPicker)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Pagination Control
2+
3+
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.
4+
5+
**Pagination on the page**
6+
7+
![Pagination control](../assets/Pagination.gif)
8+
9+
10+
## How to use this control in your solutions
11+
12+
- 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.
13+
- Import the following modules to your component:
14+
15+
```typescript
16+
import { Pagination } from "@pnp/spfx-controls-react/lib/pagination";
17+
```
18+
19+
- Use the `Pagination` control in your code as follows:
20+
21+
```typescript
22+
<Pagination
23+
currentPage={3}
24+
totalPages={13}
25+
onChange={(page) => this._getPage(page)}
26+
limiter={3} // Optional - default value 3
27+
hideFirstPageJump // Optional
28+
hideLastPageJump // Optional
29+
limiterIcon={"Emoji12"} // Optional
30+
/>
31+
```
32+
33+
- With the `onChange` property you can get the selected Page in the Pagination component:
34+
35+
```typescript
36+
private _getPage(page: number){
37+
console.log('Page:', page);
38+
}
39+
```
40+
41+
## Implementation
42+
43+
The Pagination control can be configured with the following properties:
44+
45+
| Property | Type | Required | Description | Default |
46+
| ---- | ---- | ---- | ---- | ---- |
47+
| currentPage | number | yes | The page initial selected | |
48+
| totalPages | number | yes | The total of page that you want to show on control | |
49+
| onChange | string | yes| When the page number change send the page number selected | |
50+
| limiter | string | no | The number of pages showing before the icon | 3 |
51+
| hideFirstPageJump | boolean | no | Hide the quick jump to the first page | false |
52+
| hideLastPageJump | boolean | no | Hide the quick jump to the last page | false |
53+
| limiterIcon | string | no | Limitir icon form Fluent IU | More |

0 commit comments

Comments
 (0)