Skip to content

Commit 8b19f3c

Browse files
Merge branch 'dev' of https://github.com/pnp/sp-dev-fx-controls-react into joaojmendes-UploadFiles
2 parents fea68d3 + 5bf16f8 commit 8b19f3c

File tree

12 files changed

+3686
-3666
lines changed

12 files changed

+3686
-3666
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.15.2",
3+
"version": "1.16.1",
44
"libraryName": "sp-dev-fx-controls-react",
55
"libraryId": "92b1e52c-a5fa-490a-bcf4-76080f39442c",
66
"environment": "spo",

CHANGELOG.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,25 @@
99
"`ListItemPicker`: Add Styles property to ListItemPicker and ComboBoxListItemPicker [#1407](https://github.com/pnp/sp-dev-fx-controls-react/pull/1407)",
1010
"`SitePicker`: Pass `styles` property to Dropdown [#1389](https://github.com/pnp/sp-dev-fx-controls-react/pull/1389)",
1111
"`FilePicker`: Site Tab - Many Document Libraries No Scrolling [#1413](https://github.com/pnp/sp-dev-fx-controls-react/pull/1413)",
12-
"`DynamicForm`: Add `respectETag` option to `DynamicForm` [#1395](https://github.com/pnp/sp-dev-fx-controls-react/issues/1395)"
12+
"`DynamicForm`: Add `respectETag` option to `DynamicForm` [#1395](https://github.com/pnp/sp-dev-fx-controls-react/issues/1395)",
13+
"`MonacoEditor`: Fixed minor typos and misleading instructions [#1415](https://github.com/pnp/sp-dev-fx-controls-react/pull/1415)",
14+
"SharePoint Framework v1.16.1 support [#1427](https://github.com/pnp/sp-dev-fx-controls-react/issues/1427)",
15+
"`RichText`: `label` property is missing [#1375](https://github.com/pnp/sp-dev-fx-controls-react/issues/1375)"
1316
],
1417
"fixes": [
1518
"`DateTimePicker`: broken link for `getErrorMessage` property fixed [#1277](https://github.com/pnp/sp-dev-fx-controls-react/pull/1381)",
1619
"`ProgressStepsIndicator`: Fix missing image reference in Progress Steps Indicator [#1409](https://github.com/pnp/sp-dev-fx-controls-react/issues/1409)",
1720
"`DynamicForm`: Dynamicform is hanging on the loading screen if the list has a single value list lookup field [#1393](https://github.com/pnp/sp-dev-fx-controls-react/issues/1393)",
1821
"`ListView`: Update ListView control docs to use a valid field for the icon [#1398](https://github.com/pnp/sp-dev-fx-controls-react/pull/1398)",
19-
"`Accordion`: Fixing Accordion control documentation image issue [#1408](https://github.com/pnp/sp-dev-fx-controls-react/issues/1408)"
22+
"`Accordion`: Fixing Accordion control documentation image issue [#1408](https://github.com/pnp/sp-dev-fx-controls-react/issues/1408)",
23+
"`DynamicForm`: Cannot read properties of undefined (reading 'startsWith') when submitting the form with `contentType={undefined]` [#1431](https://github.com/pnp/sp-dev-fx-controls-react/issues/1431)"
2024
]
2125
},
2226
"contributions": [
2327
"[Brian Krainer Jacobsen](https://github.com/krainer)",
2428
"[Edin Kapic](https://github.com/ekapic)",
2529
"[Harminder Singh](https://github.com/HarminderSethi)",
30+
"[Hugo Bernier](https://github.com/hugoabernier)",
2631
"[João Mendes](https://github.com/joaojmendes)",
2732
"[mgitta](https://github.com/mgitta)",
2833
"[Michaël Maillot](https://github.com/michaelmaillot)",

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@
99
- `SitePicker`: Pass `styles` property to Dropdown [#1389](https://github.com/pnp/sp-dev-fx-controls-react/pull/1389)
1010
- `FilePicker`: Site Tab - Many Document Libraries No Scrolling [#1413](https://github.com/pnp/sp-dev-fx-controls-react/pull/1413)
1111
- `DynamicForm`: Add `respectETag` option to `DynamicForm` [#1395](https://github.com/pnp/sp-dev-fx-controls-react/issues/1395)
12+
- `MonacoEditor`: Fixed minor typos and misleading instructions [#1415](https://github.com/pnp/sp-dev-fx-controls-react/pull/1415)
13+
- SharePoint Framework v1.16.1 support [#1427](https://github.com/pnp/sp-dev-fx-controls-react/issues/1427)
14+
- `RichText`: `label` property is missing [#1375](https://github.com/pnp/sp-dev-fx-controls-react/issues/1375)
1215

1316
### Fixes
1417

1518
- `DateTimePicker`: broken link for `getErrorMessage` property fixed [#1277](https://github.com/pnp/sp-dev-fx-controls-react/pull/1381)
1619
- `ProgressStepsIndicator`: Fix missing image reference in Progress Steps Indicator [#1409](https://github.com/pnp/sp-dev-fx-controls-react/issues/1409)
1720
- `DynamicForm`: Dynamicform is hanging on the loading screen if the list has a single value list lookup field [#1393](https://github.com/pnp/sp-dev-fx-controls-react/issues/1393)
1821
- `ListView`: Update ListView control docs to use a valid field for the icon [#1398](https://github.com/pnp/sp-dev-fx-controls-react/pull/1398)
22+
- `Accordion`: Fixing Accordion control documentation image issue [#1408](https://github.com/pnp/sp-dev-fx-controls-react/issues/1408)
23+
- `DynamicForm`: Cannot read properties of undefined (reading 'startsWith') when submitting the form with `contentType={undefined]` [#1431](https://github.com/pnp/sp-dev-fx-controls-react/issues/1431)
1924

2025
### Contributors
2126

22-
Special thanks to our contributors (in alphabetical order): [Brian Krainer Jacobsen](https://github.com/krainer), [Edin Kapic](https://github.com/ekapic), [Harminder Singh](https://github.com/HarminderSethi), [João Mendes](https://github.com/joaojmendes), [mgitta](https://github.com/mgitta), [mikezimm](https://github.com/mikezimm).
27+
Special thanks to our contributors (in alphabetical order): [Brian Krainer Jacobsen](https://github.com/krainer), [Edin Kapic](https://github.com/ekapic), [Harminder Singh](https://github.com/HarminderSethi), [Hugo Bernier](https://github.com/hugoabernier), [João Mendes](https://github.com/joaojmendes), [mgitta](https://github.com/mgitta), [Michaël Maillot](https://github.com/michaelmaillot), [mikezimm](https://github.com/mikezimm).
2328

2429
## 3.12.0
2530

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,22 @@
99
- `SitePicker`: Pass `styles` property to Dropdown [#1389](https://github.com/pnp/sp-dev-fx-controls-react/pull/1389)
1010
- `FilePicker`: Site Tab - Many Document Libraries No Scrolling [#1413](https://github.com/pnp/sp-dev-fx-controls-react/pull/1413)
1111
- `DynamicForm`: Add `respectETag` option to `DynamicForm` [#1395](https://github.com/pnp/sp-dev-fx-controls-react/issues/1395)
12+
- `MonacoEditor`: Fixed minor typos and misleading instructions [#1415](https://github.com/pnp/sp-dev-fx-controls-react/pull/1415)
13+
- SharePoint Framework v1.16.1 support [#1427](https://github.com/pnp/sp-dev-fx-controls-react/issues/1427)
14+
- `RichText`: `label` property is missing [#1375](https://github.com/pnp/sp-dev-fx-controls-react/issues/1375)
1215

1316
### Fixes
1417

1518
- `DateTimePicker`: broken link for `getErrorMessage` property fixed [#1277](https://github.com/pnp/sp-dev-fx-controls-react/pull/1381)
1619
- `ProgressStepsIndicator`: Fix missing image reference in Progress Steps Indicator [#1409](https://github.com/pnp/sp-dev-fx-controls-react/issues/1409)
1720
- `DynamicForm`: Dynamicform is hanging on the loading screen if the list has a single value list lookup field [#1393](https://github.com/pnp/sp-dev-fx-controls-react/issues/1393)
1821
- `ListView`: Update ListView control docs to use a valid field for the icon [#1398](https://github.com/pnp/sp-dev-fx-controls-react/pull/1398)
22+
- `Accordion`: Fixing Accordion control documentation image issue [#1408](https://github.com/pnp/sp-dev-fx-controls-react/issues/1408)
23+
- `DynamicForm`: Cannot read properties of undefined (reading 'startsWith') when submitting the form with `contentType={undefined]` [#1431](https://github.com/pnp/sp-dev-fx-controls-react/issues/1431)
1924

2025
### Contributors
2126

22-
Special thanks to our contributors (in alphabetical order): [Brian Krainer Jacobsen](https://github.com/krainer), [Edin Kapic](https://github.com/ekapic), [Harminder Singh](https://github.com/HarminderSethi), [João Mendes](https://github.com/joaojmendes), [mgitta](https://github.com/mgitta), [mikezimm](https://github.com/mikezimm).
27+
Special thanks to our contributors (in alphabetical order): [Brian Krainer Jacobsen](https://github.com/krainer), [Edin Kapic](https://github.com/ekapic), [Harminder Singh](https://github.com/HarminderSethi), [Hugo Bernier](https://github.com/hugoabernier), [João Mendes](https://github.com/joaojmendes), [mgitta](https://github.com/mgitta), [Michaël Maillot](https://github.com/michaelmaillot), [mikezimm](https://github.com/mikezimm).
2328

2429
## 3.12.0
2530

docs/documentation/docs/controls/MonacoEditor.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Monaco Editor control
22

3-
This control is a implementatiopn of Monaco Editor.
3+
This control is an implementation of the Monaco Editor. The Monaco Editor is the code editor that powers [VS Code](https://github.com/microsoft/vscode).
44

55
Here is an example of the control:
66

@@ -30,22 +30,33 @@ import { MonacoEditor } from "@pnp/spfx-controls-react/lib/MonacoEditor";
3030
```
3131

3232
- 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
33+
34+
> This validation is only available for JSON language
35+
36+
Your `onValueChange` handler would follow a similar format to this:
37+
38+
39+
```TypeScript
40+
const onValueChange = (newValue: string, validationErrors: string[]): void => { console.log(newValue); };
41+
```
42+
43+
Or, if using React Hooks:
3444

3545
```TypeScript
3646
const onValueChange = React.useCallback((newValue: string, validationErrors: string[]): void => {console.log(newValue);} , []);
3747
```
3848

49+
3950
## Implementation
4051

4152
The `MonacoEditor` control can be configured with the following properties:
4253

4354
| Property | Type | Required | Description |
4455
| ---- | ---- | ---- | ---- |
4556
| 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|
57+
| theme | string | no | theme used by editor, two themes are supported 'vs' and 'vs-dark', default 'vs' |
58+
| readOnly | boolean | no | indicate if editor is in read-only mode |
59+
| showLineNumbers | boolean | no | editor show line number or not, default : yes|
4960
| onValueChange |(newValue:string, validationErrors:string[]) => void | no | function to get code changes, return an array with validation error in case of language is 'JSON' |
5061
| language |string | yes | editor code language, please see https://microsoft.github.io/monaco-editor/index.html for supported languages|
5162
| jsonDiagnosticsOptions |monaco.languages.json.DiagnosticsOptions | no | define options to JSON validation, please see https://microsoft.github.io/monaco-editor/index.html for more details |

docs/documentation/docs/controls/RichText.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,40 @@ private onTextChange = (newText: string) => {
4141
}
4242
```
4343

44+
- By adding `label` property, the control is better identified, especially when used in a form
45+
46+
```TypeScript
47+
<RichText label="My multiline text field" value={this.props.value} />
48+
```
49+
50+
It is also possible to customize the control label's rendering:
51+
52+
```TypeScript
53+
const richText = (
54+
<RichText id="spfxRichText" label="My multiline text field"
55+
onRenderLabel={onRenderCustomLabel}
56+
value={this.props.value} />
57+
);
58+
59+
const onRenderCustomLabel = (rtProps: IRichTextProps): JSX.Element => {
60+
return <Label htmlFor={rtProps.id}>{rtProps.label}</Label>;
61+
}
62+
```
63+
4464
## Implementation
4565

4666
The RichText control can be configured with the following properties:
4767

4868
| Property | Type | Required | Description |
4969
| ---- | ---- | ---- | ---- |
70+
| id | string | no | The ID to apply to the RichText control. |
71+
| label | string | no | The label displayed above the RichText control. |
5072
| className | string | no | The custom CSS class to apply to the RichText control. |
5173
| isEditMode | boolean | no | `true` indicates that users will be able to edit the content of the RichText control. `false` will display the rich text as read-only. |
5274
| styleOptions | StyleOptions | no | Define the styles you want to show or hide for the rich text editor |
5375
| value | string | no | Sets the rich text to display in the RichText control. |
5476
| onChange | (text: string) => string | no | onChange handler for the RichText control. The function must return a `string` containing the rich text to display in the RichText control. |
77+
| onRenderLabel | (props: IRichTextProps) => JSX.Element | no | Custom renderer for the RichText control's label. The function must return a `JSX.Element`. |
5578

5679
`StyleOptions` interface
5780

0 commit comments

Comments
 (0)