@azure/communication-react 1.5.1-alpha-202303250012 → 1.5.1-alpha-202303280014
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 +62 -0
- package/dist/dist-cjs/communication-react/index.js +258 -122
- 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/react-components/src/components/MessageThread.js +5 -4
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +30 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +25 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +42 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +18 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +29 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
- package/package.json +8 -8
@@ -162,7 +162,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
162
162
|
// Copyright (c) Microsoft Corporation.
|
163
163
|
// Licensed under the MIT license.
|
164
164
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
165
|
-
var telemetryVersion = '1.5.1-alpha-
|
165
|
+
var telemetryVersion = '1.5.1-alpha-202303280014';
|
166
166
|
|
167
167
|
// Copyright (c) Microsoft Corporation.
|
168
168
|
/**
|
@@ -378,7 +378,7 @@ const getEnvironmentInfo = (state) => {
|
|
378
378
|
|
379
379
|
// Copyright (c) Microsoft Corporation.
|
380
380
|
// Licensed under the MIT license.
|
381
|
-
var __awaiter$
|
381
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
382
382
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
383
383
|
return new (P || (P = Promise))(function (resolve, reject) {
|
384
384
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -416,7 +416,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
416
416
|
*
|
417
417
|
* @private
|
418
418
|
*/
|
419
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
419
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$F(void 0, void 0, void 0, function* () {
|
420
420
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
421
421
|
for (const view of unparentedViews) {
|
422
422
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -549,7 +549,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
549
549
|
|
550
550
|
// Copyright (c) Microsoft Corporation.
|
551
551
|
// Licensed under the MIT license.
|
552
|
-
var __awaiter$
|
552
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
553
553
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
554
554
|
return new (P || (P = Promise))(function (resolve, reject) {
|
555
555
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -570,7 +570,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
570
570
|
* @private
|
571
571
|
*/
|
572
572
|
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call) => {
|
573
|
-
const onStartLocalVideo = () => __awaiter$
|
573
|
+
const onStartLocalVideo = () => __awaiter$E(void 0, void 0, void 0, function* () {
|
574
574
|
// Before the call object creates a stream, dispose of any local preview streams.
|
575
575
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
576
576
|
// of disposing and creating a new stream?
|
@@ -590,7 +590,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
590
590
|
yield call.startVideo(stream);
|
591
591
|
}
|
592
592
|
});
|
593
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
593
|
+
const onStopLocalVideo = (stream) => __awaiter$E(void 0, void 0, void 0, function* () {
|
594
594
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
595
595
|
if (!callId) {
|
596
596
|
return;
|
@@ -599,7 +599,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
599
599
|
yield call.stopVideo(stream);
|
600
600
|
}
|
601
601
|
});
|
602
|
-
const onToggleCamera = (options) => __awaiter$
|
602
|
+
const onToggleCamera = (options) => __awaiter$E(void 0, void 0, void 0, function* () {
|
603
603
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
604
604
|
if (previewOn && call && call.state === 'Connecting') {
|
605
605
|
// This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
@@ -647,19 +647,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
647
647
|
}
|
648
648
|
}
|
649
649
|
});
|
650
|
-
const onSelectMicrophone = (device) => __awaiter$
|
650
|
+
const onSelectMicrophone = (device) => __awaiter$E(void 0, void 0, void 0, function* () {
|
651
651
|
if (!deviceManager) {
|
652
652
|
return;
|
653
653
|
}
|
654
654
|
return deviceManager.selectMicrophone(device);
|
655
655
|
});
|
656
|
-
const onSelectSpeaker = (device) => __awaiter$
|
656
|
+
const onSelectSpeaker = (device) => __awaiter$E(void 0, void 0, void 0, function* () {
|
657
657
|
if (!deviceManager) {
|
658
658
|
return;
|
659
659
|
}
|
660
660
|
return deviceManager.selectSpeaker(device);
|
661
661
|
});
|
662
|
-
const onSelectCamera = (device, options) => __awaiter$
|
662
|
+
const onSelectCamera = (device, options) => __awaiter$E(void 0, void 0, void 0, function* () {
|
663
663
|
if (!deviceManager) {
|
664
664
|
return;
|
665
665
|
}
|
@@ -682,19 +682,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
682
682
|
}, options);
|
683
683
|
}
|
684
684
|
});
|
685
|
-
const onToggleMicrophone = () => __awaiter$
|
685
|
+
const onToggleMicrophone = () => __awaiter$E(void 0, void 0, void 0, function* () {
|
686
686
|
if (!call || !_isInCall(call.state)) {
|
687
687
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
688
688
|
}
|
689
689
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
690
690
|
});
|
691
|
-
const onStartScreenShare = () => __awaiter$
|
692
|
-
const onStopScreenShare = () => __awaiter$
|
693
|
-
const onToggleScreenShare = () => __awaiter$
|
694
|
-
const onHangUp = (forEveryone) => __awaiter$
|
691
|
+
const onStartScreenShare = () => __awaiter$E(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
692
|
+
const onStopScreenShare = () => __awaiter$E(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
693
|
+
const onToggleScreenShare = () => __awaiter$E(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
694
|
+
const onHangUp = (forEveryone) => __awaiter$E(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
695
695
|
/* @conditional-compile-remove(PSTN-calls) */
|
696
|
-
const onToggleHold = () => __awaiter$
|
697
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
696
|
+
const onToggleHold = () => __awaiter$E(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()); });
|
697
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$E(void 0, void 0, void 0, function* () {
|
698
698
|
var _a;
|
699
699
|
if (!call || call.localVideoStreams.length === 0) {
|
700
700
|
return;
|
@@ -710,7 +710,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
710
710
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
711
711
|
return view ? { view } : undefined;
|
712
712
|
});
|
713
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
713
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$E(void 0, void 0, void 0, function* () {
|
714
714
|
if (!call) {
|
715
715
|
return;
|
716
716
|
}
|
@@ -741,7 +741,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
741
741
|
}
|
742
742
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
743
743
|
});
|
744
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
744
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$E(void 0, void 0, void 0, function* () {
|
745
745
|
if (!call) {
|
746
746
|
return;
|
747
747
|
}
|
@@ -762,7 +762,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
762
762
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
763
763
|
}
|
764
764
|
});
|
765
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
765
|
+
const onDisposeLocalStreamView = () => __awaiter$E(void 0, void 0, void 0, function* () {
|
766
766
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
767
767
|
const callState = call && callClient.getState().calls[call.id];
|
768
768
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -775,18 +775,18 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
775
775
|
yield disposeAllLocalPreviewViews(callClient);
|
776
776
|
});
|
777
777
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
778
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
778
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$E(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
779
779
|
const notImplemented = () => {
|
780
780
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
781
781
|
};
|
782
782
|
/* @conditional-compile-remove(call-readiness) */
|
783
|
-
const askDevicePermission = (constrain) => __awaiter$
|
783
|
+
const askDevicePermission = (constrain) => __awaiter$E(void 0, void 0, void 0, function* () {
|
784
784
|
if (deviceManager) {
|
785
785
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
786
786
|
}
|
787
787
|
});
|
788
788
|
/* @conditional-compile-remove(video-background-effects) */
|
789
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
789
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$E(void 0, void 0, void 0, function* () {
|
790
790
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
791
791
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
792
792
|
if (stream) {
|
@@ -794,7 +794,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
794
794
|
}
|
795
795
|
});
|
796
796
|
/* @conditional-compile-remove(video-background-effects) */
|
797
|
-
const onBlurVideoBackground = (bgBlurConfig) => __awaiter$
|
797
|
+
const onBlurVideoBackground = (bgBlurConfig) => __awaiter$E(void 0, void 0, void 0, function* () {
|
798
798
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
799
799
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
800
800
|
if (stream) {
|
@@ -802,7 +802,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
802
802
|
}
|
803
803
|
});
|
804
804
|
/* @conditional-compile-remove(video-background-effects) */
|
805
|
-
const onReplaceVideoBackground = (bgReplacementConfig) => __awaiter$
|
805
|
+
const onReplaceVideoBackground = (bgReplacementConfig) => __awaiter$E(void 0, void 0, void 0, function* () {
|
806
806
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
807
807
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
808
808
|
if (stream) {
|
@@ -844,7 +844,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
844
844
|
|
845
845
|
// Copyright (c) Microsoft Corporation.
|
846
846
|
// Licensed under the MIT license.
|
847
|
-
var __awaiter$
|
847
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
848
848
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
849
849
|
return new (P || (P = Promise))(function (resolve, reject) {
|
850
850
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -871,7 +871,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
871
871
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
872
872
|
},
|
873
873
|
/* @conditional-compile-remove(PSTN-calls) */
|
874
|
-
onAddParticipant: (userId, options) => __awaiter$
|
874
|
+
onAddParticipant: (userId, options) => __awaiter$D(void 0, void 0, void 0, function* () {
|
875
875
|
const participant = _toCommunicationIdentifier(userId);
|
876
876
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
877
877
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -879,7 +879,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
879
879
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
880
880
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
881
881
|
}
|
882
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
882
|
+
}), onRemoveParticipant: (userId) => __awaiter$D(void 0, void 0, void 0, function* () {
|
883
883
|
const participant = _toCommunicationIdentifier(userId);
|
884
884
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
885
885
|
}) });
|
@@ -887,7 +887,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
887
887
|
|
888
888
|
// Copyright (c) Microsoft Corporation.
|
889
889
|
// Licensed under the MIT license.
|
890
|
-
var __awaiter$
|
890
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
891
891
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
892
892
|
return new (P || (P = Promise))(function (resolve, reject) {
|
893
893
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -919,7 +919,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
919
919
|
},
|
920
920
|
/* @conditional-compile-remove(teams-identity-support) */
|
921
921
|
/* @conditional-compile-remove(PSTN-calls) */
|
922
|
-
onAddParticipant: (userId, options) => __awaiter$
|
922
|
+
onAddParticipant: (userId, options) => __awaiter$C(void 0, void 0, void 0, function* () {
|
923
923
|
const participant = _toCommunicationIdentifier(userId);
|
924
924
|
/* @conditional-compile-remove(teams-identity-support) */
|
925
925
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -932,7 +932,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
932
932
|
}
|
933
933
|
/* @conditional-compile-remove(teams-identity-support) */
|
934
934
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
935
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
935
|
+
}), onRemoveParticipant: (userId) => __awaiter$C(void 0, void 0, void 0, function* () {
|
936
936
|
const participant = _toCommunicationIdentifier(userId);
|
937
937
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
938
938
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -944,7 +944,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
944
944
|
|
945
945
|
// Copyright (c) Microsoft Corporation.
|
946
946
|
// Licensed under the MIT license.
|
947
|
-
var __awaiter$
|
947
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
948
948
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
949
949
|
return new (P || (P = Promise))(function (resolve, reject) {
|
950
950
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -993,13 +993,13 @@ class ProxyDeviceManager {
|
|
993
993
|
this.selectCamera = (videoDeviceInfo) => {
|
994
994
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
995
995
|
};
|
996
|
-
this.videoDevicesUpdated = () => __awaiter$
|
996
|
+
this.videoDevicesUpdated = () => __awaiter$B(this, void 0, void 0, function* () {
|
997
997
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
998
998
|
// We don't want to show that in the UI.
|
999
999
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1000
1000
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1001
1001
|
});
|
1002
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1002
|
+
this.audioDevicesUpdated = () => __awaiter$B(this, void 0, void 0, function* () {
|
1003
1003
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1004
1004
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1005
1005
|
});
|
@@ -1202,7 +1202,7 @@ class CallIdHistory {
|
|
1202
1202
|
|
1203
1203
|
// Copyright (c) Microsoft Corporation.
|
1204
1204
|
// Licensed under the MIT license.
|
1205
|
-
var __awaiter$
|
1205
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1206
1206
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1207
1207
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1208
1208
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1786,7 +1786,7 @@ class CallContext$2 {
|
|
1786
1786
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
1787
1787
|
*/
|
1788
1788
|
withAsyncErrorTeedToState(action, target) {
|
1789
|
-
return (...args) => __awaiter$
|
1789
|
+
return (...args) => __awaiter$A(this, void 0, void 0, function* () {
|
1790
1790
|
try {
|
1791
1791
|
return yield action(...args);
|
1792
1792
|
}
|
@@ -2313,7 +2313,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
2313
2313
|
|
2314
2314
|
// Copyright (c) Microsoft Corporation.
|
2315
2315
|
// Licensed under the MIT license.
|
2316
|
-
var __awaiter$
|
2316
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2317
2317
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2318
2318
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2319
2319
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2323,7 +2323,7 @@ var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
2323
2323
|
});
|
2324
2324
|
};
|
2325
2325
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
2326
|
-
return __awaiter$
|
2326
|
+
return __awaiter$z(this, void 0, void 0, function* () {
|
2327
2327
|
// we can only have 3 types of createView
|
2328
2328
|
let streamEventType;
|
2329
2329
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -2445,7 +2445,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
2445
2445
|
});
|
2446
2446
|
}
|
2447
2447
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
2448
|
-
return __awaiter$
|
2448
|
+
return __awaiter$z(this, void 0, void 0, function* () {
|
2449
2449
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
2450
2450
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
2451
2451
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -2613,7 +2613,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
2613
2613
|
// Render LocalVideoStream that is not part of a Call
|
2614
2614
|
// 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).
|
2615
2615
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
2616
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
2616
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$z(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
2617
2617
|
}
|
2618
2618
|
else {
|
2619
2619
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -3047,7 +3047,7 @@ class CallSubscriber {
|
|
3047
3047
|
|
3048
3048
|
// Copyright (c) Microsoft Corporation.
|
3049
3049
|
// Licensed under the MIT license.
|
3050
|
-
var __awaiter$
|
3050
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3051
3051
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3052
3052
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3053
3053
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3067,14 +3067,14 @@ class ProxyIncomingCall {
|
|
3067
3067
|
switch (prop) {
|
3068
3068
|
case 'accept': {
|
3069
3069
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3070
|
-
return __awaiter$
|
3070
|
+
return __awaiter$y(this, void 0, void 0, function* () {
|
3071
3071
|
return yield target.accept(...args);
|
3072
3072
|
});
|
3073
3073
|
}, 'IncomingCall.accept');
|
3074
3074
|
}
|
3075
3075
|
case 'reject': {
|
3076
3076
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3077
|
-
return __awaiter$
|
3077
|
+
return __awaiter$y(this, void 0, void 0, function* () {
|
3078
3078
|
return yield target.reject(...args);
|
3079
3079
|
});
|
3080
3080
|
}, 'IncomingCall.reject');
|
@@ -3311,7 +3311,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
3311
3311
|
|
3312
3312
|
// Copyright (c) Microsoft Corporation.
|
3313
3313
|
// Licensed under the MIT license.
|
3314
|
-
var __awaiter$
|
3314
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3315
3315
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3316
3316
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3317
3317
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3337,56 +3337,56 @@ class ProxyCallCommon {
|
|
3337
3337
|
switch (prop) {
|
3338
3338
|
case 'mute': {
|
3339
3339
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3340
|
-
return __awaiter$
|
3340
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3341
3341
|
return yield target.mute(...args);
|
3342
3342
|
});
|
3343
3343
|
}, 'Call.mute');
|
3344
3344
|
}
|
3345
3345
|
case 'unmute': {
|
3346
3346
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3347
|
-
return __awaiter$
|
3347
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3348
3348
|
return yield target.unmute(...args);
|
3349
3349
|
});
|
3350
3350
|
}, 'Call.unmute');
|
3351
3351
|
}
|
3352
3352
|
case 'startVideo': {
|
3353
3353
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3354
|
-
return __awaiter$
|
3354
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3355
3355
|
return yield target.startVideo(...args);
|
3356
3356
|
});
|
3357
3357
|
}, 'Call.startVideo');
|
3358
3358
|
}
|
3359
3359
|
case 'stopVideo': {
|
3360
3360
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3361
|
-
return __awaiter$
|
3361
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3362
3362
|
return yield target.stopVideo(...args);
|
3363
3363
|
});
|
3364
3364
|
}, 'Call.stopVideo');
|
3365
3365
|
}
|
3366
3366
|
case 'startScreenSharing': {
|
3367
3367
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3368
|
-
return __awaiter$
|
3368
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3369
3369
|
return yield target.startScreenSharing(...args);
|
3370
3370
|
});
|
3371
3371
|
}, 'Call.startScreenSharing');
|
3372
3372
|
}
|
3373
3373
|
case 'stopScreenSharing': {
|
3374
3374
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3375
|
-
return __awaiter$
|
3375
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3376
3376
|
return yield target.stopScreenSharing(...args);
|
3377
3377
|
});
|
3378
3378
|
}, 'Call.stopScreenSharing');
|
3379
3379
|
}
|
3380
3380
|
case 'hold': {
|
3381
3381
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3382
|
-
return __awaiter$
|
3382
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3383
3383
|
return yield target.hold(...args);
|
3384
3384
|
});
|
3385
3385
|
}, 'Call.hold');
|
3386
3386
|
}
|
3387
3387
|
case 'resume': {
|
3388
3388
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3389
|
-
return __awaiter$
|
3389
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3390
3390
|
return yield target.resume(...args);
|
3391
3391
|
});
|
3392
3392
|
}, 'Call.resume');
|
@@ -3399,7 +3399,7 @@ class ProxyCallCommon {
|
|
3399
3399
|
|
3400
3400
|
// Copyright (c) Microsoft Corporation.
|
3401
3401
|
// Licensed under the MIT license.
|
3402
|
-
var __awaiter$
|
3402
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3403
3403
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3404
3404
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3405
3405
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3413,7 +3413,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
3413
3413
|
switch (prop) {
|
3414
3414
|
case 'addParticipant': {
|
3415
3415
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
3416
|
-
return __awaiter$
|
3416
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3417
3417
|
return yield target.addParticipant(...args);
|
3418
3418
|
});
|
3419
3419
|
}, 'Call.addParticipant');
|
@@ -3634,7 +3634,7 @@ class InternalCallContext {
|
|
3634
3634
|
|
3635
3635
|
// Copyright (c) Microsoft Corporation.
|
3636
3636
|
// Licensed under the MIT license.
|
3637
|
-
var __awaiter$
|
3637
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3638
3638
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3639
3639
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3640
3640
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3649,7 +3649,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
3649
3649
|
switch (prop) {
|
3650
3650
|
case 'addParticipant': {
|
3651
3651
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
3652
|
-
return __awaiter$
|
3652
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
3653
3653
|
return yield target.addParticipant(...args);
|
3654
3654
|
});
|
3655
3655
|
}, 'TeamsCall.addParticipant');
|
@@ -3764,7 +3764,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
3764
3764
|
|
3765
3765
|
// Copyright (c) Microsoft Corporation.
|
3766
3766
|
// Licensed under the MIT license.
|
3767
|
-
var __awaiter$
|
3767
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3768
3768
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3769
3769
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3770
3770
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3786,7 +3786,7 @@ class ProxyVideoStreamRendererView {
|
|
3786
3786
|
get(target, prop) {
|
3787
3787
|
switch (prop) {
|
3788
3788
|
case 'updateScalingMode': {
|
3789
|
-
return (...args) => __awaiter$
|
3789
|
+
return (...args) => __awaiter$u(this, void 0, void 0, function* () {
|
3790
3790
|
yield target.updateScalingMode(...args);
|
3791
3791
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
3792
3792
|
});
|
@@ -3807,7 +3807,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
3807
3807
|
|
3808
3808
|
// Copyright (c) Microsoft Corporation.
|
3809
3809
|
// Licensed under the MIT license.
|
3810
|
-
var __awaiter$
|
3810
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3811
3811
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3812
3812
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3813
3813
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3829,7 +3829,7 @@ class ProxyCallClient {
|
|
3829
3829
|
get(target, prop) {
|
3830
3830
|
switch (prop) {
|
3831
3831
|
case 'createCallAgent': {
|
3832
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
3832
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$t(this, void 0, void 0, function* () {
|
3833
3833
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
3834
3834
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
3835
3835
|
// callAgent if the createCallAgent succeeds.
|
@@ -3842,7 +3842,7 @@ class ProxyCallClient {
|
|
3842
3842
|
}), 'CallClient.createCallAgent');
|
3843
3843
|
}
|
3844
3844
|
case 'createTeamsCallAgent': {
|
3845
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
3845
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$t(this, void 0, void 0, function* () {
|
3846
3846
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
3847
3847
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
3848
3848
|
// callAgent if the createCallAgent succeeds.
|
@@ -3855,7 +3855,7 @@ class ProxyCallClient {
|
|
3855
3855
|
}), 'CallClient.createTeamsCallAgent');
|
3856
3856
|
}
|
3857
3857
|
case 'getDeviceManager': {
|
3858
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
3858
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$t(this, void 0, void 0, function* () {
|
3859
3859
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
3860
3860
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
3861
3861
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -3884,7 +3884,7 @@ class ProxyCallClient {
|
|
3884
3884
|
/**
|
3885
3885
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
3886
3886
|
*/
|
3887
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
3887
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$t(this, void 0, void 0, function* () {
|
3888
3888
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
3889
3889
|
this._context.setEnvironmentInfo(environmentInfo);
|
3890
3890
|
return environmentInfo;
|
@@ -3937,7 +3937,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
3937
3937
|
});
|
3938
3938
|
Object.defineProperty(callClient, 'createView', {
|
3939
3939
|
configurable: false,
|
3940
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
3940
|
+
value: (callId, participantId, stream, options) => __awaiter$t(void 0, void 0, void 0, function* () {
|
3941
3941
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
3942
3942
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
3943
3943
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -6128,7 +6128,7 @@ const FailedMyChatMessageContainer = Object.assign(Object.assign({}, defaultChat
|
|
6128
6128
|
/**
|
6129
6129
|
* @private
|
6130
6130
|
*/
|
6131
|
-
const defaultChatMessageContainer = {
|
6131
|
+
const defaultChatMessageContainer = (theme) => ({
|
6132
6132
|
maxWidth: '100%',
|
6133
6133
|
minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,
|
6134
6134
|
marginRight: '0rem',
|
@@ -6141,9 +6141,37 @@ const defaultChatMessageContainer = {
|
|
6141
6141
|
// For more info see https://github.com/Azure/communication-ui-library/pull/1507
|
6142
6142
|
marginBlock: '0.125rem'
|
6143
6143
|
},
|
6144
|
+
'& blockquote': {
|
6145
|
+
backgroundColor: theme.palette.white,
|
6146
|
+
clear: 'left',
|
6147
|
+
minHeight: '2.25rem',
|
6148
|
+
width: 'fit-content',
|
6149
|
+
margin: '7px 0px',
|
6150
|
+
padding: '7px 15px',
|
6151
|
+
border: 'solid',
|
6152
|
+
borderRadius: '4px',
|
6153
|
+
borderWidth: '1px',
|
6154
|
+
borderColor: theme.palette.neutralQuaternary,
|
6155
|
+
borderLeftWidth: '4px'
|
6156
|
+
},
|
6157
|
+
'& table': {
|
6158
|
+
backgroundColor: theme.palette.white,
|
6159
|
+
border: theme.palette.neutralQuaternary,
|
6160
|
+
borderCollapse: 'collapse',
|
6161
|
+
tableLayout: 'auto',
|
6162
|
+
width: '100%',
|
6163
|
+
'& tr': {
|
6164
|
+
border: `1px solid ${theme.palette.neutralQuaternary}`,
|
6165
|
+
'& td': {
|
6166
|
+
border: `1px solid ${theme.palette.neutralQuaternary}`,
|
6167
|
+
wordBreak: 'normal',
|
6168
|
+
padding: '0px 5px'
|
6169
|
+
}
|
6170
|
+
}
|
6171
|
+
},
|
6144
6172
|
// This makes message bubble show border in high contrast mode making each message distinguishable
|
6145
6173
|
border: '1px solid transparent'
|
6146
|
-
};
|
6174
|
+
});
|
6147
6175
|
/**
|
6148
6176
|
* @private
|
6149
6177
|
*/
|
@@ -6770,7 +6798,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
6770
6798
|
return actionMenuProps;
|
6771
6799
|
};
|
6772
6800
|
|
6773
|
-
var __awaiter$
|
6801
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6774
6802
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6775
6803
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6776
6804
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6795,7 +6823,7 @@ const _FileDownloadCards = (props) => {
|
|
6795
6823
|
var _a, _b;
|
6796
6824
|
return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile) !== null && _b !== void 0 ? _b : localeStrings.downloadFile;
|
6797
6825
|
}, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile, localeStrings.downloadFile]);
|
6798
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
6826
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$s(void 0, void 0, void 0, function* () {
|
6799
6827
|
if (!props.downloadHandler) {
|
6800
6828
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
6801
6829
|
}
|
@@ -6943,7 +6971,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
6943
6971
|
|
6944
6972
|
// Copyright (c) Microsoft Corporation.
|
6945
6973
|
// Licensed under the MIT license.
|
6946
|
-
var __awaiter$
|
6974
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6947
6975
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6948
6976
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6949
6977
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6977,7 +7005,7 @@ const ChatMessageComponent = (props) => {
|
|
6977
7005
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
6978
7006
|
}
|
6979
7007
|
else if (isEditing) {
|
6980
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
7008
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$r(void 0, void 0, void 0, function* () {
|
6981
7009
|
props.onUpdateMessage &&
|
6982
7010
|
props.message.messageId &&
|
6983
7011
|
(yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
|
@@ -7083,7 +7111,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
|
7083
7111
|
|
7084
7112
|
// Copyright (c) Microsoft Corporation.
|
7085
7113
|
// Licensed under the MIT license.
|
7086
|
-
var __awaiter$
|
7114
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7087
7115
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7088
7116
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7089
7117
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7178,7 +7206,7 @@ const DefaultSystemMessage = (props) => {
|
|
7178
7206
|
}
|
7179
7207
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
7180
7208
|
};
|
7181
|
-
const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate, showMessageStatus, onRenderAvatar, shouldOverlapAvatarAndMessage, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings, _attached, statusToRender, participantCount, readCount, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, disableEditing) => {
|
7209
|
+
const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate, showMessageStatus, onRenderAvatar, shouldOverlapAvatarAndMessage, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings, theme, _attached, statusToRender, participantCount, readCount, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, disableEditing) => {
|
7182
7210
|
var _a, _b, _c, _d, _e, _f, _g;
|
7183
7211
|
const messageProps = {
|
7184
7212
|
message,
|
@@ -7194,7 +7222,7 @@ const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate,
|
|
7194
7222
|
const myChatMessageStyle = message.status === 'failed'
|
7195
7223
|
? (_b = (_a = styles === null || styles === void 0 ? void 0 : styles.failedMyChatMessageContainer) !== null && _a !== void 0 ? _a : styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _b !== void 0 ? _b : FailedMyChatMessageContainer
|
7196
7224
|
: (_c = styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _c !== void 0 ? _c : defaultMyChatMessageContainer;
|
7197
|
-
const chatMessageStyle = (_d = styles === null || styles === void 0 ? void 0 : styles.chatMessageContainer) !== null && _d !== void 0 ? _d : defaultChatMessageContainer;
|
7225
|
+
const chatMessageStyle = (_d = styles === null || styles === void 0 ? void 0 : styles.chatMessageContainer) !== null && _d !== void 0 ? _d : defaultChatMessageContainer(theme);
|
7198
7226
|
messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : chatMessageStyle;
|
7199
7227
|
const chatMessageComponent = onRenderMessage === undefined
|
7200
7228
|
? defaultChatMessageRenderer(messageProps)
|
@@ -7318,7 +7346,7 @@ const MessageThread = (props) => {
|
|
7318
7346
|
setChatMessagesInitialized(chatMessagesInitialized);
|
7319
7347
|
};
|
7320
7348
|
// we try to only send those message status if user is scrolled to the bottom.
|
7321
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
7349
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$q(void 0, void 0, void 0, function* () {
|
7322
7350
|
if (!isAtBottomOfScrollRef.current ||
|
7323
7351
|
!document.hasFocus() ||
|
7324
7352
|
!messagesRef.current ||
|
@@ -7369,7 +7397,7 @@ const MessageThread = (props) => {
|
|
7369
7397
|
setIsAtBottomOfScrollRef(atBottom);
|
7370
7398
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
7371
7399
|
// Infinite scrolling + threadInitialize function
|
7372
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
7400
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$q(void 0, void 0, void 0, function* () {
|
7373
7401
|
if (!isLoadingChatMessagesRef.current) {
|
7374
7402
|
if (onLoadPreviousChatMessages) {
|
7375
7403
|
isLoadingChatMessagesRef.current = true;
|
@@ -7521,6 +7549,7 @@ const MessageThread = (props) => {
|
|
7521
7549
|
// -1 because participant count does not include myself
|
7522
7550
|
remoteParticipantsCount: participantCount ? participantCount - 1 : 0 }));
|
7523
7551
|
}, []);
|
7552
|
+
const theme = useTheme();
|
7524
7553
|
const messagesToDisplay = React.useMemo(() => memoizeAllMessages((memoizedMessageFn) => {
|
7525
7554
|
return messages.map((message, index) => {
|
7526
7555
|
let key = message.messageId;
|
@@ -7549,7 +7578,7 @@ const MessageThread = (props) => {
|
|
7549
7578
|
statusToRender = 'failed';
|
7550
7579
|
}
|
7551
7580
|
}
|
7552
|
-
return memoizedMessageFn(key !== null && key !== void 0 ? key : 'id_' + index, message, showMessageDate, showMessageStatus, onRenderAvatar, isNarrow, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings,
|
7581
|
+
return memoizedMessageFn(key !== null && key !== void 0 ? key : 'id_' + index, message, showMessageDate, showMessageStatus, onRenderAvatar, isNarrow, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings, theme,
|
7553
7582
|
// Temporary solution to make sure we re-render if attach attribute is changed.
|
7554
7583
|
// The proper fix should be in selector.
|
7555
7584
|
message.messageType === 'chat' ? message.attached : undefined, statusToRender, participantCount, readCountForHoveredIndicator, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, props.disableEditing);
|
@@ -7565,6 +7594,7 @@ const MessageThread = (props) => {
|
|
7565
7594
|
defaultStatusRenderer,
|
7566
7595
|
defaultChatMessageRenderer,
|
7567
7596
|
strings,
|
7597
|
+
theme,
|
7568
7598
|
participantCount,
|
7569
7599
|
readCountForHoveredIndicator,
|
7570
7600
|
onRenderMessage,
|
@@ -7576,7 +7606,6 @@ const MessageThread = (props) => {
|
|
7576
7606
|
lastDeliveredChatMessage,
|
7577
7607
|
props.disableEditing
|
7578
7608
|
]);
|
7579
|
-
const theme = useTheme();
|
7580
7609
|
const chatBody = React.useMemo(() => {
|
7581
7610
|
var _a;
|
7582
7611
|
return (React__default['default'].createElement(reactAriaLive.LiveAnnouncer, null,
|
@@ -11689,7 +11718,7 @@ const DevicesButton = (props) => {
|
|
11689
11718
|
|
11690
11719
|
// Copyright (c) Microsoft Corporation.
|
11691
11720
|
// Licensed under the MIT license.
|
11692
|
-
var __awaiter$
|
11721
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11693
11722
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11694
11723
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11695
11724
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11727,7 +11756,7 @@ const CameraButton = (props) => {
|
|
11727
11756
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
11728
11757
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
11729
11758
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
11730
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
11759
|
+
const onToggleClick = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
11731
11760
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
11732
11761
|
if (onToggleCamera) {
|
11733
11762
|
setWaitForCamera(true);
|
@@ -11892,7 +11921,7 @@ const lightThemeCallButtonStyles = {
|
|
11892
11921
|
|
11893
11922
|
// Copyright (c) Microsoft Corporation.
|
11894
11923
|
// Licensed under the MIT license.
|
11895
|
-
var __awaiter$
|
11924
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11896
11925
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11897
11926
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11898
11927
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11933,7 +11962,7 @@ const MicrophoneButton = (props) => {
|
|
11933
11962
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
11934
11963
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
11935
11964
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
11936
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
11965
|
+
const onToggleClick = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
|
11937
11966
|
if (onToggleMicrophone) {
|
11938
11967
|
try {
|
11939
11968
|
yield onToggleMicrophone();
|
@@ -12821,7 +12850,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
12821
12850
|
|
12822
12851
|
// Copyright (c) Microsoft Corporation.
|
12823
12852
|
// Licensed under the MIT license.
|
12824
|
-
var __awaiter$
|
12853
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12825
12854
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12826
12855
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12827
12856
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12863,10 +12892,10 @@ const DialpadButton = (props) => {
|
|
12863
12892
|
const theme = react.useTheme();
|
12864
12893
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
12865
12894
|
const useLongPressProps = React__default['default'].useMemo(() => ({
|
12866
|
-
onClick: () => __awaiter$
|
12895
|
+
onClick: () => __awaiter$n(void 0, void 0, void 0, function* () {
|
12867
12896
|
onClick(digit, index);
|
12868
12897
|
}),
|
12869
|
-
onLongPress: () => __awaiter$
|
12898
|
+
onLongPress: () => __awaiter$n(void 0, void 0, void 0, function* () {
|
12870
12899
|
onLongPress(digit, index);
|
12871
12900
|
}),
|
12872
12901
|
touchEventsOnly: isMobile
|
@@ -13791,7 +13820,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
13791
13820
|
|
13792
13821
|
// Copyright (c) Microsoft Corporation.
|
13793
13822
|
// Licensed under the MIT license.
|
13794
|
-
var __awaiter$
|
13823
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13795
13824
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13796
13825
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13797
13826
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13814,35 +13843,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
13814
13843
|
let messageIterator = undefined;
|
13815
13844
|
let readReceiptIterator = undefined;
|
13816
13845
|
return {
|
13817
|
-
onSendMessage: (content, options) => __awaiter$
|
13846
|
+
onSendMessage: (content, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
13818
13847
|
const sendMessageRequest = {
|
13819
13848
|
content,
|
13820
13849
|
senderDisplayName: chatClient.getState().displayName
|
13821
13850
|
};
|
13822
13851
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
13823
13852
|
}),
|
13824
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
13853
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
13825
13854
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
13826
13855
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
13827
13856
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
13828
13857
|
}),
|
13829
|
-
onDeleteMessage: (messageId) => __awaiter$
|
13858
|
+
onDeleteMessage: (messageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
13830
13859
|
yield chatThreadClient.deleteMessage(messageId);
|
13831
13860
|
}),
|
13832
13861
|
// This handler is designed for chatThread to consume
|
13833
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
13862
|
+
onMessageSeen: (chatMessageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
13834
13863
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
13835
13864
|
}),
|
13836
|
-
onTyping: () => __awaiter$
|
13865
|
+
onTyping: () => __awaiter$m(void 0, void 0, void 0, function* () {
|
13837
13866
|
yield chatThreadClient.sendTypingNotification();
|
13838
13867
|
}),
|
13839
|
-
onRemoveParticipant: (userId) => __awaiter$
|
13868
|
+
onRemoveParticipant: (userId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
13840
13869
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
13841
13870
|
}),
|
13842
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
13871
|
+
updateThreadTopicName: (topicName) => __awaiter$m(void 0, void 0, void 0, function* () {
|
13843
13872
|
yield chatThreadClient.updateTopic(topicName);
|
13844
13873
|
}),
|
13845
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
13874
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$m(void 0, void 0, void 0, function* () {
|
13846
13875
|
var _a, _b, _c;
|
13847
13876
|
if (messageIterator === undefined) {
|
13848
13877
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -14579,7 +14608,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
14579
14608
|
|
14580
14609
|
// Copyright (c) Microsoft Corporation.
|
14581
14610
|
// Licensed under the MIT license.
|
14582
|
-
var __awaiter$
|
14611
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14583
14612
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14584
14613
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14585
14614
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14854,7 +14883,7 @@ class ChatContext$1 {
|
|
14854
14883
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
14855
14884
|
*/
|
14856
14885
|
withAsyncErrorTeedToState(f, target) {
|
14857
|
-
return (...args) => __awaiter$
|
14886
|
+
return (...args) => __awaiter$l(this, void 0, void 0, function* () {
|
14858
14887
|
try {
|
14859
14888
|
return yield f(...args);
|
14860
14889
|
}
|
@@ -14961,7 +14990,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
14961
14990
|
|
14962
14991
|
// Copyright (c) Microsoft Corporation.
|
14963
14992
|
// Licensed under the MIT license.
|
14964
|
-
var __awaiter$
|
14993
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14965
14994
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14966
14995
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14967
14996
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15046,7 +15075,7 @@ class EventSubscriber {
|
|
15046
15075
|
};
|
15047
15076
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
15048
15077
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
15049
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
15078
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$k(this, void 0, void 0, function* () {
|
15050
15079
|
var e_1, _a;
|
15051
15080
|
try {
|
15052
15081
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -15138,7 +15167,7 @@ class EventSubscriber {
|
|
15138
15167
|
|
15139
15168
|
// Copyright (c) Microsoft Corporation.
|
15140
15169
|
// Licensed under the MIT license.
|
15141
|
-
var __awaiter$
|
15170
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15142
15171
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15143
15172
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15144
15173
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15160,7 +15189,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
15160
15189
|
const threadsIterator = iteratorCreator(...args);
|
15161
15190
|
return {
|
15162
15191
|
next() {
|
15163
|
-
return __awaiter$
|
15192
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
15164
15193
|
const result = yield threadsIterator.next();
|
15165
15194
|
if (!result.done && result.value) {
|
15166
15195
|
decorateFn(result.value, context);
|
@@ -15175,7 +15204,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
15175
15204
|
const pages = threadsIterator.byPage(settings);
|
15176
15205
|
return {
|
15177
15206
|
next() {
|
15178
|
-
return __awaiter$
|
15207
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
15179
15208
|
const result = yield pages.next();
|
15180
15209
|
const page = result.value;
|
15181
15210
|
if (!result.done && result.value) {
|
@@ -15259,7 +15288,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
15259
15288
|
|
15260
15289
|
// Copyright (c) Microsoft Corporation.
|
15261
15290
|
// Licensed under the MIT license.
|
15262
|
-
var __awaiter$
|
15291
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15263
15292
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15264
15293
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15265
15294
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15278,14 +15307,14 @@ class ProxyChatThreadClient {
|
|
15278
15307
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
15279
15308
|
}
|
15280
15309
|
case 'getMessage': {
|
15281
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15310
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15282
15311
|
const message = yield chatThreadClient.getMessage(...args);
|
15283
15312
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
15284
15313
|
return message;
|
15285
15314
|
}), 'ChatThreadClient.getMessage');
|
15286
15315
|
}
|
15287
15316
|
case 'sendMessage': {
|
15288
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15317
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15289
15318
|
// Retry logic?
|
15290
15319
|
const [request, options] = args;
|
15291
15320
|
const { content } = request;
|
@@ -15325,7 +15354,7 @@ class ProxyChatThreadClient {
|
|
15325
15354
|
}), 'ChatThreadClient.sendMessage');
|
15326
15355
|
}
|
15327
15356
|
case 'addParticipants': {
|
15328
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15357
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15329
15358
|
const result = yield chatThreadClient.addParticipants(...args);
|
15330
15359
|
const [addRequest] = args;
|
15331
15360
|
const participantsToAdd = addRequest.participants;
|
@@ -15334,7 +15363,7 @@ class ProxyChatThreadClient {
|
|
15334
15363
|
}), 'ChatThreadClient.addParticipants');
|
15335
15364
|
}
|
15336
15365
|
case 'deleteMessage': {
|
15337
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15366
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15338
15367
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
15339
15368
|
const [messageId] = args;
|
15340
15369
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -15352,12 +15381,12 @@ class ProxyChatThreadClient {
|
|
15352
15381
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
15353
15382
|
}
|
15354
15383
|
case 'sendTypingNotification': {
|
15355
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15384
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15356
15385
|
return yield chatThreadClient.sendTypingNotification(...args);
|
15357
15386
|
}), 'ChatThreadClient.sendTypingNotification');
|
15358
15387
|
}
|
15359
15388
|
case 'removeParticipant': {
|
15360
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15389
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15361
15390
|
const result = yield chatThreadClient.removeParticipant(...args);
|
15362
15391
|
const [removeIdentifier] = args;
|
15363
15392
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -15365,7 +15394,7 @@ class ProxyChatThreadClient {
|
|
15365
15394
|
}), 'ChatThreadClient.removeParticipant');
|
15366
15395
|
}
|
15367
15396
|
case 'updateMessage': {
|
15368
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15397
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15369
15398
|
const result = yield chatThreadClient.updateMessage(...args);
|
15370
15399
|
const [messageId, updateOption] = args;
|
15371
15400
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -15373,7 +15402,7 @@ class ProxyChatThreadClient {
|
|
15373
15402
|
}), 'ChatThreadClient.updateMessage');
|
15374
15403
|
}
|
15375
15404
|
case 'updateTopic': {
|
15376
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15405
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15377
15406
|
const result = yield chatThreadClient.updateTopic(...args);
|
15378
15407
|
const [topic] = args;
|
15379
15408
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -15381,7 +15410,7 @@ class ProxyChatThreadClient {
|
|
15381
15410
|
}), 'ChatThreadClient.updateTopic');
|
15382
15411
|
}
|
15383
15412
|
case 'getProperties': {
|
15384
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15413
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15385
15414
|
const result = yield chatThreadClient.getProperties(...args);
|
15386
15415
|
this._context.updateThread(chatThreadClient.threadId, result);
|
15387
15416
|
return result;
|
@@ -15418,7 +15447,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
15418
15447
|
|
15419
15448
|
// Copyright (c) Microsoft Corporation.
|
15420
15449
|
// Licensed under the MIT license.
|
15421
|
-
var __awaiter$
|
15450
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15422
15451
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15423
15452
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15424
15453
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15437,7 +15466,7 @@ const proxyChatClient = {
|
|
15437
15466
|
switch (prop) {
|
15438
15467
|
case 'createChatThread': {
|
15439
15468
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15440
|
-
return __awaiter$
|
15469
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15441
15470
|
const result = yield chatClient.createChatThread(...args);
|
15442
15471
|
const thread = result.chatThread;
|
15443
15472
|
if (thread) {
|
@@ -15450,7 +15479,7 @@ const proxyChatClient = {
|
|
15450
15479
|
}
|
15451
15480
|
case 'deleteChatThread': {
|
15452
15481
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15453
|
-
return __awaiter$
|
15482
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15454
15483
|
const result = yield chatClient.deleteChatThread(...args);
|
15455
15484
|
context.deleteThread(args[0]);
|
15456
15485
|
return result;
|
@@ -15470,7 +15499,7 @@ const proxyChatClient = {
|
|
15470
15499
|
}
|
15471
15500
|
case 'startRealtimeNotifications': {
|
15472
15501
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15473
|
-
return __awaiter$
|
15502
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15474
15503
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
15475
15504
|
if (!receiver.eventSubscriber) {
|
15476
15505
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -15481,7 +15510,7 @@ const proxyChatClient = {
|
|
15481
15510
|
}
|
15482
15511
|
case 'stopRealtimeNotifications': {
|
15483
15512
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15484
|
-
return __awaiter$
|
15513
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15485
15514
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
15486
15515
|
if (receiver.eventSubscriber) {
|
15487
15516
|
receiver.eventSubscriber.unsubscribe();
|
@@ -15919,6 +15948,16 @@ const uploadFileButtonStringTrampoline = () => {
|
|
15919
15948
|
};
|
15920
15949
|
|
15921
15950
|
// Copyright (c) Microsoft Corporation.
|
15951
|
+
// Licensed under the MIT license.
|
15952
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15953
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15954
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
15955
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
15956
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
15957
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
15958
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
15959
|
+
});
|
15960
|
+
};
|
15922
15961
|
/* @conditional-compile-remove(file-sharing) */
|
15923
15962
|
/**
|
15924
15963
|
* @internal
|
@@ -15964,9 +16003,10 @@ class FileUploadContext {
|
|
15964
16003
|
* @internal
|
15965
16004
|
*/
|
15966
16005
|
class AzureCommunicationFileUploadAdapter {
|
15967
|
-
constructor(chatContext) {
|
16006
|
+
constructor(chatContext, getAuthToken) {
|
15968
16007
|
this.fileUploads = [];
|
15969
16008
|
this.context = new FileUploadContext(chatContext);
|
16009
|
+
this.getAuthToken = getAuthToken;
|
15970
16010
|
}
|
15971
16011
|
findFileUpload(id) {
|
15972
16012
|
return this.fileUploads.find((fileUpload) => fileUpload.id === id);
|
@@ -16026,6 +16066,24 @@ class AzureCommunicationFileUploadAdapter {
|
|
16026
16066
|
updateFileUploadMetadata(id, metadata) {
|
16027
16067
|
this.context.updateFileUpload(id, { progress: 1, metadata });
|
16028
16068
|
}
|
16069
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
16070
|
+
downloadAuthenticatedAttachment(attachmentUrl) {
|
16071
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
16072
|
+
function fetchWithAuthentication(url, token) {
|
16073
|
+
const headers = new Headers();
|
16074
|
+
headers.append('Authorization', `Bearer ${token}`);
|
16075
|
+
return fetch(url, { headers });
|
16076
|
+
}
|
16077
|
+
if (!this.getAuthToken) {
|
16078
|
+
return '';
|
16079
|
+
}
|
16080
|
+
// ToDo InlineAttachments: If GET fails might need to send failure up to contoso
|
16081
|
+
const token = yield this.getAuthToken();
|
16082
|
+
const response = yield fetchWithAuthentication(attachmentUrl !== null && attachmentUrl !== void 0 ? attachmentUrl : '', token);
|
16083
|
+
const blob = yield response.blob();
|
16084
|
+
return URL.createObjectURL(blob);
|
16085
|
+
});
|
16086
|
+
}
|
16029
16087
|
subscribeAllEvents(fileUpload) {
|
16030
16088
|
fileUpload.on('uploadProgressChange', this.updateFileUploadProgress.bind(this));
|
16031
16089
|
fileUpload.on('uploadComplete', this.updateFileUploadMetadata.bind(this));
|
@@ -16539,6 +16597,8 @@ class AzureCommunicationChatAdapter {
|
|
16539
16597
|
this.updateFileUploadErrorMessage = this.updateFileUploadErrorMessage.bind(this);
|
16540
16598
|
/* @conditional-compile-remove(file-sharing) */
|
16541
16599
|
this.updateFileUploadMetadata = this.updateFileUploadMetadata.bind(this);
|
16600
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
16601
|
+
this.downloadAuthenticatedAttachment = this.downloadAuthenticatedAttachment.bind(this);
|
16542
16602
|
}
|
16543
16603
|
dispose() {
|
16544
16604
|
this.unsubscribeAllEvents();
|
@@ -16675,6 +16735,15 @@ class AzureCommunicationChatAdapter {
|
|
16675
16735
|
updateFileUploadMetadata(id, metadata) {
|
16676
16736
|
this.fileUploadAdapter.updateFileUploadMetadata(id, metadata);
|
16677
16737
|
}
|
16738
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
16739
|
+
downloadAuthenticatedAttachment(attachmentUrl) {
|
16740
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16741
|
+
if (!this.fileUploadAdapter.downloadAuthenticatedAttachment) {
|
16742
|
+
return '';
|
16743
|
+
}
|
16744
|
+
return yield this.fileUploadAdapter.downloadAuthenticatedAttachment(attachmentUrl);
|
16745
|
+
});
|
16746
|
+
}
|
16678
16747
|
messageReceivedListener(event) {
|
16679
16748
|
const message = convertEventToChatMessage(event);
|
16680
16749
|
this.emitter.emit('messageReceived', { message });
|
@@ -17799,15 +17868,15 @@ const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
|
17799
17868
|
}),
|
17800
17869
|
/* @conditional-compile-remove(video-background-effects) */
|
17801
17870
|
onRemoveVideoBackgroundEffects: () => __awaiter$b(void 0, void 0, void 0, function* () {
|
17802
|
-
|
17871
|
+
return yield adapter.stopVideoBackgroundEffect();
|
17803
17872
|
}),
|
17804
17873
|
/* @conditional-compile-remove(video-background-effects) */
|
17805
|
-
onBlurVideoBackground: () => __awaiter$b(void 0, void 0, void 0, function* () {
|
17806
|
-
|
17874
|
+
onBlurVideoBackground: (bgBlurConfig) => __awaiter$b(void 0, void 0, void 0, function* () {
|
17875
|
+
return yield adapter.blurVideoBackground(bgBlurConfig);
|
17807
17876
|
}),
|
17808
17877
|
/* @conditional-compile-remove(video-background-effects) */
|
17809
|
-
onReplaceVideoBackground: () => __awaiter$b(void 0, void 0, void 0, function* () {
|
17810
|
-
|
17878
|
+
onReplaceVideoBackground: (bgReplacementConfig) => __awaiter$b(void 0, void 0, void 0, function* () {
|
17879
|
+
return yield adapter.replaceVideoBackground(bgReplacementConfig);
|
17811
17880
|
})
|
17812
17881
|
}));
|
17813
17882
|
|
@@ -20782,7 +20851,7 @@ const ConfigurationPage = (props) => {
|
|
20782
20851
|
}
|
20783
20852
|
}
|
20784
20853
|
const locale = useLocale();
|
20785
|
-
const title = (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop }, locale.strings.call.configurationPageTitle));
|
20854
|
+
const title = (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop, role: "heading", "aria-level": 1 }, locale.strings.call.configurationPageTitle));
|
20786
20855
|
const callDescription = locale.strings.call.configurationPageCallDetails && (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop }, locale.strings.call.configurationPageCallDetails));
|
20787
20856
|
let mobileWithPreview = mobileView;
|
20788
20857
|
/* @conditional-compile-remove(rooms) */
|
@@ -21618,6 +21687,7 @@ class CallContext {
|
|
21618
21687
|
/* @conditional-compile-remove(unsupported-browser) */ environmentInfo: clientState.environmentInfo,
|
21619
21688
|
/* @conditional-compile-remove(unsupported-browser) */ unsupportedBrowserVersionsAllowed: false,
|
21620
21689
|
/* @conditional-compile-remove(rooms) */ roleHint: options === null || options === void 0 ? void 0 : options.roleHint,
|
21690
|
+
/* @conditional-compile-remove(video-background-effects) */ videoBackgroundImages: options === null || options === void 0 ? void 0 : options.videoBackgroundImages,
|
21621
21691
|
cameraStatus: undefined
|
21622
21692
|
};
|
21623
21693
|
this.emitter.setMaxListeners((_b = options === null || options === void 0 ? void 0 : options.maxListeners) !== null && _b !== void 0 ? _b : 50);
|
@@ -21801,6 +21871,12 @@ class AzureCommunicationCallAdapter {
|
|
21801
21871
|
this.sendDtmfTone.bind(this);
|
21802
21872
|
/* @conditional-compile-remove(unsupported-browser) */
|
21803
21873
|
this.allowUnsupportedBrowserVersion.bind(this);
|
21874
|
+
/* @conditional-compile-remove(video-background-effects) */
|
21875
|
+
this.blurVideoBackground.bind(this);
|
21876
|
+
/* @conditional-compile-remove(video-background-effects) */
|
21877
|
+
this.replaceVideoBackground.bind(this);
|
21878
|
+
/* @conditional-compile-remove(video-background-effects) */
|
21879
|
+
this.stopVideoBackgroundEffect.bind(this);
|
21804
21880
|
}
|
21805
21881
|
dispose() {
|
21806
21882
|
this.resetDiagnosticsForwarder();
|
@@ -22009,6 +22085,24 @@ class AzureCommunicationCallAdapter {
|
|
22009
22085
|
this.context.setAllowedUnsupportedBrowser();
|
22010
22086
|
this.context.updateClientState(this.callClient.getState());
|
22011
22087
|
}
|
22088
|
+
/* @conditional-compile-remove(video-background-effects) */
|
22089
|
+
blurVideoBackground(bgBlurConfig) {
|
22090
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
22091
|
+
yield this.handlers.onBlurVideoBackground(bgBlurConfig);
|
22092
|
+
});
|
22093
|
+
}
|
22094
|
+
/* @conditional-compile-remove(video-background-effects) */
|
22095
|
+
replaceVideoBackground(bgReplacementConfig) {
|
22096
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
22097
|
+
yield this.handlers.onReplaceVideoBackground(bgReplacementConfig);
|
22098
|
+
});
|
22099
|
+
}
|
22100
|
+
/* @conditional-compile-remove(video-background-effects) */
|
22101
|
+
stopVideoBackgroundEffect() {
|
22102
|
+
return __awaiter$4(this, void 0, void 0, function* () {
|
22103
|
+
yield this.handlers.onRemoveVideoBackgroundEffects();
|
22104
|
+
});
|
22105
|
+
}
|
22012
22106
|
startCall(participants, options) {
|
22013
22107
|
var _a, _b;
|
22014
22108
|
if (_isInCall((_b = (_a = this.getState().call) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : 'None')) {
|
@@ -23108,6 +23202,24 @@ class CallWithChatBackedCallAdapter {
|
|
23108
23202
|
allowUnsupportedBrowserVersion() {
|
23109
23203
|
return this.callWithChatAdapter.allowUnsupportedBrowserVersion();
|
23110
23204
|
}
|
23205
|
+
/* @conditional-compile-remove(video-background-effects) */
|
23206
|
+
blurVideoBackground(bgBlurConfig) {
|
23207
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
23208
|
+
yield this.callWithChatAdapter.blurVideoBackground(bgBlurConfig);
|
23209
|
+
});
|
23210
|
+
}
|
23211
|
+
/* @conditional-compile-remove(video-background-effects) */
|
23212
|
+
replaceVideoBackground(bgReplacementConfig) {
|
23213
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
23214
|
+
yield this.callWithChatAdapter.replaceVideoBackground(bgReplacementConfig);
|
23215
|
+
});
|
23216
|
+
}
|
23217
|
+
/* @conditional-compile-remove(video-background-effects) */
|
23218
|
+
stopVideoBackgroundEffect() {
|
23219
|
+
return __awaiter$3(this, void 0, void 0, function* () {
|
23220
|
+
yield this.callWithChatAdapter.stopVideoBackgroundEffect();
|
23221
|
+
});
|
23222
|
+
}
|
23111
23223
|
}
|
23112
23224
|
function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState) {
|
23113
23225
|
return {
|
@@ -23931,6 +24043,12 @@ class AzureCommunicationCallWithChatAdapter {
|
|
23931
24043
|
this.sendDtmfTone.bind(this);
|
23932
24044
|
/* @conditional-compile-remove(unsupported-browser) */
|
23933
24045
|
this.allowUnsupportedBrowserVersion.bind(this);
|
24046
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24047
|
+
this.blurVideoBackground.bind(this);
|
24048
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24049
|
+
this.replaceVideoBackground.bind(this);
|
24050
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24051
|
+
this.stopVideoBackgroundEffect.bind(this);
|
23934
24052
|
}
|
23935
24053
|
/** Join existing Call. */
|
23936
24054
|
joinCall(microphoneOn) {
|
@@ -24147,6 +24265,24 @@ class AzureCommunicationCallWithChatAdapter {
|
|
24147
24265
|
allowUnsupportedBrowserVersion() {
|
24148
24266
|
return this.callAdapter.allowUnsupportedBrowserVersion();
|
24149
24267
|
}
|
24268
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24269
|
+
blurVideoBackground(bgBlurConfig) {
|
24270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24271
|
+
yield this.callAdapter.blurVideoBackground(bgBlurConfig);
|
24272
|
+
});
|
24273
|
+
}
|
24274
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24275
|
+
replaceVideoBackground(bgReplacementConfig) {
|
24276
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24277
|
+
yield this.callAdapter.replaceVideoBackground(bgReplacementConfig);
|
24278
|
+
});
|
24279
|
+
}
|
24280
|
+
/* @conditional-compile-remove(video-background-effects) */
|
24281
|
+
stopVideoBackgroundEffect() {
|
24282
|
+
return __awaiter(this, void 0, void 0, function* () {
|
24283
|
+
return yield this.callAdapter.stopVideoBackgroundEffect();
|
24284
|
+
});
|
24285
|
+
}
|
24150
24286
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
24151
24287
|
on(event, listener) {
|
24152
24288
|
switch (event) {
|