@azure/communication-react 1.12.1-alpha-202401280013 → 1.12.1-alpha-202401300049
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/dist/communication-react.d.ts +25 -1
- package/dist/dist-cjs/communication-react/index.js +117 -127
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +4 -21
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +24 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +10 -13
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +3 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +2 -2
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +6 -6
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
|
|
173
173
|
// Copyright (c) Microsoft Corporation.
|
174
174
|
// Licensed under the MIT License.
|
175
175
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
176
|
-
var telemetryVersion = '1.12.1-alpha-
|
176
|
+
var telemetryVersion = '1.12.1-alpha-202401300049';
|
177
177
|
|
178
178
|
|
179
179
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -525,7 +525,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
525
525
|
|
526
526
|
// Copyright (c) Microsoft Corporation.
|
527
527
|
// Licensed under the MIT License.
|
528
|
-
var __awaiter$
|
528
|
+
var __awaiter$O = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
529
529
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
530
530
|
return new (P || (P = Promise))(function (resolve, reject) {
|
531
531
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -564,7 +564,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
564
564
|
*
|
565
565
|
* @private
|
566
566
|
*/
|
567
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
567
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$O(void 0, void 0, void 0, function* () {
|
568
568
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
569
569
|
for (const view of unparentedViews) {
|
570
570
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -772,7 +772,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
772
772
|
|
773
773
|
// Copyright (c) Microsoft Corporation.
|
774
774
|
// Licensed under the MIT License.
|
775
|
-
var __awaiter$
|
775
|
+
var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
776
776
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
777
777
|
return new (P || (P = Promise))(function (resolve, reject) {
|
778
778
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -793,7 +793,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
793
793
|
* @private
|
794
794
|
*/
|
795
795
|
const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager, call, options) => {
|
796
|
-
const onStartLocalVideo = () => __awaiter$
|
796
|
+
const onStartLocalVideo = () => __awaiter$N(void 0, void 0, void 0, function* () {
|
797
797
|
// Before the call object creates a stream, dispose of any local preview streams.
|
798
798
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
799
799
|
// of disposing and creating a new stream?
|
@@ -813,7 +813,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
813
813
|
yield call.startVideo(stream);
|
814
814
|
}
|
815
815
|
});
|
816
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
816
|
+
const onStopLocalVideo = (stream) => __awaiter$N(void 0, void 0, void 0, function* () {
|
817
817
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
818
818
|
if (!callId) {
|
819
819
|
return;
|
@@ -822,7 +822,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
822
822
|
yield call.stopVideo(stream);
|
823
823
|
}
|
824
824
|
});
|
825
|
-
const onToggleCamera = (options) => __awaiter$
|
825
|
+
const onToggleCamera = (options) => __awaiter$N(void 0, void 0, void 0, function* () {
|
826
826
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
827
827
|
// the disposal of the unparented views is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
828
828
|
// The root cause of the issue is caused by never transitioning the unparented view to the
|
@@ -879,19 +879,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
879
879
|
}
|
880
880
|
}
|
881
881
|
});
|
882
|
-
const onSelectMicrophone = (device) => __awaiter$
|
882
|
+
const onSelectMicrophone = (device) => __awaiter$N(void 0, void 0, void 0, function* () {
|
883
883
|
if (!deviceManager) {
|
884
884
|
return;
|
885
885
|
}
|
886
886
|
return deviceManager.selectMicrophone(device);
|
887
887
|
});
|
888
|
-
const onSelectSpeaker = (device) => __awaiter$
|
888
|
+
const onSelectSpeaker = (device) => __awaiter$N(void 0, void 0, void 0, function* () {
|
889
889
|
if (!deviceManager) {
|
890
890
|
return;
|
891
891
|
}
|
892
892
|
return deviceManager.selectSpeaker(device);
|
893
893
|
});
|
894
|
-
const onSelectCamera = (device, options) => __awaiter$
|
894
|
+
const onSelectCamera = (device, options) => __awaiter$N(void 0, void 0, void 0, function* () {
|
895
895
|
if (!deviceManager) {
|
896
896
|
return;
|
897
897
|
}
|
@@ -922,11 +922,11 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
922
922
|
}
|
923
923
|
});
|
924
924
|
/* @conditional-compile-remove(raise-hand) */
|
925
|
-
const onRaiseHand = () => __awaiter$
|
925
|
+
const onRaiseHand = () => __awaiter$N(void 0, void 0, void 0, function* () { var _a; return yield ((_a = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _a === void 0 ? void 0 : _a.raiseHand()); });
|
926
926
|
/* @conditional-compile-remove(raise-hand) */
|
927
|
-
const onLowerHand = () => __awaiter$
|
927
|
+
const onLowerHand = () => __awaiter$N(void 0, void 0, void 0, function* () { var _b; return yield ((_b = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _b === void 0 ? void 0 : _b.lowerHand()); });
|
928
928
|
/* @conditional-compile-remove(raise-hand) */
|
929
|
-
const onToggleRaiseHand = () => __awaiter$
|
929
|
+
const onToggleRaiseHand = () => __awaiter$N(void 0, void 0, void 0, function* () {
|
930
930
|
const raiseHandFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand);
|
931
931
|
const localUserId = callClient.getState().userId;
|
932
932
|
const isLocalRaisedHand = raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.getRaisedHands().find((publishedState) => toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId));
|
@@ -938,7 +938,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
938
938
|
}
|
939
939
|
});
|
940
940
|
/* @conditional-compile-remove(reaction) */
|
941
|
-
const onReactionClicked = (reaction) => __awaiter$
|
941
|
+
const onReactionClicked = (reaction) => __awaiter$N(void 0, void 0, void 0, function* () {
|
942
942
|
var _c;
|
943
943
|
if (reaction === 'like' ||
|
944
944
|
reaction === 'applause' ||
|
@@ -952,19 +952,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
952
952
|
}
|
953
953
|
return;
|
954
954
|
});
|
955
|
-
const onToggleMicrophone = () => __awaiter$
|
955
|
+
const onToggleMicrophone = () => __awaiter$N(void 0, void 0, void 0, function* () {
|
956
956
|
if (!call || !(_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {
|
957
957
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
958
958
|
}
|
959
959
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
960
960
|
});
|
961
|
-
const onStartScreenShare = () => __awaiter$
|
962
|
-
const onStopScreenShare = () => __awaiter$
|
963
|
-
const onToggleScreenShare = () => __awaiter$
|
964
|
-
const onHangUp = (forEveryone) => __awaiter$
|
961
|
+
const onStartScreenShare = () => __awaiter$N(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
962
|
+
const onStopScreenShare = () => __awaiter$N(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
963
|
+
const onToggleScreenShare = () => __awaiter$N(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
964
|
+
const onHangUp = (forEveryone) => __awaiter$N(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
965
965
|
/* @conditional-compile-remove(PSTN-calls) */
|
966
|
-
const onToggleHold = () => __awaiter$
|
967
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
966
|
+
const onToggleHold = () => __awaiter$N(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
|
967
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$N(void 0, void 0, void 0, function* () {
|
968
968
|
var _d;
|
969
969
|
if (!call || call.localVideoStreams.length === 0) {
|
970
970
|
return;
|
@@ -980,7 +980,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
980
980
|
const { view } = (_d = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _d !== void 0 ? _d : {};
|
981
981
|
return view ? { view } : undefined;
|
982
982
|
});
|
983
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
983
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$N(void 0, void 0, void 0, function* () {
|
984
984
|
if (!call) {
|
985
985
|
return;
|
986
986
|
}
|
@@ -1011,7 +1011,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1011
1011
|
}
|
1012
1012
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
1013
1013
|
});
|
1014
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
1014
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1015
1015
|
if (!call) {
|
1016
1016
|
return;
|
1017
1017
|
}
|
@@ -1032,7 +1032,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1032
1032
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
1033
1033
|
}
|
1034
1034
|
});
|
1035
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
1035
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1036
1036
|
if (!call) {
|
1037
1037
|
return;
|
1038
1038
|
}
|
@@ -1049,7 +1049,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1049
1049
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
1050
1050
|
}
|
1051
1051
|
});
|
1052
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
1052
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1053
1053
|
if (!call) {
|
1054
1054
|
return;
|
1055
1055
|
}
|
@@ -1066,7 +1066,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1066
1066
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
1067
1067
|
}
|
1068
1068
|
});
|
1069
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
1069
|
+
const onDisposeLocalStreamView = () => __awaiter$N(void 0, void 0, void 0, function* () {
|
1070
1070
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
1071
1071
|
const callState = call && callClient.getState().calls[call.id];
|
1072
1072
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -1079,18 +1079,18 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1079
1079
|
yield disposeAllLocalPreviewViews(callClient);
|
1080
1080
|
});
|
1081
1081
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
1082
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
1082
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$N(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
1083
1083
|
const notImplemented = () => {
|
1084
1084
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
1085
1085
|
};
|
1086
1086
|
/* @conditional-compile-remove(call-readiness) */
|
1087
|
-
const askDevicePermission = (constrain) => __awaiter$
|
1087
|
+
const askDevicePermission = (constrain) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1088
1088
|
if (deviceManager) {
|
1089
1089
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
1090
1090
|
}
|
1091
1091
|
});
|
1092
1092
|
/* @conditional-compile-remove(video-background-effects) */
|
1093
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
1093
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$N(void 0, void 0, void 0, function* () {
|
1094
1094
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1095
1095
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
1096
1096
|
if (stream) {
|
@@ -1103,7 +1103,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1103
1103
|
}
|
1104
1104
|
});
|
1105
1105
|
/* @conditional-compile-remove(video-background-effects) */
|
1106
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
1106
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1107
1107
|
var _e;
|
1108
1108
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1109
1109
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1117,7 +1117,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1117
1117
|
}
|
1118
1118
|
});
|
1119
1119
|
/* @conditional-compile-remove(video-background-effects) */
|
1120
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
1120
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1121
1121
|
var _f;
|
1122
1122
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1123
1123
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1131,34 +1131,34 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1131
1131
|
}
|
1132
1132
|
});
|
1133
1133
|
/* @conditional-compile-remove(close-captions) */
|
1134
|
-
const onStartCaptions = (options) => __awaiter$
|
1134
|
+
const onStartCaptions = (options) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1135
1135
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1136
1136
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.startCaptions(options));
|
1137
1137
|
});
|
1138
1138
|
/* @conditional-compile-remove(close-captions) */
|
1139
|
-
const onStopCaptions = () => __awaiter$
|
1139
|
+
const onStopCaptions = () => __awaiter$N(void 0, void 0, void 0, function* () {
|
1140
1140
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1141
1141
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.stopCaptions());
|
1142
1142
|
});
|
1143
1143
|
/* @conditional-compile-remove(close-captions) */
|
1144
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
1144
|
+
const onSetSpokenLanguage = (language) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1145
1145
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1146
1146
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.setSpokenLanguage(language));
|
1147
1147
|
});
|
1148
1148
|
/* @conditional-compile-remove(close-captions) */
|
1149
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
1149
|
+
const onSetCaptionLanguage = (language) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1150
1150
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1151
1151
|
yield captionsFeature.setCaptionLanguage(language);
|
1152
1152
|
});
|
1153
1153
|
/* @conditional-compile-remove(end-of-call-survey) */
|
1154
|
-
const onSubmitSurvey = (survey) => __awaiter$
|
1154
|
+
const onSubmitSurvey = (survey) => __awaiter$N(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.CallSurvey).submitSurvey(survey)); });
|
1155
1155
|
/* @conditional-compile-remove(spotlight) */
|
1156
|
-
const onStartSpotlight = (userId) => __awaiter$
|
1156
|
+
const onStartSpotlight = (userId) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1157
1157
|
const participant = _toCommunicationIdentifier(userId);
|
1158
1158
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).startSpotlight([participant]));
|
1159
1159
|
});
|
1160
1160
|
/* @conditional-compile-remove(spotlight) */
|
1161
|
-
const onStopSpotlight = (userId) => __awaiter$
|
1161
|
+
const onStopSpotlight = (userId) => __awaiter$N(void 0, void 0, void 0, function* () {
|
1162
1162
|
const participant = _toCommunicationIdentifier(userId);
|
1163
1163
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Spotlight).stopSpotlight([participant]));
|
1164
1164
|
});
|
@@ -1221,7 +1221,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1221
1221
|
|
1222
1222
|
// Copyright (c) Microsoft Corporation.
|
1223
1223
|
// Licensed under the MIT License.
|
1224
|
-
var __awaiter$
|
1224
|
+
var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1225
1225
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1226
1226
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1227
1227
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1249,7 +1249,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1249
1249
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1250
1250
|
},
|
1251
1251
|
/* @conditional-compile-remove(PSTN-calls) */
|
1252
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1252
|
+
onAddParticipant: (userId, options) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1253
1253
|
const participant = _toCommunicationIdentifier(userId);
|
1254
1254
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1255
1255
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1257,7 +1257,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1257
1257
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1258
1258
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1259
1259
|
}
|
1260
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1260
|
+
}), onRemoveParticipant: (userId) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1261
1261
|
const participant = _toCommunicationIdentifier(userId);
|
1262
1262
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1263
1263
|
}) });
|
@@ -1265,7 +1265,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1265
1265
|
|
1266
1266
|
// Copyright (c) Microsoft Corporation.
|
1267
1267
|
// Licensed under the MIT License.
|
1268
|
-
var __awaiter$
|
1268
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1269
1269
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1270
1270
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1271
1271
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1297,7 +1297,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1297
1297
|
},
|
1298
1298
|
/* @conditional-compile-remove(teams-identity-support) */
|
1299
1299
|
/* @conditional-compile-remove(PSTN-calls) */
|
1300
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1300
|
+
onAddParticipant: (userId, options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
1301
1301
|
const participant = _toCommunicationIdentifier(userId);
|
1302
1302
|
/* @conditional-compile-remove(teams-identity-support) */
|
1303
1303
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1313,7 +1313,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1313
1313
|
}
|
1314
1314
|
/* @conditional-compile-remove(teams-identity-support) */
|
1315
1315
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1316
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1316
|
+
}), onRemoveParticipant: (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
1317
1317
|
const participant = _toCommunicationIdentifier(userId);
|
1318
1318
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1319
1319
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1404,7 +1404,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1404
1404
|
|
1405
1405
|
// Copyright (c) Microsoft Corporation.
|
1406
1406
|
// Licensed under the MIT License.
|
1407
|
-
var __awaiter$
|
1407
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1408
1408
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1409
1409
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1410
1410
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1453,13 +1453,13 @@ class ProxyDeviceManager {
|
|
1453
1453
|
this.selectCamera = (videoDeviceInfo) => {
|
1454
1454
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1455
1455
|
};
|
1456
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1456
|
+
this.videoDevicesUpdated = () => __awaiter$K(this, void 0, void 0, function* () {
|
1457
1457
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1458
1458
|
// We don't want to show that in the UI.
|
1459
1459
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1460
1460
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1461
1461
|
});
|
1462
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1462
|
+
this.audioDevicesUpdated = () => __awaiter$K(this, void 0, void 0, function* () {
|
1463
1463
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1464
1464
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1465
1465
|
});
|
@@ -1860,7 +1860,7 @@ function convertFromSDKToRaisedHandState(raisedHand) {
|
|
1860
1860
|
|
1861
1861
|
// Copyright (c) Microsoft Corporation.
|
1862
1862
|
// Licensed under the MIT License.
|
1863
|
-
var __awaiter$
|
1863
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1864
1864
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1865
1865
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1866
1866
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2679,7 +2679,7 @@ let CallContext$2 = class CallContext {
|
|
2679
2679
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
2680
2680
|
*/
|
2681
2681
|
withAsyncErrorTeedToState(action, target) {
|
2682
|
-
return (...args) => __awaiter$
|
2682
|
+
return (...args) => __awaiter$J(this, void 0, void 0, function* () {
|
2683
2683
|
try {
|
2684
2684
|
return yield action(...args);
|
2685
2685
|
}
|
@@ -3133,7 +3133,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
3133
3133
|
|
3134
3134
|
// Copyright (c) Microsoft Corporation.
|
3135
3135
|
// Licensed under the MIT License.
|
3136
|
-
var __awaiter$
|
3136
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3137
3137
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3138
3138
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3139
3139
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3143,7 +3143,7 @@ var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
3143
3143
|
});
|
3144
3144
|
};
|
3145
3145
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
3146
|
-
return __awaiter$
|
3146
|
+
return __awaiter$I(this, void 0, void 0, function* () {
|
3147
3147
|
// we can only have 3 types of createView
|
3148
3148
|
let streamEventType;
|
3149
3149
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -3272,7 +3272,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
3272
3272
|
});
|
3273
3273
|
}
|
3274
3274
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
3275
|
-
return __awaiter$
|
3275
|
+
return __awaiter$I(this, void 0, void 0, function* () {
|
3276
3276
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
3277
3277
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
3278
3278
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3441,7 +3441,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3441
3441
|
// Render LocalVideoStream that is not part of a Call
|
3442
3442
|
// Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).
|
3443
3443
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3444
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
3444
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$I(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
3445
3445
|
}
|
3446
3446
|
else {
|
3447
3447
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -4051,7 +4051,7 @@ class CallSubscriber {
|
|
4051
4051
|
|
4052
4052
|
// Copyright (c) Microsoft Corporation.
|
4053
4053
|
// Licensed under the MIT License.
|
4054
|
-
var __awaiter$
|
4054
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4055
4055
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4056
4056
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4057
4057
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4071,14 +4071,14 @@ class ProxyIncomingCall {
|
|
4071
4071
|
switch (prop) {
|
4072
4072
|
case 'accept': {
|
4073
4073
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4074
|
-
return __awaiter$
|
4074
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4075
4075
|
return yield target.accept(...args);
|
4076
4076
|
});
|
4077
4077
|
}, 'IncomingCall.accept');
|
4078
4078
|
}
|
4079
4079
|
case 'reject': {
|
4080
4080
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4081
|
-
return __awaiter$
|
4081
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
4082
4082
|
return yield target.reject(...args);
|
4083
4083
|
});
|
4084
4084
|
}, 'IncomingCall.reject');
|
@@ -4319,7 +4319,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
4319
4319
|
|
4320
4320
|
// Copyright (c) Microsoft Corporation.
|
4321
4321
|
// Licensed under the MIT License.
|
4322
|
-
var __awaiter$
|
4322
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4323
4323
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4324
4324
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4325
4325
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4345,56 +4345,56 @@ class ProxyCallCommon {
|
|
4345
4345
|
switch (prop) {
|
4346
4346
|
case 'mute': {
|
4347
4347
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4348
|
-
return __awaiter$
|
4348
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4349
4349
|
return yield target.mute(...args);
|
4350
4350
|
});
|
4351
4351
|
}, 'Call.mute');
|
4352
4352
|
}
|
4353
4353
|
case 'unmute': {
|
4354
4354
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4355
|
-
return __awaiter$
|
4355
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4356
4356
|
return yield target.unmute(...args);
|
4357
4357
|
});
|
4358
4358
|
}, 'Call.unmute');
|
4359
4359
|
}
|
4360
4360
|
case 'startVideo': {
|
4361
4361
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4362
|
-
return __awaiter$
|
4362
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4363
4363
|
return yield target.startVideo(...args);
|
4364
4364
|
});
|
4365
4365
|
}, 'Call.startVideo');
|
4366
4366
|
}
|
4367
4367
|
case 'stopVideo': {
|
4368
4368
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4369
|
-
return __awaiter$
|
4369
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4370
4370
|
return yield target.stopVideo(...args);
|
4371
4371
|
});
|
4372
4372
|
}, 'Call.stopVideo');
|
4373
4373
|
}
|
4374
4374
|
case 'startScreenSharing': {
|
4375
4375
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4376
|
-
return __awaiter$
|
4376
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4377
4377
|
return yield target.startScreenSharing(...args);
|
4378
4378
|
});
|
4379
4379
|
}, 'Call.startScreenSharing');
|
4380
4380
|
}
|
4381
4381
|
case 'stopScreenSharing': {
|
4382
4382
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4383
|
-
return __awaiter$
|
4383
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4384
4384
|
return yield target.stopScreenSharing(...args);
|
4385
4385
|
});
|
4386
4386
|
}, 'Call.stopScreenSharing');
|
4387
4387
|
}
|
4388
4388
|
case 'hold': {
|
4389
4389
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4390
|
-
return __awaiter$
|
4390
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4391
4391
|
return yield target.hold(...args);
|
4392
4392
|
});
|
4393
4393
|
}, 'Call.hold');
|
4394
4394
|
}
|
4395
4395
|
case 'resume': {
|
4396
4396
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4397
|
-
return __awaiter$
|
4397
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
4398
4398
|
return yield target.resume(...args);
|
4399
4399
|
});
|
4400
4400
|
}, 'Call.resume');
|
@@ -4434,7 +4434,7 @@ class ProxyTeamsCaptions {
|
|
4434
4434
|
get(target, prop) {
|
4435
4435
|
switch (prop) {
|
4436
4436
|
case 'startCaptions':
|
4437
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4437
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$G(this, void 0, void 0, function* () {
|
4438
4438
|
var _a, _b;
|
4439
4439
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
4440
4440
|
const ret = yield target.startCaptions(...args);
|
@@ -4442,7 +4442,7 @@ class ProxyTeamsCaptions {
|
|
4442
4442
|
return ret;
|
4443
4443
|
}), 'Call.feature');
|
4444
4444
|
case 'stopCaptions':
|
4445
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4445
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$G(this, void 0, void 0, function* () {
|
4446
4446
|
const ret = yield target.stopCaptions(...args);
|
4447
4447
|
this._context.setIsCaptionActive(this._call.id, false);
|
4448
4448
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
@@ -4450,13 +4450,13 @@ class ProxyTeamsCaptions {
|
|
4450
4450
|
return ret;
|
4451
4451
|
}), 'Call.feature');
|
4452
4452
|
case 'setSpokenLanguage':
|
4453
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4453
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$G(this, void 0, void 0, function* () {
|
4454
4454
|
const ret = yield target.setSpokenLanguage(...args);
|
4455
4455
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
4456
4456
|
return ret;
|
4457
4457
|
}), 'Call.feature');
|
4458
4458
|
case 'setCaptionLanguage':
|
4459
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4459
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$G(this, void 0, void 0, function* () {
|
4460
4460
|
const ret = yield target.setCaptionLanguage(...args);
|
4461
4461
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
4462
4462
|
return ret;
|
@@ -4504,7 +4504,7 @@ class ProxyTransferCallFeature {
|
|
4504
4504
|
|
4505
4505
|
// Copyright (c) Microsoft Corporation.
|
4506
4506
|
// Licensed under the MIT License.
|
4507
|
-
var __awaiter$
|
4507
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4508
4508
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4509
4509
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4510
4510
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4518,7 +4518,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
4518
4518
|
switch (prop) {
|
4519
4519
|
case 'addParticipant': {
|
4520
4520
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4521
|
-
return __awaiter$
|
4521
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4522
4522
|
return yield target.addParticipant(...args);
|
4523
4523
|
});
|
4524
4524
|
}, 'Call.addParticipant');
|
@@ -4756,7 +4756,7 @@ class InternalCallContext {
|
|
4756
4756
|
|
4757
4757
|
// Copyright (c) Microsoft Corporation.
|
4758
4758
|
// Licensed under the MIT License.
|
4759
|
-
var __awaiter$
|
4759
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4760
4760
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4761
4761
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4762
4762
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4771,7 +4771,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
4771
4771
|
switch (prop) {
|
4772
4772
|
case 'addParticipant': {
|
4773
4773
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4774
|
-
return __awaiter$
|
4774
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
4775
4775
|
return yield target.addParticipant(...args);
|
4776
4776
|
});
|
4777
4777
|
}, 'TeamsCall.addParticipant');
|
@@ -4888,7 +4888,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
4888
4888
|
|
4889
4889
|
// Copyright (c) Microsoft Corporation.
|
4890
4890
|
// Licensed under the MIT License.
|
4891
|
-
var __awaiter$
|
4891
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4892
4892
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4893
4893
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4894
4894
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4910,7 +4910,7 @@ class ProxyVideoStreamRendererView {
|
|
4910
4910
|
get(target, prop) {
|
4911
4911
|
switch (prop) {
|
4912
4912
|
case 'updateScalingMode': {
|
4913
|
-
return (...args) => __awaiter$
|
4913
|
+
return (...args) => __awaiter$D(this, void 0, void 0, function* () {
|
4914
4914
|
yield target.updateScalingMode(...args);
|
4915
4915
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
4916
4916
|
});
|
@@ -4931,7 +4931,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
4931
4931
|
|
4932
4932
|
// Copyright (c) Microsoft Corporation.
|
4933
4933
|
// Licensed under the MIT License.
|
4934
|
-
var __awaiter$
|
4934
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4935
4935
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4936
4936
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4937
4937
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4953,7 +4953,7 @@ class ProxyCallClient {
|
|
4953
4953
|
get(target, prop) {
|
4954
4954
|
switch (prop) {
|
4955
4955
|
case 'createCallAgent': {
|
4956
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4956
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$C(this, void 0, void 0, function* () {
|
4957
4957
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4958
4958
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4959
4959
|
// callAgent if the createCallAgent succeeds.
|
@@ -4966,7 +4966,7 @@ class ProxyCallClient {
|
|
4966
4966
|
}), 'CallClient.createCallAgent');
|
4967
4967
|
}
|
4968
4968
|
case 'createTeamsCallAgent': {
|
4969
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4969
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$C(this, void 0, void 0, function* () {
|
4970
4970
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4971
4971
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4972
4972
|
// callAgent if the createCallAgent succeeds.
|
@@ -4979,7 +4979,7 @@ class ProxyCallClient {
|
|
4979
4979
|
}), 'CallClient.createTeamsCallAgent');
|
4980
4980
|
}
|
4981
4981
|
case 'getDeviceManager': {
|
4982
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
4982
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$C(this, void 0, void 0, function* () {
|
4983
4983
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
4984
4984
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
4985
4985
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -5008,7 +5008,7 @@ class ProxyCallClient {
|
|
5008
5008
|
/**
|
5009
5009
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
5010
5010
|
*/
|
5011
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
5011
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$C(this, void 0, void 0, function* () {
|
5012
5012
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
5013
5013
|
this._context.setEnvironmentInfo(environmentInfo);
|
5014
5014
|
return environmentInfo;
|
@@ -5069,7 +5069,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
5069
5069
|
});
|
5070
5070
|
Object.defineProperty(callClient, 'createView', {
|
5071
5071
|
configurable: false,
|
5072
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
5072
|
+
value: (callId, participantId, stream, options) => __awaiter$C(void 0, void 0, void 0, function* () {
|
5073
5073
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
5074
5074
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
5075
5075
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -7618,7 +7618,7 @@ const _MentionPopover = (props) => {
|
|
7618
7618
|
|
7619
7619
|
// Copyright (c) Microsoft Corporation.
|
7620
7620
|
// Licensed under the MIT License.
|
7621
|
-
var __awaiter$
|
7621
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7622
7622
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7623
7623
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7624
7624
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7804,7 +7804,7 @@ const TextFieldWithMention = (props) => {
|
|
7804
7804
|
onSuggestionSelected,
|
7805
7805
|
updateMentionSuggestions
|
7806
7806
|
]);
|
7807
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
7807
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$B(void 0, void 0, void 0, function* () {
|
7808
7808
|
var _a;
|
7809
7809
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
7810
7810
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -7981,7 +7981,7 @@ const TextFieldWithMention = (props) => {
|
|
7981
7981
|
});
|
7982
7982
|
}
|
7983
7983
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
7984
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$
|
7984
|
+
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$B(void 0, void 0, void 0, function* () {
|
7985
7985
|
var _b;
|
7986
7986
|
debouncedQueryUpdate.cancel();
|
7987
7987
|
if (event.currentTarget === null) {
|
@@ -10583,11 +10583,15 @@ const messageContentAriaText = (props) => {
|
|
10583
10583
|
})
|
10584
10584
|
: undefined;
|
10585
10585
|
};
|
10586
|
+
/* @conditional-compile-remove(image-gallery) */
|
10587
|
+
const defaultOnRenderInlineImage = (inlineImage) => {
|
10588
|
+
return (React.createElement("img", Object.assign({}, inlineImage.imgAttrs, { "data-ui-id": inlineImage.imgAttrs.id, tabIndex: 0, role: "button", style: Object.assign({ cursor: 'pointer' }, inlineImage.imgAttrs.style) })));
|
10589
|
+
};
|
10586
10590
|
const processHtmlToReact = (props) => {
|
10587
10591
|
var _a;
|
10588
10592
|
const options = {
|
10589
10593
|
transform(reactNode, domNode) {
|
10590
|
-
var _a, _b, _c;
|
10594
|
+
var _a, _b, _c, _d;
|
10591
10595
|
if (domNode instanceof parse.Element && domNode.attribs) {
|
10592
10596
|
// Transform custom rendering of mentions
|
10593
10597
|
/* @conditional-compile-remove(mention) */
|
@@ -10609,20 +10613,13 @@ const processHtmlToReact = (props) => {
|
|
10609
10613
|
return metadata.id === domNode.attribs.id;
|
10610
10614
|
}))) {
|
10611
10615
|
domNode.attribs['aria-label'] = domNode.attribs.name;
|
10612
|
-
/* @conditional-compile-remove(image-gallery) */
|
10613
|
-
const handleOnClick = () => {
|
10614
|
-
props.onInlineImageClicked && props.onInlineImageClicked(domNode.attribs.id);
|
10615
|
-
};
|
10616
10616
|
const imgProps = parse.attributesToProps(domNode.attribs);
|
10617
10617
|
/* @conditional-compile-remove(image-gallery) */
|
10618
|
-
|
10619
|
-
|
10620
|
-
|
10621
|
-
|
10622
|
-
|
10623
|
-
}
|
10624
|
-
} },
|
10625
|
-
React.createElement("img", Object.assign({}, imgProps))));
|
10618
|
+
const inlineImageProps = { messageId: props.message.messageId, imgAttrs: imgProps };
|
10619
|
+
/* @conditional-compile-remove(image-gallery) */
|
10620
|
+
return ((_d = props.inlineImageOptions) === null || _d === void 0 ? void 0 : _d.onRenderInlineImage)
|
10621
|
+
? props.inlineImageOptions.onRenderInlineImage(inlineImageProps, defaultOnRenderInlineImage)
|
10622
|
+
: defaultOnRenderInlineImage(inlineImageProps);
|
10626
10623
|
}
|
10627
10624
|
}
|
10628
10625
|
// Pass through the original node
|
@@ -10657,7 +10654,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
10657
10654
|
|
10658
10655
|
// Copyright (c) Microsoft Corporation.
|
10659
10656
|
// Licensed under the MIT License.
|
10660
|
-
var __awaiter$
|
10657
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10661
10658
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10662
10659
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10663
10660
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10700,7 +10697,7 @@ const _FileDownloadCards = (props) => {
|
|
10700
10697
|
fileCount: `${(_c = fileMetadata === null || fileMetadata === void 0 ? void 0 : fileMetadata.filter(isFileSharingAttachment).length) !== null && _c !== void 0 ? _c : 0}`
|
10701
10698
|
});
|
10702
10699
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
10703
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
10700
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$A(void 0, void 0, void 0, function* () {
|
10704
10701
|
if (!props.downloadHandler) {
|
10705
10702
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
10706
10703
|
}
|
@@ -10752,15 +10749,6 @@ const useLocaleStringsTrampoline = () => {
|
|
10752
10749
|
|
10753
10750
|
// Copyright (c) Microsoft Corporation.
|
10754
10751
|
// Licensed under the MIT License.
|
10755
|
-
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10756
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10757
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
10758
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
10759
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
10760
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
10761
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
10762
|
-
});
|
10763
|
-
};
|
10764
10752
|
const generateDefaultTimestamp = (createdOn, showDate, strings) => {
|
10765
10753
|
const formattedTimestamp = showDate
|
10766
10754
|
? formatTimestampForChatMessage(createdOn, new Date(), strings)
|
@@ -10786,7 +10774,7 @@ const MessageBubble = (props) => {
|
|
10786
10774
|
/* @conditional-compile-remove(file-sharing) */
|
10787
10775
|
fileDownloadHandler,
|
10788
10776
|
/* @conditional-compile-remove(image-gallery) */
|
10789
|
-
|
10777
|
+
inlineImageOptions, shouldOverlapAvatarAndMessage } = props;
|
10790
10778
|
const defaultTimeStamp = message.createdOn
|
10791
10779
|
? generateDefaultTimestamp(message.createdOn, showDate, strings)
|
10792
10780
|
: undefined;
|
@@ -10852,13 +10840,6 @@ const MessageBubble = (props) => {
|
|
10852
10840
|
}
|
10853
10841
|
return undefined;
|
10854
10842
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
10855
|
-
/* @conditional-compile-remove(image-gallery) */
|
10856
|
-
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$A(void 0, void 0, void 0, function* () {
|
10857
|
-
if (onInlineImageClicked === undefined) {
|
10858
|
-
return;
|
10859
|
-
}
|
10860
|
-
yield onInlineImageClicked(attachmentId, message.messageId);
|
10861
|
-
}), [message, onInlineImageClicked]);
|
10862
10843
|
const getContent = React.useCallback(() => {
|
10863
10844
|
/* @conditional-compile-remove(data-loss-prevention) */
|
10864
10845
|
if (message.messageType === 'blocked') {
|
@@ -10870,18 +10851,17 @@ const MessageBubble = (props) => {
|
|
10870
10851
|
/* @conditional-compile-remove(mention) */
|
10871
10852
|
mentionDisplayOptions: props.mentionDisplayOptions,
|
10872
10853
|
/* @conditional-compile-remove(image-gallery) */
|
10873
|
-
|
10854
|
+
inlineImageOptions: inlineImageOptions }),
|
10874
10855
|
/* @conditional-compile-remove(file-sharing) */ props.onRenderFileDownloads
|
10875
10856
|
? props.onRenderFileDownloads(userId, message)
|
10876
10857
|
: defaultOnRenderFileDownloads()));
|
10877
10858
|
}, [
|
10878
10859
|
defaultOnRenderFileDownloads,
|
10860
|
+
/* @conditional-compile-remove(image-gallery) */ inlineImageOptions,
|
10879
10861
|
message,
|
10880
10862
|
props,
|
10881
10863
|
strings,
|
10882
|
-
userId
|
10883
|
-
/* @conditional-compile-remove(image-gallery) */
|
10884
|
-
handleOnInlineImageClicked
|
10864
|
+
userId
|
10885
10865
|
]);
|
10886
10866
|
const isBlockedMessage = /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked';
|
10887
10867
|
const chatMyMessageStyles = useChatMyMessageStyles();
|
@@ -11019,7 +10999,7 @@ const ChatMessageComponent = (props) => {
|
|
11019
10999
|
/* @conditional-compile-remove(date-time-customization) */
|
11020
11000
|
onDisplayDateTimeString: props.onDisplayDateTimeString, strings: props.strings,
|
11021
11001
|
/* @conditional-compile-remove(image-gallery) */
|
11022
|
-
|
11002
|
+
inlineImageOptions: props.inlineImageOptions,
|
11023
11003
|
/* @conditional-compile-remove(mention) */
|
11024
11004
|
mentionDisplayOptions: (_b = props.mentionOptions) === null || _b === void 0 ? void 0 : _b.displayOptions })));
|
11025
11005
|
}
|
@@ -11040,7 +11020,7 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11040
11020
|
/* @conditional-compile-remove(date-time-customization) */
|
11041
11021
|
onDisplayDateTimeString,
|
11042
11022
|
/* @conditional-compile-remove(image-gallery) */
|
11043
|
-
|
11023
|
+
inlineImageOptions,
|
11044
11024
|
/* @conditional-compile-remove(mention) */
|
11045
11025
|
mentionOptions,
|
11046
11026
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -11065,7 +11045,7 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11065
11045
|
/* @conditional-compile-remove(date-time-customization) */
|
11066
11046
|
onDisplayDateTimeString: onDisplayDateTimeString,
|
11067
11047
|
/* @conditional-compile-remove(image-gallery) */
|
11068
|
-
|
11048
|
+
inlineImageOptions: inlineImageOptions,
|
11069
11049
|
/* @conditional-compile-remove(mention) */
|
11070
11050
|
mentionOptions: mentionOptions,
|
11071
11051
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -11083,7 +11063,7 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11083
11063
|
/* @conditional-compile-remove(date-time-customization) */
|
11084
11064
|
onDisplayDateTimeString,
|
11085
11065
|
/* @conditional-compile-remove(image-gallery) */
|
11086
|
-
|
11066
|
+
inlineImageOptions,
|
11087
11067
|
/* @conditional-compile-remove(mention) */
|
11088
11068
|
mentionOptions,
|
11089
11069
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -11444,7 +11424,7 @@ const MessageThreadWrapper = (props) => {
|
|
11444
11424
|
/* @conditional-compile-remove(mention) */
|
11445
11425
|
mentionOptions,
|
11446
11426
|
/* @conditional-compile-remove(image-gallery) */
|
11447
|
-
|
11427
|
+
inlineImageOptions,
|
11448
11428
|
/* @conditional-compile-remove(file-sharing) */
|
11449
11429
|
onRenderFileDownloads } = props;
|
11450
11430
|
// We need this state to wait for one tick and scroll to bottom after messages have been initialized.
|
@@ -11760,7 +11740,7 @@ const MessageThreadWrapper = (props) => {
|
|
11760
11740
|
/* @conditional-compile-remove(file-sharing) */
|
11761
11741
|
fileDownloadHandler: props.fileDownloadHandler,
|
11762
11742
|
/* @conditional-compile-remove(image-gallery) */
|
11763
|
-
|
11743
|
+
inlineImageOptions: inlineImageOptions,
|
11764
11744
|
/* @conditional-compile-remove(date-time-customization) */
|
11765
11745
|
onDisplayDateTimeString: onDisplayDateTimeString,
|
11766
11746
|
/* @conditional-compile-remove(mention) */
|
@@ -24560,6 +24540,16 @@ const ChatScreen = (props) => {
|
|
24560
24540
|
}
|
24561
24541
|
}), [adapter, fullSizeAttachments, messageThreadProps.messages, onRenderAvatarCallback]);
|
24562
24542
|
/* @conditional-compile-remove(image-gallery) */
|
24543
|
+
const inlineImageOptions = {
|
24544
|
+
onRenderInlineImage: (inlineImage, defaultOnRender) => {
|
24545
|
+
return (React.createElement("span", { onClick: () => onInlineImageClicked(inlineImage.imgAttrs.id || '', inlineImage.messageId), tabIndex: 0, role: "button", onKeyDown: (e) => {
|
24546
|
+
if (e.key === 'Enter') {
|
24547
|
+
onInlineImageClicked(inlineImage.imgAttrs.id || '', inlineImage.messageId);
|
24548
|
+
}
|
24549
|
+
} }, defaultOnRender(inlineImage)));
|
24550
|
+
}
|
24551
|
+
};
|
24552
|
+
/* @conditional-compile-remove(image-gallery) */
|
24563
24553
|
const onImageDownloadButtonClicked = React.useCallback((imageUrl, downloadFilename) => {
|
24564
24554
|
if (imageUrl === '') {
|
24565
24555
|
return;
|
@@ -24600,7 +24590,7 @@ const ChatScreen = (props) => {
|
|
24600
24590
|
/* @conditional-compile-remove(file-sharing) */
|
24601
24591
|
onRenderFileDownloads: onRenderFileDownloads,
|
24602
24592
|
/* @conditional-compile-remove(image-gallery) */
|
24603
|
-
|
24593
|
+
inlineImageOptions: inlineImageOptions, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
24604
24594
|
React.createElement(react.Stack, { className: react.mergeStyles(sendboxContainerStyles) },
|
24605
24595
|
React.createElement("div", { className: react.mergeStyles(typingIndicatorContainerStyles) }, onRenderTypingIndicator ? (onRenderTypingIndicator(typingIndicatorProps.typingUsers)) : (React.createElement(TypingIndicator, Object.assign({}, typingIndicatorProps, { styles: typingIndicatorStyles })))),
|
24606
24596
|
React.createElement(react.Stack, { horizontal: formFactor === 'mobile' },
|