Skip to content

Commit

Permalink
Update release/latest to v1.3.5 (#665)
Browse files Browse the repository at this point in the history
* Updated to version 1.3.5

* Integrating changes from #609

* Update package-lock.json
  • Loading branch information
shweaver-MSFT authored Oct 1, 2020
1 parent 823ee85 commit 1e82d23
Show file tree
Hide file tree
Showing 11 changed files with 35,726 additions and 27,878 deletions.
6 changes: 2 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"packages": [
"packages/mgt"
],
"version": "1.3.3"
"packages": ["packages/mgt"],
"version": "1.3.5"
}
55,666 changes: 27,833 additions & 27,833 deletions package-lock.json

Large diffs are not rendered by default.

7,848 changes: 7,812 additions & 36 deletions packages/mgt/package-lock.json

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion packages/mgt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@microsoft/mgt",
"version": "1.3.4",
"version": "1.3.5",
"description": "The Microsoft Graph Toolkit",
"keywords": [
"microsoft graph",
Expand Down Expand Up @@ -54,6 +54,23 @@
"msal": "^1.3.2",
"office-ui-fabric-core": "11.0.0"
},
"devDependencies": {
"cpx": "1.5.0",
"shx": "0.3.2",
"npm-run-all": "4.1.5",
"tslint": "6.1.3",
"@webcomponents/webcomponentsjs": "2.4.4",
"rollup": "^1.29.1",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-babel-minify": "^9.1.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^2.5.0",
"rollup-plugin-terser": "^5.2.0",
"rollup-plugin-typescript": "^1.0.1",
"es-dev-server": "1.57.5"
},
"jest-junit": {
"suiteName": "jest tests",
"output": "testResults/junit.xml",
Expand Down
2 changes: 2 additions & 0 deletions packages/mgt/src/components/mgt-login/mgt-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ export class MgtLogin extends MgtTemplatedComponent {
if (this.userDetails.personImage) {
this._image = this.userDetails.personImage;
}

this.fireCustomEvent('loginCompleted');
} else {
this.userDetails = null;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/mgt/src/components/mgt-tasks/mgt-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export class MgtTasks extends MgtTemplatedComponent {
this._hiddenTasks = this._hiddenTasks.filter(id => id !== task.id);
}

private async assignPeople(task: ITask, people: Array<User | Person | Contact>) {
private async assignPeople(task: ITask, people: (User | Person | Contact)[]) {
const ts = this.getTaskSource();
if (!ts) {
return;
Expand Down
2 changes: 1 addition & 1 deletion packages/mgt/src/graph/graph.people.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export async function findContactByEmail(graph: IGraph, email: string): Promise<
* @returns {(Promise<Array<Person | Contact>>)}
* @memberof Graph
*/
export function findUserByEmail(graph: IGraph, email: string): Promise<Array<Person | Contact>> {
export function findUserByEmail(graph: IGraph, email: string): Promise<(Person | Contact)[]> {
return Promise.all([findPeople(graph, email), findContactByEmail(graph, email)]).then(([people, contacts]) => {
return ((people as any[]) || []).concat(contacts || []);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/mgt/src/utils/EventDispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type EventHandler<E> = (event: E) => void;
* @template E
*/
export class EventDispatcher<E> {
private eventHandlers: Array<EventHandler<E>> = [];
private eventHandlers: EventHandler<E>[] = [];
/**
* fires event handler
*
Expand Down
2 changes: 1 addition & 1 deletion packages/mgt/src/utils/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
// THIS FILE IS AUTO GENERATED
// ANY CHANGES WILL BE LOST DURING BUILD

export const PACKAGE_VERSION = '1.3.4';
export const PACKAGE_VERSION = '1.3.5';
30 changes: 30 additions & 0 deletions samples/examples/login-popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>

<head>
<script type="module" src="../../packages/mgt/dist/es6/index.js"></script>
</head>

<body>
<!-- <mgt-msal-provider client-id="af4ad92c-e141-49ac-9d86-23af45007101"></mgt-msal-provider> -->

<mgt-login></mgt-login>

<div id="loginStatus" style="padding-top: 20px">
</div>

<script type="module">
import { Providers, ProviderState, MsalProvider, LoginType } from '../../packages/mgt/dist/es6/index.js';

Providers.globalProvider = new MsalProvider({
clientId: 'af4ad92c-e141-49ac-9d86-23af45007101',
loginType: LoginType.Popup
});

document.querySelector('mgt-login').addEventListener('loginCompleted', e => {
console.log(e);
document.getElementById('loginStatus').innerText = "Login completed successfully";
});
</script>

</html>
25 changes: 25 additions & 0 deletions samples/examples/login-redirect-nopopup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>

<head>
<script type="module" src="../../packages/mgt/dist/es6/index.js"></script>
</head>

<body>
<mgt-msal-provider client-id="af4ad92c-e141-49ac-9d86-23af45007101"></mgt-msal-provider>

<mgt-login></mgt-login>

<div id="loginStatus" style="padding-top: 20px">
</div>

<script type="module">
import { Providers, ProviderState } from '../../packages/mgt/dist/es6/index.js';

document.querySelector('mgt-login').addEventListener('loginCompleted', e => {
console.log(e);
document.getElementById('loginStatus').innerText = "Login completed successfully";
});
</script>

</html>

0 comments on commit 1e82d23

Please sign in to comment.