@microsoft/teams-js 2.4.0-beta.0 → 2.4.0-beta.1

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.
@@ -178,247 +178,6 @@ function plural(ms, msAbs, n, name) {
178
178
  }
179
179
 
180
180
 
181
- /***/ }),
182
-
183
- /***/ 22:
184
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
185
-
186
- var v1 = __webpack_require__(481);
187
- var v4 = __webpack_require__(426);
188
-
189
- var uuid = v4;
190
- uuid.v1 = v1;
191
- uuid.v4 = v4;
192
-
193
- module.exports = uuid;
194
-
195
-
196
- /***/ }),
197
-
198
- /***/ 725:
199
- /***/ ((module) => {
200
-
201
- /**
202
- * Convert array of 16 byte values to UUID string format of the form:
203
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
204
- */
205
- var byteToHex = [];
206
- for (var i = 0; i < 256; ++i) {
207
- byteToHex[i] = (i + 0x100).toString(16).substr(1);
208
- }
209
-
210
- function bytesToUuid(buf, offset) {
211
- var i = offset || 0;
212
- var bth = byteToHex;
213
- // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
214
- return ([
215
- bth[buf[i++]], bth[buf[i++]],
216
- bth[buf[i++]], bth[buf[i++]], '-',
217
- bth[buf[i++]], bth[buf[i++]], '-',
218
- bth[buf[i++]], bth[buf[i++]], '-',
219
- bth[buf[i++]], bth[buf[i++]], '-',
220
- bth[buf[i++]], bth[buf[i++]],
221
- bth[buf[i++]], bth[buf[i++]],
222
- bth[buf[i++]], bth[buf[i++]]
223
- ]).join('');
224
- }
225
-
226
- module.exports = bytesToUuid;
227
-
228
-
229
- /***/ }),
230
-
231
- /***/ 157:
232
- /***/ ((module) => {
233
-
234
- // Unique ID creation requires a high quality random # generator. In the
235
- // browser this is a little complicated due to unknown quality of Math.random()
236
- // and inconsistent support for the `crypto` API. We do the best we can via
237
- // feature-detection
238
-
239
- // getRandomValues needs to be invoked in a context where "this" is a Crypto
240
- // implementation. Also, find the complete implementation of crypto on IE11.
241
- var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
242
- (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
243
-
244
- if (getRandomValues) {
245
- // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
246
- var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
247
-
248
- module.exports = function whatwgRNG() {
249
- getRandomValues(rnds8);
250
- return rnds8;
251
- };
252
- } else {
253
- // Math.random()-based (RNG)
254
- //
255
- // If all else fails, use Math.random(). It's fast, but is of unspecified
256
- // quality.
257
- var rnds = new Array(16);
258
-
259
- module.exports = function mathRNG() {
260
- for (var i = 0, r; i < 16; i++) {
261
- if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
262
- rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
263
- }
264
-
265
- return rnds;
266
- };
267
- }
268
-
269
-
270
- /***/ }),
271
-
272
- /***/ 481:
273
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
274
-
275
- var rng = __webpack_require__(157);
276
- var bytesToUuid = __webpack_require__(725);
277
-
278
- // **`v1()` - Generate time-based UUID**
279
- //
280
- // Inspired by https://github.com/LiosK/UUID.js
281
- // and http://docs.python.org/library/uuid.html
282
-
283
- var _nodeId;
284
- var _clockseq;
285
-
286
- // Previous uuid creation time
287
- var _lastMSecs = 0;
288
- var _lastNSecs = 0;
289
-
290
- // See https://github.com/uuidjs/uuid for API details
291
- function v1(options, buf, offset) {
292
- var i = buf && offset || 0;
293
- var b = buf || [];
294
-
295
- options = options || {};
296
- var node = options.node || _nodeId;
297
- var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
298
-
299
- // node and clockseq need to be initialized to random values if they're not
300
- // specified. We do this lazily to minimize issues related to insufficient
301
- // system entropy. See #189
302
- if (node == null || clockseq == null) {
303
- var seedBytes = rng();
304
- if (node == null) {
305
- // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
306
- node = _nodeId = [
307
- seedBytes[0] | 0x01,
308
- seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
309
- ];
310
- }
311
- if (clockseq == null) {
312
- // Per 4.2.2, randomize (14 bit) clockseq
313
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
314
- }
315
- }
316
-
317
- // UUID timestamps are 100 nano-second units since the Gregorian epoch,
318
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
319
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
320
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
321
- var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
322
-
323
- // Per 4.2.1.2, use count of uuid's generated during the current clock
324
- // cycle to simulate higher resolution clock
325
- var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
326
-
327
- // Time since last uuid creation (in msecs)
328
- var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
329
-
330
- // Per 4.2.1.2, Bump clockseq on clock regression
331
- if (dt < 0 && options.clockseq === undefined) {
332
- clockseq = clockseq + 1 & 0x3fff;
333
- }
334
-
335
- // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
336
- // time interval
337
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
338
- nsecs = 0;
339
- }
340
-
341
- // Per 4.2.1.2 Throw error if too many uuids are requested
342
- if (nsecs >= 10000) {
343
- throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
344
- }
345
-
346
- _lastMSecs = msecs;
347
- _lastNSecs = nsecs;
348
- _clockseq = clockseq;
349
-
350
- // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
351
- msecs += 12219292800000;
352
-
353
- // `time_low`
354
- var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
355
- b[i++] = tl >>> 24 & 0xff;
356
- b[i++] = tl >>> 16 & 0xff;
357
- b[i++] = tl >>> 8 & 0xff;
358
- b[i++] = tl & 0xff;
359
-
360
- // `time_mid`
361
- var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
362
- b[i++] = tmh >>> 8 & 0xff;
363
- b[i++] = tmh & 0xff;
364
-
365
- // `time_high_and_version`
366
- b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
367
- b[i++] = tmh >>> 16 & 0xff;
368
-
369
- // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
370
- b[i++] = clockseq >>> 8 | 0x80;
371
-
372
- // `clock_seq_low`
373
- b[i++] = clockseq & 0xff;
374
-
375
- // `node`
376
- for (var n = 0; n < 6; ++n) {
377
- b[i + n] = node[n];
378
- }
379
-
380
- return buf ? buf : bytesToUuid(b);
381
- }
382
-
383
- module.exports = v1;
384
-
385
-
386
- /***/ }),
387
-
388
- /***/ 426:
389
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
390
-
391
- var rng = __webpack_require__(157);
392
- var bytesToUuid = __webpack_require__(725);
393
-
394
- function v4(options, buf, offset) {
395
- var i = buf && offset || 0;
396
-
397
- if (typeof(options) == 'string') {
398
- buf = options === 'binary' ? new Array(16) : null;
399
- options = null;
400
- }
401
- options = options || {};
402
-
403
- var rnds = options.random || (options.rng || rng)();
404
-
405
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
406
- rnds[6] = (rnds[6] & 0x0f) | 0x40;
407
- rnds[8] = (rnds[8] & 0x3f) | 0x80;
408
-
409
- // Copy bytes to buffer, if provided
410
- if (buf) {
411
- for (var ii = 0; ii < 16; ++ii) {
412
- buf[i + ii] = rnds[ii];
413
- }
414
- }
415
-
416
- return buf || bytesToUuid(rnds);
417
- }
418
-
419
- module.exports = v4;
420
-
421
-
422
181
  /***/ }),
