Skip to content

Commit 1db1a7e

Browse files
committed
updated examples
1 parent e19d340 commit 1db1a7e

File tree

9 files changed

+72
-98
lines changed

9 files changed

+72
-98
lines changed

samples/examples/agenda-template.html

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
.time-container {
1313
width: 200px;
1414
margin-top: 10px;
15+
margin-right: 10px;
1516
display: flex;
1617
flex-direction: column;
1718
align-items: flex-end;
18-
min-width: 150px;
1919
}
2020

2121
.date {
@@ -31,7 +31,7 @@
3131
}
3232

3333
.location {
34-
font-size: 14px;
34+
font-size: 12px;
3535
}
3636

3737
.details {
@@ -40,6 +40,7 @@
4040
font-size: 18px;
4141
min-width: 180px;
4242
padding-left: 5px;
43+
width: 400px;
4344
}
4445

4546
.separator {
@@ -86,6 +87,7 @@
8687

8788
.online-meeting {
8889
font-size: 10px;
90+
margin-top: 8px;
8991
}
9092

9193
.online-meeting-icon {
@@ -97,17 +99,30 @@
9799
text-decoration: none;
98100
color: #3063B2;
99101
}
102+
103+
.attendees {
104+
margin-top:8px;
105+
}
106+
107+
.attendee {
108+
display: inline-block;
109+
}
100110

101111
mgt-agenda {
102112
margin: 20px;
103113
}
114+
115+
mgt-person {
116+
--avatar-size-s: 16px;
117+
margin-right: 4px;
118+
}
104119
</style>
105120
</head>
106121
<body>
107122
<mgt-msal-provider client-id="a974dfa0-9f57-49b9-95db-90f04ce2111a"></mgt-msal-provider>
108123
<mgt-login></mgt-login>
109124

110-
<mgt-agenda days=60 show-max=7 group-id="9dee49d5-6d84-4035-8da8-953a2957d87b">
125+
<mgt-agenda show-max=7 days=10>
111126
<template data-type="event">
112127
<div class="root">
113128
<div class="time-container">
@@ -118,15 +133,20 @@
118133
<div class="separator">
119134
<div class="vertical-line top"></div>
120135
<div class="circle">
121-
<div data-if="!event.onlineMeetingUrl" class="inner-circle"></div>
136+
<div data-if="!event.bodyPreview.includes('Join Microsoft Teams Meeting')" class="inner-circle"></div>
122137
</div>
123138
<div class="vertical-line bottom"></div>
124139
</div>
125140

126141
<div class="details">
127142
<div class="subject">{{ event.subject }}</div>
128143
<div class="location" data-if="event.location.displayName">
129-
at <b>{{ event.location.displayName }}</b>
144+
at <a href="https://bing.com/maps/default.aspx?where1={{event.location.displayName}}" target="_blank"><b>{{ event.location.displayName }}</b></a>
145+
</div>
146+
<div class="attendees" data-if="event.attendees.length">
147+
<span class="attendee" data-for="attendee in event.attendees">
148+
<mgt-person person-query="{{attendee.emailAddress.name}}"></mgt-person>
149+
</span>
130150
</div>
131151
<div class="online-meeting" data-if="event.bodyPreview.includes('Join Microsoft Teams Meeting')">
132152
<img class="online-meeting-icon" src="https://img.icons8.com/color/48/000000/microsoft-teams.png" />

samples/examples/mgt-get.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<html>
22
<head>
3-
<!-- <script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script> -->
4-
<script type="module" src="../../dist/es6/index.js"></script>
3+
<script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script>
54
</head>
65
<body>
76
<mgt-msal-provider client-id="a974dfa0-9f57-49b9-95db-90f04ce2111a"></mgt-msal-provider>
@@ -14,15 +13,15 @@
1413
<li data-for="email in value">
1514
<div>
1615
<h2>{{ email.subject }}</h2>
17-
<div>
18-
From: <mgt-person
16+
<span>
17+
<b>From:</b> <mgt-person
1918
person-query="{{ email.sender.emailAddress.address }}"
2019
show-name
2120
person-card="hover"
2221
></mgt-person>
23-
</div>
22+
</span>
2423
<br />
25-
Subject: {{ email.bodyPreview }}
24+
<b>Preview:</b> {{ email.bodyPreview }}
2625
</div>
2726
</li>
2827
</ul>

samples/examples/person-card-extensions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<mgt-person person-query="me" person-card="hover" >
1010
<template data-type="person-card">
1111
<mgt-person-card person-details={{person}} person-image={{personImage}}>
12-
<template data-type="additional-details"> </template>
12+
<template data-type="additional-details"></template>
1313
</mgt-person-card>
1414
</template>
1515
</mgt-person>

samples/examples/person-card-get.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<!-- <script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script> -->
5-
<script type="module" src="../../dist/es6/index.js"></script>
6-
<script type="module" src="../../dist/es6/mock/mgt-mock-provider.js"></script>
4+
<script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script>
75
</head>
86

97
<body>
@@ -17,21 +15,21 @@
1715
<template>
1816
<div>
1917
<div data-if="positions && positions.length">
20-
<h2>Work history</h2>
18+
<h4>Work history</h4>
2119
<div data-for="position in positions">
2220
<b>{{ position.detail.jobTitle }}</b> ({{ position.detail.company.department }})
2321
</div>
2422
<hr />
2523
</div>
2624
<div data-if="projects && projects.length">
27-
<h2>Project history</h2>
25+
<h4>Project history</h4>
2826
<div data-for="project in projects">
2927
<b>{{ project.displayName }}</b>
3028
</div>
3129
<hr />
3230
</div>
3331
<div data-if="educationalActivities && educationalActivities.length">
34-
<h2>Educational Activities</h2>
32+
<h4>Educational Activities</h4>
3533
<div data-for="edu in educationalActivities">
3634
<div data-if="edu.program.displayName"><b>program:</b> {{ edu.program.displayName }}</div>
3735
<div data-if="edu.institution.displayName">
@@ -41,14 +39,14 @@ <h2>Educational Activities</h2>
4139
<hr />
4240
</div>
4341
<div>
44-
<h2>Interests</h2>
42+
<h4>Interests</h4>
4543
<span data-for="interest in interests">
4644
{{ interest.displayName }}<span data-if="$index < interests.length - 1">, </span>
4745
</span>
4846
<hr />
4947
</div>
5048
<div data-if="languages && languages.length">
51-
<h2>Languages</h2>
49+
<h4>Languages</h4>
5250
<span data-for="language in languages">
5351
{{ language.displayName }}<span data-if="$index < languages.length - 1">, </span>
5452
</span>

samples/sp-webpart/config/package-solution.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@
2323
{
2424
"resource": "Microsoft Graph",
2525
"scope": "Calendars.Read"
26+
},
27+
{
28+
"resource": "Microsoft Graph",
29+
"scope": "Contacts.Read"
30+
},
31+
{
32+
"resource": "Microsoft Graph",
33+
"scope": "Group.Read.All"
34+
},
35+
{
36+
"resource": "Microsoft Graph",
37+
"scope": "Group.ReadWrite.All"
38+
},
39+
{
40+
"resource": "Microsoft Graph",
41+
"scope": "Tasks.Read"
42+
},
43+
{
44+
"resource": "Microsoft Graph",
45+
"scope": "Tasks.ReadWrite"
2646
}
2747
]
2848
},

