Skip to content

Commit dda0256

Browse files
authored
Merge pull request #704 from pnp/dev
Merge for v2.1.0 release
2 parents fe49820 + 4b99c51 commit dda0256

Some content is hidden

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

44 files changed

+972
-513
lines changed

CHANGELOG.JSON

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
{
22
"versions": [
3+
{
4+
"version": "2.1.0",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [
8+
"`Carousel`: Ability to display indicators in a dedicated block [#681](https://github.com/pnp/sp-dev-fx-controls-react/pull/681)",
9+
"`FilePicker`: Org Assets are not displayed for non-admin users [#687](https://github.com/pnp/sp-dev-fx-controls-react/pull/687)",
10+
"`ListView`: Drag and Drop option [#679](https://github.com/pnp/sp-dev-fx-controls-react/issues/679)",
11+
"`FolderExplorerService`: support special characters if folder name [#691](https://github.com/pnp/sp-dev-fx-controls-react/pull/691)",
12+
"`ListView`: Sticky Header [#634](https://github.com/pnp/sp-dev-fx-controls-react/issues/634)",
13+
"`IconPicker`: get icons from `@uifabric/icons/lib/data/AllIconNames.json`",
14+
"`ListView`: Sticky header with `className` instead of additional components [#696](https://github.com/pnp/sp-dev-fx-controls-react/pull/696)",
15+
"`ListView`: `StickyHeader` code consistency [#697](https://github.com/pnp/sp-dev-fx-controls-react/pull/697)",
16+
"`TreeView`: Added (optional) property 'defaultExpandedChildren' that controls the behavior of the expansion of child elements.[#698](https://github.com/pnp/sp-dev-fx-controls-react/pull/698)"
17+
],
18+
"fixes": [
19+
"`RichText`: Cannot add link in first line [#672](https://github.com/pnp/sp-dev-fx-controls-react/issues/672)",
20+
"`TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)",
21+
"Documentation fix for `TaxonomyPicker`: the `disabled` property is a `boolean` and not a `string` as currently specified [#695](https://github.com/pnp/sp-dev-fx-controls-react/pull/695)",
22+
"`ComboBoxListItemPicker`: update options when `listId` has been changed [#683](https://github.com/pnp/sp-dev-fx-controls-react/issues/683)",
23+
"`FilePicker`: styles are updated to match OOB control [#700](https://github.com/pnp/sp-dev-fx-controls-react/issues/700)"
24+
]
25+
},
26+
"contributions": [
27+
"[Abderahman88](https://github.com/Abderahman88)",
28+
"[André Lage](https://github.com/aaclage)",
29+
"[Gautam Sheth](https://github.com/gautamdsheth)"
30+
]
31+
},
332
{
433
"version": "2.0.0",
534
"changes": {

CHANGELOG.md

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

3+
## 2.1.0
4+
5+
### Enhancements
6+
7+
- `Carousel`: Ability to display indicators in a dedicated block [#681](https://github.com/pnp/sp-dev-fx-controls-react/pull/681)
8+
- `FilePicker`: Org Assets are not displayed for non-admin users [#687](https://github.com/pnp/sp-dev-fx-controls-react/pull/687)
9+
- `ListView`: Drag and Drop option [#679](https://github.com/pnp/sp-dev-fx-controls-react/issues/679)
10+
- `FolderExplorerService`: support special characters if folder name [#691](https://github.com/pnp/sp-dev-fx-controls-react/pull/691)
11+
- `ListView`: Sticky Header [#634](https://github.com/pnp/sp-dev-fx-controls-react/issues/634)
12+
- `IconPicker`: get icons from `@uifabric/icons/lib/data/AllIconNames.json`
13+
- `ListView`: Sticky header with `className` instead of additional components [#696](https://github.com/pnp/sp-dev-fx-controls-react/pull/696)
14+
- `ListView`: `StickyHeader` code consistency [#697](https://github.com/pnp/sp-dev-fx-controls-react/pull/697)
15+
- `TreeView`: Added (optional) property 'defaultExpandedChildren' that controls the behavior of the expansion of child elements.[#698](https://github.com/pnp/sp-dev-fx-controls-react/pull/698)
16+
17+
### Fixes
18+
19+
- `RichText`: Cannot add link in first line [#672](https://github.com/pnp/sp-dev-fx-controls-react/issues/672)
20+
- `TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)
21+
- Documentation fix for `TaxonomyPicker`: the `disabled` property is a `boolean` and not a `string` as currently specified [#695](https://github.com/pnp/sp-dev-fx-controls-react/pull/695)
22+
- `ComboBoxListItemPicker`: update options when `listId` has been changed [#683](https://github.com/pnp/sp-dev-fx-controls-react/issues/683)
23+
- `FilePicker`: styles are updated to match OOB control [#700](https://github.com/pnp/sp-dev-fx-controls-react/issues/700)
24+
25+
### Contributors
26+
27+
Special thanks to our contributors (in alphabetical order): [Abderahman88](https://github.com/Abderahman88), [André Lage](https://github.com/aaclage), [Gautam Sheth](https://github.com/gautamdsheth).
28+
329
## 2.0.0
430

531
### Enhancements

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

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

3+
## 2.1.0
4+
5+
### Enhancements
6+
7+
- `Carousel`: Ability to display indicators in a dedicated block [#681](https://github.com/pnp/sp-dev-fx-controls-react/pull/681)
8+
- `FilePicker`: Org Assets are not displayed for non-admin users [#687](https://github.com/pnp/sp-dev-fx-controls-react/pull/687)
9+
- `ListView`: Drag and Drop option [#679](https://github.com/pnp/sp-dev-fx-controls-react/issues/679)
10+
- `FolderExplorerService`: support special characters if folder name [#691](https://github.com/pnp/sp-dev-fx-controls-react/pull/691)
11+
- `ListView`: Sticky Header [#634](https://github.com/pnp/sp-dev-fx-controls-react/issues/634)
12+
- `IconPicker`: get icons from `@uifabric/icons/lib/data/AllIconNames.json`
13+
- `ListView`: Sticky header with `className` instead of additional components [#696](https://github.com/pnp/sp-dev-fx-controls-react/pull/696)
14+
- `ListView`: `StickyHeader` code consistency [#697](https://github.com/pnp/sp-dev-fx-controls-react/pull/697)
15+
- `TreeView`: Added (optional) property 'defaultExpandedChildren' that controls the behavior of the expansion of child elements.[#698](https://github.com/pnp/sp-dev-fx-controls-react/pull/698)
16+
17+
### Fixes
18+
19+
- `RichText`: Cannot add link in first line [#672](https://github.com/pnp/sp-dev-fx-controls-react/issues/672)
20+
- `TaxonomyPicker`: Ability to reset the TaxonomyPicker (Remove all selected Terms) [#367](https://github.com/pnp/sp-dev-fx-controls-react/issues/367)
21+
- Documentation fix for `TaxonomyPicker`: the `disabled` property is a `boolean` and not a `string` as currently specified [#695](https://github.com/pnp/sp-dev-fx-controls-react/pull/695)
22+
- `ComboBoxListItemPicker`: update options when `listId` has been changed [#683](https://github.com/pnp/sp-dev-fx-controls-react/issues/683)
23+
- `FilePicker`: styles are updated to match OOB control [#700](https://github.com/pnp/sp-dev-fx-controls-react/issues/700)
24+
25+
### Contributors
26+
27+
Special thanks to our contributors (in alphabetical order): [Abderahman88](https://github.com/Abderahman88), [André Lage](https://github.com/aaclage), [Gautam Sheth](https://github.com/gautamdsheth).
28+
329
## 2.0.0
430

531
### Enhancements
16.9 KB
Loading

docs/documentation/docs/controls/Carousel.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ The Carousel component can be configured with the following properties:
128128
| indicatorShape | CarouselIndicatorShape | no | Specifies indicators' shape. If onRenderIndicator is provided - this property is ignored |
129129
| indicatorClassName | string | no | Specifies additional class applied to slide position indicators |
130130
| indicatorStyle | React.CSSProperties | no | Specifies additional styles applied to slide position indicators |
131-
| onRenderIndicator | (index: number, onClick: (e: React.MouseEvent<HTMLElement> | React.TouchEvent<HTMLElement>, selectedIndex: number) => void) => JSX.Element | no | Function to render indicator element |
131+
| onRenderIndicator | (index: number, onClick: (e: React.MouseEvent<HTMLElement> \| React.TouchEvent<HTMLElement>, selectedIndex: number) => void) => JSX.Element | no | Function to render indicator element |
132+
| indicatorsDisplay | CarouselIndicatorsDisplay | no | Specifies display mode of the indicators. Default value `overlap`. |
133+
| rootStyles | ICssInput | no | Allows to specify own styles for root element |
134+
| indicatorsContainerStyles | ICssInput | no | Allows to specify own styles for indicators container when indicatorsDisplay is set to "block" |
132135

133136
enum `CarouselButtonsLocation`
134137

@@ -160,6 +163,13 @@ Provides options for carousel indicators' shape.
160163
| square | Indicators displayed as squares |
161164
| rectangle | Indicators displayed as rectangles |
162165

166+
enum `CarouselIndicatorsDisplay`
167+
168+
Provides options for carousel indicators display mode.
169+
| Value | Description |
170+
| overlap | Indicators are displayed on top of the carousel content |
171+
| block | Reserves space for indicators |
172+
163173
Interface `ICarouselImageProps`
164174

165175
Allows to easily render a set of `CarouselImage` components in the carousel

docs/documentation/docs/controls/ListView.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ This control renders a list view for the given set of items.
88

99
![ListView control with grouping](../assets/ListView-grouping.png)
1010

11+
**List view control with drag and drop applied**
12+
13+
![ListView control with grouping](../assets/ListView-DragDrop.png)
14+
1115
## How to use this control in your solutions
1216

1317
- 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.
@@ -30,7 +34,10 @@ import { ListView, IViewField, SelectionMode, GroupOrder, IGrouping } from "@pnp
3034
showFilter={true}
3135
defaultFilter="John"
3236
filterPlaceHolder="Search..."
33-
groupByFields={groupByFields} />
37+
groupByFields={groupByFields}
38+
dragDropFiles={true}
39+
onDrop={this._getDropFiles}
40+
stickyHeader={true} />
3441
```
3542
- The control provides full text filtering through all the columns. If you want to exectue filtering on the specified columns, you can use syntax : `<ColumndName>`:`<FilterValue>`. Use `':'` as a separator between column name and value. Control support both `'fieldName'` and `'name'` properties of IColumn interface.
3643

@@ -41,7 +48,6 @@ private _getSelection(items: any[]) {
4148
console.log('Selected items:', items);
4249
}
4350
```
44-
4551
- With the `groupByFields` property you can define an array of field objects which will be used for grouping.
4652

4753
**Important**: the same order of the fields defines how grouping will be applied. In the snippet the `ListView` control will first group by the `Extension` and after that by the `Author` field.
@@ -61,6 +67,16 @@ const groupByFields: IGrouping[] = [
6167
!!! note "Extend ListView with a ContextualMenu"
6268
To extend the `ListView` control with a [ContextualMenu](https://developer.microsoft.com/en-us/fabric#/components/contextualmenu) refer to [ListView.ContextualMenu](./ListView.ContextualMenu.md).
6369

70+
- With the `onDrop` handler you can define a method that returns files that where drag and drop by user in the list view:
71+
72+
```typescript
73+
private _getDropFiles = (files) => {
74+
for (var i = 0; i < files.length; i++) {
75+
console.log(files[i].name);
76+
}
77+
}
78+
```
79+
6480
## Implementation
6581

6682
The ListView control can be configured with the following properties:
@@ -78,6 +94,9 @@ The ListView control can be configured with the following properties:
7894
| filterPlaceHolder | string | no | Specify the placeholder for the filter text box. Default 'Search' |
7995
| showFilter | boolean | no | Specify if the filter text box should be rendered. |
8096
| defaultFilter | string | no | Specify the initial filter to be applied to the list. |
97+
| dragDropFiles | boolean | no | Specify the drag and drop files area option. Default false. |
98+
| onDrop | file | no | Event handler returns files from drag and drop. |
99+
| stickyHeader | boolean | no | Specifies if the header of the `ListView`, including search box, is sticky |
81100

82101
The `IViewField` has the following implementation:
83102

docs/documentation/docs/controls/PeoplePicker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ import { PeoplePicker, PrincipalType } from "@pnp/spfx-controls-react/lib/People
3535
showtooltip={true}
3636
isRequired={true}
3737
disabled={true}
38-
selectedItems={this._getPeoplePickerItems}
38+
onChange={this._getPeoplePickerItems}
3939
showHiddenInUI={false}
4040
principalTypes={[PrincipalType.User]}
4141
resolveDelay={1000} />
4242
```
4343

44-
- With the `selectedItems` property you can get the selected People in the Peoplepicker :
44+
- With the `onChange` property you can get the selected People in the `PeoplePicker` :
4545

4646
```typescript
4747
private _getPeoplePickerItems(items: any[]) {

docs/documentation/docs/controls/TaxonomyPicker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ The TaxonomyPicker control can be configured with the following properties:
152152
| ---- | ---- | ---- | ---- |
153153
| panelTitle | string | yes | TermSet Picker Panel title. |
154154
| label | string | yes | Text displayed above the Taxonomy Picker. |
155-
| disabled | string | no | Specify if the control needs to be disabled. |
155+
| disabled | boolean | no | Specify if the control needs to be disabled. |
156156
| context | WebPartContext \| ExtensionContext | yes | Context of the current web part or extension. |
157157
| initialValues | IPickerTerms | no | Defines the selected by default term sets. |
158158
| allowMultipleSelections | boolean | no | Defines if the user can select only one or many term sets. Default value is false. |

docs/documentation/docs/controls/TreeView.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import { TreeView, ITreeItem } from "@pnp/spfx-controls-react/lib/TreeView";
3939
treeItemActionsDisplayMode={TreeItemActionsDisplayMode.ContextualMenu}
4040
defaultSelectedKeys={['key1', 'key2']},
4141
expandToSelected={true}
42+
defaultExpandedChildren={true}
4243
onSelect={this.onTreeItemSelect}
4344
onExpandCollapse={this.onTreeItemExpandCollapse}
4445
onRenderItem={this.renderCustomTreeItem} />
@@ -88,7 +89,7 @@ The `TreeView` control can be configured with the following properties:
8889
| Property | Type | Required | Description |
8990
|--------------------------------|----------------------------|----------|------------------------------------------------------------------------------------------------------------------------------------|
9091
| items | ITreeItem[] | yes | An array of tree items to display. refer [example](#example-of-array-of-tree-items-used-to-render-control-as-in-first-screenshot). |
91-
| defaultExpanded | boolean | no | Specify if the tree items are displayed as expanded by default (defaults to false). |
92+
| defaultExpanded | boolean | no | Specify if the tree items are displayed as expanded by default (defaults to false. |
9293
| selectionMode | enum | no | Specifies the selection mode of tree view (defaults to Single selection). |
9394
| selectChildrenIfParentSelected | boolean | no | Specifies if the childrens should be selected when parent item is selected (defaults to false). |
9495
| showCheckboxes | boolean | yes | Specify if the checkboxes should be displayed for selection. |
@@ -98,6 +99,7 @@ The `TreeView` control can be configured with the following properties:
9899
| onExpandCollapse | function | no | Defines a onExpandCollapse function to raise when the tree item has expanded or collapsed. |
99100
| onSelect | function | no | Captures the event of when the tree item selection has changed. |
100101
| onRenderItem | function | no | Optional callback to provide custom rendering of the item (default is simple text of item label and a checkbox for selection). |
102+
| defaultExpandedChildren | boolean | no | Default expand / collapse behavior for the child nodes. By default this is set to true. |
101103
102104
Enum `TreeViewSelectionMode`
103105

docs/documentation/docs/controls/fields/FieldRendererHelper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ FieldRendererHelper class is used to automatically apply needed Field Control ba
77
- Import the following modules to your component:
88

99
```TypeScript
10-
import { FieldRendererHelper } from "@pnp/spfx-controls-react/lib/Utilities/FieldRendererHelper";
10+
import { FieldRendererHelper } from "@pnp/spfx-controls-react/lib/Utilities";
1111
```
1212

1313
- Use the `FieldRendererHelper.getFieldRenderer` method to asynchronously request proper React control (As the method returns `Promise` it should be called in one of React component lifecycle methods, for example, `componentWillMount` that will occur before `render`):

0 commit comments

Comments
 (0)