@microsoft/teams-js 2.3.0 → 2.4.0-beta.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.
@@ -11,6 +11,175 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
+ /***/ 378:
15
+ /***/ ((module) => {
16
+
17
+ /**
18
+ * Helpers.
19
+ */
20
+
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;
27
+
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
+ */
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
+ };
55
+
56
+ /**
57
+ * Parse the given `str` and return milliseconds.
58
+ *
59
+ * @param {String} str
60
+ * @return {Number}
61
+ * @api private
62
+ */
63
+
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
+ }
120
+
121
+ /**
122
+ * Short format for `ms`.
123
+ *
124
+ * @param {Number} ms
125
+ * @return {String}
126
+ * @api private
127
+ */
128
+
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
+ }
145
+
146
+ /**
147
+ * Long format for `ms`.
148
+ *
149
+ * @param {Number} ms
150
+ * @return {String}
151
+ * @api private
152
+ */
153
+
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
+ }
170
+
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
+ }
179
+
180
+
181
+ /***/ }),
182
+
14
183
  /***/ 22:
15
184
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
185
 
@@ -544,7 +713,7 @@ function setup(env) {
544
713
  createDebug.disable = disable;
545
714
  createDebug.enable = enable;
546
715
  createDebug.enabled = enabled;
547
- createDebug.humanize = __webpack_require__(824);
716
+ createDebug.humanize = __webpack_require__(378);
548
717
  createDebug.destroy = destroy;
549
718
 
550
719
  Object.keys(env).forEach(key => {
@@ -807,487 +976,161 @@ function setup(env) {
807
976
  module.exports = setup;
808
977
 
809
978
 
810
- /***/ }),
811
-
812
- /***/ 824:
813
- /***/ ((module) => {
814
-
815
- /**
816
- * Helpers.
817
- */
979
+ /***/ })
818
980
 
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;
981
+ /******/ });
982
+ /************************************************************************/
983
+ /******/ // The module cache
984
+ /******/ var __webpack_module_cache__ = {};
985
+ /******/
986
+ /******/ // The require function
987
+ /******/ function __webpack_require__(moduleId) {
988
+ /******/ // Check if module is in cache
989
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
990
+ /******/ if (cachedModule !== undefined) {
991
+ /******/ return cachedModule.exports;
992
+ /******/ }
993
+ /******/ // Create a new module (and put it into the cache)
994
+ /******/ var module = __webpack_module_cache__[moduleId] = {
995
+ /******/ // no module.id needed
996
+ /******/ // no module.loaded needed
997
+ /******/ exports: {}
998
+ /******/ };
999
+ /******/
1000
+ /******/ // Execute the module function
1001
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1002
+ /******/
1003
+ /******/ // Return the exports of the module
1004
+ /******/ return module.exports;
1005
+ /******/ }
1006
+ /******/
1007
+ /************************************************************************/
1008
+ /******/ /* webpack/runtime/define property getters */
1009
+ /******/ (() => {
1010
+ /******/ // define getter functions for harmony exports
1011
+ /******/ __webpack_require__.d = (exports, definition) => {
1012
+ /******/ for(var key in definition) {
1013
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1014
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1015
+ /******/ }
1016
+ /******/ }
1017
+ /******/ };
1018
+ /******/ })();
1019
+ /******/
1020
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
1021
+ /******/ (() => {
1022
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1023
+ /******/ })();
1024
+ /******/
1025
+ /******/ /* webpack/runtime/make namespace object */
1026
+ /******/ (() => {
1027
+ /******/ // define __esModule on exports
1028
+ /******/ __webpack_require__.r = (exports) => {
1029
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1030
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1031
+ /******/ }
1032
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
1033
+ /******/ };
1034
+ /******/ })();
1035
+ /******/
1036
+ /************************************************************************/
1037
+ var __webpack_exports__ = {};
1038
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1039
+ (() => {
1040
+ "use strict";
1041
+ // ESM COMPAT FLAG
1042
+ __webpack_require__.r(__webpack_exports__);
825
1043
 
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
- */
839
-
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
-
854
- /**
855
- * Parse the given `str` and return milliseconds.
856
- *
857
- * @param {String} str
858
- * @return {Number}
859
- * @api private
860
- */
861
-
862
- function parse(str) {
863
- str = String(str);
864
- if (str.length > 100) {
865
- return;
866
- }
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;
872
- }
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;
916
- }
917
- }
918
-
919
- /**
920
- * Short format for `ms`.
921
- *
922
- * @param {Number} ms
923
- * @return {String}
924
- * @api private
925
- */
926
-
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';
937
- }
938
- if (msAbs >= s) {
939
- return Math.round(ms / s) + 's';
940
- }
941
- return ms + 'ms';
942
- }
943
-
944
- /**
945
- * Long format for `ms`.
946
- *
947
- * @param {Number} ms
948
- * @return {String}
949
- * @api private
950
- */
951
-
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
- }
968
-
969
- /**
970
- * Pluralization helper.
971
- */
972
-
973
- function plural(ms, msAbs, n, name) {
974
- var isPlural = msAbs >= n * 1.5;
975
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
976
- }
977
-
978
-
979
- /***/ })
980
-
981
- /******/ });
982
- /************************************************************************/
983
- /******/ // The module cache
984
- /******/ var __webpack_module_cache__ = {};
985
- /******/
986
- /******/ // The require function
987
- /******/ function __webpack_require__(moduleId) {
988
- /******/ // Check if module is in cache
989
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
990
- /******/ if (cachedModule !== undefined) {
991
- /******/ return cachedModule.exports;
992
- /******/ }
993
- /******/ // Create a new module (and put it into the cache)
994
- /******/ var module = __webpack_module_cache__[moduleId] = {
995
- /******/ // no module.id needed
996
- /******/ // no module.loaded needed
997
- /******/ exports: {}
998
- /******/ };
999
- /******/
1000
- /******/ // Execute the module function
1001
- /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1002
- /******/
1003
- /******/ // Return the exports of the module
1004
- /******/ return module.exports;
1005
- /******/ }
1006
- /******/
1007
- /************************************************************************/
1008
- /******/ /* webpack/runtime/define property getters */
1009
- /******/ (() => {
1010
- /******/ // define getter functions for harmony exports
1011
- /******/ __webpack_require__.d = (exports, definition) => {
1012
- /******/ for(var key in definition) {
1013
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
1014
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
1015
- /******/ }
1016
- /******/ }
1017
- /******/ };
1018
- /******/ })();
1019
- /******/
1020
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
1021
- /******/ (() => {
1022
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1023
- /******/ })();
1024
- /******/
1025
- /******/ /* webpack/runtime/make namespace object */
1026
- /******/ (() => {
1027
- /******/ // define __esModule on exports
1028
- /******/ __webpack_require__.r = (exports) => {
1029
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1030
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1031
- /******/ }
1032
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
1033
- /******/ };
1034
- /******/ })();
1035
- /******/
1036
- /************************************************************************/
1037
- var __webpack_exports__ = {};
1038
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
1039
- (() => {
1040
- "use strict";
1041
- // ESM COMPAT FLAG
1042
- __webpack_require__.r(__webpack_exports__);
1043
-
1044
- // EXPORTS
1045
- __webpack_require__.d(__webpack_exports__, {
1046
- "ActionObjectType": () => (/* reexport */ ActionObjectType),
1047
- "ChannelType": () => (/* reexport */ ChannelType),
1048
- "ChildAppWindow": () => (/* reexport */ ChildAppWindow),
1049
- "DialogDimension": () => (/* reexport */ DialogDimension),
1050
- "ErrorCode": () => (/* reexport */ ErrorCode),
1051
- "FileOpenPreference": () => (/* reexport */ FileOpenPreference),
1052
- "FrameContexts": () => (/* reexport */ FrameContexts),
1053
- "HostClientType": () => (/* reexport */ HostClientType),
1054
- "HostName": () => (/* reexport */ HostName),
1055
- "NotificationTypes": () => (/* reexport */ NotificationTypes),
1056
- "ParentAppWindow": () => (/* reexport */ ParentAppWindow),
1057
- "SecondaryM365ContentIdName": () => (/* reexport */ SecondaryM365ContentIdName),
1058
- "TaskModuleDimension": () => (/* reexport */ TaskModuleDimension),
1059
- "TeamType": () => (/* reexport */ TeamType),
1060
- "UserSettingTypes": () => (/* reexport */ UserSettingTypes),
1061
- "UserTeamRole": () => (/* reexport */ UserTeamRole),
1062
- "ViewerActionTypes": () => (/* reexport */ ViewerActionTypes),
1063
- "app": () => (/* reexport */ app_app),
1064
- "appEntity": () => (/* reexport */ appEntity),
1065
- "appInitialization": () => (/* reexport */ appInitialization),
1066
- "appInstallDialog": () => (/* reexport */ appInstallDialog),
1067
- "authentication": () => (/* reexport */ authentication),
1068
- "barCode": () => (/* reexport */ barCode),
1069
- "calendar": () => (/* reexport */ calendar),
1070
- "call": () => (/* reexport */ call),
1071
- "chat": () => (/* reexport */ chat),
1072
- "conversations": () => (/* reexport */ conversations),
1073
- "dialog": () => (/* reexport */ dialog),
1074
- "enablePrintCapability": () => (/* reexport */ enablePrintCapability),
1075
- "executeDeepLink": () => (/* reexport */ executeDeepLink),
1076
- "files": () => (/* reexport */ files),
1077
- "geoLocation": () => (/* reexport */ geoLocation),
1078
- "getContext": () => (/* reexport */ getContext),
1079
- "getMruTabInstances": () => (/* reexport */ getMruTabInstances),
1080
- "getTabInstances": () => (/* reexport */ getTabInstances),
1081
- "initialize": () => (/* reexport */ initialize),
1082
- "initializeWithFrameContext": () => (/* reexport */ initializeWithFrameContext),
1083
- "location": () => (/* reexport */ location_location),
1084
- "logs": () => (/* reexport */ logs),
1085
- "mail": () => (/* reexport */ mail),
1086
- "media": () => (/* reexport */ media),
1087
- "meeting": () => (/* reexport */ meeting),
1088
- "meetingRoom": () => (/* reexport */ meetingRoom),
1089
- "menus": () => (/* reexport */ menus),
1090
- "monetization": () => (/* reexport */ monetization),
1091
- "navigateBack": () => (/* reexport */ navigateBack),
1092
- "navigateCrossDomain": () => (/* reexport */ navigateCrossDomain),
1093
- "navigateToTab": () => (/* reexport */ navigateToTab),
1094
- "notifications": () => (/* reexport */ notifications),
1095
- "openFilePreview": () => (/* reexport */ openFilePreview),
1096
- "pages": () => (/* reexport */ pages),
1097
- "people": () => (/* reexport */ people),
1098
- "print": () => (/* reexport */ print),
1099
- "profile": () => (/* reexport */ profile),
1100
- "registerAppButtonClickHandler": () => (/* reexport */ registerAppButtonClickHandler),
1101
- "registerAppButtonHoverEnterHandler": () => (/* reexport */ registerAppButtonHoverEnterHandler),
1102
- "registerAppButtonHoverLeaveHandler": () => (/* reexport */ registerAppButtonHoverLeaveHandler),
1103
- "registerBackButtonHandler": () => (/* reexport */ registerBackButtonHandler),
1104
- "registerBeforeUnloadHandler": () => (/* reexport */ registerBeforeUnloadHandler),
1105
- "registerChangeSettingsHandler": () => (/* reexport */ registerChangeSettingsHandler),
1106
- "registerCustomHandler": () => (/* reexport */ registerCustomHandler),
1107
- "registerFocusEnterHandler": () => (/* reexport */ registerFocusEnterHandler),
1108
- "registerFullScreenHandler": () => (/* reexport */ registerFullScreenHandler),
1109
- "registerOnLoadHandler": () => (/* reexport */ registerOnLoadHandler),
1110
- "registerOnThemeChangeHandler": () => (/* reexport */ registerOnThemeChangeHandler),
1111
- "registerUserSettingsChangeHandler": () => (/* reexport */ registerUserSettingsChangeHandler),
1112
- "remoteCamera": () => (/* reexport */ remoteCamera),
1113
- "returnFocus": () => (/* reexport */ returnFocus),
1114
- "search": () => (/* reexport */ search),
1115
- "sendCustomEvent": () => (/* reexport */ sendCustomEvent),
1116
- "sendCustomMessage": () => (/* reexport */ sendCustomMessage),
1117
- "setFrameContext": () => (/* reexport */ setFrameContext),
1118
- "settings": () => (/* reexport */ settings),
1119
- "shareDeepLink": () => (/* reexport */ shareDeepLink),
1120
- "sharing": () => (/* reexport */ sharing),
1121
- "stageView": () => (/* reexport */ stageView),
1122
- "tasks": () => (/* reexport */ tasks),
1123
- "teams": () => (/* reexport */ teams),
1124
- "teamsCore": () => (/* reexport */ teamsCore),
1125
- "uploadCustomApp": () => (/* reexport */ uploadCustomApp),
1126
- "video": () => (/* reexport */ video),
1127
- "videoEx": () => (/* reexport */ videoEx),
1128
- "webStorage": () => (/* reexport */ webStorage)
1129
- });
1130
-
1131
- ;// CONCATENATED MODULE: ./src/internal/constants.ts
1132
- var version = "2.3.0";
1133
- /**
1134
- * @hidden
1135
- * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
1136
- * Modified to 2.0.1 which is hightest till now so that if any client doesn't pass version in initialize function, it will be set to highest.
1137
- * Mobile clients are passing versions, hence will be applicable to web and desktop clients only.
1138
- *
1139
- * @internal
1140
- * Limited to Microsoft-internal use
1141
- */
1142
- var defaultSDKVersionForCompatCheck = '2.0.1';
1143
- /**
1144
- * @hidden
1145
- * This is the client version when selectMedia API - VideoAndImage is supported on mobile.
1146
- *
1147
- * @internal
1148
- * Limited to Microsoft-internal use
1149
- */
1150
- var videoAndImageMediaAPISupportVersion = '2.0.2';
1151
- /**
1152
- * @hidden
1153
- * This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.
1154
- *
1155
- * @internal
1156
- * Limited to Microsoft-internal use
1157
- */
1158
- var nonFullScreenVideoModeAPISupportVersion = '2.0.3';
1159
- /**
1160
- * @hidden
1161
- * This is the client version when selectMedia API - ImageOutputFormats is supported on mobile.
1162
- *
1163
- * @internal
1164
- * Limited to Microsoft-internal use
1165
- */
1166
- var imageOutputFormatsAPISupportVersion = '2.0.4';
1167
- /**
1168
- * @hidden
1169
- * Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}
1170
- *
1171
- * @internal
1172
- * Limited to Microsoft-internal use
1173
- */
1174
- var getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';
1175
- /**
1176
- * @hidden
1177
- * This is the client version when location APIs (getLocation and showLocation) are supported.
1178
- *
1179
- * @internal
1180
- * Limited to Microsoft-internal use
1181
- */
1182
- var locationAPIsRequiredVersion = '1.9.0';
1183
- /**
1184
- * @hidden
1185
- * This is the client version when permisisons are supported
1186
- *
1187
- * @internal
1188
- * Limited to Microsoft-internal use
1189
- */
1190
- var permissionsAPIsRequiredVersion = '2.0.1';
1191
- /**
1192
- * @hidden
1193
- * This is the client version when people picker API is supported on mobile.
1194
- *
1195
- * @internal
1196
- * Limited to Microsoft-internal use
1197
- */
1198
- var peoplePickerRequiredVersion = '2.0.0';
1199
- /**
1200
- * @hidden
1201
- * This is the client version when captureImage API is supported on mobile.
1202
- *
1203
- * @internal
1204
- * Limited to Microsoft-internal use
1205
- */
1206
- var captureImageMobileSupportVersion = '1.7.0';
1207
- /**
1208
- * @hidden
1209
- * This is the client version when media APIs are supported on all three platforms ios, android and web.
1210
- *
1211
- * @internal
1212
- * Limited to Microsoft-internal use
1213
- */
1214
- var mediaAPISupportVersion = '1.8.0';
1215
- /**
1216
- * @hidden
1217
- * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
1218
- *
1219
- * @internal
1220
- * Limited to Microsoft-internal use
1221
- */
1222
- var getMediaCallbackSupportVersion = '2.0.0';
1223
- /**
1224
- * @hidden
1225
- * This is the client version when scanBarCode API is supported on mobile.
1226
- *
1227
- * @internal
1228
- * Limited to Microsoft-internal use
1229
- */
1230
- var scanBarCodeAPIMobileSupportVersion = '1.9.0';
1231
- /**
1232
- * @hidden
1233
- * List of supported Host origins
1234
- *
1235
- * @internal
1236
- * Limited to Microsoft-internal use
1237
- */
1238
- var validOrigins = [
1239
- 'teams.microsoft.com',
1240
- 'teams.microsoft.us',
1241
- 'gov.teams.microsoft.us',
1242
- 'dod.teams.microsoft.us',
1243
- 'int.teams.microsoft.com',
1244
- 'teams.live.com',
1245
- 'devspaces.skype.com',
1246
- 'ssauth.skype.com',
1247
- 'local.teams.live.com',
1248
- 'local.teams.live.com:8080',
1249
- 'local.teams.office.com',
1250
- 'local.teams.office.com:8080',
1251
- 'msft.spoppe.com',
1252
- '*.sharepoint.com',
1253
- '*.sharepoint-df.com',
1254
- '*.sharepointonline.com',
1255
- 'outlook.office.com',
1256
- 'outlook-sdf.office.com',
1257
- 'outlook.office365.com',
1258
- 'outlook-sdf.office365.com',
1259
- '*.teams.microsoft.com',
1260
- 'www.office.com',
1261
- 'word.office.com',
1262
- 'excel.office.com',
1263
- 'powerpoint.office.com',
1264
- 'www.officeppe.com',
1265
- '*.www.office.com',
1266
- ];
1267
- /**
1268
- * @hidden
1269
- * USer specified message origins should satisfy this test
1270
- *
1271
- * @internal
1272
- * Limited to Microsoft-internal use
1273
- */
1274
- var userOriginUrlValidationRegExp = /^https:\/\//;
1275
- /**
1276
- * @hidden
1277
- * The protocol used for deep links into Teams
1278
- *
1279
- * @internal
1280
- * Limited to Microsoft-internal use
1281
- */
1282
- var teamsDeepLinkProtocol = 'https';
1283
- /**
1284
- * @hidden
1285
- * The host used for deep links into Teams
1286
- *
1287
- * @internal
1288
- * Limited to Microsoft-internal use
1289
- */
1290
- var teamsDeepLinkHost = 'teams.microsoft.com';
1044
+ // EXPORTS
1045
+ __webpack_require__.d(__webpack_exports__, {
1046
+ "ActionObjectType": () => (/* reexport */ ActionObjectType),
1047
+ "ChannelType": () => (/* reexport */ ChannelType),
1048
+ "ChildAppWindow": () => (/* reexport */ ChildAppWindow),
1049
+ "DialogDimension": () => (/* reexport */ DialogDimension),
1050
+ "ErrorCode": () => (/* reexport */ ErrorCode),
1051
+ "FileOpenPreference": () => (/* reexport */ FileOpenPreference),
1052
+ "FrameContexts": () => (/* reexport */ FrameContexts),
1053
+ "HostClientType": () => (/* reexport */ HostClientType),
1054
+ "HostName": () => (/* reexport */ HostName),
1055
+ "NotificationTypes": () => (/* reexport */ NotificationTypes),
1056
+ "ParentAppWindow": () => (/* reexport */ ParentAppWindow),
1057
+ "SecondaryM365ContentIdName": () => (/* reexport */ SecondaryM365ContentIdName),
1058
+ "TaskModuleDimension": () => (/* reexport */ TaskModuleDimension),
1059
+ "TeamType": () => (/* reexport */ TeamType),
1060
+ "UserSettingTypes": () => (/* reexport */ UserSettingTypes),
1061
+ "UserTeamRole": () => (/* reexport */ UserTeamRole),
1062
+ "ViewerActionTypes": () => (/* reexport */ ViewerActionTypes),
1063
+ "app": () => (/* reexport */ app_app),
1064
+ "appEntity": () => (/* reexport */ appEntity),
1065
+ "appInitialization": () => (/* reexport */ appInitialization),
1066
+ "appInstallDialog": () => (/* reexport */ appInstallDialog),
1067
+ "authentication": () => (/* reexport */ authentication),
1068
+ "barCode": () => (/* reexport */ barCode),
1069
+ "calendar": () => (/* reexport */ calendar),
1070
+ "call": () => (/* reexport */ call),
1071
+ "chat": () => (/* reexport */ chat),
1072
+ "conversations": () => (/* reexport */ conversations),
1073
+ "dialog": () => (/* reexport */ dialog),
1074
+ "enablePrintCapability": () => (/* reexport */ enablePrintCapability),
1075
+ "executeDeepLink": () => (/* reexport */ executeDeepLink),
1076
+ "files": () => (/* reexport */ files),
1077
+ "geoLocation": () => (/* reexport */ geoLocation),
1078
+ "getContext": () => (/* reexport */ getContext),
1079
+ "getMruTabInstances": () => (/* reexport */ getMruTabInstances),
1080
+ "getTabInstances": () => (/* reexport */ getTabInstances),
1081
+ "initialize": () => (/* reexport */ initialize),
1082
+ "initializeWithFrameContext": () => (/* reexport */ initializeWithFrameContext),
1083
+ "location": () => (/* reexport */ location_location),
1084
+ "logs": () => (/* reexport */ logs),
1085
+ "mail": () => (/* reexport */ mail),
1086
+ "media": () => (/* reexport */ media),
1087
+ "meeting": () => (/* reexport */ meeting),
1088
+ "meetingRoom": () => (/* reexport */ meetingRoom),
1089
+ "menus": () => (/* reexport */ menus),
1090
+ "monetization": () => (/* reexport */ monetization),
1091
+ "navigateBack": () => (/* reexport */ navigateBack),
1092
+ "navigateCrossDomain": () => (/* reexport */ navigateCrossDomain),
1093
+ "navigateToTab": () => (/* reexport */ navigateToTab),
1094
+ "notifications": () => (/* reexport */ notifications),
1095
+ "openFilePreview": () => (/* reexport */ openFilePreview),
1096
+ "pages": () => (/* reexport */ pages),
1097
+ "people": () => (/* reexport */ people),
1098
+ "print": () => (/* reexport */ print),
1099
+ "profile": () => (/* reexport */ profile),
1100
+ "registerAppButtonClickHandler": () => (/* reexport */ registerAppButtonClickHandler),
1101
+ "registerAppButtonHoverEnterHandler": () => (/* reexport */ registerAppButtonHoverEnterHandler),
1102
+ "registerAppButtonHoverLeaveHandler": () => (/* reexport */ registerAppButtonHoverLeaveHandler),
1103
+ "registerBackButtonHandler": () => (/* reexport */ registerBackButtonHandler),
1104
+ "registerBeforeUnloadHandler": () => (/* reexport */ registerBeforeUnloadHandler),
1105
+ "registerChangeSettingsHandler": () => (/* reexport */ registerChangeSettingsHandler),
1106
+ "registerCustomHandler": () => (/* reexport */ registerCustomHandler),
1107
+ "registerFocusEnterHandler": () => (/* reexport */ registerFocusEnterHandler),
1108
+ "registerFullScreenHandler": () => (/* reexport */ registerFullScreenHandler),
1109
+ "registerOnLoadHandler": () => (/* reexport */ registerOnLoadHandler),
1110
+ "registerOnThemeChangeHandler": () => (/* reexport */ registerOnThemeChangeHandler),
1111
+ "registerUserSettingsChangeHandler": () => (/* reexport */ registerUserSettingsChangeHandler),
1112
+ "remoteCamera": () => (/* reexport */ remoteCamera),
1113
+ "returnFocus": () => (/* reexport */ returnFocus),
1114
+ "search": () => (/* reexport */ search),
1115
+ "sendCustomEvent": () => (/* reexport */ sendCustomEvent),
1116
+ "sendCustomMessage": () => (/* reexport */ sendCustomMessage),
1117
+ "setFrameContext": () => (/* reexport */ setFrameContext),
1118
+ "settings": () => (/* reexport */ settings),
1119
+ "shareDeepLink": () => (/* reexport */ shareDeepLink),
1120
+ "sharing": () => (/* reexport */ sharing),
1121
+ "stageView": () => (/* reexport */ stageView),
1122
+ "tasks": () => (/* reexport */ tasks),
1123
+ "teams": () => (/* reexport */ teams),
1124
+ "teamsCore": () => (/* reexport */ teamsCore),
1125
+ "uploadCustomApp": () => (/* reexport */ uploadCustomApp),
1126
+ "version": () => (/* reexport */ version),
1127
+ "video": () => (/* reexport */ video),
1128
+ "videoEx": () => (/* reexport */ videoEx),
1129
+ "webStorage": () => (/* reexport */ webStorage)
1130
+ });
1131
+
1132
+ ;// CONCATENATED MODULE: ./src/public/version.ts
1133
+ var version = "2.4.0-beta.0";
1291
1134
 
1292
1135
  ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1293
1136
  var GlobalVars = /** @class */ (function () {
@@ -1425,9 +1268,26 @@ var HostClientType;
1425
1268
  })(HostClientType || (HostClientType = {}));
1426
1269
  var HostName;
1427
1270
  (function (HostName) {
1271
+ /**
1272
+ * Office.com and Office Windows App
1273
+ */
1428
1274
  HostName["office"] = "Office";
1275
+ /**
1276
+ * For "desktop" specifically, this refers to the new, pre-release version of Outlook for Windows.
1277
+ * Also used on other platforms that map to a single Outlook client.
1278
+ */
1429
1279
  HostName["outlook"] = "Outlook";
1280
+ /**
1281
+ * Outlook for Windows: the classic, native, desktop client
1282
+ */
1283
+ HostName["outlookWin32"] = "OutlookWin32";
1284
+ /**
1285
+ * Microsoft-internal test Host
1286
+ */
1430
1287
  HostName["orange"] = "Orange";
1288
+ /**
1289
+ * Teams
1290
+ */
1431
1291
  HostName["teams"] = "Teams";
1432
1292
  })(HostName || (HostName = {}));
1433
1293
  // Ensure these declarations stay in sync with the framework.
@@ -1446,49 +1306,209 @@ var FrameContexts;
1446
1306
  * Indicates the team type, currently used to distinguish between different team
1447
1307
  * types in Office 365 for Education (team types 1, 2, 3, and 4).
1448
1308
  */
1449
- var TeamType;
1450
- (function (TeamType) {
1451
- TeamType[TeamType["Standard"] = 0] = "Standard";
1452
- TeamType[TeamType["Edu"] = 1] = "Edu";
1453
- TeamType[TeamType["Class"] = 2] = "Class";
1454
- TeamType[TeamType["Plc"] = 3] = "Plc";
1455
- TeamType[TeamType["Staff"] = 4] = "Staff";
1456
- })(TeamType || (TeamType = {}));
1309
+ var TeamType;
1310
+ (function (TeamType) {
1311
+ TeamType[TeamType["Standard"] = 0] = "Standard";
1312
+ TeamType[TeamType["Edu"] = 1] = "Edu";
1313
+ TeamType[TeamType["Class"] = 2] = "Class";
1314
+ TeamType[TeamType["Plc"] = 3] = "Plc";
1315
+ TeamType[TeamType["Staff"] = 4] = "Staff";
1316
+ })(TeamType || (TeamType = {}));
1317
+ /**
1318
+ * Indicates the various types of roles of a user in a team.
1319
+ */
1320
+ var UserTeamRole;
1321
+ (function (UserTeamRole) {
1322
+ UserTeamRole[UserTeamRole["Admin"] = 0] = "Admin";
1323
+ UserTeamRole[UserTeamRole["User"] = 1] = "User";
1324
+ UserTeamRole[UserTeamRole["Guest"] = 2] = "Guest";
1325
+ })(UserTeamRole || (UserTeamRole = {}));
1326
+ /**
1327
+ * Dialog module dimension enum
1328
+ */
1329
+ var DialogDimension;
1330
+ (function (DialogDimension) {
1331
+ DialogDimension["Large"] = "large";
1332
+ DialogDimension["Medium"] = "medium";
1333
+ DialogDimension["Small"] = "small";
1334
+ })(DialogDimension || (DialogDimension = {}));
1335
+
1336
+ /**
1337
+ * @deprecated
1338
+ * As of 2.0.0, please use {@link DialogDimension} instead.
1339
+ */
1340
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1341
+ var TaskModuleDimension = DialogDimension;
1342
+ /**
1343
+ * The type of the channel with which the content is associated.
1344
+ */
1345
+ var ChannelType;
1346
+ (function (ChannelType) {
1347
+ ChannelType["Regular"] = "Regular";
1348
+ ChannelType["Private"] = "Private";
1349
+ ChannelType["Shared"] = "Shared";
1350
+ })(ChannelType || (ChannelType = {}));
1351
+ var errorNotSupportedOnPlatform = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
1352
+
1353
+ ;// CONCATENATED MODULE: ./src/internal/constants.ts
1354
+ /**
1355
+ * @hidden
1356
+ * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
1357
+ * Modified to 2.0.1 which is hightest till now so that if any client doesn't pass version in initialize function, it will be set to highest.
1358
+ * Mobile clients are passing versions, hence will be applicable to web and desktop clients only.
1359
+ *
1360
+ * @internal
1361
+ * Limited to Microsoft-internal use
1362
+ */
1363
+ var defaultSDKVersionForCompatCheck = '2.0.1';
1364
+ /**
1365
+ * @hidden
1366
+ * This is the client version when selectMedia API - VideoAndImage is supported on mobile.
1367
+ *
1368
+ * @internal
1369
+ * Limited to Microsoft-internal use
1370
+ */
1371
+ var videoAndImageMediaAPISupportVersion = '2.0.2';
1372
+ /**
1373
+ * @hidden
1374
+ * This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.
1375
+ *
1376
+ * @internal
1377
+ * Limited to Microsoft-internal use
1378
+ */
1379
+ var nonFullScreenVideoModeAPISupportVersion = '2.0.3';
1380
+ /**
1381
+ * @hidden
1382
+ * This is the client version when selectMedia API - ImageOutputFormats is supported on mobile.
1383
+ *
1384
+ * @internal
1385
+ * Limited to Microsoft-internal use
1386
+ */
1387
+ var imageOutputFormatsAPISupportVersion = '2.0.4';
1388
+ /**
1389
+ * @hidden
1390
+ * Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}
1391
+ *
1392
+ * @internal
1393
+ * Limited to Microsoft-internal use
1394
+ */
1395
+ var getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';
1396
+ /**
1397
+ * @hidden
1398
+ * This is the client version when location APIs (getLocation and showLocation) are supported.
1399
+ *
1400
+ * @internal
1401
+ * Limited to Microsoft-internal use
1402
+ */
1403
+ var locationAPIsRequiredVersion = '1.9.0';
1404
+ /**
1405
+ * @hidden
1406
+ * This is the client version when permisisons are supported
1407
+ *
1408
+ * @internal
1409
+ * Limited to Microsoft-internal use
1410
+ */
1411
+ var permissionsAPIsRequiredVersion = '2.0.1';
1412
+ /**
1413
+ * @hidden
1414
+ * This is the client version when people picker API is supported on mobile.
1415
+ *
1416
+ * @internal
1417
+ * Limited to Microsoft-internal use
1418
+ */
1419
+ var peoplePickerRequiredVersion = '2.0.0';
1420
+ /**
1421
+ * @hidden
1422
+ * This is the client version when captureImage API is supported on mobile.
1423
+ *
1424
+ * @internal
1425
+ * Limited to Microsoft-internal use
1426
+ */
1427
+ var captureImageMobileSupportVersion = '1.7.0';
1428
+ /**
1429
+ * @hidden
1430
+ * This is the client version when media APIs are supported on all three platforms ios, android and web.
1431
+ *
1432
+ * @internal
1433
+ * Limited to Microsoft-internal use
1434
+ */
1435
+ var mediaAPISupportVersion = '1.8.0';
1436
+ /**
1437
+ * @hidden
1438
+ * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
1439
+ *
1440
+ * @internal
1441
+ * Limited to Microsoft-internal use
1442
+ */
1443
+ var getMediaCallbackSupportVersion = '2.0.0';
1444
+ /**
1445
+ * @hidden
1446
+ * This is the client version when scanBarCode API is supported on mobile.
1447
+ *
1448
+ * @internal
1449
+ * Limited to Microsoft-internal use
1450
+ */
1451
+ var scanBarCodeAPIMobileSupportVersion = '1.9.0';
1457
1452
  /**
1458
- * Indicates the various types of roles of a user in a team.
1453
+ * @hidden
1454
+ * List of supported Host origins
1455
+ *
1456
+ * @internal
1457
+ * Limited to Microsoft-internal use
1459
1458
  */
1460
- var UserTeamRole;
1461
- (function (UserTeamRole) {
1462
- UserTeamRole[UserTeamRole["Admin"] = 0] = "Admin";
1463
- UserTeamRole[UserTeamRole["User"] = 1] = "User";
1464
- UserTeamRole[UserTeamRole["Guest"] = 2] = "Guest";
1465
- })(UserTeamRole || (UserTeamRole = {}));
1459
+ var validOrigins = [
1460
+ 'teams.microsoft.com',
1461
+ 'teams.microsoft.us',
1462
+ 'gov.teams.microsoft.us',
1463
+ 'dod.teams.microsoft.us',
1464
+ 'int.teams.microsoft.com',
1465
+ 'teams.live.com',
1466
+ 'devspaces.skype.com',
1467
+ 'ssauth.skype.com',
1468
+ 'local.teams.live.com',
1469
+ 'local.teams.live.com:8080',
1470
+ 'local.teams.office.com',
1471
+ 'local.teams.office.com:8080',
1472
+ 'msft.spoppe.com',
1473
+ '*.sharepoint.com',
1474
+ '*.sharepoint-df.com',
1475
+ '*.sharepointonline.com',
1476
+ 'outlook.office.com',
1477
+ 'outlook-sdf.office.com',
1478
+ 'outlook.office365.com',
1479
+ 'outlook-sdf.office365.com',
1480
+ '*.teams.microsoft.com',
1481
+ 'www.office.com',
1482
+ 'word.office.com',
1483
+ 'excel.office.com',
1484
+ 'powerpoint.office.com',
1485
+ 'www.officeppe.com',
1486
+ '*.www.office.com',
1487
+ ];
1466
1488
  /**
1467
- * Dialog module dimension enum
1489
+ * @hidden
1490
+ * USer specified message origins should satisfy this test
1491
+ *
1492
+ * @internal
1493
+ * Limited to Microsoft-internal use
1468
1494
  */
1469
- var DialogDimension;
1470
- (function (DialogDimension) {
1471
- DialogDimension["Large"] = "large";
1472
- DialogDimension["Medium"] = "medium";
1473
- DialogDimension["Small"] = "small";
1474
- })(DialogDimension || (DialogDimension = {}));
1475
-
1495
+ var userOriginUrlValidationRegExp = /^https:\/\//;
1476
1496
  /**
1477
- * @deprecated
1478
- * As of 2.0.0, please use {@link DialogDimension} instead.
1497
+ * @hidden
1498
+ * The protocol used for deep links into Teams
1499
+ *
1500
+ * @internal
1501
+ * Limited to Microsoft-internal use
1479
1502
  */
1480
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1481
- var TaskModuleDimension = DialogDimension;
1503
+ var teamsDeepLinkProtocol = 'https';
1482
1504
  /**
1483
- * The type of the channel with which the content is associated.
1505
+ * @hidden
1506
+ * The host used for deep links into Teams
1507
+ *
1508
+ * @internal
1509
+ * Limited to Microsoft-internal use
1484
1510
  */
1485
- var ChannelType;
1486
- (function (ChannelType) {
1487
- ChannelType["Regular"] = "Regular";
1488
- ChannelType["Private"] = "Private";
1489
- ChannelType["Shared"] = "Shared";
1490
- })(ChannelType || (ChannelType = {}));
1491
- var errorNotSupportedOnPlatform = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
1511
+ var teamsDeepLinkHost = 'teams.microsoft.com';
1492
1512
 
1493
1513
  // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1494
1514
  var uuid = __webpack_require__(22);
@@ -1920,6 +1940,21 @@ function processAdditionalValidOrigins(validMessageOrigins) {
1920
1940
  GlobalVars.additionalValidOrigins = combinedOriginUrls;
1921
1941
  }
1922
1942
 
1943
+ // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
1944
+ var browser = __webpack_require__(227);
1945
+ ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
1946
+
1947
+ var topLevelLogger = (0,browser.debug)('teamsJs');
1948
+ /**
1949
+ * @internal
1950
+ * Limited to Microsoft-internal use
1951
+ *
1952
+ * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
1953
+ */
1954
+ function getLogger(namespace) {
1955
+ return topLevelLogger.extend(namespace);
1956
+ }
1957
+
1923
1958
  ;// CONCATENATED MODULE: ./src/public/authentication.ts
1924
1959
 
1925
1960
 
@@ -1935,13 +1970,16 @@ function processAdditionalValidOrigins(validMessageOrigins) {
1935
1970
  */
1936
1971
  var authentication;
1937
1972
  (function (authentication) {
1973
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1938
1974
  var authHandlers;
1975
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1939
1976
  var authWindowMonitor;
1940
1977
  function initialize() {
1941
1978
  registerHandler('authentication.authenticate.success', handleSuccess, false);
1942
1979
  registerHandler('authentication.authenticate.failure', handleFailure, false);
1943
1980
  }
1944
1981
  authentication.initialize = initialize;
1982
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1945
1983
  var authParams;
1946
1984
  /**
1947
1985
  * @deprecated
@@ -1956,6 +1994,7 @@ var authentication;
1956
1994
  authentication.registerAuthenticationHandlers = registerAuthenticationHandlers;
1957
1995
  function authenticate(authenticateParameters) {
1958
1996
  var isDifferentParamsInCall = authenticateParameters !== undefined;
1997
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
1959
1998
  var authenticateParams = isDifferentParamsInCall ? authenticateParameters : authParams;
1960
1999
  if (!authenticateParams) {
1961
2000
  throw new Error('No parameters are provided for authentication');
@@ -2313,6 +2352,8 @@ var __assign = (undefined && undefined.__assign) || function () {
2313
2352
 
2314
2353
 
2315
2354
 
2355
+
2356
+ var runtimeLogger = getLogger('runtime');
2316
2357
  var runtime = {
2317
2358
  apiVersion: 1,
2318
2359
  supports: {
@@ -2445,6 +2486,7 @@ var versionConstants = {
2445
2486
  },
2446
2487
  ],
2447
2488
  };
2489
+ var generateBackCompatRuntimeConfigLogger = runtimeLogger.extend('generateBackCompatRuntimeConfig');
2448
2490
  /**
2449
2491
  * @internal
2450
2492
  * Limited to Microsoft-internal use
@@ -2457,7 +2499,9 @@ var versionConstants = {
2457
2499
  * @returns runtime which describes the APIs supported by the legacy host client.
2458
2500
  */
2459
2501
  function generateBackCompatRuntimeConfig(highestSupportedVersion) {
2502
+ generateBackCompatRuntimeConfigLogger('generating back compat runtime config for %s', highestSupportedVersion);
2460
2503
  var newSupports = __assign({}, teamsRuntimeConfig.supports);
2504
+ generateBackCompatRuntimeConfigLogger('Supported capabilities in config before updating based on highestSupportedVersion: %o', newSupports);
2461
2505
  Object.keys(versionConstants).forEach(function (versionNumber) {
2462
2506
  if (compareSDKVersions(highestSupportedVersion, versionNumber) >= 0) {
2463
2507
  versionConstants[versionNumber].forEach(function (capabilityReqs) {
@@ -2472,9 +2516,12 @@ function generateBackCompatRuntimeConfig(highestSupportedVersion) {
2472
2516
  isLegacyTeams: true,
2473
2517
  supports: newSupports,
2474
2518
  };
2519
+ generateBackCompatRuntimeConfigLogger('Runtime config after updating based on highestSupportedVersion: %o', backCompatRuntimeConfig);
2475
2520
  return backCompatRuntimeConfig;
2476
2521
  }
2522
+ var applyRuntimeConfigLogger = runtimeLogger.extend('applyRuntimeConfig');
2477
2523
  function applyRuntimeConfig(runtimeConfig) {
2524
+ applyRuntimeConfigLogger('Applying runtime %o', runtimeConfig);
2478
2525
  runtime = deepFreeze(runtimeConfig);
2479
2526
  }
2480
2527
  /**
@@ -2818,9 +2865,11 @@ var menus;
2818
2865
  MenuListType["dropDown"] = "dropDown";
2819
2866
  MenuListType["popOver"] = "popOver";
2820
2867
  })(MenuListType = menus.MenuListType || (menus.MenuListType = {}));
2868
+ /* eslint-disable strict-null-checks/all */ /* Fix tracked by 5730662 */
2821
2869
  var navBarMenuItemPressHandler;
2822
2870
  var actionMenuItemPressHandler;
2823
2871
  var viewConfigItemPressHandler;
2872
+ /* eslint-enable strict-null-checks/all */ /* Fix tracked by 5730662 */
2824
2873
  function initialize() {
2825
2874
  registerHandler('navBarMenuItemPress', handleNavBarMenuItemPress, false);
2826
2875
  registerHandler('actionMenuItemPress', handleActionMenuItemPress, false);
@@ -3039,6 +3088,8 @@ var teamsCore;
3039
3088
 
3040
3089
 
3041
3090
 
3091
+
3092
+
3042
3093
  /**
3043
3094
  * Namespace to interact with app initialization and lifecycle.
3044
3095
  *
@@ -3046,6 +3097,7 @@ var teamsCore;
3046
3097
  */
3047
3098
  var app_app;
3048
3099
  (function (app) {
3100
+ var appLogger = getLogger('app');
3049
3101
  // ::::::::::::::::::::::: MicrosoftTeams client SDK public API ::::::::::::::::::::
3050
3102
  app.Messages = {
3051
3103
  AppLoaded: 'appInitialization.appLoaded',
@@ -3133,6 +3185,7 @@ var app_app;
3133
3185
  return runWithTimeout(function () { return initializeHelper(validMessageOrigins); }, initializationTimeoutInMs, new Error('SDK initialization timed out.'));
3134
3186
  }
3135
3187
  app.initialize = initialize;
3188
+ var initializeHelperLogger = appLogger.extend('initializeHelper');
3136
3189
  function initializeHelper(validMessageOrigins) {
3137
3190
  return new Promise(function (resolve) {
3138
3191
  // Independent components might not know whether the SDK is initialized so might call it to be safe.
@@ -3155,7 +3208,10 @@ var app_app;
3155
3208
  // so we assume that if we don't have it, we must be running in Teams.
3156
3209
  // After Teams updates its client code, we can remove this default code.
3157
3210
  try {
3211
+ initializeHelperLogger('Parsing %s', runtimeConfig);
3212
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3158
3213
  var givenRuntimeConfig = JSON.parse(runtimeConfig);
3214
+ initializeHelperLogger('Checking if %o is a valid runtime object', givenRuntimeConfig);
3159
3215
  // Check that givenRuntimeConfig is a valid instance of IRuntimeConfig
3160
3216
  if (!givenRuntimeConfig || !givenRuntimeConfig.apiVersion) {
3161
3217
  throw new Error('Received runtime config is invalid');
@@ -3165,6 +3221,7 @@ var app_app;
3165
3221
  catch (e) {
3166
3222
  if (e instanceof SyntaxError) {
3167
3223
  try {
3224
+ initializeHelperLogger('Attempting to parse %s as an SDK version', runtimeConfig);
3168
3225
  // if the given runtime config was actually meant to be a SDK version, store it as such.
3169
3226
  // TODO: This is a temporary workaround to allow Teams to store clientSupportedSDKVersion even when
3170
3227
  // it doesn't provide the runtimeConfig. After Teams updates its client code, we should
@@ -3172,6 +3229,7 @@ var app_app;
3172
3229
  if (!isNaN(compareSDKVersions(runtimeConfig, defaultSDKVersionForCompatCheck))) {
3173
3230
  GlobalVars.clientSupportedSDKVersion = runtimeConfig;
3174
3231
  }
3232
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3175
3233
  var givenRuntimeConfig = JSON.parse(clientSupportedSDKVersion);
3176
3234
  clientSupportedSDKVersion && applyRuntimeConfig(givenRuntimeConfig);
3177
3235
  }
@@ -3226,17 +3284,21 @@ var app_app;
3226
3284
  return;
3227
3285
  }
3228
3286
  if (GlobalVars.frameContext) {
3287
+ /* eslint-disable strict-null-checks/all */ /* Fix tracked by 5730662 */
3229
3288
  registerOnThemeChangeHandler(null);
3230
3289
  pages.backStack.registerBackButtonHandler(null);
3231
3290
  pages.registerFullScreenHandler(null);
3232
3291
  teamsCore.registerBeforeUnloadHandler(null);
3233
3292
  teamsCore.registerOnLoadHandler(null);
3234
- logs.registerGetLogHandler(null);
3293
+ logs.registerGetLogHandler(null); /* Fix tracked by 5730662 */
3294
+ /* eslint-enable strict-null-checks/all */
3235
3295
  }
3236
3296
  if (GlobalVars.frameContext === FrameContexts.settings) {
3297
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3237
3298
  pages.config.registerOnSaveHandler(null);
3238
3299
  }
3239
3300
  if (GlobalVars.frameContext === FrameContexts.remove) {
3301
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3240
3302
  pages.config.registerOnRemoveHandler(null);
3241
3303
  }
3242
3304
  GlobalVars.initializeCalled = false;
@@ -3468,31 +3530,13 @@ var pages;
3468
3530
  * Limited to Microsoft-internal use
3469
3531
  */
3470
3532
  function registerFocusEnterHandler(handler) {
3471
- ensureInitialized();
3472
- if (!isSupported()) {
3473
- throw errorNotSupportedOnPlatform;
3474
- }
3475
- registerHandler('focusEnter', handler);
3533
+ registerHandlerHelper('focusEnter', handler, [], function () {
3534
+ if (!isSupported()) {
3535
+ throw errorNotSupportedOnPlatform;
3536
+ }
3537
+ });
3476
3538
  }
3477
3539
  pages.registerFocusEnterHandler = registerFocusEnterHandler;
3478
- /**
3479
- * @hidden
3480
- * Undocumented helper function with shared code between deprecated version and current version of the registerFocusEnterHandler API.
3481
- *
3482
- * @internal
3483
- * Limited to Microsoft-internal use
3484
- *
3485
- * @param handler - The handler for placing focus within the application.
3486
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3487
- */
3488
- function registerFocusEnterHandlerHelper(handler, versionSpecificHelper) {
3489
- ensureInitialized();
3490
- if (versionSpecificHelper) {
3491
- versionSpecificHelper();
3492
- }
3493
- registerHandler('focusEnter', handler);
3494
- }
3495
- pages.registerFocusEnterHandlerHelper = registerFocusEnterHandlerHelper;
3496
3540
  /**
3497
3541
  * Sets/Updates the current frame with new information
3498
3542
  *
@@ -3602,31 +3646,13 @@ var pages;
3602
3646
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
3603
3647
  */
3604
3648
  function registerFullScreenHandler(handler) {
3605
- ensureInitialized();
3606
- if (!isSupported()) {
3607
- throw errorNotSupportedOnPlatform;
3608
- }
3609
- registerHandler('fullScreenChange', handler);
3649
+ registerHandlerHelper('fullScreenChange', handler, [], function () {
3650
+ if (!isSupported()) {
3651
+ throw errorNotSupportedOnPlatform;
3652
+ }
3653
+ });
3610
3654
  }
3611
3655
  pages.registerFullScreenHandler = registerFullScreenHandler;
3612
- /**
3613
- * @hidden
3614
- * Undocumented helper function with shared code between deprecated version and current version of the registerFullScreenHandler API.
3615
- *
3616
- * @internal
3617
- * Limited to Microsoft-internal use
3618
- *
3619
- * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
3620
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3621
- */
3622
- function registerFullScreenHandlerHelper(handler, versionSpecificHelper) {
3623
- ensureInitialized();
3624
- if (versionSpecificHelper) {
3625
- versionSpecificHelper();
3626
- }
3627
- registerHandler('fullScreenChange', handler);
3628
- }
3629
- pages.registerFullScreenHandlerHelper = registerFullScreenHandlerHelper;
3630
3656
  /**
3631
3657
  * Checks if the pages capability is supported by the host
3632
3658
  * @returns true if the pages capability is enabled in runtime.supports.pages and
@@ -3670,6 +3696,7 @@ var pages;
3670
3696
  if (!isSupported()) {
3671
3697
  throw errorNotSupportedOnPlatform;
3672
3698
  }
3699
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3673
3700
  resolve(sendAndUnwrap('getTabInstances', tabInstanceParameters));
3674
3701
  });
3675
3702
  }
@@ -3685,6 +3712,7 @@ var pages;
3685
3712
  if (!isSupported()) {
3686
3713
  throw errorNotSupportedOnPlatform;
3687
3714
  }
3715
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3688
3716
  resolve(sendAndUnwrap('getMruTabInstances', tabInstanceParameters));
3689
3717
  });
3690
3718
  }
@@ -3705,7 +3733,9 @@ var pages;
3705
3733
  */
3706
3734
  var config;
3707
3735
  (function (config) {
3736
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3708
3737
  var saveHandler;
3738
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3709
3739
  var removeHandler;
3710
3740
  /**
3711
3741
  * @hidden
@@ -3832,31 +3862,13 @@ var pages;
3832
3862
  * @param handler - The handler to invoke when the user clicks on Settings.
3833
3863
  */
3834
3864
  function registerChangeConfigHandler(handler) {
3835
- registerChangeConfigHandlerHelper(handler, function () {
3865
+ registerHandlerHelper('changeSettings', handler, [FrameContexts.content], function () {
3836
3866
  if (!isSupported()) {
3837
3867
  throw errorNotSupportedOnPlatform;
3838
3868
  }
3839
3869
  });
3840
3870
  }
3841
3871
  config.registerChangeConfigHandler = registerChangeConfigHandler;
3842
- /**
3843
- * @hidden
3844
- * Undocumented helper function with shared code between deprecated version and current version of the registerConfigChangeHandler API.
3845
- *
3846
- * @internal
3847
- * Limited to Microsoft-internal use
3848
- *
3849
- * @param handler - The handler to invoke when the user clicks on Settings.
3850
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3851
- */
3852
- function registerChangeConfigHandlerHelper(handler, versionSpecificHelper) {
3853
- ensureInitialized(FrameContexts.content);
3854
- if (versionSpecificHelper) {
3855
- versionSpecificHelper();
3856
- }
3857
- registerHandler('changeSettings', handler);
3858
- }
3859
- config.registerChangeConfigHandlerHelper = registerChangeConfigHandlerHelper;
3860
3872
  /**
3861
3873
  * @hidden
3862
3874
  * Hide from docs, since this class is not directly used.
@@ -3933,6 +3945,7 @@ var pages;
3933
3945
  */
3934
3946
  var backStack;
3935
3947
  (function (backStack) {
3948
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3936
3949
  var backButtonPressHandler;
3937
3950
  function _initialize() {
3938
3951
  registerHandler('backButtonPress', handleBackButtonPress, false);
@@ -4062,93 +4075,39 @@ var pages;
4062
4075
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
4063
4076
  */
4064
4077
  function onClick(handler) {
4065
- onClickHelper(handler, function () {
4078
+ registerHandlerHelper('appButtonClick', handler, [FrameContexts.content], function () {
4066
4079
  if (!isSupported()) {
4067
4080
  throw errorNotSupportedOnPlatform;
4068
4081
  }
4069
4082
  });
4070
4083
  }
4071
4084
  appButton.onClick = onClick;
4072
- /**
4073
- * @hidden
4074
- * Undocumented helper function with shared code between deprecated version and current version of the onClick API.
4075
- *
4076
- * @internal
4077
- * Limited to Microsoft-internal use
4078
- *
4079
- * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
4080
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4081
- */
4082
- function onClickHelper(handler, versionSpecificHelper) {
4083
- ensureInitialized(FrameContexts.content);
4084
- if (versionSpecificHelper) {
4085
- versionSpecificHelper();
4086
- }
4087
- registerHandler('appButtonClick', handler);
4088
- }
4089
- appButton.onClickHelper = onClickHelper;
4090
4085
  /**
4091
4086
  * Registers a handler for entering hover of the app button.
4092
4087
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
4093
4088
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
4094
4089
  */
4095
4090
  function onHoverEnter(handler) {
4096
- onHoverEnterHelper(handler, function () {
4091
+ registerHandlerHelper('appButtonHoverEnter', handler, [FrameContexts.content], function () {
4097
4092
  if (!isSupported()) {
4098
4093
  throw errorNotSupportedOnPlatform;
4099
4094
  }
4100
4095
  });
4101
4096
  }
4102
4097
  appButton.onHoverEnter = onHoverEnter;
4103
- /**
4104
- * @hidden
4105
- * Undocumented helper function with shared code between deprecated version and current version of the onHoverEnter API.
4106
- *
4107
- * @internal
4108
- * Limited to Microsoft-internal use
4109
- *
4110
- * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
4111
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4112
- */
4113
- function onHoverEnterHelper(handler, versionSpecificHelper) {
4114
- ensureInitialized(FrameContexts.content);
4115
- if (versionSpecificHelper) {
4116
- versionSpecificHelper();
4117
- }
4118
- registerHandler('appButtonHoverEnter', handler);
4119
- }
4120
- appButton.onHoverEnterHelper = onHoverEnterHelper;
4121
4098
  /**
4122
4099
  * Registers a handler for exiting hover of the app button.
4123
4100
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
4124
4101
  * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
4125
4102
  */
4126
4103
  function onHoverLeave(handler) {
4127
- onHoverLeaveHelper(handler, function () {
4104
+ registerHandlerHelper('appButtonHoverLeave', handler, [FrameContexts.content], function () {
4128
4105
  if (!isSupported()) {
4129
4106
  throw errorNotSupportedOnPlatform;
4130
4107
  }
4131
4108
  });
4132
4109
  }
4133
4110
  appButton.onHoverLeave = onHoverLeave;
4134
- /**
4135
- * @hidden
4136
- * Undocumented helper function with shared code between deprecated version and current version of the onHoverLeave API.
4137
- *
4138
- * @internal
4139
- * Limited to Microsoft-internal use
4140
- *
4141
- * @param handler - The handler to invoke when existing hover of the personal app button in the app bar.
4142
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
4143
- */
4144
- function onHoverLeaveHelper(handler, versionSpecificHelper) {
4145
- ensureInitialized(FrameContexts.content);
4146
- if (versionSpecificHelper) {
4147
- versionSpecificHelper();
4148
- }
4149
- registerHandler('appButtonHoverLeave', handler);
4150
- }
4151
- appButton.onHoverLeaveHelper = onHoverLeaveHelper;
4152
4111
  /**
4153
4112
  * Checks if pages.appButton capability is supported by the host
4154
4113
  * @returns true if the pages.appButton capability is enabled in runtime.supports.pages.appButton and
@@ -4161,21 +4120,6 @@ var pages;
4161
4120
  })(appButton = pages.appButton || (pages.appButton = {}));
4162
4121
  })(pages || (pages = {}));
4163
4122
 
4164
- // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
4165
- var browser = __webpack_require__(227);
4166
- ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
4167
-
4168
- var topLevelLogger = (0,browser.debug)('teamsJs');
4169
- /**
4170
- * @internal
4171
- * Limited to Microsoft-internal use
4172
- *
4173
- * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
4174
- */
4175
- function getLogger(namespace) {
4176
- return topLevelLogger.extend(namespace);
4177
- }
4178
-
4179
4123
  ;// CONCATENATED MODULE: ./src/internal/handlers.ts
4180
4124
  /* eslint-disable @typescript-eslint/ban-types */
4181
4125
  var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
@@ -4190,6 +4134,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
4190
4134
 
4191
4135
 
4192
4136
 
4137
+
4193
4138
  var handlersLogger = getLogger('handlers');
4194
4139
  /**
4195
4140
  * @internal
@@ -4251,10 +4196,32 @@ function registerHandler(name, handler, sendMessage, args) {
4251
4196
  function removeHandler(name) {
4252
4197
  delete HandlersPrivate.handlers[name];
4253
4198
  }
4254
- /** @internal */
4199
+ /**
4200
+ * @internal
4201
+ * Limited to Microsoft-internal use
4202
+ */
4255
4203
  function doesHandlerExist(name) {
4256
4204
  return HandlersPrivate.handlers[name] != null;
4257
4205
  }
4206
+ /**
4207
+ * @hidden
4208
+ * Undocumented helper function with shared code between deprecated version and current version of register*Handler APIs
4209
+ *
4210
+ * @internal
4211
+ * Limited to Microsoft-internal use
4212
+ *
4213
+ * @param name - The name of the handler to register.
4214
+ * @param handler - The handler to invoke.
4215
+ * @param contexts - The context within which it is valid to register this handler.
4216
+ * @param registrationHelper - The helper function containing logic pertaining to a specific version of the API.
4217
+ */
4218
+ function registerHandlerHelper(name, handler, contexts, registrationHelper) {
4219
+ ensureInitialized.apply(void 0, contexts);
4220
+ if (registrationHelper) {
4221
+ registrationHelper();
4222
+ }
4223
+ registerHandler(name, handler);
4224
+ }
4258
4225
  /**
4259
4226
  * @internal
4260
4227
  * Limited to Microsoft-internal use
@@ -4486,6 +4453,7 @@ function sendMessageToParentAsync(actionName, args) {
4486
4453
  if (args === void 0) { args = undefined; }
4487
4454
  return new Promise(function (resolve) {
4488
4455
  var request = sendMessageToParentHelper(actionName, args);
4456
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4489
4457
  resolve(waitForResponse(request.id));
4490
4458
  });
4491
4459
  }
@@ -4510,6 +4478,7 @@ function sendMessageToParent(actionName, argsOrCallback, callback) {
4510
4478
  else if (argsOrCallback instanceof Array) {
4511
4479
  args = argsOrCallback;
4512
4480
  }
4481
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4513
4482
  var request = sendMessageToParentHelper(actionName, args);
4514
4483
  if (callback) {
4515
4484
  CommunicationPrivate.callbacks[request.id] = callback;
@@ -4524,9 +4493,11 @@ function sendMessageToParentHelper(actionName, args) {
4524
4493
  var logger = sendMessageToParentHelperLogger;
4525
4494
  var targetWindow = Communication.parentWindow;
4526
4495
  var request = createMessageRequest(actionName, args);
4496
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4527
4497
  logger('Message %i information: %o', request.id, { actionName: actionName, args: args });
4528
4498
  if (GlobalVars.isFramelessWindow) {
4529
4499
  if (Communication.currentWindow && Communication.currentWindow.nativeInterface) {
4500
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4530
4501
  logger('Sending message %i to parent via framelessPostMessage interface', request.id);
4531
4502
  Communication.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(request));
4532
4503
  }
@@ -4536,10 +4507,12 @@ function sendMessageToParentHelper(actionName, args) {
4536
4507
  // If the target window isn't closed and we already know its origin, send the message right away; otherwise,
4537
4508
  // queue the message and send it after the origin is established
4538
4509
  if (targetWindow && targetOrigin) {
4510
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4539
4511
  logger('Sending message %i to parent via postMessage', request.id);
4540
4512
  targetWindow.postMessage(request, targetOrigin);
4541
4513
  }
4542
4514
  else {
4515
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4543
4516
  logger('Adding message %i to parent message queue', request.id);
4544
4517
  getTargetMessageQueue(targetWindow).push(request);
4545
4518
  }
@@ -4683,6 +4656,7 @@ function handleChildMessage(evt) {
4683
4656
  var message_1 = evt.data;
4684
4657
  var _a = callHandler(message_1.func, message_1.args), called = _a[0], result = _a[1];
4685
4658
  if (called && typeof result !== 'undefined') {
4659
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4686
4660
  sendMessageResponseToChild(message_1.id, Array.isArray(result) ? result : [result]);
4687
4661
  }
4688
4662
  else {
@@ -4695,6 +4669,7 @@ function handleChildMessage(evt) {
4695
4669
  }
4696
4670
  if (Communication.childWindow) {
4697
4671
  var isPartialResponse_1 = args.pop();
4672
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4698
4673
  sendMessageResponseToChild(message_1.id, args, isPartialResponse_1);
4699
4674
  }
4700
4675
  });
@@ -4734,6 +4709,7 @@ function flushMessageQueue(targetWindow) {
4734
4709
  var target = targetWindow == Communication.parentWindow ? 'parent' : 'child';
4735
4710
  while (targetWindow && targetOrigin && targetMessageQueue.length > 0) {
4736
4711
  var request = targetMessageQueue.shift();
4712
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4737
4713
  flushMessageQueueLogger('Flushing message %i from ' + target + ' message queue via postMessage.', request.id);
4738
4714
  targetWindow.postMessage(request, targetOrigin);
4739
4715
  }
@@ -4761,6 +4737,7 @@ function sendMessageResponseToChild(id,
4761
4737
  // tslint:disable-next-line:no-any
4762
4738
  args, isPartialResponse) {
4763
4739
  var targetWindow = Communication.childWindow;
4740
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4764
4741
  var response = createMessageResponse(id, args, isPartialResponse);
4765
4742
  var targetOrigin = getTargetOrigin(targetWindow);
4766
4743
  if (targetWindow && targetOrigin) {
@@ -4779,6 +4756,7 @@ function sendMessageEventToChild(actionName,
4779
4756
  // tslint:disable-next-line: no-any
4780
4757
  args) {
4781
4758
  var targetWindow = Communication.childWindow;
4759
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4782
4760
  var customEvent = createMessageEvent(actionName, args);
4783
4761
  var targetOrigin = getTargetOrigin(targetWindow);
4784
4762
  // If the target window isn't closed and we already know its origin, send the message right away; otherwise,
@@ -5337,11 +5315,13 @@ var media;
5337
5315
  ensureInitialized(FrameContexts.content, FrameContexts.task);
5338
5316
  if (!GlobalVars.isFramelessWindow) {
5339
5317
  var notSupportedError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
5318
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5340
5319
  callback(notSupportedError, undefined);
5341
5320
  return;
5342
5321
  }
5343
5322
  if (!isCurrentSDKVersionAtLeast(captureImageMobileSupportVersion)) {
5344
5323
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5324
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5345
5325
  callback(oldPlatformError, undefined);
5346
5326
  return;
5347
5327
  }
@@ -5378,11 +5358,13 @@ var media;
5378
5358
  ensureInitialized(FrameContexts.content, FrameContexts.task);
5379
5359
  if (!isCurrentSDKVersionAtLeast(mediaAPISupportVersion)) {
5380
5360
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5361
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5381
5362
  callback(oldPlatformError, null);
5382
5363
  return;
5383
5364
  }
5384
5365
  if (!validateGetMediaInputs(this.mimeType, this.format, this.content)) {
5385
5366
  var invalidInput = { errorCode: ErrorCode.INVALID_ARGUMENTS };
5367
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5386
5368
  callback(invalidInput, null);
5387
5369
  return;
5388
5370
  }
@@ -5403,6 +5385,7 @@ var media;
5403
5385
  function handleGetMediaCallbackRequest(mediaResult) {
5404
5386
  if (callback) {
5405
5387
  if (mediaResult && mediaResult.error) {
5388
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5406
5389
  callback(mediaResult.error, null);
5407
5390
  }
5408
5391
  else {
@@ -5420,6 +5403,7 @@ var media;
5420
5403
  }
5421
5404
  }
5422
5405
  else {
5406
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5423
5407
  callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);
5424
5408
  }
5425
5409
  }
@@ -5437,8 +5421,10 @@ var media;
5437
5421
  this.content && callback && sendMessageToParent('getMedia', params);
5438
5422
  function handleGetMediaRequest(response) {
5439
5423
  if (callback) {
5424
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5440
5425
  var mediaResult = JSON.parse(response);
5441
5426
  if (mediaResult.error) {
5427
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5442
5428
  callback(mediaResult.error, null);
5443
5429
  removeHandler('getMedia' + actionName);
5444
5430
  }
@@ -5458,6 +5444,7 @@ var media;
5458
5444
  }
5459
5445
  }
5460
5446
  else {
5447
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5461
5448
  callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);
5462
5449
  removeHandler('getMedia' + actionName);
5463
5450
  }
@@ -5607,6 +5594,7 @@ var media;
5607
5594
  ensureInitialized(FrameContexts.content, FrameContexts.task);
5608
5595
  if (!isCurrentSDKVersionAtLeast(mediaAPISupportVersion)) {
5609
5596
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5597
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5610
5598
  callback(oldPlatformError, null);
5611
5599
  return;
5612
5600
  }
@@ -5614,11 +5602,13 @@ var media;
5614
5602
  throwExceptionIfMediaCallIsNotSupportedOnMobile(mediaInputs);
5615
5603
  }
5616
5604
  catch (err) {
5605
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5617
5606
  callback(err, null);
5618
5607
  return;
5619
5608
  }
5620
5609
  if (!validateSelectMediaInputs(mediaInputs)) {
5621
5610
  var invalidInput = { errorCode: ErrorCode.INVALID_ARGUMENTS };
5611
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5622
5612
  callback(invalidInput, null);
5623
5613
  return;
5624
5614
  }
@@ -5628,12 +5618,14 @@ var media;
5628
5618
  // MediaControllerEvent response is used to notify the app about events and is a partial response to selectMedia
5629
5619
  if (mediaEvent) {
5630
5620
  if (isVideoControllerRegistered(mediaInputs)) {
5621
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5631
5622
  mediaInputs.videoProps.videoController.notifyEventToApp(mediaEvent);
5632
5623
  }
5633
5624
  return;
5634
5625
  }
5635
5626
  // Media Attachments are final response to selectMedia
5636
5627
  if (!localAttachments) {
5628
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5637
5629
  callback(err, null);
5638
5630
  return;
5639
5631
  }
@@ -5696,16 +5688,20 @@ var media;
5696
5688
  GlobalVars.hostClientType === HostClientType.teamsPhones ||
5697
5689
  GlobalVars.hostClientType === HostClientType.teamsDisplays) {
5698
5690
  var notSupportedError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
5691
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5699
5692
  callback(notSupportedError, null);
5700
5693
  return;
5701
5694
  }
5702
5695
  if (!isCurrentSDKVersionAtLeast(scanBarCodeAPIMobileSupportVersion)) {
5703
5696
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5697
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5704
5698
  callback(oldPlatformError, null);
5705
5699
  return;
5706
5700
  }
5701
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5707
5702
  if (!validateScanBarCodeInput(config)) {
5708
5703
  var invalidInput = { errorCode: ErrorCode.INVALID_ARGUMENTS };
5704
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5709
5705
  callback(invalidInput, null);
5710
5706
  return;
5711
5707
  }
@@ -5729,6 +5725,7 @@ function createFile(assembleAttachment, mimeType) {
5729
5725
  if (assembleAttachment == null || mimeType == null || assembleAttachment.length <= 0) {
5730
5726
  return null;
5731
5727
  }
5728
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5732
5729
  var file;
5733
5730
  var sequence = 1;
5734
5731
  assembleAttachment.sort(function (a, b) { return (a.sequence > b.sequence ? 1 : -1); });
@@ -6697,7 +6694,9 @@ var monetization;
6697
6694
  * @returns Promise that will be resolved when the operation has completed or rejected with SdkError value
6698
6695
  */
6699
6696
  function openPurchaseExperience(param1, param2) {
6697
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6700
6698
  var callback;
6699
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6701
6700
  var planInfo;
6702
6701
  if (typeof param1 === 'function') {
6703
6702
  callback = param1;
@@ -6832,7 +6831,9 @@ var people;
6832
6831
  function selectPeople(param1, param2) {
6833
6832
  var _a;
6834
6833
  ensureInitialized(FrameContexts.content, FrameContexts.task, FrameContexts.settings);
6834
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6835
6835
  var callback;
6836
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6836
6837
  var peoplePickerInputs;
6837
6838
  if (typeof param1 === 'function') {
6838
6839
  _a = [param1, param2], callback = _a[0], peoplePickerInputs = _a[1];
@@ -6848,12 +6849,14 @@ var people;
6848
6849
  if (!isCurrentSDKVersionAtLeast(peoplePickerRequiredVersion)) {
6849
6850
  throw { errorCode: ErrorCode.OLD_PLATFORM };
6850
6851
  }
6852
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6851
6853
  if (!validatePeoplePickerInput(peoplePickerInputs)) {
6852
6854
  throw { errorCode: ErrorCode.INVALID_ARGUMENTS };
6853
6855
  }
6854
6856
  if (!isSupported()) {
6855
6857
  throw errorNotSupportedOnPlatform;
6856
6858
  }
6859
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6857
6860
  resolve(sendAndHandleSdkError('people.selectPeople', peoplePickerInputs));
6858
6861
  });
6859
6862
  }
@@ -7118,13 +7121,6 @@ var search;
7118
7121
  * Your application should *not* re-render inside of these callbacks, there may be a large number
7119
7122
  * of onChangeHandler calls if the user is typing rapidly in the search box.
7120
7123
  *
7121
- * @param onChangeHandler - This optional handler will be called when the user first starts using the
7122
- * host's search box and as the user types their query. Can be used to put your application into a
7123
- * word-wheeling state or to display suggestions as the user is typing.
7124
- *
7125
- * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
7126
- * with the current contents of the search box.
7127
- *
7128
7124
  * @param onClosedHandler - This handler will be called when the user exits or cancels their search.
7129
7125
  * Should be used to return your application to its most recent, non-search state. The value of {@link SearchQuery.searchTerm}
7130
7126
  * will be whatever the last query was before ending search.
@@ -7133,18 +7129,24 @@ var search;
7133
7129
  * search (by pressing Enter for example). Should be used to display the full list of search results.
7134
7130
  * The value of {@link SearchQuery.searchTerm} is the complete query the user entered in the search box.
7135
7131
  *
7132
+ * @param onChangeHandler - This optional handler will be called when the user first starts using the
7133
+ * host's search box and as the user types their query. Can be used to put your application into a
7134
+ * word-wheeling state or to display suggestions as the user is typing.
7135
+ *
7136
+ * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
7137
+ * with the current contents of the search box.
7136
7138
  * @example
7137
7139
  * ``` ts
7138
7140
  * search.registerHandlers(
7139
- query => {
7140
- console.log(`Update your application with the changed search query: ${query.searchTerm}`);
7141
- },
7142
7141
  query => {
7143
7142
  console.log('Update your application to handle the search experience being closed. Last query: ${query.searchTerm}');
7144
7143
  },
7145
7144
  query => {
7146
7145
  console.log(`Update your application to handle an executed search result: ${query.searchTerm}`);
7147
7146
  },
7147
+ query => {
7148
+ console.log(`Update your application with the changed search query: ${query.searchTerm}`);
7149
+ },
7148
7150
  );
7149
7151
  * ```
7150
7152
  *
@@ -7243,6 +7245,7 @@ var sharing;
7243
7245
  }
7244
7246
  }
7245
7247
  function validateTypeConsistency(shareRequest) {
7248
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
7246
7249
  var err;
7247
7250
  if (shareRequest.content.some(function (item) { return !item.type; })) {
7248
7251
  err = {
@@ -7260,6 +7263,7 @@ var sharing;
7260
7263
  }
7261
7264
  }
7262
7265
  function validateContentForSupportedTypes(shareRequest) {
7266
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
7263
7267
  var err;
7264
7268
  if (shareRequest.content[0].type === 'URL') {
7265
7269
  if (shareRequest.content.some(function (item) { return !item.url; })) {
@@ -7488,6 +7492,7 @@ var appInitialization;
7488
7492
 
7489
7493
 
7490
7494
 
7495
+
7491
7496
  /**
7492
7497
  * @deprecated
7493
7498
  * As of 2.0.0, please use {@link app.initialize app.initialize(validMessageOrigins?: string[]): Promise\<void\>} instead.
@@ -7588,7 +7593,7 @@ function registerOnThemeChangeHandler(handler) {
7588
7593
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
7589
7594
  */
7590
7595
  function registerFullScreenHandler(handler) {
7591
- pages.registerFullScreenHandlerHelper(handler);
7596
+ registerHandlerHelper('fullScreenChange', handler, []);
7592
7597
  }
7593
7598
  /**
7594
7599
  * @deprecated
@@ -7600,7 +7605,7 @@ function registerFullScreenHandler(handler) {
7600
7605
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
7601
7606
  */
7602
7607
  function registerAppButtonClickHandler(handler) {
7603
- pages.appButton.onClickHelper(handler);
7608
+ registerHandlerHelper('appButtonClick', handler, [FrameContexts.content]);
7604
7609
  }
7605
7610
  /**
7606
7611
  * @deprecated
@@ -7612,7 +7617,7 @@ function registerAppButtonClickHandler(handler) {
7612
7617
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
7613
7618
  */
7614
7619
  function registerAppButtonHoverEnterHandler(handler) {
7615
- pages.appButton.onHoverEnterHelper(handler);
7620
+ registerHandlerHelper('appButtonHoverEnter', handler, [FrameContexts.content]);
7616
7621
  }
7617
7622
  /**
7618
7623
  * @deprecated
@@ -7624,7 +7629,7 @@ function registerAppButtonHoverEnterHandler(handler) {
7624
7629
  *
7625
7630
  */
7626
7631
  function registerAppButtonHoverLeaveHandler(handler) {
7627
- pages.appButton.onHoverLeaveHelper(handler);
7632
+ registerHandlerHelper('appButtonHoverLeave', handler, [FrameContexts.content]);
7628
7633
  }
7629
7634
  /**
7630
7635
  * @deprecated
@@ -7675,7 +7680,7 @@ function registerBeforeUnloadHandler(handler) {
7675
7680
  * @param handler - The handler to invoked by the app when they want the focus to be in the place of their choice.
7676
7681
  */
7677
7682
  function registerFocusEnterHandler(handler) {
7678
- pages.registerFocusEnterHandlerHelper(handler);
7683
+ registerHandlerHelper('focusEnter', handler, []);
7679
7684
  }
7680
7685
  /**
7681
7686
  * @deprecated
@@ -7686,7 +7691,7 @@ function registerFocusEnterHandler(handler) {
7686
7691
  * @param handler - The handler to invoke when the user click on Settings.
7687
7692
  */
7688
7693
  function registerChangeSettingsHandler(handler) {
7689
- pages.config.registerChangeConfigHandlerHelper(handler);
7694
+ registerHandlerHelper('changeSettings', handler, [FrameContexts.content]);
7690
7695
  }
7691
7696
  /**
7692
7697
  * @deprecated
@@ -8079,7 +8084,8 @@ var tasks;
8079
8084
  */
8080
8085
  function startTask(taskInfo, submitHandler) {
8081
8086
  var dialogSubmitHandler = submitHandler
8082
- ? function (sdkResponse) { return submitHandler(sdkResponse.err, sdkResponse.result); }
8087
+ ? /* eslint-disable-next-line strict-null-checks/all */ /* fix tracked by 5730662 */
8088
+ function (sdkResponse) { return submitHandler(sdkResponse.err, sdkResponse.result); }
8083
8089
  : undefined;
8084
8090
  if (taskInfo.card !== undefined || taskInfo.url === undefined) {
8085
8091
  ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
@@ -8131,6 +8137,7 @@ var tasks;
8131
8137
  * @returns - Converted UrlDialogInfo object
8132
8138
  */
8133
8139
  function getUrlDialogInfoFromTaskInfo(taskInfo) {
8140
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
8134
8141
  var urldialogInfo = {
8135
8142
  url: taskInfo.url,
8136
8143
  size: {
@@ -8142,13 +8149,13 @@ var tasks;
8142
8149
  };
8143
8150
  return urldialogInfo;
8144
8151
  }
8145
- tasks.getUrlDialogInfoFromTaskInfo = getUrlDialogInfoFromTaskInfo;
8146
8152
  /**
8147
8153
  * Converts {@link TaskInfo} to {@link BotUrlDialogInfo}
8148
8154
  * @param taskInfo - TaskInfo object to convert
8149
8155
  * @returns - converted BotUrlDialogInfo object
8150
8156
  */
8151
8157
  function getBotUrlDialogInfoFromTaskInfo(taskInfo) {
8158
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
8152
8159
  var botUrldialogInfo = {
8153
8160
  url: taskInfo.url,
8154
8161
  size: {
@@ -8161,7 +8168,6 @@ var tasks;
8161
8168
  };
8162
8169
  return botUrldialogInfo;
8163
8170
  }
8164
- tasks.getBotUrlDialogInfoFromTaskInfo = getBotUrlDialogInfoFromTaskInfo;
8165
8171
  /**
8166
8172
  * Sets the height and width of the {@link TaskInfo} object to the original height and width, if initially specified,
8167
8173
  * otherwise uses the height and width values corresponding to {@link TaskModuleDimension | TaskModuleDimension.Small}
@@ -8207,6 +8213,7 @@ var tasks;
8207
8213
 
8208
8214
 
8209
8215
 
8216
+
8210
8217
 
8211
8218
 
8212
8219
 
@@ -9358,6 +9365,7 @@ var teams;
9358
9365
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
9359
9366
  throw new Error(JSON.stringify(oldPlatformError));
9360
9367
  }
9368
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
9361
9369
  resolve(sendAndUnwrap('getUserJoinedTeams', teamInstanceParameters));
9362
9370
  });
9363
9371
  }