Skip to content

Commit 0e381c9

Browse files
authored
Merge pull request #813 from pnp/dev
Merge for 2.5.0
2 parents bde7827 + cea1fba commit 0e381c9

39 files changed

+382
-160
lines changed

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": "2.5.0",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [
8+
"`TreeView`: Adding support to clear TreeView selected items by passing an empty array. [#787](https://github.com/pnp/sp-dev-fx-controls-react/pull/787)",
9+
"`FilePicker`: new property `includePageLibraries` to optionally display Site Pages library on Site tab [#601](https://github.com/pnp/sp-dev-fx-controls-react/issues/601)",
10+
"`ListItemPicker`: Support of `Calculated` columns [#805](https://github.com/pnp/sp-dev-fx-controls-react/issues/805)",
11+
"`Progress`: Documentation update to have consistency in variables names [#811](https://github.com/pnp/sp-dev-fx-controls-react/pull/811)",
12+
"`FolderExplorer`: Add support for sorting folder explorer items [#812](https://github.com/pnp/sp-dev-fx-controls-react/pull/812)"
13+
],
14+
"fixes": [
15+
"`ListView`: Selection is reset when putting a ListView inside a React Component that controls its items and selection props [#251](https://github.com/pnp/sp-dev-fx-controls-react/issues/251)",
16+
"Documentation fix for `PeoplePicker`: Removed unwanted new line in help content. [#783](https://github.com/pnp/sp-dev-fx-controls-react/pull/783)",
17+
"Documentation fix for `TreeView`: `TreeViewSelectionMode` added in the import [#780](https://github.com/pnp/sp-dev-fx-controls-react/pull/780)",
18+
"Documentation fix for `TreeView`: removed unwanted comma [#779](https://github.com/pnp/sp-dev-fx-controls-react/pull/779)",
19+
"`IFrameDialog`: height unable to resize relative to screen size, even if we provide in % it is taking default value. [#636](https://github.com/pnp/sp-dev-fx-controls-react/issues/636)",
20+
"`DateTimePicker`: Clear Date functionality [#799](https://github.com/pnp/sp-dev-fx-controls-react/issues/799)"
21+
]
22+
},
23+
"contributions": [
24+
"[Ari Gunawan](https://github.com/AriGunawan)",
25+
"[Joel Rodrigues](https://github.com/joelfmrodrigues)",
26+
"[Mike Myers](https://github.com/thespooler)",
27+
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)",
28+
"[San](https://github.com/sankarkumar23)"
29+
]
30+
},
331
{
432
"version": "2.4.0",
533
"changes": {

CHANGELOG.md

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

3+
## 2.5.0
4+
5+
### Enhancements
6+
7+
- `TreeView`: Adding support to clear TreeView selected items by passing an empty array. [#787](https://github.com/pnp/sp-dev-fx-controls-react/pull/787)
8+
- `FilePicker`: new property `includePageLibraries` to optionally display Site Pages library on Site tab [#601](https://github.com/pnp/sp-dev-fx-controls-react/issues/601)
9+
- `ListItemPicker`: Support of `Calculated` columns [#805](https://github.com/pnp/sp-dev-fx-controls-react/issues/805)
10+
- `Progress`: Documentation update to have consistency in variables names [#811](https://github.com/pnp/sp-dev-fx-controls-react/pull/811)
11+
- `FolderExplorer`: Add support for sorting folder explorer items [#812](https://github.com/pnp/sp-dev-fx-controls-react/pull/812)
12+
13+
### Fixes
14+
15+
- `ListView`: Selection is reset when putting a ListView inside a React Component that controls its items and selection props [#251](https://github.com/pnp/sp-dev-fx-controls-react/issues/251)
16+
- Documentation fix for `PeoplePicker`: Removed unwanted new line in help content. [#783](https://github.com/pnp/sp-dev-fx-controls-react/pull/783)
17+
- Documentation fix for `TreeView`: `TreeViewSelectionMode` added in the import [#780](https://github.com/pnp/sp-dev-fx-controls-react/pull/780)
18+
- Documentation fix for `TreeView`: removed unwanted comma [#779](https://github.com/pnp/sp-dev-fx-controls-react/pull/779)
19+
- `IFrameDialog`: height unable to resize relative to screen size, even if we provide in % it is taking default value. [#636](https://github.com/pnp/sp-dev-fx-controls-react/issues/636)
20+
- `DateTimePicker`: Clear Date functionality [#799](https://github.com/pnp/sp-dev-fx-controls-react/issues/799)
21+
22+
### Contributors
23+
24+
Special thanks to our contributors (in alphabetical order): [Ari Gunawan](https://github.com/AriGunawan), [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mike Myers](https://github.com/thespooler), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [San](https://github.com/sankarkumar23).
25+
326
## 2.4.0
427

528
### New control(s)

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

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

3+
## 2.5.0
4+
5+
### Enhancements
6+
7+
- `TreeView`: Adding support to clear TreeView selected items by passing an empty array. [#787](https://github.com/pnp/sp-dev-fx-controls-react/pull/787)
8+
- `FilePicker`: new property `includePageLibraries` to optionally display Site Pages library on Site tab [#601](https://github.com/pnp/sp-dev-fx-controls-react/issues/601)
9+
- `ListItemPicker`: Support of `Calculated` columns [#805](https://github.com/pnp/sp-dev-fx-controls-react/issues/805)
10+
- `Progress`: Documentation update to have consistency in variables names [#811](https://github.com/pnp/sp-dev-fx-controls-react/pull/811)
11+
- `FolderExplorer`: Add support for sorting folder explorer items [#812](https://github.com/pnp/sp-dev-fx-controls-react/pull/812)
12+
13+
### Fixes
14+
15+
- `ListView`: Selection is reset when putting a ListView inside a React Component that controls its items and selection props [#251](https://github.com/pnp/sp-dev-fx-controls-react/issues/251)
16+
- Documentation fix for `PeoplePicker`: Removed unwanted new line in help content. [#783](https://github.com/pnp/sp-dev-fx-controls-react/pull/783)
17+
- Documentation fix for `TreeView`: `TreeViewSelectionMode` added in the import [#780](https://github.com/pnp/sp-dev-fx-controls-react/pull/780)
18+
- Documentation fix for `TreeView`: removed unwanted comma [#779](https://github.com/pnp/sp-dev-fx-controls-react/pull/779)
19+
- `IFrameDialog`: height unable to resize relative to screen size, even if we provide in % it is taking default value. [#636](https://github.com/pnp/sp-dev-fx-controls-react/issues/636)
20+
- `DateTimePicker`: Clear Date functionality [#799](https://github.com/pnp/sp-dev-fx-controls-react/issues/799)
21+
22+
### Contributors
23+
24+
Special thanks to our contributors (in alphabetical order): [Ari Gunawan](https://github.com/AriGunawan), [Joel Rodrigues](https://github.com/joelfmrodrigues), [Mike Myers](https://github.com/thespooler), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog), [San](https://github.com/sankarkumar23).
25+
326
## 2.4.0
427

528
### New control(s)

docs/documentation/docs/controls/FilePicker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The FilePicker component can be configured with the following properties:
7979
| storeLastActiveTab | boolean | no | Specifies if last active tab will be stored after the Upload panel has been closed. Note: the value of selected tab is stored in the queryString hash. Default `true` |
8080
| renderCustomUploadTabContent | (filePickerResult: IFilePickerResult) => JSX.Element \| null | no | Optional renderer to add custom user-defined fields to "Upload" tab |
8181
| renderCustomLinkTabContent | (filePickerResult: IFilePickerResult) => JSX.Element \| null | no | Optional renderer to add custom user-defined fields to "Link" tab |
82+
| includePageLibraries | boolean | no | Specifies if Site Pages library to be visible on Sites tab |
8283

8384
interface `IFilePickerResult`
8485

docs/documentation/docs/controls/FolderExplorer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,7 @@ The `FolderExplorer` control can be configured with the following properties:
5959
| initialBreadcrumbItems | IBreadcrumbItem | no | Additional items to be added to the beginning of the breadcrumb. |
6060
| hiddenFilterBox | boolean | no | Hide the filter box |
6161
| onSelect | (folder: IFolder): void | no | Callback function called after a folder is selected. |
62+
| orderby | string | no | The name of the field on which to sort. Default: Name. For list item properties, use ListItemAllFields/Title, ListItemAllFields/Created, etc |
63+
| orderAscending | boolean | no | If set to true, results will be sorted in ascending order. Otherwise, descending will be used as default |
6264

6365
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/FolderExplorer)

docs/documentation/docs/controls/PeoplePicker.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ The People picker control can be configured with the following properties:
7070
| onChange | (items: IPersonaProps[]) => void | no | Get the selected users in the control. | |
7171
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element | |
7272
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only | |
73-
| defaultSelectedUsers | string[] | no | Default selected user emails or login names, optionally append `/title` with forward slash.
74-
If user is not found then only optional title will be shown. If you do not have email or login name of inactive users just pass `/title` alone prefixed with slash.| |
73+
| defaultSelectedUsers | string[] | no | Default selected user emails or login names, optionally append `/title` with forward slash. If user is not found then only optional title will be shown. If you do not have email or login name of inactive users just pass `/title` alone prefixed with slash.| |
7574
| webAbsoluteUrl | string | no | Specify the site URL on which you want to perform the user query call. If not provided, the people picker will perform a tenant wide people/group search. When provided it will search users/groups on the provided site. | |
7675
| principalTypes | PrincipalType[] | no | Define which type of data you want to retrieve: User, SharePoint groups, Security groups. Multiple are possible. | |
7776
| ensureUser | boolean | no | When ensure user property is true, it will return the local user ID on the current site when doing a tenant wide search. | false |

docs/documentation/docs/controls/Progress.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ Now, in a component, where `Progress` is used you can have code as below:
6363

6464
```TypeScript
6565
export interface IYourComponentState {
66-
actions: IProgressAction[];
67-
currentActionIndex?: number;
66+
progressActions: IProgressAction[];
67+
currentProgressActionIndex?: number;
6868
// other state properties
6969
}
7070

@@ -75,7 +75,7 @@ export class YourComponent extends React.Component<IYourComponentProps, IYourCom
7575

7676
private _initActions() {
7777
this.setState({
78-
actions: [
78+
progressActions: [
7979
new FirstAction(),
8080
new SecondAction()
8181
]
@@ -84,7 +84,7 @@ export class YourComponent extends React.Component<IYourComponentProps, IYourCom
8484

8585
private async _execute() {
8686
for (let i = 0; i <= this.state.actions.length; i++) {
87-
this.setState(currentActionIndex: i);
87+
this.setState(currentProgressActionIndex: i);
8888

8989
if (i < this.state.actions.length) {
9090
await this.state.actions[i].execute();

docs/documentation/docs/controls/TreeView.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Here are examples of the control in action:
2424
- Import the following modules to your component:
2525

2626
```TypeScript
27-
import { TreeView, ITreeItem } from "@pnp/spfx-controls-react/lib/TreeView";
27+
import { TreeView, ITreeItem, TreeViewSelectionMode } from "@pnp/spfx-controls-react/lib/TreeView";
2828
```
2929

3030
- Use the `TreeView` control in your code as follows:
@@ -37,7 +37,7 @@ import { TreeView, ITreeItem } from "@pnp/spfx-controls-react/lib/TreeView";
3737
selectChildrenIfParentSelected={true}
3838
showCheckboxes={true}
3939
treeItemActionsDisplayMode={TreeItemActionsDisplayMode.ContextualMenu}
40-
defaultSelectedKeys={['key1', 'key2']},
40+
defaultSelectedKeys={['key1', 'key2']}
4141
expandToSelected={true}
4242
defaultExpandedChildren={true}
4343
onSelect={this.onTreeItemSelect}
Lines changed: 32 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Accessible Accordion
22

3-
This control allows you to render an accordion control. Is a Implementation based on React Accessible Accordion Control, that was customize UI to be more Fluent.
3+
This control allows you to render an accordion control. It is an implementation based on React Accessible Accordion Control, that was customized to be more "Fluent".
44

55
Here is an example of the control in action:
66

7-
![Accessible Accordion control](../assets/AccessibleAccordion.gif)
7+
![Accessible Accordion control](../../assets/AccessibleAccordion.gif)
88

99
## How to use this control in your solutions
1010

@@ -66,90 +66,63 @@ The `Accordion` control can be configured with the following properties:
6666
6767
### Accordion
6868
69-
#### allowMultipleExpanded : `boolean` [*optional*, default: `false`]
69+
| Property | Type | Required | Description | Default |
70+
| ---- | ---- | ---- | ---- | ---- |
71+
| allowMultipleExpanded | boolean | no | Don't autocollapse items when expanding other items. | `false` |
72+
| allowZeroExpanded | boolean | no | Allow the only remaining expanded item to be collapsed. | `false` |
73+
| preExpanded | string[] | no | Accepts an array of strings and any `AccordionItem` whose `uuid` prop matches any one of these strings will be expanded on mount. | `[]` |
74+
| className | string | no | Class(es) to apply to element. | "accordion" |
75+
| onChange | (string[]) => void | no | Callback which is invoked when items are expanded or collapsed. Gets passed `uuid`s of the currently expanded `AccordionItem`s. | |
7076
71-
Don't autocollapse items when expanding other items.
7277
73-
#### allowZeroExpanded : `boolean` [*optional*, default: `false`]
74-
75-
Allow the only remaining expanded item to be collapsed.
76-
77-
#### preExpanded: `string[]` [_optional_, default: `[]`]
78-
79-
Accepts an array of strings and any `AccordionItem` whose `uuid` prop matches
80-
any one of these strings will be expanded on mount.
81-
82-
#### className : `string` [*optional*, default: `'accordion'`]
83-
84-
Class(es) to apply to element.
85-
86-
#### onChange : `(string[]) => void` [*optional*]
87-
88-
Callback which is invoked when items are expanded or collapsed. Gets passed
89-
`uuid`s of the currently expanded `AccordionItem`s.
90-
91-
---
9278
9379
### AccordionItem
9480
95-
#### className : `string` [*optional*, default: `accordion__item`]
96-
97-
Class(es) to apply to element.
98-
99-
#### uuid : `string|number` [*optional*]
100-
101-
Recommended for use with `onChange`. Will be auto-generated if not provided.
81+
| Property | Type | Required | Description | Default |
82+
| ---- | ---- | ---- | ---- | ---- |
83+
| className | string | no | Class(es) to apply to element. | "accordion__item" |
84+
| uuid | string \| number | no | Recommended for use with `onChange`. Will be auto-generated if not provided. | |
85+
| dangerouslySetExpanded | boolean | no | Enables external control of the expansion. **Warning: This may impact accessibility negatively, use at your own risk** | |
10286
103-
#### dangerouslySetExpanded: `boolean` [*optional*]
104-
105-
Enables external control of the expansion.
106-
107-
> Warning: This may impact accessibility negatively, use at your own risk
108-
109-
---
11087
11188
### AccordionItemHeading
11289
113-
#### className : `string` [*optional*, default: `'accordion__heading'`]
114-
115-
Class(es) to apply to the 'heading' element.
116-
117-
#### aria-level : `number` [*optional*, default: `3`]
118-
119-
Semantics to apply to the 'heading' element. A value of `1` would make your
120-
heading element hierarchically equivalent to an `<h1>` tag, and likewise a value
121-
of `6` would make it equivalent to an `<h6>` tag.
90+
| Property | Type | Required | Description | Default |
91+
| ---- | ---- | ---- | ---- | ---- |
92+
| className | string | no | Class(es) to apply to the 'heading' element. | "accordion__heading" |
93+
| aria-level | number | no | Semantics to apply to the 'heading' element. A value of `1` would make your heading element hierarchically equivalent to an `<h1>` tag, and likewise a value of `6` would make it equivalent to an `<h6>` tag. | `3` |
12294
12395
### AccordionItemButton
12496
125-
#### className : `string` [*optional*, default: `'accordion__button'`]
97+
| Property | Type | Required | Description | Default |
98+
| ---- | ---- | ---- | ---- | ---- |
99+
| className | string | no | Class(es) to apply to the 'button' element. | "accordion__button" |
126100
127-
Class(es) to apply to the 'button' element.
128-
129-
---
130101
131102
### AccordionItemPanel
132103
133-
#### className : `string` [*optional*, default: `'accordion__panel'`]
134-
135-
Class(es) to apply to element.
104+
| Property | Type | Required | Description | Default |
105+
| ---- | ---- | ---- | ---- | ---- |
106+
| className | string | no | Class(es) to apply to element. | "accordion__panel" |
136107
137-
---
138108
139109
### AccordionItemState
140110
141-
#### children : `({ expanded: boolean, disabled: boolean }): JSX.Element` [**required**]
111+
| Property | Type | Required | Description | Default |
112+
| ---- | ---- | ---- | ---- | ---- |
113+
| children | ({ expanded: boolean, disabled: booleam }): JSX.Element | yes | item's children. | |
142114
143-
---
144115
145116
## Helpers
146117
147-
### resetNextUuid : `(): void`
118+
### resetNextUuid
119+
120+
```typescript
121+
resetNextUuid : () => void
122+
```
148123
149124
Resets the internal counter for Accordion items' identifiers (including `id`
150125
attributes). For use in test suites and isomorphic frameworks.
151126
152-
---
153-
154127
155128
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/AccessibleAccordion)

docs/documentation/docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ telemetry.optOut();
5252

5353
The following controls are currently available:
5454

55+
- [AccessibleAccordion](./controls/AccessibleAccordion/Accordion) (Control to render an accordion. React `AccessibleAccourdion`-based implementation)
5556
- [Accordion](./controls/Accordion) (Control to render an accordion)
5657
- [Carousel](./controls/Carousel) (Control displays children elements with 'previous/next element' options)
5758
- [Charts](./controls/ChartControl) (makes it easy to integrate [Chart.js](https://www.chartjs.org/) charts into web part)

0 commit comments

Comments
 (0)