Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge for 1.13.0 #278

Merged
merged 61 commits into from
Apr 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1ff6c8b
progress control - work in progress
AJIXuMuK Feb 1, 2019
3b5ebe7
Progress component - done
AJIXuMuK Feb 2, 2019
11e33c5
small doc fix
AJIXuMuK Feb 2, 2019
12b825d
error icon change; added props to overwrite icons; hasError prioritiz…
AJIXuMuK Feb 5, 2019
4d9741b
merge with dev
Feb 15, 2019
35d3aaf
lost export
Feb 15, 2019
4ee0598
Updated web part title documentation
hugoabernier Feb 24, 2019
fe2bd9a
Added screen shot of web part title with "see all"
hugoabernier Feb 24, 2019
fe8f38a
Added moreLink prop
hugoabernier Feb 24, 2019
93a1020
Added logic to render if no title is provided, but morelink is
hugoabernier Feb 24, 2019
398a6c8
Update ListView.md: iconFieldName description
PzKfWg Feb 28, 2019
2f491f5
interface for DateTime strings
ltdu Mar 2, 2019
c46e98e
translations
ltdu Mar 2, 2019
ceaa551
use coresponding resource
ltdu Mar 2, 2019
6277e44
change person photo url
ltdu Mar 2, 2019
66496cc
remove private field
ltdu Mar 3, 2019
484cf8a
Update ListItemAttachments.md
moersoy Mar 13, 2019
823d18a
Merge changes
estruyf Mar 28, 2019
404713f
Updates + code refactoring on the RichText control
estruyf Mar 28, 2019
a54ae46
Merge branch 'hugoabernier-feature-richtext' into dev
estruyf Mar 28, 2019
d39aa0c
Version updates + changelog
estruyf Mar 28, 2019
8da7129
Merge branch 'hb-webparttitle' of https://github.com/hugoabernier/sp-…
estruyf Mar 28, 2019
4f2e1c8
Documentation changes + sample update
estruyf Mar 28, 2019
ec706d4
Merge branch 'hugoabernier-hb-webparttitle' into dev
estruyf Mar 28, 2019
8456bce
Updated changelog + documentation
estruyf Mar 28, 2019
ee037d5
#260 - Added support for PDF icon file type
estruyf Mar 28, 2019
134bfec
Updated the changelog
estruyf Mar 28, 2019
e387370
Code merge + refactoring for #230
estruyf Mar 29, 2019
f5107ed
Merge branch 'AJIXuMuK-progress-control' into dev
estruyf Mar 29, 2019
c1bec92
Update RichText.md
hugoabernier Jan 2, 2019
c1f44de
Updated changelog
estruyf Mar 29, 2019
128371f
Merge branch 'dev' of github.com:SharePoint/sp-dev-fx-controls-react;…
estruyf Mar 29, 2019
3d209a3
Merge branch 'PzKfWg-patch-1' into dev
estruyf Mar 29, 2019
6d0526b
Updated changelog
estruyf Mar 29, 2019
ab7117d
Merge branch 'lt-translations' of https://github.com/ltdu/sp-dev-fx-c…
estruyf Mar 29, 2019
f72ca6c
Merge branch 'ltdu-lt-translations' into dev
estruyf Mar 29, 2019
1c13600
Updated changelog
estruyf Mar 29, 2019
2d31614
Merge branch 'people-picker-photo' of https://github.com/ltdu/sp-dev-…
estruyf Mar 29, 2019
9462fb3
Merge branch 'ltdu-people-picker-photo' into dev
estruyf Mar 29, 2019
29d0910
Update changelog
estruyf Mar 29, 2019
81a61c5
Merge pull request #254 from moersoy/patch-1
estruyf Mar 29, 2019
c005c9e
Merge branch 'dev' of github.com:SharePoint/sp-dev-fx-controls-react …
estruyf Mar 29, 2019
892b624
Updated changelog
estruyf Mar 29, 2019
9126ec4
#21 - code refactoring + MaskTextField implemention
estruyf Mar 29, 2019
38c6654
Updated localization
estruyf Mar 29, 2019
bb0c93a
Calculates richtext toolbar top. Fixes #265.
hugoabernier Apr 3, 2019
2ba15dc
* Extended functionality to folder and item-level
Apr 8, 2019
509525c
* Minor correction.
Apr 8, 2019
20bace4
Changed the name of the new function
Apr 8, 2019
fea5f3e
Merge branch 'SherpasGroup-AddDateTimePickerControl' into dev
estruyf Apr 9, 2019
d32fd65
Updated changelog
estruyf Apr 9, 2019
5321560
Merge branch 'dev' of https://github.com/hugoabernier/sp-dev-fx-contr…
estruyf Apr 24, 2019
69e5616
Merge branch 'hugoabernier-dev' into dev
estruyf Apr 24, 2019
3b8d8b9
Updated changelog
estruyf Apr 24, 2019
b425799
Merge branch 'dev' of https://github.com/Varuuna/sp-dev-fx-controls-r…
estruyf Apr 24, 2019
9d47d8c
#271 - Better implementation for the item and folder checks
estruyf Apr 24, 2019
36b73a2
Merge branch 'Varuuna-dev' into dev
estruyf Apr 24, 2019
074ee83
Updated changelog + documentation
estruyf Apr 24, 2019
2d2d1fb
#275 - Fix for single quotes around the people picker class
estruyf Apr 24, 2019
6728550
Updated changelog
estruyf Apr 24, 2019
9cf0ba6
Small fix for onChange event in RichText
estruyf Apr 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions CHANGELOG.JSON
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
{
"versions": [
{
"version": "1.13.0",
"changes": {
"new": [
"`Progress`: New control added [#230](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/230)",
"`DateTimePicker`: New control added [#21](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/21)",
"`RichText`: New control added [#20](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/20)"
],
"enhancements": [
"`SecurityTrimmedControl`: Support for item and folder permission checks added [#271](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/271)",
"Retrieve the user its profile picture from SharePoint instead of Office 365 / Outlook [#248](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/248)",
"Added `Lithuanian` localization [#247](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/247)",
"`FileTypeIcon`: Added support for PDF icon file types [#260](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/260)",
"`WebPartTitle`: Added the ability to render a `see all` link or custom component [#228](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/228)"
],
"fixes": [
"`PeoplePicker`: Fix for single quotes around the ms-peoplepicker class [#275](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/275)",
"`RichText`: Fix for toolbar that appears at top of the page [#265](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/265)",
"`ListItemAttachments`: Updated import statement reference in the documentation [#254](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/254)",
"`ListView`: Updated documentation for the `iconFieldName` property [#245](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/245)"
]
},
"contributions": [
"[Francis](https://github.com/PzKfWg)",
"[Fredrik Andreasson](https://github.com/Varuuna)",
"[Hugo Bernier](https://github.com/hugoabernier)",
"[Tautvydas Duda](https://github.com/ltdu)",
"[Özgür Ersoy](https://github.com/moersoy)",
"[Robert Lindström](https://github.com/robert-lindstrom)",
"[Alex Terentiev](https://github.com/AJIXuMuK)"
]
},
{
"version": "1.12.0",
"changes": {
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Releases

## 1.13.0

### New control(s)

- `Progress`: New control added [#230](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/230)
- `DateTimePicker`: New control added [#21](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/21)
- `RichText`: New control added [#20](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/20)

### Enhancements

- `SecurityTrimmedControl`: Support for item and folder permission checks added [#271](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/271)
- Retrieve the user its profile picture from SharePoint instead of Office 365 / Outlook [#248](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/248)
- Added `Lithuanian` localization [#247](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/247)
- `FileTypeIcon`: Added support for PDF icon file types [#260](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/260)
- `WebPartTitle`: Added the ability to render a `see all` link or custom component [#228](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/228)

### Fixes

- `PeoplePicker`: Fix for single quotes around the ms-peoplepicker class [#275](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/275)
- `RichText`: Fix for toolbar that appears at top of the page [#265](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/265)
- `ListItemAttachments`: Updated import statement reference in the documentation [#254](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/254)
- `ListView`: Updated documentation for the `iconFieldName` property [#245](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/245)

### Contributors

Special thanks to our contributors (in alphabetical order): [Francis](https://github.com/PzKfWg), [Fredrik Andreasson](https://github.com/Varuuna), [Hugo Bernier](https://github.com/hugoabernier), [Tautvydas Duda](https://github.com/ltdu), [Özgür Ersoy](https://github.com/moersoy), [Robert Lindström](https://github.com/robert-lindstrom), [Alex Terentiev](https://github.com/AJIXuMuK).

## 1.12.0

### New control(s)
Expand Down
27 changes: 27 additions & 0 deletions docs/documentation/docs/about/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Releases

## 1.13.0

### New control(s)

- `Progress`: New control added [#230](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/230)
- `DateTimePicker`: New control added [#21](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/21)
- `RichText`: New control added [#20](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/20)

### Enhancements

- `SecurityTrimmedControl`: Support for item and folder permission checks added [#271](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/271)
- Retrieve the user its profile picture from SharePoint instead of Office 365 / Outlook [#248](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/248)
- Added `Lithuanian` localization [#247](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/247)
- `FileTypeIcon`: Added support for PDF icon file types [#260](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/260)
- `WebPartTitle`: Added the ability to render a `see all` link or custom component [#228](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/228)

### Fixes

- `PeoplePicker`: Fix for single quotes around the ms-peoplepicker class [#275](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/275)
- `RichText`: Fix for toolbar that appears at top of the page [#265](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/265)
- `ListItemAttachments`: Updated import statement reference in the documentation [#254](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/254)
- `ListView`: Updated documentation for the `iconFieldName` property [#245](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/245)

### Contributors

Special thanks to our contributors (in alphabetical order): [Francis](https://github.com/PzKfWg), [Fredrik Andreasson](https://github.com/Varuuna), [Hugo Bernier](https://github.com/hugoabernier), [Tautvydas Duda](https://github.com/ltdu), [Özgür Ersoy](https://github.com/moersoy), [Robert Lindström](https://github.com/robert-lindstrom), [Alex Terentiev](https://github.com/AJIXuMuK).

## 1.12.0

### New control(s)
Expand Down
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.
Binary file added docs/documentation/docs/assets/Progress.png
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.
88 changes: 88 additions & 0 deletions docs/documentation/docs/controls/DateTimePicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# DateTimePicker control

This control allows you to select dates from a calendar and optionally the time of day using dropdown controls. You can configure the control to use 12 or 24-hour clock.

Here are some examples of the control:

**DateTime Picker 12-hour clock**
![DateTimePicker 12-hour clock](../assets/DateTimePicker-12h.png)

**DateTime Picker 24-hour clock**
![DateTimePicker 24-hour clock](../assets/DateTimePicker-24h.png)

**DateTime Picker Date Only**
![DateTimePicker Date Only](../assets/DateTimePicker-dateOnly.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 control into your component. The DateConvention and TimeConvention controls if the time of day controls are shown and the time format used (12 hours/24 hours).

```TypeScript
import { DateTimePicker, DateConvention, TimeConvention } from '@pnp/spfx-controls-react/lib/dateTimePicker';
```
- Use the `DateTimePicker` control in your code as follows, either as an uncontrolled or a controlled component:

```TypeScript
// Uncontrolled
<DateTimePicker label="DateTime Picker - 12h"
dateConvention={DateConvention.DateTime}
timeConvention={TimeConvention.Hours12} />

// Controlled
<DateTimePicker label="DateTime Picker - 24h"
dateConvention={DateConvention.DateTime}
timeConvention={TimeConvention.Hours24}
value={this.state.date}
onChange={this.handleChange} />
```

## Implementation

The `DateTimePicker` control can be configured with the following properties:


| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| label | string | no | Property field label displayed on top. |
| disabled | boolean | no | Specifies if the control is disabled or not. |
| formatDate | function | no | Defines a formatDate function that can override the output value in Date picker. |
| dateConvention | DateConvention | no | Defines the date convention to use. The default is date and time.|
| timeConvention | TimeConvention | no | Defines the time convention to use. The default value is the 24-hour clock convention. |
| firstDayOfWeek | DayOfWeek | no | Specify the first day of the week for your locale. |
| key | string | no | A unique key that indicates the identity of this control |
| onGetErrorMessage | function | no | The method is used to get the validation error message and determine whether the input value is valid or not. See [this documentation](https://dev.office.com/sharepoint/docs/spfx/web-parts/guidance/validate-web-part-property-values) to learn how to use it. |
| showGoToToday | boolean | no | Controls whether the "Go to today" link should be shown or not |
| isMonthPickerVisible | boolean | no | Controls whether the month picker is shown beside the day picker or hidden. |
| showMonthPickerAsOverlay | boolean | no | Show month picker on top of date picker when visible. |
| showWeekNumbers | boolean | no | Controls whether the calendar should show the week number (weeks 1 to 53) before each week row |
| strings | IDatePickerStrings | no | Localized strings to use in the DateTimePicker |
| value | Date | no | Default value of the DatePicker, if any |
| onChange | function | no | Callback issued when date or time is changed |
| showSeconds | boolean | no | Specifies, if seconds dropdown should be shown, defaults to false. |

Enum `DateConvention`

| Name | Description |
| ---- | ---- |
| DateTime | Shows the date and time picker |
| Date | Shows only the date picker |

Enum `TimeConvention`

| Name | Description |
| ---- | ---- |
| Hours12 | Specify the hours in 12-hours (AM / PM) time convention. |
| Hours24 | Specify the hours in 24-hours time convention. |

Interface `IDateTimePickerStrings` extends [IDatePickerStrings](https://developer.microsoft.com/en-us/fabric#/components/datepicker)

| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| dateLabel | string | no | Label for the date selector. |
| timeLabel | string | no | Label for the time of day selector. |
| timeSeparator | string | no | Separator between time of day components (hours, minutes, seconds). |
| amDesignator | string | no | Used as AM designator when 12-hour clock is used. |
| pmDesignator | string | no | Used as PM designator when 12-hour clock is used. |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/DateTimePicker)
2 changes: 1 addition & 1 deletion docs/documentation/docs/controls/ListItemAttachments.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Here is an example of the control:
- Import the control into your component:

```TypeScript
import { ListItemAttachments } from '@pnp/spfx-controls-react/listItemAttachments';
import { ListItemAttachments } from '@pnp/spfx-controls-react/lib/ListItemAttachments';
```
- Use the `ListItemAttachments` control in your code as follows:

Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/docs/controls/ListView.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The ListView control can be configured with the following properties:

| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| iconFieldName | string | no | Specify the name of the file URL path which will be used to show the file icon. |
| iconFieldName | string | no | Specify the items' property name that defines the file URL path which will be used to show the file icon. This automatically creates a column and renders the file icon. |
| items | any[]| yes | Items to render in the list view. |
| viewFields | IViewField[] | no | The fields you want to render in the list view. Check the `IViewField` implementation to see which properties you can define. |
| compact | boolean | no | Boolean value to indicate if the control should render in compact mode. By default this is set to `false`. |
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/docs/controls/Map.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Map control

This control renders can be used to render a map in your solution. The control has also the ability to search for new locations.
This control renders a map in your solution. The control has also the ability to search for new locations.

Here is an example of the control in action:

Expand Down
120 changes: 120 additions & 0 deletions docs/documentation/docs/controls/Progress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Progress control

This control shows progress of multiple SEQUENTIALLY executed actions.

Here is an example of the control in action:

![Progress control](../assets/Progress.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 { Progress } from "@pnp/spfx-controls-react/lib/Progress";
```

- Use the `Progress` control in your code as follows:

```TypeScript
<Progress title={'Progress Test'}
showOverallProgress={true}
showIndeterminateOverallProgress={false}
hideNotStartedActions={false}
actions={this.state.progressActions}
currentActionIndex={this.state.currentProgressActionIndex}
longRunningText={'This operation takes longer than expected'}
longRunningTextDisplayDelay={7000}
height={'350px'} />
```

**Note**: the control itself is not responsible for actions' execution. It only renders the actions, overall progress and actions' execution states.
When using the control, you should implement actions execution.
As example, you can have a base class that implements `IProgressAction` interface and has an `execute` method:

```TypeScript
class BaseAction implements IProgressAction {
public get title(): string { ... }
public get subActionsTitles(): string[] { ... }
public get hasError(): boolean { ... }
public get errorMessage(): string { ... }
public async execute(): Promise<void> { ... }
}
```

Then, you have multiple actions derived from the base one:

```TypeScript
class FirstAction extends BaseAction {
public async execute(): Promise<void> {
// implementation for FirstAction
}
}

class SecondAction extends BaseAction {
public async execute(): Promise<void> {
// implementation for SecondAction
}
}
```

Now, in a component, where `Progress` is used you can have code as below:

```TypeScript
export interface IYourComponentState {
actions: IProgressAction[];
currentActionIndex?: number;
// other state properties
}

// ...

export class YourComponent extends React.Component<IYourComponentProps, IYourComponentState> {
// all other code, including render with Progress reference listed above

private _initActions() {
this.setState({
actions: [
new FirstAction(),
new SecondAction()
]
});
}

private async _execute() {
for (let i = 0; i <= this.state.actions.length; i++) {
this.setState(currentActionIndex: i);

if (i < this.state.actions.length) {
await this.state.actions[i].execute();
}
}
}
}
```

## Implementation

The `Progress` component can be configured with the following properties:

| Property | Type | Required | Description |
| ---- | ---- | ---- | ---- |
| title | string | no | Title, or header, of the progress. |
| showOverallProgress | boolean | true | Specifies if overall progress indicator should be shown. |
| showIndeterminateOverallProgress | boolean | no | Specifies if indeterminate overall progress animation will be shown. |
| hideNotStartedActions | boolean | yes | Specifies if not started actions should not be rendered. |
| actions | IProgressAction[] | yes | Progress actions |
| currentActionIndex | number | no | Index of currently executing action |
| heigth | string | no | Height of the component |
| longRunningText | string | no | Text to be displayed for long running operations |
| longRunningTextDisplayDelay | number | no | Delay until longRunningText is displayed im milliseconds. If not set or 0 longRunningText is displayed right away. |
| className | string | no | Class name to be applied to the component |
| headerClassName | string | no | Header class name. Header contains title, progress indicator, and delay text |
| actionsContainerClassName | string | no | Actions container class name |
| actionClassName | string | no | Single action class name |
| successIconName | string | no | Success icon name. Default is CheckMark |
| errorIconName | string | no | Error icon name. Default is Error |
| inProgressIconName | string | no | InProgress icon name. Default is '', spinner is displayed. |

![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/Progress)
Loading