-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into lakhveer/eligibility
- Loading branch information
Showing
26 changed files
with
443 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { AppId, store } from '@microsoft/teams-js'; | ||
import { ReactElement } from 'react'; | ||
import React from 'react'; | ||
|
||
import { ApiWithoutInput, ApiWithTextInput } from './utils'; | ||
import { ModuleWrapper } from './utils/ModuleWrapper'; | ||
|
||
const StoreAPIs = (): ReactElement => { | ||
const CheckStoreCapability = (): ReactElement => | ||
ApiWithoutInput({ | ||
name: 'checkCapabilityStore', | ||
title: 'Check Capability Store', | ||
onClick: async () => { | ||
if (store.isSupported()) { | ||
return 'Store module is supported'; | ||
} else { | ||
return 'Store module is not supported'; | ||
} | ||
}, | ||
}); | ||
|
||
const OpenStore = (): ReactElement => | ||
ApiWithTextInput<{ dialogType: string; appId?: string; collectionId?: string }>({ | ||
name: 'storeOpen', | ||
title: 'Store Open', | ||
onClick: { | ||
validateInput: (input) => { | ||
if (input?.dialogType === undefined) { | ||
throw new Error('store type undefined'); | ||
} | ||
}, | ||
submit: async (input) => { | ||
const appId = input.appId === undefined ? undefined : new AppId(input.appId); | ||
const openStoreParam = { | ||
dialogType: input.dialogType, | ||
appId: appId, | ||
collectionId: input.collectionId, | ||
}; | ||
// eslint-disable-next-line no-useless-catch | ||
try { | ||
await store.openStoreExperience(openStoreParam as store.OpenStoreParams); | ||
return 'store opened'; | ||
} catch (e) { | ||
throw e; | ||
} | ||
}, | ||
}, | ||
defaultInput: JSON.stringify({ | ||
dialogType: 'appdetail', | ||
appId: '1542629c-01b3-4a6d-8f76-1938b779e48d', | ||
}), | ||
}); | ||
return ( | ||
<ModuleWrapper title="Store"> | ||
<CheckStoreCapability /> | ||
<OpenStore /> | ||
</ModuleWrapper> | ||
); | ||
}; | ||
|
||
export default StoreAPIs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
change/@microsoft-teams-js-07829a41-a760-48a1-a793-df938ea61c13.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "Added `store` capability that will enable user to open several types of app store dialogs.. The capability is still awaiting support in one or most host applications. To track availability of this capability across different hosts see https://aka.ms/capmatrix", | ||
"packageName": "@microsoft/teams-js", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 0 additions & 7 deletions
7
change/@microsoft-teams-js-424ccfee-e9f3-4b6b-bf1b-5e861422eb1b.json
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
change/@microsoft-teams-js-4a860473-7a5b-481e-890b-4132b304af2e.json
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
change/@microsoft-teams-js-818caaaa-86eb-4e3d-a84a-0d61028d0307.json
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
change/@microsoft-teams-js-c78bd0b1-8288-4e22-bd89-252a1218ba5d.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Released 2.31.1", | ||
"packageName": "@microsoft/teams-js", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 0 additions & 7 deletions
7
change/@microsoft-teams-js-e65fa5c8-93f1-4296-b6e3-c44e178f9fca.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv | |
|
||
### Production | ||
|
||
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.31.0/js/MicrosoftTeams.min.js) or point your package manager at them. | ||
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.31.1/js/MicrosoftTeams.min.js) or point your package manager at them. | ||
|
||
## Usage | ||
|
||
|
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using: | |
```html | ||
<!-- Microsoft Teams JavaScript API (via CDN) --> | ||
<script | ||
src="https://res.cdn.office.net/teams-js/2.31.0/js/MicrosoftTeams.min.js" | ||
integrity="sha384-A2y7iMKbK0AQrgKq1YKcLB8XgtyowB2MPzC40KFfA58nQObf6xU3C5NE0cTcis0V" | ||
src="https://res.cdn.office.net/teams-js/2.31.1/js/MicrosoftTeams.min.js" | ||
integrity="sha384-ihAqYgEJz9hzEU+HaYodG1aTzjebC/wKXQi1nWKZG7OLAUyOL9ZrzD/SfZu79Jeu" | ||
crossorigin="anonymous" | ||
></script> | ||
|
||
<!-- Microsoft Teams JavaScript API (via npm) --> | ||
<script src="node_modules/@microsoft/[email protected].0/dist/MicrosoftTeams.min.js"></script> | ||
<script src="node_modules/@microsoft/[email protected].1/dist/MicrosoftTeams.min.js"></script> | ||
|
||
<!-- Microsoft Teams JavaScript API (via local) --> | ||
<script src="MicrosoftTeams.min.js"></script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.