Skip to content

Commit d3294b0

Browse files
authored
Merge pull request #1205 from pnp/dev
V 3.8.0
2 parents ffc088a + dc041d5 commit d3294b0

File tree

62 files changed

+2114
-1499
lines changed

Some content is hidden

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

62 files changed

+2114
-1499
lines changed

CHANGELOG.JSON

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
{
22
"versions": [
3+
{
4+
"version": "3.8.0",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [
8+
"`PeoplePicker`: Allow the use of multiple groupId-s [#1163](https://github.com/pnp/sp-dev-fx-controls-react/issues/1163)",
9+
"`PeoplePicker`: search users in nested security groups [#1173](https://github.com/pnp/sp-dev-fx-controls-react/issues/1173)",
10+
"`ModenrTaxonomyPicker`: Add more complete example of TaxonomyTree usage [#1190](https://github.com/pnp/sp-dev-fx-controls-react/pull/1190)",
11+
"`AdaptiveCardHost`: Add SPFx Context property [#1145](https://github.com/pnp/sp-dev-fx-controls-react/issues/1145)",
12+
"`AdaptiveCardHost`: Remove the `isUniqueControlInPage` from the control by rebuilding the way to apply AC CSS class names [#1154](https://github.com/pnp/sp-dev-fx-controls-react/issues/1154)",
13+
"`ListView`: Different background color to even and odd rows in ListView [#1153](https://github.com/pnp/sp-dev-fx-controls-react/issues/1153)",
14+
"`AccessibleAccordion`: Support of section variations [#1195](https://github.com/pnp/sp-dev-fx-controls-react/issues/1195)",
15+
"`TreeView`: Support of section variations [#1196](https://github.com/pnp/sp-dev-fx-controls-react/issues/1196)"
16+
],
17+
"fixes": [
18+
"`LocationPicker`: Resolve issue when in root site [#1162](https://github.com/pnp/sp-dev-fx-controls-react/pull/1162)",
19+
"`LocationPicker`: Trigger onChange on picker clear action [#1165](https://github.com/pnp/sp-dev-fx-controls-react/pull/1165)",
20+
"`TreeView`: TreeView Control is broken after updating to v3.7.0 [#1170](https://github.com/pnp/sp-dev-fx-controls-react/issues/1170)",
21+
"`TreeView`: collapses on selection of a child node [#1182](https://github.com/pnp/sp-dev-fx-controls-react/issues/1182)",
22+
"`TreeView`: expanded nodes state is getting lost after refresh [#1062](https://github.com/pnp/sp-dev-fx-controls-react/issues/1062)",
23+
"NPM Audit Critical Issues [#1187](https://github.com/pnp/sp-dev-fx-controls-react/issues/1187)",
24+
"Bump momentjs from 2.29.1 to 2.29.2 [#1185](https://github.com/pnp/sp-dev-fx-controls-react/pull/1185)",
25+
"`TaxonomyPicker`: Sorting the terms in locale language [#1160](https://github.com/pnp/sp-dev-fx-controls-react/pull/1160)",
26+
"`ComboboxListItemPicker`: options are not reloaded after the filter is changed [#1180](https://github.com/pnp/sp-dev-fx-controls-react/issues/1180)",
27+
"`FieldRendererHelper`: Add missing PnPjs import to SPHelper [#1140](https://github.com/pnp/sp-dev-fx-controls-react/issues/1140)",
28+
"`RichText`: Update font style and font size on property pane [#1151](https://github.com/pnp/sp-dev-fx-controls-react/issues/1151)",
29+
"`Placeholder`: Support section variations for themes [#1193](https://github.com/pnp/sp-dev-fx-controls-react/issues/1193)"
30+
]
31+
},
32+
"contributors": [
33+
"[Andreas Omayrat](https://github.com/andreasomayrat)",
34+
"[brianpmccullough](https://github.com/brianpmccullough)",
35+
"[Christophe Humbert](https://github.com/PathToSharePoint)",
36+
"[Fabio Franzini](https://github.com/fabiofranzini)",
37+
"[Gautam Sheth](https://github.com/gautamdsheth)",
38+
"[Joel Lopes](https://github.com/Dixdjo)",
39+
"[Milan Holemans](https://github.com/milanholemans)",
40+
"[Patrik Hellgren](https://github.com/patrikhellgren)",
41+
"[Ravichandran Krishnasamy](https://github.com/ravichandran-blog)",
42+
"[Rico van de Ven](https://github.com/RicoNL)",
43+
"[Russell gove](https://github.com/russgove)"
44+
]
45+
},
346
{
447
"version": "3.7.2",
548
"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.8.0
4+
5+
### Enhancements
6+
7+
- `PeoplePicker`: Allow the use of multiple groupId-s [#1163](https://github.com/pnp/sp-dev-fx-controls-react/issues/1163)
8+
- `PeoplePicker`: search users in nested security groups [#1173](https://github.com/pnp/sp-dev-fx-controls-react/issues/1173)
9+
- `ModenrTaxonomyPicker`: Add more complete example of TaxonomyTree usage [#1190](https://github.com/pnp/sp-dev-fx-controls-react/pull/1190)
10+
- `AdaptiveCardHost`: Add SPFx Context property [#1145](https://github.com/pnp/sp-dev-fx-controls-react/issues/1145)
11+
- `AdaptiveCardHost`: Remove the `isUniqueControlInPage` from the control by rebuilding the way to apply AC CSS class names [#1154](https://github.com/pnp/sp-dev-fx-controls-react/issues/1154)
12+
- `ListView`: Different background color to even and odd rows in ListView [#1153](https://github.com/pnp/sp-dev-fx-controls-react/issues/1153)
13+
- `AccessibleAccordion`: Support of section variations [#1195](https://github.com/pnp/sp-dev-fx-controls-react/issues/1195)
14+
- `TreeView`: Support of section variations [#1196](https://github.com/pnp/sp-dev-fx-controls-react/issues/1196)
15+
16+
### Fixes
17+
18+
- `LocationPicker`: Resolve issue when in root site [#1162](https://github.com/pnp/sp-dev-fx-controls-react/pull/1162)
19+
- `LocationPicker`: Trigger onChange on picker clear action [#1165](https://github.com/pnp/sp-dev-fx-controls-react/pull/1165)
20+
- `TreeView`: TreeView Control is broken after updating to v3.7.0 [#1170](https://github.com/pnp/sp-dev-fx-controls-react/issues/1170)
21+
- `TreeView`: collapses on selection of a child node [#1182](https://github.com/pnp/sp-dev-fx-controls-react/issues/1182)
22+
- `TreeView`: expanded nodes state is getting lost after refresh [#1062](https://github.com/pnp/sp-dev-fx-controls-react/issues/1062)
23+
- NPM Audit Critical Issues [#1187](https://github.com/pnp/sp-dev-fx-controls-react/issues/1187)
24+
- Bump momentjs from 2.29.1 to 2.29.2 [#1185](https://github.com/pnp/sp-dev-fx-controls-react/pull/1185)
25+
- `TaxonomyPicker`: Sorting the terms in locale language [#1160](https://github.com/pnp/sp-dev-fx-controls-react/pull/1160)
26+
- `ComboboxListItemPicker`: options are not reloaded after the filter is changed [#1180](https://github.com/pnp/sp-dev-fx-controls-react/issues/1180)
27+
- `FieldRendererHelper`: Add missing PnPjs import to SPHelper [#1140](https://github.com/pnp/sp-dev-fx-controls-react/issues/1140)
28+
- `RichText`: Update font style and font size on property pane [#1151](https://github.com/pnp/sp-dev-fx-controls-react/issues/1151)
29+
- `Placeholder`: Support section variations for themes [#1193](https://github.com/pnp/sp-dev-fx-controls-react/issues/1193)
30+
331
## 3.7.2
432

533
## 3.7.0

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.8.0
4+
5+
### Enhancements
6+
7+
- `PeoplePicker`: Allow the use of multiple groupId-s [#1163](https://github.com/pnp/sp-dev-fx-controls-react/issues/1163)
8+
- `PeoplePicker`: search users in nested security groups [#1173](https://github.com/pnp/sp-dev-fx-controls-react/issues/1173)
9+
- `ModenrTaxonomyPicker`: Add more complete example of TaxonomyTree usage [#1190](https://github.com/pnp/sp-dev-fx-controls-react/pull/1190)
10+
- `AdaptiveCardHost`: Add SPFx Context property [#1145](https://github.com/pnp/sp-dev-fx-controls-react/issues/1145)
11+
- `AdaptiveCardHost`: Remove the `isUniqueControlInPage` from the control by rebuilding the way to apply AC CSS class names [#1154](https://github.com/pnp/sp-dev-fx-controls-react/issues/1154)
12+
- `ListView`: Different background color to even and odd rows in ListView [#1153](https://github.com/pnp/sp-dev-fx-controls-react/issues/1153)
13+
- `AccessibleAccordion`: Support of section variations [#1195](https://github.com/pnp/sp-dev-fx-controls-react/issues/1195)
14+
- `TreeView`: Support of section variations [#1196](https://github.com/pnp/sp-dev-fx-controls-react/issues/1196)
15+
16+
### Fixes
17+
18+
- `LocationPicker`: Resolve issue when in root site [#1162](https://github.com/pnp/sp-dev-fx-controls-react/pull/1162)
19+
- `LocationPicker`: Trigger onChange on picker clear action [#1165](https://github.com/pnp/sp-dev-fx-controls-react/pull/1165)
20+
- `TreeView`: TreeView Control is broken after updating to v3.7.0 [#1170](https://github.com/pnp/sp-dev-fx-controls-react/issues/1170)
21+
- `TreeView`: collapses on selection of a child node [#1182](https://github.com/pnp/sp-dev-fx-controls-react/issues/1182)
22+
- `TreeView`: expanded nodes state is getting lost after refresh [#1062](https://github.com/pnp/sp-dev-fx-controls-react/issues/1062)
23+
- NPM Audit Critical Issues [#1187](https://github.com/pnp/sp-dev-fx-controls-react/issues/1187)
24+
- Bump momentjs from 2.29.1 to 2.29.2 [#1185](https://github.com/pnp/sp-dev-fx-controls-react/pull/1185)
25+
- `TaxonomyPicker`: Sorting the terms in locale language [#1160](https://github.com/pnp/sp-dev-fx-controls-react/pull/1160)
26+
- `ComboboxListItemPicker`: options are not reloaded after the filter is changed [#1180](https://github.com/pnp/sp-dev-fx-controls-react/issues/1180)
27+
- `FieldRendererHelper`: Add missing PnPjs import to SPHelper [#1140](https://github.com/pnp/sp-dev-fx-controls-react/issues/1140)
28+
- `RichText`: Update font style and font size on property pane [#1151](https://github.com/pnp/sp-dev-fx-controls-react/issues/1151)
29+
- `Placeholder`: Support section variations for themes [#1193](https://github.com/pnp/sp-dev-fx-controls-react/issues/1193)
30+
331
## 3.7.2
432

533
## 3.7.0

docs/documentation/docs/controls/AccessibleAccordion.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ The `Accordion` control can be configured with the following properties:
7373
| 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. | `[]` |
7474
| className | string | no | Class(es) to apply to element. | "accordion" |
7575
| onChange | (string[]) => void | no | Callback which is invoked when items are expanded or collapsed. Gets passed `uuid`s of the currently expanded `AccordionItem`s. | |
76+
| theme | IPartialTheme \| ITheme | no | Set Fluent UI Theme. If not set or set to null or not defined, the theme passed through context will be used, or the default theme of the page will be loaded. |
7677
7778
7879

docs/documentation/docs/controls/AdaptiveCardHost.md

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ Three custom themes have been created for Microsoft Teams to emulate the colors
1111

1212
All Elements and Actions of Adaptive Cards have been redefined using Fluent UI React, both for SharePoint and Microsoft Teams (in this case the "Fluent UI Northstar" library is not used), adding and improving features that are not managed in Microsoft's implementation of the "adaptivecards-fluentui" library (Theme support for example).
1313

14+
Thanks to the "context" property that allows you to pass the SPFx context, whether the "data" property is passed or not, a new field called @context will be injected into the data object.
15+
16+
This allows, using Adaptive Cards templating syntax, to access to the context informations using the following fields (for more information on these fields, refer to the [BaseComponentContext](https://docs.microsoft.com/en-us/javascript/api/sp-component-base/basecomponentcontext) class):
17+
- "theme": property "theme" from the current theme applied to the card.
18+
- "aadInfo": Azure AD informations retrieved from the SPFx context object.
19+
- "cultureInfo": Culture informations retrieved from the SPFx context object.
20+
- "userInfo": User informations retrieved from the SPFx context object.
21+
- "spListInfo": Current List informations retrieved from the SPFx context object.
22+
- "spListItemInfo": Current List item informations retrieved from the SPFx context object.
23+
- "spSiteInfo": Current Site informations retrieved from the SPFx context object.
24+
- "spWebInfo": Current Web informations retrieved from the SPFx context object.
25+
1426
The Adaptive Cards version supported is 1.5, by using the 'adaptivecards' npm package version 2.10.0.
1527

1628
Here is an example of the control in action inside a Web Part:
@@ -27,22 +39,23 @@ Here is an example of the previous Web Part (using different Card), hosted as a
2739
- In your component file, import the `AdaptiveCardHost` control as follows:
2840

2941
```TypeScript
30-
import { AdaptiveCardHost, IAdaptiveCardHostActionResult, AdaptiveCardHostThemeType } from "@pnp/spfx-controls-react/lib/AdaptiveCardHost";
42+
import { AdaptiveCardHost, IAdaptiveCardHostActionResult, AdaptiveCardHostThemeType, Action, CardElement, CardObjectRegistry, HostCapabilities } from "@pnp/spfx-controls-react/lib/AdaptiveCardHost";
3143
```
3244

3345
- Example on use the `AdaptiveCardHost` control with only required properties:
3446

35-
```TSX
47+
```TypeScript
3648
<AdaptiveCardHost
3749
card={card}
3850
onInvokeAction={(action) => alert(JSON.stringify(action))}
3951
onError={(error) => alert(error.message)}
52+
context={this.props.context}
4053
/>
4154
```
4255

4356
- Example on use the `AdaptiveCardHost` control with all properties:
4457

45-
```TSX
58+
```TypeScript
4659
<AdaptiveCardHost
4760
card={card}
4861
data={data}
@@ -62,63 +75,68 @@ import { AdaptiveCardHost, IAdaptiveCardHostActionResult, AdaptiveCardHostThemeT
6275
onUpdateHostCapabilities={(hostCapabilities: HostCapabilities) => {
6376
hostCapabilities.setCustomProperty("CustomPropertyName", Date.now);
6477
}}
65-
isUniqueControlInPage={true}
78+
context={this.props.context}
6679
/>
6780
```
6881

6982
- Example on use the `AdaptiveCardHost` control with SharePoint Theme:
7083

71-
```TSX
84+
```TypeScript
7285
<AdaptiveCardHost
7386
card={card}
7487
themeType={AdaptiveCardHostThemeType.SharePoint}
7588
onInvokeAction={(action) => alert(JSON.stringify(action))}
7689
onError={(error) => alert(error.message)}
90+
context={this.props.context}
7791
/>
7892
```
7993

8094
- Example on use the `AdaptiveCardHost` control with SharePoint Theme "Section Variation" ('this.props.theme' is the theme that come from the Web Part) */):
8195

82-
```TSX
96+
```TypeScript
8397
<AdaptiveCardHost
8498
card={card}
8599
theme={this.props.theme}
86100
themeType={AdaptiveCardHostThemeType.SharePoint}
87101
onInvokeAction={(action) => alert(JSON.stringify(action))}
88102
onError={(error) => alert(error.message)}
103+
context={this.props.context}
89104
/>
90105
```
91106

92107
- Example on use the `AdaptiveCardHost` control with Teams "Default" Theme:
93108

94-
```TSX
109+
```TypeScript
95110
<AdaptiveCardHost
96111
card={card}
97112
themeType={AdaptiveCardHostThemeType.Teams}
98113
onInvokeAction={(action) => alert(JSON.stringify(action))}
99114
onError={(error) => alert(error.message)}
115+
context={this.props.context}
100116
/>
101117
```
102118

103119
- Example on use the `AdaptiveCardHost` control with Teams "Dark" Theme:
104120

105-
```TSX
121+
```TypeScript
106122
<AdaptiveCardHost
107123
card={card}
108124
themeType={AdaptiveCardHostThemeType.TeamsDark}
109125
onInvokeAction={(action) => alert(JSON.stringify(action))}
110126
onError={(error) => alert(error.message)}
127+
context={this.props.context}
111128
/>
112129
```
113130

114131
- Example on use the `AdaptiveCardHost` control with Teams "High Contrast" Theme:
115132

116-
```TSX
133+
```TypeScript
117134
<AdaptiveCardHost
118135
card={card}
119136
themeType={AdaptiveCardHostThemeType.TeamsHighContrast}
120137
onInvokeAction={(action) => alert(JSON.stringify(action))}
121138
onError={(error) => alert(error.message)}
139+
context={this.props.context}
122140
/>
123141
```
124142

@@ -132,15 +150,15 @@ The `AdaptiveCardHost` control can be configured with the following properties:
132150
| data | { "$root": object } | no | Set Data Source for template rendering. |
133151
| style | React.CSSProperties | no | Set CSS Style. |
134152
| className | string | no | Set CSS Class. |
135-
| theme | IPartialTheme or ITheme | no | Set Fluent UI Theme. Used only if the "themeType" property is set to 'ThemeType.SharePoint'. If not set or set to null or not defined, the theme passed through context will be searched, or the default theme of the page will be loaded. |
153+
| theme | IPartialTheme or ITheme | no | Set Fluent UI Theme. Used only if the "themeType" property is set to 'ThemeType.SharePoint'. If not set or set to null or not defined, the theme passed through context will be searched, or the default theme of the page will be loaded. However, the Theme object will be automatically injected into the data object, so that it can be used by the Adaptive Cards binding engine. |
136154
| themeType | ThemeType | no | Select the Type of Theme you want to use. If it is not set or set to null or undefined, the 'ThemeType.SharePoint' value will be used and the "theme" property or the theme passed through the context or default page will be loaded. In other cases, the chosen Microsoft Teams theme will be applied. |
137155
| hostConfig | object | no | Set custom HostConfig. |
138156
| onInvokeAction | (action: IAdaptiveCardActionResult) => void | yes | Invoked every time an Action is performed. |
139157
| onError | (error: Error) => void | yes | Invoked every time an exception occurs in the rendering phase. |
140158
| onSetCustomElements | (registry: CardObjectRegistry<CardElement>) => void | no | Invoked to manage Elements to the current Adaptive Card instance. |
141159
| onSetCustomActions | (registry: CardObjectRegistry<Action>) => void | no | Invoked to manage Actions to the current Adaptive Card instance. |
142160
| onUpdateHostCapabilities | (hostCapabilities: HostCapabilities) => void | no | Invoked to manage the HostCapabilities object like add custom properties. |
143-
| isUniqueControlInPage | boolean | no | Set to true if you want to use only one instance of this control per page, false for multiple controls. This affects how CSS variables are set. |
161+
| context | BaseComponentContext | no | Set the context from the SPFx component. If set, some context properties will be automatically injected into the data object, so they can be used by the Adaptive Cards binding engine. |
144162

145163
Interface `IAdaptiveCardHostActionResult`
146164

docs/documentation/docs/controls/ListView.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ The ListView control can be configured with the following properties:
9999
| dragDropFiles | boolean | no | Specify the drag and drop files area option. Default false. |
100100
| onDrop | file | no | Event handler returns files from drag and drop. |
101101
| stickyHeader | boolean | no | Specifies if the header of the `ListView`, including search box, is sticky |
102+
| onRenderRow | (props: IDetailsRowProps) => JSX.Element \| null | no | Callback to override the default row rendering. |
102103
| sortItems | (items: any[], columnName: string, descending: boolean) =&gt; any[] | no | Custom sorting function to handle sorting by column |
103104
| className | string | no | Class name to apply additional styles on list view wrapper |
104105
| listClassName | string | no | Class name to apply additional styles on list view |

0 commit comments

Comments
 (0)