@microsoft/teams-js 2.7.2-beta.0 → 2.8.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.
@@ -11,275 +11,203 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ 22:
15
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
-
17
- var v1 = __webpack_require__(481);
18
- var v4 = __webpack_require__(426);
19
-
20
- var uuid = v4;
21
- uuid.v1 = v1;
22
- uuid.v4 = v4;
23
-
24
- module.exports = uuid;
25
-
26
-
27
- /***/ }),
28
-
29
- /***/ 725:
14
+ /***/ 881:
30
15
  /***/ ((module) => {
31
16
 
32
17
  /**
33
- * Convert array of 16 byte values to UUID string format of the form:
34
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
18
+ * Helpers.
35
19
  */
36
- var byteToHex = [];
37
- for (var i = 0; i < 256; ++i) {
38
- byteToHex[i] = (i + 0x100).toString(16).substr(1);
39
- }
40
20
 
41
- function bytesToUuid(buf, offset) {
42
- var i = offset || 0;
43
- var bth = byteToHex;
44
- // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
45
- return ([
46
- bth[buf[i++]], bth[buf[i++]],
47
- bth[buf[i++]], bth[buf[i++]], '-',
48
- bth[buf[i++]], bth[buf[i++]], '-',
49
- bth[buf[i++]], bth[buf[i++]], '-',
50
- bth[buf[i++]], bth[buf[i++]], '-',
51
- bth[buf[i++]], bth[buf[i++]],
52
- bth[buf[i++]], bth[buf[i++]],
53
- bth[buf[i++]], bth[buf[i++]]
54
- ]).join('');
55
- }
21
+ var s = 1000;
22
+ var m = s * 60;
23
+ var h = m * 60;
24
+ var d = h * 24;
25
+ var w = d * 7;
26
+ var y = d * 365.25;
56
27
 
57
- module.exports = bytesToUuid;
28
+ /**
29
+ * Parse or format the given `val`.
30
+ *
31
+ * Options:
32
+ *
33
+ * - `long` verbose formatting [false]
34
+ *
35
+ * @param {String|Number} val
36
+ * @param {Object} [options]
37
+ * @throws {Error} throw an error if val is not a non-empty string or a number
38
+ * @return {String|Number}
39
+ * @api public
40
+ */
58
41
 
42
+ module.exports = function(val, options) {
43
+ options = options || {};
44
+ var type = typeof val;
45
+ if (type === 'string' && val.length > 0) {
46
+ return parse(val);
47
+ } else if (type === 'number' && isFinite(val)) {
48
+ return options.long ? fmtLong(val) : fmtShort(val);
49
+ }
50
+ throw new Error(
51
+ 'val is not a non-empty string or a valid number. val=' +
52
+ JSON.stringify(val)
53
+ );
54
+ };
59
55
 
60
- /***/ }),
56
+ /**
57
+ * Parse the given `str` and return milliseconds.
58
+ *
59
+ * @param {String} str
60
+ * @return {Number}
61
+ * @api private
62
+ */
61
63
 