samples/sp-webpart/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"test": "gulp test"
1212
},
1313
"dependencies": {
14-
"@microsoft/mgt": "^1.0.0",
14+
"@microsoft/mgt": "^1.1.0-preview.2",
1515
"@microsoft/sp-core-library": "1.9.1",
1616
"@microsoft/sp-lodash-subset": "1.9.1",
1717
"@microsoft/sp-office-ui-fabric-core": "1.9.1",

samples/sp-webpart/src/webparts/mgtDemo/components/MgtDemo.module.scss

Lines changed: 3 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,71 +4,8 @@
44
.container {
55
max-width: 700px;
66
margin: 0px auto;
7+
color: black;
8+
padding: 15px;
79
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1);
810
}
9-
10-
.row {
11-
@include ms-Grid-row;
12-
@include ms-fontColor-white;
13-
background-color: $ms-color-themeLight;
14-
padding: 20px;
15-
}
16-
17-
.column {
18-
@include ms-Grid-col;
19-
@include ms-lg10;
20-
@include ms-xl8;
21-
@include ms-xlPush2;
22-
@include ms-lgPush1;
23-
}
24-
25-
.title {
26-
@include ms-font-xl;
27-
@include ms-fontColor-white;
28-
}
29-
30-
.subTitle {
31-
@include ms-font-l;
32-
@include ms-fontColor-white;
33-
}
34-
35-
.description {
36-
@include ms-font-l;
37-
@include ms-fontColor-white;
38-
}
39-
40-
.button {
41-
// Our button
42-
text-decoration: none;
43-
height: 32px;
44-
45-
// Primary Button
46-
min-width: 80px;
47-
background-color: $ms-color-themePrimary;
48-
border-color: $ms-color-themePrimary;
49-
color: $ms-color-white;
50-
51-
// Basic Button
52-
outline: transparent;
53-
position: relative;
54-
font-family: "Segoe UI WestEuropean","Segoe UI",-apple-system,BlinkMacSystemFont,Roboto,"Helvetica Neue",sans-serif;
55-
-webkit-font-smoothing: antialiased;
56-
font-size: $ms-font-size-m;
57-
font-weight: $ms-font-weight-regular;
58-
border-width: 0;
59-
text-align: center;
60-
cursor: pointer;
61-
display: inline-block;
62-
padding: 0 16px;
63-
64-
.label {
65-
font-weight: $ms-font-weight-semibold;
66-
font-size: $ms-font-size-m;
67-
height: 32px;
68-
line-height: 32px;
69-
margin: 0 4px;
70-
vertical-align: top;
71-
display: inline-block;
72-
}
73-
}
74-
}
11+
}

