Skip to content

Commit

Permalink
Merge pull request #108 from SharePoint/dev
Browse files Browse the repository at this point in the history
Merge for version 1.7.0
  • Loading branch information
estruyf authored Aug 14, 2018
2 parents f348346 + 3daeac4 commit 6dfc483
Show file tree
Hide file tree
Showing 27 changed files with 268 additions and 102 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.JSON
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"versions": [
{
"version": "1.7.0",
"changes": {
"new": [],
"enhancements": [
"`PeoplePicker`: added functionality to initialize the control with person(s) or group(s) [#98](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/98)",
"`PeoplePicker`: support for searching on contains [#93](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/93)",
"`PeoplePicker`: find user based on email address [#95](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/95)",
"Bundle size: statically reference Office UI Fabric components in the FieldRenderer controls [#107](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/107)"
],
"fixes": [
"`FieldNameRenderer` onClick does not suppress default link behavior [#103](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/103)"
]
},
"contributions": ["Octavie van Haaften", "Asish Padhy", "Mikael Svenson", "Alex Terentiev"]
},
{
"version": "1.6.0",
"changes": {
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Releases

## 1.7.0

**Enhancements**

- `PeoplePicker`: added functionality to initialize the control with person(s) or group(s) [#98](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/98)
- `PeoplePicker`: support for searching on contains [#93](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/93)
- `PeoplePicker`: find user based on email address [#95](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/95)
- Bundle size: statically reference Office UI Fabric components in the FieldRenderer controls [#107](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/107)

**Fixes**

- `FieldNameRenderer` onClick does not suppress default link behavior [#103](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/103)

## 1.6.0

**Enhancements**
Expand Down
13 changes: 13 additions & 0 deletions docs/documentation/docs/about/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Releases

## 1.7.0

**Enhancements**

- `PeoplePicker`: added functionality to initialize the control with person(s) or group(s) [#98](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/98)
- `PeoplePicker`: support for searching on contains [#93](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/93)
- `PeoplePicker`: find user based on email address [#95](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/95)
- Bundle size: statically reference Office UI Fabric components in the FieldRenderer controls [#107](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/107)

**Fixes**

- `FieldNameRenderer` onClick does not suppress default link behavior [#103](https://github.com/SharePoint/sp-dev-fx-controls-react/issues/103)

## 1.6.0

**Enhancements**
Expand Down
7 changes: 4 additions & 3 deletions docs/documentation/docs/controls/PeoplePicker.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ The People picker control can be configured with the following properties:
| showtooltip | boolean | no | Defines if need a tooltip or not |
| tooltip | string | no | Specify the tooltip message to display |
| tooltipDirectional | DirectionalHint | no | Direction where the tooltip would be shown |
| selectedItems | function | no | get the selected users in the control|
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element|
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only|
| selectedItems | function | no | get the selected users in the control |
| peoplePickerWPclassName | string | no | applies custom styling to the people picker element |
| peoplePickerCntrlclassName | string | no | applies custom styling to the people picker control only |
| defaultSelectedUsers | string[] | no | Default selected user emails |


![](https://telemetry.sharepointpnp.com/sp-dev-fx-controls-react/wiki/controls/PeoplePicker)
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@pnp/spfx-controls-react",
"description": "Reusable React controls for SharePoint Framework solutions",
"version": "1.6.0",
"version": "1.7.0",
"engines": {
"node": ">=0.10.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/common/telemetry/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version: string = "1.6.0";
export const version: string = "1.7.0";
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css, Icon } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import { Icon } from 'office-ui-fabric-react/lib/Icon';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
import * as telemetry from '../../../common/telemetry';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';

import styles from './FieldBaseTextRenderer.module.scss';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
Expand Down
2 changes: 1 addition & 1 deletion src/controls/fields/fieldCommon/IFieldRendererProps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { ICssInput } from 'office-ui-fabric-react';
import { ICssInput } from 'office-ui-fabric-react/lib/Utilities';

/**
* base properties for field renderes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
import { FieldBaseTextRenderer } from '../fieldBaseTextRenderer/FieldBaseTextRenderer';
import * as telemetry from '../../../common/telemetry';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css, ISerializableObject, Icon } from 'office-ui-fabric-react';
import { css, ISerializableObject } from 'office-ui-fabric-react/lib/Utilities';
import { Icon } from 'office-ui-fabric-react/lib/Icon';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
import { FileTypeIcon, IconType } from '../../fileTypeIcon';
import * as telemetry from '../../../common/telemetry';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css, Dialog, DialogType, Link, Spinner, SpinnerSize } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import { Dialog, DialogType } from 'office-ui-fabric-react/lib/Dialog';
import { Link } from 'office-ui-fabric-react/lib/Link';
import { Spinner, SpinnerSize } from 'office-ui-fabric-react/lib/Spinner';

import { ISPFieldLookupValue } from "../../../common/SPEntities";
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
Expand Down Expand Up @@ -106,8 +109,8 @@ export class FieldLookupRenderer extends React.Component<IFieldLookupRendererPro
type: DialogType.close,
showCloseButton: true
}}>
<Spinner size={SpinnerSize.large} />
</Dialog>}
<Spinner size={SpinnerSize.large} />
</Dialog>}
</div>);
}

Expand Down
17 changes: 8 additions & 9 deletions src/controls/fields/fieldNameRenderer/FieldNameRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css } from 'office-ui-fabric-react';

import { Link, Icon } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import { Icon } from 'office-ui-fabric-react/lib/Icon';
import { Link } from 'office-ui-fabric-react/lib/Link';

import { FieldBaseTextRenderer } from '../fieldBaseTextRenderer/FieldBaseTextRenderer';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
import * as telemetry from '../../../common/telemetry';

import styles from './FieldNameRenderer.module.scss';
import { GeneralHelper } from "../../../common/utilities/GeneralHelper";

export interface IFieldNameRendererProps extends IFieldRendererProps {
/**
Expand Down Expand Up @@ -72,7 +71,7 @@ export class FieldNameRenderer extends React.Component<IFieldNameRendererProps,
//
// for now only signal for New documents is implemented
//
let signal: JSX.Element = this.props.isNew ? <span className={css(styles.signal, styles.newItem)}><Icon iconName={'Glimmer'} className={css(styles.newIcon)}/></span> : null;
let signal: JSX.Element = this.props.isNew ? <span className={css(styles.signal, styles.newItem)}><Icon iconName={'Glimmer'} className={css(styles.newIcon)} /></span> : null;
let value: JSX.Element;

if (isLink) {
Expand All @@ -99,15 +98,15 @@ export class FieldNameRenderer extends React.Component<IFieldNameRendererProps,
return <span className={css(styles.signalField, this.props.className)} style={this.props.cssProps}>
{signal}
<span className={styles.signalFieldValue}>
<span data-selection-invoke={'true'}>
{value}
</span>
{value}
</span>
</span>;
}

private _onClick(): void {
private _onClick(e): void {
if (this.props.onClick) {
e.stopPropagation();
e.preventDefault();
const args: IFieldNameClickEventArgs = this.props as IFieldNameClickEventArgs;
this.props.onClick(args);
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';

import { ITerm } from '../../../common/SPEntities';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';

import styles from './FieldTextRenderer.module.scss';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { Link, css } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import { Link } from 'office-ui-fabric-react/lib/Link';

import { FieldBaseTextRenderer } from '../fieldBaseTextRenderer/FieldBaseTextRenderer';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
Expand Down
3 changes: 2 additions & 1 deletion src/controls/fields/fieldUrlRenderer/FieldUrlRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { Link, css } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import { Link } from 'office-ui-fabric-react/lib/Link';

import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
import * as telemetry from '../../../common/telemetry';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { HoverCard, IExpandingCardProps } from 'office-ui-fabric-react';
import { HoverCard, IExpandingCardProps } from 'office-ui-fabric-react/lib/HoverCard';

import styles from './FieldUserRenderer.module.scss';

Expand Down
10 changes: 8 additions & 2 deletions src/controls/fields/fieldUserRenderer/FieldUserRenderer.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import { override } from '@microsoft/decorators';
import * as React from 'react';
import { css } from 'office-ui-fabric-react';
import { css } from 'office-ui-fabric-react/lib/Utilities';
import * as _ from '@microsoft/sp-lodash-subset';
import { HoverCard, IExpandingCardProps, DirectionalHint, Persona, IconButton, Button, ButtonType, PersonaSize, Spinner, SpinnerSize, Link, Icon } from 'office-ui-fabric-react';
import { IExpandingCardProps } from 'office-ui-fabric-react/lib/HoverCard';
import { DirectionalHint } from 'office-ui-fabric-react/lib/common/DirectionalHint';
import { Persona, PersonaSize } from 'office-ui-fabric-react/lib/Persona';
import { IconButton, Button, ButtonType } from 'office-ui-fabric-react/lib/Button';
import { Spinner, SpinnerSize } from 'office-ui-fabric-react/lib/Spinner';
import { Link } from 'office-ui-fabric-react/lib/Link';
import { Icon } from 'office-ui-fabric-react/lib/Icon';

import { IPrincipal, IUserProfileProperties, IODataKeyValuePair } from '../../../common/SPEntities';
import { IFieldRendererProps } from '../fieldCommon/IFieldRendererProps';
Expand Down
2 changes: 1 addition & 1 deletion src/controls/iFrameDialog/IFrameDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import * as ReactDOM from "react-dom";
import { Dialog, IDialogProps } from 'office-ui-fabric-react';
import { Dialog, IDialogProps } from 'office-ui-fabric-react/lib/Dialog';
import { IFrameDialogContent } from './IFrameDialogContent';
import * as telemetry from '../../common/telemetry';

Expand Down
24 changes: 15 additions & 9 deletions src/controls/peoplepicker/IPeoplePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,17 @@ export interface IPeoplePickerProps {
* Class Name for the Error Section
*/
errorMessageclassName?: string;
/**
* Default Selected User Emails
*/
defaultSelectedUsers? : string[];
}

export interface IPeoplePickerState {
selectedPersons?: IPersonaProps[];
mostRecentlyUsedPersons: IPersonaProps[];
currentSelectedPersons: IPersonaProps[];
allPersons: [{
id: string,
imageUrl: string,
imageInitials: string,
primaryText: string, //Name
secondaryText: string, //Role
tertiaryText: string, //status
optionalText: string //stgring
}];
allPersons: IPeoplePickerUserItem[];
delayResults?: boolean;
currentPicker?: number | string;
peoplePersonaMenu?: IPersonaProps[];
Expand All @@ -86,3 +82,13 @@ export interface IPeoplePickerState {
peopleValidatorText? : string;
showmessageerror: boolean;
}

export interface IPeoplePickerUserItem {
id: string;
imageUrl: string;
imageInitials: string;
primaryText: string; // name
secondaryText: string; // role
tertiaryText: string; // status
optionalText: string; // anything
}
Loading

0 comments on commit 6dfc483

Please sign in to comment.