@microsoft/teams-js 2.31.0 → 2.32.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/esm/_virtual/_polyfill-node.os.js +1 -1
- package/dist/esm/_virtual/_polyfill-node.process.js +1 -1
- package/dist/esm/_virtual/_polyfill-node.util.js +1 -1
- package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +2 -0
- package/dist/esm/packages/teams-js/dts/private/index.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +14 -0
- package/dist/esm/packages/teams-js/dts/private/store.d.ts +123 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/adaptiveCard.d.ts +0 -4
- package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/bot.d.ts +0 -5
- package/dist/esm/packages/teams-js/dts/public/dialog/dialog.d.ts +0 -7
- package/dist/esm/packages/teams-js/dts/public/dialog/update.d.ts +0 -5
- package/dist/esm/packages/teams-js/dts/public/dialog/url/bot.d.ts +0 -5
- package/dist/esm/packages/teams-js/dts/public/dialog/url/parentCommunication.d.ts +0 -9
- package/dist/esm/packages/teams-js/dts/public/dialog/url/url.d.ts +0 -6
- package/dist/esm/packages/teams-js/dts/public/index.d.ts +1 -1
- package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +1 -0
- package/dist/esm/packages/teams-js/src/index.js +1 -1
- package/dist/esm/packages/teams-js/src/private/otherAppStateChange.js +1 -1
- package/dist/esm/packages/teams-js/src/private/store.js +1 -0
- package/dist/esm/packages/teams-js/src/public/nestedAppAuth.js +1 -1
- package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +176 -40
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -50
- package/dist/esm/_virtual/_polyfill-node.buffer.js +0 -1
- package/dist/esm/_virtual/_polyfill-node.global.js +0 -1
- package/dist/umd/MicrosoftTeams.d.ts +0 -11857
|
@@ -837,6 +837,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
837
837
|
ChannelType: () => (/* reexport */ ChannelType),
|
|
838
838
|
ChildAppWindow: () => (/* reexport */ ChildAppWindow),
|
|
839
839
|
DialogDimension: () => (/* reexport */ DialogDimension),
|
|
840
|
+
EduType: () => (/* reexport */ EduType),
|
|
840
841
|
EmailAddress: () => (/* reexport */ EmailAddress),
|
|
841
842
|
ErrorCode: () => (/* reexport */ ErrorCode),
|
|
842
843
|
FileOpenPreference: () => (/* reexport */ FileOpenPreference),
|
|
@@ -926,6 +927,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
926
927
|
shareDeepLink: () => (/* reexport */ publicAPIs_shareDeepLink),
|
|
927
928
|
sharing: () => (/* reexport */ sharing_namespaceObject),
|
|
928
929
|
stageView: () => (/* reexport */ stageView_namespaceObject),
|
|
930
|
+
store: () => (/* reexport */ store_namespaceObject),
|
|
929
931
|
tasks: () => (/* reexport */ tasks_namespaceObject),
|
|
930
932
|
teams: () => (/* reexport */ teams_namespaceObject),
|
|
931
933
|
teamsCore: () => (/* reexport */ teamsAPIs_namespaceObject),
|
|
@@ -1327,6 +1329,7 @@ var otherAppStateChange_namespaceObject = {};
|
|
|
1327
1329
|
__webpack_require__.r(otherAppStateChange_namespaceObject);
|
|
1328
1330
|
__webpack_require__.d(otherAppStateChange_namespaceObject, {
|
|
1329
1331
|
isSupported: () => (otherAppStateChange_isSupported),
|
|
1332
|
+
notifyInstallCompleted: () => (notifyInstallCompleted),
|
|
1330
1333
|
registerAppInstallationHandler: () => (registerAppInstallationHandler),
|
|
1331
1334
|
unregisterAppInstallationHandler: () => (unregisterAppInstallationHandler)
|
|
1332
1335
|
});
|
|
@@ -1433,6 +1436,18 @@ __webpack_require__.d(hostEntity_namespaceObject, {
|
|
|
1433
1436
|
tab: () => (tab_namespaceObject)
|
|
1434
1437
|
});
|
|
1435
1438
|
|
|
1439
|
+
// NAMESPACE OBJECT: ./src/private/store.ts
|
|
1440
|
+
var store_namespaceObject = {};
|
|
1441
|
+
__webpack_require__.r(store_namespaceObject);
|
|
1442
|
+
__webpack_require__.d(store_namespaceObject, {
|
|
1443
|
+
StoreDialogType: () => (StoreDialogType),
|
|
1444
|
+
errorInvalidDialogType: () => (errorInvalidDialogType),
|
|
1445
|
+
errorMissingAppId: () => (errorMissingAppId),
|
|
1446
|
+
errorMissingCollectionId: () => (errorMissingCollectionId),
|
|
1447
|
+
isSupported: () => (store_isSupported),
|
|
1448
|
+
openStoreExperience: () => (openStoreExperience)
|
|
1449
|
+
});
|
|
1450
|
+
|
|
1436
1451
|
// NAMESPACE OBJECT: ./src/public/appInstallDialog.ts
|
|
1437
1452
|
var appInstallDialog_namespaceObject = {};
|
|
1438
1453
|
__webpack_require__.r(appInstallDialog_namespaceObject);
|
|
@@ -3325,6 +3340,12 @@ const mapTeamsVersionToSupportedCapabilities = {
|
|
|
3325
3340
|
hostClientTypes: [HostClientType.android, HostClientType.ios],
|
|
3326
3341
|
},
|
|
3327
3342
|
],
|
|
3343
|
+
'2.1.1': [
|
|
3344
|
+
{
|
|
3345
|
+
capability: { nestedAppAuth: {} },
|
|
3346
|
+
hostClientTypes: [HostClientType.android, HostClientType.ios, HostClientType.ipados],
|
|
3347
|
+
},
|
|
3348
|
+
],
|
|
3328
3349
|
};
|
|
3329
3350
|
const generateBackCompatRuntimeConfigLogger = runtimeLogger.extend('generateBackCompatRuntimeConfig');
|
|
3330
3351
|
/**
|
|
@@ -3454,7 +3475,7 @@ function isSerializable(arg) {
|
|
|
3454
3475
|
* @hidden
|
|
3455
3476
|
* Package version.
|
|
3456
3477
|
*/
|
|
3457
|
-
const version = "2.
|
|
3478
|
+
const version = "2.32.0-beta.0";
|
|
3458
3479
|
|
|
3459
3480
|
;// ./src/internal/internalAPIs.ts
|
|
3460
3481
|
|
|
@@ -4751,7 +4772,6 @@ var DataResidency;
|
|
|
4751
4772
|
/**
|
|
4752
4773
|
* Module to update the dialog
|
|
4753
4774
|
*
|
|
4754
|
-
* @beta
|
|
4755
4775
|
* @module
|
|
4756
4776
|
*/
|
|
4757
4777
|
|
|
@@ -4762,8 +4782,6 @@ var DataResidency;
|
|
|
4762
4782
|
* Update dimensions - height/width of a dialog.
|
|
4763
4783
|
*
|
|
4764
4784
|
* @param dimensions - An object containing width and height properties.
|
|
4765
|
-
*
|
|
4766
|
-
* @beta
|
|
4767
4785
|
*/
|
|
4768
4786
|
function resize(dimensions) {
|
|
4769
4787
|
updateResizeHelper(getApiVersionTag(dialogTelemetryVersionNumber, "dialog.update.resize" /* ApiName.Dialog_Update_Resize */), dimensions);
|
|
@@ -4773,8 +4791,6 @@ function resize(dimensions) {
|
|
|
4773
4791
|
* @returns boolean to represent whether dialog.update capabilty is supported
|
|
4774
4792
|
*
|
|
4775
4793
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
4776
|
-
*
|
|
4777
|
-
* @beta
|
|
4778
4794
|
*/
|
|
4779
4795
|
function update_isSupported() {
|
|
4780
4796
|
return ensureInitialized(runtime) && runtime.supports.dialog
|
|
@@ -4788,7 +4804,6 @@ function update_isSupported() {
|
|
|
4788
4804
|
/**
|
|
4789
4805
|
* Module to open a dialog that sends results to the bot framework
|
|
4790
4806
|
*
|
|
4791
|
-
* @beta
|
|
4792
4807
|
* @module
|
|
4793
4808
|
*/
|
|
4794
4809
|
|
|
@@ -4803,8 +4818,6 @@ function update_isSupported() {
|
|
|
4803
4818
|
* @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
|
|
4804
4819
|
*
|
|
4805
4820
|
* @returns a function that can be used to send messages to the dialog.
|
|
4806
|
-
*
|
|
4807
|
-
* @beta
|
|
4808
4821
|
*/
|
|
4809
4822
|
function bot_open(botUrlDialogInfo, submitHandler, messageFromChildHandler) {
|
|
4810
4823
|
botUrlOpenHelper(getApiVersionTag(dialogTelemetryVersionNumber, "dialog.url.bot.open" /* ApiName.Dialog_Url_Bot_Open */), botUrlDialogInfo, submitHandler, messageFromChildHandler);
|
|
@@ -4815,8 +4828,6 @@ function bot_open(botUrlDialogInfo, submitHandler, messageFromChildHandler) {
|
|
|
4815
4828
|
* @returns boolean to represent whether dialog.url.bot is supported
|
|
4816
4829
|
*
|
|
4817
4830
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
4818
|
-
*
|
|
4819
|
-
* @beta
|
|
4820
4831
|
*/
|
|
4821
4832
|
function bot_isSupported() {
|
|
4822
4833
|
return (ensureInitialized(runtime) &&
|
|
@@ -4830,7 +4841,6 @@ function bot_isSupported() {
|
|
|
4830
4841
|
* @remarks
|
|
4831
4842
|
* Note that dialog can be invoked from parentless scenarios e.g. Search Message Extensions. The subcapability `parentCommunication` is not supported in such scenarios.
|
|
4832
4843
|
*
|
|
4833
|
-
* @beta
|
|
4834
4844
|
* @module
|
|
4835
4845
|
*/
|
|
4836
4846
|
|
|
@@ -4847,8 +4857,6 @@ function bot_isSupported() {
|
|
|
4847
4857
|
* This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
|
|
4848
4858
|
*
|
|
4849
4859
|
* @param message - The message to send to the parent
|
|
4850
|
-
*
|
|
4851
|
-
* @beta
|
|
4852
4860
|
*/
|
|
4853
4861
|
function sendMessageToParentFromDialog(
|
|
4854
4862
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -4863,8 +4871,6 @@ message) {
|
|
|
4863
4871
|
* Send message to the dialog from the parent
|
|
4864
4872
|
*
|
|
4865
4873
|
* @param message - The message to send
|
|
4866
|
-
*
|
|
4867
|
-
* @beta
|
|
4868
4874
|
*/
|
|
4869
4875
|
function sendMessageToDialog(
|
|
4870
4876
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -4882,8 +4888,6 @@ message) {
|
|
|
4882
4888
|
* This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
|
|
4883
4889
|
*
|
|
4884
4890
|
* @param listener - The listener that will be triggered.
|
|
4885
|
-
*
|
|
4886
|
-
* @beta
|
|
4887
4891
|
*/
|
|
4888
4892
|
function registerOnMessageFromParent(listener) {
|
|
4889
4893
|
ensureInitialized(runtime, FrameContexts.task);
|
|
@@ -4907,8 +4911,6 @@ function registerOnMessageFromParent(listener) {
|
|
|
4907
4911
|
* @returns boolean to represent whether dialog.url.parentCommunication capability is supported
|
|
4908
4912
|
*
|
|
4909
4913
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
4910
|
-
*
|
|
4911
|
-
* @beta
|
|
4912
4914
|
*/
|
|
4913
4915
|
function parentCommunication_isSupported() {
|
|
4914
4916
|
var _a, _b;
|
|
@@ -4933,8 +4935,6 @@ function parentCommunication_isSupported() {
|
|
|
4933
4935
|
* @param urlDialogInfo - An object containing the parameters of the dialog module.
|
|
4934
4936
|
* @param submitHandler - Handler that triggers when a dialog calls the {@linkcode submit} function or when the user closes the dialog.
|
|
4935
4937
|
* @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
|
|
4936
|
-
*
|
|
4937
|
-
* @beta
|
|
4938
4938
|
*/
|
|
4939
4939
|
function url_open(urlDialogInfo, submitHandler, messageFromChildHandler) {
|
|
4940
4940
|
urlOpenHelper(getApiVersionTag(dialogTelemetryVersionNumber, "dialog.url.open" /* ApiName.Dialog_Url_Open */), urlDialogInfo, submitHandler, messageFromChildHandler);
|
|
@@ -4949,8 +4949,6 @@ function url_open(urlDialogInfo, submitHandler, messageFromChildHandler) {
|
|
|
4949
4949
|
* If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
|
|
4950
4950
|
*
|
|
4951
4951
|
* @param appIds - Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.
|
|
4952
|
-
*
|
|
4953
|
-
* @beta
|
|
4954
4952
|
*/
|
|
4955
4953
|
function url_submit(result, appIds) {
|
|
4956
4954
|
urlSubmitHelper(getApiVersionTag(dialogTelemetryVersionNumber, "dialog.url.submit" /* ApiName.Dialog_Url_Submit */), result, appIds);
|
|
@@ -4961,8 +4959,6 @@ function url_submit(result, appIds) {
|
|
|
4961
4959
|
* @returns boolean to represent whether dialog.url module is supported
|
|
4962
4960
|
*
|
|
4963
4961
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
4964
|
-
*
|
|
4965
|
-
* @beta
|
|
4966
4962
|
*/
|
|
4967
4963
|
function url_isSupported() {
|
|
4968
4964
|
return ensureInitialized(runtime) && (runtime.supports.dialog && runtime.supports.dialog.url) !== undefined;
|
|
@@ -5111,7 +5107,6 @@ function handleDialogMessage(message) {
|
|
|
5111
5107
|
/**
|
|
5112
5108
|
* Module for interaction with adaptive card dialogs that need to communicate with the bot framework
|
|
5113
5109
|
*
|
|
5114
|
-
* @beta
|
|
5115
5110
|
* @module
|
|
5116
5111
|
*/
|
|
5117
5112
|
|
|
@@ -5126,8 +5121,6 @@ function handleDialogMessage(message) {
|
|
|
5126
5121
|
*
|
|
5127
5122
|
* @param botAdaptiveCardDialogInfo - An object containing the parameters of the dialog module including completionBotId.
|
|
5128
5123
|
* @param submitHandler - Handler that triggers when the dialog has been submitted or closed.
|
|
5129
|
-
*
|
|
5130
|
-
* @beta
|
|
5131
5124
|
*/
|
|
5132
5125
|
function adaptiveCard_bot_open(botAdaptiveCardDialogInfo, submitHandler) {
|
|
5133
5126
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
|
@@ -5145,8 +5138,6 @@ function adaptiveCard_bot_open(botAdaptiveCardDialogInfo, submitHandler) {
|
|
|
5145
5138
|
* @returns boolean to represent whether dialog.adaptiveCard.bot is supported
|
|
5146
5139
|
*
|
|
5147
5140
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
5148
|
-
*
|
|
5149
|
-
* @beta
|
|
5150
5141
|
*/
|
|
5151
5142
|
function adaptiveCard_bot_isSupported() {
|
|
5152
5143
|
const isAdaptiveCardVersionSupported = runtime.hostVersionsInfo &&
|
|
@@ -5163,7 +5154,6 @@ function adaptiveCard_bot_isSupported() {
|
|
|
5163
5154
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5164
5155
|
/**
|
|
5165
5156
|
* Subcapability for interacting with adaptive card dialogs
|
|
5166
|
-
* @beta
|
|
5167
5157
|
* @module
|
|
5168
5158
|
*/
|
|
5169
5159
|
|
|
@@ -5182,8 +5172,6 @@ function adaptiveCard_bot_isSupported() {
|
|
|
5182
5172
|
*
|
|
5183
5173
|
* @param adaptiveCardDialogInfo - An object containing the parameters of the dialog module {@link AdaptiveCardDialogInfo}.
|
|
5184
5174
|
* @param submitHandler - Handler that triggers when a dialog fires an [Action.Submit](https://adaptivecards.io/explorer/Action.Submit.html) or when the user closes the dialog.
|
|
5185
|
-
*
|
|
5186
|
-
* @beta
|
|
5187
5175
|
*/
|
|
5188
5176
|
function adaptiveCard_open(adaptiveCardDialogInfo, submitHandler) {
|
|
5189
5177
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
|
@@ -5201,8 +5189,6 @@ function adaptiveCard_open(adaptiveCardDialogInfo, submitHandler) {
|
|
|
5201
5189
|
* @returns boolean to represent whether dialog.adaptiveCard module is supported
|
|
5202
5190
|
*
|
|
5203
5191
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
5204
|
-
*
|
|
5205
|
-
* @beta
|
|
5206
5192
|
*/
|
|
5207
5193
|
function adaptiveCard_isSupported() {
|
|
5208
5194
|
const isAdaptiveCardVersionSupported = runtime.hostVersionsInfo &&
|
|
@@ -5228,7 +5214,6 @@ function adaptiveCard_isSupported() {
|
|
|
5228
5214
|
* @remarks Note that dialogs were previously called "task modules". While they have been renamed for clarity, the functionality has been maintained.
|
|
5229
5215
|
* For more details, see [Dialogs](https://learn.microsoft.com/microsoftteams/platform/task-modules-and-cards/what-are-task-modules)
|
|
5230
5216
|
*
|
|
5231
|
-
* @beta
|
|
5232
5217
|
* @module
|
|
5233
5218
|
*/
|
|
5234
5219
|
|
|
@@ -5247,8 +5232,6 @@ function adaptiveCard_isSupported() {
|
|
|
5247
5232
|
* Function is called during app initialization
|
|
5248
5233
|
* @internal
|
|
5249
5234
|
* Limited to Microsoft-internal use
|
|
5250
|
-
*
|
|
5251
|
-
* @beta
|
|
5252
5235
|
*/
|
|
5253
5236
|
function dialog_initialize() {
|
|
5254
5237
|
registerHandler(getApiVersionTag(dialogTelemetryVersionNumber, "dialog.registerMessageForChildHandler" /* ApiName.Dialog_RegisterMessageForChildHandler */), 'messageForChild', handleDialogMessage, false);
|
|
@@ -9984,6 +9967,24 @@ function unregisterAppInstallationHandler() {
|
|
|
9984
9967
|
sendMessageToParent(getApiVersionTag(otherAppStateChangeTelemetryVersionNumber, "otherApp.unregisterInstall" /* ApiName.OtherAppStateChange_UnregisterInstall */), "otherApp.unregisterInstall" /* ApiName.OtherAppStateChange_UnregisterInstall */);
|
|
9985
9968
|
handlers_removeHandler("otherApp.install" /* ApiName.OtherAppStateChange_Install */);
|
|
9986
9969
|
}
|
|
9970
|
+
/**
|
|
9971
|
+
* @hidden
|
|
9972
|
+
* @beta
|
|
9973
|
+
* @internal
|
|
9974
|
+
* Limited to Microsoft-internal use
|
|
9975
|
+
*
|
|
9976
|
+
* This function should be called by the Store App to notify the host that the
|
|
9977
|
+
* app with the given appId has been installed.
|
|
9978
|
+
*
|
|
9979
|
+
* @throws Error if {@link app.initialize} has not successfully completed or if the platform
|
|
9980
|
+
* does not support the otherAppStateChange capability.
|
|
9981
|
+
*/
|
|
9982
|
+
function notifyInstallCompleted(appId) {
|
|
9983
|
+
if (!otherAppStateChange_isSupported()) {
|
|
9984
|
+
throw new Error(ErrorCode.NOT_SUPPORTED_ON_PLATFORM.toString());
|
|
9985
|
+
}
|
|
9986
|
+
return callFunctionInHost("otherApp.notifyInstallCompleted" /* ApiName.OtherAppStateChange_NotifyInstallCompleted */, [appId.toString()], getApiVersionTag(otherAppStateChangeTelemetryVersionNumber, "otherApp.notifyInstallCompleted" /* ApiName.OtherAppStateChange_NotifyInstallCompleted */));
|
|
9987
|
+
}
|
|
9987
9988
|
/**
|
|
9988
9989
|
* Checks if the otherAppStateChange capability is supported by the host
|
|
9989
9990
|
* @returns boolean to represent whether the otherAppStateChange capability is supported
|
|
@@ -11969,6 +11970,123 @@ function hostEntity_isSupported() {
|
|
|
11969
11970
|
}
|
|
11970
11971
|
|
|
11971
11972
|
|
|
11973
|
+
;// ./src/private/store.ts
|
|
11974
|
+
var store_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11975
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11976
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11977
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11978
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
11979
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11980
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11981
|
+
});
|
|
11982
|
+
};
|
|
11983
|
+
|
|
11984
|
+
|
|
11985
|
+
|
|
11986
|
+
|
|
11987
|
+
|
|
11988
|
+
|
|
11989
|
+
/**
|
|
11990
|
+
* @beta
|
|
11991
|
+
* @hidden
|
|
11992
|
+
* @module
|
|
11993
|
+
* Namespace to open app store
|
|
11994
|
+
* @internal
|
|
11995
|
+
* Limited to Microsoft-internal use
|
|
11996
|
+
*/
|
|
11997
|
+
const StoreVersionTagNum = "v2" /* ApiVersionNumber.V_2 */;
|
|
11998
|
+
/**
|
|
11999
|
+
* @beta
|
|
12000
|
+
* @hidden
|
|
12001
|
+
* Enum of store dialog type
|
|
12002
|
+
* @internal
|
|
12003
|
+
* Limited to Microsoft-internal use
|
|
12004
|
+
*/
|
|
12005
|
+
var StoreDialogType;
|
|
12006
|
+
(function (StoreDialogType) {
|
|
12007
|
+
/**
|
|
12008
|
+
* open a store without navigation
|
|
12009
|
+
*/
|
|
12010
|
+
StoreDialogType["FullStore"] = "fullstore";
|
|
12011
|
+
/**
|
|
12012
|
+
* open a store with navigation to a specific collection
|
|
12013
|
+
*/
|
|
12014
|
+
StoreDialogType["SpecificStore"] = "specificstore";
|
|
12015
|
+
/**
|
|
12016
|
+
* open in-context-store
|
|
12017
|
+
*/
|
|
12018
|
+
StoreDialogType["InContextStore"] = "ics";
|
|
12019
|
+
/**
|
|
12020
|
+
* open detail dialog (DD)
|
|
12021
|
+
*/
|
|
12022
|
+
StoreDialogType["AppDetail"] = "appdetail";
|
|
12023
|
+
})(StoreDialogType || (StoreDialogType = {}));
|
|
12024
|
+
/**
|
|
12025
|
+
* @beta
|
|
12026
|
+
* @hidden
|
|
12027
|
+
* error message when getting invalid store dialog type
|
|
12028
|
+
* @internal
|
|
12029
|
+
* Limited to Microsoft-internal use
|
|
12030
|
+
*/
|
|
12031
|
+
const errorInvalidDialogType = 'Invalid store dialog type, but type needed to specify store to open';
|
|
12032
|
+
/**
|
|
12033
|
+
* @beta
|
|
12034
|
+
* @hidden
|
|
12035
|
+
* error message when getting wrong app id or missing app id
|
|
12036
|
+
* @internal
|
|
12037
|
+
* Limited to Microsoft-internal use
|
|
12038
|
+
*/
|
|
12039
|
+
const errorMissingAppId = 'No App Id present, but AppId needed to open AppDetail store';
|
|
12040
|
+
/**
|
|
12041
|
+
* @beta
|
|
12042
|
+
* @hidden
|
|
12043
|
+
* error message when getting wrong collection id or missing collection id
|
|
12044
|
+
* @internal
|
|
12045
|
+
* Limited to Microsoft-internal use
|
|
12046
|
+
*/
|
|
12047
|
+
const errorMissingCollectionId = 'No Collection Id present, but CollectionId needed to open a store specific to a collection';
|
|
12048
|
+
/**
|
|
12049
|
+
* @beta
|
|
12050
|
+
* @hidden
|
|
12051
|
+
* Api to open a store
|
|
12052
|
+
*
|
|
12053
|
+
* @param openStoreParams - params to call openStoreExperience
|
|
12054
|
+
*
|
|
12055
|
+
* @internal
|
|
12056
|
+
* Limited to Microsoft-internal use
|
|
12057
|
+
*/
|
|
12058
|
+
function openStoreExperience(openStoreParams) {
|
|
12059
|
+
return store_awaiter(this, void 0, void 0, function* () {
|
|
12060
|
+
ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
|
12061
|
+
if (!store_isSupported()) {
|
|
12062
|
+
throw errorNotSupportedOnPlatform;
|
|
12063
|
+
}
|
|
12064
|
+
if (openStoreParams === undefined || !Object.values(StoreDialogType).includes(openStoreParams.dialogType)) {
|
|
12065
|
+
throw new Error(errorInvalidDialogType);
|
|
12066
|
+
}
|
|
12067
|
+
if (openStoreParams.dialogType === StoreDialogType.AppDetail && !(openStoreParams.appId instanceof AppId)) {
|
|
12068
|
+
throw new Error(errorMissingAppId);
|
|
12069
|
+
}
|
|
12070
|
+
if (openStoreParams.dialogType === StoreDialogType.SpecificStore && !openStoreParams.collectionId) {
|
|
12071
|
+
throw new Error(errorMissingCollectionId);
|
|
12072
|
+
}
|
|
12073
|
+
return callFunctionInHost("store.open" /* ApiName.Store_Open */, [
|
|
12074
|
+
openStoreParams.dialogType,
|
|
12075
|
+
openStoreParams.appId,
|
|
12076
|
+
openStoreParams.collectionId,
|
|
12077
|
+
], getApiVersionTag(StoreVersionTagNum, "store.open" /* ApiName.Store_Open */));
|
|
12078
|
+
});
|
|
12079
|
+
}
|
|
12080
|
+
/**
|
|
12081
|
+
* Checks if the store capability is supported by the host
|
|
12082
|
+
* @returns boolean to represent whether the store capability is supported
|
|
12083
|
+
*
|
|
12084
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
12085
|
+
*/
|
|
12086
|
+
function store_isSupported() {
|
|
12087
|
+
return ensureInitialized(runtime) && !!runtime.supports.store;
|
|
12088
|
+
}
|
|
12089
|
+
|
|
11972
12090
|
;// ./src/private/index.ts
|
|
11973
12091
|
|
|
11974
12092
|
|
|
@@ -12005,6 +12123,8 @@ function hostEntity_isSupported() {
|
|
|
12005
12123
|
|
|
12006
12124
|
|
|
12007
12125
|
|
|
12126
|
+
|
|
12127
|
+
|
|
12008
12128
|
|
|
12009
12129
|
|
|
12010
12130
|
|
|
@@ -13144,6 +13264,8 @@ function clipboard_isSupported() {
|
|
|
13144
13264
|
*/
|
|
13145
13265
|
|
|
13146
13266
|
|
|
13267
|
+
|
|
13268
|
+
|
|
13147
13269
|
/**
|
|
13148
13270
|
* Checks if MSAL-NAA channel recommended by the host
|
|
13149
13271
|
* @returns true if host is recommending NAA channel and false otherwise
|
|
@@ -13154,7 +13276,21 @@ function clipboard_isSupported() {
|
|
|
13154
13276
|
*/
|
|
13155
13277
|
function isNAAChannelRecommended() {
|
|
13156
13278
|
var _a;
|
|
13157
|
-
return (_a = (ensureInitialized(runtime) &&
|
|
13279
|
+
return ((_a = (ensureInitialized(runtime) &&
|
|
13280
|
+
(runtime.isNAAChannelRecommended || isNAAChannelRecommendedForLegacyTeamsMobile()))) !== null && _a !== void 0 ? _a : false);
|
|
13281
|
+
}
|
|
13282
|
+
function isNAAChannelRecommendedForLegacyTeamsMobile() {
|
|
13283
|
+
return ensureInitialized(runtime) &&
|
|
13284
|
+
isHostAndroidOrIOSOrIPadOS() &&
|
|
13285
|
+
runtime.isLegacyTeams &&
|
|
13286
|
+
runtime.supports.nestedAppAuth
|
|
13287
|
+
? true
|
|
13288
|
+
: false;
|
|
13289
|
+
}
|
|
13290
|
+
function isHostAndroidOrIOSOrIPadOS() {
|
|
13291
|
+
return (GlobalVars.hostClientType === HostClientType.android ||
|
|
13292
|
+
GlobalVars.hostClientType === HostClientType.ios ||
|
|
13293
|
+
GlobalVars.hostClientType === HostClientType.ipados);
|
|
13158
13294
|
}
|
|
13159
13295
|
|
|
13160
13296
|
;// ./src/public/geoLocation/map.ts
|