@microsoft/teams-js 2.0.0-beta.4-dev.12 → 2.0.0-beta.4-dev.13
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
|
@@ -2770,6 +2770,20 @@ export namespace dialog {
|
|
|
2770
2770
|
* @param appIds - Helps to validate that the call originates from the same appId as the one that invoked the task module
|
|
2771
2771
|
*/
|
|
2772
2772
|
function submit(result?: string | object, appIds?: string | string[]): void;
|
|
2773
|
+
/**
|
|
2774
|
+
* Send message to the parent from dialog
|
|
2775
|
+
*
|
|
2776
|
+
* @param message - The message to send
|
|
2777
|
+
* @param onComplete - The callback to know if the message to parent has been success/failed.
|
|
2778
|
+
*/
|
|
2779
|
+
function sendMessageToParentFromDialog(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
2780
|
+
/**
|
|
2781
|
+
* Fucntion to call when an event is received from the Parent
|
|
2782
|
+
*
|
|
2783
|
+
* @param type - The event to listen to. Currently the only supported type is 'message'.
|
|
2784
|
+
* @param listener - listener - The listener that will be called.
|
|
2785
|
+
*/
|
|
2786
|
+
function registerOnMessageFromParent(listener: (message: any) => void): void;
|
|
2773
2787
|
function isSupported(): boolean;
|
|
2774
2788
|
}
|
|
2775
2789
|
|
package/dist/MicrosoftTeams.js
CHANGED
|
@@ -1121,7 +1121,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1121
1121
|
});
|
|
1122
1122
|
|
|
1123
1123
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
|
1124
|
-
var version = "2.0.0-beta.4-dev.
|
|
1124
|
+
var version = "2.0.0-beta.4-dev.13";
|
|
1125
1125
|
/**
|
|
1126
1126
|
* @hidden
|
|
1127
1127
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
|
@@ -4318,6 +4318,7 @@ var ParentAppWindow = /** @class */ (function () {
|
|
|
4318
4318
|
|
|
4319
4319
|
|
|
4320
4320
|
;// CONCATENATED MODULE: ./src/public/dialog.ts
|
|
4321
|
+
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
4321
4322
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
4322
4323
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4323
4324
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
@@ -4336,6 +4337,8 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4336
4337
|
|
|
4337
4338
|
|
|
4338
4339
|
|
|
4340
|
+
|
|
4341
|
+
|
|
4339
4342
|
/**
|
|
4340
4343
|
* Namespace to interact with the dialog module-specific part of the SDK.
|
|
4341
4344
|
*
|
|
@@ -4386,6 +4389,31 @@ var dialog;
|
|
|
4386
4389
|
sendMessageToParent('tasks.completeTask', [result, Array.isArray(appIds) ? appIds : [appIds]]);
|
|
4387
4390
|
}
|
|
4388
4391
|
dialog.submit = submit;
|
|
4392
|
+
/**
|
|
4393
|
+
* Send message to the parent from dialog
|
|
4394
|
+
*
|
|
4395
|
+
* @param message - The message to send
|
|
4396
|
+
* @param onComplete - The callback to know if the message to parent has been success/failed.
|
|
4397
|
+
*/
|
|
4398
|
+
function sendMessageToParentFromDialog(
|
|
4399
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4400
|
+
message, onComplete) {
|
|
4401
|
+
ensureInitialized(FrameContexts.task);
|
|
4402
|
+
sendMessageToParent('messageForParent', [message], onComplete ? onComplete : getGenericOnCompleteHandler());
|
|
4403
|
+
}
|
|
4404
|
+
dialog.sendMessageToParentFromDialog = sendMessageToParentFromDialog;
|
|
4405
|
+
/**
|
|
4406
|
+
* Fucntion to call when an event is received from the Parent
|
|
4407
|
+
*
|
|
4408
|
+
* @param type - The event to listen to. Currently the only supported type is 'message'.
|
|
4409
|
+
* @param listener - listener - The listener that will be called.
|
|
4410
|
+
*/
|
|
4411
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4412
|
+
function registerOnMessageFromParent(listener) {
|
|
4413
|
+
ensureInitialized();
|
|
4414
|
+
registerHandler('messageForChild', listener);
|
|
4415
|
+
}
|
|
4416
|
+
dialog.registerOnMessageFromParent = registerOnMessageFromParent;
|
|
4389
4417
|
function isSupported() {
|
|
4390
4418
|
return runtime.supports.dialog ? true : false;
|
|
4391
4419
|
}
|