@azure/communication-react 1.7.0-alpha-202308040014 → 1.7.0-alpha-202308050013
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 +108 -0
- package/dist/dist-cjs/communication-react/index.js +414 -86
- 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 +2 -0
- package/dist/dist-esm/communication-react/src/index.js +2 -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 +6 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -0
- 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 +6 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +41 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +6 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +10 -5
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.js +7 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +6 -2
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +25 -3
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +45 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/package.json +8 -8
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
179
179
|
// Licensed under the MIT license.
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
181
|
-
var telemetryVersion = '1.7.0-alpha-
|
181
|
+
var telemetryVersion = '1.7.0-alpha-202308050013';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -454,7 +454,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
454
454
|
|
455
455
|
// Copyright (c) Microsoft Corporation.
|
456
456
|
// Licensed under the MIT license.
|
457
|
-
var __awaiter$
|
457
|
+
var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
458
458
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
459
459
|
return new (P || (P = Promise))(function (resolve, reject) {
|
460
460
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -493,7 +493,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
493
493
|
*
|
494
494
|
* @private
|
495
495
|
*/
|
496
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
496
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$M(void 0, void 0, void 0, function* () {
|
497
497
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
498
498
|
for (const view of unparentedViews) {
|
499
499
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -661,7 +661,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
661
661
|
|
662
662
|
// Copyright (c) Microsoft Corporation.
|
663
663
|
// Licensed under the MIT license.
|
664
|
-
var __awaiter$
|
664
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
665
665
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
666
666
|
return new (P || (P = Promise))(function (resolve, reject) {
|
667
667
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -682,7 +682,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
682
682
|
* @private
|
683
683
|
*/
|
684
684
|
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call, options) => {
|
685
|
-
const onStartLocalVideo = () => __awaiter$
|
685
|
+
const onStartLocalVideo = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
686
686
|
// Before the call object creates a stream, dispose of any local preview streams.
|
687
687
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
688
688
|
// of disposing and creating a new stream?
|
@@ -702,7 +702,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
702
702
|
yield call.startVideo(stream);
|
703
703
|
}
|
704
704
|
});
|
705
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
705
|
+
const onStopLocalVideo = (stream) => __awaiter$L(void 0, void 0, void 0, function* () {
|
706
706
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
707
707
|
if (!callId) {
|
708
708
|
return;
|
@@ -711,7 +711,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
711
711
|
yield call.stopVideo(stream);
|
712
712
|
}
|
713
713
|
});
|
714
|
-
const onToggleCamera = (options) => __awaiter$
|
714
|
+
const onToggleCamera = (options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
715
715
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
716
716
|
if (previewOn && call && call.state === 'Connecting') {
|
717
717
|
// This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
@@ -759,19 +759,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
759
759
|
}
|
760
760
|
}
|
761
761
|
});
|
762
|
-
const onSelectMicrophone = (device) => __awaiter$
|
762
|
+
const onSelectMicrophone = (device) => __awaiter$L(void 0, void 0, void 0, function* () {
|
763
763
|
if (!deviceManager) {
|
764
764
|
return;
|
765
765
|
}
|
766
766
|
return deviceManager.selectMicrophone(device);
|
767
767
|
});
|
768
|
-
const onSelectSpeaker = (device) => __awaiter$
|
768
|
+
const onSelectSpeaker = (device) => __awaiter$L(void 0, void 0, void 0, function* () {
|
769
769
|
if (!deviceManager) {
|
770
770
|
return;
|
771
771
|
}
|
772
772
|
return deviceManager.selectSpeaker(device);
|
773
773
|
});
|
774
|
-
const onSelectCamera = (device, options) => __awaiter$
|
774
|
+
const onSelectCamera = (device, options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
775
775
|
if (!deviceManager) {
|
776
776
|
return;
|
777
777
|
}
|
@@ -794,19 +794,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
794
794
|
}, options);
|
795
795
|
}
|
796
796
|
});
|
797
|
-
const onToggleMicrophone = () => __awaiter$
|
797
|
+
const onToggleMicrophone = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
798
798
|
if (!call || !_isInCall(call.state)) {
|
799
799
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
800
800
|
}
|
801
801
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
802
802
|
});
|
803
|
-
const onStartScreenShare = () => __awaiter$
|
804
|
-
const onStopScreenShare = () => __awaiter$
|
805
|
-
const onToggleScreenShare = () => __awaiter$
|
806
|
-
const onHangUp = (forEveryone) => __awaiter$
|
803
|
+
const onStartScreenShare = () => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
804
|
+
const onStopScreenShare = () => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
805
|
+
const onToggleScreenShare = () => __awaiter$L(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
806
|
+
const onHangUp = (forEveryone) => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
807
807
|
/* @conditional-compile-remove(PSTN-calls) */
|
808
|
-
const onToggleHold = () => __awaiter$
|
809
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
808
|
+
const onToggleHold = () => __awaiter$L(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()); });
|
809
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$L(void 0, void 0, void 0, function* () {
|
810
810
|
var _a;
|
811
811
|
if (!call || call.localVideoStreams.length === 0) {
|
812
812
|
return;
|
@@ -822,7 +822,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
822
822
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
823
823
|
return view ? { view } : undefined;
|
824
824
|
});
|
825
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
825
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$L(void 0, void 0, void 0, function* () {
|
826
826
|
if (!call) {
|
827
827
|
return;
|
828
828
|
}
|
@@ -853,7 +853,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
853
853
|
}
|
854
854
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
855
855
|
});
|
856
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
856
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
857
857
|
if (!call) {
|
858
858
|
return;
|
859
859
|
}
|
@@ -874,7 +874,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
874
874
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
875
875
|
}
|
876
876
|
});
|
877
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
877
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
878
878
|
if (!call) {
|
879
879
|
return;
|
880
880
|
}
|
@@ -891,7 +891,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
891
891
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
892
892
|
}
|
893
893
|
});
|
894
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
894
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
895
895
|
if (!call) {
|
896
896
|
return;
|
897
897
|
}
|
@@ -908,7 +908,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
908
908
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
909
909
|
}
|
910
910
|
});
|
911
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
911
|
+
const onDisposeLocalStreamView = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
912
912
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
913
913
|
const callState = call && callClient.getState().calls[call.id];
|
914
914
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -921,18 +921,18 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
921
921
|
yield disposeAllLocalPreviewViews(callClient);
|
922
922
|
});
|
923
923
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
924
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
924
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$L(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
925
925
|
const notImplemented = () => {
|
926
926
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
927
927
|
};
|
928
928
|
/* @conditional-compile-remove(call-readiness) */
|
929
|
-
const askDevicePermission = (constrain) => __awaiter$
|
929
|
+
const askDevicePermission = (constrain) => __awaiter$L(void 0, void 0, void 0, function* () {
|
930
930
|
if (deviceManager) {
|
931
931
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
932
932
|
}
|
933
933
|
});
|
934
934
|
/* @conditional-compile-remove(video-background-effects) */
|
935
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
935
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
936
936
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
937
937
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
938
938
|
if (stream) {
|
@@ -945,7 +945,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
945
945
|
}
|
946
946
|
});
|
947
947
|
/* @conditional-compile-remove(video-background-effects) */
|
948
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
948
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$L(void 0, void 0, void 0, function* () {
|
949
949
|
var _b;
|
950
950
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
951
951
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -959,7 +959,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
959
959
|
}
|
960
960
|
});
|
961
961
|
/* @conditional-compile-remove(video-background-effects) */
|
962
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
962
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$L(void 0, void 0, void 0, function* () {
|
963
963
|
var _c;
|
964
964
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
965
965
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -973,19 +973,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
973
973
|
}
|
974
974
|
});
|
975
975
|
/* @conditional-compile-remove(close-captions) */
|
976
|
-
const onStartCaptions = (options) => __awaiter$
|
976
|
+
const onStartCaptions = (options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
977
977
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).startCaptions(options));
|
978
978
|
});
|
979
979
|
/* @conditional-compile-remove(close-captions) */
|
980
|
-
const onStopCaptions = () => __awaiter$
|
980
|
+
const onStopCaptions = () => __awaiter$L(void 0, void 0, void 0, function* () {
|
981
981
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).stopCaptions());
|
982
982
|
});
|
983
983
|
/* @conditional-compile-remove(close-captions) */
|
984
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
984
|
+
const onSetSpokenLanguage = (language) => __awaiter$L(void 0, void 0, void 0, function* () {
|
985
985
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setSpokenLanguage(language));
|
986
986
|
});
|
987
987
|
/* @conditional-compile-remove(close-captions) */
|
988
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
988
|
+
const onSetCaptionLanguage = (language) => __awaiter$L(void 0, void 0, void 0, function* () {
|
989
989
|
yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.TeamsCaptions).setCaptionLanguage(language));
|
990
990
|
});
|
991
991
|
return {
|
@@ -1033,7 +1033,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
1033
1033
|
|
1034
1034
|
// Copyright (c) Microsoft Corporation.
|
1035
1035
|
// Licensed under the MIT license.
|
1036
|
-
var __awaiter$
|
1036
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1037
1037
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1038
1038
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1039
1039
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1061,7 +1061,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((...args) =>
|
|
1061
1061
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1062
1062
|
},
|
1063
1063
|
/* @conditional-compile-remove(PSTN-calls) */
|
1064
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1064
|
+
onAddParticipant: (userId, options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
1065
1065
|
const participant = _toCommunicationIdentifier(userId);
|
1066
1066
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1067
1067
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1069,7 +1069,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((...args) =>
|
|
1069
1069
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1070
1070
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1071
1071
|
}
|
1072
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1072
|
+
}), onRemoveParticipant: (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
1073
1073
|
const participant = _toCommunicationIdentifier(userId);
|
1074
1074
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1075
1075
|
}) });
|
@@ -1077,7 +1077,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((...args) =>
|
|
1077
1077
|
|
1078
1078
|
// Copyright (c) Microsoft Corporation.
|
1079
1079
|
// Licensed under the MIT license.
|
1080
|
-
var __awaiter$
|
1080
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1081
1081
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1082
1082
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1083
1083
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1109,7 +1109,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1109
1109
|
},
|
1110
1110
|
/* @conditional-compile-remove(teams-identity-support) */
|
1111
1111
|
/* @conditional-compile-remove(PSTN-calls) */
|
1112
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1112
|
+
onAddParticipant: (userId, options) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1113
1113
|
const participant = _toCommunicationIdentifier(userId);
|
1114
1114
|
/* @conditional-compile-remove(teams-identity-support) */
|
1115
1115
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1126,7 +1126,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
1126
1126
|
}
|
1127
1127
|
/* @conditional-compile-remove(teams-identity-support) */
|
1128
1128
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1129
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1129
|
+
}), onRemoveParticipant: (userId) => __awaiter$J(void 0, void 0, void 0, function* () {
|
1130
1130
|
const participant = _toCommunicationIdentifier(userId);
|
1131
1131
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1132
1132
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1208,7 +1208,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1208
1208
|
|
1209
1209
|
// Copyright (c) Microsoft Corporation.
|
1210
1210
|
// Licensed under the MIT license.
|
1211
|
-
var __awaiter$
|
1211
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1212
1212
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1213
1213
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1214
1214
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1257,13 +1257,13 @@ class ProxyDeviceManager {
|
|
1257
1257
|
this.selectCamera = (videoDeviceInfo) => {
|
1258
1258
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1259
1259
|
};
|
1260
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1260
|
+
this.videoDevicesUpdated = () => __awaiter$I(this, void 0, void 0, function* () {
|
1261
1261
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1262
1262
|
// We don't want to show that in the UI.
|
1263
1263
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1264
1264
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1265
1265
|
});
|
1266
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1266
|
+
this.audioDevicesUpdated = () => __awaiter$I(this, void 0, void 0, function* () {
|
1267
1267
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1268
1268
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1269
1269
|
});
|
@@ -1651,7 +1651,7 @@ function convertFromSDKToDeclarativeVideoStreamVideoEffects(videoEffects) {
|
|
1651
1651
|
|
1652
1652
|
// Copyright (c) Microsoft Corporation.
|
1653
1653
|
// Licensed under the MIT license.
|
1654
|
-
var __awaiter$
|
1654
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1655
1655
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1656
1656
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1657
1657
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2370,7 +2370,7 @@ class CallContext$2 {
|
|
2370
2370
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
2371
2371
|
*/
|
2372
2372
|
withAsyncErrorTeedToState(action, target) {
|
2373
|
-
return (...args) => __awaiter$
|
2373
|
+
return (...args) => __awaiter$H(this, void 0, void 0, function* () {
|
2374
2374
|
try {
|
2375
2375
|
return yield action(...args);
|
2376
2376
|
}
|
@@ -2790,7 +2790,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
2790
2790
|
|
2791
2791
|
// Copyright (c) Microsoft Corporation.
|
2792
2792
|
// Licensed under the MIT license.
|
2793
|
-
var __awaiter$
|
2793
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2794
2794
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2795
2795
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2796
2796
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2800,7 +2800,7 @@ var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
2800
2800
|
});
|
2801
2801
|
};
|
2802
2802
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
2803
|
-
return __awaiter$
|
2803
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
2804
2804
|
// we can only have 3 types of createView
|
2805
2805
|
let streamEventType;
|
2806
2806
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -2922,7 +2922,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
2922
2922
|
});
|
2923
2923
|
}
|
2924
2924
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
2925
|
-
return __awaiter$
|
2925
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
2926
2926
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
2927
2927
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
2928
2928
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3090,7 +3090,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3090
3090
|
// Render LocalVideoStream that is not part of a Call
|
3091
3091
|
// 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).
|
3092
3092
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3093
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
3093
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$G(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
3094
3094
|
}
|
3095
3095
|
else {
|
3096
3096
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -3638,7 +3638,7 @@ class CallSubscriber {
|
|
3638
3638
|
|
3639
3639
|
// Copyright (c) Microsoft Corporation.
|
3640
3640
|
// Licensed under the MIT license.
|
3641
|
-
var __awaiter$
|
3641
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3642
3642
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3643
3643
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3644
3644
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3658,14 +3658,14 @@ class ProxyIncomingCall {
|
|
3658
3658
|
switch (prop) {
|
3659
3659
|
case 'accept': {
|
3660
3660
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3661
|
-
return __awaiter$
|
3661
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
3662
3662
|
return yield target.accept(...args);
|
3663
3663
|
});
|
3664
3664
|
}, 'IncomingCall.accept');
|
3665
3665
|
}
|
3666
3666
|
case 'reject': {
|
3667
3667
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3668
|
-
return __awaiter$
|
3668
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
3669
3669
|
return yield target.reject(...args);
|
3670
3670
|
});
|
3671
3671
|
}, 'IncomingCall.reject');
|
@@ -3906,7 +3906,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
3906
3906
|
|
3907
3907
|
// Copyright (c) Microsoft Corporation.
|
3908
3908
|
// Licensed under the MIT license.
|
3909
|
-
var __awaiter$
|
3909
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3910
3910
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3911
3911
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3912
3912
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3932,56 +3932,56 @@ class ProxyCallCommon {
|
|
3932
3932
|
switch (prop) {
|
3933
3933
|
case 'mute': {
|
3934
3934
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3935
|
-
return __awaiter$
|
3935
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3936
3936
|
return yield target.mute(...args);
|
3937
3937
|
});
|
3938
3938
|
}, 'Call.mute');
|
3939
3939
|
}
|
3940
3940
|
case 'unmute': {
|
3941
3941
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3942
|
-
return __awaiter$
|
3942
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3943
3943
|
return yield target.unmute(...args);
|
3944
3944
|
});
|
3945
3945
|
}, 'Call.unmute');
|
3946
3946
|
}
|
3947
3947
|
case 'startVideo': {
|
3948
3948
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3949
|
-
return __awaiter$
|
3949
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3950
3950
|
return yield target.startVideo(...args);
|
3951
3951
|
});
|
3952
3952
|
}, 'Call.startVideo');
|
3953
3953
|
}
|
3954
3954
|
case 'stopVideo': {
|
3955
3955
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3956
|
-
return __awaiter$
|
3956
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3957
3957
|
return yield target.stopVideo(...args);
|
3958
3958
|
});
|
3959
3959
|
}, 'Call.stopVideo');
|
3960
3960
|
}
|
3961
3961
|
case 'startScreenSharing': {
|
3962
3962
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3963
|
-
return __awaiter$
|
3963
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3964
3964
|
return yield target.startScreenSharing(...args);
|
3965
3965
|
});
|
3966
3966
|
}, 'Call.startScreenSharing');
|
3967
3967
|
}
|
3968
3968
|
case 'stopScreenSharing': {
|
3969
3969
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3970
|
-
return __awaiter$
|
3970
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3971
3971
|
return yield target.stopScreenSharing(...args);
|
3972
3972
|
});
|
3973
3973
|
}, 'Call.stopScreenSharing');
|
3974
3974
|
}
|
3975
3975
|
case 'hold': {
|
3976
3976
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3977
|
-
return __awaiter$
|
3977
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3978
3978
|
return yield target.hold(...args);
|
3979
3979
|
});
|
3980
3980
|
}, 'Call.hold');
|
3981
3981
|
}
|
3982
3982
|
case 'resume': {
|
3983
3983
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3984
|
-
return __awaiter$
|
3984
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
3985
3985
|
return yield target.resume(...args);
|
3986
3986
|
});
|
3987
3987
|
}, 'Call.resume');
|
@@ -4021,7 +4021,7 @@ class ProxyTeamsCaptionsFeature {
|
|
4021
4021
|
get(target, prop) {
|
4022
4022
|
switch (prop) {
|
4023
4023
|
case 'startCaptions':
|
4024
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4024
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
4025
4025
|
var _a, _b;
|
4026
4026
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
4027
4027
|
const ret = yield target.startCaptions(...args);
|
@@ -4029,20 +4029,20 @@ class ProxyTeamsCaptionsFeature {
|
|
4029
4029
|
return ret;
|
4030
4030
|
}), 'Call.feature');
|
4031
4031
|
case 'stopCaptions':
|
4032
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4032
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
4033
4033
|
const ret = yield target.stopCaptions(...args);
|
4034
4034
|
this._context.setIsCaptionActive(this._call.id, false);
|
4035
4035
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
4036
4036
|
return ret;
|
4037
4037
|
}), 'Call.feature');
|
4038
4038
|
case 'setSpokenLanguage':
|
4039
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4039
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
4040
4040
|
const ret = yield target.setSpokenLanguage(...args);
|
4041
4041
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
4042
4042
|
return ret;
|
4043
4043
|
}), 'Call.feature');
|
4044
4044
|
case 'setCaptionLanguage':
|
4045
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4045
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$E(this, void 0, void 0, function* () {
|
4046
4046
|
const ret = yield target.setCaptionLanguage(...args);
|
4047
4047
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
4048
4048
|
return ret;
|
@@ -4090,7 +4090,7 @@ class ProxyTransferCallFeature {
|
|
4090
4090
|
|
4091
4091
|
// Copyright (c) Microsoft Corporation.
|
4092
4092
|
// Licensed under the MIT license.
|
4093
|
-
var __awaiter$
|
4093
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4094
4094
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4095
4095
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4096
4096
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4104,7 +4104,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
4104
4104
|
switch (prop) {
|
4105
4105
|
case 'addParticipant': {
|
4106
4106
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4107
|
-
return __awaiter$
|
4107
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
4108
4108
|
return yield target.addParticipant(...args);
|
4109
4109
|
});
|
4110
4110
|
}, 'Call.addParticipant');
|
@@ -4325,7 +4325,7 @@ class InternalCallContext {
|
|
4325
4325
|
|
4326
4326
|
// Copyright (c) Microsoft Corporation.
|
4327
4327
|
// Licensed under the MIT license.
|
4328
|
-
var __awaiter$
|
4328
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4329
4329
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4330
4330
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4331
4331
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4340,7 +4340,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
4340
4340
|
switch (prop) {
|
4341
4341
|
case 'addParticipant': {
|
4342
4342
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4343
|
-
return __awaiter$
|
4343
|
+
return __awaiter$C(this, void 0, void 0, function* () {
|
4344
4344
|
return yield target.addParticipant(...args);
|
4345
4345
|
});
|
4346
4346
|
}, 'TeamsCall.addParticipant');
|
@@ -4455,7 +4455,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
4455
4455
|
|
4456
4456
|
// Copyright (c) Microsoft Corporation.
|
4457
4457
|
// Licensed under the MIT license.
|
4458
|
-
var __awaiter$
|
4458
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4459
4459
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4460
4460
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4461
4461
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4477,7 +4477,7 @@ class ProxyVideoStreamRendererView {
|
|
4477
4477
|
get(target, prop) {
|
4478
4478
|
switch (prop) {
|
4479
4479
|
case 'updateScalingMode': {
|
4480
|
-
return (...args) => __awaiter$
|
4480
|
+
return (...args) => __awaiter$B(this, void 0, void 0, function* () {
|
4481
4481
|
yield target.updateScalingMode(...args);
|
4482
4482
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
4483
4483
|
});
|
@@ -4498,7 +4498,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
4498
4498
|
|
4499
4499
|
// Copyright (c) Microsoft Corporation.
|
4500
4500
|
// Licensed under the MIT license.
|
4501
|
-
var __awaiter$
|
4501
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4502
4502
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4503
4503
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4504
4504
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4520,7 +4520,7 @@ class ProxyCallClient {
|
|
4520
4520
|
get(target, prop) {
|
4521
4521
|
switch (prop) {
|
4522
4522
|
case 'createCallAgent': {
|
4523
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4523
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$A(this, void 0, void 0, function* () {
|
4524
4524
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4525
4525
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4526
4526
|
// callAgent if the createCallAgent succeeds.
|
@@ -4533,7 +4533,7 @@ class ProxyCallClient {
|
|
4533
4533
|
}), 'CallClient.createCallAgent');
|
4534
4534
|
}
|
4535
4535
|
case 'createTeamsCallAgent': {
|
4536
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4536
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$A(this, void 0, void 0, function* () {
|
4537
4537
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4538
4538
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4539
4539
|
// callAgent if the createCallAgent succeeds.
|
@@ -4546,7 +4546,7 @@ class ProxyCallClient {
|
|
4546
4546
|
}), 'CallClient.createTeamsCallAgent');
|
4547
4547
|
}
|
4548
4548
|
case 'getDeviceManager': {
|
4549
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
4549
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$A(this, void 0, void 0, function* () {
|
4550
4550
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
4551
4551
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
4552
4552
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -4575,7 +4575,7 @@ class ProxyCallClient {
|
|
4575
4575
|
/**
|
4576
4576
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
4577
4577
|
*/
|
4578
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
4578
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$A(this, void 0, void 0, function* () {
|
4579
4579
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
4580
4580
|
this._context.setEnvironmentInfo(environmentInfo);
|
4581
4581
|
return environmentInfo;
|
@@ -4628,7 +4628,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
4628
4628
|
});
|
4629
4629
|
Object.defineProperty(callClient, 'createView', {
|
4630
4630
|
configurable: false,
|
4631
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
4631
|
+
value: (callId, participantId, stream, options) => __awaiter$A(void 0, void 0, void 0, function* () {
|
4632
4632
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
4633
4633
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
4634
4634
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -7330,7 +7330,7 @@ const _MentionPopover = (props) => {
|
|
7330
7330
|
|
7331
7331
|
// Copyright (c) Microsoft Corporation.
|
7332
7332
|
// Licensed under the MIT license.
|
7333
|
-
var __awaiter$
|
7333
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7334
7334
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7335
7335
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7336
7336
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7505,7 +7505,7 @@ const TextFieldWithMention = (props) => {
|
|
7505
7505
|
onSuggestionSelected,
|
7506
7506
|
updateMentionSuggestions
|
7507
7507
|
]);
|
7508
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
7508
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$z(void 0, void 0, void 0, function* () {
|
7509
7509
|
var _a;
|
7510
7510
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
7511
7511
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -7682,7 +7682,7 @@ const TextFieldWithMention = (props) => {
|
|
7682
7682
|
});
|
7683
7683
|
}
|
7684
7684
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
7685
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$
|
7685
|
+
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$z(void 0, void 0, void 0, function* () {
|
7686
7686
|
var _b;
|
7687
7687
|
debouncedQueryUpdate.cancel();
|
7688
7688
|
if (event.currentTarget === null) {
|
@@ -8362,6 +8362,244 @@ const activeFileUploadsTrampoline = (props) => {
|
|
8362
8362
|
return props.activeFileUploads;
|
8363
8363
|
};
|
8364
8364
|
|
8365
|
+
// Copyright (c) Microsoft Corporation.
|
8366
|
+
// Licensed under the MIT license.
|
8367
|
+
/**
|
8368
|
+
* @private
|
8369
|
+
*/
|
8370
|
+
const cancelIcon = { iconName: 'Cancel' };
|
8371
|
+
/**
|
8372
|
+
* @private
|
8373
|
+
*/
|
8374
|
+
const downloadIcon = {
|
8375
|
+
iconName: 'Download'
|
8376
|
+
};
|
8377
|
+
/**
|
8378
|
+
* @private
|
8379
|
+
*/
|
8380
|
+
const overlayStyles = (theme, isDarkThemed) => {
|
8381
|
+
return {
|
8382
|
+
root: {
|
8383
|
+
// The overlay background color should always be black in both light and dark theme.
|
8384
|
+
// In dark theme, theme.palette.white is actually black.
|
8385
|
+
background: isDarkThemed ? theme.palette.white : theme.palette.black,
|
8386
|
+
opacity: '0.85'
|
8387
|
+
}
|
8388
|
+
};
|
8389
|
+
};
|
8390
|
+
/**
|
8391
|
+
* @private
|
8392
|
+
*/
|
8393
|
+
const focusTrapZoneStyle = {
|
8394
|
+
boxShadow: 'none',
|
8395
|
+
background: 'transparent',
|
8396
|
+
display: 'flex'
|
8397
|
+
};
|
8398
|
+
/**
|
8399
|
+
* @private
|
8400
|
+
*/
|
8401
|
+
const scrollableContentStyle = {
|
8402
|
+
overflowY: 'hidden',
|
8403
|
+
display: 'flex',
|
8404
|
+
flexFlow: 'column wrap',
|
8405
|
+
maxWidth: '100%',
|
8406
|
+
maxHeight: '100%'
|
8407
|
+
};
|
8408
|
+
/**
|
8409
|
+
* @private
|
8410
|
+
*/
|
8411
|
+
const headerStyle = {
|
8412
|
+
fontSize: 'inherit',
|
8413
|
+
margin: '0',
|
8414
|
+
width: '100%',
|
8415
|
+
height: '3.5rem',
|
8416
|
+
flexDirection: 'row',
|
8417
|
+
justifyContent: 'space-between',
|
8418
|
+
padding: '0 0.75rem'
|
8419
|
+
};
|
8420
|
+
/**
|
8421
|
+
* @private
|
8422
|
+
*/
|
8423
|
+
const titleBarContainerStyle = {
|
8424
|
+
flexDirection: 'row',
|
8425
|
+
justifyContent: 'start',
|
8426
|
+
flexWrap: 'wrap',
|
8427
|
+
alignContent: 'center',
|
8428
|
+
alignItems: 'center'
|
8429
|
+
};
|
8430
|
+
/**
|
8431
|
+
* @private
|
8432
|
+
*/
|
8433
|
+
const titleStyle$2 = (theme, isDarkThemed) => {
|
8434
|
+
return {
|
8435
|
+
paddingLeft: '0.5rem',
|
8436
|
+
marginLeft: '0.5rem',
|
8437
|
+
color: isDarkThemed ? undefined : theme.palette.white,
|
8438
|
+
fontFamily: 'inherit',
|
8439
|
+
fontSize: '0.875rem',
|
8440
|
+
fontStyle: 'normal',
|
8441
|
+
fontWeight: '600',
|
8442
|
+
lineHeight: '1.25rem'
|
8443
|
+
};
|
8444
|
+
};
|
8445
|
+
/**
|
8446
|
+
* @private
|
8447
|
+
*/
|
8448
|
+
const controlBarContainerStyle = {
|
8449
|
+
flexDirection: 'row',
|
8450
|
+
justifyContent: 'start',
|
8451
|
+
flexWrap: 'wrap',
|
8452
|
+
alignContent: 'center',
|
8453
|
+
alignItems: 'center'
|
8454
|
+
};
|
8455
|
+
/**
|
8456
|
+
* @private
|
8457
|
+
*/
|
8458
|
+
const downloadIconStyle = {
|
8459
|
+
marginRight: '0.5em',
|
8460
|
+
fontSize: '0.875rem' // 14px
|
8461
|
+
};
|
8462
|
+
/**
|
8463
|
+
* @private
|
8464
|
+
*/
|
8465
|
+
const imageContainer = {
|
8466
|
+
display: 'flex',
|
8467
|
+
alignItems: 'center',
|
8468
|
+
justifyContent: 'center',
|
8469
|
+
width: '100%',
|
8470
|
+
height: '100%',
|
8471
|
+
overflow: 'hidden',
|
8472
|
+
margin: '4rem 0 2rem'
|
8473
|
+
};
|
8474
|
+
/**
|
8475
|
+
* @private
|
8476
|
+
*/
|
8477
|
+
const normalImageStyle = {
|
8478
|
+
objectFit: 'contain',
|
8479
|
+
height: '100%',
|
8480
|
+
width: '100%'
|
8481
|
+
};
|
8482
|
+
/**
|
8483
|
+
* @private
|
8484
|
+
*/
|
8485
|
+
const brokenImageStyle = (theme, isDarkThemed) => {
|
8486
|
+
return {
|
8487
|
+
// The color should be white in dark theme.
|
8488
|
+
// In dark theme, theme.palette.black is actually white.
|
8489
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white
|
8490
|
+
};
|
8491
|
+
};
|
8492
|
+
/**
|
8493
|
+
* @private
|
8494
|
+
*/
|
8495
|
+
const closeButtonStyles = (theme, isDarkThemed) => {
|
8496
|
+
return {
|
8497
|
+
// The color should be white in dark theme.
|
8498
|
+
// In dark theme, theme.palette.black is actually white.
|
8499
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8500
|
+
':hover': {
|
8501
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8502
|
+
backgroundColor: isDarkThemed ? undefined : theme.palette.neutralPrimaryAlt
|
8503
|
+
},
|
8504
|
+
':active': {
|
8505
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8506
|
+
backgroundColor: isDarkThemed ? undefined : theme.palette.neutralDark
|
8507
|
+
}
|
8508
|
+
};
|
8509
|
+
};
|
8510
|
+
/**
|
8511
|
+
* @private
|
8512
|
+
*/
|
8513
|
+
const downloadButtonStyle = (theme, isDarkThemed) => {
|
8514
|
+
return {
|
8515
|
+
margin: '0 0.5rem',
|
8516
|
+
height: '32px',
|
8517
|
+
borderWidth: '1px',
|
8518
|
+
fontSize: '0.875rem',
|
8519
|
+
fontWeight: 600,
|
8520
|
+
padding: '0.38rem 0.75rem',
|
8521
|
+
borderRadius: '4px',
|
8522
|
+
backgroundColor: isDarkThemed ? theme.palette.neutralLighterAlt : theme.palette.neutralPrimary,
|
8523
|
+
color: isDarkThemed ? undefined : theme.palette.white,
|
8524
|
+
whiteSpace: 'nowrap',
|
8525
|
+
':hover': {
|
8526
|
+
// The color should be white in dark theme.
|
8527
|
+
// In dark theme, theme.palette.black is actually white.
|
8528
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8529
|
+
backgroundColor: isDarkThemed ? undefined : theme.palette.neutralPrimaryAlt
|
8530
|
+
},
|
8531
|
+
':active': {
|
8532
|
+
// The color should be white in dark theme.
|
8533
|
+
// In dark theme, theme.palette.black is actually white.
|
8534
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8535
|
+
backgroundColor: isDarkThemed ? undefined : theme.palette.neutralDark
|
8536
|
+
},
|
8537
|
+
'@media (max-width: 25rem)': {
|
8538
|
+
display: 'none'
|
8539
|
+
}
|
8540
|
+
};
|
8541
|
+
};
|
8542
|
+
/**
|
8543
|
+
* @private
|
8544
|
+
*/
|
8545
|
+
const smallDownloadButtonContainerStyle = (theme, isDarkThemed) => {
|
8546
|
+
return {
|
8547
|
+
marginRight: '0.5rem',
|
8548
|
+
// The color should be white in dark theme.
|
8549
|
+
// In dark theme, theme.palette.black is actually white.
|
8550
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8551
|
+
whiteSpace: 'nowrap',
|
8552
|
+
':hover': {
|
8553
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8554
|
+
backgroundColor: isDarkThemed ? undefined : theme.palette.neutralPrimaryAlt
|
8555
|
+
},
|
8556
|
+
':active': {
|
8557
|
+
color: isDarkThemed ? theme.palette.black : theme.palette.white,
|
8558
|
+
backgroundColor: isDarkThemed ? undefined : theme.palette.neutralDark
|
8559
|
+
},
|
8560
|
+
'@media (min-width: 25rem)': {
|
8561
|
+
display: 'none'
|
8562
|
+
}
|
8563
|
+
};
|
8564
|
+
};
|
8565
|
+
|
8566
|
+
// Copyright (c) Microsoft Corporation.
|
8567
|
+
/**
|
8568
|
+
* Component to render a fullscreen modal for a selected image.
|
8569
|
+
*
|
8570
|
+
* @beta
|
8571
|
+
*/
|
8572
|
+
const ImageGallery = (props) => {
|
8573
|
+
const { images, modalLayerHostId, onImageDownloadButtonClicked, onDismiss, onError, styles, startIndex = 0 } = props;
|
8574
|
+
const theme = useTheme();
|
8575
|
+
const isDarkTheme = isDarkThemed(theme);
|
8576
|
+
const downloadButtonTitleString = 'Download';
|
8577
|
+
const closeString = 'Close';
|
8578
|
+
const defaultAltText = 'image';
|
8579
|
+
const [isImageLoaded, setIsImageLoaded] = React.useState(true);
|
8580
|
+
const imageStyle = isImageLoaded ? normalImageStyle : brokenImageStyle(theme, isDarkTheme);
|
8581
|
+
if (images.length <= startIndex) {
|
8582
|
+
console.log('Unable to display Image Gallery due to startIndex is out of range.');
|
8583
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
8584
|
+
}
|
8585
|
+
const image = images[startIndex];
|
8586
|
+
return (React__default['default'].createElement(react.Layer, { hostId: modalLayerHostId },
|
8587
|
+
React__default['default'].createElement(react.Modal, { titleAriaId: image.title, isOpen: images.length > 0, onDismiss: onDismiss, overlay: { styles: Object.assign(Object.assign({}, overlayStyles(theme, isDarkTheme)), styles === null || styles === void 0 ? void 0 : styles.overlay) }, layerProps: { id: modalLayerHostId }, styles: Object.assign({ main: focusTrapZoneStyle, scrollableContent: scrollableContentStyle }, styles === null || styles === void 0 ? void 0 : styles.modal) },
|
8588
|
+
React__default['default'].createElement("div", { className: react.mergeStyles(imageContainer, styles === null || styles === void 0 ? void 0 : styles.imageContainer) },
|
8589
|
+
React__default['default'].createElement("img", { src: image.imageUrl, className: react.mergeStyles(imageStyle, styles === null || styles === void 0 ? void 0 : styles.image), alt: image.altText || defaultAltText, onError: (event) => {
|
8590
|
+
setIsImageLoaded(false);
|
8591
|
+
onError && onError(event);
|
8592
|
+
} }))),
|
8593
|
+
React__default['default'].createElement(react.Stack, { className: react.mergeStyles(headerStyle, styles === null || styles === void 0 ? void 0 : styles.header) },
|
8594
|
+
React__default['default'].createElement(react.Stack, { className: react.mergeStyles(titleBarContainerStyle, styles === null || styles === void 0 ? void 0 : styles.titleBarContainer) },
|
8595
|
+
image.titleIcon,
|
8596
|
+
React__default['default'].createElement(react.Stack.Item, { className: react.mergeStyles(titleStyle$2(theme, isDarkTheme), styles === null || styles === void 0 ? void 0 : styles.title), "aria-label": image.title }, image.title)),
|
8597
|
+
React__default['default'].createElement(react.Stack, { className: react.mergeStyles(controlBarContainerStyle, styles === null || styles === void 0 ? void 0 : styles.controlBarContainer) },
|
8598
|
+
React__default['default'].createElement(react.DefaultButton, { className: react.mergeStyles(downloadButtonStyle(theme, isDarkTheme), styles === null || styles === void 0 ? void 0 : styles.downloadButton), text: downloadButtonTitleString, onClick: () => onImageDownloadButtonClicked(image.imageUrl, image.saveAsName), onRenderIcon: () => (React__default['default'].createElement(react.Icon, { iconName: downloadIcon.iconName, className: react.mergeStyles(downloadIconStyle, styles === null || styles === void 0 ? void 0 : styles.downloadButtonIcon) })), "aria-live": 'polite', "aria-label": downloadButtonTitleString }),
|
8599
|
+
React__default['default'].createElement(react.IconButton, { iconProps: downloadIcon, className: react.mergeStyles(smallDownloadButtonContainerStyle(theme, isDarkTheme), styles === null || styles === void 0 ? void 0 : styles.smallDownloadButton), onClick: () => onImageDownloadButtonClicked(image.imageUrl, image.saveAsName), "aria-label": downloadButtonTitleString, "aria-live": 'polite' }),
|
8600
|
+
React__default['default'].createElement(react.IconButton, { iconProps: cancelIcon, className: react.mergeStyles(closeButtonStyles(theme, isDarkTheme), styles === null || styles === void 0 ? void 0 : styles.closeIcon), onClick: onDismiss, ariaLabel: closeString, "aria-live": 'polite' })))));
|
8601
|
+
};
|
8602
|
+
|
8365
8603
|
// Copyright (c) Microsoft Corporation.
|
8366
8604
|
/** @private */
|
8367
8605
|
const MESSAGE_STATUS_INDICATOR_SIZE_REM = 1;
|
@@ -9356,7 +9594,12 @@ const processInlineImage = (props) => ({
|
|
9356
9594
|
if (props.attachmentsMap && node.attribs.id in props.attachmentsMap) {
|
9357
9595
|
node.attribs = Object.assign(Object.assign({}, node.attribs), { src: props.attachmentsMap[node.attribs.id] });
|
9358
9596
|
}
|
9359
|
-
|
9597
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9598
|
+
const handleOnClick = () => {
|
9599
|
+
props.onInlineImageClicked && props.onInlineImageClicked(node.attribs.id);
|
9600
|
+
};
|
9601
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9602
|
+
return (React__default['default'].createElement("span", { onClick: handleOnClick, "data-ui-id": node.attribs.id }, processNodeDefinitions.processDefaultNode(node, children, index)));
|
9360
9603
|
}
|
9361
9604
|
});
|
9362
9605
|
/* @conditional-compile-remove(mention) */
|
@@ -9430,7 +9673,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
9430
9673
|
return actionMenuProps;
|
9431
9674
|
};
|
9432
9675
|
|
9433
|
-
var __awaiter$
|
9676
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9434
9677
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9435
9678
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9436
9679
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9473,7 +9716,7 @@ const _FileDownloadCards = (props) => {
|
|
9473
9716
|
fileCount: `${fileMetadata.filter(isFileSharingAttachment).length}`
|
9474
9717
|
});
|
9475
9718
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
9476
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
9719
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$y(void 0, void 0, void 0, function* () {
|
9477
9720
|
if (!props.downloadHandler) {
|
9478
9721
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
9479
9722
|
}
|
@@ -9523,6 +9766,16 @@ const useLocaleStringsTrampoline = () => {
|
|
9523
9766
|
};
|
9524
9767
|
|
9525
9768
|
// Copyright (c) Microsoft Corporation.
|
9769
|
+
// Licensed under the MIT license.
|
9770
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9771
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9772
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
9773
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
9774
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
9775
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
9776
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9777
|
+
});
|
9778
|
+
};
|
9526
9779
|
const generateDefaultTimestamp = (createdOn, showDate, strings) => {
|
9527
9780
|
const formattedTimestamp = showDate
|
9528
9781
|
? formatTimestampForChatMessage(createdOn, new Date(), strings)
|
@@ -9544,7 +9797,9 @@ const MessageBubble = (props) => {
|
|
9544
9797
|
const ids = useIdentifiers();
|
9545
9798
|
const theme = useTheme();
|
9546
9799
|
const locale = useLocale$1();
|
9547
|
-
const { userId, message, onRemoveClick, onResendClick, disableEditing, showDate, messageContainerStyle, strings, onEditClick, remoteParticipantsCount = 0, onRenderAvatar, showMessageStatus, messageStatus, fileDownloadHandler
|
9800
|
+
const { userId, message, onRemoveClick, onResendClick, disableEditing, showDate, messageContainerStyle, strings, onEditClick, remoteParticipantsCount = 0, onRenderAvatar, showMessageStatus, messageStatus, fileDownloadHandler,
|
9801
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9802
|
+
onInlineImageClicked } = props;
|
9548
9803
|
const defaultTimeStamp = message.createdOn
|
9549
9804
|
? generateDefaultTimestamp(message.createdOn, showDate, strings)
|
9550
9805
|
: undefined;
|
@@ -9603,6 +9858,21 @@ const MessageBubble = (props) => {
|
|
9603
9858
|
}
|
9604
9859
|
return undefined;
|
9605
9860
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
9861
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9862
|
+
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$x(void 0, void 0, void 0, function* () {
|
9863
|
+
var _b;
|
9864
|
+
if (onInlineImageClicked === undefined) {
|
9865
|
+
return;
|
9866
|
+
}
|
9867
|
+
(_b = message.attachedFilesMetadata) === null || _b === void 0 ? void 0 : _b.forEach((attachment) => __awaiter$x(void 0, void 0, void 0, function* () {
|
9868
|
+
if (attachment.id === attachmentId) {
|
9869
|
+
const onRenderTitleIcon = (personaProps) => {
|
9870
|
+
return (React__default['default'].createElement(react.Persona, Object.assign({ text: message.senderDisplayName, imageAlt: message.senderDisplayName, size: react.PersonaSize.size32, hidePersonaDetails: true, showOverflowTooltip: false }, personaProps)));
|
9871
|
+
};
|
9872
|
+
yield onInlineImageClicked(Object.assign(Object.assign({}, attachment), { name: message.senderDisplayName || '' }), onRenderTitleIcon);
|
9873
|
+
}
|
9874
|
+
}));
|
9875
|
+
}), [message, onInlineImageClicked]);
|
9606
9876
|
const getContent = React.useCallback(() => {
|
9607
9877
|
/* @conditional-compile-remove(data-loss-prevention) */
|
9608
9878
|
if (message.messageType === 'blocked') {
|
@@ -9616,9 +9886,19 @@ const MessageBubble = (props) => {
|
|
9616
9886
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9617
9887
|
attachmentsMap: props.attachmentsMap,
|
9618
9888
|
/* @conditional-compile-remove(mention) */
|
9619
|
-
mentionDisplayOptions: props.mentionDisplayOptions
|
9889
|
+
mentionDisplayOptions: props.mentionDisplayOptions,
|
9890
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9891
|
+
onInlineImageClicked: handleOnInlineImageClicked }),
|
9620
9892
|
props.onRenderFileDownloads ? props.onRenderFileDownloads(userId, message) : defaultOnRenderFileDownloads()));
|
9621
|
-
}, [
|
9893
|
+
}, [
|
9894
|
+
defaultOnRenderFileDownloads,
|
9895
|
+
message,
|
9896
|
+
props,
|
9897
|
+
strings,
|
9898
|
+
userId,
|
9899
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9900
|
+
handleOnInlineImageClicked
|
9901
|
+
]);
|
9622
9902
|
const chatMessage = (React__default['default'].createElement(React__default['default'].Fragment, null,
|
9623
9903
|
React__default['default'].createElement("div", { ref: messageRef },
|
9624
9904
|
React__default['default'].createElement(i.Message, { "data-ui-id": "chat-composite-message", className: react.mergeStyles(messageContainerStyle), styles: messageContainerStyle, content: getContent(), author: React__default['default'].createElement(d, { className: chatMessageDateStyle }, message.senderDisplayName), mine: message.mine, timestamp: React__default['default'].createElement(d, { "data-ui-id": ids.messageTimestamp }, formattedTimestamp), details: getMessageDetails(), positionActionMenu: false, actionMenu: actionMenuProps, onTouchStart: () => setWasInteractionByTouch(true), onPointerDown: () => setWasInteractionByTouch(false), onKeyDown: () => setWasInteractionByTouch(false), onBlur: () => setWasInteractionByTouch(false), onClick: () => {
|
@@ -9695,6 +9975,8 @@ const ChatMessageComponent = (props) => {
|
|
9695
9975
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9696
9976
|
onFetchAttachments: props.onFetchAttachments,
|
9697
9977
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9978
|
+
onInlineImageClicked: props.onInlineImageClicked,
|
9979
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
9698
9980
|
attachmentsMap: props.attachmentsMap,
|
9699
9981
|
/* @conditional-compile-remove(mention) */
|
9700
9982
|
mentionDisplayOptions: (_b = props.mentionOptions) === null || _b === void 0 ? void 0 : _b.displayOptions })));
|
@@ -10067,7 +10349,9 @@ const MessageThread = (props) => {
|
|
10067
10349
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10068
10350
|
onFetchAttachments,
|
10069
10351
|
/* @conditional-compile-remove(mention) */
|
10070
|
-
mentionOptions
|
10352
|
+
mentionOptions,
|
10353
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10354
|
+
onInlineImageClicked } = props;
|
10071
10355
|
const onRenderFileDownloads = onRenderFileDownloadsTrampoline(props);
|
10072
10356
|
const [messages, setMessages] = React.useState([]);
|
10073
10357
|
// We need this state to wait for one tick and scroll to bottom after messages have been initialized.
|
@@ -10315,6 +10599,8 @@ const MessageThread = (props) => {
|
|
10315
10599
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10316
10600
|
onFetchAttachments: onFetchInlineAttachment,
|
10317
10601
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10602
|
+
onInlineImageClicked: onInlineImageClicked,
|
10603
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10318
10604
|
attachmentsMap: inlineAttachments,
|
10319
10605
|
/* @conditional-compile-remove(mention) */
|
10320
10606
|
mentionOptions: mentionOptions })));
|
@@ -10335,6 +10621,8 @@ const MessageThread = (props) => {
|
|
10335
10621
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10336
10622
|
onFetchInlineAttachment,
|
10337
10623
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10624
|
+
onInlineImageClicked,
|
10625
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
10338
10626
|
inlineAttachments,
|
10339
10627
|
/* @conditional-compile-remove(mention) */
|
10340
10628
|
mentionOptions
|
@@ -20836,6 +21124,10 @@ const ChatScreen = (props) => {
|
|
20836
21124
|
const defaultNumberOfChatMessagesToReload = 5;
|
20837
21125
|
/* @conditional-compile-remove(file-sharing) */
|
20838
21126
|
const [downloadErrorMessage, setDownloadErrorMessage] = React__default['default'].useState('');
|
21127
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21128
|
+
const [fullSizeAttachments, setFullSizeAttachments] = React.useState({});
|
21129
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21130
|
+
const [galleryImages, setGalleryImages] = React.useState(undefined);
|
20839
21131
|
const adapter = useAdapter$1();
|
20840
21132
|
const theme = useTheme();
|
20841
21133
|
React.useEffect(() => {
|
@@ -20881,6 +21173,37 @@ const ChatScreen = (props) => {
|
|
20881
21173
|
}
|
20882
21174
|
return [{ blobUrl: '' }];
|
20883
21175
|
}), [adapter]);
|
21176
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21177
|
+
const onInlineImageClicked = React.useCallback((attachment, onRenderTitleIcon) => __awaiter$i(void 0, void 0, void 0, function* () {
|
21178
|
+
const titleIcon = onRenderTitleIcon && onRenderTitleIcon();
|
21179
|
+
const galleryImage = {
|
21180
|
+
title: attachment.name,
|
21181
|
+
titleIcon: titleIcon,
|
21182
|
+
saveAsName: attachment.id,
|
21183
|
+
imageUrl: ''
|
21184
|
+
};
|
21185
|
+
if (attachment.id in fullSizeAttachments) {
|
21186
|
+
setGalleryImages([
|
21187
|
+
Object.assign(Object.assign({}, galleryImage), { imageUrl: fullSizeAttachments[attachment.id] })
|
21188
|
+
]);
|
21189
|
+
return;
|
21190
|
+
}
|
21191
|
+
if (attachment.attachmentType === 'inlineImage' && attachment.url) {
|
21192
|
+
const blob = yield adapter.downloadAttachments({ attachmentUrls: [attachment.url] });
|
21193
|
+
if (blob[0]) {
|
21194
|
+
const blobUrl = blob[0].blobUrl;
|
21195
|
+
setFullSizeAttachments((prev) => (Object.assign(Object.assign({}, prev), { [attachment.id]: blobUrl })));
|
21196
|
+
setGalleryImages([
|
21197
|
+
Object.assign(Object.assign({}, galleryImage), { imageUrl: blobUrl })
|
21198
|
+
]);
|
21199
|
+
}
|
21200
|
+
}
|
21201
|
+
}), [adapter, fullSizeAttachments]);
|
21202
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21203
|
+
const handleOnDownloadImage = (blobUrl, filename) => {
|
21204
|
+
// Place holder function for download handler
|
21205
|
+
console.log(blobUrl, filename);
|
21206
|
+
};
|
20884
21207
|
const AttachFileButton = React.useCallback(() => {
|
20885
21208
|
if (!(fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.uploadHandler)) {
|
20886
21209
|
return null;
|
@@ -20900,7 +21223,9 @@ const ChatScreen = (props) => {
|
|
20900
21223
|
/* @conditional-compile-remove(file-sharing) */
|
20901
21224
|
onRenderFileDownloads: onRenderFileDownloads,
|
20902
21225
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
20903
|
-
onFetchAttachments: onRenderInlineAttachment,
|
21226
|
+
onFetchAttachments: onRenderInlineAttachment,
|
21227
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21228
|
+
onInlineImageClicked: onInlineImageClicked, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
20904
21229
|
React__default['default'].createElement(react.Stack, { className: react.mergeStyles(sendboxContainerStyles) },
|
20905
21230
|
React__default['default'].createElement("div", { className: react.mergeStyles(typingIndicatorContainerStyles) }, onRenderTypingIndicator ? (onRenderTypingIndicator(typingIndicatorProps.typingUsers)) : (React__default['default'].createElement(TypingIndicator, Object.assign({}, typingIndicatorProps, { styles: typingIndicatorStyles })))),
|
20906
21231
|
React__default['default'].createElement(react.Stack, { horizontal: formFactor === 'mobile' },
|
@@ -20914,7 +21239,9 @@ const ChatScreen = (props) => {
|
|
20914
21239
|
onCancelFileUpload: adapter.cancelFileUpload }))),
|
20915
21240
|
formFactor !== 'mobile' && React__default['default'].createElement(AttachFileButton, null)))),
|
20916
21241
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
20917
|
-
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React__default['default'].createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' })))
|
21242
|
+
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React__default['default'].createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' }))),
|
21243
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
21244
|
+
galleryImages && galleryImages.length > 0 && (React__default['default'].createElement(ImageGallery, { modalLayerHostId: props.modalLayerHostId, images: galleryImages, onDismiss: () => setGalleryImages(undefined), onImageDownloadButtonClicked: handleOnDownloadImage }))));
|
20918
21245
|
};
|
20919
21246
|
|
20920
21247
|
// Copyright (c) Microsoft Corporation.
|
@@ -30170,6 +30497,7 @@ exports.ErrorBar = ErrorBar;
|
|
30170
30497
|
exports.FluentThemeProvider = FluentThemeProvider;
|
30171
30498
|
exports.GridLayout = GridLayout;
|
30172
30499
|
exports.HoldButton = HoldButton;
|
30500
|
+
exports.ImageGallery = ImageGallery;
|
30173
30501
|
exports.LocalizationProvider = LocalizationProvider$1;
|
30174
30502
|
exports.MessageStatusIndicator = MessageStatusIndicator;
|
30175
30503
|
exports.MessageThread = MessageThread;
|