Skip to content

Commit 94f693f

Browse files
author
tomitavela
committed
upgraded mgt and pnpjs to latest
1 parent fd34c9b commit 94f693f

File tree

242 files changed

+7179
-13415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+7179
-13415
lines changed

gulpfile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ gulp.task('copy:sp-taxonomy', (done) => {
224224
gulp.task('copy:microsoft-graph-types', (done) => {
225225
console.log("Copy @microsoft/microsoft-graph-types");
226226
gulp.src('./node_modules/@microsoft/microsoft-graph-types/microsoft-graph.d.ts')
227+
.pipe(rename('index.d.ts'))
227228
.pipe(gulp.dest('./public/@microsoft/microsoft-graph-types/'));
228229
done();
229230
});
@@ -326,7 +327,7 @@ gulp.task('default',
326327
// 'copy:sp-taxonomy',
327328
'copy:microsoft-graph-types',
328329
'copy:microsoft-graph-client',
329-
'copy:msal',
330+
// 'copy:msal',
330331
'copy:msal-browser',
331332
// 'copy:AuthCodeMSALBrowserAuthenticationProvider',
332333
'copy:react',

iframe-sandbox-app/package-lock.json

Lines changed: 424 additions & 158 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

iframe-sandbox-app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"homepage": ".",
66
"dependencies": {
77
"@fluentui/react": "^8.104.1",
8-
"@microsoft/mgt": "^2.9.0",
9-
"@microsoft/mgt-element": "^2.9.0",
10-
"@microsoft/mgt-react": "^2.9.0",
8+
"@microsoft/mgt": "^3.0.1",
9+
"@microsoft/mgt-element": "^3.0.1",
10+
"@microsoft/mgt-react": "^3.0.1",
1111
"@testing-library/jest-dom": "^5.16.5",
1212
"@testing-library/react": "^13.4.0",
1313
"@testing-library/user-event": "^13.5.0",

iframe-sandbox-app/src/mgtiframe/MGTIframe.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ const MGTIframe = () => {
3939
// window.removeEventListener("message", onMessageReceivedFromIframe);
4040
}, [onMessageReceivedFromIframe]);
4141

42+
React.useEffect(function setupListener() {
43+
function handleResize(x: any) {
44+
console.log('theme changed', x.detail)
45+
if(x.detail){
46+
document.body.style.backgroundColor = "black";
47+
} else {
48+
document.body.style.backgroundColor = "white";
49+
}
50+
}
51+
window.addEventListener('darkmodechanged', handleResize)
52+
53+
return function cleanupListener() {
54+
console.log('removing listener')
55+
window.removeEventListener('darkmodechanged', handleResize)
56+
}
57+
})
58+
4259
CacheService.config.isEnabled = false;
4360

4461
var getAccessToken = async (scopes: any[]): Promise<string> => {

package-lock.json

Lines changed: 134 additions & 262 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"@fluentui/react": "^8.109.2",
1111
"@ionic/react": "^5.8.4",
1212
"@ionic/react-router": "^5.8.4",
13-
"@microsoft/mgt": "^2.10.1",
14-
"@microsoft/mgt-react": "^2.10.1",
13+
"@microsoft/mgt": "^3.0.1",
14+
"@microsoft/mgt-react": "^3.0.1",
1515
"@microsoft/microsoft-graph-client": "^3.0.5",
1616
"@minoru/react-dnd-treeview": "^3.4.0",
1717
"@uifabric/theme-samples": "^7.5.29",
Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,28 @@
55
* -------------------------------------------------------------------------------------------
66
*/
77
import { MgtTemplatedComponent } from '@microsoft/mgt-element';
8-
import { TemplateResult } from 'lit-element';
9-
import { IDynamicPerson } from '../../../graph/types';
10-
import '../../sub-components/mgt-spinner/mgt-spinner';
8+
import { TemplateResult } from 'lit';
9+
import { IDynamicPerson } from '../graph/types';
10+
import './sub-components/mgt-spinner/mgt-spinner';
11+
/**
12+
* Defines the interface for a person card section.
13+
* This allows us to avoid forced inheritance and allow for more flexibility in the future.
14+
*/
15+
export interface CardSection {
16+
readonly cardTitle: string;
17+
tagName: string;
18+
asCompactView(): CardSection;
19+
asFullView(): CardSection;
20+
renderIcon(): TemplateResult;
21+
}
1122
/**
1223
* A base class for building person card subsections.
1324
*
1425
* @export
1526
* @class BasePersonCardSection
1627
* @extends {MgtTemplatedComponent}
1728
*/
18-
export declare abstract class BasePersonCardSection extends MgtTemplatedComponent {
29+
export declare abstract class BasePersonCardSection extends MgtTemplatedComponent implements CardSection {
1930
/**
2031
* Set the person details to render
2132
*
@@ -32,6 +43,14 @@ export declare abstract class BasePersonCardSection extends MgtTemplatedComponen
3243
* @memberof BasePersonCardSection
3344
*/
3445
abstract get displayName(): string;
46+
/**
47+
* The title for using when rendering the full card.
48+
*
49+
* @readonly
50+
* @abstract
51+
* @memberof BasePersonCardSection
52+
*/
53+
abstract get cardTitle(): string;
3554
/**
3655
* Determines the appropriate view state: full or compact
3756
*
@@ -73,7 +92,7 @@ export declare abstract class BasePersonCardSection extends MgtTemplatedComponen
7392
* @abstract
7493
* @memberof BasePersonCardSection
7594
*/
76-
clearState(): void;
95+
protected clearState(): void;
7796
/**
7897
* Invoked on each update to perform rendering tasks. This method must return
7998
* a lit-html TemplateResult. Setting properties inside this method will *not*
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* -------------------------------------------------------------------------------------------
3+
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
4+
* See License in the project root for license information.
5+
* -------------------------------------------------------------------------------------------
6+
*/
7+
import { CacheItem } from '@microsoft/mgt-element';
8+
/**
9+
* Object to be stored in cache representing a generic query
10+
*/
11+
export interface CacheResponse extends CacheItem {
12+
/**
13+
* json representing a response as string
14+
*/
15+
response?: string;
16+
}
17+
//# sourceMappingURL=CacheResponse.d.ts.map
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
import { CSSResult } from 'lit';
12
/**
23
* exports lit-element css
34
* @export styles
45
*/
5-
export declare const styles: import("lit-element").CSSResult[];
6+
export declare const styles: CSSResult[];
67
//# sourceMappingURL=base-person-card-section-css.d.ts.map

public/@microsoft/mgt-components/components/components.d.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,42 @@
77
import './mgt-agenda/mgt-agenda';
88
import './mgt-file/mgt-file';
99
import './mgt-file-list/mgt-file-list';
10+
import './mgt-picker/mgt-picker';
11+
import './mgt-taxonomy-picker/mgt-taxonomy-picker';
1012
import './mgt-get/mgt-get';
1113
import './mgt-login/mgt-login';
1214
import './mgt-people-picker/mgt-people-picker';
1315
import './mgt-people/mgt-people';
1416
import './mgt-person-card/mgt-person-card';
1517
import './mgt-person/mgt-person';
18+
import './mgt-person/mgt-person-types';
1619
import './mgt-tasks/mgt-tasks';
1720
import './mgt-teams-channel-picker/mgt-teams-channel-picker';
1821
import './mgt-todo/mgt-todo';
22+
import './mgt-contact/mgt-contact';
23+
import './mgt-messages/mgt-messages';
24+
import './mgt-organization/mgt-organization';
25+
import './mgt-profile/mgt-profile';
26+
import './mgt-theme-toggle/mgt-theme-toggle';
1927
export * from './mgt-agenda/mgt-agenda';
2028
export * from './mgt-file/mgt-file';
2129
export * from './mgt-file-list/mgt-file-list';
30+
export * from './mgt-picker/mgt-picker';
31+
export * from './mgt-taxonomy-picker/mgt-taxonomy-picker';
2232
export * from './mgt-get/mgt-get';
2333
export * from './mgt-login/mgt-login';
2434
export * from './mgt-people-picker/mgt-people-picker';
2535
export * from './mgt-people/mgt-people';
2636
export * from './mgt-person-card/mgt-person-card';
2737
export * from './mgt-person/mgt-person';
38+
export * from './mgt-person/mgt-person-types';
2839
export * from './mgt-tasks/mgt-tasks';
2940
export * from './mgt-teams-channel-picker/mgt-teams-channel-picker';
3041
export * from './mgt-todo/mgt-todo';
42+
export * from './mgt-contact/mgt-contact';
43+
export * from './mgt-contact/mgt-contact';
44+
export * from './mgt-messages/mgt-messages';
45+
export * from './mgt-organization/mgt-organization';
46+
export * from './mgt-profile/mgt-profile';
47+
export * from './mgt-theme-toggle/mgt-theme-toggle';
3148
//# sourceMappingURL=components.d.ts.map

0 commit comments

Comments
 (0)