-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from SharePoint/dev
v1.2.0 release merge
- Loading branch information
Showing
110 changed files
with
11,972 additions
and
6,179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# IFrameDialog control | ||
|
||
This control renders a Dialog with an iframe as a content. | ||
|
||
Here is an example of the control in action: | ||
|
||
![IFrameDialog control](../assets/FieldLookupRendererDialog.png) | ||
|
||
## How to use this control in your solutions | ||
|
||
- 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. | ||
- Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { IFrameDialog } from "@pnp/spfx-controls-react/lib/IFrameDialog"; | ||
``` | ||
|
||
- Use the `IFrameDialog` control in your code as follows: | ||
|
||
```TypeScript | ||
<IFrameDialog | ||
url={this.state.lookupDispFormUrl} | ||
iframeOnLoad={this._onIframeLoaded.bind(this)} | ||
hidden={this.state.hideDialog} | ||
onDismiss={this._onDialogDismiss.bind(this)} | ||
modalProps={{ | ||
isBlocking: true, | ||
containerClassName: styles.dialogContainer | ||
}} | ||
dialogContentProps={{ | ||
type: DialogType.close, | ||
showCloseButton: true | ||
}} | ||
width={'570px'} | ||
height={'315px'}/> | ||
``` | ||
|
||
## Implementation | ||
|
||
The IFrameDialog component can be configured with the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| dialogContentProps | IDialogContentProps | no | Props to be passed through to Dialog Content. | | ||
| hidden | boolean | no | Whether the dialog is hidden. | | ||
| modalProps | IModalProps | no | Props to be passed through to Modal. | | ||
| onDismiss | (ev?: React.MouseEvent<HTMLButtonElement>) => any | no | A callback function for when the Dialog is dismissed from the close button or light dismiss. Can also be specified separately in content and modal. | | ||
| url | string | yes | iframe Url | | ||
| iframeOnload | iframeOnLoad?: (iframe: any) => {} | no | iframe's onload event handler | | ||
| width | string | yes | iframe's width | | ||
| heigth | string | yes | iframe's height | | ||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/FileTypeIcon) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
docs/documentation/docs/controls/fields/FieldAttachmentsRenderer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# FieldAttachmentsRenderer control | ||
|
||
This control renders Clip icon based on the provided `count` property is defined and greater than 0. | ||
|
||
![FieldAttachmentsRenderer control output](../../assets/FieldAttachmentsRenderer.png) | ||
|
||
**Note:** this control displays correctly starting with SharePoint Framework v1.4 | ||
|
||
## Covered Fields | ||
- Attachments | ||
|
||
## How to use this control in your solutions | ||
|
||
- 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. | ||
- Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { FieldAttachmentsRenderer } from "@pnp/spfx-controls-react/lib/FieldAttachmentsRenderer"; | ||
``` | ||
|
||
- Use the `FieldAttachmentsRenderer` control in your code as follows: | ||
|
||
```TypeScript | ||
<FieldAttachmentsRenderer count={event.fieldValue} className={'some-class'} cssProps={{ background: '#f00' }} /> | ||
``` | ||
|
||
## Implementation | ||
|
||
The FieldAttachmentsRenderer component can be configured with the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| cssProps | React.CSSProperties | no | CSS styles to apply to the renderer. | | ||
| className | ICssInput | no | CSS classes to apply to the renderer. | | ||
| count | number | no | Amount of attachments. The icon is displayed if the property is defined and greater than 0 | | ||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/fields/FieldAttachmentsRenderer) |
38 changes: 38 additions & 0 deletions
38
docs/documentation/docs/controls/fields/FieldDateRenderer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# FieldDateRenderer control | ||
|
||
This control renders date string as a simple text. | ||
|
||
![FieldDateRenderer control output](../../assets/FieldDateRenderer.png) | ||
|
||
## Covered Fields | ||
- Date and Time | ||
|
||
## How to use this control in your solutions | ||
|
||
- 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. | ||
- Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { FieldDateRenderer } from "@pnp/spfx-controls-react/lib/FieldDateRenderer"; | ||
``` | ||
|
||
- Use the `FieldDateRenderer` control in your code as follows: | ||
|
||
```TypeScript | ||
<FieldDateRenderer text={event.fieldValue} className={'some-class'} cssProps={{ background: '#f00' }} /> | ||
``` | ||
|
||
**Note:** FieldDateRenderer doesn't provide functionality to render date in friendly format. It just renders the provided text as is. To learn more about friendly formatting please refer to `FieldRendererHelper` implementation. | ||
|
||
## Implementation | ||
|
||
The FieldDateRenderer component can be configured with the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| cssProps | React.CSSProperties | no | CSS styles to apply to the renderer. | | ||
| className | ICssInput | no | CSS classes to apply to the renderer. | | ||
| text | string | no | Text to be rendered | | ||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/fields/FieldDateRenderer) | ||
|
39 changes: 39 additions & 0 deletions
39
docs/documentation/docs/controls/fields/FieldFileTypeRenderer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# FieldFileTypeRenderer control | ||
|
||
This control renders document or folder icon based on file path. Office UI Fabric icons font is used to render the icons. | ||
|
||
**Note:** this control displays correctly starting with SharePoint Framework v1.4 | ||
|
||
![FieldFileTypeRenderer control output](../../assets/FieldFileTypeRenderer.png) | ||
|
||
## Covered Fields | ||
- Type (DocIcon) | ||
|
||
## How to use this control in your solutions | ||
|
||
- 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. | ||
- Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { FieldFileTypeRenderer } from "@pnp/spfx-controls-react/lib/FieldFileTypeRenderer"; | ||
``` | ||
|
||
- Use the `FieldFileTypeRenderer` control in your code as follows: | ||
|
||
```TypeScript | ||
<FieldFileTypeRenderer path={fileLeafRef} isFolder={false} className={'some-class'} cssProps={{ background: '#f00' }} /> | ||
``` | ||
|
||
## Implementation | ||
|
||
The FieldFileTypeRenderer component can be configured with the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| cssProps | React.CSSProperties | no | CSS styles to apply to the renderer. | | ||
| className | ICssInput | no | CSS classes to apply to the renderer. | | ||
| path | string | yes | document/file path | | ||
| isFolder | boolean | no | true if the icon should be rendered for a folder, not file | | ||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/fields/FieldFileTypeRenderer) | ||
|
41 changes: 41 additions & 0 deletions
41
docs/documentation/docs/controls/fields/FieldLookupRenderer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# FieldLookupRenderer control | ||
|
||
This control renders lookup values. Each lookup item is clickable. Click on the lookup item leads to opening of referenced item's display form. | ||
|
||
**Note:** this control displays correctly starting with SharePoint Framework v1.4 | ||
|
||
![FieldLookupRenderer control output](../../assets/FieldLookupRenderer.png) | ||
![FieldLookupRenderer dialog](../../assets/FieldLookupRendererDialog.png) | ||
|
||
## Covered Fields | ||
- Lookup (single, multi) | ||
|
||
## How to use this control in your solutions | ||
|
||
- 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. | ||
- Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { FieldLookupRenderer } from "@pnp/spfx-controls-react/lib/FieldLookupRenderer"; | ||
``` | ||
|
||
- Use the `FieldLookupRenderer` control in your code as follows: | ||
|
||
```TypeScript | ||
<FieldLookupRenderer lookups={event.fieldValue} dispFormUrl={'https://contoso.sharepoint.com/_layouts/15/listform.aspx?PageType=4&ListId={list_id}'} className={'some-class'} cssProps={{ background: '#f00' }} /> | ||
``` | ||
|
||
## Implementation | ||
|
||
The FieldLookupRenderer component can be configured with the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| cssProps | React.CSSProperties | no | CSS styles to apply to the renderer. | | ||
| className | ICssInput | no | CSS classes to apply to the renderer. | | ||
| lookups | ISPFieldLookupValue[] | yes | Lookup field values. | | ||
| dispFormUrl | boolean | no | Url of Display form for the list that is referenced by the lookup. | | ||
| onClick | (args: ILookupClickEventArgs) => {} | no | Custom event handler of lookup item click. If not set the dialog with Display Form will be shown. | | ||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/fields/FieldLookupRenderer) | ||
|
45 changes: 45 additions & 0 deletions
45
docs/documentation/docs/controls/fields/FieldNameRenderer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# FieldNameRenderer control | ||
|
||
This control renders document's name as a link. The link provides either preview (if it is available) or direct download. Additionally, new documents are marked with "Glimmer" icon. | ||
|
||
**Note:** The Name column in document libraries is marked as noneditable. See [this issue](https://github.com/SharePoint/sp-dev-docs/issues/1207) for details. | ||
**Note** Glimmer icon displays correctly starting with SharePoint Framework v1.4 | ||
|
||
![FieldNameRenderer control output](../../assets/FieldNameRenderer.png) | ||
|
||
## Covered Fields | ||
- Document Name (LinkFilename, LinkFilenameNomenu, FileLieafRef) | ||
|
||
## How to use this control in your solutions | ||
|
||
- 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. | ||
- Import the following modules to your component: | ||
|
||
```TypeScript | ||
import { FieldNameRenderer } from "@pnp/spfx-controls-react/lib/FieldNameRenderer"; | ||
``` | ||
|
||
- Use the `FieldNameRenderer` control in your code as follows: | ||
|
||
```TypeScript | ||
<FieldNameRenderer text={'Technical Requirements'} isLink={true} isNew={false} filePath={'https://contoso.sharepoint.com/Documents/tech-requirements.pdf'} className={'some-class'} cssProps={{ background: '#f00' }} /> | ||
``` | ||
|
||
## Implementation | ||
|
||
The FieldNameRenderer component can be configured with the following properties: | ||
|
||
| Property | Type | Required | Description | | ||
| ---- | ---- | ---- | ---- | | ||
| cssProps | React.CSSProperties | no | CSS styles to apply to the renderer. | | ||
| className | ICssInput | no | CSS classes to apply to the renderer. | | ||
| text | string | no | Text to be rendered. | | ||
| isLink | boolean | yes | True if the name should be rendered as a link. | | ||
| isNew | boolean | no | True if the document is new. | | ||
| filePath | string | no | Path to the document. | | ||
| hasPreview | boolean | no | True if the document has preview (true by default) | | ||
| onClick | (args: INameClickEventArgs) => {} | no | Custom handler for link click. If not set link click will lead to rendering document preview. | | ||
|
||
|
||
![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/fields/FieldNameRenderer) | ||
|
Oops, something went wrong.