samples/sp-webpart/src/webparts/mgtDemo/components/MgtDemo.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ import { IMgtDemoProps } from './IMgtDemoProps';
55
declare global {
66
namespace JSX {
77
interface IntrinsicElements {
8-
"mgt-person": any;
9-
"mgt-agenda": any;
8+
'mgt-person': any;
9+
'mgt-people': any;
10+
'mgt-people-picker': any;
11+
'mgt-agenda': any;
12+
'mgt-tasks': any;
13+
template: any;
1014
}
1115
}
1216
}
1317

1418
export default class MgtDemo extends React.Component<IMgtDemoProps, {}> {
1519
public render(): React.ReactElement<IMgtDemoProps> {
1620
return (
17-
<div className={ styles.mgtDemo }>
18-
<div className={ styles.container }>
19-
<div className={ styles.row }>
20-
21-
<mgt-person person-query="me" show-name person-card="hover"></mgt-person>
22-
{/* <mgt-agenda group-by-day days="10"></mgt-agenda> */}
23-
24-
</div>
21+
<div className={styles.mgtDemo}>
22+
<div className={styles.container}>
23+
<mgt-person person-query="me" show-name person-card="hover" />
24+
<mgt-agenda />
2525
</div>
2626
</div>
2727
);

src/utils/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
// THIS FILE IS AUTO GENERATED
99
// ANY CHANGES WILL BE LOST DURING BUILD
1010

11-
export const PACKAGE_VERSION = '1.1.0-preview.1';
11+
export const PACKAGE_VERSION = '1.1.0-preview.2';

0 commit comments

Comments
 (0)