62
- /***/ 157:
63
- /***/ ((module) => {
64
+ function parse(str) {
65
+ str = String(str);
66
+ if (str.length > 100) {
67
+ return;
68
+ }
69
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
70
+ str
71
+ );
72
+ if (!match) {
73
+ return;
74
+ }
75
+ var n = parseFloat(match[1]);
76
+ var type = (match[2] || 'ms').toLowerCase();
77
+ switch (type) {
78
+ case 'years':
79
+ case 'year':
80
+ case 'yrs':
81
+ case 'yr':
82
+ case 'y':
83
+ return n * y;
84
+ case 'weeks':
85
+ case 'week':
86
+ case 'w':
87
+ return n * w;
88
+ case 'days':
89
+ case 'day':
90
+ case 'd':
91
+ return n * d;
92
+ case 'hours':
93
+ case 'hour':
94
+ case 'hrs':
95
+ case 'hr':
96
+ case 'h':
97
+ return n * h;
98
+ case 'minutes':
99
+ case 'minute':
100
+ case 'mins':
101
+ case 'min':
102
+ case 'm':
103
+ return n * m;
104
+ case 'seconds':
105
+ case 'second':
106
+ case 'secs':
107
+ case 'sec':
108
+ case 's':
109
+ return n * s;
110
+ case 'milliseconds':
111
+ case 'millisecond':
112
+ case 'msecs':
113
+ case 'msec':
114
+ case 'ms':
115
+ return n;
116
+ default:
117
+ return undefined;
118
+ }
119
+ }
64
120
 
65
- // Unique ID creation requires a high quality random # generator. In the
66
- // browser this is a little complicated due to unknown quality of Math.random()
67
- // and inconsistent support for the `crypto` API. We do the best we can via
68
- // feature-detection
121
+ /**
122
+ * Short format for `ms`.
123
+ *
124
+ * @param {Number} ms
125
+ * @return {String}
126
+ * @api private
127
+ */
69
128
 
70
- // getRandomValues needs to be invoked in a context where "this" is a Crypto
71
- // implementation. Also, find the complete implementation of crypto on IE11.
72
- var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
73
- (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
129
+ function fmtShort(ms) {
130
+ var msAbs = Math.abs(ms);
131
+ if (msAbs >= d) {
132
+ return Math.round(ms / d) + 'd';
133
+ }
134
+ if (msAbs >= h) {
135
+ return Math.round(ms / h) + 'h';
136
+ }
137
+ if (msAbs >= m) {
138
+ return Math.round(ms / m) + 'm';
139
+ }
140
+ if (msAbs >= s) {
141
+ return Math.round(ms / s) + 's';
142
+ }
143
+ return ms + 'ms';
144
+ }
74
145
 
75
- if (getRandomValues) {
76
- // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
77
- var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
146
+ /**
147
+ * Long format for `ms`.
148
+ *
149
+ * @param {Number} ms
150
+ * @return {String}
151
+ * @api private
152
+ */
78
153
 
79
- module.exports = function whatwgRNG() {
80
- getRandomValues(rnds8);
81
- return rnds8;
82
- };
83
- } else {
84
- // Math.random()-based (RNG)
85
- //
86
- // If all else fails, use Math.random(). It's fast, but is of unspecified
87
- // quality.
88
- var rnds = new Array(16);
154
+ function fmtLong(ms) {
155
+ var msAbs = Math.abs(ms);
156
+ if (msAbs >= d) {
157
+ return plural(ms, msAbs, d, 'day');
158
+ }
159
+ if (msAbs >= h) {
160
+ return plural(ms, msAbs, h, 'hour');
161
+ }
162
+ if (msAbs >= m) {
163
+ return plural(ms, msAbs, m, 'minute');
164
+ }
165
+ if (msAbs >= s) {
166
+ return plural(ms, msAbs, s, 'second');
167
+ }
168
+ return ms + ' ms';
169
+ }
89
170
 
90
- module.exports = function mathRNG() {
91
- for (var i = 0, r; i < 16; i++) {
92
- if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
93
- rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
94
- }
171
+ /**
172
+ * Pluralization helper.
173
+ */
95
174
 
96
- return rnds;
97
- };
175
+ function plural(ms, msAbs, n, name) {
176
+ var isPlural = msAbs >= n * 1.5;
177
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
98
178
  }
99
179
 
100
180
 
101
181
  /***/ }),
102
182
 
103
- /***/ 481:
104
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
183
+ /***/ 130:
184
+ /***/ ((module, exports, __webpack_require__) => {
105
185
 
106
- var rng = __webpack_require__(157);
107
- var bytesToUuid = __webpack_require__(725);
186
+ /* eslint-env browser */
108
187
 
109
- // **`v1()` - Generate time-based UUID**
110
- //
111
- // Inspired by https://github.com/LiosK/UUID.js
112
- // and http://docs.python.org/library/uuid.html
188
+ /**
189
+ * This is the web browser implementation of `debug()`.
190
+ */
113
191
 
114
- var _nodeId;
115
- var _clockseq;
192
+ exports.formatArgs = formatArgs;
193
+ exports.save = save;
194
+ exports.load = load;
195
+ exports.useColors = useColors;
196
+ exports.storage = localstorage();
197
+ exports.destroy = (() => {
198
+ let warned = false;
116
199
 
117
- // Previous uuid creation time
118
- var _lastMSecs = 0;
119
- var _lastNSecs = 0;
200
+ return () => {
201
+ if (!warned) {
202
+ warned = true;
203
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
204
+ }
205
+ };
206
+ })();
120
207
 
121
- // See https://github.com/uuidjs/uuid for API details
122
- function v1(options, buf, offset) {
123
- var i = buf && offset || 0;
124
- var b = buf || [];
125
-
126
- options = options || {};
127
- var node = options.node || _nodeId;
128
- var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
129
-
130
- // node and clockseq need to be initialized to random values if they're not
131
- // specified. We do this lazily to minimize issues related to insufficient
132
- // system entropy. See #189
133
- if (node == null || clockseq == null) {
134
- var seedBytes = rng();
135
- if (node == null) {
136
- // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
137
- node = _nodeId = [
138
- seedBytes[0] | 0x01,
139
- seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
140
- ];
141
- }
142
- if (clockseq == null) {
143
- // Per 4.2.2, randomize (14 bit) clockseq
144
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
145
- }
146
- }
147
-
148
- // UUID timestamps are 100 nano-second units since the Gregorian epoch,
149
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
150
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
151
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
152
- var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
153
-
154
- // Per 4.2.1.2, use count of uuid's generated during the current clock
155
- // cycle to simulate higher resolution clock
156
- var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
157
-
158
- // Time since last uuid creation (in msecs)
159
- var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
160
-
161
- // Per 4.2.1.2, Bump clockseq on clock regression
162
- if (dt < 0 && options.clockseq === undefined) {
163
- clockseq = clockseq + 1 & 0x3fff;
164
- }
165
-
166
- // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
167
- // time interval
168
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
169
- nsecs = 0;
170
- }
171
-
172
- // Per 4.2.1.2 Throw error if too many uuids are requested
173
- if (nsecs >= 10000) {
174
- throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
175
- }
176
-
177
- _lastMSecs = msecs;
178
- _lastNSecs = nsecs;
179
- _clockseq = clockseq;
180
-
181
- // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
182
- msecs += 12219292800000;
183
-
184
- // `time_low`
185
- var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
186
- b[i++] = tl >>> 24 & 0xff;
187
- b[i++] = tl >>> 16 & 0xff;
188
- b[i++] = tl >>> 8 & 0xff;
189
- b[i++] = tl & 0xff;
190
-
191
- // `time_mid`
192
- var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
193
- b[i++] = tmh >>> 8 & 0xff;
194
- b[i++] = tmh & 0xff;
195
-
196
- // `time_high_and_version`
197
- b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
198
- b[i++] = tmh >>> 16 & 0xff;
199
-
200
- // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
201
- b[i++] = clockseq >>> 8 | 0x80;
202
-
203
- // `clock_seq_low`
204
- b[i++] = clockseq & 0xff;
205
-
206
- // `node`
207
- for (var n = 0; n < 6; ++n) {
208
- b[i + n] = node[n];
209
- }
210
-
211
- return buf ? buf : bytesToUuid(b);
212
- }
213
-
214
- module.exports = v1;
215
-
216
-
217
- /***/ }),
218
-
219
- /***/ 426:
220
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
221
-
222
- var rng = __webpack_require__(157);
223
- var bytesToUuid = __webpack_require__(725);
224
-
225
- function v4(options, buf, offset) {
226
- var i = buf && offset || 0;
227
-
228
- if (typeof(options) == 'string') {
229
- buf = options === 'binary' ? new Array(16) : null;
230
- options = null;
231
- }
232
- options = options || {};
233
-
234
- var rnds = options.random || (options.rng || rng)();
235
-
236
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
237
- rnds[6] = (rnds[6] & 0x0f) | 0x40;
238
- rnds[8] = (rnds[8] & 0x3f) | 0x80;
239
-
240
- // Copy bytes to buffer, if provided
241
- if (buf) {
242
- for (var ii = 0; ii < 16; ++ii) {
243
- buf[i + ii] = rnds[ii];
244
- }
245
- }
246
-
247
- return buf || bytesToUuid(rnds);
248
- }
249
-
250
- module.exports = v4;
251
-
252
-
253
- /***/ }),
254
-
255
- /***/ 227:
256
- /***/ ((module, exports, __webpack_require__) => {
257
-
258
- /* eslint-env browser */
259
-
260
- /**
261
- * This is the web browser implementation of `debug()`.
262
- */
263
-
264
- exports.formatArgs = formatArgs;
265
- exports.save = save;
266
- exports.load = load;
267
- exports.useColors = useColors;
268
- exports.storage = localstorage();
269
- exports.destroy = (() => {
270
- let warned = false;
271
-
272
- return () => {
273
- if (!warned) {
274
- warned = true;
275
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
276
- }
277
- };
278
- })();
279
-
280
- /**
281
- * Colors.
282
- */
208
+ /**
209
+ * Colors.
210
+ */
283
211
 
284
212
  exports.colors = [
285
213
  '#0000CC',
@@ -509,7 +437,7 @@ function localstorage() {
509
437
  }
510
438
  }
511
439
 
512
- module.exports = __webpack_require__(447)(exports);
440
+ module.exports = __webpack_require__(123)(exports);
513
441
 
514
442
  const {formatters} = module.exports;
515
443
 
@@ -528,7 +456,7 @@ formatters.j = function (v) {
528
456
 
529
457
  /***/ }),
530
458
 
531
- /***/ 447:
459
+ /***/ 123:
532
460
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
533
461
 
534
462
 
@@ -544,7 +472,7 @@ function setup(env) {
544
472
  createDebug.disable = disable;
545
473
  createDebug.enable = enable;
546
474
  createDebug.enabled = enabled;
547
- createDebug.humanize = __webpack_require__(824);
475
+ createDebug.humanize = __webpack_require__(881);
548
476
  createDebug.destroy = destroy;
549
477
 
550
478
  Object.keys(env).forEach(key => {
@@ -712,7 +640,7 @@ function setup(env) {
712
640
  namespaces = split[i].replace(/\*/g, '.*?');
713
641
 
714
642
  if (namespaces[0] === '-') {
715
- createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
643
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
716
644
  } else {
717
645
  createDebug.names.push(new RegExp('^' + namespaces + '$'));
718
646
  }
@@ -809,172 +737,244 @@ module.exports = setup;
809
737
 
810
738
  /***/ }),
811
739
 
812
- /***/ 824:
740
+ /***/ 22:
741
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
742
+
743
+ var v1 = __webpack_require__(481);
744
+ var v4 = __webpack_require__(426);
745
+
746
+ var uuid = v4;
747
+ uuid.v1 = v1;
748
+ uuid.v4 = v4;
749
+
750
+ module.exports = uuid;
751
+
752
+
753
+ /***/ }),
754
+
755
+ /***/ 725:
813
756
  /***/ ((module) => {
814
757
 
815
758
  /**
816
- * Helpers.
759
+ * Convert array of 16 byte values to UUID string format of the form:
760
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
817
761
  */
762
+ var byteToHex = [];
763
+ for (var i = 0; i < 256; ++i) {
764
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
765
+ }
818
766
 
819
- var s = 1000;
820
- var m = s * 60;
821
- var h = m * 60;
822
- var d = h * 24;
823
- var w = d * 7;
824
- var y = d * 365.25;
767
+ function bytesToUuid(buf, offset) {
768
+ var i = offset || 0;
769
+ var bth = byteToHex;
770
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
771
+ return ([
772
+ bth[buf[i++]], bth[buf[i++]],
773
+ bth[buf[i++]], bth[buf[i++]], '-',
774
+ bth[buf[i++]], bth[buf[i++]], '-',
775
+ bth[buf[i++]], bth[buf[i++]], '-',
776
+ bth[buf[i++]], bth[buf[i++]], '-',
777
+ bth[buf[i++]], bth[buf[i++]],
778
+ bth[buf[i++]], bth[buf[i++]],
779
+ bth[buf[i++]], bth[buf[i++]]
780
+ ]).join('');
781
+ }
825
782
 
826
- /**
827
- * Parse or format the given `val`.
828
- *
829
- * Options:
830
- *
831
- * - `long` verbose formatting [false]
832
- *
833
- * @param {String|Number} val
834
- * @param {Object} [options]
835
- * @throws {Error} throw an error if val is not a non-empty string or a number
836
- * @return {String|Number}
837
- * @api public
838
- */
783
+ module.exports = bytesToUuid;
784
+
785
+
786
+ /***/ }),
787
+
788
+ /***/ 157:
789
+ /***/ ((module) => {
790
+
791
+ // Unique ID creation requires a high quality random # generator. In the
792
+ // browser this is a little complicated due to unknown quality of Math.random()
793
+ // and inconsistent support for the `crypto` API. We do the best we can via
794
+ // feature-detection
795
+
796
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto
797
+ // implementation. Also, find the complete implementation of crypto on IE11.
798
+ var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
799
+ (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
800
+
801
+ if (getRandomValues) {
802
+ // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
803
+ var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
804
+
805
+ module.exports = function whatwgRNG() {
806
+ getRandomValues(rnds8);
807
+ return rnds8;
808
+ };
809
+ } else {
810
+ // Math.random()-based (RNG)
811
+ //
812
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
813
+ // quality.
814
+ var rnds = new Array(16);
815
+
816
+ module.exports = function mathRNG() {
817
+ for (var i = 0, r; i < 16; i++) {
818
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
819
+ rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
820
+ }
821
+
822
+ return rnds;
823
+ };
824
+ }
825
+
826
+
827
+ /***/ }),
828
+
829
+ /***/ 481:
830
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
831
+
832
+ var rng = __webpack_require__(157);
833
+ var bytesToUuid = __webpack_require__(725);
834
+
835
+ // **`v1()` - Generate time-based UUID**
836
+ //
837
+ // Inspired by https://github.com/LiosK/UUID.js
838
+ // and http://docs.python.org/library/uuid.html
839
+
840
+ var _nodeId;
841
+ var _clockseq;
842
+
843
+ // Previous uuid creation time
844
+ var _lastMSecs = 0;
845
+ var _lastNSecs = 0;
846
+
847
+ // See https://github.com/uuidjs/uuid for API details
848
+ function v1(options, buf, offset) {
849
+ var i = buf && offset || 0;
850
+ var b = buf || [];
839
851
 
840
- module.exports = function(val, options) {
841
852
  options = options || {};
842
- var type = typeof val;
843
- if (type === 'string' && val.length > 0) {
844
- return parse(val);
845
- } else if (type === 'number' && isFinite(val)) {
846
- return options.long ? fmtLong(val) : fmtShort(val);
853
+ var node = options.node || _nodeId;
854
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
855
+
856
+ // node and clockseq need to be initialized to random values if they're not
857
+ // specified. We do this lazily to minimize issues related to insufficient
858
+ // system entropy. See #189
859
+ if (node == null || clockseq == null) {
860
+ var seedBytes = rng();
861
+ if (node == null) {
862
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
863
+ node = _nodeId = [
864
+ seedBytes[0] | 0x01,
865
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
866
+ ];
867
+ }
868
+ if (clockseq == null) {
869
+ // Per 4.2.2, randomize (14 bit) clockseq
870
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
871
+ }
847
872
  }
848
- throw new Error(
849
- 'val is not a non-empty string or a valid number. val=' +
850
- JSON.stringify(val)
851
- );
852
- };
853
873
 
854
- /**
855
- * Parse the given `str` and return milliseconds.
856
- *
857
- * @param {String} str
858
- * @return {Number}
859
- * @api private
860
- */
874
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
875
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
876
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
877
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
878
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
861
879
 
862
- function parse(str) {
863
- str = String(str);
864
- if (str.length > 100) {
865
- return;
880
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
881
+ // cycle to simulate higher resolution clock
882
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
883
+
884
+ // Time since last uuid creation (in msecs)
885
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
886
+
887
+ // Per 4.2.1.2, Bump clockseq on clock regression
888
+ if (dt < 0 && options.clockseq === undefined) {
889
+ clockseq = clockseq + 1 & 0x3fff;
866
890
  }
867
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
868
- str
869
- );
870
- if (!match) {
871
- return;
891
+
892
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
893
+ // time interval
894
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
895
+ nsecs = 0;
872
896
  }
873
- var n = parseFloat(match[1]);
874
- var type = (match[2] || 'ms').toLowerCase();
875
- switch (type) {
876
- case 'years':
877
- case 'year':
878
- case 'yrs':
879
- case 'yr':
880
- case 'y':
881
- return n * y;
882
- case 'weeks':
883
- case 'week':
884
- case 'w':
885
- return n * w;
886
- case 'days':
887
- case 'day':
888
- case 'd':
889
- return n * d;
890
- case 'hours':
891
- case 'hour':
892
- case 'hrs':
893
- case 'hr':
894
- case 'h':
895
- return n * h;
896
- case 'minutes':
897
- case 'minute':
898
- case 'mins':
899
- case 'min':
900
- case 'm':
901
- return n * m;
902
- case 'seconds':
903
- case 'second':
904
- case 'secs':
905
- case 'sec':
906
- case 's':
907
- return n * s;
908
- case 'milliseconds':
909
- case 'millisecond':
910
- case 'msecs':
911
- case 'msec':
912
- case 'ms':
913
- return n;
914
- default:
915
- return undefined;
897
+
898
+ // Per 4.2.1.2 Throw error if too many uuids are requested
899
+ if (nsecs >= 10000) {
900
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
916
901
  }
917
- }
918
902
 
919
- /**
920
- * Short format for `ms`.
921
- *
922
- * @param {Number} ms
923
- * @return {String}
924
- * @api private
925
- */
903
+ _lastMSecs = msecs;
904
+ _lastNSecs = nsecs;
905
+ _clockseq = clockseq;
926
906
 
927
- function fmtShort(ms) {
928
- var msAbs = Math.abs(ms);
929
- if (msAbs >= d) {
930
- return Math.round(ms / d) + 'd';
931
- }
932
- if (msAbs >= h) {
933
- return Math.round(ms / h) + 'h';
934
- }
935
- if (msAbs >= m) {
936
- return Math.round(ms / m) + 'm';
907
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
908
+ msecs += 12219292800000;
909
+
910
+ // `time_low`
911
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
912
+ b[i++] = tl >>> 24 & 0xff;
913
+ b[i++] = tl >>> 16 & 0xff;
914
+ b[i++] = tl >>> 8 & 0xff;
915
+ b[i++] = tl & 0xff;
916
+
917
+ // `time_mid`
918
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
919
+ b[i++] = tmh >>> 8 & 0xff;
920
+ b[i++] = tmh & 0xff;
921
+
922
+ // `time_high_and_version`
923
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
924
+ b[i++] = tmh >>> 16 & 0xff;
925
+
926
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
927
+ b[i++] = clockseq >>> 8 | 0x80;
928
+
929
+ // `clock_seq_low`
930
+ b[i++] = clockseq & 0xff;
931
+
932
+ // `node`
933
+ for (var n = 0; n < 6; ++n) {
934
+ b[i + n] = node[n];
937
935
  }
938
- if (msAbs >= s) {
939
- return Math.round(ms / s) + 's';
936
+
937
+ return buf ? buf : bytesToUuid(b);
938
+ }
939
+
940
+ module.exports = v1;
941
+
942
+
943
+ /***/ }),
944
+
945
+ /***/ 426:
946
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
947
+
948
+ var rng = __webpack_require__(157);
949
+ var bytesToUuid = __webpack_require__(725);
950
+
951
+ function v4(options, buf, offset) {
952
+ var i = buf && offset || 0;
953
+
954
+ if (typeof(options) == 'string') {
955
+ buf = options === 'binary' ? new Array(16) : null;
956
+ options = null;
940
957
  }
941
- return ms + 'ms';
942
- }
958
+ options = options || {};
943
959
 
944
- /**
945
- * Long format for `ms`.
946
- *
947
- * @param {Number} ms
948
- * @return {String}
949
- * @api private
950
- */
960
+ var rnds = options.random || (options.rng || rng)();
951
961
 
952
- function fmtLong(ms) {
953
- var msAbs = Math.abs(ms);
954
- if (msAbs >= d) {
955
- return plural(ms, msAbs, d, 'day');
956
- }
957
- if (msAbs >= h) {
958
- return plural(ms, msAbs, h, 'hour');
959
- }
960
- if (msAbs >= m) {
961
- return plural(ms, msAbs, m, 'minute');
962
- }
963
- if (msAbs >= s) {
964
- return plural(ms, msAbs, s, 'second');
965
- }
966
- return ms + ' ms';
967
- }
962
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
963
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
964
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
968
965
 
969
- /**
970
- * Pluralization helper.
971
- */
966
+ // Copy bytes to buffer, if provided
967
+ if (buf) {
968
+ for (var ii = 0; ii < 16; ++ii) {
969
+ buf[i + ii] = rnds[ii];
970
+ }
971
+ }
972
972
 
973
- function plural(ms, msAbs, n, name) {
974
- var isPlural = msAbs >= n * 1.5;
975
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
973
+ return buf || bytesToUuid(rnds);
976
974
  }
977
975
 
976
+ module.exports = v4;
977
+
978
978
 
979
979
  /***/ })
980
980
 
@@ -1078,6 +1078,7 @@ __webpack_require__.d(__webpack_exports__, {
1078
1078
  "executeDeepLink": () => (/* reexport */ executeDeepLink),
1079
1079
  "files": () => (/* reexport */ files),
1080
1080
  "geoLocation": () => (/* reexport */ geoLocation),
1081
+ "getAdaptiveCardSchemaVersion": () => (/* reexport */ getAdaptiveCardSchemaVersion),
1081
1082
  "getContext": () => (/* reexport */ getContext),
1082
1083
  "getMruTabInstances": () => (/* reexport */ getMruTabInstances),
1083
1084
  "getTabInstances": () => (/* reexport */ getTabInstances),
@@ -1216,128 +1217,340 @@ var captureImageMobileSupportVersion = '1.7.0';
1216
1217
  */
1217
1218
  var mediaAPISupportVersion = '1.8.0';
1218
1219
  /**
1219
- * @hidden
1220
- * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
1221
- *
1222
- * @internal
1223
- * Limited to Microsoft-internal use
1220
+ * @hidden
1221
+ * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
1222
+ *
1223
+ * @internal
1224
+ * Limited to Microsoft-internal use
1225
+ */
1226
+ var getMediaCallbackSupportVersion = '2.0.0';
1227
+ /**
1228
+ * @hidden
1229
+ * This is the client version when scanBarCode API is supported on mobile.
1230
+ *
1231
+ * @internal
1232
+ * Limited to Microsoft-internal use
1233
+ */
1234
+ var scanBarCodeAPIMobileSupportVersion = '1.9.0';
1235
+ /**
1236
+ * @hidden
1237
+ * List of supported Host origins
1238
+ *
1239
+ * @internal
1240
+ * Limited to Microsoft-internal use
1241
+ */
1242
+ var validOrigins = [
1243
+ 'teams.microsoft.com',
1244
+ 'teams.microsoft.us',
1245
+ 'gov.teams.microsoft.us',
1246
+ 'dod.teams.microsoft.us',
1247
+ 'int.teams.microsoft.com',
1248
+ 'teams.live.com',
1249
+ 'devspaces.skype.com',
1250
+ 'ssauth.skype.com',
1251
+ 'local.teams.live.com',
1252
+ 'local.teams.live.com:8080',
1253
+ 'local.teams.office.com',
1254
+ 'local.teams.office.com:8080',
1255
+ 'msft.spoppe.com',
1256
+ '*.sharepoint.com',
1257
+ '*.sharepoint-df.com',
1258
+ '*.sharepointonline.com',
1259
+ 'outlook.office.com',
1260
+ 'outlook-sdf.office.com',
1261
+ 'outlook.office365.com',
1262
+ 'outlook-sdf.office365.com',
1263
+ 'outlook.live.com',
1264
+ 'outlook-sdf.live.com',
1265
+ '*.teams.microsoft.com',
1266
+ '*.www.office.com',
1267
+ 'www.office.com',
1268
+ 'word.office.com',
1269
+ 'excel.office.com',
1270
+ 'powerpoint.office.com',
1271
+ 'www.officeppe.com',
1272
+ '*.www.microsoft365.com',
1273
+ 'www.microsoft365.com',
1274
+ ];
1275
+ /**
1276
+ * @hidden
1277
+ * USer specified message origins should satisfy this test
1278
+ *
1279
+ * @internal
1280
+ * Limited to Microsoft-internal use
1281
+ */
1282
+ var userOriginUrlValidationRegExp = /^https:\/\//;
1283
+ /**
1284
+ * @hidden
1285
+ * The protocol used for deep links into Teams
1286
+ *
1287
+ * @internal
1288
+ * Limited to Microsoft-internal use
1289
+ */
1290
+ var teamsDeepLinkProtocol = 'https';
1291
+ /**
1292
+ * @hidden
1293
+ * The host used for deep links into Teams
1294
+ *
1295
+ * @internal
1296
+ * Limited to Microsoft-internal use
1297
+ */
1298
+ var teamsDeepLinkHost = 'teams.microsoft.com';
1299
+ /** @hidden */
1300
+ var errorLibraryNotInitialized = 'The library has not yet been initialized';
1301
+ /** @hidden */
1302
+ var errorRuntimeNotInitialized = 'The runtime has not yet been initialized';
1303
+ /** @hidden */
1304
+ var errorRuntimeNotSupported = 'The runtime version is not supported';
1305
+
1306
+ ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1307
+ var GlobalVars = /** @class */ (function () {
1308
+ function GlobalVars() {
1309
+ }
1310
+ GlobalVars.initializeCalled = false;
1311
+ GlobalVars.initializeCompleted = false;
1312
+ GlobalVars.additionalValidOrigins = [];
1313
+ GlobalVars.isFramelessWindow = false;
1314
+ GlobalVars.printCapabilityEnabled = false;
1315
+ return GlobalVars;
1316
+ }());
1317
+
1318
+
1319
+ // EXTERNAL MODULE: ../../node_modules/debug/src/browser.js
1320
+ var browser = __webpack_require__(130);
1321
+ ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
1322
+
1323
+ var topLevelLogger = (0,browser.debug)('teamsJs');
1324
+ /**
1325
+ * @internal
1326
+ * Limited to Microsoft-internal use
1327
+ *
1328
+ * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
1329
+ */
1330
+ function getLogger(namespace) {
1331
+ return topLevelLogger.extend(namespace);
1332
+ }
1333
+
1334
+ // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1335
+ var uuid = __webpack_require__(22);
1336
+ ;// CONCATENATED MODULE: ./src/public/interfaces.ts
1337
+ /* eslint-disable @typescript-eslint/no-explicit-any*/
1338
+ /**
1339
+ * Allowed user file open preferences
1340
+ */
1341
+ var FileOpenPreference;
1342
+ (function (FileOpenPreference) {
1343
+ FileOpenPreference["Inline"] = "inline";
1344
+ FileOpenPreference["Desktop"] = "desktop";
1345
+ FileOpenPreference["Web"] = "web";
1346
+ })(FileOpenPreference || (FileOpenPreference = {}));
1347
+ /**
1348
+ * Possible Action Types
1349
+ *
1350
+ * @beta
1351
+ */
1352
+ var ActionObjectType;
1353
+ (function (ActionObjectType) {
1354
+ ActionObjectType["M365Content"] = "m365content";
1355
+ })(ActionObjectType || (ActionObjectType = {}));
1356
+ /**
1357
+ * These correspond with field names in the MSGraph
1358
+ *
1359
+ * @beta
1360
+ */
1361
+ var SecondaryM365ContentIdName;
1362
+ (function (SecondaryM365ContentIdName) {
1363
+ SecondaryM365ContentIdName["DriveId"] = "driveId";
1364
+ SecondaryM365ContentIdName["GroupId"] = "groupId";
1365
+ SecondaryM365ContentIdName["SiteId"] = "siteId";
1366
+ SecondaryM365ContentIdName["UserId"] = "userId";
1367
+ })(SecondaryM365ContentIdName || (SecondaryM365ContentIdName = {}));
1368
+ var ErrorCode;
1369
+ (function (ErrorCode) {
1370
+ /**
1371
+ * API not supported in the current platform.
1372
+ */
1373
+ ErrorCode[ErrorCode["NOT_SUPPORTED_ON_PLATFORM"] = 100] = "NOT_SUPPORTED_ON_PLATFORM";
1374
+ /**
1375
+ * Internal error encountered while performing the required operation.
1376
+ */
1377
+ ErrorCode[ErrorCode["INTERNAL_ERROR"] = 500] = "INTERNAL_ERROR";
1378
+ /**
1379
+ * API is not supported in the current context
1380
+ */
1381
+ ErrorCode[ErrorCode["NOT_SUPPORTED_IN_CURRENT_CONTEXT"] = 501] = "NOT_SUPPORTED_IN_CURRENT_CONTEXT";
1382
+ /**
1383
+ Permissions denied by user
1384
+ */
1385
+ ErrorCode[ErrorCode["PERMISSION_DENIED"] = 1000] = "PERMISSION_DENIED";
1386
+ /**
1387
+ * Network issue
1388
+ */
1389
+ ErrorCode[ErrorCode["NETWORK_ERROR"] = 2000] = "NETWORK_ERROR";
1390
+ /**
1391
+ * Underlying hardware doesn't support the capability
1392
+ */
1393
+ ErrorCode[ErrorCode["NO_HW_SUPPORT"] = 3000] = "NO_HW_SUPPORT";
1394
+ /**
1395
+ * One or more arguments are invalid
1396
+ */
1397
+ ErrorCode[ErrorCode["INVALID_ARGUMENTS"] = 4000] = "INVALID_ARGUMENTS";
1398
+ /**
1399
+ * User is not authorized for this operation
1400
+ */
1401
+ ErrorCode[ErrorCode["UNAUTHORIZED_USER_OPERATION"] = 5000] = "UNAUTHORIZED_USER_OPERATION";
1402
+ /**
1403
+ * Could not complete the operation due to insufficient resources
1404
+ */
1405
+ ErrorCode[ErrorCode["INSUFFICIENT_RESOURCES"] = 6000] = "INSUFFICIENT_RESOURCES";
1406
+ /**
1407
+ * Platform throttled the request because of API was invoked too frequently
1408
+ */
1409
+ ErrorCode[ErrorCode["THROTTLE"] = 7000] = "THROTTLE";
1410
+ /**
1411
+ * User aborted the operation
1412
+ */
1413
+ ErrorCode[ErrorCode["USER_ABORT"] = 8000] = "USER_ABORT";
1414
+ /**
1415
+ * Could not complete the operation in the given time interval
1416
+ */
1417
+ ErrorCode[ErrorCode["OPERATION_TIMED_OUT"] = 8001] = "OPERATION_TIMED_OUT";
1418
+ /**
1419
+ * Platform code is old and doesn't implement this API
1420
+ */
1421
+ ErrorCode[ErrorCode["OLD_PLATFORM"] = 9000] = "OLD_PLATFORM";
1422
+ /**
1423
+ * The file specified was not found on the given location
1424
+ */
1425
+ ErrorCode[ErrorCode["FILE_NOT_FOUND"] = 404] = "FILE_NOT_FOUND";
1426
+ /**
1427
+ * The return value is too big and has exceeded our size boundries
1428
+ */
1429
+ ErrorCode[ErrorCode["SIZE_EXCEEDED"] = 10000] = "SIZE_EXCEEDED";
1430
+ })(ErrorCode || (ErrorCode = {}));
1431
+ /** @hidden */
1432
+ var DevicePermission;
1433
+ (function (DevicePermission) {
1434
+ DevicePermission["GeoLocation"] = "geolocation";
1435
+ DevicePermission["Media"] = "media";
1436
+ })(DevicePermission || (DevicePermission = {}));
1437
+
1438
+ ;// CONCATENATED MODULE: ./src/public/constants.ts
1439
+ var HostClientType;
1440
+ (function (HostClientType) {
1441
+ HostClientType["desktop"] = "desktop";
1442
+ HostClientType["web"] = "web";
1443
+ HostClientType["android"] = "android";
1444
+ HostClientType["ios"] = "ios";
1445
+ HostClientType["ipados"] = "ipados";
1446
+ /**
1447
+ * @deprecated
1448
+ * As of 2.0.0, please use {@link teamsRoomsWindows} instead.
1449
+ */
1450
+ HostClientType["rigel"] = "rigel";
1451
+ HostClientType["surfaceHub"] = "surfaceHub";
1452
+ HostClientType["teamsRoomsWindows"] = "teamsRoomsWindows";
1453
+ HostClientType["teamsRoomsAndroid"] = "teamsRoomsAndroid";
1454
+ HostClientType["teamsPhones"] = "teamsPhones";
1455
+ HostClientType["teamsDisplays"] = "teamsDisplays";
1456
+ })(HostClientType || (HostClientType = {}));
1457
+ var HostName;
1458
+ (function (HostName) {
1459
+ /**
1460
+ * Office.com and Office Windows App
1461
+ */
1462
+ HostName["office"] = "Office";
1463
+ /**
1464
+ * For "desktop" specifically, this refers to the new, pre-release version of Outlook for Windows.
1465
+ * Also used on other platforms that map to a single Outlook client.
1466
+ */
1467
+ HostName["outlook"] = "Outlook";
1468
+ /**
1469
+ * Outlook for Windows: the classic, native, desktop client
1470
+ */
1471
+ HostName["outlookWin32"] = "OutlookWin32";
1472
+ /**
1473
+ * Microsoft-internal test Host
1474
+ */
1475
+ HostName["orange"] = "Orange";
1476
+ /**
1477
+ * Teams
1478
+ */
1479
+ HostName["teams"] = "Teams";
1480
+ })(HostName || (HostName = {}));
1481
+ // Ensure these declarations stay in sync with the framework.
1482
+ var FrameContexts;
1483
+ (function (FrameContexts) {
1484
+ FrameContexts["settings"] = "settings";
1485
+ FrameContexts["content"] = "content";
1486
+ FrameContexts["authentication"] = "authentication";
1487
+ FrameContexts["remove"] = "remove";
1488
+ FrameContexts["task"] = "task";
1489
+ FrameContexts["sidePanel"] = "sidePanel";
1490
+ FrameContexts["stage"] = "stage";
1491
+ FrameContexts["meetingStage"] = "meetingStage";
1492
+ })(FrameContexts || (FrameContexts = {}));
1493
+ /**
1494
+ * Indicates the team type, currently used to distinguish between different team
1495
+ * types in Office 365 for Education (team types 1, 2, 3, and 4).
1224
1496
  */
1225
- var getMediaCallbackSupportVersion = '2.0.0';
1497
+ var TeamType;
1498
+ (function (TeamType) {
1499
+ TeamType[TeamType["Standard"] = 0] = "Standard";
1500
+ TeamType[TeamType["Edu"] = 1] = "Edu";
1501
+ TeamType[TeamType["Class"] = 2] = "Class";
1502
+ TeamType[TeamType["Plc"] = 3] = "Plc";
1503
+ TeamType[TeamType["Staff"] = 4] = "Staff";
1504
+ })(TeamType || (TeamType = {}));
1226
1505
  /**
1227
- * @hidden
1228
- * This is the client version when scanBarCode API is supported on mobile.
1229
- *
1230
- * @internal
1231
- * Limited to Microsoft-internal use
1506
+ * Indicates the various types of roles of a user in a team.
1232
1507
  */
1233
- var scanBarCodeAPIMobileSupportVersion = '1.9.0';
1508
+ var UserTeamRole;
1509
+ (function (UserTeamRole) {
1510
+ UserTeamRole[UserTeamRole["Admin"] = 0] = "Admin";
1511
+ UserTeamRole[UserTeamRole["User"] = 1] = "User";
1512
+ UserTeamRole[UserTeamRole["Guest"] = 2] = "Guest";
1513
+ })(UserTeamRole || (UserTeamRole = {}));
1234
1514
  /**
1235
- * @hidden
1236
- * List of supported Host origins
1237
- *
1238
- * @internal
1239
- * Limited to Microsoft-internal use
1515
+ * Dialog module dimension enum
1240
1516
  */
1241
- var validOrigins = [
1242
- 'teams.microsoft.com',
1243
- 'teams.microsoft.us',
1244
- 'gov.teams.microsoft.us',
1245
- 'dod.teams.microsoft.us',
1246
- 'int.teams.microsoft.com',
1247
- 'teams.live.com',
1248
- 'devspaces.skype.com',
1249
- 'ssauth.skype.com',
1250
- 'local.teams.live.com',
1251
- 'local.teams.live.com:8080',
1252
- 'local.teams.office.com',
1253
- 'local.teams.office.com:8080',
1254
- 'msft.spoppe.com',
1255
- '*.sharepoint.com',
1256
- '*.sharepoint-df.com',
1257
- '*.sharepointonline.com',
1258
- 'outlook.office.com',
1259
- 'outlook-sdf.office.com',
1260
- 'outlook.office365.com',
1261
- 'outlook-sdf.office365.com',
1262
- 'outlook.live.com',
1263
- 'outlook-sdf.live.com',
1264
- '*.teams.microsoft.com',
1265
- '*.www.office.com',
1266
- 'www.office.com',
1267
- 'word.office.com',
1268
- 'excel.office.com',
1269
- 'powerpoint.office.com',
1270
- 'www.officeppe.com',
1271
- '*.www.microsoft365.com',
1272
- 'www.microsoft365.com',
1273
- ];
1517
+ var DialogDimension;
1518
+ (function (DialogDimension) {
1519
+ DialogDimension["Large"] = "large";
1520
+ DialogDimension["Medium"] = "medium";
1521
+ DialogDimension["Small"] = "small";
1522
+ })(DialogDimension || (DialogDimension = {}));
1523
+
1274
1524
  /**
1275
- * @hidden
1276
- * USer specified message origins should satisfy this test
1277
- *
1278
- * @internal
1279
- * Limited to Microsoft-internal use
1525
+ * @deprecated
1526
+ * As of 2.0.0, please use {@link DialogDimension} instead.
1280
1527
  */
1281
- var userOriginUrlValidationRegExp = /^https:\/\//;
1528
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1529
+ var TaskModuleDimension = DialogDimension;
1282
1530
  /**
1283
- * @hidden
1284
- * The protocol used for deep links into Teams
1285
- *
1286
- * @internal
1287
- * Limited to Microsoft-internal use
1531
+ * The type of the channel with which the content is associated.
1288
1532
  */
1289
- var teamsDeepLinkProtocol = 'https';
1533
+ var ChannelType;
1534
+ (function (ChannelType) {
1535
+ ChannelType["Regular"] = "Regular";
1536
+ ChannelType["Private"] = "Private";
1537
+ ChannelType["Shared"] = "Shared";
1538
+ })(ChannelType || (ChannelType = {}));
1539
+ var errorNotSupportedOnPlatform = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
1290
1540
  /**
1291
1541
  * @hidden
1292
- * The host used for deep links into Teams
1293
- *
1294
- * @internal
1295
- * Limited to Microsoft-internal use
1296
- */
1297
- var teamsDeepLinkHost = 'teams.microsoft.com';
1298
- /** @hidden */
1299
- var errorLibraryNotInitialized = 'The library has not yet been initialized';
1300
- /** @hidden */
1301
- var errorRuntimeNotInitialized = 'The runtime has not yet been initialized';
1302
- /** @hidden */
1303
- var errorRuntimeNotSupported = 'The runtime version is not supported';
1304
-
1305
- ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1306
- var GlobalVars = /** @class */ (function () {
1307
- function GlobalVars() {
1308
- }
1309
- GlobalVars.initializeCalled = false;
1310
- GlobalVars.initializeCompleted = false;
1311
- GlobalVars.additionalValidOrigins = [];
1312
- GlobalVars.isFramelessWindow = false;
1313
- GlobalVars.printCapabilityEnabled = false;
1314
- return GlobalVars;
1315
- }());
1316
-
1317
-
1318
- // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
1319
- var browser = __webpack_require__(227);
1320
- ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
1321
-
1322
- var topLevelLogger = (0,browser.debug)('teamsJs');
1323
- /**
1324
- * @internal
1325
- * Limited to Microsoft-internal use
1326
1542
  *
1327
- * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
1543
+ * Minimum Adaptive Card version supported by the host.
1328
1544
  */
1329
- function getLogger(namespace) {
1330
- return topLevelLogger.extend(namespace);
1331
- }
1545
+ var minAdaptiveCardVersion = { majorVersion: 1, minorVersion: 5 };
1332
1546
 
1333
- // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1334
- var uuid = __webpack_require__(22);
1335
1547
  ;// CONCATENATED MODULE: ./src/internal/utils.ts
1336
1548
  /* eslint-disable @typescript-eslint/ban-types */
1337
1549
  /* eslint-disable @typescript-eslint/no-unused-vars */
1338
1550
 
1339
1551
 
1340
1552
 
1553
+
1341
1554
  /**
1342
1555
  * @param pattern - reference pattern
1343
1556
  * @param host - candidate string
@@ -1459,92 +1672,22 @@ function compareSDKVersions(v1, v2) {
1459
1672
  * Limited to Microsoft-internal use
1460
1673
  */
1461
1674
  function generateGUID() {
1462
- return uuid.v4();
1463
- }
1464
- /**
1465
- * @internal
1466
- * Limited to Microsoft-internal use
1467
- */
1468
- function utils_deepFreeze(obj) {
1469
- Object.keys(obj).forEach(function (prop) {
1470
- if (typeof obj[prop] === 'object') {
1471
- utils_deepFreeze(obj[prop]);
1472
- }
1473
- });
1474
- return Object.freeze(obj);
1475
- }
1476
- /**
1477
- * This utility function is used when the result of the promise is same as the result in the callback.
1478
- * @param funcHelper
1479
- * @param callback
1480
- * @param args
1481
- * @returns
1482
- *
1483
- * @internal
1484
- * Limited to Microsoft-internal use
1485
- */
1486
- function callCallbackWithErrorOrResultFromPromiseAndReturnPromise(funcHelper, callback) {
1487
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1488
- var args = [];
1489
- for (
1490
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1491
- var _i = 2;
1492
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1493
- _i < arguments.length;
1494
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1495
- _i++) {
1496
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1497
- args[_i - 2] = arguments[_i];
1498
- }
1499
- var p = funcHelper.apply(void 0, args);
1500
- p.then(function (result) {
1501
- if (callback) {
1502
- callback(undefined, result);
1503
- }
1504
- }).catch(function (e) {
1505
- if (callback) {
1506
- callback(e);
1507
- }
1508
- });
1509
- return p;
1510
- }
1511
- /**
1512
- * This utility function is used when the return type of the promise is usually void and
1513
- * the result in the callback is a boolean type (true for success and false for error)
1514
- * @param funcHelper
1515
- * @param callback
1516
- * @param args
1517
- * @returns
1675
+ return uuid.v4();
1676
+ }
1677
+ /**
1518
1678
  * @internal
1519
1679
  * Limited to Microsoft-internal use
1520
1680
  */
1521
- function callCallbackWithErrorOrBooleanFromPromiseAndReturnPromise(funcHelper, callback) {
1522
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1523
- var args = [];
1524
- for (
1525
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1526
- var _i = 2;
1527
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1528
- _i < arguments.length;
1529
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1530
- _i++) {
1531
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1532
- args[_i - 2] = arguments[_i];
1533
- }
1534
- var p = funcHelper.apply(void 0, args);
1535
- p.then(function () {
1536
- if (callback) {
1537
- callback(undefined, true);
1538
- }
1539
- }).catch(function (e) {
1540
- if (callback) {
1541
- callback(e, false);
1681
+ function utils_deepFreeze(obj) {
1682
+ Object.keys(obj).forEach(function (prop) {
1683
+ if (typeof obj[prop] === 'object') {
1684
+ utils_deepFreeze(obj[prop]);
1542
1685
  }
1543
1686
  });
1544
- return p;
1687
+ return Object.freeze(obj);
1545
1688
  }
1546
1689
  /**
1547
- * This utility function is called when the callback has only Error/SdkError as the primary argument.
1690
+ * This utility function is used when the result of the promise is same as the result in the callback.
1548
1691
  * @param funcHelper
1549
1692
  * @param callback
1550
1693
  * @param args
@@ -1553,7 +1696,7 @@ function callCallbackWithErrorOrBooleanFromPromiseAndReturnPromise(funcHelper, c
1553
1696
  * @internal
1554
1697
  * Limited to Microsoft-internal use
1555
1698
  */
1556
- function callCallbackWithSdkErrorFromPromiseAndReturnPromise(funcHelper, callback) {
1699
+ function callCallbackWithErrorOrResultFromPromiseAndReturnPromise(funcHelper, callback) {
1557
1700
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1558
1701
  var args = [];
1559
1702
  for (
@@ -1567,9 +1710,9 @@ function callCallbackWithSdkErrorFromPromiseAndReturnPromise(funcHelper, callbac
1567
1710
  args[_i - 2] = arguments[_i];
1568
1711
  }
1569
1712
  var p = funcHelper.apply(void 0, args);
1570
- p.then(function () {
1713
+ p.then(function (result) {
1571
1714
  if (callback) {
1572
- callback(null);
1715
+ callback(undefined, result);
1573
1716
  }
1574
1717
  }).catch(function (e) {
1575
1718
  if (callback) {
@@ -1579,16 +1722,16 @@ function callCallbackWithSdkErrorFromPromiseAndReturnPromise(funcHelper, callbac
1579
1722
  return p;
1580
1723
  }
1581
1724
  /**
1582
- * This utility function is used when the result of the promise is same as the result in the callback.
1725
+ * This utility function is used when the return type of the promise is usually void and
1726
+ * the result in the callback is a boolean type (true for success and false for error)
1583
1727
  * @param funcHelper
1584
1728
  * @param callback
1585
1729
  * @param args
1586
1730
  * @returns
1587
- *
1588
1731
  * @internal
1589
1732
  * Limited to Microsoft-internal use
1590
1733
  */
1591
- function callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(funcHelper, callback) {
1734
+ function callCallbackWithErrorOrBooleanFromPromiseAndReturnPromise(funcHelper, callback) {
1592
1735
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1593
1736
  var args = [];
1594
1737
  for (
@@ -1602,265 +1745,146 @@ function callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(funcHelp
1602
1745
  args[_i - 2] = arguments[_i];
1603
1746
  }
1604
1747
  var p = funcHelper.apply(void 0, args);
1605
- p.then(function (result) {
1606
- if (callback) {
1607
- callback(null, result);
1608
- }
1609
- }).catch(function (e) {
1748
+ p.then(function () {
1610
1749
  if (callback) {
1611
- callback(e, null);
1750
+ callback(undefined, true);
1612
1751
  }
1613
- });
1614
- return p;
1615
- }
1616
- /**
1617
- * A helper function to add a timeout to an asynchronous operation.
1618
- *
1619
- * @param action Action to wrap the timeout around
1620
- * @param timeoutInMs Timeout period in milliseconds
1621
- * @param timeoutError Error to reject the promise with if timeout elapses before the action completed
1622
- * @returns A promise which resolves to the result of provided action or rejects with a provided timeout error
1623
- * if the initial action didn't complete within provided timeout.
1624
- *
1625
- * @internal
1626
- * Limited to Microsoft-internal use
1627
- */
1628
- function runWithTimeout(action, timeoutInMs, timeoutError) {
1629
- return new Promise(function (resolve, reject) {
1630
- var timeoutHandle = setTimeout(reject, timeoutInMs, timeoutError);
1631
- action()
1632
- .then(function (result) {
1633
- clearTimeout(timeoutHandle);
1634
- resolve(result);
1635
- })
1636
- .catch(function (error) {
1637
- clearTimeout(timeoutHandle);
1638
- reject(error);
1639
- });
1640
- });
1641
- }
1642
- /**
1643
- * @internal
1644
- * Limited to Microsoft-internal use
1645
- */
1646
- function createTeamsAppLink(params) {
1647
- var url = new URL('https://teams.microsoft.com/l/entity/' +
1648
- encodeURIComponent(params.appId) +
1649
- '/' +
1650
- encodeURIComponent(params.pageId));
1651
- if (params.webUrl) {
1652
- url.searchParams.append('webUrl', params.webUrl);
1653
- }
1654
- if (params.channelId || params.subPageId) {
1655
- url.searchParams.append('context', JSON.stringify({ channelId: params.channelId, subEntityId: params.subPageId }));
1656
- }
1657
- return url.toString();
1658
- }
1659
-
1660
- ;// CONCATENATED MODULE: ./src/public/interfaces.ts
1661
- /* eslint-disable @typescript-eslint/no-explicit-any*/
1662
- /**
1663
- * Allowed user file open preferences
1664
- */
1665
- var FileOpenPreference;
1666
- (function (FileOpenPreference) {
1667
- FileOpenPreference["Inline"] = "inline";
1668
- FileOpenPreference["Desktop"] = "desktop";
1669
- FileOpenPreference["Web"] = "web";
1670
- })(FileOpenPreference || (FileOpenPreference = {}));
1671
- /**
1672
- * Possible Action Types
1673
- *
1674
- * @beta
1675
- */
1676
- var ActionObjectType;
1677
- (function (ActionObjectType) {
1678
- ActionObjectType["M365Content"] = "m365content";
1679
- })(ActionObjectType || (ActionObjectType = {}));
1680
- /**
1681
- * These correspond with field names in the MSGraph
1682
- *
1683
- * @beta
1684
- */
1685
- var SecondaryM365ContentIdName;
1686
- (function (SecondaryM365ContentIdName) {
1687
- SecondaryM365ContentIdName["DriveId"] = "driveId";
1688
- SecondaryM365ContentIdName["GroupId"] = "groupId";
1689
- SecondaryM365ContentIdName["SiteId"] = "siteId";
1690
- SecondaryM365ContentIdName["UserId"] = "userId";
1691
- })(SecondaryM365ContentIdName || (SecondaryM365ContentIdName = {}));
1692
- var ErrorCode;
1693
- (function (ErrorCode) {
1694
- /**
1695
- * API not supported in the current platform.
1696
- */
1697
- ErrorCode[ErrorCode["NOT_SUPPORTED_ON_PLATFORM"] = 100] = "NOT_SUPPORTED_ON_PLATFORM";
1698
- /**
1699
- * Internal error encountered while performing the required operation.
1700
- */
1701
- ErrorCode[ErrorCode["INTERNAL_ERROR"] = 500] = "INTERNAL_ERROR";
1702
- /**
1703
- * API is not supported in the current context
1704
- */
1705
- ErrorCode[ErrorCode["NOT_SUPPORTED_IN_CURRENT_CONTEXT"] = 501] = "NOT_SUPPORTED_IN_CURRENT_CONTEXT";
1706
- /**
1707
- Permissions denied by user
1708
- */
1709
- ErrorCode[ErrorCode["PERMISSION_DENIED"] = 1000] = "PERMISSION_DENIED";
1710
- /**
1711
- * Network issue
1712
- */
1713
- ErrorCode[ErrorCode["NETWORK_ERROR"] = 2000] = "NETWORK_ERROR";
1714
- /**
1715
- * Underlying hardware doesn't support the capability
1716
- */
1717
- ErrorCode[ErrorCode["NO_HW_SUPPORT"] = 3000] = "NO_HW_SUPPORT";
1718
- /**
1719
- * One or more arguments are invalid
1720
- */
1721
- ErrorCode[ErrorCode["INVALID_ARGUMENTS"] = 4000] = "INVALID_ARGUMENTS";
1722
- /**
1723
- * User is not authorized for this operation
1724
- */
1725
- ErrorCode[ErrorCode["UNAUTHORIZED_USER_OPERATION"] = 5000] = "UNAUTHORIZED_USER_OPERATION";
1726
- /**
1727
- * Could not complete the operation due to insufficient resources
1728
- */
1729
- ErrorCode[ErrorCode["INSUFFICIENT_RESOURCES"] = 6000] = "INSUFFICIENT_RESOURCES";
1730
- /**
1731
- * Platform throttled the request because of API was invoked too frequently
1732
- */
1733
- ErrorCode[ErrorCode["THROTTLE"] = 7000] = "THROTTLE";
1734
- /**
1735
- * User aborted the operation
1736
- */
1737
- ErrorCode[ErrorCode["USER_ABORT"] = 8000] = "USER_ABORT";
1738
- /**
1739
- * Could not complete the operation in the given time interval
1740
- */
1741
- ErrorCode[ErrorCode["OPERATION_TIMED_OUT"] = 8001] = "OPERATION_TIMED_OUT";
1742
- /**
1743
- * Platform code is old and doesn't implement this API
1744
- */
1745
- ErrorCode[ErrorCode["OLD_PLATFORM"] = 9000] = "OLD_PLATFORM";
1746
- /**
1747
- * The file specified was not found on the given location
1748
- */
1749
- ErrorCode[ErrorCode["FILE_NOT_FOUND"] = 404] = "FILE_NOT_FOUND";
1750
- /**
1751
- * The return value is too big and has exceeded our size boundries
1752
- */
1753
- ErrorCode[ErrorCode["SIZE_EXCEEDED"] = 10000] = "SIZE_EXCEEDED";
1754
- })(ErrorCode || (ErrorCode = {}));
1755
- /** @hidden */
1756
- var DevicePermission;
1757
- (function (DevicePermission) {
1758
- DevicePermission["GeoLocation"] = "geolocation";
1759
- DevicePermission["Media"] = "media";
1760
- })(DevicePermission || (DevicePermission = {}));
1761
-
1762
- ;// CONCATENATED MODULE: ./src/public/constants.ts
1763
- var HostClientType;
1764
- (function (HostClientType) {
1765
- HostClientType["desktop"] = "desktop";
1766
- HostClientType["web"] = "web";
1767
- HostClientType["android"] = "android";
1768
- HostClientType["ios"] = "ios";
1769
- HostClientType["ipados"] = "ipados";
1770
- /**
1771
- * @deprecated
1772
- * As of 2.0.0, please use {@link teamsRoomsWindows} instead.
1773
- */
1774
- HostClientType["rigel"] = "rigel";
1775
- HostClientType["surfaceHub"] = "surfaceHub";
1776
- HostClientType["teamsRoomsWindows"] = "teamsRoomsWindows";
1777
- HostClientType["teamsRoomsAndroid"] = "teamsRoomsAndroid";
1778
- HostClientType["teamsPhones"] = "teamsPhones";
1779
- HostClientType["teamsDisplays"] = "teamsDisplays";
1780
- })(HostClientType || (HostClientType = {}));
1781
- var HostName;
1782
- (function (HostName) {
1783
- /**
1784
- * Office.com and Office Windows App
1785
- */
1786
- HostName["office"] = "Office";
1787
- /**
1788
- * For "desktop" specifically, this refers to the new, pre-release version of Outlook for Windows.
1789
- * Also used on other platforms that map to a single Outlook client.
1790
- */
1791
- HostName["outlook"] = "Outlook";
1792
- /**
1793
- * Outlook for Windows: the classic, native, desktop client
1794
- */
1795
- HostName["outlookWin32"] = "OutlookWin32";
1796
- /**
1797
- * Microsoft-internal test Host
1798
- */
1799
- HostName["orange"] = "Orange";
1800
- /**
1801
- * Teams
1802
- */
1803
- HostName["teams"] = "Teams";
1804
- })(HostName || (HostName = {}));
1805
- // Ensure these declarations stay in sync with the framework.
1806
- var FrameContexts;
1807
- (function (FrameContexts) {
1808
- FrameContexts["settings"] = "settings";
1809
- FrameContexts["content"] = "content";
1810
- FrameContexts["authentication"] = "authentication";
1811
- FrameContexts["remove"] = "remove";
1812
- FrameContexts["task"] = "task";
1813
- FrameContexts["sidePanel"] = "sidePanel";
1814
- FrameContexts["stage"] = "stage";
1815
- FrameContexts["meetingStage"] = "meetingStage";
1816
- })(FrameContexts || (FrameContexts = {}));
1752
+ }).catch(function (e) {
1753
+ if (callback) {
1754
+ callback(e, false);
1755
+ }
1756
+ });
1757
+ return p;
1758
+ }
1817
1759
  /**
1818
- * Indicates the team type, currently used to distinguish between different team
1819
- * types in Office 365 for Education (team types 1, 2, 3, and 4).
1760
+ * This utility function is called when the callback has only Error/SdkError as the primary argument.
1761
+ * @param funcHelper
1762
+ * @param callback
1763
+ * @param args
1764
+ * @returns
1765
+ *
1766
+ * @internal
1767
+ * Limited to Microsoft-internal use
1820
1768
  */
1821
- var TeamType;
1822
- (function (TeamType) {
1823
- TeamType[TeamType["Standard"] = 0] = "Standard";
1824
- TeamType[TeamType["Edu"] = 1] = "Edu";
1825
- TeamType[TeamType["Class"] = 2] = "Class";
1826
- TeamType[TeamType["Plc"] = 3] = "Plc";
1827
- TeamType[TeamType["Staff"] = 4] = "Staff";
1828
- })(TeamType || (TeamType = {}));
1769
+ function callCallbackWithSdkErrorFromPromiseAndReturnPromise(funcHelper, callback) {
1770
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1771
+ var args = [];
1772
+ for (
1773
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1774
+ var _i = 2;
1775
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1776
+ _i < arguments.length;
1777
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1778
+ _i++) {
1779
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1780
+ args[_i - 2] = arguments[_i];
1781
+ }
1782
+ var p = funcHelper.apply(void 0, args);
1783
+ p.then(function () {
1784
+ if (callback) {
1785
+ callback(null);
1786
+ }
1787
+ }).catch(function (e) {
1788
+ if (callback) {
1789
+ callback(e);
1790
+ }
1791
+ });
1792
+ return p;
1793
+ }
1829
1794
  /**
1830
- * Indicates the various types of roles of a user in a team.
1795
+ * This utility function is used when the result of the promise is same as the result in the callback.
1796
+ * @param funcHelper
1797
+ * @param callback
1798
+ * @param args
1799
+ * @returns
1800
+ *
1801
+ * @internal
1802
+ * Limited to Microsoft-internal use
1831
1803
  */
1832
- var UserTeamRole;
1833
- (function (UserTeamRole) {
1834
- UserTeamRole[UserTeamRole["Admin"] = 0] = "Admin";
1835
- UserTeamRole[UserTeamRole["User"] = 1] = "User";
1836
- UserTeamRole[UserTeamRole["Guest"] = 2] = "Guest";
1837
- })(UserTeamRole || (UserTeamRole = {}));
1804
+ function callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(funcHelper, callback) {
1805
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1806
+ var args = [];
1807
+ for (
1808
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1809
+ var _i = 2;
1810
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1811
+ _i < arguments.length;
1812
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1813
+ _i++) {
1814
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1815
+ args[_i - 2] = arguments[_i];
1816
+ }
1817
+ var p = funcHelper.apply(void 0, args);
1818
+ p.then(function (result) {
1819
+ if (callback) {
1820
+ callback(null, result);
1821
+ }
1822
+ }).catch(function (e) {
1823
+ if (callback) {
1824
+ callback(e, null);
1825
+ }
1826
+ });
1827
+ return p;
1828
+ }
1838
1829
  /**
1839
- * Dialog module dimension enum
1830
+ * A helper function to add a timeout to an asynchronous operation.
1831
+ *
1832
+ * @param action Action to wrap the timeout around
1833
+ * @param timeoutInMs Timeout period in milliseconds
1834
+ * @param timeoutError Error to reject the promise with if timeout elapses before the action completed
1835
+ * @returns A promise which resolves to the result of provided action or rejects with a provided timeout error
1836
+ * if the initial action didn't complete within provided timeout.
1837
+ *
1838
+ * @internal
1839
+ * Limited to Microsoft-internal use
1840
1840
  */
1841
- var DialogDimension;
1842
- (function (DialogDimension) {
1843
- DialogDimension["Large"] = "large";
1844
- DialogDimension["Medium"] = "medium";
1845
- DialogDimension["Small"] = "small";
1846
- })(DialogDimension || (DialogDimension = {}));
1847
-
1841
+ function runWithTimeout(action, timeoutInMs, timeoutError) {
1842
+ return new Promise(function (resolve, reject) {
1843
+ var timeoutHandle = setTimeout(reject, timeoutInMs, timeoutError);
1844
+ action()
1845
+ .then(function (result) {
1846
+ clearTimeout(timeoutHandle);
1847
+ resolve(result);
1848
+ })
1849
+ .catch(function (error) {
1850
+ clearTimeout(timeoutHandle);
1851
+ reject(error);
1852
+ });
1853
+ });
1854
+ }
1848
1855
  /**
1849
- * @deprecated
1850
- * As of 2.0.0, please use {@link DialogDimension} instead.
1856
+ * @internal
1857
+ * Limited to Microsoft-internal use
1851
1858
  */
1852
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1853
- var TaskModuleDimension = DialogDimension;
1859
+ function createTeamsAppLink(params) {
1860
+ var url = new URL('https://teams.microsoft.com/l/entity/' +
1861
+ encodeURIComponent(params.appId) +
1862
+ '/' +
1863
+ encodeURIComponent(params.pageId));
1864
+ if (params.webUrl) {
1865
+ url.searchParams.append('webUrl', params.webUrl);
1866
+ }
1867
+ if (params.channelId || params.subPageId) {
1868
+ url.searchParams.append('context', JSON.stringify({ channelId: params.channelId, subEntityId: params.subPageId }));
1869
+ }
1870
+ return url.toString();
1871
+ }
1854
1872
  /**
1855
- * The type of the channel with which the content is associated.
1873
+ * @hidden
1874
+ * Checks if the Adaptive Card schema version is supported by the host.
1875
+ * @param hostAdaptiveCardSchemaVersion Host's supported Adaptive Card version in the runtime.
1876
+ *
1877
+ * @returns true if the Adaptive Card Version is not supported and false if it is supported.
1856
1878
  */
1857
- var ChannelType;
1858
- (function (ChannelType) {
1859
- ChannelType["Regular"] = "Regular";
1860
- ChannelType["Private"] = "Private";
1861
- ChannelType["Shared"] = "Shared";
1862
- })(ChannelType || (ChannelType = {}));
1863
- var errorNotSupportedOnPlatform = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
1879
+ function isHostAdaptiveCardSchemaVersionUnsupported(hostAdaptiveCardSchemaVersion) {
1880
+ var versionCheck = compareSDKVersions("".concat(hostAdaptiveCardSchemaVersion.majorVersion, ".").concat(hostAdaptiveCardSchemaVersion.minorVersion), "".concat(minAdaptiveCardVersion.majorVersion, ".").concat(minAdaptiveCardVersion.minorVersion));
1881
+ if (versionCheck >= 0) {
1882
+ return false;
1883
+ }
1884
+ else {
1885
+ return true;
1886
+ }
1887
+ }
1864
1888
 
1865
1889
  ;// CONCATENATED MODULE: ./src/public/runtime.ts
1866
1890
  /* eslint-disable @typescript-eslint/ban-types */
@@ -1881,7 +1905,7 @@ var __assign = (undefined && undefined.__assign) || function () {
1881
1905
 
1882
1906
 
1883
1907
  var runtimeLogger = getLogger('runtime');
1884
- var latestRuntimeApiVersion = 1;
1908
+ var latestRuntimeApiVersion = 2;
1885
1909
  function isLatestRuntimeVersion(runtime) {
1886
1910
  return runtime.apiVersion === latestRuntimeApiVersion;
1887
1911
  }
@@ -1913,7 +1937,8 @@ function isRuntimeInitialized(runtime) {
1913
1937
  }
1914
1938
  var runtime = _uninitializedRuntime;
1915
1939
  var teamsRuntimeConfig = {
1916
- apiVersion: 1,
1940
+ apiVersion: 2,
1941
+ hostVersionsInfo: undefined,
1917
1942
  isLegacyTeams: true,
1918
1943
  supports: {
1919
1944
  appInstallDialog: {},
@@ -1922,7 +1947,9 @@ var teamsRuntimeConfig = {
1922
1947
  chat: {},
1923
1948
  conversations: {},
1924
1949
  dialog: {
1925
- bot: {},
1950
+ url: {
1951
+ bot: {},
1952
+ },
1926
1953
  update: {},
1927
1954
  },
1928
1955
  logs: {},
@@ -1996,12 +2023,20 @@ function fastForwardRuntime(outdatedRuntime) {
1996
2023
  var upgradeChain = [
1997
2024
  // This upgrade has been included for testing, it may be removed when there is a real upgrade implemented
1998
2025
  {
1999
- versionToUpgradeFrom: 0,
2026
+ versionToUpgradeFrom: 1,
2000
2027
  upgradeToNextVersion: function (previousVersionRuntime) {
2028
+ var _a;
2001
2029
  return {
2002
- apiVersion: 1,
2030
+ apiVersion: 2,
2031
+ hostVersionsInfo: undefined,
2003
2032
  isLegacyTeams: previousVersionRuntime.isLegacyTeams,
2004
- supports: __assign(__assign({}, previousVersionRuntime.supports), { calendar: previousVersionRuntime.supports.calendarV0 }),
2033
+ supports: __assign(__assign({}, previousVersionRuntime.supports), { dialog: previousVersionRuntime.supports.dialog
2034
+ ? {
2035
+ card: undefined,
2036
+ url: previousVersionRuntime.supports.dialog,
2037
+ update: (_a = previousVersionRuntime.supports.dialog) === null || _a === void 0 ? void 0 : _a.update,
2038
+ }
2039
+ : undefined }),
2005
2040
  };
2006
2041
  },
2007
2042
  },
@@ -2070,7 +2105,7 @@ function generateBackCompatRuntimeConfig(highestSupportedVersion) {
2070
2105
  }
2071
2106
  });
2072
2107
  var backCompatRuntimeConfig = {
2073
- apiVersion: 1,
2108
+ apiVersion: 2,
2074
2109
  isLegacyTeams: true,
2075
2110
  supports: newSupports,
2076
2111
  };
@@ -2101,7 +2136,7 @@ function setUnitializedRuntime() {
2101
2136
  * Limited to Microsoft-internal use
2102
2137
  */
2103
2138
  var _minRuntimeConfigToUninitialize = {
2104
- apiVersion: 1,
2139
+ apiVersion: 2,
2105
2140
  supports: {
2106
2141
  pages: {
2107
2142
  appButton: {},
@@ -2116,7 +2151,7 @@ var _minRuntimeConfigToUninitialize = {
2116
2151
  };
2117
2152
 
2118
2153
  ;// CONCATENATED MODULE: ./src/public/version.ts
2119
- var version = "2.7.2-beta.0";
2154
+ var version = "2.8.0-beta.1";
2120
2155
 
2121
2156
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
2122
2157
 
@@ -2174,8 +2209,8 @@ function ensureInitialized(runtime) {
2174
2209
  }
2175
2210
  }
2176
2211
  if (!found) {
2177
- throw new Error("This call is only allowed in following contexts: " + JSON.stringify(expectedFrameContexts) + ". " +
2178
- ("Current context: \"" + GlobalVars.frameContext + "\"."));
2212
+ throw new Error("This call is only allowed in following contexts: ".concat(JSON.stringify(expectedFrameContexts), ". ") +
2213
+ "Current context: \"".concat(GlobalVars.frameContext, "\"."));
2179
2214
  }
2180
2215
  }
2181
2216
  return isRuntimeInitialized(runtime);
@@ -2661,6 +2696,7 @@ var authentication;
2661
2696
 
2662
2697
 
2663
2698
 
2699
+
2664
2700
  /**
2665
2701
  * Namespace to interact with the dialog module-specific part of the SDK.
2666
2702
  *
@@ -2697,127 +2733,227 @@ var dialog;
2697
2733
  removeHandler('messageForChild');
2698
2734
  }
2699
2735
  }
2700
- /**
2701
- * Allows app to open a url based dialog.
2702
- *
2703
- * @remarks
2704
- * This function cannot be called from inside of a dialog
2705
- *
2706
- * @param urlDialogInfo - An object containing the parameters of the dialog module.
2707
- * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode submit} function or when the user closes the dialog.
2708
- * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
2709
- *
2710
- * @returns a function that can be used to send messages to the dialog.
2711
- *
2712
- * @beta
2713
- */
2714
- function open(urlDialogInfo, submitHandler, messageFromChildHandler) {
2715
- ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
2716
- if (!isSupported()) {
2717
- throw errorNotSupportedOnPlatform;
2736
+ var url;
2737
+ (function (url) {
2738
+ /**
2739
+ * Allows app to open a url based dialog.
2740
+ *
2741
+ * @remarks
2742
+ * This function cannot be called from inside of a dialog
2743
+ *
2744
+ * @param urlDialogInfo - An object containing the parameters of the dialog module.
2745
+ * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode submit} function or when the user closes the dialog.
2746
+ * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
2747
+ *
2748
+ * @beta
2749
+ */
2750
+ function open(urlDialogInfo, submitHandler, messageFromChildHandler) {
2751
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
2752
+ if (!isSupported()) {
2753
+ throw errorNotSupportedOnPlatform;
2754
+ }
2755
+ if (messageFromChildHandler) {
2756
+ registerHandler('messageForParent', messageFromChildHandler);
2757
+ }
2758
+ var dialogInfo = getDialogInfoFromUrlDialogInfo(urlDialogInfo);
2759
+ sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
2760
+ submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err: err, result: result });
2761
+ removeHandler('messageForParent');
2762
+ });
2763
+ }
2764
+ url.open = open;
2765
+ /**
2766
+ * Submit the dialog module and close the dialog
2767
+ *
2768
+ * @remarks
2769
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
2770
+ *
2771
+ * @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
2772
+ * If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
2773
+ *
2774
+ * @param appIds - Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.
2775
+ *
2776
+ * @beta
2777
+ */
2778
+ function submit(result, appIds) {
2779
+ // FrameContext content should not be here because dialog.submit can be called only from inside of a dialog (FrameContext task)
2780
+ // but it's here because Teams mobile incorrectly returns FrameContext.content when calling app.getFrameContext().
2781
+ // FrameContexts.content will be removed once the bug is fixed.
2782
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
2783
+ if (!isSupported()) {
2784
+ throw errorNotSupportedOnPlatform;
2785
+ }
2786
+ // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients
2787
+ sendMessageToParent('tasks.completeTask', [result, appIds ? (Array.isArray(appIds) ? appIds : [appIds]) : []]);
2718
2788
  }
2719
- if (messageFromChildHandler) {
2720
- registerHandler('messageForParent', messageFromChildHandler);
2789
+ url.submit = submit;
2790
+ /**
2791
+ * Send message to the parent from dialog
2792
+ *
2793
+ * @remarks
2794
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
2795
+ *
2796
+ * @param message - The message to send to the parent
2797
+ *
2798
+ * @beta
2799
+ */
2800
+ function sendMessageToParentFromDialog(
2801
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2802
+ message) {
2803
+ ensureInitialized(runtime, FrameContexts.task);
2804
+ if (!isSupported()) {
2805
+ throw errorNotSupportedOnPlatform;
2806
+ }
2807
+ sendMessageToParent('messageForParent', [message]);
2721
2808
  }
2722
- var dialogInfo = getDialogInfoFromUrlDialogInfo(urlDialogInfo);
2723
- sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
2724
- submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err: err, result: result });
2725
- removeHandler('messageForParent');
2726
- });
2727
- }
2728
- dialog.open = open;
2729
- /**
2730
- * Submit the dialog module and close the dialog
2731
- *
2732
- * @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
2733
- * If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
2734
- *
2735
- * @param appIds - Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.
2736
- *
2737
- * @beta
2738
- */
2739
- function submit(result, appIds) {
2740
- // FrameContext content should not be here because dialog.submit can be called only from inside of a dialog (FrameContext task)
2741
- // but it's here because Teams mobile incorrectly returns FrameContext.content when calling app.getFrameContext().
2742
- // FrameContexts.content will be removed once the bug is fixed.
2743
- ensureInitialized(runtime, FrameContexts.content, FrameContexts.task);
2744
- if (!isSupported()) {
2745
- throw errorNotSupportedOnPlatform;
2809
+ url.sendMessageToParentFromDialog = sendMessageToParentFromDialog;
2810
+ /**
2811
+ * Send message to the dialog from the parent
2812
+ *
2813
+ * @param message - The message to send
2814
+ *
2815
+ * @beta
2816
+ */
2817
+ function sendMessageToDialog(
2818
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2819
+ message) {
2820
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
2821
+ if (!isSupported()) {
2822
+ throw errorNotSupportedOnPlatform;
2823
+ }
2824
+ sendMessageToParent('messageForChild', [message]);
2746
2825
  }
2747
- // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients
2748
- sendMessageToParent('tasks.completeTask', [result, appIds ? (Array.isArray(appIds) ? appIds : [appIds]) : []]);
2749
- }
2750
- dialog.submit = submit;
2751
- /**
2752
- * Send message to the parent from dialog
2753
- *
2754
- * @remarks
2755
- * This function is only called from inside of a dialog
2756
- *
2757
- * @param message - The message to send to the parent
2758
- *
2759
- * @beta
2760
- */
2761
- function sendMessageToParentFromDialog(
2762
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2763
- message) {
2764
- ensureInitialized(runtime, FrameContexts.task);
2765
- if (!isSupported()) {
2766
- throw errorNotSupportedOnPlatform;
2826
+ url.sendMessageToDialog = sendMessageToDialog;
2827
+ /**
2828
+ * Register a listener that will be triggered when a message is received from the app that opened the dialog.
2829
+ *
2830
+ * @remarks
2831
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
2832
+ *
2833
+ * @param listener - The listener that will be triggered.
2834
+ *
2835
+ * @beta
2836
+ */
2837
+ function registerOnMessageFromParent(listener) {
2838
+ ensureInitialized(runtime, FrameContexts.task);
2839
+ if (!isSupported()) {
2840
+ throw errorNotSupportedOnPlatform;
2841
+ }
2842
+ // We need to remove the original 'messageForChild'
2843
+ // handler since the original does not allow for post messages.
2844
+ // It is replaced by the user specified listener that is passed in.
2845
+ removeHandler('messageForChild');
2846
+ registerHandler('messageForChild', listener);
2847
+ storedMessages.reverse();
2848
+ while (storedMessages.length > 0) {
2849
+ var message = storedMessages.pop();
2850
+ listener(message);
2851
+ }
2767
2852
  }
2768
- sendMessageToParent('messageForParent', [message]);
2769
- }
2770
- dialog.sendMessageToParentFromDialog = sendMessageToParentFromDialog;
2771
- /**
2772
- * Send message to the dialog from the parent
2773
- *
2774
- * @param message - The message to send
2775
- *
2776
- * @beta
2777
- */
2778
- function sendMessageToDialog(
2779
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2780
- message) {
2781
- ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
2782
- if (!isSupported()) {
2783
- throw errorNotSupportedOnPlatform;
2853
+ url.registerOnMessageFromParent = registerOnMessageFromParent;
2854
+ /**
2855
+ * Checks if dialog.url module is supported by the host
2856
+ *
2857
+ * @returns boolean to represent whether dialog.url module is supported
2858
+ *
2859
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2860
+ *
2861
+ * @beta
2862
+ */
2863
+ function isSupported() {
2864
+ return ensureInitialized(runtime) && (runtime.supports.dialog && runtime.supports.dialog.url) !== undefined;
2784
2865
  }
2785
- sendMessageToParent('messageForChild', [message]);
2786
- }
2787
- dialog.sendMessageToDialog = sendMessageToDialog;
2788
- /**
2789
- * Register a listener that will be triggered when a message is received from the app that opened the dialog.
2790
- *
2791
- * @remarks
2792
- * This function is only called from inside of a dialog.
2793
- *
2794
- * @param listener - The listener that will be triggered.
2795
- *
2796
- * @beta
2797
- */
2798
- function registerOnMessageFromParent(listener) {
2799
- ensureInitialized(runtime, FrameContexts.task);
2800
- if (!isSupported()) {
2801
- throw errorNotSupportedOnPlatform;
2866
+ url.isSupported = isSupported;
2867
+ /**
2868
+ * Namespace to open a dialog that sends results to the bot framework
2869
+ *
2870
+ * @beta
2871
+ */
2872
+ var bot;
2873
+ (function (bot) {
2874
+ /**
2875
+ * Allows an app to open the dialog module using bot.
2876
+ *
2877
+ * @param botUrlDialogInfo - An object containing the parameters of the dialog module including completionBotId.
2878
+ * @param submitHandler - Handler that triggers when the dialog has been submitted or closed.
2879
+ * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
2880
+ *
2881
+ * @returns a function that can be used to send messages to the dialog.
2882
+ *
2883
+ * @beta
2884
+ */
2885
+ function open(botUrlDialogInfo, submitHandler, messageFromChildHandler) {
2886
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
2887
+ if (!isSupported()) {
2888
+ throw errorNotSupportedOnPlatform;
2889
+ }
2890
+ if (messageFromChildHandler) {
2891
+ registerHandler('messageForParent', messageFromChildHandler);
2892
+ }
2893
+ var dialogInfo = getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo);
2894
+ sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
2895
+ submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err: err, result: result });
2896
+ removeHandler('messageForParent');
2897
+ });
2898
+ }
2899
+ bot.open = open;
2900
+ /**
2901
+ * Checks if dialog.url.bot capability is supported by the host
2902
+ *
2903
+ * @returns boolean to represent whether dialog.url.bot is supported
2904
+ *
2905
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2906
+ *
2907
+ * @beta
2908
+ */
2909
+ function isSupported() {
2910
+ return (ensureInitialized(runtime) &&
2911
+ (runtime.supports.dialog && runtime.supports.dialog.url && runtime.supports.dialog.url.bot) !== undefined);
2912
+ }
2913
+ bot.isSupported = isSupported;
2914
+ })(bot = url.bot || (url.bot = {}));
2915
+ /**
2916
+ * @hidden
2917
+ *
2918
+ * Convert UrlDialogInfo to DialogInfo to send the information to host in {@linkcode open} API.
2919
+ *
2920
+ * @internal
2921
+ * Limited to Microsoft-internal use
2922
+ */
2923
+ function getDialogInfoFromUrlDialogInfo(urlDialogInfo) {
2924
+ var dialogInfo = {
2925
+ url: urlDialogInfo.url,
2926
+ height: urlDialogInfo.size ? urlDialogInfo.size.height : DialogDimension.Small,
2927
+ width: urlDialogInfo.size ? urlDialogInfo.size.width : DialogDimension.Small,
2928
+ title: urlDialogInfo.title,
2929
+ fallbackUrl: urlDialogInfo.fallbackUrl,
2930
+ };
2931
+ return dialogInfo;
2802
2932
  }
2803
- // We need to remove the original 'messageForChild'
2804
- // handler since the original does not allow for post messages.
2805
- // It is replaced by the user specified listener that is passed in.
2806
- removeHandler('messageForChild');
2807
- registerHandler('messageForChild', listener);
2808
- storedMessages.reverse();
2809
- while (storedMessages.length > 0) {
2810
- var message = storedMessages.pop();
2811
- listener(message);
2933
+ url.getDialogInfoFromUrlDialogInfo = getDialogInfoFromUrlDialogInfo;
2934
+ /**
2935
+ * @hidden
2936
+ *
2937
+ * Convert BotUrlDialogInfo to DialogInfo to send the information to host in {@linkcode bot.open} API.
2938
+ *
2939
+ * @internal
2940
+ * Limited to Microsoft-internal use
2941
+ */
2942
+ function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo) {
2943
+ var dialogInfo = getDialogInfoFromUrlDialogInfo(botUrlDialogInfo);
2944
+ dialogInfo.completionBotId = botUrlDialogInfo.completionBotId;
2945
+ return dialogInfo;
2812
2946
  }
2813
- }
2814
- dialog.registerOnMessageFromParent = registerOnMessageFromParent;
2947
+ url.getDialogInfoFromBotUrlDialogInfo = getDialogInfoFromBotUrlDialogInfo;
2948
+ })(url = dialog.url || (dialog.url = {}));
2815
2949
  /**
2816
2950
  * Checks if dialog capability is supported by the host
2817
2951
  * @returns boolean to represent whether dialog capabilty is supported
2818
2952
  *
2819
2953
  * @throws Error if {@linkcode app.initialize} has not successfully completed
2820
2954
  *
2955
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2956
+ *
2821
2957
  * @beta
2822
2958
  */
2823
2959
  function isSupported() {
@@ -2864,98 +3000,169 @@ var dialog;
2864
3000
  update.isSupported = isSupported;
2865
3001
  })(update = dialog.update || (dialog.update = {}));
2866
3002
  /**
2867
- * Namespace to open a dialog that sends results to the bot framework
2868
- *
3003
+ * Subcapability for interacting with adaptive card dialogs
2869
3004
  * @beta
2870
3005
  */
2871
- var bot;
2872
- (function (bot) {
3006
+ var adaptiveCard;
3007
+ (function (adaptiveCard) {
2873
3008
  /**
2874
- * Allows an app to open the dialog module using bot.
3009
+ * Allows app to open an adaptive card based dialog.
2875
3010
  *
2876
- * @param botUrlDialogInfo - An object containing the parameters of the dialog module including completionBotId.
2877
- * @param submitHandler - Handler that triggers when the dialog has been submitted or closed.
2878
- * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
3011
+ * @remarks
3012
+ * This function cannot be called from inside of a dialog
2879
3013
  *
2880
- * @returns a function that can be used to send messages to the dialog.
3014
+ * @param adaptiveCardDialogInfo - An object containing the parameters of the dialog module {@link AdaptiveCardDialogInfo}.
3015
+ * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode url.submit} function or when the user closes the dialog.
2881
3016
  *
2882
3017
  * @beta
2883
3018
  */
2884
- function open(botUrlDialogInfo, submitHandler, messageFromChildHandler) {
3019
+ function open(adaptiveCardDialogInfo, submitHandler) {
2885
3020
  ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
2886
3021
  if (!isSupported()) {
2887
3022
  throw errorNotSupportedOnPlatform;
2888
3023
  }
2889
- if (messageFromChildHandler) {
2890
- registerHandler('messageForParent', messageFromChildHandler);
2891
- }
2892
- var dialogInfo = getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo);
3024
+ var dialogInfo = getDialogInfoFromAdaptiveCardDialogInfo(adaptiveCardDialogInfo);
2893
3025
  sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
2894
3026
  submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err: err, result: result });
2895
- removeHandler('messageForParent');
2896
3027
  });
2897
3028
  }
2898
- bot.open = open;
3029
+ adaptiveCard.open = open;
2899
3030
  /**
2900
- * Checks if dialog.bot capability is supported by the host
2901
- * @returns boolean to represent whether dialog.bot is supported
3031
+ * Checks if dialog.adaptiveCard module is supported by the host
3032
+ *
3033
+ * @returns boolean to represent whether dialog.adaptiveCard module is supported
2902
3034
  *
2903
3035
  * @throws Error if {@linkcode app.initialize} has not successfully completed
2904
3036
  *
2905
3037
  * @beta
2906
3038
  */
2907
3039
  function isSupported() {
2908
- return ensureInitialized(runtime) && runtime.supports.dialog
2909
- ? runtime.supports.dialog.bot
2910
- ? true
2911
- : false
2912
- : false;
3040
+ var isAdaptiveCardVersionSupported = runtime.hostVersionsInfo &&
3041
+ runtime.hostVersionsInfo.adaptiveCardSchemaVersion &&
3042
+ !isHostAdaptiveCardSchemaVersionUnsupported(runtime.hostVersionsInfo.adaptiveCardSchemaVersion);
3043
+ return (ensureInitialized(runtime) &&
3044
+ (isAdaptiveCardVersionSupported && runtime.supports.dialog && runtime.supports.dialog.card) !== undefined);
2913
3045
  }
2914
- bot.isSupported = isSupported;
2915
- })(bot = dialog.bot || (dialog.bot = {}));
2916
- /**
2917
- * @hidden
2918
- *
2919
- * Convert UrlDialogInfo to DialogInfo to send the information to host in {@linkcode open} API.
2920
- *
2921
- * @internal
2922
- * Limited to Microsoft-internal use
2923
- *
2924
- * @beta
2925
- */
2926
- function getDialogInfoFromUrlDialogInfo(urlDialogInfo) {
2927
- var dialogInfo = {
2928
- url: urlDialogInfo.url,
2929
- height: urlDialogInfo.size ? urlDialogInfo.size.height : DialogDimension.Small,
2930
- width: urlDialogInfo.size ? urlDialogInfo.size.width : DialogDimension.Small,
2931
- title: urlDialogInfo.title,
2932
- fallbackUrl: urlDialogInfo.fallbackUrl,
2933
- };
2934
- return dialogInfo;
2935
- }
2936
- dialog.getDialogInfoFromUrlDialogInfo = getDialogInfoFromUrlDialogInfo;
2937
- /**
2938
- * @hidden
2939
- *
2940
- * Convert BotUrlDialogInfo to DialogInfo to send the information to host in {@linkcode bot.open} API.
2941
- *
2942
- * @internal
2943
- * Limited to Microsoft-internal use
2944
- *
2945
- * @beta
2946
- */
2947
- function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo) {
2948
- var dialogInfo = {
2949
- url: botUrlDialogInfo.url,
2950
- height: botUrlDialogInfo.size ? botUrlDialogInfo.size.height : DialogDimension.Small,
2951
- width: botUrlDialogInfo.size ? botUrlDialogInfo.size.width : DialogDimension.Small,
2952
- title: botUrlDialogInfo.title,
2953
- fallbackUrl: botUrlDialogInfo.fallbackUrl,
2954
- completionBotId: botUrlDialogInfo.completionBotId,
2955
- };
2956
- return dialogInfo;
2957
- }
2958
- dialog.getDialogInfoFromBotUrlDialogInfo = getDialogInfoFromBotUrlDialogInfo;
3046
+ adaptiveCard.isSupported = isSupported;
3047
+ /**
3048
+ * Namespace for interaction with adaptive card dialogs that need to communicate with the bot framework
3049
+ *
3050
+ * @beta
3051
+ */
3052
+ var bot;
3053
+ (function (bot) {
3054
+ /**
3055
+ * Allows an app to open an adaptive card-based dialog module using bot.
3056
+ *
3057
+ * @param botAdaptiveCardDialogInfo - An object containing the parameters of the dialog module including completionBotId.
3058
+ * @param submitHandler - Handler that triggers when the dialog has been submitted or closed.
3059
+ *
3060
+ * @beta
3061
+ */
3062
+ function open(botAdaptiveCardDialogInfo, submitHandler) {
3063
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
3064
+ if (!isSupported()) {
3065
+ throw errorNotSupportedOnPlatform;
3066
+ }
3067
+ var dialogInfo = getDialogInfoFromBotAdaptiveCardDialogInfo(botAdaptiveCardDialogInfo);
3068
+ sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
3069
+ submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err: err, result: result });
3070
+ });
3071
+ }
3072
+ bot.open = open;
3073
+ /**
3074
+ * Checks if dialog.adaptiveCard.bot capability is supported by the host
3075
+ *
3076
+ * @returns boolean to represent whether dialog.adaptiveCard.bot is supported
3077
+ *
3078
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
3079
+ *
3080
+ * @beta
3081
+ */
3082
+ function isSupported() {
3083
+ var isAdaptiveCardVersionSupported = runtime.hostVersionsInfo &&
3084
+ runtime.hostVersionsInfo.adaptiveCardSchemaVersion &&
3085
+ !isHostAdaptiveCardSchemaVersionUnsupported(runtime.hostVersionsInfo.adaptiveCardSchemaVersion);
3086
+ return (ensureInitialized(runtime) &&
3087
+ (isAdaptiveCardVersionSupported &&
3088
+ runtime.supports.dialog &&
3089
+ runtime.supports.dialog.card &&
3090
+ runtime.supports.dialog.card.bot) !== undefined);
3091
+ }
3092
+ bot.isSupported = isSupported;
3093
+ })(bot = adaptiveCard.bot || (adaptiveCard.bot = {}));
3094
+ /**
3095
+ * @hidden
3096
+ * Hide from docs
3097
+ * --------
3098
+ * Convert AdaptiveCardDialogInfo to DialogInfo to send the information to host in {@linkcode adaptiveCard.open} API.
3099
+ *
3100
+ * @internal
3101
+ */
3102
+ function getDialogInfoFromAdaptiveCardDialogInfo(adaptiveCardDialogInfo) {
3103
+ var dialogInfo = {
3104
+ card: adaptiveCardDialogInfo.card,
3105
+ height: adaptiveCardDialogInfo.size ? adaptiveCardDialogInfo.size.height : DialogDimension.Small,
3106
+ width: adaptiveCardDialogInfo.size ? adaptiveCardDialogInfo.size.width : DialogDimension.Small,
3107
+ title: adaptiveCardDialogInfo.title,
3108
+ };
3109
+ return dialogInfo;
3110
+ }
3111
+ adaptiveCard.getDialogInfoFromAdaptiveCardDialogInfo = getDialogInfoFromAdaptiveCardDialogInfo;
3112
+ /**
3113
+ * @hidden
3114
+ * Hide from docs
3115
+ * --------
3116
+ * Convert BotAdaptiveCardDialogInfo to DialogInfo to send the information to host in {@linkcode adaptiveCard.open} API.
3117
+ *
3118
+ * @internal
3119
+ */
3120
+ function getDialogInfoFromBotAdaptiveCardDialogInfo(botAdaptiveCardDialogInfo) {
3121
+ var dialogInfo = getDialogInfoFromAdaptiveCardDialogInfo(botAdaptiveCardDialogInfo);
3122
+ dialogInfo.completionBotId = botAdaptiveCardDialogInfo.completionBotId;
3123
+ return dialogInfo;
3124
+ }
3125
+ adaptiveCard.getDialogInfoFromBotAdaptiveCardDialogInfo = getDialogInfoFromBotAdaptiveCardDialogInfo;
3126
+ /**
3127
+ * @hidden
3128
+ * Converts {@link TaskInfo} to {@link AdaptiveCardDialogInfo}
3129
+ * @param taskInfo - TaskInfo object to convert
3130
+ * @returns - converted AdaptiveCardDialogInfo
3131
+ */
3132
+ function getAdaptiveCardDialogInfoFromTaskInfo(taskInfo) {
3133
+ // eslint-disable-next-line strict-null-checks/all
3134
+ var adaptiveCardDialogInfo = {
3135
+ card: taskInfo.card,
3136
+ size: {
3137
+ height: taskInfo.height ? taskInfo.height : DialogDimension.Small,
3138
+ width: taskInfo.width ? taskInfo.width : DialogDimension.Small,
3139
+ },
3140
+ title: taskInfo.title,
3141
+ };
3142
+ return adaptiveCardDialogInfo;
3143
+ }
3144
+ adaptiveCard.getAdaptiveCardDialogInfoFromTaskInfo = getAdaptiveCardDialogInfoFromTaskInfo;
3145
+ /**
3146
+ * @hidden
3147
+ * Converts {@link TaskInfo} to {@link BotAdaptiveCardDialogInfo}
3148
+ * @param taskInfo - TaskInfo object to convert
3149
+ * @returns - converted BotAdaptiveCardDialogInfo
3150
+ */
3151
+ function getBotAdaptiveCardDialogInfoFromTaskInfo(taskInfo) {
3152
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3153
+ var botAdaptiveCardDialogInfo = {
3154
+ card: taskInfo.card,
3155
+ size: {
3156
+ height: taskInfo.height ? taskInfo.height : DialogDimension.Small,
3157
+ width: taskInfo.width ? taskInfo.width : DialogDimension.Small,
3158
+ },
3159
+ title: taskInfo.title,
3160
+ completionBotId: taskInfo.completionBotId,
3161
+ };
3162
+ return botAdaptiveCardDialogInfo;
3163
+ }
3164
+ adaptiveCard.getBotAdaptiveCardDialogInfoFromTaskInfo = getBotAdaptiveCardDialogInfoFromTaskInfo;
3165
+ })(adaptiveCard = dialog.adaptiveCard || (dialog.adaptiveCard = {}));
2959
3166
  })(dialog || (dialog = {}));
2960
3167
 
2961
3168
  ;// CONCATENATED MODULE: ./src/public/menus.ts
@@ -4667,7 +4874,10 @@ function initializeCommunication(validMessageOrigins) {
4667
4874
  * Limited to Microsoft-internal use
4668
4875
  */
4669
4876
  function uninitializeCommunication() {
4670
- Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);
4877
+ if (Communication.currentWindow) {
4878
+ Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);
4879
+ }
4880
+ Communication.currentWindow = null;
4671
4881
  Communication.parentWindow = null;
4672
4882
  Communication.parentOrigin = null;
4673
4883
  Communication.childWindow = null;
@@ -4676,6 +4886,7 @@ function uninitializeCommunication() {
4676
4886
  CommunicationPrivate.childMessageQueue = [];
4677
4887
  CommunicationPrivate.nextMessageId = 0;
4678
4888
  CommunicationPrivate.callbacks = {};
4889
+ CommunicationPrivate.promiseCallbacks = {};
4679
4890
  }
4680
4891
  /**
4681
4892
  * @internal
@@ -5478,36 +5689,36 @@ function createTeamsDeepLinkForChat(users, topic, message) {
5478
5689
  if (users.length === 0) {
5479
5690
  throw new Error('Must have at least one user when creating a chat deep link');
5480
5691
  }
5481
- var usersSearchParameter = teamsDeepLinkUsersUrlParameterName + "=" + users.map(function (user) { return encodeURIComponent(user); }).join(',');
5482
- var topicSearchParameter = topic === undefined ? '' : "&" + teamsDeepLinkTopicUrlParameterName + "=" + encodeURIComponent(topic);
5483
- var messageSearchParameter = message === undefined ? '' : "&" + teamsDeepLinkMessageUrlParameterName + "=" + encodeURIComponent(message);
5484
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForChat + "?" + usersSearchParameter + topicSearchParameter + messageSearchParameter;
5692
+ var usersSearchParameter = "".concat(teamsDeepLinkUsersUrlParameterName, "=") + users.map(function (user) { return encodeURIComponent(user); }).join(',');
5693
+ var topicSearchParameter = topic === undefined ? '' : "&".concat(teamsDeepLinkTopicUrlParameterName, "=").concat(encodeURIComponent(topic));
5694
+ var messageSearchParameter = message === undefined ? '' : "&".concat(teamsDeepLinkMessageUrlParameterName, "=").concat(encodeURIComponent(message));
5695
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForChat, "?").concat(usersSearchParameter).concat(topicSearchParameter).concat(messageSearchParameter);
5485
5696
  }
5486
5697
  function createTeamsDeepLinkForCall(targets, withVideo, source) {
5487
5698
  if (targets.length === 0) {
5488
5699
  throw new Error('Must have at least one target when creating a call deep link');
5489
5700
  }
5490
- var usersSearchParameter = teamsDeepLinkUsersUrlParameterName + "=" + targets.map(function (user) { return encodeURIComponent(user); }).join(',');
5491
- var withVideoSearchParameter = withVideo === undefined ? '' : "&" + teamsDeepLinkWithVideoUrlParameterName + "=" + encodeURIComponent(withVideo);
5492
- var sourceSearchParameter = source === undefined ? '' : "&" + teamsDeepLinkSourceUrlParameterName + "=" + encodeURIComponent(source);
5493
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForCall + "?" + usersSearchParameter + withVideoSearchParameter + sourceSearchParameter;
5701
+ var usersSearchParameter = "".concat(teamsDeepLinkUsersUrlParameterName, "=") + targets.map(function (user) { return encodeURIComponent(user); }).join(',');
5702
+ var withVideoSearchParameter = withVideo === undefined ? '' : "&".concat(teamsDeepLinkWithVideoUrlParameterName, "=").concat(encodeURIComponent(withVideo));
5703
+ var sourceSearchParameter = source === undefined ? '' : "&".concat(teamsDeepLinkSourceUrlParameterName, "=").concat(encodeURIComponent(source));
5704
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForCall, "?").concat(usersSearchParameter).concat(withVideoSearchParameter).concat(sourceSearchParameter);
5494
5705
  }
5495
5706
  function createTeamsDeepLinkForCalendar(attendees, startTime, endTime, subject, content) {
5496
5707
  var attendeeSearchParameter = attendees === undefined
5497
5708
  ? ''
5498
- : teamsDeepLinkAttendeesUrlParameterName + "=" +
5709
+ : "".concat(teamsDeepLinkAttendeesUrlParameterName, "=") +
5499
5710
  attendees.map(function (attendee) { return encodeURIComponent(attendee); }).join(',');
5500
- var startTimeSearchParameter = startTime === undefined ? '' : "&" + teamsDeepLinkStartTimeUrlParameterName + "=" + encodeURIComponent(startTime);
5501
- var endTimeSearchParameter = endTime === undefined ? '' : "&" + teamsDeepLinkEndTimeUrlParameterName + "=" + encodeURIComponent(endTime);
5502
- var subjectSearchParameter = subject === undefined ? '' : "&" + teamsDeepLinkSubjectUrlParameterName + "=" + encodeURIComponent(subject);
5503
- var contentSearchParameter = content === undefined ? '' : "&" + teamsDeepLinkContentUrlParameterName + "=" + encodeURIComponent(content);
5504
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForCalendar + "?" + attendeeSearchParameter + startTimeSearchParameter + endTimeSearchParameter + subjectSearchParameter + contentSearchParameter;
5711
+ var startTimeSearchParameter = startTime === undefined ? '' : "&".concat(teamsDeepLinkStartTimeUrlParameterName, "=").concat(encodeURIComponent(startTime));
5712
+ var endTimeSearchParameter = endTime === undefined ? '' : "&".concat(teamsDeepLinkEndTimeUrlParameterName, "=").concat(encodeURIComponent(endTime));
5713
+ var subjectSearchParameter = subject === undefined ? '' : "&".concat(teamsDeepLinkSubjectUrlParameterName, "=").concat(encodeURIComponent(subject));
5714
+ var contentSearchParameter = content === undefined ? '' : "&".concat(teamsDeepLinkContentUrlParameterName, "=").concat(encodeURIComponent(content));
5715
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForCalendar, "?").concat(attendeeSearchParameter).concat(startTimeSearchParameter).concat(endTimeSearchParameter).concat(subjectSearchParameter).concat(contentSearchParameter);
5505
5716
  }
5506
5717
  function createTeamsDeepLinkForAppInstallDialog(appId) {
5507
5718
  if (!appId) {
5508
5719
  throw new Error('App ID must be set when creating an app install dialog deep link');
5509
5720
  }
5510
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForAppInstall + encodeURIComponent(appId);
5721
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForAppInstall).concat(encodeURIComponent(appId));
5511
5722
  }
5512
5723
 
5513
5724
  ;// CONCATENATED MODULE: ./src/public/appInstallDialog.ts
@@ -6546,6 +6757,21 @@ var geoLocation;
6546
6757
  })(map = geoLocation.map || (geoLocation.map = {}));
6547
6758
  })(geoLocation || (geoLocation = {}));
6548
6759
 
6760
+ ;// CONCATENATED MODULE: ./src/public/adaptiveCards.ts
6761
+
6762
+ /**
6763
+ * @returns The {@linkcode AdaptiveCardVersion} representing the Adaptive Card schema
6764
+ * version supported by the host, or undefined if the host does not support Adaptive Cards
6765
+ */
6766
+ function getAdaptiveCardSchemaVersion() {
6767
+ if (!runtime.hostVersionsInfo) {
6768
+ return undefined;
6769
+ }
6770
+ else {
6771
+ return runtime.hostVersionsInfo.adaptiveCardSchemaVersion;
6772
+ }
6773
+ }
6774
+
6549
6775
  ;// CONCATENATED MODULE: ./src/public/appWindow.ts
6550
6776
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
6551
6777
  /* eslint-disable @typescript-eslint/no-explicit-any */
@@ -6706,6 +6932,42 @@ var location_location;
6706
6932
  })(location_location || (location_location = {}));
6707
6933
 
6708
6934
  ;// CONCATENATED MODULE: ./src/public/meeting.ts
6935
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6936
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6937
+ return new (P || (P = Promise))(function (resolve, reject) {
6938
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6939
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6940
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6941
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
6942
+ });
6943
+ };
6944
+ var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
6945
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
6946
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
6947
+ function verb(n) { return function (v) { return step([n, v]); }; }
6948
+ function step(op) {
6949
+ if (f) throw new TypeError("Generator is already executing.");
6950
+ while (_) try {
6951
+ 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;
6952
+ if (y = 0, t) op = [op[0] & 2, t.value];
6953
+ switch (op[0]) {
6954
+ case 0: case 1: t = op; break;
6955
+ case 4: _.label++; return { value: op[1], done: false };
6956
+ case 5: _.label++; y = op[1]; op = [0]; continue;
6957
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
6958
+ default:
6959
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
6960
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
6961
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
6962
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
6963
+ if (t[2]) _.ops.pop();
6964
+ _.trys.pop(); continue;
6965
+ }
6966
+ op = body.call(thisArg, _);
6967
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
6968
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
6969
+ }
6970
+ };
6709
6971
 
6710
6972
 
6711
6973
 
@@ -6713,9 +6975,25 @@ var location_location;
6713
6975
 
6714
6976
  var meeting;
6715
6977
  (function (meeting) {
6978
+ /**
6979
+ * Reasons for the app's microphone state to change
6980
+ */
6981
+ var MicStateChangeReason;
6982
+ (function (MicStateChangeReason) {
6983
+ MicStateChangeReason[MicStateChangeReason["HostInitiated"] = 0] = "HostInitiated";
6984
+ MicStateChangeReason[MicStateChangeReason["AppInitiated"] = 1] = "AppInitiated";
6985
+ MicStateChangeReason[MicStateChangeReason["AppDeclinedToChange"] = 2] = "AppDeclinedToChange";
6986
+ MicStateChangeReason[MicStateChangeReason["AppFailedToChange"] = 3] = "AppFailedToChange";
6987
+ })(MicStateChangeReason || (MicStateChangeReason = {}));
6716
6988
  /**
6717
6989
  * Different types of meeting reactions that can be sent/received
6718
6990
  *
6991
+ * @hidden
6992
+ * Hide from docs.
6993
+ *
6994
+ * @internal
6995
+ * Limited to Microsoft-internal use
6996
+ *
6719
6997
  * @beta
6720
6998
  */
6721
6999
  var MeetingReactionType;
@@ -6964,6 +7242,12 @@ var meeting;
6964
7242
  *
6965
7243
  * @param handler The handler to invoke when the selfParticipant's (current user's) raiseHandState changes.
6966
7244
  *
7245
+ * @hidden
7246
+ * Hide from docs.
7247
+ *
7248
+ * @internal
7249
+ * Limited to Microsoft-internal use
7250
+ *
6967
7251
  * @beta
6968
7252
  */
6969
7253
  function registerRaiseHandStateChangedHandler(handler) {
@@ -6980,6 +7264,12 @@ var meeting;
6980
7264
  *
6981
7265
  * @param handler The handler to invoke when the selfParticipant (current user) successfully sends a meeting reaction
6982
7266
  *
7267
+ * @hidden
7268
+ * Hide from docs.
7269
+ *
7270
+ * @internal
7271
+ * Limited to Microsoft-internal use
7272
+ *
6983
7273
  * @beta
6984
7274
  */
6985
7275
  function registerMeetingReactionReceivedHandler(handler) {
@@ -7016,6 +7306,123 @@ var meeting;
7016
7306
  }
7017
7307
  appShareButton.setOptions = setOptions;
7018
7308
  })(appShareButton = meeting.appShareButton || (meeting.appShareButton = {}));
7309
+ /**
7310
+ * Have the app handle audio (mic & speaker) and turn off host audio.
7311
+ *
7312
+ * When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is true, the host will switch to audioless mode
7313
+ * Registers for mic mute status change events, which are events that the app can receive from the host asking the app to
7314
+ * mute or unmute the microphone.
7315
+ *
7316
+ * When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is false, the host will switch out of audioless mode
7317
+ * Unregisters the mic mute status change events so the app will no longer receive these events
7318
+ *
7319
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7320
+ * @throws Error if {@link RequestAppAudioHandlingParams.micMuteStateChangedCallback} parameter is not defined
7321
+ *
7322
+ * @param requestAppAudioHandlingParams - {@link RequestAppAudioHandlingParams} object with values for the audio switchover
7323
+ * @param callback - Callback with one parameter, the result
7324
+ * can either be true (the host is now in audioless mode) or false (the host is not in audioless mode)
7325
+ *
7326
+ * @hidden
7327
+ * Hide from docs.
7328
+ *
7329
+ * @internal
7330
+ * Limited to Microsoft-internal use
7331
+ *
7332
+ * @beta
7333
+ */
7334
+ function requestAppAudioHandling(requestAppAudioHandlingParams, callback) {
7335
+ if (!callback) {
7336
+ throw new Error('[requestAppAudioHandling] Callback response cannot be null');
7337
+ }
7338
+ if (!requestAppAudioHandlingParams.micMuteStateChangedCallback) {
7339
+ throw new Error('[requestAppAudioHandling] Callback Mic mute state handler cannot be null');
7340
+ }
7341
+ ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
7342
+ if (requestAppAudioHandlingParams.isAppHandlingAudio) {
7343
+ startAppAudioHandling(requestAppAudioHandlingParams, callback);
7344
+ }
7345
+ else {
7346
+ stopAppAudioHandling(requestAppAudioHandlingParams, callback);
7347
+ }
7348
+ }
7349
+ meeting.requestAppAudioHandling = requestAppAudioHandling;
7350
+ function startAppAudioHandling(requestAppAudioHandlingParams, callback) {
7351
+ var _this = this;
7352
+ var callbackInternalRequest = function (error, isHostAudioless) {
7353
+ if (error && isHostAudioless != null) {
7354
+ throw new Error('[requestAppAudioHandling] Callback response - both parameters cannot be set');
7355
+ }
7356
+ if (error) {
7357
+ throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(error.errorCode, " ").concat(error.message));
7358
+ }
7359
+ if (typeof isHostAudioless !== 'boolean') {
7360
+ throw new Error('[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean');
7361
+ }
7362
+ var micStateChangedCallback = function (micState) { return __awaiter(_this, void 0, void 0, function () {
7363
+ var newMicState, micStateDidUpdate, _a;
7364
+ return __generator(this, function (_b) {
7365
+ switch (_b.label) {
7366
+ case 0:
7367
+ _b.trys.push([0, 2, , 3]);
7368
+ return [4 /*yield*/, requestAppAudioHandlingParams.micMuteStateChangedCallback(micState)];
7369
+ case 1:
7370
+ newMicState = _b.sent();
7371
+ micStateDidUpdate = newMicState.isMicMuted === micState.isMicMuted;
7372
+ setMicStateWithReason(newMicState, micStateDidUpdate ? MicStateChangeReason.HostInitiated : MicStateChangeReason.AppDeclinedToChange);
7373
+ return [3 /*break*/, 3];
7374
+ case 2:
7375
+ _a = _b.sent();
7376
+ setMicStateWithReason(micState, MicStateChangeReason.AppFailedToChange);
7377
+ return [3 /*break*/, 3];
7378
+ case 3: return [2 /*return*/];
7379
+ }
7380
+ });
7381
+ }); };
7382
+ registerHandler('meeting.micStateChanged', micStateChangedCallback);
7383
+ callback(isHostAudioless);
7384
+ };
7385
+ sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalRequest);
7386
+ }
7387
+ function stopAppAudioHandling(requestAppAudioHandlingParams, callback) {
7388
+ var callbackInternalStop = function (error, isHostAudioless) {
7389
+ if (error && isHostAudioless != null) {
7390
+ throw new Error('[requestAppAudioHandling] Callback response - both parameters cannot be set');
7391
+ }
7392
+ if (error) {
7393
+ throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(error.errorCode, " ").concat(error.message));
7394
+ }
7395
+ if (typeof isHostAudioless !== 'boolean') {
7396
+ throw new Error('[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean');
7397
+ }
7398
+ if (doesHandlerExist('meeting.micStateChanged')) {
7399
+ removeHandler('meeting.micStateChanged');
7400
+ }
7401
+ callback(isHostAudioless);
7402
+ };
7403
+ sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalStop);
7404
+ }
7405
+ /**
7406
+ * Notifies the host that the microphone state has changed in the app.
7407
+ * @param micState - The new state that the microphone is in
7408
+ * isMicMuted - Boolean to indicate the current mute status of the mic.
7409
+ *
7410
+ * @hidden
7411
+ * Hide from docs.
7412
+ *
7413
+ * @internal
7414
+ * Limited to Microsoft-internal use
7415
+ *
7416
+ * @beta
7417
+ */
7418
+ function updateMicState(micState) {
7419
+ setMicStateWithReason(micState, MicStateChangeReason.AppInitiated);
7420
+ }
7421
+ meeting.updateMicState = updateMicState;
7422
+ function setMicStateWithReason(micState, reason) {
7423
+ ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
7424
+ sendMessageToParent('meeting.updateMicState', [micState, reason]);
7425
+ }
7019
7426
  })(meeting || (meeting = {}));
