Skip to content

Commit 440c2af

Browse files
authored
Merge pull request #1045 from pnp/dev
Merge for 3.4.0 release
2 parents 5efcbba + fb9d035 commit 440c2af

File tree

85 files changed

+11885
-8879
lines changed

Some content is hidden

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

85 files changed

+11885
-8879
lines changed

CHANGELOG.JSON

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
{
22
"versions": [
3+
{
4+
"version": "3.4.0",
5+
"changes": {
6+
"new": [
7+
"`ModernTaxonomyPicker`: New control ModernTaxonomyPicker [#1014](https://github.com/pnp/sp-dev-fx-controls-react/pull/1014)"
8+
],
9+
"enhancements": [
10+
"Translations: Update translation keys [#994](https://github.com/pnp/sp-dev-fx-controls-react/pull/994)",
11+
"`LocationPicker`: Update docs [#1009](https://github.com/pnp/sp-dev-fx-controls-react/pull/1009)",
12+
"`FileTypeIcon`: Add support of 20px icons[#1013](https://github.com/pnp/sp-dev-fx-controls-react/issues/1013)",
13+
"`Pagination`: Update import from lodash [#1021](https://github.com/pnp/sp-dev-fx-controls-react/pull/1021)"
14+
],
15+
"fixes": [
16+
"`ChartControl`: Charts not updating properly when properties are changed [#997](https://github.com/pnp/sp-dev-fx-controls-react/pull/997)",
17+
"`TaxonomyPicker`: suggestions language is always English [#879](https://github.com/pnp/sp-dev-fx-controls-react/issues/879)",
18+
"`TaxonomyPicker`: `errorMessage` label not being removed [#953](https://github.com/pnp/sp-dev-fx-controls-react/issues/953)",
19+
"`FilePicker`: Sorting Not Working as Expected in Site Tab [#1011](https://github.com/pnp/sp-dev-fx-controls-react/issues/1011)",
20+
"`FilePicker`: Site Tab - Lots of file types don't have appropriate icons [#1012](https://github.com/pnp/sp-dev-fx-controls-react/issues/1012)",
21+
"`LocationPicker`: Correct documentation [#1019](https://github.com/pnp/sp-dev-fx-controls-react/pull/1019)",
22+
"`FilePicker`: `fileNameWithoutExtension` not calculated right [#1022](https://github.com/pnp/sp-dev-fx-controls-react/issues/1022)",
23+
"`FieldUserRenderer`: Add missing PnPJS imports [#1025](https://github.com/pnp/sp-dev-fx-controls-react/issues/1025)"
24+
]
25+
},
26+
"contributions": [
27+
"[Dennis Kuhn](https://github.com/DennisKuhn)",
28+
"[Gautam Sheth](https://github.com/gautamdsheth)",
29+
"[Jean-Luc Richer](https://github.com/umaknow-jeanluc)",
30+
"[hesperanca](https://github.com/hesperanca)",
31+
"[Kiryl Shchasny](https://github.com/lirik30)",
32+
"[Patrik Hellgren](https://github.com/patrikhellgren)",
33+
"[Peter Paul Kirschner](https://github.com/petkir)",
34+
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)"
35+
]
36+
},
337
{
438
"version": "3.3.0",
539
"changes": {

CHANGELOG.md

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

3+
## 3.4.0
4+
5+
### New control(s)
6+
7+
- `ModernTaxonomyPicker`: New control ModernTaxonomyPicker [#1014](https://github.com/pnp/sp-dev-fx-controls-react/pull/1014)
8+
9+
### Enhancements
10+
11+
- Translations: Update translation keys [#994](https://github.com/pnp/sp-dev-fx-controls-react/pull/994)
12+
- `LocationPicker`: Update docs [#1009](https://github.com/pnp/sp-dev-fx-controls-react/pull/1009)
13+
- `FileTypeIcon`: Add support of 20px icons[#1013](https://github.com/pnp/sp-dev-fx-controls-react/issues/1013)
14+
- `Pagination`: Update import from lodash [#1021](https://github.com/pnp/sp-dev-fx-controls-react/pull/1021)
15+
16+
### Fixes
17+
18+
- `ChartControl`: Charts not updating properly when properties are changed [#997](https://github.com/pnp/sp-dev-fx-controls-react/pull/997)
19+
- `TaxonomyPicker`: suggestions language is always English [#879](https://github.com/pnp/sp-dev-fx-controls-react/issues/879)
20+
- `TaxonomyPicker`: `errorMessage` label not being removed [#953](https://github.com/pnp/sp-dev-fx-controls-react/issues/953)
21+
- `FilePicker`: Sorting Not Working as Expected in Site Tab [#1011](https://github.com/pnp/sp-dev-fx-controls-react/issues/1011)
22+
- `FilePicker`: Site Tab - Lots of file types don't have appropriate icons [#1012](https://github.com/pnp/sp-dev-fx-controls-react/issues/1012)
23+
- `LocationPicker`: Correct documentation [#1019](https://github.com/pnp/sp-dev-fx-controls-react/pull/1019)
24+
- `FilePicker`: `fileNameWithoutExtension` not calculated right [#1022](https://github.com/pnp/sp-dev-fx-controls-react/issues/1022)
25+
- `FieldUserRenderer`: Add missing PnPJS imports [#1025](https://github.com/pnp/sp-dev-fx-controls-react/issues/1025)
26+
27+
### Contributors
28+
29+
Special thanks to our contributors (in alphabetical order): [Dennis Kuhn](https://github.com/DennisKuhn), [Gautam Sheth](https://github.com/gautamdsheth), [Jean-Luc Richer](https://github.com/umaknow-jeanluc), [hesperanca](https://github.com/hesperanca), [Kiryl Shchasny](https://github.com/lirik30), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog).
30+
331
## 3.3.0
432

533
### New control(s)

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

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

3+
## 3.4.0
4+
5+
### New control(s)
6+
7+
- `ModernTaxonomyPicker`: New control ModernTaxonomyPicker [#1014](https://github.com/pnp/sp-dev-fx-controls-react/pull/1014)
8+
9+
### Enhancements
10+
11+
- Translations: Update translation keys [#994](https://github.com/pnp/sp-dev-fx-controls-react/pull/994)
12+
- `LocationPicker`: Update docs [#1009](https://github.com/pnp/sp-dev-fx-controls-react/pull/1009)
13+
- `FileTypeIcon`: Add support of 20px icons[#1013](https://github.com/pnp/sp-dev-fx-controls-react/issues/1013)
14+
- `Pagination`: Update import from lodash [#1021](https://github.com/pnp/sp-dev-fx-controls-react/pull/1021)
15+
16+
### Fixes
17+
18+
- `ChartControl`: Charts not updating properly when properties are changed [#997](https://github.com/pnp/sp-dev-fx-controls-react/pull/997)
19+
- `TaxonomyPicker`: suggestions language is always English [#879](https://github.com/pnp/sp-dev-fx-controls-react/issues/879)
20+
- `TaxonomyPicker`: `errorMessage` label not being removed [#953](https://github.com/pnp/sp-dev-fx-controls-react/issues/953)
21+
- `FilePicker`: Sorting Not Working as Expected in Site Tab [#1011](https://github.com/pnp/sp-dev-fx-controls-react/issues/1011)
22+
- `FilePicker`: Site Tab - Lots of file types don't have appropriate icons [#1012](https://github.com/pnp/sp-dev-fx-controls-react/issues/1012)
23+
- `LocationPicker`: Correct documentation [#1019](https://github.com/pnp/sp-dev-fx-controls-react/pull/1019)
24+
- `FilePicker`: `fileNameWithoutExtension` not calculated right [#1022](https://github.com/pnp/sp-dev-fx-controls-react/issues/1022)
25+
- `FieldUserRenderer`: Add missing PnPJS imports [#1025](https://github.com/pnp/sp-dev-fx-controls-react/issues/1025)
26+
27+
### Contributors
28+
29+
Special thanks to our contributors (in alphabetical order): [Dennis Kuhn](https://github.com/DennisKuhn), [Gautam Sheth](https://github.com/gautamdsheth), [Jean-Luc Richer](https://github.com/umaknow-jeanluc), [hesperanca](https://github.com/hesperanca), [Kiryl Shchasny](https://github.com/lirik30), [Patrik Hellgren](https://github.com/patrikhellgren), [Peter Paul Kirschner](https://github.com/petkir), [Ravichandran Krishnasamy](https://github.com/ravichandran-blog).
30+
331
## 3.3.0
432

533
### New control(s)
1.91 KB
Loading
7.45 KB
Loading
3.61 KB
Loading
16.2 KB
Loading

docs/documentation/docs/controls/FileTypeIcon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The FileTypeIcon component can be configured with the following properties:
4040
| ---- | ---- | ---- | ---- |
4141
| application | ApplicationType | no | Type of the application for which you want to show the icon. Use the **ApplicationType** enum to get the list of available applications. |
4242
| path | string | no | Path to the document. If this is provided, the control will use the file extension to display the corresponding icon. |
43-
| size | ImageSize | no | This is a property that only needs to be used when the type is set to image. It allows you to specify the image size. Small (16px), medium (48px) and large (96px) are possible. Use the **ImageSize** enum to get the list of available images sizes. |
43+
| size | ImageSize | no | This is a property that only needs to be used when the type is set to image. It allows you to specify the image size. small (16px), normal (20px), medium (48px) and large (96px) are possible. Use the **ImageSize** enum to get the list of available images sizes. |
4444
| type | IconType | yes | This property specifies is you want to use the icon font or image. Use the **IconType** enum to get the list of available icon types. |
4545

4646
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/FileTypeIcon)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Modern Taxonomy Picker
2+
3+
This control allows you to select one or more Terms from a TermSet via its TermSet ID. You can also configure the control to select the child terms from a specific term in the TermSet by setting the anchorTermId. This is the modern version of the taxonomy picker that uses the REST API and makes use of some load on demand features which makes it well suited for large term sets.
4+
5+
!!! note "Disclaimer"
6+
Since this control is meant to look as and work in the same way as the out-of-the-box control it lacks some of the features from the legacy ```TaxonomyPicker``` control. If you need some of those features please continue using the legacy version.
7+
8+
**Empty term picker**
9+
10+
![Empty term picker](../assets/modernTaxonomyPicker-empty.png)
11+
12+
**Selecting terms**
13+
14+
![Selecting terms](../assets/modernTaxonomyPicker-tree-selection.png)
15+
16+
**Selected terms in picker**
17+
18+
![Selected terms in the input](../assets/modernTaxonomyPicker-selected-terms.png)
19+
20+
**Term picker: Auto Complete**
21+
22+
![Selected terms in the input](../assets/modernTaxonomyPicker-input-autocomplete.png)
23+
24+
25+
## How to use this control in your solutions
26+
27+
- 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.
28+
- Import the following modules to your component:
29+
30+
```TypeScript
31+
import { ModernTaxonomyPicker } from "@pnp/spfx-controls-react/lib/ModernTaxonomyPicker";
32+
```
33+
34+
- Use the `ModernTaxonomyPicker` control in your code as follows:
35+
36+
```TypeScript
37+
<ModernTaxonomyPicker allowMultipleSelections={true}
38+
termSetId="f233d4b7-68fb-41ef-8b58-2af0bafc0d38"
39+
panelTitle="Select Term"
40+
label="Taxonomy Picker"
41+
context={this.props.context}
42+
onChange={this.onTaxPickerChange} />
43+
```
44+
45+
- With the `onChange` property you can capture the event of when the terms in the picker has changed:
46+
47+
```typescript
48+
private onTaxPickerChange(terms : ITermInfo[]) {
49+
console.log("Terms", terms);
50+
}
51+
```
52+
53+
## Implementation
54+
55+
The ModernTaxonomyPicker control can be configured with the following properties:
56+
57+
| Property | Type | Required | Description |
58+
| ---- | ---- | ---- | ---- |
59+
| panelTitle | string | yes | TermSet Picker Panel title. |
60+
| label | string | yes | Text displayed above the Taxonomy Picker. |
61+
| disabled | boolean | no | Specify if the control should be disabled. Default value is false. |
62+
| context | BaseComponentContext | yes | Context of the current web part or extension. |
63+
| initialValues | ITermInfo[] | no | Defines the terms selected by default. ITermInfo comes from PnP/PnPjs and can be imported with <br/>```import { ITermInfo } from '@pnp/sp/taxonomy';``` |
64+
| allowMultipleSelections | boolean | no | Defines if the user can select only one or multiple terms. Default value is false. |
65+
| termSetId | string | yes | The Id of the TermSet that you would like the Taxonomy Picker to select terms from. |
66+
| onChange | function | no | Captures the event of when the terms in the picker has changed. |
67+
| anchorTermId | string | no | Set the id of a child term in the TermSet to be able to select terms from that level and below. |
68+
| placeHolder | string | no | Short text hint to display in picker. |
69+
| required | boolean | no | Specifies if to display an asterisk near the label. Default value is false. |
70+
| customPanelWidth | number | no | Custom panel width in pixels. |
71+
| termPickerProps | IModernTermPickerProps | no | Custom properties for the term picker (More info: [IBasePickerProps interface](https://developer.microsoft.com/en-us/fluentui#/controls/web/pickers#IBasePickerProps)). |
72+
| themeVariant | IReadonlyTheme | no | The current loaded SharePoint theme/section background (More info: [Supporting section backgrounds](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/supporting-section-backgrounds)). |
73+
74+
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/TaxonomyPicker)

docs/documentation/docs/controls/SitePicker.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,14 @@ The `SitePicker` control can be configured with the following properties:
5252
| isDesc | boolean | no | Specifies if the list is sorted in descending order. Default: `false`. |
5353
| label | string | no | Label to use for the control. |
5454
| limitToCurrentSiteCollection | boolean | no | Specifies if the options should be limited by the current site collections. Taken into consideration if selectionMode is set to `web`. |
55-
| mode | `'site' \| 'web' \| 'hub'` | no | Defines what entities are available for selection: site collections, sites, hub sites. Default: `web`. |
55+
| mode | `'site' | 'web' | 'hub'` | no | Defines what entities are available for selection: site collections, sites, hub sites. Default: `web`. |
5656
| multiSelect | boolean | no | Optional mode indicates if multi-choice selections is allowed. Default: `true`. |
5757
| onChange | `(selectedSites: ISite[]) => void` | yes | Selection change handler. |
58-
| orderBy | `'title' \| 'url'` | no | Specifices if the list is sorted by title or url. Default: `title`. |
58+
| orderBy | `'title' | 'url'` | no | Specifices if the list is sorted by title or url. Default: `title`. |
5959
| placeholder | string | no | Placeholder label to show in the dropdown. |
6060
| searchPlaceholder | string | no | Search input placeholder text. Displayed until search text is entered. |
61+
| trimDuplicates | boolean | no | Specifies if the duplicates should be trimmed. false by default. Applicable if mode is set to site or web. |
62+
| additionalQuery | string | no | If provided will be added to the search query as AND part. Applicable if mode is set to site or web. |
6163

6264
Interface `ISite`
6365

0 commit comments

Comments
 (0)