@microsoft/teams-js 2.17.0-beta.2 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -4
- package/dist/MicrosoftTeams.d.ts +14 -4
- package/dist/MicrosoftTeams.js +100 -58
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +35 -1
package/README.md
CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
|
|
24
24
|
|
25
25
|
### Production
|
26
26
|
|
27
|
-
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.
|
27
|
+
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js) or point your package manager at them.
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
|
|
45
45
|
```html
|
46
46
|
<!-- Microsoft Teams JavaScript API (via CDN) -->
|
47
47
|
<script
|
48
|
-
src="https://res.cdn.office.net/teams-js/2.
|
49
|
-
integrity="sha384-
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.17.0/js/MicrosoftTeams.min.js"
|
49
|
+
integrity="sha384-xp55t/129OsN192JZYLP0rGhzjCF9aYtjY0LVtXvolkDrBe4Jchylp56NrUYJ4S2"
|
50
50
|
crossorigin="anonymous"
|
51
51
|
></script>
|
52
52
|
|
53
53
|
<!-- Microsoft Teams JavaScript API (via npm) -->
|
54
|
-
<script src="node_modules/@microsoft/teams-js@2.
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.17.0/dist/MicrosoftTeams.min.js"></script>
|
55
55
|
|
56
56
|
<!-- Microsoft Teams JavaScript API (via local) -->
|
57
57
|
<script src="MicrosoftTeams.min.js"></script>
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -6050,14 +6050,18 @@ export namespace media {
|
|
6050
6050
|
}
|
6051
6051
|
|
6052
6052
|
/**
|
6053
|
-
* Namespace to power up the in-app browser experiences in the
|
6054
|
-
* For e.g., opening a URL in the
|
6053
|
+
* Namespace to power up the in-app browser experiences in the host app.
|
6054
|
+
* For e.g., opening a URL in the host app inside a browser
|
6055
6055
|
*
|
6056
6056
|
* @beta
|
6057
6057
|
*/
|
6058
6058
|
export namespace secondaryBrowser {
|
6059
6059
|
/**
|
6060
|
-
* Open a URL in the secondary browser
|
6060
|
+
* Open a URL in the secondary browser.
|
6061
|
+
*
|
6062
|
+
* On mobile, this is the in-app browser.
|
6063
|
+
*
|
6064
|
+
* On web and desktop, please use the `window.open()` method or other native external browser methods.
|
6061
6065
|
*
|
6062
6066
|
* @param url Url to open in the browser
|
6063
6067
|
* @returns Promise that successfully resolves if the URL opens in the secondaryBrowser
|
@@ -8512,7 +8516,13 @@ export namespace settings {
|
|
8512
8516
|
* The tasks namespace will be deprecated. Please use dialog for future developments.
|
8513
8517
|
*/
|
8514
8518
|
export namespace tasks {
|
8515
|
-
/**
|
8519
|
+
/**
|
8520
|
+
* Function type that is used to receive the result when a task module is submitted by
|
8521
|
+
* calling {@link tasks.submitTask tasks.submitTask(result?: string | object, appIds?: string | string[]): void}
|
8522
|
+
*
|
8523
|
+
* @param err - If the task module failed, this string contains the reason for failure. If the task module succeeded, this value is the empty string.
|
8524
|
+
* @param result - On success, this is the value passed to the `result` parameter of {@link tasks.submitTask tasks.submitTask(result?: string | object, appIds?: string | string[]): void}. On failure, this is the empty string.
|
8525
|
+
*/
|
8516
8526
|
type startTaskSubmitHandlerFunctionType = (err: string, result: string | object) => void;
|
8517
8527
|
/**
|
8518
8528
|
* @deprecated
|
package/dist/MicrosoftTeams.js
CHANGED
@@ -1956,6 +1956,15 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
1956
1956
|
}
|
1957
1957
|
return t;
|
1958
1958
|
};
|
1959
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
1960
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
1961
|
+
if (ar || !(i in from)) {
|
1962
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
1963
|
+
ar[i] = from[i];
|
1964
|
+
}
|
1965
|
+
}
|
1966
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
1967
|
+
};
|
1959
1968
|
|
1960
1969
|
|
1961
1970
|
|
@@ -1999,9 +2008,7 @@ var versionAndPlatformAgnosticTeamsRuntimeConfig = {
|
|
1999
2008
|
isLegacyTeams: true,
|
2000
2009
|
supports: {
|
2001
2010
|
app: {
|
2002
|
-
lifecycle: {
|
2003
|
-
caching: {},
|
2004
|
-
},
|
2011
|
+
lifecycle: {},
|
2005
2012
|
},
|
2006
2013
|
appInstallDialog: {},
|
2007
2014
|
appEntity: {},
|
@@ -2024,14 +2031,11 @@ var versionAndPlatformAgnosticTeamsRuntimeConfig = {
|
|
2024
2031
|
monetization: {},
|
2025
2032
|
notifications: {},
|
2026
2033
|
pages: {
|
2027
|
-
appButton: {},
|
2028
|
-
tabs: {},
|
2029
2034
|
config: {},
|
2030
2035
|
backStack: {},
|
2031
2036
|
fullTrust: {},
|
2032
2037
|
},
|
2033
2038
|
remoteCamera: {},
|
2034
|
-
stageView: {},
|
2035
2039
|
teams: {
|
2036
2040
|
fullTrust: {},
|
2037
2041
|
},
|
@@ -2041,11 +2045,9 @@ var versionAndPlatformAgnosticTeamsRuntimeConfig = {
|
|
2041
2045
|
},
|
2042
2046
|
},
|
2043
2047
|
};
|
2044
|
-
var
|
2048
|
+
var v1NonMobileHostClientTypes = [
|
2045
2049
|
HostClientType.desktop,
|
2046
2050
|
HostClientType.web,
|
2047
|
-
HostClientType.android,
|
2048
|
-
HostClientType.ios,
|
2049
2051
|
HostClientType.rigel,
|
2050
2052
|
HostClientType.surfaceHub,
|
2051
2053
|
HostClientType.teamsRoomsWindows,
|
@@ -2053,6 +2055,8 @@ var v1HostClientTypes = [
|
|
2053
2055
|
HostClientType.teamsPhones,
|
2054
2056
|
HostClientType.teamsDisplays,
|
2055
2057
|
];
|
2058
|
+
var v1MobileHostClientTypes = [HostClientType.android, HostClientType.ios, HostClientType.ipados];
|
2059
|
+
var v1HostClientTypes = __spreadArray(__spreadArray([], v1NonMobileHostClientTypes, true), v1MobileHostClientTypes, true);
|
2056
2060
|
/**
|
2057
2061
|
* @hidden
|
2058
2062
|
* Uses upgradeChain to transform an outdated runtime object to the latest format.
|
@@ -2116,6 +2120,15 @@ var upgradeChain = [
|
|
2116
2120
|
},
|
2117
2121
|
];
|
2118
2122
|
var mapTeamsVersionToSupportedCapabilities = {
|
2123
|
+
// 1.0.0 just signifies "these capabilities have practically always been supported." For some of these
|
2124
|
+
// we don't know what the real first version that supported them was -- but it was long enough ago that
|
2125
|
+
// we can just effectively consider them always supported (on the specified platforms)
|
2126
|
+
'1.0.0': [
|
2127
|
+
{
|
2128
|
+
capability: { pages: { appButton: {}, tabs: {} }, stageView: {} },
|
2129
|
+
hostClientTypes: v1NonMobileHostClientTypes,
|
2130
|
+
},
|
2131
|
+
],
|
2119
2132
|
'1.9.0': [
|
2120
2133
|
{
|
2121
2134
|
capability: { location: {} },
|
@@ -2269,7 +2282,7 @@ var _minRuntimeConfigToUninitialize = {
|
|
2269
2282
|
* @hidden
|
2270
2283
|
* Package version.
|
2271
2284
|
*/
|
2272
|
-
var version = "2.17.0
|
2285
|
+
var version = "2.17.0";
|
2273
2286
|
|
2274
2287
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2275
2288
|
|
@@ -2406,6 +2419,11 @@ function processAdditionalValidOrigins(validMessageOrigins) {
|
|
2406
2419
|
GlobalVars.additionalValidOrigins = combinedOriginUrls;
|
2407
2420
|
}
|
2408
2421
|
|
2422
|
+
;// CONCATENATED MODULE: ./src/internal/typeCheckUtilities.ts
|
2423
|
+
function isNullOrUndefined(value) {
|
2424
|
+
return value === null || value === undefined;
|
2425
|
+
}
|
2426
|
+
|
2409
2427
|
;// CONCATENATED MODULE: ./src/public/authentication.ts
|
2410
2428
|
|
2411
2429
|
|
@@ -3521,6 +3539,24 @@ var app;
|
|
3521
3539
|
* Number of milliseconds we'll give the initialization call to return before timing it out
|
3522
3540
|
*/
|
3523
3541
|
var initializationTimeoutInMs = 5000;
|
3542
|
+
function logWhereTeamsJsIsBeingUsed() {
|
3543
|
+
if (inServerSideRenderingEnvironment()) {
|
3544
|
+
return;
|
3545
|
+
}
|
3546
|
+
var scripts = document.getElementsByTagName('script');
|
3547
|
+
// This will always be the current script because browsers load and execute scripts in order.
|
3548
|
+
// Whenever a script is executing for the first time it will be the last script in this array.
|
3549
|
+
var currentScriptSrc = scripts && scripts[scripts.length - 1] && scripts[scripts.length - 1].src;
|
3550
|
+
var scriptUsageWarning = 'Today, teamsjs can only be used from a single script or you may see undefined behavior. This log line is used to help detect cases where teamsjs is loaded multiple times -- it is always written. The presence of the log itself does not indicate a multi-load situation, but multiples of these log lines will. If you would like to use teamjs from more than one script at the same time, please open an issue at https://github.com/OfficeDev/microsoft-teams-library-js/issues';
|
3551
|
+
if (!currentScriptSrc || currentScriptSrc.length === 0) {
|
3552
|
+
appLogger('teamsjs is being used from a script tag embedded directly in your html. %s', scriptUsageWarning);
|
3553
|
+
}
|
3554
|
+
else {
|
3555
|
+
appLogger('teamsjs is being used from %s. %s', currentScriptSrc, scriptUsageWarning);
|
3556
|
+
}
|
3557
|
+
}
|
3558
|
+
// This is called right away to make sure that we capture which script is being executed correctly
|
3559
|
+
logWhereTeamsJsIsBeingUsed();
|
3524
3560
|
/**
|
3525
3561
|
* Initializes the library.
|
3526
3562
|
*
|
@@ -3906,6 +3942,7 @@ function transformLegacyContextToAppContext(legacyContext) {
|
|
3906
3942
|
|
3907
3943
|
|
3908
3944
|
|
3945
|
+
|
3909
3946
|
/**
|
3910
3947
|
* Navigation-specific part of the SDK.
|
3911
3948
|
*/
|
@@ -4059,7 +4096,7 @@ var pages;
|
|
4059
4096
|
*/
|
4060
4097
|
function registerFullScreenHandler(handler) {
|
4061
4098
|
registerHandlerHelper('fullScreenChange', handler, [], function () {
|
4062
|
-
if (handler && !isSupported()) {
|
4099
|
+
if (!isNullOrUndefined(handler) && !isSupported()) {
|
4063
4100
|
throw errorNotSupportedOnPlatform;
|
4064
4101
|
}
|
4065
4102
|
});
|
@@ -4204,7 +4241,7 @@ var pages;
|
|
4204
4241
|
*/
|
4205
4242
|
function registerOnSaveHandler(handler) {
|
4206
4243
|
registerOnSaveHandlerHelper(handler, function () {
|
4207
|
-
if (handler && !isSupported()) {
|
4244
|
+
if (!isNullOrUndefined(handler) && !isSupported()) {
|
4208
4245
|
throw errorNotSupportedOnPlatform;
|
4209
4246
|
}
|
4210
4247
|
});
|
@@ -4222,12 +4259,12 @@ var pages;
|
|
4222
4259
|
*/
|
4223
4260
|
function registerOnSaveHandlerHelper(handler, versionSpecificHelper) {
|
4224
4261
|
// allow for registration cleanup even when not finished initializing
|
4225
|
-
handler && ensureInitialized(runtime, FrameContexts.settings);
|
4262
|
+
!isNullOrUndefined(handler) && ensureInitialized(runtime, FrameContexts.settings);
|
4226
4263
|
if (versionSpecificHelper) {
|
4227
4264
|
versionSpecificHelper();
|
4228
4265
|
}
|
4229
4266
|
saveHandler = handler;
|
4230
|
-
handler && sendMessageToParent('registerHandler', ['save']);
|
4267
|
+
!isNullOrUndefined(handler) && sendMessageToParent('registerHandler', ['save']);
|
4231
4268
|
}
|
4232
4269
|
config.registerOnSaveHandlerHelper = registerOnSaveHandlerHelper;
|
4233
4270
|
/**
|
@@ -4239,7 +4276,7 @@ var pages;
|
|
4239
4276
|
*/
|
4240
4277
|
function registerOnRemoveHandler(handler) {
|
4241
4278
|
registerOnRemoveHandlerHelper(handler, function () {
|
4242
|
-
if (handler && !isSupported()) {
|
4279
|
+
if (!isNullOrUndefined(handler) && !isSupported()) {
|
4243
4280
|
throw errorNotSupportedOnPlatform;
|
4244
4281
|
}
|
4245
4282
|
});
|
@@ -4257,12 +4294,12 @@ var pages;
|
|
4257
4294
|
*/
|
4258
4295
|
function registerOnRemoveHandlerHelper(handler, versionSpecificHelper) {
|
4259
4296
|
// allow for registration cleanup even when not finished initializing
|
4260
|
-
handler && ensureInitialized(runtime, FrameContexts.remove, FrameContexts.settings);
|
4297
|
+
!isNullOrUndefined(handler) && ensureInitialized(runtime, FrameContexts.remove, FrameContexts.settings);
|
4261
4298
|
if (versionSpecificHelper) {
|
4262
4299
|
versionSpecificHelper();
|
4263
4300
|
}
|
4264
4301
|
removeHandler = handler;
|
4265
|
-
handler && sendMessageToParent('registerHandler', ['remove']);
|
4302
|
+
!isNullOrUndefined(handler) && sendMessageToParent('registerHandler', ['remove']);
|
4266
4303
|
}
|
4267
4304
|
config.registerOnRemoveHandlerHelper = registerOnRemoveHandlerHelper;
|
4268
4305
|
function handleSave(result) {
|
@@ -4410,7 +4447,7 @@ var pages;
|
|
4410
4447
|
*/
|
4411
4448
|
function registerBackButtonHandler(handler) {
|
4412
4449
|
registerBackButtonHandlerHelper(handler, function () {
|
4413
|
-
if (handler && !isSupported()) {
|
4450
|
+
if (!isNullOrUndefined(handler) && !isSupported()) {
|
4414
4451
|
throw errorNotSupportedOnPlatform;
|
4415
4452
|
}
|
4416
4453
|
});
|
@@ -4428,12 +4465,12 @@ var pages;
|
|
4428
4465
|
*/
|
4429
4466
|
function registerBackButtonHandlerHelper(handler, versionSpecificHelper) {
|
4430
4467
|
// allow for registration cleanup even when not finished initializing
|
4431
|
-
handler && ensureInitialized(runtime);
|
4468
|
+
!isNullOrUndefined(handler) && ensureInitialized(runtime);
|
4432
4469
|
if (versionSpecificHelper) {
|
4433
4470
|
versionSpecificHelper();
|
4434
4471
|
}
|
4435
4472
|
backButtonPressHandler = handler;
|
4436
|
-
handler && sendMessageToParent('registerHandler', ['backButton']);
|
4473
|
+
!isNullOrUndefined(handler) && sendMessageToParent('registerHandler', ['backButton']);
|
4437
4474
|
}
|
4438
4475
|
backStack.registerBackButtonHandlerHelper = registerBackButtonHandlerHelper;
|
4439
4476
|
function handleBackButtonPress() {
|
@@ -4635,7 +4672,7 @@ var pages;
|
|
4635
4672
|
|
4636
4673
|
;// CONCATENATED MODULE: ./src/internal/handlers.ts
|
4637
4674
|
/* eslint-disable @typescript-eslint/ban-types */
|
4638
|
-
var
|
4675
|
+
var handlers_spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
4639
4676
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
4640
4677
|
if (ar || !(i in from)) {
|
4641
4678
|
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
@@ -4729,7 +4766,7 @@ function registerHandler(name, handler, sendMessage, args) {
|
|
4729
4766
|
if (args === void 0) { args = []; }
|
4730
4767
|
if (handler) {
|
4731
4768
|
HandlersPrivate.handlers[name] = handler;
|
4732
|
-
sendMessage && sendMessageToParent('registerHandler',
|
4769
|
+
sendMessage && sendMessageToParent('registerHandler', handlers_spreadArray([name], args, true));
|
4733
4770
|
}
|
4734
4771
|
else {
|
4735
4772
|
delete HandlersPrivate.handlers[name];
|
@@ -4763,7 +4800,7 @@ function doesHandlerExist(name) {
|
|
4763
4800
|
*/
|
4764
4801
|
function registerHandlerHelper(name, handler, contexts, registrationHelper) {
|
4765
4802
|
// allow for registration cleanup even when not finished initializing
|
4766
|
-
handler && ensureInitialized.apply(void 0,
|
4803
|
+
handler && ensureInitialized.apply(void 0, handlers_spreadArray([runtime], contexts, false));
|
4767
4804
|
if (registrationHelper) {
|
4768
4805
|
registrationHelper();
|
4769
4806
|
}
|
@@ -7170,15 +7207,19 @@ var ParentAppWindow = /** @class */ (function () {
|
|
7170
7207
|
|
7171
7208
|
|
7172
7209
|
/**
|
7173
|
-
* Namespace to power up the in-app browser experiences in the
|
7174
|
-
* For e.g., opening a URL in the
|
7210
|
+
* Namespace to power up the in-app browser experiences in the host app.
|
7211
|
+
* For e.g., opening a URL in the host app inside a browser
|
7175
7212
|
*
|
7176
7213
|
* @beta
|
7177
7214
|
*/
|
7178
7215
|
var secondaryBrowser;
|
7179
7216
|
(function (secondaryBrowser) {
|
7180
7217
|
/**
|
7181
|
-
* Open a URL in the secondary browser
|
7218
|
+
* Open a URL in the secondary browser.
|
7219
|
+
*
|
7220
|
+
* On mobile, this is the in-app browser.
|
7221
|
+
*
|
7222
|
+
* On web and desktop, please use the `window.open()` method or other native external browser methods.
|
7182
7223
|
*
|
7183
7224
|
* @param url Url to open in the browser
|
7184
7225
|
* @returns Promise that successfully resolves if the URL opens in the secondaryBrowser
|
@@ -7960,7 +8001,6 @@ var monetization;
|
|
7960
8001
|
*/
|
7961
8002
|
function openPurchaseExperience(param1, param2) {
|
7962
8003
|
var callback;
|
7963
|
-
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
7964
8004
|
var planInfo;
|
7965
8005
|
if (typeof param1 === 'function') {
|
7966
8006
|
callback = param1;
|
@@ -7974,6 +8014,7 @@ var monetization;
|
|
7974
8014
|
if (!isSupported()) {
|
7975
8015
|
throw errorNotSupportedOnPlatform;
|
7976
8016
|
}
|
8017
|
+
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
7977
8018
|
resolve(sendAndHandleSdkError('monetization.openPurchaseExperience', planInfo));
|
7978
8019
|
});
|
7979
8020
|
};
|
@@ -8131,6 +8172,7 @@ var mail;
|
|
8131
8172
|
|
8132
8173
|
|
8133
8174
|
|
8175
|
+
|
8134
8176
|
/**
|
8135
8177
|
* Namespace containing the set of APIs that support Teams-specific functionalities.
|
8136
8178
|
*/
|
@@ -8177,7 +8219,7 @@ var teamsCore;
|
|
8177
8219
|
*/
|
8178
8220
|
function registerOnLoadHandler(handler) {
|
8179
8221
|
registerOnLoadHandlerHelper(handler, function () {
|
8180
|
-
if (handler && !isSupported()) {
|
8222
|
+
if (!isNullOrUndefined(handler) && !isSupported()) {
|
8181
8223
|
throw errorNotSupportedOnPlatform;
|
8182
8224
|
}
|
8183
8225
|
});
|
@@ -8197,8 +8239,8 @@ var teamsCore;
|
|
8197
8239
|
*/
|
8198
8240
|
function registerOnLoadHandlerHelper(handler, versionSpecificHelper) {
|
8199
8241
|
// allow for registration cleanup even when not finished initializing
|
8200
|
-
handler && ensureInitialized(runtime);
|
8201
|
-
if (handler && versionSpecificHelper) {
|
8242
|
+
!isNullOrUndefined(handler) && ensureInitialized(runtime);
|
8243
|
+
if (!isNullOrUndefined(handler) && versionSpecificHelper) {
|
8202
8244
|
versionSpecificHelper();
|
8203
8245
|
}
|
8204
8246
|
handlers_registerOnLoadHandler(handler);
|
@@ -8217,7 +8259,7 @@ var teamsCore;
|
|
8217
8259
|
*/
|
8218
8260
|
function registerBeforeUnloadHandler(handler) {
|
8219
8261
|
registerBeforeUnloadHandlerHelper(handler, function () {
|
8220
|
-
if (handler && !isSupported()) {
|
8262
|
+
if (!isNullOrUndefined(handler) && !isSupported()) {
|
8221
8263
|
throw errorNotSupportedOnPlatform;
|
8222
8264
|
}
|
8223
8265
|
});
|
@@ -8238,8 +8280,8 @@ var teamsCore;
|
|
8238
8280
|
*/
|
8239
8281
|
function registerBeforeUnloadHandlerHelper(handler, versionSpecificHelper) {
|
8240
8282
|
// allow for registration cleanup even when not finished initializing
|
8241
|
-
handler && ensureInitialized(runtime);
|
8242
|
-
if (handler && versionSpecificHelper) {
|
8283
|
+
!isNullOrUndefined(handler) && ensureInitialized(runtime);
|
8284
|
+
if (!isNullOrUndefined(handler) && versionSpecificHelper) {
|
8243
8285
|
versionSpecificHelper();
|
8244
8286
|
}
|
8245
8287
|
handlers_registerBeforeUnloadHandler(handler);
|
@@ -8282,17 +8324,15 @@ var people;
|
|
8282
8324
|
function selectPeople(param1, param2) {
|
8283
8325
|
var _a;
|
8284
8326
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.task, FrameContexts.settings);
|
8285
|
-
|
8286
|
-
var
|
8287
|
-
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
8288
|
-
var peoplePickerInputs;
|
8327
|
+
var callback = undefined;
|
8328
|
+
var peoplePickerInputs = undefined;
|
8289
8329
|
if (typeof param1 === 'function') {
|
8290
8330
|
_a = [param1, param2], callback = _a[0], peoplePickerInputs = _a[1];
|
8291
8331
|
}
|
8292
8332
|
else {
|
8293
8333
|
peoplePickerInputs = param1;
|
8294
8334
|
}
|
8295
|
-
return callCallbackWithErrorOrResultFromPromiseAndReturnPromise(selectPeopleHelper, callback
|
8335
|
+
return callCallbackWithErrorOrResultFromPromiseAndReturnPromise(selectPeopleHelper, callback /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */, peoplePickerInputs);
|
8296
8336
|
}
|
8297
8337
|
people_1.selectPeople = selectPeople;
|
8298
8338
|
function selectPeopleHelper(peoplePickerInputs) {
|
@@ -8300,7 +8340,6 @@ var people;
|
|
8300
8340
|
if (!isCurrentSDKVersionAtLeast(peoplePickerRequiredVersion)) {
|
8301
8341
|
throw { errorCode: ErrorCode.OLD_PLATFORM };
|
8302
8342
|
}
|
8303
|
-
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
8304
8343
|
if (!validatePeoplePickerInput(peoplePickerInputs)) {
|
8305
8344
|
throw { errorCode: ErrorCode.INVALID_ARGUMENTS };
|
8306
8345
|
}
|
@@ -10448,14 +10487,14 @@ function shareDeepLink(deepLinkParameters) {
|
|
10448
10487
|
*/
|
10449
10488
|
function executeDeepLink(deepLink, onComplete) {
|
10450
10489
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.settings, FrameContexts.task, FrameContexts.stage, FrameContexts.meetingStage);
|
10451
|
-
|
10490
|
+
var completionHandler = onComplete !== null && onComplete !== void 0 ? onComplete : getGenericOnCompleteHandler();
|
10452
10491
|
app
|
10453
10492
|
.openLink(deepLink)
|
10454
10493
|
.then(function () {
|
10455
|
-
|
10494
|
+
completionHandler(true);
|
10456
10495
|
})
|
10457
10496
|
.catch(function (err) {
|
10458
|
-
|
10497
|
+
completionHandler(false, err.message);
|
10459
10498
|
});
|
10460
10499
|
}
|
10461
10500
|
/**
|
@@ -10512,14 +10551,14 @@ function returnFocus(navigateForward) {
|
|
10512
10551
|
*/
|
10513
10552
|
function navigateToTab(tabInstance, onComplete) {
|
10514
10553
|
ensureInitialized(runtime);
|
10515
|
-
|
10554
|
+
var completionHandler = onComplete !== null && onComplete !== void 0 ? onComplete : getGenericOnCompleteHandler();
|
10516
10555
|
pages.tabs
|
10517
10556
|
.navigateToTab(tabInstance)
|
10518
10557
|
.then(function () {
|
10519
|
-
|
10558
|
+
completionHandler(true);
|
10520
10559
|
})
|
10521
10560
|
.catch(function (error) {
|
10522
|
-
|
10561
|
+
completionHandler(false, error.message);
|
10523
10562
|
});
|
10524
10563
|
}
|
10525
10564
|
/**
|
@@ -10537,14 +10576,14 @@ function navigateToTab(tabInstance, onComplete) {
|
|
10537
10576
|
*/
|
10538
10577
|
function navigateCrossDomain(url, onComplete) {
|
10539
10578
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.settings, FrameContexts.remove, FrameContexts.task, FrameContexts.stage, FrameContexts.meetingStage);
|
10540
|
-
|
10579
|
+
var completionHandler = onComplete !== null && onComplete !== void 0 ? onComplete : getGenericOnCompleteHandler();
|
10541
10580
|
pages
|
10542
10581
|
.navigateCrossDomain(url)
|
10543
10582
|
.then(function () {
|
10544
|
-
|
10583
|
+
completionHandler(true);
|
10545
10584
|
})
|
10546
10585
|
.catch(function (error) {
|
10547
|
-
|
10586
|
+
completionHandler(false, error.message);
|
10548
10587
|
});
|
10549
10588
|
}
|
10550
10589
|
/**
|
@@ -10558,14 +10597,14 @@ function navigateCrossDomain(url, onComplete) {
|
|
10558
10597
|
*/
|
10559
10598
|
function navigateBack(onComplete) {
|
10560
10599
|
ensureInitialized(runtime);
|
10561
|
-
|
10600
|
+
var completionHandler = onComplete !== null && onComplete !== void 0 ? onComplete : getGenericOnCompleteHandler();
|
10562
10601
|
pages.backStack
|
10563
10602
|
.navigateBack()
|
10564
10603
|
.then(function () {
|
10565
|
-
|
10604
|
+
completionHandler(true);
|
10566
10605
|
})
|
10567
10606
|
.catch(function (error) {
|
10568
|
-
|
10607
|
+
completionHandler(false, error.message);
|
10569
10608
|
});
|
10570
10609
|
}
|
10571
10610
|
|
@@ -10623,14 +10662,14 @@ var settings;
|
|
10623
10662
|
*/
|
10624
10663
|
function setSettings(instanceSettings, onComplete) {
|
10625
10664
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.sidePanel);
|
10626
|
-
|
10665
|
+
var completionHandler = onComplete !== null && onComplete !== void 0 ? onComplete : getGenericOnCompleteHandler();
|
10627
10666
|
pages.config
|
10628
10667
|
.setConfig(instanceSettings)
|
10629
10668
|
.then(function () {
|
10630
|
-
|
10669
|
+
completionHandler(true);
|
10631
10670
|
})
|
10632
10671
|
.catch(function (error) {
|
10633
|
-
|
10672
|
+
completionHandler(false, error.message);
|
10634
10673
|
});
|
10635
10674
|
}
|
10636
10675
|
settings.setSettings = setSettings;
|
@@ -10712,8 +10751,7 @@ var tasks;
|
|
10712
10751
|
*/
|
10713
10752
|
function startTask(taskInfo, submitHandler) {
|
10714
10753
|
var dialogSubmitHandler = submitHandler
|
10715
|
-
?
|
10716
|
-
function (sdkResponse) { return submitHandler(sdkResponse.err, sdkResponse.result); }
|
10754
|
+
? function (sdkResponse) { var _a, _b; return submitHandler((_a = sdkResponse.err) !== null && _a !== void 0 ? _a : '', (_b = sdkResponse.result) !== null && _b !== void 0 ? _b : ''); }
|
10717
10755
|
: undefined;
|
10718
10756
|
if (taskInfo.card === undefined && taskInfo.url === undefined) {
|
10719
10757
|
ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
@@ -10769,7 +10807,9 @@ var tasks;
|
|
10769
10807
|
* @returns - Converted UrlDialogInfo object
|
10770
10808
|
*/
|
10771
10809
|
function getUrlDialogInfoFromTaskInfo(taskInfo) {
|
10772
|
-
|
10810
|
+
if (taskInfo.url === undefined) {
|
10811
|
+
throw new Error("url property of taskInfo object can't be undefined");
|
10812
|
+
}
|
10773
10813
|
var urldialogInfo = {
|
10774
10814
|
url: taskInfo.url,
|
10775
10815
|
size: {
|
@@ -10787,7 +10827,9 @@ var tasks;
|
|
10787
10827
|
* @returns - converted BotUrlDialogInfo object
|
10788
10828
|
*/
|
10789
10829
|
function getBotUrlDialogInfoFromTaskInfo(taskInfo) {
|
10790
|
-
|
10830
|
+
if (taskInfo.url === undefined || taskInfo.completionBotId === undefined) {
|
10831
|
+
throw new Error("Both url ".concat(taskInfo.url, " and completionBotId ").concat(taskInfo.completionBotId, " are required for bot url dialog. At least one is undefined."));
|
10832
|
+
}
|
10791
10833
|
var botUrldialogInfo = {
|
10792
10834
|
url: taskInfo.url,
|
10793
10835
|
size: {
|