@microsoft/teams-js 2.0.0-beta.4-dev.23 → 2.0.0-beta.4-dev.26
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
package/dist/MicrosoftTeams.js
CHANGED
|
@@ -1066,7 +1066,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1066
1066
|
"calendar": () => (/* reexport */ calendar),
|
|
1067
1067
|
"call": () => (/* reexport */ call),
|
|
1068
1068
|
"chat": () => (/* reexport */ chat),
|
|
1069
|
-
"
|
|
1069
|
+
"conversations": () => (/* reexport */ conversations),
|
|
1070
1070
|
"dialog": () => (/* reexport */ dialog),
|
|
1071
1071
|
"enablePrintCapability": () => (/* reexport */ enablePrintCapability),
|
|
1072
1072
|
"executeDeepLink": () => (/* reexport */ executeDeepLink),
|
|
@@ -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.26";
|
|
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.
|
|
@@ -2326,7 +2326,7 @@ var runtime = {
|
|
|
2326
2326
|
calendar: undefined,
|
|
2327
2327
|
call: undefined,
|
|
2328
2328
|
chat: {
|
|
2329
|
-
|
|
2329
|
+
conversations: undefined,
|
|
2330
2330
|
},
|
|
2331
2331
|
dialog: {
|
|
2332
2332
|
bot: undefined,
|
|
@@ -2368,7 +2368,7 @@ var teamsRuntimeConfig = {
|
|
|
2368
2368
|
appEntity: {},
|
|
2369
2369
|
call: {},
|
|
2370
2370
|
chat: {
|
|
2371
|
-
|
|
2371
|
+
conversations: {},
|
|
2372
2372
|
},
|
|
2373
2373
|
dialog: {
|
|
2374
2374
|
bot: {},
|
|
@@ -4141,7 +4141,7 @@ var UserSettingTypes;
|
|
|
4141
4141
|
UserSettingTypes["theme"] = "theme";
|
|
4142
4142
|
})(UserSettingTypes || (UserSettingTypes = {}));
|
|
4143
4143
|
|
|
4144
|
-
;// CONCATENATED MODULE: ./src/private/
|
|
4144
|
+
;// CONCATENATED MODULE: ./src/private/conversations.ts
|
|
4145
4145
|
|
|
4146
4146
|
|
|
4147
4147
|
|
|
@@ -4153,8 +4153,8 @@ var UserSettingTypes;
|
|
|
4153
4153
|
*
|
|
4154
4154
|
* @alpha
|
|
4155
4155
|
*/
|
|
4156
|
-
var
|
|
4157
|
-
(function (
|
|
4156
|
+
var conversations;
|
|
4157
|
+
(function (conversations) {
|
|
4158
4158
|
/**
|
|
4159
4159
|
* @hidden
|
|
4160
4160
|
* Hide from docs
|
|
@@ -4196,7 +4196,7 @@ var conversation;
|
|
|
4196
4196
|
resolve(sendPromise);
|
|
4197
4197
|
});
|
|
4198
4198
|
}
|
|
4199
|
-
|
|
4199
|
+
conversations.openConversation = openConversation;
|
|
4200
4200
|
/**
|
|
4201
4201
|
* @hidden
|
|
4202
4202
|
* Hide from docs
|
|
@@ -4209,7 +4209,7 @@ var conversation;
|
|
|
4209
4209
|
removeHandler('startConversation');
|
|
4210
4210
|
removeHandler('closeConversation');
|
|
4211
4211
|
}
|
|
4212
|
-
|
|
4212
|
+
conversations.closeConversation = closeConversation;
|
|
4213
4213
|
/**
|
|
4214
4214
|
* @hidden
|
|
4215
4215
|
* Hide from docs
|
|
@@ -4228,12 +4228,12 @@ var conversation;
|
|
|
4228
4228
|
resolve(sendAndUnwrap('getChatMembers'));
|
|
4229
4229
|
});
|
|
4230
4230
|
}
|
|
4231
|
-
|
|
4231
|
+
conversations.getChatMembers = getChatMembers;
|
|
4232
4232
|
function isSupported() {
|
|
4233
|
-
return runtime.supports.chat.
|
|
4233
|
+
return runtime.supports.chat.conversations ? true : false;
|
|
4234
4234
|
}
|
|
4235
|
-
|
|
4236
|
-
})(
|
|
4235
|
+
conversations.isSupported = isSupported;
|
|
4236
|
+
})(conversations || (conversations = {}));
|
|
4237
4237
|
|
|
4238
4238
|
;// CONCATENATED MODULE: ./src/public/appInstallDialog.ts
|
|
4239
4239
|
|
|
@@ -4262,11 +4262,31 @@ var appInstallDialog;
|
|
|
4262
4262
|
appInstallDialog.isSupported = isSupported;
|
|
4263
4263
|
})(appInstallDialog || (appInstallDialog = {}));
|
|
4264
4264
|
|
|
4265
|
+
;// CONCATENATED MODULE: ./src/internal/chatConstants.ts
|
|
4266
|
+
var teamsDeepLinkUrlPathForChat = '/l/chat/0/0';
|
|
4267
|
+
var teamsDeepLinkUsersUrlParameterName = 'users';
|
|
4268
|
+
var teamsDeepLinkTopicUrlParameterName = 'topic';
|
|
4269
|
+
var teamsDeepLinkMessageUrlParameterName = 'message';
|
|
4270
|
+
|
|
4271
|
+
;// CONCATENATED MODULE: ./src/internal/chatUtilities.ts
|
|
4272
|
+
|
|
4273
|
+
|
|
4274
|
+
function createTeamsDeepLinkForChat(users, topic, message) {
|
|
4275
|
+
if (users.length === 0) {
|
|
4276
|
+
throw new Error('Must have at least one user when creating a chat deep link');
|
|
4277
|
+
}
|
|
4278
|
+
var usersSearchParameter = teamsDeepLinkUsersUrlParameterName + "=" + users.map(function (user) { return encodeURIComponent(user); }).join(',');
|
|
4279
|
+
var topicSearchParameter = topic === undefined ? '' : "&" + teamsDeepLinkTopicUrlParameterName + "=" + encodeURIComponent(topic);
|
|
4280
|
+
var messageSearchParameter = message === undefined ? '' : "&" + teamsDeepLinkMessageUrlParameterName + "=" + encodeURIComponent(message);
|
|
4281
|
+
return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForChat + "?" + usersSearchParameter + topicSearchParameter + messageSearchParameter;
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4265
4284
|
;// CONCATENATED MODULE: ./src/public/chat.ts
|
|
4266
4285
|
|
|
4267
4286
|
|
|
4268
4287
|
|
|
4269
4288
|
|
|
4289
|
+
|
|
4270
4290
|
/**
|
|
4271
4291
|
* Contains functionality to start chat with others
|
|
4272
4292
|
*
|
|
@@ -4285,11 +4305,16 @@ var chat;
|
|
|
4285
4305
|
function openChat(openChatRequest) {
|
|
4286
4306
|
return new Promise(function (resolve) {
|
|
4287
4307
|
ensureInitialized(FrameContexts.content);
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4308
|
+
if (runtime.isLegacyTeams) {
|
|
4309
|
+
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsDeepLinkForChat([openChatRequest.user], undefined /*topic*/, openChatRequest.message)));
|
|
4310
|
+
}
|
|
4311
|
+
else {
|
|
4312
|
+
var sendPromise = sendAndHandleStatusAndReason('chat.openChat', {
|
|
4313
|
+
members: openChatRequest.user,
|
|
4314
|
+
message: openChatRequest.message,
|
|
4315
|
+
});
|
|
4316
|
+
resolve(sendPromise);
|
|
4317
|
+
}
|
|
4293
4318
|
});
|
|
4294
4319
|
}
|
|
4295
4320
|
chat.openChat = openChat;
|
|
@@ -4316,12 +4341,17 @@ var chat;
|
|
|
4316
4341
|
}
|
|
4317
4342
|
else {
|
|
4318
4343
|
ensureInitialized(FrameContexts.content);
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4344
|
+
if (runtime.isLegacyTeams) {
|
|
4345
|
+
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsDeepLinkForChat(openChatRequest.users, openChatRequest.topic, openChatRequest.message)));
|
|
4346
|
+
}
|
|
4347
|
+
else {
|
|
4348
|
+
var sendPromise = sendAndHandleStatusAndReason('chat.openChat', {
|
|
4349
|
+
members: openChatRequest.users,
|
|
4350
|
+
message: openChatRequest.message,
|
|
4351
|
+
topic: openChatRequest.topic,
|
|
4352
|
+
});
|
|
4353
|
+
resolve(sendPromise);
|
|
4354
|
+
}
|
|
4325
4355
|
}
|
|
4326
4356
|
});
|
|
4327
4357
|
}
|
|
@@ -4412,7 +4442,7 @@ var dialog;
|
|
|
4412
4442
|
* @param listener - The listener that will be triggered.
|
|
4413
4443
|
*/
|
|
4414
4444
|
function registerOnMessageFromParent(listener) {
|
|
4415
|
-
ensureInitialized();
|
|
4445
|
+
ensureInitialized(FrameContexts.task);
|
|
4416
4446
|
registerHandler('messageForChild', listener);
|
|
4417
4447
|
}
|
|
4418
4448
|
dialog.registerOnMessageFromParent = registerOnMessageFromParent;
|
|
@@ -4521,6 +4551,7 @@ var ChildAppWindow = /** @class */ (function () {
|
|
|
4521
4551
|
* @param listener - The listener that will be called
|
|
4522
4552
|
*/
|
|
4523
4553
|
ChildAppWindow.prototype.addEventListener = function (type, listener) {
|
|
4554
|
+
ensureInitialized();
|
|
4524
4555
|
if (type === 'message') {
|
|
4525
4556
|
registerHandler('messageForParent', listener);
|
|
4526
4557
|
}
|
|
@@ -4556,6 +4587,7 @@ var ParentAppWindow = /** @class */ (function () {
|
|
|
4556
4587
|
* @param listener - The listener that will be called
|
|
4557
4588
|
*/
|
|
4558
4589
|
ParentAppWindow.prototype.addEventListener = function (type, listener) {
|
|
4590
|
+
ensureInitialized(FrameContexts.task);
|
|
4559
4591
|
if (type === 'message') {
|
|
4560
4592
|
registerHandler('messageForChild', listener);
|
|
4561
4593
|
}
|