423
182
 
424
183
  /***/ 227:
@@ -976,6 +735,25 @@ function setup(env) {
976
735
  module.exports = setup;
977
736
 
978
737
 
738
+ /***/ }),
739
+
740
+ /***/ 703:
741
+ /***/ ((module) => {
742
+
743
+ function webpackEmptyAsyncContext(req) {
744
+ // Here Promise.resolve().then() is used instead of new Promise() to prevent
745
+ // uncaught exception popping up in devtools
746
+ return Promise.resolve().then(() => {
747
+ var e = new Error("Cannot find module '" + req + "'");
748
+ e.code = 'MODULE_NOT_FOUND';
749
+ throw e;
750
+ });
751
+ }
752
+ webpackEmptyAsyncContext.keys = () => ([]);
753
+ webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
754
+ webpackEmptyAsyncContext.id = 703;
755
+ module.exports = webpackEmptyAsyncContext;
756
+
979
757
  /***/ })
980
758
 
981
759
  /******/ });
@@ -1080,6 +858,7 @@ __webpack_require__.d(__webpack_exports__, {
1080
858
  "getTabInstances": () => (/* reexport */ getTabInstances),
1081
859
  "initialize": () => (/* reexport */ initialize),
1082
860
  "initializeWithFrameContext": () => (/* reexport */ initializeWithFrameContext),
861
+ "liveShare": () => (/* reexport */ liveShare),
1083
862
  "location": () => (/* reexport */ location_location),
1084
863
  "logs": () => (/* reexport */ logs),
1085
864
  "mail": () => (/* reexport */ mail),
@@ -1130,7 +909,7 @@ __webpack_require__.d(__webpack_exports__, {
1130
909
  });
1131
910
 
1132
911
  ;// CONCATENATED MODULE: ./src/public/version.ts
1133
- var version = "2.4.0-beta.0";
912
+ var version = "2.4.0-beta.1";
1134
913
 
1135
914
  ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1136
915
  var GlobalVars = /** @class */ (function () {
@@ -1510,8 +1289,92 @@ var teamsDeepLinkProtocol = 'https';
1510
1289
  */
1511
1290
  var teamsDeepLinkHost = 'teams.microsoft.com';
1512
1291
 
1513
- // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1514
- var uuid = __webpack_require__(22);
1292
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
1293
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
1294
+ // require the crypto API and do not support built-in fallback to lower quality random number
1295
+ // generators (like Math.random()).
1296
+ var getRandomValues;
1297
+ var rnds8 = new Uint8Array(16);
1298
+ function rng() {
1299
+ // lazy load so that environments that need to polyfill have a chance to do so
1300
+ if (!getRandomValues) {
1301
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
1302
+ // find the complete implementation of crypto (msCrypto) on IE11.
1303
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
1304
+
1305
+ if (!getRandomValues) {
1306
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
1307
+ }
1308
+ }
1309
+
1310
+ return getRandomValues(rnds8);
1311
+ }
1312
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/regex.js
1313
+ /* harmony default export */ const regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
1314
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/validate.js
1315
+
1316
+
1317
+ function validate(uuid) {
1318
+ return typeof uuid === 'string' && regex.test(uuid);
1319
+ }
1320
+
1321
+ /* harmony default export */ const esm_browser_validate = (validate);
1322
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
1323
+
1324
+ /**
1325
+ * Convert array of 16 byte values to UUID string format of the form:
1326
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
1327
+ */
1328
+
1329
+ var byteToHex = [];
1330
+
1331
+ for (var i = 0; i < 256; ++i) {
1332
+ byteToHex.push((i + 0x100).toString(16).substr(1));
1333
+ }
1334
+
1335
+ function stringify(arr) {
1336
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1337
+ // Note: Be careful editing this code! It's been tuned for performance
1338
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
1339
+ var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
1340
+ // of the following:
1341
+ // - One or more input array values don't map to a hex octet (leading to
1342
+ // "undefined" in the uuid)
1343
+ // - Invalid input values for the RFC `version` or `variant` fields
1344
+
1345
+ if (!esm_browser_validate(uuid)) {
1346
+ throw TypeError('Stringified UUID is invalid');
1347
+ }
1348
+
1349
+ return uuid;
1350
+ }
1351
+
1352
+ /* harmony default export */ const esm_browser_stringify = (stringify);
1353
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
1354
+
1355
+
1356
+
1357
+ function v4(options, buf, offset) {
1358
+ options = options || {};
1359
+ var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
1360
+
1361
+ rnds[6] = rnds[6] & 0x0f | 0x40;
1362
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
1363
+
1364
+ if (buf) {
1365
+ offset = offset || 0;
1366
+
1367
+ for (var i = 0; i < 16; ++i) {
1368
+ buf[offset + i] = rnds[i];
1369
+ }
1370
+
1371
+ return buf;
1372
+ }
1373
+
1374
+ return esm_browser_stringify(rnds);
1375
+ }
1376
+
1377
+ /* harmony default export */ const esm_browser_v4 = (v4);
1515
1378
  ;// CONCATENATED MODULE: ./src/internal/utils.ts
1516
1379
  /* eslint-disable @typescript-eslint/ban-types */
1517
1380
  /* eslint-disable @typescript-eslint/no-unused-vars */
@@ -1639,7 +1502,7 @@ function compareSDKVersions(v1, v2) {
1639
1502
  * Limited to Microsoft-internal use
1640
1503
  */
1641
1504
  function generateGUID() {
1642
- return uuid.v4();
1505
+ return esm_browser_v4();
1643
1506
  }
1644
1507
  /**
1645
1508
  * @internal
@@ -1970,16 +1833,13 @@ function getLogger(namespace) {
1970
1833
  */
1971
1834
  var authentication;
1972
1835
  (function (authentication) {
1973
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1974
1836
  var authHandlers;
1975
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1976
1837
  var authWindowMonitor;
1977
1838
  function initialize() {
1978
1839
  registerHandler('authentication.authenticate.success', handleSuccess, false);
1979
1840
  registerHandler('authentication.authenticate.failure', handleFailure, false);
1980
1841
  }
1981
1842
  authentication.initialize = initialize;
1982
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1983
1843
  var authParams;
1984
1844
  /**
1985
1845
  * @deprecated
@@ -1994,8 +1854,9 @@ var authentication;
1994
1854
  authentication.registerAuthenticationHandlers = registerAuthenticationHandlers;
1995
1855
  function authenticate(authenticateParameters) {
1996
1856
  var isDifferentParamsInCall = authenticateParameters !== undefined;
1997
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1998
- var authenticateParams = isDifferentParamsInCall ? authenticateParameters : authParams;
1857
+ var authenticateParams = isDifferentParamsInCall
1858
+ ? authenticateParameters
1859
+ : authParams;
1999
1860
  if (!authenticateParams) {
2000
1861
  throw new Error('No parameters are provided for authentication');
2001
1862
  }
@@ -2865,11 +2726,9 @@ var menus;
2865
2726
  MenuListType["dropDown"] = "dropDown";
2866
2727
  MenuListType["popOver"] = "popOver";
2867
2728
  })(MenuListType = menus.MenuListType || (menus.MenuListType = {}));
2868
- /* eslint-disable strict-null-checks/all */ /* Fix tracked by 5730662 */
2869
2729
  var navBarMenuItemPressHandler;
2870
2730
  var actionMenuItemPressHandler;
2871
2731
  var viewConfigItemPressHandler;
2872
- /* eslint-enable strict-null-checks/all */ /* Fix tracked by 5730662 */
2873
2732
  function initialize() {
2874
2733
  registerHandler('navBarMenuItemPress', handleNavBarMenuItemPress, false);
2875
2734
  registerHandler('actionMenuItemPress', handleActionMenuItemPress, false);
@@ -3209,9 +3068,8 @@ var app_app;
3209
3068
  // After Teams updates its client code, we can remove this default code.
3210
3069
  try {
3211
3070
  initializeHelperLogger('Parsing %s', runtimeConfig);
3212
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3213
3071
  var givenRuntimeConfig = JSON.parse(runtimeConfig);
3214
- initializeHelperLogger('Checking if %o is a valid runtime object', givenRuntimeConfig);
3072
+ initializeHelperLogger('Checking if %o is a valid runtime object', givenRuntimeConfig !== null && givenRuntimeConfig !== void 0 ? givenRuntimeConfig : 'null');
3215
3073
  // Check that givenRuntimeConfig is a valid instance of IRuntimeConfig
3216
3074
  if (!givenRuntimeConfig || !givenRuntimeConfig.apiVersion) {
3217
3075
  throw new Error('Received runtime config is invalid');
@@ -3229,9 +3087,14 @@ var app_app;
3229
3087
  if (!isNaN(compareSDKVersions(runtimeConfig, defaultSDKVersionForCompatCheck))) {
3230
3088
  GlobalVars.clientSupportedSDKVersion = runtimeConfig;
3231
3089
  }
3232
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3233
3090
  var givenRuntimeConfig = JSON.parse(clientSupportedSDKVersion);
3234
- clientSupportedSDKVersion && applyRuntimeConfig(givenRuntimeConfig);
3091
+ initializeHelperLogger('givenRuntimeConfig parsed to %o', givenRuntimeConfig !== null && givenRuntimeConfig !== void 0 ? givenRuntimeConfig : 'null');
3092
+ if (!givenRuntimeConfig) {
3093
+ throw new Error('givenRuntimeConfig string was successfully parsed. However, it parsed to value of null');
3094
+ }
3095
+ else {
3096
+ applyRuntimeConfig(givenRuntimeConfig);
3097
+ }
3235
3098
  }
3236
3099
  catch (e) {
3237
3100
  if (e instanceof SyntaxError) {
@@ -3733,9 +3596,7 @@ var pages;
3733
3596
  */
3734
3597
  var config;
3735
3598
  (function (config) {
3736
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3737
3599
  var saveHandler;
3738
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3739
3600
  var removeHandler;
3740
3601
  /**
3741
3602
  * @hidden
@@ -3945,7 +3806,6 @@ var pages;
3945
3806
  */
3946
3807
  var backStack;
3947
3808
  (function (backStack) {
3948
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3949
3809
  var backButtonPressHandler;
3950
3810
  function _initialize() {
3951
3811
  registerHandler('backButtonPress', handleBackButtonPress, false);
@@ -5725,7 +5585,6 @@ function createFile(assembleAttachment, mimeType) {
5725
5585
  if (assembleAttachment == null || mimeType == null || assembleAttachment.length <= 0) {
5726
5586
  return null;
5727
5587
  }
5728
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5729
5588
  var file;
5730
5589
  var sequence = 1;
5731
5590
  assembleAttachment.sort(function (a, b) { return (a.sequence > b.sequence ? 1 : -1); });
@@ -6694,7 +6553,6 @@ var monetization;
6694
6553
  * @returns Promise that will be resolved when the operation has completed or rejected with SdkError value
6695
6554
  */
6696
6555
  function openPurchaseExperience(param1, param2) {
6697
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6698
6556
  var callback;
6699
6557
  /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6700
6558
  var planInfo;
@@ -7245,7 +7103,6 @@ var sharing;
7245
7103
  }
7246
7104
  }
7247
7105
  function validateTypeConsistency(shareRequest) {
7248
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
7249
7106
  var err;
7250
7107
  if (shareRequest.content.some(function (item) { return !item.type; })) {
7251
7108
  err = {
@@ -7263,7 +7120,6 @@ var sharing;
7263
7120
  }
7264
7121
  }
7265
7122
  function validateContentForSupportedTypes(shareRequest) {
7266
- /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
7267
7123
  var err;
7268
7124
  if (shareRequest.content[0].type === 'URL') {
7269
7125
  if (shareRequest.content.some(function (item) { return !item.url; })) {
@@ -8182,6 +8038,302 @@ var tasks;
8182
8038
  tasks.getDefaultSizeIfNotProvided = getDefaultSizeIfNotProvided;
8183
8039
  })(tasks || (tasks = {}));
8184
8040
 
8041
+ ;// CONCATENATED MODULE: ./src/internal/liveShareHost.ts
8042
+
8043
+
8044
+
8045
+ /**
8046
+ * @hidden
8047
+ * @internal
8048
+ * Limited to Microsoft-internal use
8049
+ * ------
8050
+ * Allowed roles during a meeting.
8051
+ */
8052
+ var UserMeetingRole;
8053
+ (function (UserMeetingRole) {
8054
+ UserMeetingRole["guest"] = "Guest";
8055
+ UserMeetingRole["attendee"] = "Attendee";
8056
+ UserMeetingRole["presenter"] = "Presenter";
8057
+ UserMeetingRole["organizer"] = "Organizer";
8058
+ })(UserMeetingRole || (UserMeetingRole = {}));
8059
+ /**
8060
+ * @hidden
8061
+ * @internal
8062
+ * Limited to Microsoft-internal use
8063
+ * ------
8064
+ * State of the current Live Share sessions backing fluid container.
8065
+ */
8066
+ var ContainerState;
8067
+ (function (ContainerState) {
8068
+ /**
8069
+ * The call to `LiveShareHost.setContainerId()` successfully created the container mapping
8070
+ * for the current Live Share session.
8071
+ */
8072
+ ContainerState["added"] = "Added";
8073
+ /**
8074
+ * A container mapping for the current Live Share Session already exists and should be used
8075
+ * when joining the sessions Fluid container.
8076
+ */
8077
+ ContainerState["alreadyExists"] = "AlreadyExists";
8078
+ /**
8079
+ * The call to `LiveShareHost.setContainerId()` failed to create the container mapping due to
8080
+ * another client having already set the container ID for the current Live Share session.
8081
+ */
8082
+ ContainerState["conflict"] = "Conflict";
8083
+ /**
8084
+ * A container mapping for the current Live Share session doesn't exist yet.
8085
+ */
8086
+ ContainerState["notFound"] = "NotFound";
8087
+ })(ContainerState || (ContainerState = {}));
8088
+ /**
8089
+ * @hidden
8090
+ * @internal
8091
+ * Limited to Microsoft-internal use
8092
+ * ------
8093
+ * Interface for hosting a Live Share session within a client like Teams.
8094
+ */
8095
+ var LiveShareHost = /** @class */ (function () {
8096
+ function LiveShareHost() {
8097
+ }
8098
+ /**
8099
+ * @hidden
8100
+ * @internal
8101
+ * Limited to Microsoft-internal use
8102
+ * ------
8103
+ * Returns the Fluid Tenant connection info for user's current context.
8104
+ */
8105
+ LiveShareHost.prototype.getFluidTenantInfo = function () {
8106
+ return new Promise(function (resolve) {
8107
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8108
+ resolve(sendAndHandleSdkError('interactive.getFluidTenantInfo'));
8109
+ });
8110
+ };
8111
+ /**
8112
+ * @hidden
8113
+ * @internal
8114
+ * Limited to Microsoft-internal use
8115
+ * ------
8116
+ * Returns the fluid access token for mapped container Id.
8117
+ *
8118
+ * @param containerId Fluid's container Id for the request. Undefined for new containers.
8119
+ * @returns token for connecting to Fluid's session.
8120
+ */
8121
+ LiveShareHost.prototype.getFluidToken = function (containerId) {
8122
+ return new Promise(function (resolve) {
8123
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8124
+ // eslint-disable-next-line strict-null-checks/all
8125
+ resolve(sendAndHandleSdkError('interactive.getFluidToken', containerId));
8126
+ });
8127
+ };
8128
+ /**
8129
+ * @hidden
8130
+ * @internal
8131
+ * Limited to Microsoft-internal use
8132
+ * ------
8133
+ * Returns the ID of the fluid container associated with the user's current context.
8134
+ */
8135
+ LiveShareHost.prototype.getFluidContainerId = function () {
8136
+ return new Promise(function (resolve) {
8137
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8138
+ resolve(sendAndHandleSdkError('interactive.getFluidContainerId'));
8139
+ });
8140
+ };
8141
+ /**
8142
+ * @hidden
8143
+ * @internal
8144
+ * Limited to Microsoft-internal use
8145
+ * ------
8146
+ * Sets the ID of the fluid container associated with the current context.
8147
+ *
8148
+ * @remarks
8149
+ * If this returns false, the client should delete the container they created and then call
8150
+ * `getFluidContainerId()` to get the ID of the container being used.
8151
+ * @param containerId ID of the fluid container the client created.
8152
+ * @returns A data structure with a `containerState` indicating the success or failure of the request.
8153
+ */
8154
+ LiveShareHost.prototype.setFluidContainerId = function (containerId) {
8155
+ return new Promise(function (resolve) {
8156
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8157
+ resolve(sendAndHandleSdkError('interactive.setFluidContainerId', containerId));
8158
+ });
8159
+ };
8160
+ /**
8161
+ * @hidden
8162
+ * @internal
8163
+ * Limited to Microsoft-internal use
8164
+ * ------
8165
+ * Returns the shared clock server's current time.
8166
+ */
8167
+ LiveShareHost.prototype.getNtpTime = function () {
8168
+ return new Promise(function (resolve) {
8169
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8170
+ resolve(sendAndHandleSdkError('interactive.getNtpTime'));
8171
+ });
8172
+ };
8173
+ /**
8174
+ * @hidden
8175
+ * @internal
8176
+ * Limited to Microsoft-internal use
8177
+ * ------
8178
+ * Associates the fluid client ID with a set of user roles.
8179
+ *
8180
+ * @param clientId The ID for the current user's Fluid client. Changes on reconnects.
8181
+ * @returns The roles for the current user.
8182
+ */
8183
+ LiveShareHost.prototype.registerClientId = function (clientId) {
8184
+ return new Promise(function (resolve) {
8185
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8186
+ resolve(sendAndHandleSdkError('interactive.registerClientId', clientId));
8187
+ });
8188
+ };
8189
+ /**
8190
+ * @hidden
8191
+ * @internal
8192
+ * Limited to Microsoft-internal use
8193
+ * ------
8194
+ * Returns the roles associated with a client ID.
8195
+ *
8196
+ * @param clientId The Client ID the message was received from.
8197
+ * @returns The roles for a given client. Returns `undefined` if the client ID hasn't been registered yet.
8198
+ */
8199
+ LiveShareHost.prototype.getClientRoles = function (clientId) {
8200
+ return new Promise(function (resolve) {
8201
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8202
+ resolve(sendAndHandleSdkError('interactive.getClientRoles', clientId));
8203
+ });
8204
+ };
8205
+ return LiveShareHost;
8206
+ }());
8207
+
8208
+
8209
+ ;// CONCATENATED MODULE: ./src/public/liveShare.ts
8210
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8211
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8212
+ return new (P || (P = Promise))(function (resolve, reject) {
8213
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8214
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8215
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8216
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8217
+ });
8218
+ };
8219
+ var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
8220
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
8221
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
8222
+ function verb(n) { return function (v) { return step([n, v]); }; }
8223
+ function step(op) {
8224
+ if (f) throw new TypeError("Generator is already executing.");
8225
+ while (_) try {
8226
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8227
+ if (y = 0, t) op = [op[0] & 2, t.value];
8228
+ switch (op[0]) {
8229
+ case 0: case 1: t = op; break;
8230
+ case 4: _.label++; return { value: op[1], done: false };
8231
+ case 5: _.label++; y = op[1]; op = [0]; continue;
8232
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
8233
+ default:
8234
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
8235
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
8236
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
8237
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
8238
+ if (t[2]) _.ops.pop();
8239
+ _.trys.pop(); continue;
8240
+ }
8241
+ op = body.call(thisArg, _);
8242
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
8243
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
8244
+ }
8245
+ };
8246
+
8247
+ /**
8248
+ * Namespace to interact with the Live Share module-specific part of the SDK.
8249
+ *
8250
+ * @beta
8251
+ */
8252
+ var liveShare;
8253
+ (function (liveShare) {
8254
+ var LIVE_SHARE_PACKAGE = '@microsoft/live-share';
8255
+ var LIVE_SHARE_HOST = new LiveShareHost();
8256
+ var client;
8257
+ var initializing = false;
8258
+ /**
8259
+ * Initializes the Live Share client.
8260
+ * @param options Optional. Configuration options passed to the Live Share client.
8261
+ *
8262
+ * @beta
8263
+ */
8264
+ function initialize(options) {
8265
+ return __awaiter(this, void 0, void 0, function () {
8266
+ var pkg, err_1;
8267
+ return __generator(this, function (_a) {
8268
+ switch (_a.label) {
8269
+ case 0:
8270
+ if (initializing || client) {
8271
+ throw new Error('Live Share has already been initialized.');
8272
+ }
8273
+ _a.label = 1;
8274
+ case 1:
8275
+ _a.trys.push([1, 3, 4, 5]);
8276
+ initializing = true;
8277
+ return [4 /*yield*/, __webpack_require__(703)(LIVE_SHARE_PACKAGE)];
8278
+ case 2:
8279
+ pkg = (_a.sent());
8280
+ client = new pkg.LiveShareClient(options, LIVE_SHARE_HOST);
8281
+ return [3 /*break*/, 5];
8282
+ case 3:
8283
+ err_1 = _a.sent();
8284
+ throw new Error('Unable to initialize Live Share client. Ensure that your project includes "@microsoft/live-share"');
8285
+ case 4:
8286
+ initializing = false;
8287
+ return [7 /*endfinally*/];
8288
+ case 5: return [2 /*return*/];
8289
+ }
8290
+ });
8291
+ });
8292
+ }
8293
+ liveShare.initialize = initialize;
8294
+ /**
8295
+ * Connects to the fluid container for the current teams context.
8296
+ *
8297
+ * @remarks
8298
+ * The first client joining the container will create the container resulting in the
8299
+ * `onContainerFirstCreated` callback being called. This callback can be used to set the initial
8300
+ * state of of the containers object prior to the container being attached.
8301
+ * @param fluidContainerSchema Fluid objects to create.
8302
+ * @param onContainerFirstCreated Optional. Callback that's called when the container is first created.
8303
+ * @returns The fluid `container` and `services` objects to use along with a `created` flag that if true means the container had to be created.
8304
+ *
8305
+ * @beta
8306
+ */
8307
+ function joinContainer(fluidContainerSchema, onContainerFirstCreated) {
8308
+ return __awaiter(this, void 0, void 0, function () {
8309
+ return __generator(this, function (_a) {
8310
+ switch (_a.label) {
8311
+ case 0:
8312
+ if (!client) return [3 /*break*/, 2];
8313
+ return [4 /*yield*/, client.joinContainer(fluidContainerSchema, onContainerFirstCreated)];
8314
+ case 1: return [2 /*return*/, _a.sent()];
8315
+ case 2: throw new Error('Live Share must first be initialized');
8316
+ }
8317
+ });
8318
+ });
8319
+ }
8320
+ liveShare.joinContainer = joinContainer;
8321
+ /**
8322
+ * @hidden
8323
+ * Hide from docs
8324
+ * ------
8325
+ * Returns the LiveShareHost object. Called by existing apps that use the TeamsFluidClient
8326
+ * directly. This prevents existing apps from breaking and will be removed when Live Share
8327
+ * goes GA.
8328
+ *
8329
+ * @beta
8330
+ */
8331
+ function getHost() {
8332
+ return LIVE_SHARE_HOST;
8333
+ }
8334
+ liveShare.getHost = getHost;
8335
+ })(liveShare || (liveShare = {}));
8336
+
8185
8337
  ;// CONCATENATED MODULE: ./src/public/index.ts
8186
8338
 
8187
8339
 
@@ -8214,6 +8366,7 @@ var tasks;
8214
8366
 
8215
8367
 
8216
8368
 
8369
+
8217
8370
 
8218
8371
 
8219
8372