@azure/communication-react 1.5.1-alpha-202304120012 → 1.5.1-alpha-202304130012
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 +2 -2
- package/dist/dist-cjs/communication-react/index.js +156 -168
- 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-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +3 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +38 -15
- 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 +1 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -29
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -10
- package/dist/dist-esm/react-composites/src/composites/common/icons.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-202304130012';
|
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 = (backgroundBlurConfig) => __awaiter$
|
797
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __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 = (backgroundReplacementConfig) => __awaiter$
|
805
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __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) {
|
@@ -846,7 +846,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
846
846
|
|
847
847
|
// Copyright (c) Microsoft Corporation.
|
848
848
|
// Licensed under the MIT license.
|
849
|
-
var __awaiter$
|
849
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
850
850
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
851
851
|
return new (P || (P = Promise))(function (resolve, reject) {
|
852
852
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -873,7 +873,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
873
873
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
874
874
|
},
|
875
875
|
/* @conditional-compile-remove(PSTN-calls) */
|
876
|
-
onAddParticipant: (userId, options) => __awaiter$
|
876
|
+
onAddParticipant: (userId, options) => __awaiter$D(void 0, void 0, void 0, function* () {
|
877
877
|
const participant = _toCommunicationIdentifier(userId);
|
878
878
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
879
879
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -881,7 +881,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
881
881
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
882
882
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
883
883
|
}
|
884
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
884
|
+
}), onRemoveParticipant: (userId) => __awaiter$D(void 0, void 0, void 0, function* () {
|
885
885
|
const participant = _toCommunicationIdentifier(userId);
|
886
886
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
887
887
|
}) });
|
@@ -889,7 +889,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
889
889
|
|
890
890
|
// Copyright (c) Microsoft Corporation.
|
891
891
|
// Licensed under the MIT license.
|
892
|
-
var __awaiter$
|
892
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
893
893
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
894
894
|
return new (P || (P = Promise))(function (resolve, reject) {
|
895
895
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -921,7 +921,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
921
921
|
},
|
922
922
|
/* @conditional-compile-remove(teams-identity-support) */
|
923
923
|
/* @conditional-compile-remove(PSTN-calls) */
|
924
|
-
onAddParticipant: (userId, options) => __awaiter$
|
924
|
+
onAddParticipant: (userId, options) => __awaiter$C(void 0, void 0, void 0, function* () {
|
925
925
|
const participant = _toCommunicationIdentifier(userId);
|
926
926
|
/* @conditional-compile-remove(teams-identity-support) */
|
927
927
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -934,7 +934,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
934
934
|
}
|
935
935
|
/* @conditional-compile-remove(teams-identity-support) */
|
936
936
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
937
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
937
|
+
}), onRemoveParticipant: (userId) => __awaiter$C(void 0, void 0, void 0, function* () {
|
938
938
|
const participant = _toCommunicationIdentifier(userId);
|
939
939
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
940
940
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -946,7 +946,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
946
946
|
|
947
947
|
// Copyright (c) Microsoft Corporation.
|
948
948
|
// Licensed under the MIT license.
|
949
|
-
var __awaiter$
|
949
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
950
950
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
951
951
|
return new (P || (P = Promise))(function (resolve, reject) {
|
952
952
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -995,13 +995,13 @@ class ProxyDeviceManager {
|
|
995
995
|
this.selectCamera = (videoDeviceInfo) => {
|
996
996
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
997
997
|
};
|
998
|
-
this.videoDevicesUpdated = () => __awaiter$
|
998
|
+
this.videoDevicesUpdated = () => __awaiter$B(this, void 0, void 0, function* () {
|
999
999
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1000
1000
|
// We don't want to show that in the UI.
|
1001
1001
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1002
1002
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1003
1003
|
});
|
1004
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1004
|
+
this.audioDevicesUpdated = () => __awaiter$B(this, void 0, void 0, function* () {
|
1005
1005
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1006
1006
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1007
1007
|
});
|
@@ -1204,7 +1204,7 @@ class CallIdHistory {
|
|
1204
1204
|
|
1205
1205
|
// Copyright (c) Microsoft Corporation.
|
1206
1206
|
// Licensed under the MIT license.
|
1207
|
-
var __awaiter$
|
1207
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1208
1208
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1209
1209
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1210
1210
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1788,7 +1788,7 @@ class CallContext$2 {
|
|
1788
1788
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
1789
1789
|
*/
|
1790
1790
|
withAsyncErrorTeedToState(action, target) {
|
1791
|
-
return (...args) => __awaiter$
|
1791
|
+
return (...args) => __awaiter$A(this, void 0, void 0, function* () {
|
1792
1792
|
try {
|
1793
1793
|
return yield action(...args);
|
1794
1794
|
}
|
@@ -2315,7 +2315,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
2315
2315
|
|
2316
2316
|
// Copyright (c) Microsoft Corporation.
|
2317
2317
|
// Licensed under the MIT license.
|
2318
|
-
var __awaiter$
|
2318
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2319
2319
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2320
2320
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2321
2321
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2325,7 +2325,7 @@ var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
2325
2325
|
});
|
2326
2326
|
};
|
2327
2327
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
2328
|
-
return __awaiter$
|
2328
|
+
return __awaiter$z(this, void 0, void 0, function* () {
|
2329
2329
|
// we can only have 3 types of createView
|
2330
2330
|
let streamEventType;
|
2331
2331
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -2447,7 +2447,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
2447
2447
|
});
|
2448
2448
|
}
|
2449
2449
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
2450
|
-
return __awaiter$
|
2450
|
+
return __awaiter$z(this, void 0, void 0, function* () {
|
2451
2451
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
2452
2452
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
2453
2453
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -2615,7 +2615,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
2615
2615
|
// Render LocalVideoStream that is not part of a Call
|
2616
2616
|
// 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).
|
2617
2617
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
2618
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
2618
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$z(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
2619
2619
|
}
|
2620
2620
|
else {
|
2621
2621
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -3049,7 +3049,7 @@ class CallSubscriber {
|
|
3049
3049
|
|
3050
3050
|
// Copyright (c) Microsoft Corporation.
|
3051
3051
|
// Licensed under the MIT license.
|
3052
|
-
var __awaiter$
|
3052
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3053
3053
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3054
3054
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3055
3055
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3069,14 +3069,14 @@ class ProxyIncomingCall {
|
|
3069
3069
|
switch (prop) {
|
3070
3070
|
case 'accept': {
|
3071
3071
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3072
|
-
return __awaiter$
|
3072
|
+
return __awaiter$y(this, void 0, void 0, function* () {
|
3073
3073
|
return yield target.accept(...args);
|
3074
3074
|
});
|
3075
3075
|
}, 'IncomingCall.accept');
|
3076
3076
|
}
|
3077
3077
|
case 'reject': {
|
3078
3078
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3079
|
-
return __awaiter$
|
3079
|
+
return __awaiter$y(this, void 0, void 0, function* () {
|
3080
3080
|
return yield target.reject(...args);
|
3081
3081
|
});
|
3082
3082
|
}, 'IncomingCall.reject');
|
@@ -3313,7 +3313,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
3313
3313
|
|
3314
3314
|
// Copyright (c) Microsoft Corporation.
|
3315
3315
|
// Licensed under the MIT license.
|
3316
|
-
var __awaiter$
|
3316
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3317
3317
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3318
3318
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3319
3319
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3339,56 +3339,56 @@ class ProxyCallCommon {
|
|
3339
3339
|
switch (prop) {
|
3340
3340
|
case 'mute': {
|
3341
3341
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3342
|
-
return __awaiter$
|
3342
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3343
3343
|
return yield target.mute(...args);
|
3344
3344
|
});
|
3345
3345
|
}, 'Call.mute');
|
3346
3346
|
}
|
3347
3347
|
case 'unmute': {
|
3348
3348
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3349
|
-
return __awaiter$
|
3349
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3350
3350
|
return yield target.unmute(...args);
|
3351
3351
|
});
|
3352
3352
|
}, 'Call.unmute');
|
3353
3353
|
}
|
3354
3354
|
case 'startVideo': {
|
3355
3355
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3356
|
-
return __awaiter$
|
3356
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3357
3357
|
return yield target.startVideo(...args);
|
3358
3358
|
});
|
3359
3359
|
}, 'Call.startVideo');
|
3360
3360
|
}
|
3361
3361
|
case 'stopVideo': {
|
3362
3362
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3363
|
-
return __awaiter$
|
3363
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3364
3364
|
return yield target.stopVideo(...args);
|
3365
3365
|
});
|
3366
3366
|
}, 'Call.stopVideo');
|
3367
3367
|
}
|
3368
3368
|
case 'startScreenSharing': {
|
3369
3369
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3370
|
-
return __awaiter$
|
3370
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3371
3371
|
return yield target.startScreenSharing(...args);
|
3372
3372
|
});
|
3373
3373
|
}, 'Call.startScreenSharing');
|
3374
3374
|
}
|
3375
3375
|
case 'stopScreenSharing': {
|
3376
3376
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3377
|
-
return __awaiter$
|
3377
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3378
3378
|
return yield target.stopScreenSharing(...args);
|
3379
3379
|
});
|
3380
3380
|
}, 'Call.stopScreenSharing');
|
3381
3381
|
}
|
3382
3382
|
case 'hold': {
|
3383
3383
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3384
|
-
return __awaiter$
|
3384
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3385
3385
|
return yield target.hold(...args);
|
3386
3386
|
});
|
3387
3387
|
}, 'Call.hold');
|
3388
3388
|
}
|
3389
3389
|
case 'resume': {
|
3390
3390
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3391
|
-
return __awaiter$
|
3391
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3392
3392
|
return yield target.resume(...args);
|
3393
3393
|
});
|
3394
3394
|
}, 'Call.resume');
|
@@ -3401,7 +3401,7 @@ class ProxyCallCommon {
|
|
3401
3401
|
|
3402
3402
|
// Copyright (c) Microsoft Corporation.
|
3403
3403
|
// Licensed under the MIT license.
|
3404
|
-
var __awaiter$
|
3404
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3405
3405
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3406
3406
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3407
3407
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3415,7 +3415,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
3415
3415
|
switch (prop) {
|
3416
3416
|
case 'addParticipant': {
|
3417
3417
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
3418
|
-
return __awaiter$
|
3418
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3419
3419
|
return yield target.addParticipant(...args);
|
3420
3420
|
});
|
3421
3421
|
}, 'Call.addParticipant');
|
@@ -3636,7 +3636,7 @@ class InternalCallContext {
|
|
3636
3636
|
|
3637
3637
|
// Copyright (c) Microsoft Corporation.
|
3638
3638
|
// Licensed under the MIT license.
|
3639
|
-
var __awaiter$
|
3639
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3640
3640
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3641
3641
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3642
3642
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3651,7 +3651,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
3651
3651
|
switch (prop) {
|
3652
3652
|
case 'addParticipant': {
|
3653
3653
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
3654
|
-
return __awaiter$
|
3654
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
3655
3655
|
return yield target.addParticipant(...args);
|
3656
3656
|
});
|
3657
3657
|
}, 'TeamsCall.addParticipant');
|
@@ -3766,7 +3766,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
3766
3766
|
|
3767
3767
|
// Copyright (c) Microsoft Corporation.
|
3768
3768
|
// Licensed under the MIT license.
|
3769
|
-
var __awaiter$
|
3769
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3770
3770
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3771
3771
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3772
3772
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3788,7 +3788,7 @@ class ProxyVideoStreamRendererView {
|
|
3788
3788
|
get(target, prop) {
|
3789
3789
|
switch (prop) {
|
3790
3790
|
case 'updateScalingMode': {
|
3791
|
-
return (...args) => __awaiter$
|
3791
|
+
return (...args) => __awaiter$u(this, void 0, void 0, function* () {
|
3792
3792
|
yield target.updateScalingMode(...args);
|
3793
3793
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
3794
3794
|
});
|
@@ -3809,7 +3809,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
3809
3809
|
|
3810
3810
|
// Copyright (c) Microsoft Corporation.
|
3811
3811
|
// Licensed under the MIT license.
|
3812
|
-
var __awaiter$
|
3812
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3813
3813
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3814
3814
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3815
3815
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3831,7 +3831,7 @@ class ProxyCallClient {
|
|
3831
3831
|
get(target, prop) {
|
3832
3832
|
switch (prop) {
|
3833
3833
|
case 'createCallAgent': {
|
3834
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
3834
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$t(this, void 0, void 0, function* () {
|
3835
3835
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
3836
3836
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
3837
3837
|
// callAgent if the createCallAgent succeeds.
|
@@ -3844,7 +3844,7 @@ class ProxyCallClient {
|
|
3844
3844
|
}), 'CallClient.createCallAgent');
|
3845
3845
|
}
|
3846
3846
|
case 'createTeamsCallAgent': {
|
3847
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
3847
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$t(this, void 0, void 0, function* () {
|
3848
3848
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
3849
3849
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
3850
3850
|
// callAgent if the createCallAgent succeeds.
|
@@ -3857,7 +3857,7 @@ class ProxyCallClient {
|
|
3857
3857
|
}), 'CallClient.createTeamsCallAgent');
|
3858
3858
|
}
|
3859
3859
|
case 'getDeviceManager': {
|
3860
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
3860
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$t(this, void 0, void 0, function* () {
|
3861
3861
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
3862
3862
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
3863
3863
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -3886,7 +3886,7 @@ class ProxyCallClient {
|
|
3886
3886
|
/**
|
3887
3887
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
3888
3888
|
*/
|
3889
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
3889
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$t(this, void 0, void 0, function* () {
|
3890
3890
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
3891
3891
|
this._context.setEnvironmentInfo(environmentInfo);
|
3892
3892
|
return environmentInfo;
|
@@ -3939,7 +3939,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
3939
3939
|
});
|
3940
3940
|
Object.defineProperty(callClient, 'createView', {
|
3941
3941
|
configurable: false,
|
3942
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
3942
|
+
value: (callId, participantId, stream, options) => __awaiter$t(void 0, void 0, void 0, function* () {
|
3943
3943
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
3944
3944
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
3945
3945
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -6941,7 +6941,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
6941
6941
|
return actionMenuProps;
|
6942
6942
|
};
|
6943
6943
|
|
6944
|
-
var __awaiter$
|
6944
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6945
6945
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6946
6946
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6947
6947
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6966,7 +6966,7 @@ const _FileDownloadCards = (props) => {
|
|
6966
6966
|
var _a, _b;
|
6967
6967
|
return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile) !== null && _b !== void 0 ? _b : localeStrings.downloadFile;
|
6968
6968
|
}, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile, localeStrings.downloadFile]);
|
6969
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
6969
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$s(void 0, void 0, void 0, function* () {
|
6970
6970
|
if (!props.downloadHandler) {
|
6971
6971
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
6972
6972
|
}
|
@@ -7135,7 +7135,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
7135
7135
|
|
7136
7136
|
// Copyright (c) Microsoft Corporation.
|
7137
7137
|
// Licensed under the MIT license.
|
7138
|
-
var __awaiter$
|
7138
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7139
7139
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7140
7140
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7141
7141
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7167,7 +7167,7 @@ const ChatMessageComponent = (props) => {
|
|
7167
7167
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
7168
7168
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
7169
7169
|
if (isEditing && message.messageType === 'chat') {
|
7170
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
7170
|
+
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* () {
|
7171
7171
|
props.onUpdateMessage &&
|
7172
7172
|
message.messageId &&
|
7173
7173
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
@@ -7278,7 +7278,7 @@ var getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
|
7278
7278
|
|
7279
7279
|
// Copyright (c) Microsoft Corporation.
|
7280
7280
|
// Licensed under the MIT license.
|
7281
|
-
var __awaiter$
|
7281
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7282
7282
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7283
7283
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7284
7284
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7498,7 +7498,7 @@ const MessageThread = (props) => {
|
|
7498
7498
|
/* @conditional-compile-remove(teams-inline-images) */
|
7499
7499
|
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
7500
7500
|
/* @conditional-compile-remove(teams-inline-images) */
|
7501
|
-
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$
|
7501
|
+
const onFetchInlineAttachment = React.useCallback((attachment) => __awaiter$q(void 0, void 0, void 0, function* () {
|
7502
7502
|
if (!onFetchAttachments || attachment.id in inlineAttachments) {
|
7503
7503
|
return;
|
7504
7504
|
}
|
@@ -7540,7 +7540,7 @@ const MessageThread = (props) => {
|
|
7540
7540
|
setChatMessagesInitialized(chatMessagesInitialized);
|
7541
7541
|
};
|
7542
7542
|
// we try to only send those message status if user is scrolled to the bottom.
|
7543
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
7543
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$q(void 0, void 0, void 0, function* () {
|
7544
7544
|
if (!isAtBottomOfScrollRef.current ||
|
7545
7545
|
!document.hasFocus() ||
|
7546
7546
|
!messagesRef.current ||
|
@@ -7591,7 +7591,7 @@ const MessageThread = (props) => {
|
|
7591
7591
|
setIsAtBottomOfScrollRef(atBottom);
|
7592
7592
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
7593
7593
|
// Infinite scrolling + threadInitialize function
|
7594
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
7594
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$q(void 0, void 0, void 0, function* () {
|
7595
7595
|
if (!isLoadingChatMessagesRef.current) {
|
7596
7596
|
if (onLoadPreviousChatMessages) {
|
7597
7597
|
isLoadingChatMessagesRef.current = true;
|
@@ -11922,7 +11922,7 @@ const DevicesButton = (props) => {
|
|
11922
11922
|
|
11923
11923
|
// Copyright (c) Microsoft Corporation.
|
11924
11924
|
// Licensed under the MIT license.
|
11925
|
-
var __awaiter$
|
11925
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11926
11926
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11927
11927
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11928
11928
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11960,7 +11960,7 @@ const CameraButton = (props) => {
|
|
11960
11960
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
11961
11961
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
11962
11962
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
11963
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
11963
|
+
const onToggleClick = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
11964
11964
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
11965
11965
|
if (onToggleCamera) {
|
11966
11966
|
setWaitForCamera(true);
|
@@ -12128,7 +12128,7 @@ const lightThemeCallButtonStyles = {
|
|
12128
12128
|
|
12129
12129
|
// Copyright (c) Microsoft Corporation.
|
12130
12130
|
// Licensed under the MIT license.
|
12131
|
-
var __awaiter$
|
12131
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12132
12132
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12133
12133
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12134
12134
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12169,7 +12169,7 @@ const MicrophoneButton = (props) => {
|
|
12169
12169
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
12170
12170
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
12171
12171
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
12172
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
12172
|
+
const onToggleClick = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
|
12173
12173
|
if (onToggleMicrophone) {
|
12174
12174
|
try {
|
12175
12175
|
yield onToggleMicrophone();
|
@@ -13057,7 +13057,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
13057
13057
|
|
13058
13058
|
// Copyright (c) Microsoft Corporation.
|
13059
13059
|
// Licensed under the MIT license.
|
13060
|
-
var __awaiter$
|
13060
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13061
13061
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13062
13062
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13063
13063
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13099,10 +13099,10 @@ const DialpadButton = (props) => {
|
|
13099
13099
|
const theme = react.useTheme();
|
13100
13100
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
13101
13101
|
const useLongPressProps = React__default['default'].useMemo(() => ({
|
13102
|
-
onClick: () => __awaiter$
|
13102
|
+
onClick: () => __awaiter$n(void 0, void 0, void 0, function* () {
|
13103
13103
|
onClick(digit, index);
|
13104
13104
|
}),
|
13105
|
-
onLongPress: () => __awaiter$
|
13105
|
+
onLongPress: () => __awaiter$n(void 0, void 0, void 0, function* () {
|
13106
13106
|
onLongPress(digit, index);
|
13107
13107
|
}),
|
13108
13108
|
touchEventsOnly: isMobile
|
@@ -14180,7 +14180,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
14180
14180
|
|
14181
14181
|
// Copyright (c) Microsoft Corporation.
|
14182
14182
|
// Licensed under the MIT license.
|
14183
|
-
var __awaiter$
|
14183
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14184
14184
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14185
14185
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14186
14186
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14203,35 +14203,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
14203
14203
|
let messageIterator = undefined;
|
14204
14204
|
let readReceiptIterator = undefined;
|
14205
14205
|
return {
|
14206
|
-
onSendMessage: (content, options) => __awaiter$
|
14206
|
+
onSendMessage: (content, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
14207
14207
|
const sendMessageRequest = {
|
14208
14208
|
content,
|
14209
14209
|
senderDisplayName: chatClient.getState().displayName
|
14210
14210
|
};
|
14211
14211
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
14212
14212
|
}),
|
14213
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
14213
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
14214
14214
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
14215
14215
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
14216
14216
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
14217
14217
|
}),
|
14218
|
-
onDeleteMessage: (messageId) => __awaiter$
|
14218
|
+
onDeleteMessage: (messageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
14219
14219
|
yield chatThreadClient.deleteMessage(messageId);
|
14220
14220
|
}),
|
14221
14221
|
// This handler is designed for chatThread to consume
|
14222
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
14222
|
+
onMessageSeen: (chatMessageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
14223
14223
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
14224
14224
|
}),
|
14225
|
-
onTyping: () => __awaiter$
|
14225
|
+
onTyping: () => __awaiter$m(void 0, void 0, void 0, function* () {
|
14226
14226
|
yield chatThreadClient.sendTypingNotification();
|
14227
14227
|
}),
|
14228
|
-
onRemoveParticipant: (userId) => __awaiter$
|
14228
|
+
onRemoveParticipant: (userId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
14229
14229
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
14230
14230
|
}),
|
14231
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
14231
|
+
updateThreadTopicName: (topicName) => __awaiter$m(void 0, void 0, void 0, function* () {
|
14232
14232
|
yield chatThreadClient.updateTopic(topicName);
|
14233
14233
|
}),
|
14234
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
14234
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$m(void 0, void 0, void 0, function* () {
|
14235
14235
|
var _a, _b, _c;
|
14236
14236
|
if (messageIterator === undefined) {
|
14237
14237
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -15003,7 +15003,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
15003
15003
|
|
15004
15004
|
// Copyright (c) Microsoft Corporation.
|
15005
15005
|
// Licensed under the MIT license.
|
15006
|
-
var __awaiter$
|
15006
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15007
15007
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15008
15008
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15009
15009
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15278,7 +15278,7 @@ class ChatContext$1 {
|
|
15278
15278
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
15279
15279
|
*/
|
15280
15280
|
withAsyncErrorTeedToState(f, target) {
|
15281
|
-
return (...args) => __awaiter$
|
15281
|
+
return (...args) => __awaiter$l(this, void 0, void 0, function* () {
|
15282
15282
|
try {
|
15283
15283
|
return yield f(...args);
|
15284
15284
|
}
|
@@ -15390,7 +15390,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
15390
15390
|
|
15391
15391
|
// Copyright (c) Microsoft Corporation.
|
15392
15392
|
// Licensed under the MIT license.
|
15393
|
-
var __awaiter$
|
15393
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15394
15394
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15395
15395
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15396
15396
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15475,7 +15475,7 @@ class EventSubscriber {
|
|
15475
15475
|
};
|
15476
15476
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
15477
15477
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
15478
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
15478
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$k(this, void 0, void 0, function* () {
|
15479
15479
|
var e_1, _a;
|
15480
15480
|
try {
|
15481
15481
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -15567,7 +15567,7 @@ class EventSubscriber {
|
|
15567
15567
|
|
15568
15568
|
// Copyright (c) Microsoft Corporation.
|
15569
15569
|
// Licensed under the MIT license.
|
15570
|
-
var __awaiter$
|
15570
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15571
15571
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15572
15572
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15573
15573
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15589,7 +15589,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
15589
15589
|
const threadsIterator = iteratorCreator(...args);
|
15590
15590
|
return {
|
15591
15591
|
next() {
|
15592
|
-
return __awaiter$
|
15592
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
15593
15593
|
const result = yield threadsIterator.next();
|
15594
15594
|
if (!result.done && result.value) {
|
15595
15595
|
decorateFn(result.value, context);
|
@@ -15604,7 +15604,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
15604
15604
|
const pages = threadsIterator.byPage(settings);
|
15605
15605
|
return {
|
15606
15606
|
next() {
|
15607
|
-
return __awaiter$
|
15607
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
15608
15608
|
const result = yield pages.next();
|
15609
15609
|
const page = result.value;
|
15610
15610
|
if (!result.done && result.value) {
|
@@ -15688,7 +15688,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
15688
15688
|
|
15689
15689
|
// Copyright (c) Microsoft Corporation.
|
15690
15690
|
// Licensed under the MIT license.
|
15691
|
-
var __awaiter$
|
15691
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15692
15692
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15693
15693
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15694
15694
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15707,14 +15707,14 @@ class ProxyChatThreadClient {
|
|
15707
15707
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
15708
15708
|
}
|
15709
15709
|
case 'getMessage': {
|
15710
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15710
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15711
15711
|
const message = yield chatThreadClient.getMessage(...args);
|
15712
15712
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
15713
15713
|
return message;
|
15714
15714
|
}), 'ChatThreadClient.getMessage');
|
15715
15715
|
}
|
15716
15716
|
case 'sendMessage': {
|
15717
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15717
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15718
15718
|
// Retry logic?
|
15719
15719
|
const [request, options] = args;
|
15720
15720
|
const { content } = request;
|
@@ -15754,7 +15754,7 @@ class ProxyChatThreadClient {
|
|
15754
15754
|
}), 'ChatThreadClient.sendMessage');
|
15755
15755
|
}
|
15756
15756
|
case 'addParticipants': {
|
15757
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15757
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15758
15758
|
const result = yield chatThreadClient.addParticipants(...args);
|
15759
15759
|
const [addRequest] = args;
|
15760
15760
|
const participantsToAdd = addRequest.participants;
|
@@ -15763,7 +15763,7 @@ class ProxyChatThreadClient {
|
|
15763
15763
|
}), 'ChatThreadClient.addParticipants');
|
15764
15764
|
}
|
15765
15765
|
case 'deleteMessage': {
|
15766
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15766
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15767
15767
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
15768
15768
|
const [messageId] = args;
|
15769
15769
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -15781,12 +15781,12 @@ class ProxyChatThreadClient {
|
|
15781
15781
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
15782
15782
|
}
|
15783
15783
|
case 'sendTypingNotification': {
|
15784
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15784
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15785
15785
|
return yield chatThreadClient.sendTypingNotification(...args);
|
15786
15786
|
}), 'ChatThreadClient.sendTypingNotification');
|
15787
15787
|
}
|
15788
15788
|
case 'removeParticipant': {
|
15789
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15789
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15790
15790
|
const result = yield chatThreadClient.removeParticipant(...args);
|
15791
15791
|
const [removeIdentifier] = args;
|
15792
15792
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -15794,7 +15794,7 @@ class ProxyChatThreadClient {
|
|
15794
15794
|
}), 'ChatThreadClient.removeParticipant');
|
15795
15795
|
}
|
15796
15796
|
case 'updateMessage': {
|
15797
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15797
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15798
15798
|
const result = yield chatThreadClient.updateMessage(...args);
|
15799
15799
|
const [messageId, updateOption] = args;
|
15800
15800
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -15802,7 +15802,7 @@ class ProxyChatThreadClient {
|
|
15802
15802
|
}), 'ChatThreadClient.updateMessage');
|
15803
15803
|
}
|
15804
15804
|
case 'updateTopic': {
|
15805
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15805
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15806
15806
|
const result = yield chatThreadClient.updateTopic(...args);
|
15807
15807
|
const [topic] = args;
|
15808
15808
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -15810,7 +15810,7 @@ class ProxyChatThreadClient {
|
|
15810
15810
|
}), 'ChatThreadClient.updateTopic');
|
15811
15811
|
}
|
15812
15812
|
case 'getProperties': {
|
15813
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15813
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
15814
15814
|
const result = yield chatThreadClient.getProperties(...args);
|
15815
15815
|
this._context.updateThread(chatThreadClient.threadId, result);
|
15816
15816
|
return result;
|
@@ -15847,7 +15847,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
15847
15847
|
|
15848
15848
|
// Copyright (c) Microsoft Corporation.
|
15849
15849
|
// Licensed under the MIT license.
|
15850
|
-
var __awaiter$
|
15850
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15851
15851
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15852
15852
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15853
15853
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15866,7 +15866,7 @@ const proxyChatClient = {
|
|
15866
15866
|
switch (prop) {
|
15867
15867
|
case 'createChatThread': {
|
15868
15868
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15869
|
-
return __awaiter$
|
15869
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15870
15870
|
const result = yield chatClient.createChatThread(...args);
|
15871
15871
|
const thread = result.chatThread;
|
15872
15872
|
if (thread) {
|
@@ -15879,7 +15879,7 @@ const proxyChatClient = {
|
|
15879
15879
|
}
|
15880
15880
|
case 'deleteChatThread': {
|
15881
15881
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15882
|
-
return __awaiter$
|
15882
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15883
15883
|
const result = yield chatClient.deleteChatThread(...args);
|
15884
15884
|
context.deleteThread(args[0]);
|
15885
15885
|
return result;
|
@@ -15899,7 +15899,7 @@ const proxyChatClient = {
|
|
15899
15899
|
}
|
15900
15900
|
case 'startRealtimeNotifications': {
|
15901
15901
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15902
|
-
return __awaiter$
|
15902
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15903
15903
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
15904
15904
|
if (!receiver.eventSubscriber) {
|
15905
15905
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -15910,7 +15910,7 @@ const proxyChatClient = {
|
|
15910
15910
|
}
|
15911
15911
|
case 'stopRealtimeNotifications': {
|
15912
15912
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15913
|
-
return __awaiter$
|
15913
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
15914
15914
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
15915
15915
|
if (receiver.eventSubscriber) {
|
15916
15916
|
receiver.eventSubscriber.unsubscribe();
|
@@ -16021,13 +16021,7 @@ class FileUpload {
|
|
16021
16021
|
}
|
16022
16022
|
|
16023
16023
|
// Copyright (c) Microsoft Corporation.
|
16024
|
-
const
|
16025
|
-
const coffeeIconStyle = {
|
16026
|
-
// Fluent wraps all icons with <i> so we must force the fontStyle back to normal.
|
16027
|
-
fontStyle: 'normal',
|
16028
|
-
// By default our icons are 20px x 20px (for 1rem = 16px), make this a bit bigger for lobby.
|
16029
|
-
fontSize: '2rem'
|
16030
|
-
};
|
16024
|
+
const SpinnerIcon = () => React__default['default'].createElement(react.Spinner, { size: react.SpinnerSize.large });
|
16031
16025
|
/**
|
16032
16026
|
* The default set of icons used by the composites directly (i.e. not via the components defined in this library).
|
16033
16027
|
*
|
@@ -16036,8 +16030,8 @@ const coffeeIconStyle = {
|
|
16036
16030
|
const COMPOSITE_ONLY_ICONS = {
|
16037
16031
|
ChevronLeft: undefined,
|
16038
16032
|
Link: undefined,
|
16039
|
-
LobbyScreenConnectingToCall: React__default['default'].createElement(
|
16040
|
-
LobbyScreenWaitingToBeAdmitted: React__default['default'].createElement(
|
16033
|
+
LobbyScreenConnectingToCall: React__default['default'].createElement(SpinnerIcon, null),
|
16034
|
+
LobbyScreenWaitingToBeAdmitted: React__default['default'].createElement(SpinnerIcon, null),
|
16041
16035
|
LocalDeviceSettingsCamera: React__default['default'].createElement(reactIcons.Video20Filled, null),
|
16042
16036
|
LocalDeviceSettingsMic: React__default['default'].createElement(reactIcons.Mic20Filled, null),
|
16043
16037
|
LocalDeviceSettingsSpeaker: React__default['default'].createElement(reactIcons.Speaker220Filled, null),
|
@@ -16352,16 +16346,6 @@ const uploadFileButtonStringTrampoline = () => {
|
|
16352
16346
|
};
|
16353
16347
|
|
16354
16348
|
// Copyright (c) Microsoft Corporation.
|
16355
|
-
// Licensed under the MIT license.
|
16356
|
-
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16357
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16358
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
16359
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
16360
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
16361
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
16362
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
16363
|
-
});
|
16364
|
-
};
|
16365
16349
|
/* @conditional-compile-remove(file-sharing) */
|
16366
16350
|
/**
|
16367
16351
|
* @internal
|
@@ -16407,10 +16391,9 @@ class FileUploadContext {
|
|
16407
16391
|
* @internal
|
16408
16392
|
*/
|
16409
16393
|
class AzureCommunicationFileUploadAdapter {
|
16410
|
-
constructor(chatContext
|
16394
|
+
constructor(chatContext) {
|
16411
16395
|
this.fileUploads = [];
|
16412
16396
|
this.context = new FileUploadContext(chatContext);
|
16413
|
-
this.getAuthToken = getAuthToken;
|
16414
16397
|
}
|
16415
16398
|
findFileUpload(id) {
|
16416
16399
|
return this.fileUploads.find((fileUpload) => fileUpload.id === id);
|
@@ -16470,24 +16453,6 @@ class AzureCommunicationFileUploadAdapter {
|
|
16470
16453
|
updateFileUploadMetadata(id, metadata) {
|
16471
16454
|
this.context.updateFileUpload(id, { progress: 1, metadata });
|
16472
16455
|
}
|
16473
|
-
/* @conditional-compile-remove(teams-inline-images) */
|
16474
|
-
downloadAuthenticatedAttachment(attachmentUrl) {
|
16475
|
-
return __awaiter$h(this, void 0, void 0, function* () {
|
16476
|
-
function fetchWithAuthentication(url, token) {
|
16477
|
-
const headers = new Headers();
|
16478
|
-
headers.append('Authorization', `Bearer ${token}`);
|
16479
|
-
return fetch(url, { headers });
|
16480
|
-
}
|
16481
|
-
if (!this.getAuthToken) {
|
16482
|
-
return '';
|
16483
|
-
}
|
16484
|
-
// ToDo InlineAttachments: If GET fails might need to send failure up to contoso
|
16485
|
-
const token = yield this.getAuthToken();
|
16486
|
-
const response = yield fetchWithAuthentication(attachmentUrl !== null && attachmentUrl !== void 0 ? attachmentUrl : '', token);
|
16487
|
-
const blob = yield response.blob();
|
16488
|
-
return URL.createObjectURL(blob);
|
16489
|
-
});
|
16490
|
-
}
|
16491
16456
|
subscribeAllEvents(fileUpload) {
|
16492
16457
|
fileUpload.on('uploadProgressChange', this.updateFileUploadProgress.bind(this));
|
16493
16458
|
fileUpload.on('uploadComplete', this.updateFileUploadMetadata.bind(this));
|
@@ -16971,25 +16936,19 @@ class ChatContext {
|
|
16971
16936
|
class AzureCommunicationChatAdapter {
|
16972
16937
|
constructor(chatClient, chatThreadClient,
|
16973
16938
|
/* @conditional-compile-remove(teams-inline-images) */ options) {
|
16939
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
16940
|
+
this.credential = undefined;
|
16974
16941
|
this.emitter = new EventEmitter__default['default']();
|
16975
16942
|
this.bindAllPublicMethods();
|
16976
16943
|
this.chatClient = chatClient;
|
16977
16944
|
this.chatThreadClient = chatThreadClient;
|
16978
16945
|
this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId);
|
16979
16946
|
/* @conditional-compile-remove(teams-inline-images) */
|
16980
|
-
|
16981
|
-
|
16982
|
-
let getAuthToken = undefined;
|
16983
|
-
/* @conditional-compile-remove(teams-inline-images) */
|
16984
|
-
if (credential) {
|
16985
|
-
/* @conditional-compile-remove(teams-inline-images) */
|
16986
|
-
getAuthToken = () => __awaiter$f(this, void 0, void 0, function* () {
|
16987
|
-
const accessToken = yield credential.getToken();
|
16988
|
-
return accessToken.token;
|
16989
|
-
});
|
16947
|
+
if (options && options.credential) {
|
16948
|
+
this.credential = options.credential;
|
16990
16949
|
}
|
16991
16950
|
/* @conditional-compile-remove(file-sharing) */ /* @conditional-compile-remove(teams-inline-images) */
|
16992
|
-
this.fileUploadAdapter = new AzureCommunicationFileUploadAdapter(this.context
|
16951
|
+
this.fileUploadAdapter = new AzureCommunicationFileUploadAdapter(this.context);
|
16993
16952
|
const onStateChange = (clientState) => {
|
16994
16953
|
// unsubscribe when the instance gets disposed
|
16995
16954
|
if (!this) {
|
@@ -17173,10 +17132,39 @@ class AzureCommunicationChatAdapter {
|
|
17173
17132
|
/* @conditional-compile-remove(teams-inline-images) */
|
17174
17133
|
downloadAuthenticatedAttachment(attachmentUrl) {
|
17175
17134
|
return __awaiter$f(this, void 0, void 0, function* () {
|
17176
|
-
|
17177
|
-
|
17178
|
-
|
17179
|
-
|
17135
|
+
return this.asyncTeeErrorToEventEmitter(() => __awaiter$f(this, void 0, void 0, function* () {
|
17136
|
+
if (this.credential === undefined) {
|
17137
|
+
const e = new Error();
|
17138
|
+
e['target'] = 'ChatThreadClient.getMessage';
|
17139
|
+
e['innerError'] = new Error('AccessToken is null');
|
17140
|
+
throw e;
|
17141
|
+
}
|
17142
|
+
const accessToken = yield this.credential.getToken();
|
17143
|
+
if (!accessToken) {
|
17144
|
+
const e = new Error();
|
17145
|
+
e['target'] = 'ChatThreadClient.getMessage';
|
17146
|
+
e['innerError'] = new Error('AccessToken is null');
|
17147
|
+
throw e;
|
17148
|
+
}
|
17149
|
+
function fetchWithAuthentication(url, token) {
|
17150
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
17151
|
+
const headers = new Headers();
|
17152
|
+
headers.append('Authorization', `Bearer ${token}`);
|
17153
|
+
try {
|
17154
|
+
return yield fetch(url, { headers });
|
17155
|
+
}
|
17156
|
+
catch (err) {
|
17157
|
+
const e = new Error();
|
17158
|
+
e['target'] = 'ChatThreadClient.getMessage';
|
17159
|
+
e['innerError'] = err;
|
17160
|
+
throw e;
|
17161
|
+
}
|
17162
|
+
});
|
17163
|
+
}
|
17164
|
+
const response = yield fetchWithAuthentication(attachmentUrl, accessToken.token);
|
17165
|
+
const blob = yield response.blob();
|
17166
|
+
return { blobUrl: URL.createObjectURL(blob) };
|
17167
|
+
}));
|
17180
17168
|
});
|
17181
17169
|
}
|
17182
17170
|
messageReceivedListener(event) {
|
@@ -22411,8 +22399,8 @@ const overlayContainerStyle = {
|
|
22411
22399
|
*/
|
22412
22400
|
const titleStyle = (palette, isVideoReady) => {
|
22413
22401
|
return {
|
22414
|
-
fontSize: '
|
22415
|
-
color: isVideoReady ? 'white' : palette.
|
22402
|
+
fontSize: '1rem',
|
22403
|
+
color: isVideoReady ? 'white' : palette.blue,
|
22416
22404
|
textAlign: 'center'
|
22417
22405
|
};
|
22418
22406
|
};
|
@@ -22420,8 +22408,8 @@ const titleStyle = (palette, isVideoReady) => {
|
|
22420
22408
|
* @private
|
22421
22409
|
*/
|
22422
22410
|
const moreDetailsStyle = (palette, isVideoReady) => ({
|
22423
|
-
fontSize: '
|
22424
|
-
color: isVideoReady ? 'white' : palette.
|
22411
|
+
fontSize: '0.75rem',
|
22412
|
+
color: isVideoReady ? 'white' : palette.blue,
|
22425
22413
|
textAlign: 'center'
|
22426
22414
|
});
|
22427
22415
|
|