Skip to content

Commit 582ca3f

Browse files
authored
Merge pull request #1157 from pnp/dev
v3.7.0
2 parents e082497 + d2c67e9 commit 582ca3f

Some content is hidden

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

43 files changed

+40321
-5170
lines changed

.yo-rc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@microsoft/generator-sharepoint": {
3-
"version": "1.13.1",
3+
"version": "1.14.0",
44
"libraryName": "sp-dev-fx-controls-react",
55
"libraryId": "92b1e52c-a5fa-490a-bcf4-76080f39442c",
66
"environment": "spo",

CHANGELOG.JSON

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
{
22
"versions": [
3+
{
4+
"version": "3.7.0",
5+
"changes": {
6+
"new": [
7+
"`VariantThemeProvider`: new `VariantThemeProvider` control [#1120](https://github.com/pnp/sp-dev-fx-controls-react/issues/1120)",
8+
"`MonacoEditor`: new `MonacoEditor` control [#1134](https://github.com/pnp/sp-dev-fx-controls-react/pull/1134)"
9+
],
10+
"enhancements": [
11+
"`Carousel`: Prev and Next Buttons are not labeled, and read as 'Unlabeled button' by screen readers [#1137](https://github.com/pnp/sp-dev-fx-controls-react/issues/1137)",
12+
"`TreeView`: Ability to set keys of items that should be expanded by default [#1084](https://github.com/pnp/sp-dev-fx-controls-react/pull/1084)",
13+
"SharePoint Framework v1.14.0 support"
14+
],
15+
"fixes": [
16+
"`FilePicker`: `defaultFolderAbsolutePath` doesn't work with `webAbsoluteUrl` [#1129](https://github.com/pnp/sp-dev-fx-controls-react/issues/1129)",
17+
"`LocationPicker`: Location picker not resolving locations [#1149](https://github.com/pnp/sp-dev-fx-controls-react/issues/1149)",
18+
"`DynamicForm`: `RichText` Field losing focus on typing [#1024](https://github.com/pnp/sp-dev-fx-controls-react/issues/1024)",
19+
"`LivePersona`: Documentation fix for `template` type [#1147](https://github.com/pnp/sp-dev-fx-controls-react/pull/1147)"
20+
]
21+
},
22+
"contributors": [
23+
"[Amir Msai](https://github.com/amirmsai)",
24+
"[Fabio Franzini](https://github.com/fabiofranzini)",
25+
"[João Mendes](https://github.com/joaojmendes)",
26+
"[Mathijs Verbeeck](https://github.com/MathijsVerbeeck)",
27+
"[Rolands Strakis](https://github.com/wonderplayer)",
28+
"[Won Song](https://github.com/WonSong)"
29+
]
30+
},
331
{
432
"version": "3.6.0",
533
"changes": {
@@ -13,7 +41,6 @@
1341
"`FilePicker`: ability to allow external link and disable file existance chech [commit](https://github.com/pnp/sp-dev-fx-controls-react/commit/41ed4dd2277cf33050f9aeffe743dd684ed9d782)",
1442
"`FilePicker`: support for multi-select on additional sources [#1047](https://github.com/pnp/sp-dev-fx-controls-react/pull/1047)",
1543
"`DateTimePicker`: new property for allowTextInput [#1094](https://github.com/pnp/sp-dev-fx-controls-react/issues/1094)"
16-
1744
],
1845
"fixes": [
1946
"`LivePersona`: Cannot find module '@pnp/spfx-controls-react/lib/LivePersona'[#1069](https://github.com/pnp/sp-dev-fx-controls-react/issues/1069)",

CHANGELOG.md

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

3+
## 3.7.0
4+
5+
### New control(s)
6+
7+
- `VariantThemeProvider`: new `VariantThemeProvider` control [#1120](https://github.com/pnp/sp-dev-fx-controls-react/issues/1120)
8+
- `MonacoEditor`: new `MonacoEditor` control [#1134](https://github.com/pnp/sp-dev-fx-controls-react/pull/1134)
9+
10+
### Enhancements
11+
12+
- `Carousel`: Prev and Next Buttons are not labeled, and read as 'Unlabeled button' by screen readers [#1137](https://github.com/pnp/sp-dev-fx-controls-react/issues/1137)
13+
- `TreeView`: Ability to set keys of items that should be expanded by default [#1084](https://github.com/pnp/sp-dev-fx-controls-react/pull/1084)
14+
- SharePoint Framework v1.14.0 support
15+
16+
### Fixes
17+
18+
- `FilePicker`: `defaultFolderAbsolutePath` doesn't work with `webAbsoluteUrl` [#1129](https://github.com/pnp/sp-dev-fx-controls-react/issues/1129)
19+
- `LocationPicker`: Location picker not resolving locations [#1149](https://github.com/pnp/sp-dev-fx-controls-react/issues/1149)
20+
- `DynamicForm`: `RichText` Field losing focus on typing [#1024](https://github.com/pnp/sp-dev-fx-controls-react/issues/1024)
21+
- `LivePersona`: Documentation fix for `template` type [#1147](https://github.com/pnp/sp-dev-fx-controls-react/pull/1147)
22+
323
## 3.6.0
424

525
### New control(s)

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

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

3+
## 3.7.0
4+
5+
### New control(s)
6+
7+
- `VariantThemeProvider`: new `VariantThemeProvider` control [#1120](https://github.com/pnp/sp-dev-fx-controls-react/issues/1120)
8+
- `MonacoEditor`: new `MonacoEditor` control [#1134](https://github.com/pnp/sp-dev-fx-controls-react/pull/1134)
9+
10+
### Enhancements
11+
12+
- `Carousel`: Prev and Next Buttons are not labeled, and read as 'Unlabeled button' by screen readers [#1137](https://github.com/pnp/sp-dev-fx-controls-react/issues/1137)
13+
- `TreeView`: Ability to set keys of items that should be expanded by default [#1084](https://github.com/pnp/sp-dev-fx-controls-react/pull/1084)
14+
- SharePoint Framework v1.14.0 support
15+
16+
### Fixes
17+
18+
- `FilePicker`: `defaultFolderAbsolutePath` doesn't work with `webAbsoluteUrl` [#1129](https://github.com/pnp/sp-dev-fx-controls-react/issues/1129)
19+
- `LocationPicker`: Location picker not resolving locations [#1149](https://github.com/pnp/sp-dev-fx-controls-react/issues/1149)
20+
- `DynamicForm`: `RichText` Field losing focus on typing [#1024](https://github.com/pnp/sp-dev-fx-controls-react/issues/1024)
21+
- `LivePersona`: Documentation fix for `template` type [#1147](https://github.com/pnp/sp-dev-fx-controls-react/pull/1147)
22+
323
## 3.6.0
424

525
### New control(s)
2.19 MB
Loading
2.19 MB
Loading
11.1 MB
Loading

docs/documentation/docs/controls/Carousel.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ The Carousel component can be configured with the following properties:
132132
| indicatorsDisplay | CarouselIndicatorsDisplay | no | Specifies display mode of the indicators. Default value `overlap`. |
133133
| rootStyles | ICssInput | no | Allows to specify own styles for root element |
134134
| indicatorsContainerStyles | ICssInput | no | Allows to specify own styles for indicators container when indicatorsDisplay is set to "block" |
135+
| prevButtonAriaLabel | string | no | Aria label of the PreviousItem button. Default 'Previous item'. |
136+
| nextButtonAriaLabel | string | no | Aria label of the NextItem button. Default 'Next item'. |
135137

136138
enum `CarouselButtonsLocation`
137139

docs/documentation/docs/controls/LivePersona.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ The `LivePersona` control can be configured with the following properties:
5050
| serviceScope | ServiceScope | yes | The SPFx ServiceScope object loaded from context of web part or extension. |
5151
| upn |string | yes | User UPN. |
5252
| disableHover | boolean | no | If info should not appear on hover. |
53-
| template | string | JSX.ELement | yes | The content to wrap with persona info. |
53+
| template | string \| JSX.Element | yes | The content to wrap with persona info. |
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Monaco Editor control
2+
3+
This control is a implementatiopn of Monaco Editor.
4+
5+
Here is an example of the control:
6+
7+
![monacoeditor](../assets/MonacoEditor1.png)
8+
9+
`MonacoEditor` dark theme:
10+
11+
![monacoeditor](../assets/MonacoEditor2.png)
12+
13+
14+
## How to use this control in your solutions
15+
16+
- 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.
17+
- Import the control into your component:
18+
19+
```TypeScript
20+
import { MonacoEditor } from "@pnp/spfx-controls-react/lib/MonacoEditor";
21+
```
22+
23+
- Use the `MonacoEditor` control in your code as follows:
24+
25+
```TypeScript
26+
<MonacoEditor value={defaultValue}
27+
showMiniMap={true}
28+
onValueChange={onValueChange}
29+
language={"javascript"}/>
30+
```
31+
32+
- The `onValueChange` change event returns the upadated code and array with messages of errors on validation and can be implemented as follows:
33+
**this validation is done only to JSON language
34+
35+
```TypeScript
36+
const onValueChange = React.useCallback((newValue: string, validationErrors: string[]): void => {console.log(newValue);} , []);
37+
```
38+
39+
## Implementation
40+
41+
The `MonacoEditor` control can be configured with the following properties:
42+
43+
| Property | Type | Required | Description |
44+
| ---- | ---- | ---- | ---- |
45+
| value | string | yes | default content for editor |
46+
| theme | string | no | theme used by editor , two themes are supported 'vs' and 'vs-dark', default 'vs' |
47+
| readOnly | boolean | no | indecate if editor is in read only mode |
48+
| showLineNumbers | boolean | no | editor show linenumber or not, default : yes|
49+
| onValueChange |(newValue:string, validationErrors:string[]) => void | no | function to get code changes, return an array with validation error in case of language is 'JSON' |
50+
| language |string | yes | editor code language, please see https://microsoft.github.io/monaco-editor/index.html for supported languages|
51+
| jsonDiagnosticsOptions |monaco.languages.json.DiagnosticsOptions | no | define options to JSON validation, please see https://microsoft.github.io/monaco-editor/index.html for more details |
52+
| jscriptDiagnosticsOptions | monaco.languages.typescript.DiagnosticsOptions | no | define options to javascript or typescript validation, please see https://microsoft.github.io/monaco-editor/index.html for more details |
53+
54+

0 commit comments

Comments
 (0)