@microsoft/teams-js 2.1.0-beta.2 → 2.1.0-beta.3
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/dist/MicrosoftTeams.d.ts
CHANGED
@@ -5459,7 +5459,9 @@ export namespace tasks {
|
|
5459
5459
|
/**
|
5460
5460
|
* @deprecated
|
5461
5461
|
* As of 2.0.0, please use {@link dialog.open dialog.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
|
5462
|
-
* and {@link dialog.bot.open dialog.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot based dialogs.
|
5462
|
+
* and {@link dialog.bot.open dialog.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot based dialogs. In Teams,
|
5463
|
+
* this function can be used for adaptive card based dialogs. Support for adaptive card based dialogs is coming to other hosts in the future.
|
5464
|
+
*
|
5463
5465
|
* Allows an app to open the task module.
|
5464
5466
|
*
|
5465
5467
|
* @param taskInfo - An object containing the parameters of the task module
|
package/dist/MicrosoftTeams.js
CHANGED
@@ -1122,7 +1122,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1122
1122
|
});
|
1123
1123
|
|
1124
1124
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
1125
|
-
var version = "2.1.0-beta.
|
1125
|
+
var version = "2.1.0-beta.3";
|
1126
1126
|
/**
|
1127
1127
|
* @hidden
|
1128
1128
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
@@ -2581,7 +2581,7 @@ var dialog;
|
|
2581
2581
|
}
|
2582
2582
|
var dialogInfo = getDialogInfoFromUrlDialogInfo(urlDialogInfo);
|
2583
2583
|
sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
|
2584
|
-
submitHandler({ err: err, result: result });
|
2584
|
+
submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err: err, result: result });
|
2585
2585
|
removeHandler('messageForParent');
|
2586
2586
|
});
|
2587
2587
|
}
|
@@ -2720,7 +2720,7 @@ var dialog;
|
|
2720
2720
|
}
|
2721
2721
|
var dialogInfo = getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo);
|
2722
2722
|
sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
|
2723
|
-
submitHandler({ err: err, result: result });
|
2723
|
+
submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err: err, result: result });
|
2724
2724
|
removeHandler('messageForParent');
|
2725
2725
|
});
|
2726
2726
|
}
|
@@ -4052,6 +4052,10 @@ function removeHandler(name) {
|
|
4052
4052
|
delete HandlersPrivate.handlers[name];
|
4053
4053
|
}
|
4054
4054
|
/** @internal */
|
4055
|
+
function doesHandlerExist(name) {
|
4056
|
+
return HandlersPrivate.handlers[name] != null;
|
4057
|
+
}
|
4058
|
+
/** @internal */
|
4055
4059
|
function handlers_registerOnThemeChangeHandler(handler) {
|
4056
4060
|
HandlersPrivate.themeChangeHandler = handler;
|
4057
4061
|
handler && sendMessageToParent('registerHandler', ['themeChange']);
|
@@ -7187,26 +7191,27 @@ var tasks;
|
|
7187
7191
|
/**
|
7188
7192
|
* @deprecated
|
7189
7193
|
* As of 2.0.0, please use {@link dialog.open dialog.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
|
7190
|
-
* and {@link dialog.bot.open dialog.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot based dialogs.
|
7194
|
+
* and {@link dialog.bot.open dialog.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot based dialogs. In Teams,
|
7195
|
+
* this function can be used for adaptive card based dialogs. Support for adaptive card based dialogs is coming to other hosts in the future.
|
7196
|
+
*
|
7191
7197
|
* Allows an app to open the task module.
|
7192
7198
|
*
|
7193
7199
|
* @param taskInfo - An object containing the parameters of the task module
|
7194
7200
|
* @param submitHandler - Handler to call when the task module is completed
|
7195
7201
|
*/
|
7196
7202
|
function startTask(taskInfo, submitHandler) {
|
7203
|
+
var dialogSubmitHandler = submitHandler
|
7204
|
+
? function (sdkResponse) { return submitHandler(sdkResponse.err, sdkResponse.result); }
|
7205
|
+
: undefined;
|
7197
7206
|
if (taskInfo.card !== undefined || taskInfo.url === undefined) {
|
7198
7207
|
ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
7199
7208
|
sendMessageToParent('tasks.startTask', [taskInfo], submitHandler);
|
7200
7209
|
}
|
7201
7210
|
else if (taskInfo.completionBotId !== undefined) {
|
7202
|
-
dialog.bot.open(getBotUrlDialogInfoFromTaskInfo(taskInfo),
|
7203
|
-
return submitHandler(sdkResponse.err, sdkResponse.result);
|
7204
|
-
});
|
7211
|
+
dialog.bot.open(getBotUrlDialogInfoFromTaskInfo(taskInfo), dialogSubmitHandler);
|
7205
7212
|
}
|
7206
7213
|
else {
|
7207
|
-
dialog.open(getUrlDialogInfoFromTaskInfo(taskInfo),
|
7208
|
-
return submitHandler(sdkResponse.err, sdkResponse.result);
|
7209
|
-
});
|
7214
|
+
dialog.open(getUrlDialogInfoFromTaskInfo(taskInfo), dialogSubmitHandler);
|
7210
7215
|
}
|
7211
7216
|
return new ChildAppWindow();
|
7212
7217
|
}
|