Skip to content

Commit

Permalink
3.1 release (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
v-saikirang committed Jun 6, 2024
1 parent 3914753 commit 56ac035
Show file tree
Hide file tree
Showing 33 changed files with 6,754 additions and 5,695 deletions.
6 changes: 3 additions & 3 deletions Deployment/appPackage/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.11/MicrosoftTeams.schema.json",
"manifestVersion": "1.11",
"version": "3.0.0",
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.15/MicrosoftTeams.schema.json",
"manifestVersion": "1.15",
"version": "3.1.0",
"id": "bef61400-db9b-41d4-a617-403deb7bbe77",
"packageName": "com.microsoft.teams.extension",
"developer": {
Expand Down
8 changes: 6 additions & 2 deletions Deployment/azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"ClientSecret": {
"type": "string",
"type": "securestring",
"minLength": 1,
"metadata": {
"description": "The client secret of the Azure AD app."
Expand Down Expand Up @@ -345,7 +345,7 @@
}
},
"ClientSecret": {
"type": "string",
"type": "securestring",
"minLength": 1,
"metadata": {
"description": "The base name to use for the resources that will be provisioned."
Expand Down Expand Up @@ -476,6 +476,10 @@
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "16.13.0"
},
{
"name": "GENERATE_SOURCEMAP",
"value": "false"
},
{
"name": "REACT_APP_SHAREPOINT_SITE_NAME",
"value": "[parameters('SharePointSiteName')]"
Expand Down
8 changes: 6 additions & 2 deletions Deployment/azuredeploygcch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
},
"ClientSecret": {
"type": "string",
"type": "securestring",
"minLength": 1,
"metadata": {
"description": "The client secret of the Azure AD app."
Expand Down Expand Up @@ -345,7 +345,7 @@
}
},
"ClientSecret": {
"type": "string",
"type": "securestring",
"minLength": 1,
"metadata": {
"description": "The base name to use for the resources that will be provisioned."
Expand Down Expand Up @@ -476,6 +476,10 @@
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "16.13.0"
},
{
"name": "GENERATE_SOURCEMAP",
"value": "false"
},
{
"name": "REACT_APP_SHAREPOINT_SITE_NAME",
"value": "[parameters('SharePointSiteName')]"
Expand Down
11,454 changes: 6,297 additions & 5,157 deletions EOC-TeamsFx/tabs/package-lock.json

Large diffs are not rendered by default.

46 changes: 31 additions & 15 deletions EOC-TeamsFx/tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,35 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@fluentui/react": "^8.48.0",
"@fluentui/react-components": "^9.25.1",
"@fluentui/react-northstar": "0.66.4",
"@fluentui/react": "^8.117.5",
"@fluentui/react-components": "9.48.0",
"@fluentui/react-northstar": "^0.62.0",
"@loadable/component": "^5.15.3",
"@microsoft/applicationinsights-web": "^2.7.4",
"@microsoft/mgt-components": "2.10.0",
"@microsoft/mgt-react": "2.10.0",
"@microsoft/applicationinsights-web": "^2.8.18",
"@microsoft/mgt-components": "^2.10.0",
"@microsoft/mgt-react": "^2.10.0",
"@microsoft/mgt-teamsfx-provider": "^4.2.1",
"@microsoft/microsoft-graph-client": "3.0.1",
"@microsoft/teams-js": "^1.11.0",
"@microsoft/teamsfx": "0.4.0",
"@microsoft/teams-js": "^2.21.0",
"@microsoft/teamsfx": "2.1.0",
"@microsoft/teamsfx-react": "^2.1.1",
"@react-pdf/renderer": "3.1.12",
"@types/loadable__component": "^5.13.4",
"axios": "^0.21.1",
"bingmaps-react": "^1.2.10",
"bootstrap": "5.2.3",
"botframework-streaming": "^4.22.1",
"classnames": "^2.3.1",
"deep-diff": "^1.0.2",
"glob-parent": "^6.0.2",
"immer": "^9.0.12",
"loadable": "^1.0.0",
"moment": "^2.29.4",
"moment-timezone": ">=0.5.35",
"msteams-react-base-component": "^3.1.0",
"msteams-react-base-component": "^4.0.1",
"react": "^16.14.0",
"react-bootstrap": "^2.7.4",
"react-bootstrap-table-next": "^4.0.3",
"react-bootstrap-table-next": "4.0.3",
"react-bootstrap-table2-paginator": "^2.1.2",
"react-dom": "^16.14.0",
"react-localization": "^1.0.17",
Expand All @@ -52,6 +55,17 @@
"nth-check": "2.0.1"
},
"overrides": {
"@microsoft/teamsfx": "2.1.0",
"@fluentui/react-components": "9.48.0",
"@fluentui/react-button": "9.3.75",
"@fluentui/react-checkbox": "9.2.20",
"@fluentui/react-field": "9.1.61",
"@fluentui/react-message-bar": "9.0.26",
"@fluentui/react-progress": "9.1.71",
"@fluentui/react-provider": "9.13.19",
"@fluentui/react-search": "9.0.0",
"@fluentui/react-jsx-runtime": "9.0.35",
"@fluentui/react-motion-preview": "0.5.18",
"underscore": "1.12.1",
"nth-check": "2.0.1",
"@xmldom/xmldom": ">=0.7.7",
Expand All @@ -62,17 +76,19 @@
"moment-timezone": ">=0.5.35",
"jsonwebtoken": ">=9.0.0",
"follow-redirects": ">=1.14.8",
"@restart/ui": "1.4.1",
"@restart/ui": "1.4.1",
"@react-pdf/pdfkit": "3.0.2",
"@react-pdf/image" :"2.2.1",
"@react-pdf/image": "2.2.1",
"botbuilder": "4.19.2",
"botbuilder-dialogs": "4.19.2"
"botbuilder-dialogs": "4.19.2",
"@types/node": "^14.0.0"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/traverse": ">=7.23.2",
"@types/jest": "^26.0.15",
"@types/node": "^12.0.0",
"@types/react": "16.14.33",
"@types/node": "^14.0.0",
"@types/react": "^17.0.0",
"@types/react-bootstrap-table-next": "^4.0.19",
"@types/react-bootstrap-table2-paginator": "^2.1.2",
"@types/react-dom": "17.0.17",
Expand Down
93 changes: 35 additions & 58 deletions EOC-TeamsFx/tabs/public/auth-end.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,68 +8,45 @@

<body>
<script
src="https://statics.teams.cdn.office.net/sdk/v1.6.0/js/MicrosoftTeams.min.js"
integrity="sha384-mhp2E+BLMiZLe7rDIzj19WjgXJeI32NkPvrvvZBrMi5IvWup/1NUfS5xuYN5S3VT"
crossorigin="anonymous"
src="https://res.cdn.office.net/teams-js/2.21.0/js/MicrosoftTeams.min.js"
></script>
<script type="text/javascript" src="https://alcdn.msauth.net/browser/2.21.0/js/msal-browser.min.js"></script>
<script type="text/javascript">
microsoftTeams.initialize();
let hashParams = getHashParameters();
var currentURL = new URL(window.location);
var clientId = currentURL.searchParams.get("clientId");

if (hashParams["error"]) {
// Authentication failed
microsoftTeams.authentication.notifyFailure(
JSON.stringify({
error: hashParams["error"],
message: JSON.stringify(hashParams),
})
);
} else if (hashParams["code"]) {
// Get the stored state parameter and compare with incoming state
let expectedState = localStorage.getItem("state");
if (expectedState !== hashParams["state"]) {
// State does not match, report error
microsoftTeams.authentication.notifyFailure(
JSON.stringify({
error: "StateDoesNotMatch",
message: JSON.stringify(hashParams),
})
);
} else {
// Success -- return code information to the parent page.
var redirectUri = location.protocol + "//" + location.host + location.pathname;
var result = JSON.stringify({
code: hashParams["code"],
codeVerifier: localStorage.getItem("codeVerifier"),
redirectUri: redirectUri,
});

microsoftTeams.authentication.notifySuccess(result);
}
} else {
// Unexpected condition: hash does not contain error or access_token parameter
microsoftTeams.authentication.notifyFailure(
JSON.stringify({
error: "UnexpectedFailure",
message: JSON.stringify(hashParams),
})
);
}
microsoftTeams.app.initialize().then(() => {
microsoftTeams.app.getContext().then(async (context) => {
const msalConfig = {
auth: {
clientId: clientId,
authority: `https://login.microsoftonline.com/${context.tid}`,
navigateToLoginRequestUrl: false,
},
cache: {
cacheLocation: "sessionStorage",
},
};

// Parse hash parameters into key-value pairs
function getHashParameters() {
let hashParams = {};
location.hash
.substr(1)
.split("&")
.forEach(function (item) {
let s = item.split("="),
k = s[0],
v = s[1] && decodeURIComponent(s[1]);
hashParams[k] = v;
});
return hashParams;
}
const msalInstance = new window.msal.PublicClientApplication(msalConfig);
msalInstance
.handleRedirectPromise()
.then((tokenResponse) => {
if (tokenResponse !== null) {
microsoftTeams.authentication.notifySuccess(
JSON.stringify({
sessionStorage: sessionStorage,
})
);
} else {
microsoftTeams.authentication.notifyFailure("Get empty response.");
}
})
.catch((error) => {
microsoftTeams.authentication.notifyFailure(JSON.stringify(error));
});
});
});
</script>
</body>
</html>
Loading

0 comments on commit 56ac035

Please sign in to comment.