Skip to content

Commit 9893036

Browse files
committed
updated spfx sample to latest npm package and added pollyfills
1 parent edef7ec commit 9893036

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

samples/sp-webpart/package.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,29 @@
1111
"test": "gulp test"
1212
},
1313
"dependencies": {
14-
"@microsoft/mgt": "^1.1.0-preview.2",
15-
"@microsoft/sp-core-library": "1.9.1",
16-
"@microsoft/sp-lodash-subset": "1.9.1",
17-
"@microsoft/sp-office-ui-fabric-core": "1.9.1",
18-
"@microsoft/sp-property-pane": "1.9.1",
19-
"@microsoft/sp-webpart-base": "1.9.1",
14+
"@microsoft/mgt": "^1.2.3",
15+
"@microsoft/sp-core-library": "1.10.0",
16+
"@microsoft/sp-lodash-subset": "1.10.0",
17+
"@microsoft/sp-office-ui-fabric-core": "1.10.0",
18+
"@microsoft/sp-property-pane": "1.10.0",
19+
"@microsoft/sp-webpart-base": "1.10.0",
2020
"@types/es6-promise": "0.0.33",
21-
"@types/react": "16.4.2",
22-
"@types/react-dom": "16.0.5",
21+
"@types/react": "16.8.8",
22+
"@types/react-dom": "16.8.3",
2323
"@types/webpack-env": "1.13.1",
24-
"react": "16.7.0",
25-
"react-dom": "16.7.0"
24+
"@webcomponents/webcomponentsjs": "^2.4.3",
25+
"react": "16.8.5",
26+
"react-dom": "16.8.5"
2627
},
2728
"resolutions": {
28-
"@types/react": "16.4.2"
29+
"@types/react": "16.8.8"
2930
},
3031
"devDependencies": {
31-
"@microsoft/rush-stack-compiler-3.3": "0.2.9",
32-
"@microsoft/sp-build-web": "1.9.1",
33-
"@microsoft/sp-module-interfaces": "1.9.1",
34-
"@microsoft/sp-tslint-rules": "1.9.1",
35-
"@microsoft/sp-webpart-workbench": "1.9.1",
32+
"@microsoft/rush-stack-compiler-3.7": "0.2.9",
33+
"@microsoft/sp-build-web": "1.10.0",
34+
"@microsoft/sp-module-interfaces": "1.10.0",
35+
"@microsoft/sp-tslint-rules": "1.10.0",
36+
"@microsoft/sp-webpart-workbench": "1.10.0",
3637
"@types/chai": "3.4.34",
3738
"@types/mocha": "2.2.38",
3839
"ajv": "~5.2.2",

samples/sp-webpart/src/webparts/mgtDemo/MgtDemoWebPart.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ import * as strings from 'MgtDemoWebPartStrings';
1111
import MgtDemo from './components/MgtDemo';
1212
import { IMgtDemoProps } from './components/IMgtDemoProps';
1313

14+
// import web component polyfills for browsers that need them
15+
import '@webcomponents/webcomponentsjs/webcomponents-bundle.js';
16+
1417
// import the providers at the top of the page
15-
import { Providers, SharePointProvider } from '@microsoft/mgt/dist/commonjs';
18+
import { Providers, SharePointProvider } from '@microsoft/mgt';
1619

1720
export interface IMgtDemoWebPartProps {
1821
description: string;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ export default class MgtDemo extends React.Component<IMgtDemoProps, {}> {
2121
<div className={styles.mgtDemo}>
2222
<div className={styles.container}>
2323
<mgt-person person-query="me" show-name person-card="hover" />
24-
<mgt-agenda />
24+
<mgt-people-picker></mgt-people-picker>
25+
<mgt-people></mgt-people>
26+
<mgt-agenda></mgt-agenda>
2527
</div>
2628
</div>
2729
);

samples/sp-webpart/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.3/includes/tsconfig-web.json",
2+
"extends": "./node_modules/@microsoft/rush-stack-compiler-3.7/includes/tsconfig-web.json",
33
"compilerOptions": {
44
"target": "es5",
55
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)