7020
7427
 
7021
7428
  ;// CONCATENATED MODULE: ./src/public/monetization.ts
@@ -7585,7 +7992,7 @@ var search;
7585
7992
 
7586
7993
  /**
7587
7994
  * Namespace to open a share dialog for web content.
7588
- * For more info, see {@link https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab Share to Teams from personal app or tab}
7995
+ * For more info, see [Share to Teams from personal app or tab](https://learn.microsoft.com/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab)
7589
7996
  */
7590
7997
  var sharing;
7591
7998
  (function (sharing) {
@@ -7891,6 +8298,8 @@ var appInitialization;
7891
8298
 
7892
8299
 
7893
8300
 
8301
+
8302
+
7894
8303
  /**
7895
8304
  * @deprecated
7896
8305
  * As of 2.0.0, please use {@link app.initialize app.initialize(validMessageOrigins?: string[]): Promise\<void\>} instead.
@@ -7936,10 +8345,12 @@ function print() {
7936
8345
  */
7937
8346
  function getContext(callback) {
7938
8347
  ensureInitializeCalled();
7939
- app.getContext().then(function (context) {
7940
- if (callback) {
7941
- callback(transformAppContextToLegacyContext(context));
8348
+ sendMessageToParent('getContext', function (context) {
8349
+ if (!context.frameContext) {
8350
+ // Fallback logic for frameContext properties
8351
+ context.frameContext = GlobalVars.frameContext;
7942
8352
  }
8353
+ callback(context);
7943
8354
  });
7944
8355
  }
7945
8356
  /**
@@ -8154,86 +8565,6 @@ function setFrameContext(frameContext) {
8154
8565
  function initializeWithFrameContext(frameContext, callback, validMessageOrigins) {
8155
8566
  pages.initializeWithFrameContext(frameContext, callback, validMessageOrigins);
8156
8567
  }
8157
- /**
8158
- * Transforms the app.Context object received to the legacy global Context object
8159
- * @param appContext - The app.Context object to be transformed
8160
- * @returns The transformed legacy global Context object
8161
- */
8162
- function transformAppContextToLegacyContext(appContext) {
8163
- var context = {
8164
- // actionInfo
8165
- actionInfo: appContext.actionInfo,
8166
- // app
8167
- locale: appContext.app.locale,
8168
- appSessionId: appContext.app.sessionId,
8169
- theme: appContext.app.theme,
8170
- appIconPosition: appContext.app.iconPositionVertical,
8171
- osLocaleInfo: appContext.app.osLocaleInfo,
8172
- parentMessageId: appContext.app.parentMessageId,
8173
- userClickTime: appContext.app.userClickTime,
8174
- userFileOpenPreference: appContext.app.userFileOpenPreference,
8175
- appLaunchId: appContext.app.appLaunchId,
8176
- // app.host
8177
- hostClientType: appContext.app.host.clientType,
8178
- sessionId: appContext.app.host.sessionId,
8179
- ringId: appContext.app.host.ringId,
8180
- // page
8181
- entityId: appContext.page.id,
8182
- frameContext: appContext.page.frameContext,
8183
- subEntityId: appContext.page.subPageId,
8184
- isFullScreen: appContext.page.isFullScreen,
8185
- isMultiWindow: appContext.page.isMultiWindow,
8186
- sourceOrigin: appContext.page.sourceOrigin,
8187
- // user
8188
- userObjectId: appContext.user !== undefined ? appContext.user.id : undefined,
8189
- isCallingAllowed: appContext.user !== undefined ? appContext.user.isCallingAllowed : undefined,
8190
- isPSTNCallingAllowed: appContext.user !== undefined ? appContext.user.isPSTNCallingAllowed : undefined,
8191
- userLicenseType: appContext.user !== undefined ? appContext.user.licenseType : undefined,
8192
- loginHint: appContext.user !== undefined ? appContext.user.loginHint : undefined,
8193
- userPrincipalName: appContext.user !== undefined ? appContext.user.userPrincipalName : undefined,
8194
- // user.tenant
8195
- tid: appContext.user !== undefined
8196
- ? appContext.user.tenant !== undefined
8197
- ? appContext.user.tenant.id
8198
- : undefined
8199
- : undefined,
8200
- tenantSKU: appContext.user !== undefined
8201
- ? appContext.user.tenant !== undefined
8202
- ? appContext.user.tenant.teamsSku
8203
- : undefined
8204
- : undefined,
8205
- // channel
8206
- channelId: appContext.channel !== undefined ? appContext.channel.id : undefined,
8207
- channelName: appContext.channel !== undefined ? appContext.channel.displayName : undefined,
8208
- channelRelativeUrl: appContext.channel !== undefined ? appContext.channel.relativeUrl : undefined,
8209
- channelType: appContext.channel !== undefined ? appContext.channel.membershipType : undefined,
8210
- defaultOneNoteSectionId: appContext.channel !== undefined ? appContext.channel.defaultOneNoteSectionId : undefined,
8211
- hostTeamGroupId: appContext.channel !== undefined ? appContext.channel.ownerGroupId : undefined,
8212
- hostTeamTenantId: appContext.channel !== undefined ? appContext.channel.ownerTenantId : undefined,
8213
- // chat
8214
- chatId: appContext.chat !== undefined ? appContext.chat.id : undefined,
8215
- // meeting
8216
- meetingId: appContext.meeting !== undefined ? appContext.meeting.id : undefined,
8217
- // sharepoint
8218
- sharepoint: appContext.sharepoint,
8219
- // team
8220
- teamId: appContext.team !== undefined ? appContext.team.internalId : undefined,
8221
- teamName: appContext.team !== undefined ? appContext.team.displayName : undefined,
8222
- teamType: appContext.team !== undefined ? appContext.team.type : undefined,
8223
- groupId: appContext.team !== undefined ? appContext.team.groupId : undefined,
8224
- teamTemplateId: appContext.team !== undefined ? appContext.team.templateId : undefined,
8225
- isTeamArchived: appContext.team !== undefined ? appContext.team.isArchived : undefined,
8226
- userTeamRole: appContext.team !== undefined ? appContext.team.userRole : undefined,
8227
- // sharepointSite
8228
- teamSiteUrl: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteUrl : undefined,
8229
- teamSiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteDomain : undefined,
8230
- teamSitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSitePath : undefined,
8231
- teamSiteId: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteId : undefined,
8232
- mySitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySitePath : undefined,
8233
- mySiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySiteDomain : undefined,
8234
- };
8235
- return context;
8236
- }
8237
8568
 
8238
8569
  ;// CONCATENATED MODULE: ./src/public/navigation.ts
8239
8570
 
@@ -8447,9 +8778,9 @@ var tasks;
8447
8778
  (function (tasks) {
8448
8779
  /**
8449
8780
  * @deprecated
8450
- * As of 2.0.0, please use {@link dialog.open dialog.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
8451
- * and {@link dialog.bot.open dialog.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot based dialogs. In Teams,
8452
- * this function can be used for adaptive card based dialogs. Support for adaptive card based dialogs is coming to other hosts in the future.
8781
+ * As of 2.8.0, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
8782
+ * and {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot-based dialogs. In Teams,
8783
+ * this function can be used for Adaptive Card-based dialogs. Support for Adaptive Card-based dialogs is coming to other hosts in the future.
8453
8784
  *
8454
8785
  * Allows an app to open the task module.
8455
8786
  *
@@ -8461,15 +8792,19 @@ var tasks;
8461
8792
  ? /* eslint-disable-next-line strict-null-checks/all */ /* fix tracked by 5730662 */
8462
8793
  function (sdkResponse) { return submitHandler(sdkResponse.err, sdkResponse.result); }
8463
8794
  : undefined;
8464
- if (taskInfo.card !== undefined || taskInfo.url === undefined) {
8795
+ if (taskInfo.card === undefined && taskInfo.url === undefined) {
8796
+ ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
8797
+ sendMessageToParent('tasks.startTask', [taskInfo], submitHandler);
8798
+ }
8799
+ else if (taskInfo.card) {
8465
8800
  ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
8466
8801
  sendMessageToParent('tasks.startTask', [taskInfo], submitHandler);
8467
8802
  }
8468
8803
  else if (taskInfo.completionBotId !== undefined) {
8469
- dialog.bot.open(getBotUrlDialogInfoFromTaskInfo(taskInfo), dialogSubmitHandler);
8804
+ dialog.url.bot.open(getBotUrlDialogInfoFromTaskInfo(taskInfo), dialogSubmitHandler);
8470
8805
  }
8471
8806
  else {
8472
- dialog.open(getUrlDialogInfoFromTaskInfo(taskInfo), dialogSubmitHandler);
8807
+ dialog.url.open(getUrlDialogInfoFromTaskInfo(taskInfo), dialogSubmitHandler);
8473
8808
  }
8474
8809
  return new ChildAppWindow();
8475
8810
  }
@@ -8494,7 +8829,7 @@ var tasks;
8494
8829
  tasks.updateTask = updateTask;
8495
8830
  /**
8496
8831
  * @deprecated
8497
- * As of 2.0.0, please use {@link dialog.submit} instead.
8832
+ * As of 2.8.0, please use {@link dialog.url.submit} instead.
8498
8833
  *
8499
8834
  * Submit the task module.
8500
8835
  *
@@ -8502,7 +8837,7 @@ var tasks;
8502
8837
  * @param appIds - Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.
8503
8838
  */
8504
8839
  function submitTask(result, appIds) {
8505
- dialog.submit(result, appIds);
8840
+ dialog.url.submit(result, appIds);
8506
8841
  }
8507
8842
  tasks.submitTask = submitTask;
8508
8843
  /**
@@ -8759,6 +9094,7 @@ var LiveShareHost = /** @class */ (function () {
8759
9094
 
8760
9095
 
8761
9096
 
9097
+
8762
9098
 
8763
9099
 
8764
9100