@microsoft/teams-js 2.8.0-beta.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/MicrosoftTeams.d.ts +162 -25
- package/dist/MicrosoftTeams.js +592 -477
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +34 -1
package/dist/MicrosoftTeams.js
CHANGED
@@ -11,248 +11,176 @@
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
12
12
|
/******/ var __webpack_modules__ = ({
|
13
13
|
|
14
|
-
/***/
|
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
|
-
*
|
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
|
-
|
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
|
-
}
|
56
|
-
|
57
|
-
module.exports = bytesToUuid;
|
58
|
-
|
59
|
-
|
60
|
-
/***/ }),
|
61
|
-
|
62
|
-
/***/ 157:
|
63
|
-
/***/ ((module) => {
|
64
|
-
|
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
|
69
|
-
|
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));
|
74
|
-
|
75
|
-
if (getRandomValues) {
|
76
|
-
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
|
77
|
-
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
|
78
|
-
|
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);
|
89
20
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
return rnds;
|
97
|
-
};
|
98
|
-
}
|
99
|
-
|
100
|
-
|
101
|
-
/***/ }),
|
102
|
-
|
103
|
-
/***/ 481:
|
104
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
105
|
-
|
106
|
-
var rng = __webpack_require__(157);
|
107
|
-
var bytesToUuid = __webpack_require__(725);
|
108
|
-
|
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
|
113
|
-
|
114
|
-
var _nodeId;
|
115
|
-
var _clockseq;
|
116
|
-
|
117
|
-
// Previous uuid creation time
|
118
|
-
var _lastMSecs = 0;
|
119
|
-
var _lastNSecs = 0;
|
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;
|
120
27
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
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
|
+
*/
|
125
41
|
|
42
|
+
module.exports = function(val, options) {
|
126
43
|
options = options || {};
|
127
|
-
var
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
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
|
-
}
|
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);
|
146
49
|
}
|
50
|
+
throw new Error(
|
51
|
+
'val is not a non-empty string or a valid number. val=' +
|
52
|
+
JSON.stringify(val)
|
53
|
+
);
|
54
|
+
};
|
147
55
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
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;
|
56
|
+
/**
|
57
|
+
* Parse the given `str` and return milliseconds.
|
58
|
+
*
|
59
|
+
* @param {String} str
|
60
|
+
* @return {Number}
|
61
|
+
* @api private
|
62
|
+
*/
|
160
63
|
|
161
|
-
|
162
|
-
|
163
|
-
|
64
|
+
function parse(str) {
|
65
|
+
str = String(str);
|
66
|
+
if (str.length > 100) {
|
67
|
+
return;
|
164
68
|
}
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
if (
|
169
|
-
|
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;
|
170
74
|
}
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
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;
|
175
118
|
}
|
119
|
+
}
|
176
120
|
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
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;
|
121
|
+
/**
|
122
|
+
* Short format for `ms`.
|
123
|
+
*
|
124
|
+
* @param {Number} ms
|
125
|
+
* @return {String}
|
126
|
+
* @api private
|
127
|
+
*/
|
205
128
|
|
206
|
-
|
207
|
-
|
208
|
-
|
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';
|
209
142
|
}
|
210
|
-
|
211
|
-
return buf ? buf : bytesToUuid(b);
|
143
|
+
return ms + 'ms';
|
212
144
|
}
|
213
145
|
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
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;
|
146
|
+
/**
|
147
|
+
* Long format for `ms`.
|
148
|
+
*
|
149
|
+
* @param {Number} ms
|
150
|
+
* @return {String}
|
151
|
+
* @api private
|
152
|
+
*/
|
227
153
|
|
228
|
-
|
229
|
-
|
230
|
-
|
154
|
+
function fmtLong(ms) {
|
155
|
+
var msAbs = Math.abs(ms);
|
156
|
+
if (msAbs >= d) {
|
157
|
+
return plural(ms, msAbs, d, 'day');
|
231
158
|
}
|
232
|
-
|
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
|
-
}
|
159
|
+
if (msAbs >= h) {
|
160
|
+
return plural(ms, msAbs, h, 'hour');
|
245
161
|
}
|
246
|
-
|
247
|
-
|
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';
|
248
169
|
}
|
249
170
|
|
250
|
-
|
171
|
+
/**
|
172
|
+
* Pluralization helper.
|
173
|
+
*/
|
174
|
+
|
175
|
+
function plural(ms, msAbs, n, name) {
|
176
|
+
var isPlural = msAbs >= n * 1.5;
|
177
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
178
|
+
}
|
251
179
|
|
252
180
|
|
253
181
|
/***/ }),
|
254
182
|
|
255
|
-
/***/
|
183
|
+
/***/ 130:
|
256
184
|
/***/ ((module, exports, __webpack_require__) => {
|
257
185
|
|
258
186
|
/* eslint-env browser */
|
@@ -509,7 +437,7 @@ function localstorage() {
|
|
509
437
|
}
|
510
438
|
}
|
511
439
|
|
512
|
-
module.exports = __webpack_require__(
|
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
|
-
/***/
|
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__(
|
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.
|
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
|
-
/***/
|
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
|
-
*
|
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
|
-
|
820
|
-
var
|
821
|
-
var
|
822
|
-
|
823
|
-
|
824
|
-
|
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;
|
839
784
|
|
840
|
-
module.exports = function(val, options) {
|
841
|
-
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);
|
847
|
-
}
|
848
|
-
throw new Error(
|
849
|
-
'val is not a non-empty string or a valid number. val=' +
|
850
|
-
JSON.stringify(val)
|
851
|
-
);
|
852
|
-
};
|
853
785
|
|
854
|
-
|
855
|
-
* Parse the given `str` and return milliseconds.
|
856
|
-
*
|
857
|
-
* @param {String} str
|
858
|
-
* @return {Number}
|
859
|
-
* @api private
|
860
|
-
*/
|
786
|
+
/***/ }),
|
861
787
|
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
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 || [];
|
851
|
+
|
852
|
+
options = options || {};
|
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
|
+
}
|
916
872
|
}
|
917
|
-
}
|
918
873
|
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
* @api private
|
925
|
-
*/
|
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();
|
926
879
|
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
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;
|
931
890
|
}
|
932
|
-
|
933
|
-
|
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;
|
934
896
|
}
|
935
|
-
|
936
|
-
|
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');
|
937
901
|
}
|
938
|
-
|
939
|
-
|
902
|
+
|
903
|
+
_lastMSecs = msecs;
|
904
|
+
_lastNSecs = nsecs;
|
905
|
+
_clockseq = clockseq;
|
906
|
+
|
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];
|
940
935
|
}
|
941
|
-
|
936
|
+
|
937
|
+
return buf ? buf : bytesToUuid(b);
|
942
938
|
}
|
943
939
|
|
944
|
-
|
945
|
-
* Long format for `ms`.
|
946
|
-
*
|
947
|
-
* @param {Number} ms
|
948
|
-
* @return {String}
|
949
|
-
* @api private
|
950
|
-
*/
|
940
|
+
module.exports = v1;
|
951
941
|
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
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;
|
965
957
|
}
|
966
|
-
|
967
|
-
}
|
958
|
+
options = options || {};
|
968
959
|
|
969
|
-
|
970
|
-
* Pluralization helper.
|
971
|
-
*/
|
960
|
+
var rnds = options.random || (options.rng || rng)();
|
972
961
|
|
973
|
-
|
974
|
-
|
975
|
-
|
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;
|
965
|
+
|
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
|
+
|
973
|
+
return buf || bytesToUuid(rnds);
|
976
974
|
}
|
977
975
|
|
976
|
+
module.exports = v4;
|
977
|
+
|
978
978
|
|
979
979
|
/***/ })
|
980
980
|
|
@@ -1316,8 +1316,8 @@ var GlobalVars = /** @class */ (function () {
|
|
1316
1316
|
}());
|
1317
1317
|
|
1318
1318
|
|
1319
|
-
// EXTERNAL MODULE:
|
1320
|
-
var browser = __webpack_require__(
|
1319
|
+
// EXTERNAL MODULE: ../../node_modules/debug/src/browser.js
|
1320
|
+
var browser = __webpack_require__(130);
|
1321
1321
|
;// CONCATENATED MODULE: ./src/internal/telemetry.ts
|
1322
1322
|
|
1323
1323
|
var topLevelLogger = (0,browser.debug)('teamsJs');
|
@@ -1877,7 +1877,7 @@ function createTeamsAppLink(params) {
|
|
1877
1877
|
* @returns true if the Adaptive Card Version is not supported and false if it is supported.
|
1878
1878
|
*/
|
1879
1879
|
function isHostAdaptiveCardSchemaVersionUnsupported(hostAdaptiveCardSchemaVersion) {
|
1880
|
-
var versionCheck = compareSDKVersions(hostAdaptiveCardSchemaVersion.majorVersion
|
1880
|
+
var versionCheck = compareSDKVersions("".concat(hostAdaptiveCardSchemaVersion.majorVersion, ".").concat(hostAdaptiveCardSchemaVersion.minorVersion), "".concat(minAdaptiveCardVersion.majorVersion, ".").concat(minAdaptiveCardVersion.minorVersion));
|
1881
1881
|
if (versionCheck >= 0) {
|
1882
1882
|
return false;
|
1883
1883
|
}
|
@@ -2151,7 +2151,7 @@ var _minRuntimeConfigToUninitialize = {
|
|
2151
2151
|
};
|
2152
2152
|
|
2153
2153
|
;// CONCATENATED MODULE: ./src/public/version.ts
|
2154
|
-
var version = "2.8.0
|
2154
|
+
var version = "2.8.0";
|
2155
2155
|
|
2156
2156
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2157
2157
|
|
@@ -2209,8 +2209,8 @@ function ensureInitialized(runtime) {
|
|
2209
2209
|
}
|
2210
2210
|
}
|
2211
2211
|
if (!found) {
|
2212
|
-
throw new Error("This call is only allowed in following contexts: "
|
2213
|
-
|
2212
|
+
throw new Error("This call is only allowed in following contexts: ".concat(JSON.stringify(expectedFrameContexts), ". ") +
|
2213
|
+
"Current context: \"".concat(GlobalVars.frameContext, "\"."));
|
2214
2214
|
}
|
2215
2215
|
}
|
2216
2216
|
return isRuntimeInitialized(runtime);
|
@@ -2765,6 +2765,9 @@ var dialog;
|
|
2765
2765
|
/**
|
2766
2766
|
* Submit the dialog module and close the dialog
|
2767
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
|
+
*
|
2768
2771
|
* @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
|
2769
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
|
2770
2773
|
*
|
@@ -2787,8 +2790,8 @@ var dialog;
|
|
2787
2790
|
/**
|
2788
2791
|
* Send message to the parent from dialog
|
2789
2792
|
*
|
2790
|
-
*
|
2791
|
-
* This function is only called from
|
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.
|
2792
2795
|
*
|
2793
2796
|
* @param message - The message to send to the parent
|
2794
2797
|
*
|
@@ -2825,7 +2828,7 @@ var dialog;
|
|
2825
2828
|
* Register a listener that will be triggered when a message is received from the app that opened the dialog.
|
2826
2829
|
*
|
2827
2830
|
* @remarks
|
2828
|
-
* This function is only called from
|
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.
|
2829
2832
|
*
|
2830
2833
|
* @param listener - The listener that will be triggered.
|
2831
2834
|
*
|
@@ -3009,7 +3012,7 @@ var dialog;
|
|
3009
3012
|
* This function cannot be called from inside of a dialog
|
3010
3013
|
*
|
3011
3014
|
* @param adaptiveCardDialogInfo - An object containing the parameters of the dialog module {@link AdaptiveCardDialogInfo}.
|
3012
|
-
* @param submitHandler - Handler that triggers when a dialog calls the {@linkcode submit} function or when the user closes the dialog.
|
3015
|
+
* @param submitHandler - Handler that triggers when a dialog calls the {@linkcode url.submit} function or when the user closes the dialog.
|
3013
3016
|
*
|
3014
3017
|
* @beta
|
3015
3018
|
*/
|
@@ -3355,12 +3358,14 @@ var teamsCore;
|
|
3355
3358
|
}
|
3356
3359
|
teamsCore.print = print;
|
3357
3360
|
/**
|
3358
|
-
* @hidden
|
3359
3361
|
* Registers a handler to be called when the page has been requested to load.
|
3360
3362
|
*
|
3363
|
+
* @remarks Check out [App Caching in Teams](https://learn.microsoft.com/microsoftteams/platform/apps-in-teams-meetings/build-tabs-for-meeting?tabs=desktop%2Cmeeting-chat-view-desktop%2Cmeeting-stage-view-desktop%2Cchannel-meeting-desktop#app-caching)
|
3364
|
+
* for a more detailed explanation about using this API.
|
3365
|
+
*
|
3361
3366
|
* @param handler - The handler to invoke when the page is loaded.
|
3362
3367
|
*
|
3363
|
-
* @
|
3368
|
+
* @beta
|
3364
3369
|
*/
|
3365
3370
|
function registerOnLoadHandler(handler) {
|
3366
3371
|
registerOnLoadHandlerHelper(handler, function () {
|
@@ -3390,13 +3395,15 @@ var teamsCore;
|
|
3390
3395
|
}
|
3391
3396
|
teamsCore.registerOnLoadHandlerHelper = registerOnLoadHandlerHelper;
|
3392
3397
|
/**
|
3393
|
-
* @hidden
|
3394
3398
|
* Registers a handler to be called before the page is unloaded.
|
3395
3399
|
*
|
3400
|
+
* @remarks Check out [App Caching in Teams](https://learn.microsoft.com/microsoftteams/platform/apps-in-teams-meetings/build-tabs-for-meeting?tabs=desktop%2Cmeeting-chat-view-desktop%2Cmeeting-stage-view-desktop%2Cchannel-meeting-desktop#app-caching)
|
3401
|
+
* for a more detailed explanation about using this API.
|
3402
|
+
*
|
3396
3403
|
* @param handler - The handler to invoke before the page is unloaded. If this handler returns true the page should
|
3397
3404
|
* invoke the readyToUnload function provided to it once it's ready to be unloaded.
|
3398
3405
|
*
|
3399
|
-
* @
|
3406
|
+
* @beta
|
3400
3407
|
*/
|
3401
3408
|
function registerBeforeUnloadHandler(handler) {
|
3402
3409
|
registerBeforeUnloadHandlerHelper(handler, function () {
|
@@ -4871,7 +4878,10 @@ function initializeCommunication(validMessageOrigins) {
|
|
4871
4878
|
* Limited to Microsoft-internal use
|
4872
4879
|
*/
|
4873
4880
|
function uninitializeCommunication() {
|
4874
|
-
Communication.currentWindow
|
4881
|
+
if (Communication.currentWindow) {
|
4882
|
+
Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);
|
4883
|
+
}
|
4884
|
+
Communication.currentWindow = null;
|
4875
4885
|
Communication.parentWindow = null;
|
4876
4886
|
Communication.parentOrigin = null;
|
4877
4887
|
Communication.childWindow = null;
|
@@ -5683,36 +5693,36 @@ function createTeamsDeepLinkForChat(users, topic, message) {
|
|
5683
5693
|
if (users.length === 0) {
|
5684
5694
|
throw new Error('Must have at least one user when creating a chat deep link');
|
5685
5695
|
}
|
5686
|
-
var usersSearchParameter = teamsDeepLinkUsersUrlParameterName
|
5687
|
-
var topicSearchParameter = topic === undefined ? '' : "&"
|
5688
|
-
var messageSearchParameter = message === undefined ? '' : "&"
|
5689
|
-
return teamsDeepLinkProtocol
|
5696
|
+
var usersSearchParameter = "".concat(teamsDeepLinkUsersUrlParameterName, "=") + users.map(function (user) { return encodeURIComponent(user); }).join(',');
|
5697
|
+
var topicSearchParameter = topic === undefined ? '' : "&".concat(teamsDeepLinkTopicUrlParameterName, "=").concat(encodeURIComponent(topic));
|
5698
|
+
var messageSearchParameter = message === undefined ? '' : "&".concat(teamsDeepLinkMessageUrlParameterName, "=").concat(encodeURIComponent(message));
|
5699
|
+
return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForChat, "?").concat(usersSearchParameter).concat(topicSearchParameter).concat(messageSearchParameter);
|
5690
5700
|
}
|
5691
5701
|
function createTeamsDeepLinkForCall(targets, withVideo, source) {
|
5692
5702
|
if (targets.length === 0) {
|
5693
5703
|
throw new Error('Must have at least one target when creating a call deep link');
|
5694
5704
|
}
|
5695
|
-
var usersSearchParameter = teamsDeepLinkUsersUrlParameterName
|
5696
|
-
var withVideoSearchParameter = withVideo === undefined ? '' : "&"
|
5697
|
-
var sourceSearchParameter = source === undefined ? '' : "&"
|
5698
|
-
return teamsDeepLinkProtocol
|
5705
|
+
var usersSearchParameter = "".concat(teamsDeepLinkUsersUrlParameterName, "=") + targets.map(function (user) { return encodeURIComponent(user); }).join(',');
|
5706
|
+
var withVideoSearchParameter = withVideo === undefined ? '' : "&".concat(teamsDeepLinkWithVideoUrlParameterName, "=").concat(encodeURIComponent(withVideo));
|
5707
|
+
var sourceSearchParameter = source === undefined ? '' : "&".concat(teamsDeepLinkSourceUrlParameterName, "=").concat(encodeURIComponent(source));
|
5708
|
+
return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForCall, "?").concat(usersSearchParameter).concat(withVideoSearchParameter).concat(sourceSearchParameter);
|
5699
5709
|
}
|
5700
5710
|
function createTeamsDeepLinkForCalendar(attendees, startTime, endTime, subject, content) {
|
5701
5711
|
var attendeeSearchParameter = attendees === undefined
|
5702
5712
|
? ''
|
5703
|
-
: teamsDeepLinkAttendeesUrlParameterName
|
5713
|
+
: "".concat(teamsDeepLinkAttendeesUrlParameterName, "=") +
|
5704
5714
|
attendees.map(function (attendee) { return encodeURIComponent(attendee); }).join(',');
|
5705
|
-
var startTimeSearchParameter = startTime === undefined ? '' : "&"
|
5706
|
-
var endTimeSearchParameter = endTime === undefined ? '' : "&"
|
5707
|
-
var subjectSearchParameter = subject === undefined ? '' : "&"
|
5708
|
-
var contentSearchParameter = content === undefined ? '' : "&"
|
5709
|
-
return teamsDeepLinkProtocol
|
5715
|
+
var startTimeSearchParameter = startTime === undefined ? '' : "&".concat(teamsDeepLinkStartTimeUrlParameterName, "=").concat(encodeURIComponent(startTime));
|
5716
|
+
var endTimeSearchParameter = endTime === undefined ? '' : "&".concat(teamsDeepLinkEndTimeUrlParameterName, "=").concat(encodeURIComponent(endTime));
|
5717
|
+
var subjectSearchParameter = subject === undefined ? '' : "&".concat(teamsDeepLinkSubjectUrlParameterName, "=").concat(encodeURIComponent(subject));
|
5718
|
+
var contentSearchParameter = content === undefined ? '' : "&".concat(teamsDeepLinkContentUrlParameterName, "=").concat(encodeURIComponent(content));
|
5719
|
+
return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForCalendar, "?").concat(attendeeSearchParameter).concat(startTimeSearchParameter).concat(endTimeSearchParameter).concat(subjectSearchParameter).concat(contentSearchParameter);
|
5710
5720
|
}
|
5711
5721
|
function createTeamsDeepLinkForAppInstallDialog(appId) {
|
5712
5722
|
if (!appId) {
|
5713
5723
|
throw new Error('App ID must be set when creating an app install dialog deep link');
|
5714
5724
|
}
|
5715
|
-
return teamsDeepLinkProtocol
|
5725
|
+
return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForAppInstall).concat(encodeURIComponent(appId));
|
5716
5726
|
}
|
5717
5727
|
|
5718
5728
|
;// CONCATENATED MODULE: ./src/public/appInstallDialog.ts
|
@@ -6754,7 +6764,7 @@ var geoLocation;
|
|
6754
6764
|
;// CONCATENATED MODULE: ./src/public/adaptiveCards.ts
|
6755
6765
|
|
6756
6766
|
/**
|
6757
|
-
* @returns The {@linkcode
|
6767
|
+
* @returns The {@linkcode AdaptiveCardVersion} representing the Adaptive Card schema
|
6758
6768
|
* version supported by the host, or undefined if the host does not support Adaptive Cards
|
6759
6769
|
*/
|
6760
6770
|
function getAdaptiveCardSchemaVersion() {
|
@@ -6926,6 +6936,42 @@ var location_location;
|
|
6926
6936
|
})(location_location || (location_location = {}));
|
6927
6937
|
|
6928
6938
|
;// CONCATENATED MODULE: ./src/public/meeting.ts
|
6939
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6940
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6941
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
6942
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6943
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6944
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
6945
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
6946
|
+
});
|
6947
|
+
};
|
6948
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
6949
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
6950
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
6951
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
6952
|
+
function step(op) {
|
6953
|
+
if (f) throw new TypeError("Generator is already executing.");
|
6954
|
+
while (_) try {
|
6955
|
+
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;
|
6956
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
6957
|
+
switch (op[0]) {
|
6958
|
+
case 0: case 1: t = op; break;
|
6959
|
+
case 4: _.label++; return { value: op[1], done: false };
|
6960
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
6961
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
6962
|
+
default:
|
6963
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
6964
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
6965
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
6966
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
6967
|
+
if (t[2]) _.ops.pop();
|
6968
|
+
_.trys.pop(); continue;
|
6969
|
+
}
|
6970
|
+
op = body.call(thisArg, _);
|
6971
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
6972
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
6973
|
+
}
|
6974
|
+
};
|
6929
6975
|
|
6930
6976
|
|
6931
6977
|
|
@@ -6933,9 +6979,25 @@ var location_location;
|
|
6933
6979
|
|
6934
6980
|
var meeting;
|
6935
6981
|
(function (meeting) {
|
6982
|
+
/**
|
6983
|
+
* Reasons for the app's microphone state to change
|
6984
|
+
*/
|
6985
|
+
var MicStateChangeReason;
|
6986
|
+
(function (MicStateChangeReason) {
|
6987
|
+
MicStateChangeReason[MicStateChangeReason["HostInitiated"] = 0] = "HostInitiated";
|
6988
|
+
MicStateChangeReason[MicStateChangeReason["AppInitiated"] = 1] = "AppInitiated";
|
6989
|
+
MicStateChangeReason[MicStateChangeReason["AppDeclinedToChange"] = 2] = "AppDeclinedToChange";
|
6990
|
+
MicStateChangeReason[MicStateChangeReason["AppFailedToChange"] = 3] = "AppFailedToChange";
|
6991
|
+
})(MicStateChangeReason || (MicStateChangeReason = {}));
|
6936
6992
|
/**
|
6937
6993
|
* Different types of meeting reactions that can be sent/received
|
6938
6994
|
*
|
6995
|
+
* @hidden
|
6996
|
+
* Hide from docs.
|
6997
|
+
*
|
6998
|
+
* @internal
|
6999
|
+
* Limited to Microsoft-internal use
|
7000
|
+
*
|
6939
7001
|
* @beta
|
6940
7002
|
*/
|
6941
7003
|
var MeetingReactionType;
|
@@ -7184,6 +7246,12 @@ var meeting;
|
|
7184
7246
|
*
|
7185
7247
|
* @param handler The handler to invoke when the selfParticipant's (current user's) raiseHandState changes.
|
7186
7248
|
*
|
7249
|
+
* @hidden
|
7250
|
+
* Hide from docs.
|
7251
|
+
*
|
7252
|
+
* @internal
|
7253
|
+
* Limited to Microsoft-internal use
|
7254
|
+
*
|
7187
7255
|
* @beta
|
7188
7256
|
*/
|
7189
7257
|
function registerRaiseHandStateChangedHandler(handler) {
|
@@ -7200,6 +7268,12 @@ var meeting;
|
|
7200
7268
|
*
|
7201
7269
|
* @param handler The handler to invoke when the selfParticipant (current user) successfully sends a meeting reaction
|
7202
7270
|
*
|
7271
|
+
* @hidden
|
7272
|
+
* Hide from docs.
|
7273
|
+
*
|
7274
|
+
* @internal
|
7275
|
+
* Limited to Microsoft-internal use
|
7276
|
+
*
|
7203
7277
|
* @beta
|
7204
7278
|
*/
|
7205
7279
|
function registerMeetingReactionReceivedHandler(handler) {
|
@@ -7236,6 +7310,123 @@ var meeting;
|
|
7236
7310
|
}
|
7237
7311
|
appShareButton.setOptions = setOptions;
|
7238
7312
|
})(appShareButton = meeting.appShareButton || (meeting.appShareButton = {}));
|
7313
|
+
/**
|
7314
|
+
* Have the app handle audio (mic & speaker) and turn off host audio.
|
7315
|
+
*
|
7316
|
+
* When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is true, the host will switch to audioless mode
|
7317
|
+
* Registers for mic mute status change events, which are events that the app can receive from the host asking the app to
|
7318
|
+
* mute or unmute the microphone.
|
7319
|
+
*
|
7320
|
+
* When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is false, the host will switch out of audioless mode
|
7321
|
+
* Unregisters the mic mute status change events so the app will no longer receive these events
|
7322
|
+
*
|
7323
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
7324
|
+
* @throws Error if {@link RequestAppAudioHandlingParams.micMuteStateChangedCallback} parameter is not defined
|
7325
|
+
*
|
7326
|
+
* @param requestAppAudioHandlingParams - {@link RequestAppAudioHandlingParams} object with values for the audio switchover
|
7327
|
+
* @param callback - Callback with one parameter, the result
|
7328
|
+
* can either be true (the host is now in audioless mode) or false (the host is not in audioless mode)
|
7329
|
+
*
|
7330
|
+
* @hidden
|
7331
|
+
* Hide from docs.
|
7332
|
+
*
|
7333
|
+
* @internal
|
7334
|
+
* Limited to Microsoft-internal use
|
7335
|
+
*
|
7336
|
+
* @beta
|
7337
|
+
*/
|
7338
|
+
function requestAppAudioHandling(requestAppAudioHandlingParams, callback) {
|
7339
|
+
if (!callback) {
|
7340
|
+
throw new Error('[requestAppAudioHandling] Callback response cannot be null');
|
7341
|
+
}
|
7342
|
+
if (!requestAppAudioHandlingParams.micMuteStateChangedCallback) {
|
7343
|
+
throw new Error('[requestAppAudioHandling] Callback Mic mute state handler cannot be null');
|
7344
|
+
}
|
7345
|
+
ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
7346
|
+
if (requestAppAudioHandlingParams.isAppHandlingAudio) {
|
7347
|
+
startAppAudioHandling(requestAppAudioHandlingParams, callback);
|
7348
|
+
}
|
7349
|
+
else {
|
7350
|
+
stopAppAudioHandling(requestAppAudioHandlingParams, callback);
|
7351
|
+
}
|
7352
|
+
}
|
7353
|
+
meeting.requestAppAudioHandling = requestAppAudioHandling;
|
7354
|
+
function startAppAudioHandling(requestAppAudioHandlingParams, callback) {
|
7355
|
+
var _this = this;
|
7356
|
+
var callbackInternalRequest = function (error, isHostAudioless) {
|
7357
|
+
if (error && isHostAudioless != null) {
|
7358
|
+
throw new Error('[requestAppAudioHandling] Callback response - both parameters cannot be set');
|
7359
|
+
}
|
7360
|
+
if (error) {
|
7361
|
+
throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(error.errorCode, " ").concat(error.message));
|
7362
|
+
}
|
7363
|
+
if (typeof isHostAudioless !== 'boolean') {
|
7364
|
+
throw new Error('[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean');
|
7365
|
+
}
|
7366
|
+
var micStateChangedCallback = function (micState) { return __awaiter(_this, void 0, void 0, function () {
|
7367
|
+
var newMicState, micStateDidUpdate, _a;
|
7368
|
+
return __generator(this, function (_b) {
|
7369
|
+
switch (_b.label) {
|
7370
|
+
case 0:
|
7371
|
+
_b.trys.push([0, 2, , 3]);
|
7372
|
+
return [4 /*yield*/, requestAppAudioHandlingParams.micMuteStateChangedCallback(micState)];
|
7373
|
+
case 1:
|
7374
|
+
newMicState = _b.sent();
|
7375
|
+
micStateDidUpdate = newMicState.isMicMuted === micState.isMicMuted;
|
7376
|
+
setMicStateWithReason(newMicState, micStateDidUpdate ? MicStateChangeReason.HostInitiated : MicStateChangeReason.AppDeclinedToChange);
|
7377
|
+
return [3 /*break*/, 3];
|
7378
|
+
case 2:
|
7379
|
+
_a = _b.sent();
|
7380
|
+
setMicStateWithReason(micState, MicStateChangeReason.AppFailedToChange);
|
7381
|
+
return [3 /*break*/, 3];
|
7382
|
+
case 3: return [2 /*return*/];
|
7383
|
+
}
|
7384
|
+
});
|
7385
|
+
}); };
|
7386
|
+
registerHandler('meeting.micStateChanged', micStateChangedCallback);
|
7387
|
+
callback(isHostAudioless);
|
7388
|
+
};
|
7389
|
+
sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalRequest);
|
7390
|
+
}
|
7391
|
+
function stopAppAudioHandling(requestAppAudioHandlingParams, callback) {
|
7392
|
+
var callbackInternalStop = function (error, isHostAudioless) {
|
7393
|
+
if (error && isHostAudioless != null) {
|
7394
|
+
throw new Error('[requestAppAudioHandling] Callback response - both parameters cannot be set');
|
7395
|
+
}
|
7396
|
+
if (error) {
|
7397
|
+
throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(error.errorCode, " ").concat(error.message));
|
7398
|
+
}
|
7399
|
+
if (typeof isHostAudioless !== 'boolean') {
|
7400
|
+
throw new Error('[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean');
|
7401
|
+
}
|
7402
|
+
if (doesHandlerExist('meeting.micStateChanged')) {
|
7403
|
+
removeHandler('meeting.micStateChanged');
|
7404
|
+
}
|
7405
|
+
callback(isHostAudioless);
|
7406
|
+
};
|
7407
|
+
sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalStop);
|
7408
|
+
}
|
7409
|
+
/**
|
7410
|
+
* Notifies the host that the microphone state has changed in the app.
|
7411
|
+
* @param micState - The new state that the microphone is in
|
7412
|
+
* isMicMuted - Boolean to indicate the current mute status of the mic.
|
7413
|
+
*
|
7414
|
+
* @hidden
|
7415
|
+
* Hide from docs.
|
7416
|
+
*
|
7417
|
+
* @internal
|
7418
|
+
* Limited to Microsoft-internal use
|
7419
|
+
*
|
7420
|
+
* @beta
|
7421
|
+
*/
|
7422
|
+
function updateMicState(micState) {
|
7423
|
+
setMicStateWithReason(micState, MicStateChangeReason.AppInitiated);
|
7424
|
+
}
|
7425
|
+
meeting.updateMicState = updateMicState;
|
7426
|
+
function setMicStateWithReason(micState, reason) {
|
7427
|
+
ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
7428
|
+
sendMessageToParent('meeting.updateMicState', [micState, reason]);
|
7429
|
+
}
|
7239
7430
|
})(meeting || (meeting = {}));
|
7240
7431
|
|
7241
7432
|
;// CONCATENATED MODULE: ./src/public/monetization.ts
|
@@ -7805,7 +7996,7 @@ var search;
|
|
7805
7996
|
|
7806
7997
|
/**
|
7807
7998
|
* Namespace to open a share dialog for web content.
|
7808
|
-
* For more info, see
|
7999
|
+
* 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)
|
7809
8000
|
*/
|
7810
8001
|
var sharing;
|
7811
8002
|
(function (sharing) {
|
@@ -8111,6 +8302,8 @@ var appInitialization;
|
|
8111
8302
|
|
8112
8303
|
|
8113
8304
|
|
8305
|
+
|
8306
|
+
|
8114
8307
|
/**
|
8115
8308
|
* @deprecated
|
8116
8309
|
* As of 2.0.0, please use {@link app.initialize app.initialize(validMessageOrigins?: string[]): Promise\<void\>} instead.
|
@@ -8156,10 +8349,12 @@ function print() {
|
|
8156
8349
|
*/
|
8157
8350
|
function getContext(callback) {
|
8158
8351
|
ensureInitializeCalled();
|
8159
|
-
|
8160
|
-
if (
|
8161
|
-
|
8352
|
+
sendMessageToParent('getContext', function (context) {
|
8353
|
+
if (!context.frameContext) {
|
8354
|
+
// Fallback logic for frameContext properties
|
8355
|
+
context.frameContext = GlobalVars.frameContext;
|
8162
8356
|
}
|
8357
|
+
callback(context);
|
8163
8358
|
});
|
8164
8359
|
}
|
8165
8360
|
/**
|
@@ -8374,86 +8569,6 @@ function setFrameContext(frameContext) {
|
|
8374
8569
|
function initializeWithFrameContext(frameContext, callback, validMessageOrigins) {
|
8375
8570
|
pages.initializeWithFrameContext(frameContext, callback, validMessageOrigins);
|
8376
8571
|
}
|
8377
|
-
/**
|
8378
|
-
* Transforms the app.Context object received to the legacy global Context object
|
8379
|
-
* @param appContext - The app.Context object to be transformed
|
8380
|
-
* @returns The transformed legacy global Context object
|
8381
|
-
*/
|
8382
|
-
function transformAppContextToLegacyContext(appContext) {
|
8383
|
-
var context = {
|
8384
|
-
// actionInfo
|
8385
|
-
actionInfo: appContext.actionInfo,
|
8386
|
-
// app
|
8387
|
-
locale: appContext.app.locale,
|
8388
|
-
appSessionId: appContext.app.sessionId,
|
8389
|
-
theme: appContext.app.theme,
|
8390
|
-
appIconPosition: appContext.app.iconPositionVertical,
|
8391
|
-
osLocaleInfo: appContext.app.osLocaleInfo,
|
8392
|
-
parentMessageId: appContext.app.parentMessageId,
|
8393
|
-
userClickTime: appContext.app.userClickTime,
|
8394
|
-
userFileOpenPreference: appContext.app.userFileOpenPreference,
|
8395
|
-
appLaunchId: appContext.app.appLaunchId,
|
8396
|
-
// app.host
|
8397
|
-
hostClientType: appContext.app.host.clientType,
|
8398
|
-
sessionId: appContext.app.host.sessionId,
|
8399
|
-
ringId: appContext.app.host.ringId,
|
8400
|
-
// page
|
8401
|
-
entityId: appContext.page.id,
|
8402
|
-
frameContext: appContext.page.frameContext,
|
8403
|
-
subEntityId: appContext.page.subPageId,
|
8404
|
-
isFullScreen: appContext.page.isFullScreen,
|
8405
|
-
isMultiWindow: appContext.page.isMultiWindow,
|
8406
|
-
sourceOrigin: appContext.page.sourceOrigin,
|
8407
|
-
// user
|
8408
|
-
userObjectId: appContext.user !== undefined ? appContext.user.id : undefined,
|
8409
|
-
isCallingAllowed: appContext.user !== undefined ? appContext.user.isCallingAllowed : undefined,
|
8410
|
-
isPSTNCallingAllowed: appContext.user !== undefined ? appContext.user.isPSTNCallingAllowed : undefined,
|
8411
|
-
userLicenseType: appContext.user !== undefined ? appContext.user.licenseType : undefined,
|
8412
|
-
loginHint: appContext.user !== undefined ? appContext.user.loginHint : undefined,
|
8413
|
-
userPrincipalName: appContext.user !== undefined ? appContext.user.userPrincipalName : undefined,
|
8414
|
-
// user.tenant
|
8415
|
-
tid: appContext.user !== undefined
|
8416
|
-
? appContext.user.tenant !== undefined
|
8417
|
-
? appContext.user.tenant.id
|
8418
|
-
: undefined
|
8419
|
-
: undefined,
|
8420
|
-
tenantSKU: appContext.user !== undefined
|
8421
|
-
? appContext.user.tenant !== undefined
|
8422
|
-
? appContext.user.tenant.teamsSku
|
8423
|
-
: undefined
|
8424
|
-
: undefined,
|
8425
|
-
// channel
|
8426
|
-
channelId: appContext.channel !== undefined ? appContext.channel.id : undefined,
|
8427
|
-
channelName: appContext.channel !== undefined ? appContext.channel.displayName : undefined,
|
8428
|
-
channelRelativeUrl: appContext.channel !== undefined ? appContext.channel.relativeUrl : undefined,
|
8429
|
-
channelType: appContext.channel !== undefined ? appContext.channel.membershipType : undefined,
|
8430
|
-
defaultOneNoteSectionId: appContext.channel !== undefined ? appContext.channel.defaultOneNoteSectionId : undefined,
|
8431
|
-
hostTeamGroupId: appContext.channel !== undefined ? appContext.channel.ownerGroupId : undefined,
|
8432
|
-
hostTeamTenantId: appContext.channel !== undefined ? appContext.channel.ownerTenantId : undefined,
|
8433
|
-
// chat
|
8434
|
-
chatId: appContext.chat !== undefined ? appContext.chat.id : undefined,
|
8435
|
-
// meeting
|
8436
|
-
meetingId: appContext.meeting !== undefined ? appContext.meeting.id : undefined,
|
8437
|
-
// sharepoint
|
8438
|
-
sharepoint: appContext.sharepoint,
|
8439
|
-
// team
|
8440
|
-
teamId: appContext.team !== undefined ? appContext.team.internalId : undefined,
|
8441
|
-
teamName: appContext.team !== undefined ? appContext.team.displayName : undefined,
|
8442
|
-
teamType: appContext.team !== undefined ? appContext.team.type : undefined,
|
8443
|
-
groupId: appContext.team !== undefined ? appContext.team.groupId : undefined,
|
8444
|
-
teamTemplateId: appContext.team !== undefined ? appContext.team.templateId : undefined,
|
8445
|
-
isTeamArchived: appContext.team !== undefined ? appContext.team.isArchived : undefined,
|
8446
|
-
userTeamRole: appContext.team !== undefined ? appContext.team.userRole : undefined,
|
8447
|
-
// sharepointSite
|
8448
|
-
teamSiteUrl: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteUrl : undefined,
|
8449
|
-
teamSiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteDomain : undefined,
|
8450
|
-
teamSitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSitePath : undefined,
|
8451
|
-
teamSiteId: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteId : undefined,
|
8452
|
-
mySitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySitePath : undefined,
|
8453
|
-
mySiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySiteDomain : undefined,
|
8454
|
-
};
|
8455
|
-
return context;
|
8456
|
-
}
|
8457
8572
|
|
8458
8573
|
;// CONCATENATED MODULE: ./src/public/navigation.ts
|
8459
8574
|
|
@@ -8667,7 +8782,7 @@ var tasks;
|
|
8667
8782
|
(function (tasks) {
|
8668
8783
|
/**
|
8669
8784
|
* @deprecated
|
8670
|
-
* As of 2.
|
8785
|
+
* 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
|
8671
8786
|
* and {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot-based dialogs. In Teams,
|
8672
8787
|
* this function can be used for Adaptive Card-based dialogs. Support for Adaptive Card-based dialogs is coming to other hosts in the future.
|
8673
8788
|
*
|
@@ -8718,7 +8833,7 @@ var tasks;
|
|
8718
8833
|
tasks.updateTask = updateTask;
|
8719
8834
|
/**
|
8720
8835
|
* @deprecated
|
8721
|
-
* As of 2.
|
8836
|
+
* As of 2.8.0, please use {@link dialog.url.submit} instead.
|
8722
8837
|
*
|
8723
8838
|
* Submit the task module.
|
8724
8839
|
*
|