@azure/communication-react 1.5.1-alpha-202303020021 → 1.5.1-alpha-202303040013
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 +4 -4
- package/dist/dist-cjs/communication-react/index.js +243 -173
- 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/Caption.d.ts +23 -0
- package/dist/dist-esm/react-components/src/components/Caption.js +46 -0
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +2 -2
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +19 -7
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js +3 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js +4 -2
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +14 -8
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +15 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +12 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/index.js +1 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +4 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +2 -2
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +16 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/package.json +8 -8
@@ -161,7 +161,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
161
161
|
// Copyright (c) Microsoft Corporation.
|
162
162
|
// Licensed under the MIT license.
|
163
163
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
164
|
-
var telemetryVersion = '1.5.1-alpha-
|
164
|
+
var telemetryVersion = '1.5.1-alpha-202303040013';
|
165
165
|
|
166
166
|
// Copyright (c) Microsoft Corporation.
|
167
167
|
/**
|
@@ -377,7 +377,7 @@ const getEnvironmentInfo = (state) => {
|
|
377
377
|
|
378
378
|
// Copyright (c) Microsoft Corporation.
|
379
379
|
// Licensed under the MIT license.
|
380
|
-
var __awaiter$
|
380
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
381
381
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
382
382
|
return new (P || (P = Promise))(function (resolve, reject) {
|
383
383
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -415,7 +415,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
415
415
|
*
|
416
416
|
* @private
|
417
417
|
*/
|
418
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
418
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$E(void 0, void 0, void 0, function* () {
|
419
419
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
420
420
|
for (const view of unparentedViews) {
|
421
421
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -548,7 +548,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
548
548
|
|
549
549
|
// Copyright (c) Microsoft Corporation.
|
550
550
|
// Licensed under the MIT license.
|
551
|
-
var __awaiter$
|
551
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
552
552
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
553
553
|
return new (P || (P = Promise))(function (resolve, reject) {
|
554
554
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -569,7 +569,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
569
569
|
* @private
|
570
570
|
*/
|
571
571
|
const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callClient, deviceManager, call) => {
|
572
|
-
const onStartLocalVideo = () => __awaiter$
|
572
|
+
const onStartLocalVideo = () => __awaiter$D(void 0, void 0, void 0, function* () {
|
573
573
|
// Before the call object creates a stream, dispose of any local preview streams.
|
574
574
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
575
575
|
// of disposing and creating a new stream?
|
@@ -589,7 +589,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
589
589
|
yield call.startVideo(stream);
|
590
590
|
}
|
591
591
|
});
|
592
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
592
|
+
const onStopLocalVideo = (stream) => __awaiter$D(void 0, void 0, void 0, function* () {
|
593
593
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
594
594
|
if (!callId) {
|
595
595
|
return;
|
@@ -598,7 +598,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
598
598
|
yield call.stopVideo(stream);
|
599
599
|
}
|
600
600
|
});
|
601
|
-
const onToggleCamera = (options) => __awaiter$
|
601
|
+
const onToggleCamera = (options) => __awaiter$D(void 0, void 0, void 0, function* () {
|
602
602
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
603
603
|
if (previewOn && call && call.state === 'Connecting') {
|
604
604
|
// This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
@@ -646,19 +646,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
646
646
|
}
|
647
647
|
}
|
648
648
|
});
|
649
|
-
const onSelectMicrophone = (device) => __awaiter$
|
649
|
+
const onSelectMicrophone = (device) => __awaiter$D(void 0, void 0, void 0, function* () {
|
650
650
|
if (!deviceManager) {
|
651
651
|
return;
|
652
652
|
}
|
653
653
|
return deviceManager.selectMicrophone(device);
|
654
654
|
});
|
655
|
-
const onSelectSpeaker = (device) => __awaiter$
|
655
|
+
const onSelectSpeaker = (device) => __awaiter$D(void 0, void 0, void 0, function* () {
|
656
656
|
if (!deviceManager) {
|
657
657
|
return;
|
658
658
|
}
|
659
659
|
return deviceManager.selectSpeaker(device);
|
660
660
|
});
|
661
|
-
const onSelectCamera = (device, options) => __awaiter$
|
661
|
+
const onSelectCamera = (device, options) => __awaiter$D(void 0, void 0, void 0, function* () {
|
662
662
|
if (!deviceManager) {
|
663
663
|
return;
|
664
664
|
}
|
@@ -681,19 +681,19 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
681
681
|
}, options);
|
682
682
|
}
|
683
683
|
});
|
684
|
-
const onToggleMicrophone = () => __awaiter$
|
684
|
+
const onToggleMicrophone = () => __awaiter$D(void 0, void 0, void 0, function* () {
|
685
685
|
if (!call || !_isInCall(call.state)) {
|
686
686
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
687
687
|
}
|
688
688
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
689
689
|
});
|
690
|
-
const onStartScreenShare = () => __awaiter$
|
691
|
-
const onStopScreenShare = () => __awaiter$
|
692
|
-
const onToggleScreenShare = () => __awaiter$
|
693
|
-
const onHangUp = (forEveryone) => __awaiter$
|
690
|
+
const onStartScreenShare = () => __awaiter$D(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
691
|
+
const onStopScreenShare = () => __awaiter$D(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
692
|
+
const onToggleScreenShare = () => __awaiter$D(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
693
|
+
const onHangUp = (forEveryone) => __awaiter$D(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
694
694
|
/* @conditional-compile-remove(PSTN-calls) */
|
695
|
-
const onToggleHold = () => __awaiter$
|
696
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
695
|
+
const onToggleHold = () => __awaiter$D(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()); });
|
696
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$D(void 0, void 0, void 0, function* () {
|
697
697
|
var _a;
|
698
698
|
if (!call || call.localVideoStreams.length === 0) {
|
699
699
|
return;
|
@@ -709,7 +709,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
709
709
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
710
710
|
return view ? { view } : undefined;
|
711
711
|
});
|
712
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
712
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$D(void 0, void 0, void 0, function* () {
|
713
713
|
if (!call) {
|
714
714
|
return;
|
715
715
|
}
|
@@ -740,7 +740,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
740
740
|
}
|
741
741
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
742
742
|
});
|
743
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
743
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$D(void 0, void 0, void 0, function* () {
|
744
744
|
if (!call) {
|
745
745
|
return;
|
746
746
|
}
|
@@ -761,7 +761,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
761
761
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
762
762
|
}
|
763
763
|
});
|
764
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
764
|
+
const onDisposeLocalStreamView = () => __awaiter$D(void 0, void 0, void 0, function* () {
|
765
765
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
766
766
|
const callState = call && callClient.getState().calls[call.id];
|
767
767
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -774,12 +774,12 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
774
774
|
yield disposeAllLocalPreviewViews(callClient);
|
775
775
|
});
|
776
776
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
777
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
777
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$D(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
778
778
|
const notImplemented = () => {
|
779
779
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
780
780
|
};
|
781
781
|
/* @conditional-compile-remove(call-readiness) */
|
782
|
-
const askDevicePermission = (constrain) => __awaiter$
|
782
|
+
const askDevicePermission = (constrain) => __awaiter$D(void 0, void 0, void 0, function* () {
|
783
783
|
if (deviceManager) {
|
784
784
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
785
785
|
}
|
@@ -813,7 +813,7 @@ const createDefaultCommonCallingHandlers = memoizeOne__default['default']((callC
|
|
813
813
|
|
814
814
|
// Copyright (c) Microsoft Corporation.
|
815
815
|
// Licensed under the MIT license.
|
816
|
-
var __awaiter$
|
816
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
817
817
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
818
818
|
return new (P || (P = Promise))(function (resolve, reject) {
|
819
819
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -840,7 +840,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
840
840
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
841
841
|
},
|
842
842
|
/* @conditional-compile-remove(PSTN-calls) */
|
843
|
-
onAddParticipant: (userId, options) => __awaiter$
|
843
|
+
onAddParticipant: (userId, options) => __awaiter$C(void 0, void 0, void 0, function* () {
|
844
844
|
const participant = _toCommunicationIdentifier(userId);
|
845
845
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
846
846
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -848,7 +848,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
848
848
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
849
849
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
850
850
|
}
|
851
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
851
|
+
}), onRemoveParticipant: (userId) => __awaiter$C(void 0, void 0, void 0, function* () {
|
852
852
|
const participant = _toCommunicationIdentifier(userId);
|
853
853
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
854
854
|
}) });
|
@@ -856,7 +856,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
856
856
|
|
857
857
|
// Copyright (c) Microsoft Corporation.
|
858
858
|
// Licensed under the MIT license.
|
859
|
-
var __awaiter$
|
859
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
860
860
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
861
861
|
return new (P || (P = Promise))(function (resolve, reject) {
|
862
862
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -888,7 +888,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
888
888
|
},
|
889
889
|
/* @conditional-compile-remove(teams-identity-support) */
|
890
890
|
/* @conditional-compile-remove(PSTN-calls) */
|
891
|
-
onAddParticipant: (userId, options) => __awaiter$
|
891
|
+
onAddParticipant: (userId, options) => __awaiter$B(void 0, void 0, void 0, function* () {
|
892
892
|
const participant = _toCommunicationIdentifier(userId);
|
893
893
|
/* @conditional-compile-remove(teams-identity-support) */
|
894
894
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -901,7 +901,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
901
901
|
}
|
902
902
|
/* @conditional-compile-remove(teams-identity-support) */
|
903
903
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
904
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
904
|
+
}), onRemoveParticipant: (userId) => __awaiter$B(void 0, void 0, void 0, function* () {
|
905
905
|
const participant = _toCommunicationIdentifier(userId);
|
906
906
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
907
907
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -913,7 +913,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne__default['default']((callCl
|
|
913
913
|
|
914
914
|
// Copyright (c) Microsoft Corporation.
|
915
915
|
// Licensed under the MIT license.
|
916
|
-
var __awaiter$
|
916
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
917
917
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
918
918
|
return new (P || (P = Promise))(function (resolve, reject) {
|
919
919
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -962,13 +962,13 @@ class ProxyDeviceManager {
|
|
962
962
|
this.selectCamera = (videoDeviceInfo) => {
|
963
963
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
964
964
|
};
|
965
|
-
this.videoDevicesUpdated = () => __awaiter$
|
965
|
+
this.videoDevicesUpdated = () => __awaiter$A(this, void 0, void 0, function* () {
|
966
966
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
967
967
|
// We don't want to show that in the UI.
|
968
968
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
969
969
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
970
970
|
});
|
971
|
-
this.audioDevicesUpdated = () => __awaiter$
|
971
|
+
this.audioDevicesUpdated = () => __awaiter$A(this, void 0, void 0, function* () {
|
972
972
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
973
973
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
974
974
|
});
|
@@ -1184,7 +1184,7 @@ class CallIdHistory {
|
|
1184
1184
|
|
1185
1185
|
// Copyright (c) Microsoft Corporation.
|
1186
1186
|
// Licensed under the MIT license.
|
1187
|
-
var __awaiter$
|
1187
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1188
1188
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1189
1189
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1190
1190
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1768,7 +1768,7 @@ class CallContext$2 {
|
|
1768
1768
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
1769
1769
|
*/
|
1770
1770
|
withAsyncErrorTeedToState(action, target) {
|
1771
|
-
return (...args) => __awaiter$
|
1771
|
+
return (...args) => __awaiter$z(this, void 0, void 0, function* () {
|
1772
1772
|
try {
|
1773
1773
|
return yield action(...args);
|
1774
1774
|
}
|
@@ -2100,7 +2100,7 @@ class RemoteVideoStreamSubscriber {
|
|
2100
2100
|
|
2101
2101
|
// Copyright (c) Microsoft Corporation.
|
2102
2102
|
// Licensed under the MIT license.
|
2103
|
-
var __awaiter$
|
2103
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2104
2104
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
2105
2105
|
return new (P || (P = Promise))(function (resolve, reject) {
|
2106
2106
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2110,7 +2110,7 @@ var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
2110
2110
|
});
|
2111
2111
|
};
|
2112
2112
|
function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
|
2113
|
-
return __awaiter$
|
2113
|
+
return __awaiter$y(this, void 0, void 0, function* () {
|
2114
2114
|
// Render RemoteVideoStream that is part of a Call
|
2115
2115
|
const streamId = stream.id;
|
2116
2116
|
const streamType = stream.mediaStreamType;
|
@@ -2237,7 +2237,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
2237
2237
|
});
|
2238
2238
|
}
|
2239
2239
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
2240
|
-
return __awaiter$
|
2240
|
+
return __awaiter$y(this, void 0, void 0, function* () {
|
2241
2241
|
// Render LocalVideoStream that is part of a Call
|
2242
2242
|
const renderInfo = internalContext.getLocalRenderInfo(callId);
|
2243
2243
|
const streamType = renderInfo === null || renderInfo === void 0 ? void 0 : renderInfo.stream.mediaStreamType;
|
@@ -2358,7 +2358,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
2358
2358
|
});
|
2359
2359
|
}
|
2360
2360
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
2361
|
-
return __awaiter$
|
2361
|
+
return __awaiter$y(this, void 0, void 0, function* () {
|
2362
2362
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
2363
2363
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
2364
2364
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -2643,7 +2643,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
2643
2643
|
// Render LocalVideoStream that is not part of a Call
|
2644
2644
|
// 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).
|
2645
2645
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
2646
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
2646
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$y(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
2647
2647
|
}
|
2648
2648
|
else {
|
2649
2649
|
_logEvent(callingStatefulLogger, {
|
@@ -3092,7 +3092,7 @@ class CallSubscriber {
|
|
3092
3092
|
|
3093
3093
|
// Copyright (c) Microsoft Corporation.
|
3094
3094
|
// Licensed under the MIT license.
|
3095
|
-
var __awaiter$
|
3095
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3096
3096
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3097
3097
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3098
3098
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3112,14 +3112,14 @@ class ProxyIncomingCall {
|
|
3112
3112
|
switch (prop) {
|
3113
3113
|
case 'accept': {
|
3114
3114
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3115
|
-
return __awaiter$
|
3115
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3116
3116
|
return yield target.accept(...args);
|
3117
3117
|
});
|
3118
3118
|
}, 'IncomingCall.accept');
|
3119
3119
|
}
|
3120
3120
|
case 'reject': {
|
3121
3121
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3122
|
-
return __awaiter$
|
3122
|
+
return __awaiter$x(this, void 0, void 0, function* () {
|
3123
3123
|
return yield target.reject(...args);
|
3124
3124
|
});
|
3125
3125
|
}, 'IncomingCall.reject');
|
@@ -3356,7 +3356,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
3356
3356
|
|
3357
3357
|
// Copyright (c) Microsoft Corporation.
|
3358
3358
|
// Licensed under the MIT license.
|
3359
|
-
var __awaiter$
|
3359
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3360
3360
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3361
3361
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3362
3362
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3382,56 +3382,56 @@ class ProxyCallCommon {
|
|
3382
3382
|
switch (prop) {
|
3383
3383
|
case 'mute': {
|
3384
3384
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3385
|
-
return __awaiter$
|
3385
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3386
3386
|
return yield target.mute(...args);
|
3387
3387
|
});
|
3388
3388
|
}, 'Call.mute');
|
3389
3389
|
}
|
3390
3390
|
case 'unmute': {
|
3391
3391
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3392
|
-
return __awaiter$
|
3392
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3393
3393
|
return yield target.unmute(...args);
|
3394
3394
|
});
|
3395
3395
|
}, 'Call.unmute');
|
3396
3396
|
}
|
3397
3397
|
case 'startVideo': {
|
3398
3398
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3399
|
-
return __awaiter$
|
3399
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3400
3400
|
return yield target.startVideo(...args);
|
3401
3401
|
});
|
3402
3402
|
}, 'Call.startVideo');
|
3403
3403
|
}
|
3404
3404
|
case 'stopVideo': {
|
3405
3405
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3406
|
-
return __awaiter$
|
3406
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3407
3407
|
return yield target.stopVideo(...args);
|
3408
3408
|
});
|
3409
3409
|
}, 'Call.stopVideo');
|
3410
3410
|
}
|
3411
3411
|
case 'startScreenSharing': {
|
3412
3412
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3413
|
-
return __awaiter$
|
3413
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3414
3414
|
return yield target.startScreenSharing(...args);
|
3415
3415
|
});
|
3416
3416
|
}, 'Call.startScreenSharing');
|
3417
3417
|
}
|
3418
3418
|
case 'stopScreenSharing': {
|
3419
3419
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3420
|
-
return __awaiter$
|
3420
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3421
3421
|
return yield target.stopScreenSharing(...args);
|
3422
3422
|
});
|
3423
3423
|
}, 'Call.stopScreenSharing');
|
3424
3424
|
}
|
3425
3425
|
case 'hold': {
|
3426
3426
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3427
|
-
return __awaiter$
|
3427
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3428
3428
|
return yield target.hold(...args);
|
3429
3429
|
});
|
3430
3430
|
}, 'Call.hold');
|
3431
3431
|
}
|
3432
3432
|
case 'resume': {
|
3433
3433
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3434
|
-
return __awaiter$
|
3434
|
+
return __awaiter$w(this, void 0, void 0, function* () {
|
3435
3435
|
return yield target.resume(...args);
|
3436
3436
|
});
|
3437
3437
|
}, 'Call.resume');
|
@@ -3444,7 +3444,7 @@ class ProxyCallCommon {
|
|
3444
3444
|
|
3445
3445
|
// Copyright (c) Microsoft Corporation.
|
3446
3446
|
// Licensed under the MIT license.
|
3447
|
-
var __awaiter$
|
3447
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3448
3448
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3449
3449
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3450
3450
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3458,7 +3458,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
3458
3458
|
switch (prop) {
|
3459
3459
|
case 'addParticipant': {
|
3460
3460
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
3461
|
-
return __awaiter$
|
3461
|
+
return __awaiter$v(this, void 0, void 0, function* () {
|
3462
3462
|
return yield target.addParticipant(...args);
|
3463
3463
|
});
|
3464
3464
|
}, 'Call.addParticipant');
|
@@ -3679,7 +3679,7 @@ class InternalCallContext {
|
|
3679
3679
|
|
3680
3680
|
// Copyright (c) Microsoft Corporation.
|
3681
3681
|
// Licensed under the MIT license.
|
3682
|
-
var __awaiter$
|
3682
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3683
3683
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3684
3684
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3685
3685
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3694,7 +3694,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
3694
3694
|
switch (prop) {
|
3695
3695
|
case 'addParticipant': {
|
3696
3696
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
3697
|
-
return __awaiter$
|
3697
|
+
return __awaiter$u(this, void 0, void 0, function* () {
|
3698
3698
|
return yield target.addParticipant(...args);
|
3699
3699
|
});
|
3700
3700
|
}, 'TeamsCall.addParticipant');
|
@@ -3809,7 +3809,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
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 ProxyVideoStreamRendererView {
|
|
3831
3831
|
get(target, prop) {
|
3832
3832
|
switch (prop) {
|
3833
3833
|
case 'updateScalingMode': {
|
3834
|
-
return (...args) => __awaiter$
|
3834
|
+
return (...args) => __awaiter$t(this, void 0, void 0, function* () {
|
3835
3835
|
yield target.updateScalingMode(...args);
|
3836
3836
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
3837
3837
|
});
|
@@ -3852,7 +3852,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
3852
3852
|
|
3853
3853
|
// Copyright (c) Microsoft Corporation.
|
3854
3854
|
// Licensed under the MIT license.
|
3855
|
-
var __awaiter$
|
3855
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3856
3856
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3857
3857
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3858
3858
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3874,7 +3874,7 @@ class ProxyCallClient {
|
|
3874
3874
|
get(target, prop) {
|
3875
3875
|
switch (prop) {
|
3876
3876
|
case 'createCallAgent': {
|
3877
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
3877
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$s(this, void 0, void 0, function* () {
|
3878
3878
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
3879
3879
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
3880
3880
|
// callAgent if the createCallAgent succeeds.
|
@@ -3887,7 +3887,7 @@ class ProxyCallClient {
|
|
3887
3887
|
}), 'CallClient.createCallAgent');
|
3888
3888
|
}
|
3889
3889
|
case 'createTeamsCallAgent': {
|
3890
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
3890
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$s(this, void 0, void 0, function* () {
|
3891
3891
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
3892
3892
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
3893
3893
|
// callAgent if the createCallAgent succeeds.
|
@@ -3900,7 +3900,7 @@ class ProxyCallClient {
|
|
3900
3900
|
}), 'CallClient.createTeamsCallAgent');
|
3901
3901
|
}
|
3902
3902
|
case 'getDeviceManager': {
|
3903
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
3903
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$s(this, void 0, void 0, function* () {
|
3904
3904
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
3905
3905
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
3906
3906
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -3929,7 +3929,7 @@ class ProxyCallClient {
|
|
3929
3929
|
/**
|
3930
3930
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
3931
3931
|
*/
|
3932
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
3932
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$s(this, void 0, void 0, function* () {
|
3933
3933
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
3934
3934
|
this._context.setEnvironmentInfo(environmentInfo);
|
3935
3935
|
return environmentInfo;
|
@@ -3982,7 +3982,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
3982
3982
|
});
|
3983
3983
|
Object.defineProperty(callClient, 'createView', {
|
3984
3984
|
configurable: false,
|
3985
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
3985
|
+
value: (callId, participantId, stream, options) => __awaiter$s(void 0, void 0, void 0, function* () {
|
3986
3986
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
3987
3987
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
3988
3988
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -4367,8 +4367,8 @@ const defaultIdentifiers = {
|
|
4367
4367
|
typingIndicator: 'typing-indicator',
|
4368
4368
|
videoGallery: 'video-gallery',
|
4369
4369
|
videoTile: 'video-tile',
|
4370
|
-
|
4371
|
-
|
4370
|
+
overflowGalleryLeftNavButton: 'overflow-gallery-left-nav-button',
|
4371
|
+
overflowGalleryRightNavButton: 'overflow-gallery-right-nav-button'
|
4372
4372
|
};
|
4373
4373
|
/**
|
4374
4374
|
* @private
|
@@ -6800,7 +6800,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
6800
6800
|
return actionMenuProps;
|
6801
6801
|
};
|
6802
6802
|
|
6803
|
-
var __awaiter$
|
6803
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6804
6804
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6805
6805
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6806
6806
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6825,7 +6825,7 @@ const _FileDownloadCards = (props) => {
|
|
6825
6825
|
var _a, _b;
|
6826
6826
|
return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile) !== null && _b !== void 0 ? _b : localeStrings.downloadFile;
|
6827
6827
|
}, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile, localeStrings.downloadFile]);
|
6828
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
6828
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$r(void 0, void 0, void 0, function* () {
|
6829
6829
|
if (!props.downloadHandler) {
|
6830
6830
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
6831
6831
|
}
|
@@ -6973,7 +6973,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
6973
6973
|
|
6974
6974
|
// Copyright (c) Microsoft Corporation.
|
6975
6975
|
// Licensed under the MIT license.
|
6976
|
-
var __awaiter$
|
6976
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6977
6977
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6978
6978
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6979
6979
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7007,7 +7007,7 @@ const ChatMessageComponent = (props) => {
|
|
7007
7007
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
7008
7008
|
}
|
7009
7009
|
else if (isEditing) {
|
7010
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
7010
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
7011
7011
|
props.onUpdateMessage &&
|
7012
7012
|
props.message.messageId &&
|
7013
7013
|
(yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
|
@@ -7106,7 +7106,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
|
7106
7106
|
|
7107
7107
|
// Copyright (c) Microsoft Corporation.
|
7108
7108
|
// Licensed under the MIT license.
|
7109
|
-
var __awaiter$
|
7109
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7110
7110
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7111
7111
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7112
7112
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7307,6 +7307,13 @@ const MessageThread = (props) => {
|
|
7307
7307
|
// readCount and participantCount will only need to be updated on-fly when user hover on an indicator
|
7308
7308
|
const [readCountForHoveredIndicator, setReadCountForHoveredIndicator] = React.useState(undefined);
|
7309
7309
|
const isAllChatMessagesLoadedRef = React.useRef(false);
|
7310
|
+
// isAllChatMessagesLoadedRef needs to be updated every time when a new adapter is set in order to display correct data
|
7311
|
+
// onLoadPreviousChatMessages is updated when a new adapter is set
|
7312
|
+
React.useEffect(() => {
|
7313
|
+
if (onLoadPreviousChatMessages) {
|
7314
|
+
isAllChatMessagesLoadedRef.current = false;
|
7315
|
+
}
|
7316
|
+
}, [onLoadPreviousChatMessages]);
|
7310
7317
|
const previousTopRef = React.useRef(-1);
|
7311
7318
|
const previousHeightRef = React.useRef(-1);
|
7312
7319
|
const messageIdSeenByMeRef = React.useRef('');
|
@@ -7334,7 +7341,7 @@ const MessageThread = (props) => {
|
|
7334
7341
|
setChatMessagesInitialized(chatMessagesInitialized);
|
7335
7342
|
};
|
7336
7343
|
// we try to only send those message status if user is scrolled to the bottom.
|
7337
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
7344
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
7338
7345
|
if (!isAtBottomOfScrollRef.current ||
|
7339
7346
|
!document.hasFocus() ||
|
7340
7347
|
!messagesRef.current ||
|
@@ -7385,18 +7392,23 @@ const MessageThread = (props) => {
|
|
7385
7392
|
setIsAtBottomOfScrollRef(atBottom);
|
7386
7393
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
7387
7394
|
// Infinite scrolling + threadInitialize function
|
7388
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
7395
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
7389
7396
|
if (!isLoadingChatMessagesRef.current) {
|
7390
7397
|
if (onLoadPreviousChatMessages) {
|
7391
7398
|
isLoadingChatMessagesRef.current = true;
|
7392
|
-
|
7393
|
-
|
7394
|
-
|
7395
|
-
|
7396
|
-
|
7397
|
-
|
7399
|
+
try {
|
7400
|
+
// Fetch message until scrollTop reach the threshold for fetching new message
|
7401
|
+
while (!isAllChatMessagesLoadedRef.current &&
|
7402
|
+
chatScrollDivRef.current &&
|
7403
|
+
chatScrollDivRef.current.scrollTop <= 500) {
|
7404
|
+
isAllChatMessagesLoadedRef.current = yield onLoadPreviousChatMessages(numberOfChatMessagesToReload);
|
7405
|
+
yield delay(200);
|
7406
|
+
}
|
7407
|
+
}
|
7408
|
+
finally {
|
7409
|
+
// Set isLoadingChatMessagesRef to false after messages are fetched
|
7410
|
+
isLoadingChatMessagesRef.current = false;
|
7398
7411
|
}
|
7399
|
-
isLoadingChatMessagesRef.current = false;
|
7400
7412
|
}
|
7401
7413
|
}
|
7402
7414
|
}), [numberOfChatMessagesToReload, onLoadPreviousChatMessages]);
|
@@ -9476,9 +9488,9 @@ const HorizontalGallery = (props) => {
|
|
9476
9488
|
const disablePreviousButton = page === 0;
|
9477
9489
|
const disableNextButton = page === lastPage;
|
9478
9490
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(rootStyle$1, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root) },
|
9479
|
-
showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "previous-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryLeftButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.previousButton, onClick: () => setPage(Math.max(0, Math.min(lastPage, page - 1))), disabled: disablePreviousButton, identifier: ids.
|
9491
|
+
showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "previous-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryLeftButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.previousButton, onClick: () => setPage(Math.max(0, Math.min(lastPage, page - 1))), disabled: disablePreviousButton, identifier: ids.overflowGalleryLeftNavButton })),
|
9480
9492
|
React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(childrenContainerStyle$1, { '> *': (_b = props.styles) === null || _b === void 0 ? void 0 : _b.children }) }, childrenOnCurrentPage),
|
9481
|
-
showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "next-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryRightButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.nextButton, onClick: () => setPage(Math.min(lastPage, page + 1)), disabled: disableNextButton, identifier: ids.
|
9493
|
+
showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "next-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryRightButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.nextButton, onClick: () => setPage(Math.min(lastPage, page + 1)), disabled: disableNextButton, identifier: ids.overflowGalleryRightNavButton }))));
|
9482
9494
|
};
|
9483
9495
|
const HorizontalGalleryNavigationButton = (props) => {
|
9484
9496
|
const theme = useTheme();
|
@@ -9670,6 +9682,7 @@ const VerticalGallery = (props) => {
|
|
9670
9682
|
const VerticalGalleryControlBar = (props) => {
|
9671
9683
|
const { onNextButtonClick, onPreviousButtonClick, buttonsDisabled, currentPage, totalPages, styles } = props;
|
9672
9684
|
const theme = useTheme();
|
9685
|
+
const ids = useIdentifiers();
|
9673
9686
|
const pageCounterContainerStyles = React.useMemo(() => {
|
9674
9687
|
return react.mergeStyles(pageNavigationControlBarContainerStyle, styles === null || styles === void 0 ? void 0 : styles.root);
|
9675
9688
|
}, [styles === null || styles === void 0 ? void 0 : styles.root]);
|
@@ -9684,10 +9697,10 @@ const VerticalGalleryControlBar = (props) => {
|
|
9684
9697
|
}, [styles === null || styles === void 0 ? void 0 : styles.nextButton, theme]);
|
9685
9698
|
const controlBarSpacing = { childrenGap: '0.5rem' };
|
9686
9699
|
return (React__default['default'].createElement(react.Stack, { horizontalAlign: "center", tokens: controlBarSpacing, horizontal: true, className: pageCounterContainerStyles },
|
9687
|
-
React__default['default'].createElement(react.DefaultButton, { className: previousButtonSyles, onClick: onPreviousButtonClick, disabled: buttonsDisabled === null || buttonsDisabled === void 0 ? void 0 : buttonsDisabled.previous },
|
9700
|
+
React__default['default'].createElement(react.DefaultButton, { className: previousButtonSyles, onClick: onPreviousButtonClick, disabled: buttonsDisabled === null || buttonsDisabled === void 0 ? void 0 : buttonsDisabled.previous, "data-ui-id": ids.overflowGalleryLeftNavButton },
|
9688
9701
|
React__default['default'].createElement(react.Icon, { iconName: "VerticalGalleryLeftButton", styles: navIconStyles })),
|
9689
9702
|
React__default['default'].createElement(react.Text, { className: pageCounterStyles }, `${currentPage} / ${totalPages}`),
|
9690
|
-
React__default['default'].createElement(react.DefaultButton, { className: nextButtonsStyles, onClick: onNextButtonClick, disabled: buttonsDisabled === null || buttonsDisabled === void 0 ? void 0 : buttonsDisabled.next },
|
9703
|
+
React__default['default'].createElement(react.DefaultButton, { className: nextButtonsStyles, onClick: onNextButtonClick, disabled: buttonsDisabled === null || buttonsDisabled === void 0 ? void 0 : buttonsDisabled.next, "data-ui-id": ids.overflowGalleryRightNavButton },
|
9691
9704
|
React__default['default'].createElement(react.Icon, { iconName: "VerticalGalleryRightButton", styles: navIconStyles }))));
|
9692
9705
|
};
|
9693
9706
|
|
@@ -9792,12 +9805,20 @@ const VERTICAL_GALLERY_TILE_SIZE_REM = { minHeight: 5.625, maxHeight: 9, width:
|
|
9792
9805
|
* @param shouldFloatLocalVideo whether rendered in floating layout or not
|
9793
9806
|
* @returns Style set for VerticalGallery container.
|
9794
9807
|
*/
|
9795
|
-
const verticalGalleryContainerStyle = (shouldFloatLocalVideo) => {
|
9796
|
-
return
|
9797
|
-
|
9798
|
-
|
9799
|
-
|
9800
|
-
|
9808
|
+
const verticalGalleryContainerStyle = (shouldFloatLocalVideo, isNarrow) => {
|
9809
|
+
return isNarrow
|
9810
|
+
? {
|
9811
|
+
width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9812
|
+
height: shouldFloatLocalVideo ? `calc(100% - ${_pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height)})` : '100%',
|
9813
|
+
paddingBottom: '0.5rem'
|
9814
|
+
}
|
9815
|
+
: {
|
9816
|
+
width: `${VERTICAL_GALLERY_TILE_SIZE_REM.width}rem`,
|
9817
|
+
height: shouldFloatLocalVideo
|
9818
|
+
? `calc(100% - ${_pxToRem(VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX.height)})`
|
9819
|
+
: '100%',
|
9820
|
+
paddingBottom: '0.5rem'
|
9821
|
+
};
|
9801
9822
|
};
|
9802
9823
|
/**
|
9803
9824
|
* @private
|
@@ -9883,8 +9904,10 @@ const calculateChildrenPerPage = (args) => {
|
|
9883
9904
|
/**
|
9884
9905
|
* Now that we have the childrenSpace height we can figure out how many Children can fir in the childrenSpace.
|
9885
9906
|
* childrenSpace = n * childHeightMin + (n - 1) * gapHeight. isolate n and take the floor.
|
9907
|
+
*
|
9908
|
+
* We want to always return at least one video tile if there are children present.So we take the max.
|
9886
9909
|
*/
|
9887
|
-
return Math.floor((childSpace + gapHeightPx) / (childMinHeightPx + gapHeightPx));
|
9910
|
+
return Math.max(Math.floor((childSpace + gapHeightPx) / (childMinHeightPx + gapHeightPx)), 1);
|
9888
9911
|
};
|
9889
9912
|
|
9890
9913
|
// Copyright (c) Microsoft Corporation.
|
@@ -9991,7 +10014,7 @@ const OverflowGallery = (props) => {
|
|
9991
10014
|
const containerStyles = React.useMemo(() => {
|
9992
10015
|
/* @conditional-compile-remove(vertical-gallery) */
|
9993
10016
|
if (overflowGalleryLayout === 'VerticalRight') {
|
9994
|
-
return verticalGalleryContainerStyle(shouldFloatLocalVideo);
|
10017
|
+
return verticalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow);
|
9995
10018
|
}
|
9996
10019
|
return horizontalGalleryContainerStyle(shouldFloatLocalVideo, isNarrow);
|
9997
10020
|
}, [shouldFloatLocalVideo, isNarrow, /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryLayout]);
|
@@ -10841,14 +10864,20 @@ const FloatingLocalVideoLayout = (props) => {
|
|
10841
10864
|
: (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
|
10842
10865
|
});
|
10843
10866
|
const layerHostId = reactHooks.useId('layerhost');
|
10844
|
-
|
10845
|
-
|
10846
|
-
|
10847
|
-
|
10848
|
-
|
10849
|
-
|
10850
|
-
|
10851
|
-
|
10867
|
+
const localVideoSize = React.useMemo(() => {
|
10868
|
+
if (isNarrow) {
|
10869
|
+
return SMALL_FLOATING_MODAL_SIZE_PX;
|
10870
|
+
}
|
10871
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
10872
|
+
if (horizontalGalleryTiles.length > 0 && overflowGalleryLayout === 'VerticalRight') {
|
10873
|
+
return isNarrow ? SMALL_FLOATING_MODAL_SIZE_PX : VERTICAL_GALLERY_FLOATING_MODAL_SIZE_PX;
|
10874
|
+
}
|
10875
|
+
return LARGE_FLOATING_MODAL_SIZE_PX;
|
10876
|
+
}, [
|
10877
|
+
horizontalGalleryTiles.length,
|
10878
|
+
isNarrow,
|
10879
|
+
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryLayout
|
10880
|
+
]);
|
10852
10881
|
const wrappedLocalVideoComponent = localVideoComponent && shouldFloatLocalVideo ? (
|
10853
10882
|
// When we use showCameraSwitcherInLocalPreview it disables dragging to allow keyboard navigation.
|
10854
10883
|
showCameraSwitcherInLocalPreview ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileWithControlsContainerStyle(theme, localVideoSize), {
|
@@ -10886,6 +10915,17 @@ const FloatingLocalVideoLayout = (props) => {
|
|
10886
10915
|
* Currently the Calling JS SDK supports up to 4 remote video streams
|
10887
10916
|
*/
|
10888
10917
|
const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;
|
10918
|
+
/**
|
10919
|
+
* @private
|
10920
|
+
* Styles to disable the selectivity of a text in video gallery
|
10921
|
+
*/
|
10922
|
+
const unselectable = {
|
10923
|
+
'-webkit-user-select': 'none',
|
10924
|
+
'-webkit-touch-callout': 'none',
|
10925
|
+
'-moz-user-select': 'none',
|
10926
|
+
'-ms-user-select': 'none',
|
10927
|
+
'user-select': 'none'
|
10928
|
+
};
|
10889
10929
|
/**
|
10890
10930
|
* @private
|
10891
10931
|
* Default remote video tile menu options
|
@@ -11101,7 +11141,7 @@ const VideoGallery = (props) => {
|
|
11101
11141
|
return (React__default['default'].createElement("div", {
|
11102
11142
|
/* @conditional-compile-remove(pinned-participants) */
|
11103
11143
|
// We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props
|
11104
|
-
id: drawerMenuHostIdFromProp ? undefined : drawerMenuHostId, "data-ui-id": ids.videoGallery, ref: containerRef, className: react.mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root) },
|
11144
|
+
id: drawerMenuHostIdFromProp ? undefined : drawerMenuHostId, "data-ui-id": ids.videoGallery, ref: containerRef, className: react.mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root, unselectable) },
|
11105
11145
|
videoGalleryLayout,
|
11106
11146
|
/* @conditional-compile-remove(pinned-participants) */
|
11107
11147
|
React__default['default'].createElement(Announcer, { announcementString: announcementString, ariaLive: "polite" })));
|
@@ -11473,7 +11513,7 @@ const DevicesButton = (props) => {
|
|
11473
11513
|
|
11474
11514
|
// Copyright (c) Microsoft Corporation.
|
11475
11515
|
// Licensed under the MIT license.
|
11476
|
-
var __awaiter$
|
11516
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11477
11517
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11478
11518
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11479
11519
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11511,7 +11551,7 @@ const CameraButton = (props) => {
|
|
11511
11551
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
11512
11552
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
11513
11553
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
11514
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
11554
|
+
const onToggleClick = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
|
11515
11555
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
11516
11556
|
if (onToggleCamera) {
|
11517
11557
|
setWaitForCamera(true);
|
@@ -11643,7 +11683,7 @@ const lightThemeCallButtonStyles = {
|
|
11643
11683
|
|
11644
11684
|
// Copyright (c) Microsoft Corporation.
|
11645
11685
|
// Licensed under the MIT license.
|
11646
|
-
var __awaiter$
|
11686
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11647
11687
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11648
11688
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11649
11689
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11684,7 +11724,7 @@ const MicrophoneButton = (props) => {
|
|
11684
11724
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
11685
11725
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
11686
11726
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
11687
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
11727
|
+
const onToggleClick = React.useCallback(() => __awaiter$n(void 0, void 0, void 0, function* () {
|
11688
11728
|
if (onToggleMicrophone) {
|
11689
11729
|
try {
|
11690
11730
|
yield onToggleMicrophone();
|
@@ -12545,7 +12585,7 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
12545
12585
|
|
12546
12586
|
// Copyright (c) Microsoft Corporation.
|
12547
12587
|
// Licensed under the MIT license.
|
12548
|
-
var __awaiter$
|
12588
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12549
12589
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12550
12590
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12551
12591
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12587,10 +12627,10 @@ const DialpadButton = (props) => {
|
|
12587
12627
|
const theme = react.useTheme();
|
12588
12628
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
12589
12629
|
const useLongPressProps = React__default['default'].useMemo(() => ({
|
12590
|
-
onClick: () => __awaiter$
|
12630
|
+
onClick: () => __awaiter$m(void 0, void 0, void 0, function* () {
|
12591
12631
|
onClick(digit, index);
|
12592
12632
|
}),
|
12593
|
-
onLongPress: () => __awaiter$
|
12633
|
+
onLongPress: () => __awaiter$m(void 0, void 0, void 0, function* () {
|
12594
12634
|
onLongPress(digit, index);
|
12595
12635
|
}),
|
12596
12636
|
touchEventsOnly: isMobile
|
@@ -13515,7 +13555,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
13515
13555
|
|
13516
13556
|
// Copyright (c) Microsoft Corporation.
|
13517
13557
|
// Licensed under the MIT license.
|
13518
|
-
var __awaiter$
|
13558
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13519
13559
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13520
13560
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13521
13561
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13538,35 +13578,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
13538
13578
|
let messageIterator = undefined;
|
13539
13579
|
let readReceiptIterator = undefined;
|
13540
13580
|
return {
|
13541
|
-
onSendMessage: (content, options) => __awaiter$
|
13581
|
+
onSendMessage: (content, options) => __awaiter$l(void 0, void 0, void 0, function* () {
|
13542
13582
|
const sendMessageRequest = {
|
13543
13583
|
content,
|
13544
13584
|
senderDisplayName: chatClient.getState().displayName
|
13545
13585
|
};
|
13546
13586
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
13547
13587
|
}),
|
13548
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
13588
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$l(void 0, void 0, void 0, function* () {
|
13549
13589
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
13550
13590
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
13551
13591
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
13552
13592
|
}),
|
13553
|
-
onDeleteMessage: (messageId) => __awaiter$
|
13593
|
+
onDeleteMessage: (messageId) => __awaiter$l(void 0, void 0, void 0, function* () {
|
13554
13594
|
yield chatThreadClient.deleteMessage(messageId);
|
13555
13595
|
}),
|
13556
13596
|
// This handler is designed for chatThread to consume
|
13557
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
13597
|
+
onMessageSeen: (chatMessageId) => __awaiter$l(void 0, void 0, void 0, function* () {
|
13558
13598
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
13559
13599
|
}),
|
13560
|
-
onTyping: () => __awaiter$
|
13600
|
+
onTyping: () => __awaiter$l(void 0, void 0, void 0, function* () {
|
13561
13601
|
yield chatThreadClient.sendTypingNotification();
|
13562
13602
|
}),
|
13563
|
-
onRemoveParticipant: (userId) => __awaiter$
|
13603
|
+
onRemoveParticipant: (userId) => __awaiter$l(void 0, void 0, void 0, function* () {
|
13564
13604
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
13565
13605
|
}),
|
13566
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
13606
|
+
updateThreadTopicName: (topicName) => __awaiter$l(void 0, void 0, void 0, function* () {
|
13567
13607
|
yield chatThreadClient.updateTopic(topicName);
|
13568
13608
|
}),
|
13569
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
13609
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$l(void 0, void 0, void 0, function* () {
|
13570
13610
|
var _a, _b, _c;
|
13571
13611
|
if (messageIterator === undefined) {
|
13572
13612
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -14303,7 +14343,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
14303
14343
|
|
14304
14344
|
// Copyright (c) Microsoft Corporation.
|
14305
14345
|
// Licensed under the MIT license.
|
14306
|
-
var __awaiter$
|
14346
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14307
14347
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14308
14348
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14309
14349
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14578,7 +14618,7 @@ class ChatContext$1 {
|
|
14578
14618
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
14579
14619
|
*/
|
14580
14620
|
withAsyncErrorTeedToState(f, target) {
|
14581
|
-
return (...args) => __awaiter$
|
14621
|
+
return (...args) => __awaiter$k(this, void 0, void 0, function* () {
|
14582
14622
|
try {
|
14583
14623
|
return yield f(...args);
|
14584
14624
|
}
|
@@ -14685,7 +14725,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
14685
14725
|
|
14686
14726
|
// Copyright (c) Microsoft Corporation.
|
14687
14727
|
// Licensed under the MIT license.
|
14688
|
-
var __awaiter$
|
14728
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14689
14729
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14690
14730
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14691
14731
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14770,7 +14810,7 @@ class EventSubscriber {
|
|
14770
14810
|
};
|
14771
14811
|
// This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
|
14772
14812
|
// Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
|
14773
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
14813
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$j(this, void 0, void 0, function* () {
|
14774
14814
|
var e_1, _a;
|
14775
14815
|
try {
|
14776
14816
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -14862,7 +14902,7 @@ class EventSubscriber {
|
|
14862
14902
|
|
14863
14903
|
// Copyright (c) Microsoft Corporation.
|
14864
14904
|
// Licensed under the MIT license.
|
14865
|
-
var __awaiter$
|
14905
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14866
14906
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14867
14907
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14868
14908
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14884,7 +14924,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
14884
14924
|
const threadsIterator = iteratorCreator(...args);
|
14885
14925
|
return {
|
14886
14926
|
next() {
|
14887
|
-
return __awaiter$
|
14927
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
14888
14928
|
const result = yield threadsIterator.next();
|
14889
14929
|
if (!result.done && result.value) {
|
14890
14930
|
decorateFn(result.value, context);
|
@@ -14899,7 +14939,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
14899
14939
|
const pages = threadsIterator.byPage(settings);
|
14900
14940
|
return {
|
14901
14941
|
next() {
|
14902
|
-
return __awaiter$
|
14942
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
14903
14943
|
const result = yield pages.next();
|
14904
14944
|
const page = result.value;
|
14905
14945
|
if (!result.done && result.value) {
|
@@ -14983,7 +15023,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
14983
15023
|
|
14984
15024
|
// Copyright (c) Microsoft Corporation.
|
14985
15025
|
// Licensed under the MIT license.
|
14986
|
-
var __awaiter$
|
15026
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14987
15027
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14988
15028
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14989
15029
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15002,14 +15042,14 @@ class ProxyChatThreadClient {
|
|
15002
15042
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
15003
15043
|
}
|
15004
15044
|
case 'getMessage': {
|
15005
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15045
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15006
15046
|
const message = yield chatThreadClient.getMessage(...args);
|
15007
15047
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
15008
15048
|
return message;
|
15009
15049
|
}), 'ChatThreadClient.getMessage');
|
15010
15050
|
}
|
15011
15051
|
case 'sendMessage': {
|
15012
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15052
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15013
15053
|
// Retry logic?
|
15014
15054
|
const [request, options] = args;
|
15015
15055
|
const { content } = request;
|
@@ -15049,7 +15089,7 @@ class ProxyChatThreadClient {
|
|
15049
15089
|
}), 'ChatThreadClient.sendMessage');
|
15050
15090
|
}
|
15051
15091
|
case 'addParticipants': {
|
15052
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15092
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15053
15093
|
const result = yield chatThreadClient.addParticipants(...args);
|
15054
15094
|
const [addRequest] = args;
|
15055
15095
|
const participantsToAdd = addRequest.participants;
|
@@ -15058,7 +15098,7 @@ class ProxyChatThreadClient {
|
|
15058
15098
|
}), 'ChatThreadClient.addParticipants');
|
15059
15099
|
}
|
15060
15100
|
case 'deleteMessage': {
|
15061
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15101
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15062
15102
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
15063
15103
|
const [messageId] = args;
|
15064
15104
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -15076,12 +15116,12 @@ class ProxyChatThreadClient {
|
|
15076
15116
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
15077
15117
|
}
|
15078
15118
|
case 'sendTypingNotification': {
|
15079
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15119
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15080
15120
|
return yield chatThreadClient.sendTypingNotification(...args);
|
15081
15121
|
}), 'ChatThreadClient.sendTypingNotification');
|
15082
15122
|
}
|
15083
15123
|
case 'removeParticipant': {
|
15084
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15124
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15085
15125
|
const result = yield chatThreadClient.removeParticipant(...args);
|
15086
15126
|
const [removeIdentifier] = args;
|
15087
15127
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -15089,7 +15129,7 @@ class ProxyChatThreadClient {
|
|
15089
15129
|
}), 'ChatThreadClient.removeParticipant');
|
15090
15130
|
}
|
15091
15131
|
case 'updateMessage': {
|
15092
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15132
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15093
15133
|
const result = yield chatThreadClient.updateMessage(...args);
|
15094
15134
|
const [messageId, updateOption] = args;
|
15095
15135
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -15097,7 +15137,7 @@ class ProxyChatThreadClient {
|
|
15097
15137
|
}), 'ChatThreadClient.updateMessage');
|
15098
15138
|
}
|
15099
15139
|
case 'updateTopic': {
|
15100
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15140
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15101
15141
|
const result = yield chatThreadClient.updateTopic(...args);
|
15102
15142
|
const [topic] = args;
|
15103
15143
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -15105,7 +15145,7 @@ class ProxyChatThreadClient {
|
|
15105
15145
|
}), 'ChatThreadClient.updateTopic');
|
15106
15146
|
}
|
15107
15147
|
case 'getProperties': {
|
15108
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
15148
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$h(this, void 0, void 0, function* () {
|
15109
15149
|
const result = yield chatThreadClient.getProperties(...args);
|
15110
15150
|
this._context.updateThread(chatThreadClient.threadId, result);
|
15111
15151
|
return result;
|
@@ -15142,7 +15182,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
15142
15182
|
|
15143
15183
|
// Copyright (c) Microsoft Corporation.
|
15144
15184
|
// Licensed under the MIT license.
|
15145
|
-
var __awaiter$
|
15185
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15146
15186
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15147
15187
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15148
15188
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15161,7 +15201,7 @@ const proxyChatClient = {
|
|
15161
15201
|
switch (prop) {
|
15162
15202
|
case 'createChatThread': {
|
15163
15203
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15164
|
-
return __awaiter$
|
15204
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
15165
15205
|
const result = yield chatClient.createChatThread(...args);
|
15166
15206
|
const thread = result.chatThread;
|
15167
15207
|
if (thread) {
|
@@ -15174,7 +15214,7 @@ const proxyChatClient = {
|
|
15174
15214
|
}
|
15175
15215
|
case 'deleteChatThread': {
|
15176
15216
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15177
|
-
return __awaiter$
|
15217
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
15178
15218
|
const result = yield chatClient.deleteChatThread(...args);
|
15179
15219
|
context.deleteThread(args[0]);
|
15180
15220
|
return result;
|
@@ -15194,7 +15234,7 @@ const proxyChatClient = {
|
|
15194
15234
|
}
|
15195
15235
|
case 'startRealtimeNotifications': {
|
15196
15236
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15197
|
-
return __awaiter$
|
15237
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
15198
15238
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
15199
15239
|
if (!receiver.eventSubscriber) {
|
15200
15240
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -15205,7 +15245,7 @@ const proxyChatClient = {
|
|
15205
15245
|
}
|
15206
15246
|
case 'stopRealtimeNotifications': {
|
15207
15247
|
return context.withAsyncErrorTeedToState(function (...args) {
|
15208
|
-
return __awaiter$
|
15248
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
15209
15249
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
15210
15250
|
if (receiver.eventSubscriber) {
|
15211
15251
|
receiver.eventSubscriber.unsubscribe();
|
@@ -15812,7 +15852,7 @@ const END_CALL_PAGES = [
|
|
15812
15852
|
|
15813
15853
|
// Copyright (c) Microsoft Corporation.
|
15814
15854
|
// Licensed under the MIT license.
|
15815
|
-
var __awaiter$
|
15855
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15816
15856
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15817
15857
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15818
15858
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16035,7 +16075,7 @@ const isDisabled$2 = (option) => {
|
|
16035
16075
|
/**
|
16036
16076
|
* @returns Permissions state for the camera.
|
16037
16077
|
*/
|
16038
|
-
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$
|
16078
|
+
const queryCameraPermissionFromPermissionsAPI = () => __awaiter$f(void 0, void 0, void 0, function* () {
|
16039
16079
|
try {
|
16040
16080
|
return (yield navigator.permissions.query({ name: 'camera' })).state;
|
16041
16081
|
}
|
@@ -16048,7 +16088,7 @@ const queryCameraPermissionFromPermissionsAPI = () => __awaiter$e(void 0, void 0
|
|
16048
16088
|
/**
|
16049
16089
|
* @returns Permissions state for the microphone.
|
16050
16090
|
*/
|
16051
|
-
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$
|
16091
|
+
const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$f(void 0, void 0, void 0, function* () {
|
16052
16092
|
try {
|
16053
16093
|
return (yield navigator.permissions.query({ name: 'microphone' })).state;
|
16054
16094
|
}
|
@@ -16065,7 +16105,7 @@ const queryMicrophonePermissionFromPermissionsAPI = () => __awaiter$e(void 0, vo
|
|
16065
16105
|
* If permission API is not supported on this browser, permission state is set to unsupported.
|
16066
16106
|
* @private
|
16067
16107
|
*/
|
16068
|
-
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$
|
16108
|
+
const getDevicePermissionState = (setVideoState, setAudioState) => __awaiter$f(void 0, void 0, void 0, function* () {
|
16069
16109
|
const [cameraResult, microphoneResult] = yield Promise.all([
|
16070
16110
|
queryCameraPermissionFromPermissionsAPI(),
|
16071
16111
|
queryMicrophonePermissionFromPermissionsAPI()
|
@@ -16142,7 +16182,7 @@ const createParticipantModifier = (createModifiedParticipant) => {
|
|
16142
16182
|
|
16143
16183
|
// Copyright (c) Microsoft Corporation.
|
16144
16184
|
// Licensed under the MIT license.
|
16145
|
-
var __awaiter$
|
16185
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16146
16186
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16147
16187
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16148
16188
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16268,9 +16308,9 @@ class AzureCommunicationChatAdapter {
|
|
16268
16308
|
this.unsubscribeAllEvents();
|
16269
16309
|
}
|
16270
16310
|
fetchInitialData() {
|
16271
|
-
return __awaiter$
|
16311
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16272
16312
|
// If get properties fails we dont want to try to get the participants after.
|
16273
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16313
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16274
16314
|
var e_1, _a;
|
16275
16315
|
yield this.chatThreadClient.getProperties();
|
16276
16316
|
try {
|
@@ -16304,8 +16344,8 @@ class AzureCommunicationChatAdapter {
|
|
16304
16344
|
this.context.offStateChange(handler);
|
16305
16345
|
}
|
16306
16346
|
sendMessage(content, options = {}) {
|
16307
|
-
return __awaiter$
|
16308
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16347
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16348
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16309
16349
|
/* @conditional-compile-remove(file-sharing) */
|
16310
16350
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
16311
16351
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -16322,51 +16362,51 @@ class AzureCommunicationChatAdapter {
|
|
16322
16362
|
});
|
16323
16363
|
}
|
16324
16364
|
sendReadReceipt(chatMessageId) {
|
16325
|
-
return __awaiter$
|
16326
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16365
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16366
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16327
16367
|
yield this.handlers.onMessageSeen(chatMessageId);
|
16328
16368
|
}));
|
16329
16369
|
});
|
16330
16370
|
}
|
16331
16371
|
sendTypingIndicator() {
|
16332
|
-
return __awaiter$
|
16333
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16372
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16373
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16334
16374
|
yield this.handlers.onTyping();
|
16335
16375
|
}));
|
16336
16376
|
});
|
16337
16377
|
}
|
16338
16378
|
removeParticipant(userId) {
|
16339
|
-
return __awaiter$
|
16340
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16379
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16380
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16341
16381
|
yield this.handlers.onRemoveParticipant(userId);
|
16342
16382
|
}));
|
16343
16383
|
});
|
16344
16384
|
}
|
16345
16385
|
setTopic(topicName) {
|
16346
|
-
return __awaiter$
|
16347
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16386
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16387
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16348
16388
|
yield this.handlers.updateThreadTopicName(topicName);
|
16349
16389
|
}));
|
16350
16390
|
});
|
16351
16391
|
}
|
16352
16392
|
loadPreviousChatMessages(messagesToLoad) {
|
16353
|
-
return __awaiter$
|
16354
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16393
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16394
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16355
16395
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
16356
16396
|
}));
|
16357
16397
|
});
|
16358
16398
|
}
|
16359
16399
|
updateMessage(messageId, content, metadata, options) {
|
16360
|
-
return __awaiter$
|
16361
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16400
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16401
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16362
16402
|
/* @conditional-compile-remove(file-sharing) */
|
16363
16403
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
16364
16404
|
}));
|
16365
16405
|
});
|
16366
16406
|
}
|
16367
16407
|
deleteMessage(messageId) {
|
16368
|
-
return __awaiter$
|
16369
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16408
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16409
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
16370
16410
|
return yield this.handlers.onDeleteMessage(messageId);
|
16371
16411
|
}));
|
16372
16412
|
});
|
@@ -16447,7 +16487,7 @@ class AzureCommunicationChatAdapter {
|
|
16447
16487
|
this.emitter.off(event, listener);
|
16448
16488
|
}
|
16449
16489
|
asyncTeeErrorToEventEmitter(f) {
|
16450
|
-
return __awaiter$
|
16490
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
16451
16491
|
try {
|
16452
16492
|
return yield f();
|
16453
16493
|
}
|
@@ -16489,7 +16529,7 @@ const convertEventType = (type) => {
|
|
16489
16529
|
*
|
16490
16530
|
* @public
|
16491
16531
|
*/
|
16492
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
16532
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$e(void 0, void 0, void 0, function* () {
|
16493
16533
|
if (!isValidIdentifier(userId)) {
|
16494
16534
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
16495
16535
|
}
|
@@ -16555,7 +16595,7 @@ beforeDispose) => {
|
|
16555
16595
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
16556
16596
|
return;
|
16557
16597
|
}
|
16558
|
-
(() => __awaiter$
|
16598
|
+
(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
16559
16599
|
if (adapterRef.current) {
|
16560
16600
|
// Dispose the old adapter when a new one is created.
|
16561
16601
|
//
|
@@ -16587,7 +16627,7 @@ beforeDispose) => {
|
|
16587
16627
|
// Dispose any existing adapter when the component unmounts.
|
16588
16628
|
React.useEffect(() => {
|
16589
16629
|
return () => {
|
16590
|
-
(() => __awaiter$
|
16630
|
+
(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
16591
16631
|
if (adapterRef.current) {
|
16592
16632
|
if (beforeDisposeRef.current) {
|
16593
16633
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -16608,7 +16648,7 @@ beforeDispose) => {
|
|
16608
16648
|
*
|
16609
16649
|
* @public
|
16610
16650
|
*/
|
16611
|
-
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$
|
16651
|
+
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$e(void 0, void 0, void 0, function* () {
|
16612
16652
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
16613
16653
|
});
|
16614
16654
|
const isChatError = (e) => {
|
@@ -16819,7 +16859,7 @@ const sendboxContainerStyles = {
|
|
16819
16859
|
|
16820
16860
|
// Copyright (c) Microsoft Corporation.
|
16821
16861
|
// Licensed under the MIT license.
|
16822
|
-
var __awaiter$
|
16862
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16823
16863
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16824
16864
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16825
16865
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16840,7 +16880,7 @@ const AvatarPersona = (props) => {
|
|
16840
16880
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
16841
16881
|
const [data, setData] = React.useState();
|
16842
16882
|
React.useEffect(() => {
|
16843
|
-
(() => __awaiter$
|
16883
|
+
(() => __awaiter$d(void 0, void 0, void 0, function* () {
|
16844
16884
|
if (dataProvider && userId) {
|
16845
16885
|
const newData = yield dataProvider(userId);
|
16846
16886
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -17203,6 +17243,16 @@ const FileDownloadErrorBar = (props) => {
|
|
17203
17243
|
};
|
17204
17244
|
|
17205
17245
|
// Copyright (c) Microsoft Corporation.
|
17246
|
+
// Licensed under the MIT license.
|
17247
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17248
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17249
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
17250
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17251
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17252
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17253
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17254
|
+
});
|
17255
|
+
};
|
17206
17256
|
/**
|
17207
17257
|
* @private
|
17208
17258
|
*/
|
@@ -17215,7 +17265,13 @@ const ChatScreen = (props) => {
|
|
17215
17265
|
const theme = useTheme();
|
17216
17266
|
React.useEffect(() => {
|
17217
17267
|
// Initial data should be always fetched by the composite(or external caller) instead of the adapter
|
17218
|
-
|
17268
|
+
const fetchData = () => __awaiter$c(void 0, void 0, void 0, function* () {
|
17269
|
+
// Fetch initial data for adapter
|
17270
|
+
yield adapter.fetchInitialData();
|
17271
|
+
// Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.
|
17272
|
+
yield adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);
|
17273
|
+
});
|
17274
|
+
fetchData();
|
17219
17275
|
}, [adapter]);
|
17220
17276
|
const messageThreadProps = usePropsFor$2(MessageThread);
|
17221
17277
|
const sendBoxProps = usePropsFor$2(SendBox);
|
@@ -18208,7 +18264,7 @@ const galleryParentContainerStyles = (backgroundColor) => ({
|
|
18208
18264
|
/**
|
18209
18265
|
* @private
|
18210
18266
|
*/
|
18211
|
-
const mediaGalleryContainerStyles = {
|
18267
|
+
const mediaGalleryContainerStyles$1 = {
|
18212
18268
|
root: {
|
18213
18269
|
height: '100%'
|
18214
18270
|
}
|
@@ -19263,7 +19319,7 @@ const CallArrangement = (props) => {
|
|
19263
19319
|
onPeopleButtonClicked: togglePeoplePane })))),
|
19264
19320
|
React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
|
19265
19321
|
React__default['default'].createElement(react.Stack.Item, { grow: true, style: callCompositeContainerFlex() },
|
19266
|
-
React__default['default'].createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React__default['default'].createElement(react.Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent())))),
|
19322
|
+
React__default['default'].createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React__default['default'].createElement(react.Stack, { verticalFill: true, styles: mediaGalleryContainerStyles$1 }, props.onRenderGalleryContent())))),
|
19267
19323
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
19268
19324
|
callPaneContent())))));
|
19269
19325
|
};
|
@@ -19446,6 +19502,12 @@ const MediaGallery = (props) => {
|
|
19446
19502
|
const cameraSwitcherCameras = useSelector$1(localVideoCameraCycleButtonSelector);
|
19447
19503
|
const cameraSwitcherCallback = useHandlers();
|
19448
19504
|
const announcerString = useParticipantChangedAnnouncement();
|
19505
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
19506
|
+
const containerRef = React.useRef(null);
|
19507
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
19508
|
+
const containerWidth = _useContainerWidth(containerRef);
|
19509
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
19510
|
+
const containerHeight = _useContainerHeight(containerRef);
|
19449
19511
|
const cameraSwitcherProps = React.useMemo(() => {
|
19450
19512
|
return Object.assign(Object.assign({}, cameraSwitcherCallback), cameraSwitcherCameras);
|
19451
19513
|
}, [cameraSwitcherCallback, cameraSwitcherCameras]);
|
@@ -19464,18 +19526,25 @@ const MediaGallery = (props) => {
|
|
19464
19526
|
? { kind: 'drawer', hostId: props.drawerMenuHostId }
|
19465
19527
|
: { kind: 'contextual' };
|
19466
19528
|
}, [(_a = props.remoteVideoTileMenuOptions) === null || _a === void 0 ? void 0 : _a.isHidden, props.isMobile, props.drawerMenuHostId]);
|
19529
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
19530
|
+
const overflowGalleryLayout = React.useMemo(() => containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9
|
19531
|
+
? 'VerticalRight'
|
19532
|
+
: 'HorizontalBottom', [containerWidth, containerHeight]);
|
19467
19533
|
const VideoGalleryMemoized = React.useMemo(() => {
|
19468
19534
|
return (React__default['default'].createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions$2, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: "floatingLocalVideo", showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar,
|
19469
19535
|
/* @conditional-compile-remove(pinned-participants) */
|
19470
|
-
remoteVideoTileMenuOptions: remoteVideoTileMenuOptions
|
19536
|
+
remoteVideoTileMenuOptions: remoteVideoTileMenuOptions,
|
19537
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
19538
|
+
overflowGalleryLayout: overflowGalleryLayout })));
|
19471
19539
|
}, [
|
19472
19540
|
videoGalleryProps,
|
19473
19541
|
props.isMobile,
|
19474
19542
|
onRenderAvatar,
|
19475
19543
|
cameraSwitcherProps,
|
19476
|
-
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions
|
19544
|
+
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions,
|
19545
|
+
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryLayout
|
19477
19546
|
]);
|
19478
|
-
return (React__default['default'].createElement(
|
19547
|
+
return (React__default['default'].createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
|
19479
19548
|
React__default['default'].createElement(Announcer, { announcementString: announcerString, ariaLive: 'polite' }),
|
19480
19549
|
VideoGalleryMemoized));
|
19481
19550
|
};
|
@@ -19505,6 +19574,7 @@ const useLocalVideoStartTrigger = (isLocalVideoAvailable, shouldTransition) => {
|
|
19505
19574
|
}
|
19506
19575
|
}, [shouldTransition, isButtonStatusSynced, isPreviewCameraOn, isLocalVideoAvailable, mediaGalleryHandlers]);
|
19507
19576
|
};
|
19577
|
+
const mediaGalleryContainerStyles = { width: '100%', height: '100%' };
|
19508
19578
|
|
19509
19579
|
// Copyright (c) Microsoft Corporation.
|
19510
19580
|
// Licensed under the MIT license.
|