@azure/communication-react 1.3.2-alpha-202207150016.0 → 1.3.2-alpha-202207200014.0
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/CHANGELOG.md +3 -0
- package/dist/communication-react.d.ts +25 -2
- package/dist/dist-cjs/communication-react/index.js +417 -371
- 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/calling-stateful-client/src/CallClientState.d.ts +4 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +3 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +9 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +5 -2
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +7 -13
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +2 -12
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +30 -7
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +2 -12
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +3 -13
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +16 -2
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.d.ts +13 -0
- package/dist/dist-esm/react-components/src/components/utils/common.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.js +15 -0
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js +3 -5
- package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/icons.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +5 -1
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +40 -17
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +23 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +7 -7
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +28 -28
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +7 -7
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +28 -28
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ModalLocalAndRemotePIP.d.ts +0 -0
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ModalLocalAndRemotePIP.js +0 -0
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/PeoplePaneContent.d.ts +2 -5
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/PeoplePaneContent.js +6 -14
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/SidePaneHeader.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/SidePaneHeader.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/TabHeader.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/TabHeader.js +5 -6
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/MobilePane.styles.d.ts +0 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/MobilePane.styles.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/MobilePane.styles.js +0 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/MobilePane.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/PeoplePaneContent.styles.d.ts +0 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/styles/PeoplePaneContent.styles.js +0 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.js.map +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +8 -7
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ModalLocalAndRemotePIP.d.ts.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ModalLocalAndRemotePIP.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeoplePaneContent.d.ts.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeoplePaneContent.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/SidePaneHeader.d.ts.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/SidePaneHeader.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/TabHeader.d.ts.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/TabHeader.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/MobilePane.styles.d.ts.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/MobilePane.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/PeoplePaneContent.styles.d.ts.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/PeoplePaneContent.styles.js.map +0 -1
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
|
|
191
191
|
// Copyright (c) Microsoft Corporation.
|
192
192
|
// Licensed under the MIT license.
|
193
193
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
194
|
-
var telemetryVersion = '1.3.2-alpha-
|
194
|
+
var telemetryVersion = '1.3.2-alpha-202207200014.0';
|
195
195
|
|
196
196
|
// Copyright (c) Microsoft Corporation.
|
197
197
|
/**
|
@@ -364,7 +364,7 @@ const getCallState = (state, props) => { var _a; return (_a = state.calls[props.
|
|
364
364
|
|
365
365
|
// Copyright (c) Microsoft Corporation.
|
366
366
|
// Licensed under the MIT license.
|
367
|
-
var __awaiter$
|
367
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
368
368
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
369
369
|
return new (P || (P = Promise))(function (resolve, reject) {
|
370
370
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -402,7 +402,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
402
402
|
*
|
403
403
|
* @private
|
404
404
|
*/
|
405
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
405
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$t(void 0, void 0, void 0, function* () {
|
406
406
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
407
407
|
for (const view of unparentedViews) {
|
408
408
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -509,7 +509,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
509
509
|
|
510
510
|
// Copyright (c) Microsoft Corporation.
|
511
511
|
// Licensed under the MIT license.
|
512
|
-
var __awaiter$
|
512
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
513
513
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
514
514
|
return new (P || (P = Promise))(function (resolve, reject) {
|
515
515
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -533,7 +533,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
533
533
|
* @public
|
534
534
|
*/
|
535
535
|
const createDefaultCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
536
|
-
const onStartLocalVideo = () => __awaiter$
|
536
|
+
const onStartLocalVideo = () => __awaiter$s(void 0, void 0, void 0, function* () {
|
537
537
|
// Before the call object creates a stream, dispose of any local preview streams.
|
538
538
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
539
539
|
// of disposing and creating a new stream?
|
@@ -553,7 +553,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
553
553
|
yield call.startVideo(stream);
|
554
554
|
}
|
555
555
|
});
|
556
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
556
|
+
const onStopLocalVideo = (stream) => __awaiter$s(void 0, void 0, void 0, function* () {
|
557
557
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
558
558
|
if (!callId) {
|
559
559
|
return;
|
@@ -566,7 +566,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
566
566
|
});
|
567
567
|
}
|
568
568
|
});
|
569
|
-
const onToggleCamera = (options) => __awaiter$
|
569
|
+
const onToggleCamera = (options) => __awaiter$s(void 0, void 0, void 0, function* () {
|
570
570
|
if (call && _isInCall(call.state)) {
|
571
571
|
const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
572
572
|
if (stream) {
|
@@ -596,19 +596,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
596
596
|
const onStartCall = (participants, options) => {
|
597
597
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
598
598
|
};
|
599
|
-
const onSelectMicrophone = (device) => __awaiter$
|
599
|
+
const onSelectMicrophone = (device) => __awaiter$s(void 0, void 0, void 0, function* () {
|
600
600
|
if (!deviceManager) {
|
601
601
|
return;
|
602
602
|
}
|
603
603
|
return deviceManager.selectMicrophone(device);
|
604
604
|
});
|
605
|
-
const onSelectSpeaker = (device) => __awaiter$
|
605
|
+
const onSelectSpeaker = (device) => __awaiter$s(void 0, void 0, void 0, function* () {
|
606
606
|
if (!deviceManager) {
|
607
607
|
return;
|
608
608
|
}
|
609
609
|
return deviceManager.selectSpeaker(device);
|
610
610
|
});
|
611
|
-
const onSelectCamera = (device, options) => __awaiter$
|
611
|
+
const onSelectCamera = (device, options) => __awaiter$s(void 0, void 0, void 0, function* () {
|
612
612
|
if (!deviceManager) {
|
613
613
|
return;
|
614
614
|
}
|
@@ -631,19 +631,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
631
631
|
}, options);
|
632
632
|
}
|
633
633
|
});
|
634
|
-
const onToggleMicrophone = () => __awaiter$
|
634
|
+
const onToggleMicrophone = () => __awaiter$s(void 0, void 0, void 0, function* () {
|
635
635
|
if (!call || !_isInCall(call.state)) {
|
636
636
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
637
637
|
}
|
638
638
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
639
639
|
});
|
640
|
-
const onStartScreenShare = () => __awaiter$
|
641
|
-
const onStopScreenShare = () => __awaiter$
|
642
|
-
const onToggleScreenShare = () => __awaiter$
|
643
|
-
const onHangUp = () => __awaiter$
|
640
|
+
const onStartScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
641
|
+
const onStopScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
642
|
+
const onToggleScreenShare = () => __awaiter$s(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
643
|
+
const onHangUp = () => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
|
644
644
|
/* @conditional-compile-remove(PSTN-calls) */
|
645
|
-
const onToggleHold = () => __awaiter$
|
646
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
645
|
+
const onToggleHold = () => __awaiter$s(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()); });
|
646
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$s(void 0, void 0, void 0, function* () {
|
647
647
|
var _a;
|
648
648
|
if (!call || call.localVideoStreams.length === 0) {
|
649
649
|
return;
|
@@ -659,7 +659,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
659
659
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
660
660
|
return view ? { view } : undefined;
|
661
661
|
});
|
662
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
662
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$s(void 0, void 0, void 0, function* () {
|
663
663
|
if (!call) {
|
664
664
|
return;
|
665
665
|
}
|
@@ -687,7 +687,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
687
687
|
}
|
688
688
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
689
689
|
});
|
690
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
690
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$s(void 0, void 0, void 0, function* () {
|
691
691
|
if (!call) {
|
692
692
|
return;
|
693
693
|
}
|
@@ -708,7 +708,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
708
708
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
709
709
|
}
|
710
710
|
});
|
711
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
711
|
+
const onDisposeLocalStreamView = () => __awaiter$s(void 0, void 0, void 0, function* () {
|
712
712
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
713
713
|
const callState = call && callClient.getState().calls[call.id];
|
714
714
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -720,11 +720,11 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
720
720
|
// TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
|
721
721
|
yield disposeAllLocalPreviewViews(callClient);
|
722
722
|
});
|
723
|
-
const onRemoveParticipant = (userId) => __awaiter$
|
723
|
+
const onRemoveParticipant = (userId) => __awaiter$s(void 0, void 0, void 0, function* () {
|
724
724
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(fromFlatCommunicationIdentifier(userId)));
|
725
725
|
});
|
726
726
|
/* @conditional-compile-remove(PSTN-calls) */
|
727
|
-
const onAddParticipant = (participant, options) => __awaiter$
|
727
|
+
const onAddParticipant = (participant, options) => __awaiter$s(void 0, void 0, void 0, function* () {
|
728
728
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
729
729
|
yield (call === null || call === void 0 ? void 0 : call.addParticipant(participant, options));
|
730
730
|
}
|
@@ -733,7 +733,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
733
733
|
}
|
734
734
|
});
|
735
735
|
/* @conditional-compile-remove(dialpad) */
|
736
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
736
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$s(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
737
737
|
return {
|
738
738
|
onHangUp,
|
739
739
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -931,7 +931,7 @@ const typingIndicatorStringStyle = react.mergeStyles({
|
|
931
931
|
wordBreak: 'break-word'
|
932
932
|
});
|
933
933
|
|
934
|
-
var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant"};var typingIndicator$d={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$d={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait.",removeFile:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed"};var messageStatusIndicator$d={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$d={label:"Leave",tooltipContent:"Leave Call"};var cameraButton$d={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off"};var microphoneButton$d={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off"};var devicesButton$d={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose Audio Device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker"};var participantsButton$d={label:"People",tooltipContent:"Show Participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link"};var screenShareButton$d={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$d={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{author} said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadFile:"Download file"};var errorBar$d={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link."};var videoGallery$d={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed Participant"};var dialpad$d={placeholderText:"Enter a number"};var HoldButton$e={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};var en_US$1 = {participantItem:participantItem$d,typingIndicator:typingIndicator$d,sendBox:sendBox$d,messageStatusIndicator:messageStatusIndicator$d,endCallButton:endCallButton$d,cameraButton:cameraButton$d,microphoneButton:microphoneButton$d,devicesButton:devicesButton$d,participantsButton:participantsButton$d,screenShareButton:screenShareButton$d,messageThread:messageThread$d,errorBar:errorBar$d,videoGallery:videoGallery$d,dialpad:dialpad$d,HoldButton:HoldButton$e};
|
934
|
+
var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant"};var typingIndicator$d={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$d={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait.",removeFile:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed"};var messageStatusIndicator$d={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$d={label:"Leave",tooltipContent:"Leave Call"};var cameraButton$d={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off"};var microphoneButton$d={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off"};var devicesButton$d={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose Audio Device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker"};var participantsButton$d={label:"People",tooltipContent:"Show Participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link"};var screenShareButton$d={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$d={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{author} said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadFile:"Download file"};var errorBar$d={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link."};var videoGallery$d={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed Participant"};var dialpad$d={placeholderText:"Enter a number",deleteButtonAriaLabel:"Delete"};var HoldButton$e={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};var en_US$1 = {participantItem:participantItem$d,typingIndicator:typingIndicator$d,sendBox:sendBox$d,messageStatusIndicator:messageStatusIndicator$d,endCallButton:endCallButton$d,cameraButton:cameraButton$d,microphoneButton:microphoneButton$d,devicesButton:devicesButton$d,participantsButton:participantsButton$d,screenShareButton:screenShareButton$d,messageThread:messageThread$d,errorBar:errorBar$d,videoGallery:videoGallery$d,dialpad:dialpad$d,HoldButton:HoldButton$e};
|
935
935
|
|
936
936
|
var participantItem$c={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant"};var typingIndicator$c={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$c={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait."};var messageStatusIndicator$c={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$c={label:"Leave",tooltipContent:"Leave Call"};var cameraButton$c={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off"};var microphoneButton$c={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off"};var devicesButton$c={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose Camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose Audio Device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose Microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose Speaker"};var participantsButton$c={label:"People",tooltipContent:"Show Participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link"};var screenShareButton$c={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$c={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options"};var errorBar$c={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneMutedBySystem:"You are muted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link."};var videoGallery$c={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed Participant"};var dialpad$c={placeholderText:"Enter a number"};var HoldButton$d={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};var en_GB$1 = {participantItem:participantItem$c,typingIndicator:typingIndicator$c,sendBox:sendBox$c,messageStatusIndicator:messageStatusIndicator$c,endCallButton:endCallButton$c,cameraButton:cameraButton$c,microphoneButton:microphoneButton$c,devicesButton:devicesButton$c,participantsButton:participantsButton$c,screenShareButton:screenShareButton$c,messageThread:messageThread$c,errorBar:errorBar$c,videoGallery:videoGallery$c,dialpad:dialpad$c,HoldButton:HoldButton$d};
|
937
937
|
|
@@ -1917,7 +1917,9 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
1917
1917
|
ResumeCall: React__default['default'].createElement(reactIcons.Play20Filled, null),
|
1918
1918
|
SendBoxSend: React__default['default'].createElement(reactIcons.Send20Regular, null),
|
1919
1919
|
SendBoxSendHovered: React__default['default'].createElement(reactIcons.Send20Filled, null),
|
1920
|
-
VideoTileMicOff: React__default['default'].createElement(reactIcons.MicOff16Filled, null)
|
1920
|
+
VideoTileMicOff: React__default['default'].createElement(reactIcons.MicOff16Filled, null),
|
1921
|
+
/* @conditional-compile-remove(dialpad) */
|
1922
|
+
BackSpace: React__default['default'].createElement(reactIcons.Backspace20Regular, null)
|
1921
1923
|
};
|
1922
1924
|
|
1923
1925
|
// Copyright (c) Microsoft Corporation.
|
@@ -3278,21 +3280,15 @@ const ChatMessageActionFlyout = (props) => {
|
|
3278
3280
|
messageReadByList
|
3279
3281
|
]);
|
3280
3282
|
// gap space uses pixels
|
3281
|
-
return (React__default['default'].createElement(react.ContextualMenu, { id: "chat-composite-message-contextual-menu", alignTargetEdge: true, gapSpace: 5 /*px*/, isBeakVisible: false, items: menuItems, hidden: props.hidden, target: props.target, onDismiss: props.onDismiss, directionalHint: react.DirectionalHint.topRightEdge, className: chatMessageMenuStyle }));
|
3283
|
+
return (React__default['default'].createElement(react.ContextualMenu, { id: "chat-composite-message-contextual-menu", alignTargetEdge: true, gapSpace: 5 /*px*/, isBeakVisible: false, items: menuItems, hidden: props.hidden, target: props.target, onDismiss: props.onDismiss, directionalHint: react.DirectionalHint.topRightEdge, className: chatMessageMenuStyle, calloutProps: preventUnwantedDismissProps }));
|
3282
3284
|
};
|
3285
|
+
/**
|
3286
|
+
* Similar to {@link preventDismissOnEvent}, but not prevent dismissing from scrolling, since it is causing bugs in chat thread.
|
3287
|
+
*/
|
3283
3288
|
const preventUnwantedDismissProps = {
|
3284
|
-
|
3285
|
-
|
3286
|
-
|
3287
|
-
// by the headless SDK.
|
3288
|
-
// - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
|
3289
|
-
// of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
|
3290
|
-
// deterministically avoid dismissal.
|
3291
|
-
//
|
3292
|
-
// A side effect of this workaround is that the context menu stays open when window is resized, and may
|
3293
|
-
// get detached from original target visually. That bug is preferable to the bug when this value is not set -
|
3294
|
-
// The Callout (frequently) gets dismissed automatically.
|
3295
|
-
preventDismissOnResize: true
|
3289
|
+
preventDismissOnEvent: (ev) => {
|
3290
|
+
return ev.type === 'resize';
|
3291
|
+
}
|
3296
3292
|
};
|
3297
3293
|
|
3298
3294
|
// Copyright (c) Microsoft Corporation.
|
@@ -3376,7 +3372,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
3376
3372
|
return actionMenuProps;
|
3377
3373
|
};
|
3378
3374
|
|
3379
|
-
var __awaiter$
|
3375
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3380
3376
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3381
3377
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3382
3378
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3407,7 +3403,7 @@ const _FileDownloadCards = (props) => {
|
|
3407
3403
|
/* @conditional-compile-remove(file-sharing) */
|
3408
3404
|
localeStrings.downloadFile
|
3409
3405
|
]);
|
3410
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
3406
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$r(void 0, void 0, void 0, function* () {
|
3411
3407
|
if (!props.downloadHandler) {
|
3412
3408
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
3413
3409
|
}
|
@@ -3545,7 +3541,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
3545
3541
|
|
3546
3542
|
// Copyright (c) Microsoft Corporation.
|
3547
3543
|
// Licensed under the MIT license.
|
3548
|
-
var __awaiter$
|
3544
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3549
3545
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3550
3546
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3551
3547
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3579,7 +3575,7 @@ const ChatMessageComponent = (props) => {
|
|
3579
3575
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
3580
3576
|
}
|
3581
3577
|
else if (isEditing) {
|
3582
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
3578
|
+
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* () {
|
3583
3579
|
props.onUpdateMessage &&
|
3584
3580
|
props.message.messageId &&
|
3585
3581
|
(yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
|
@@ -3605,6 +3601,21 @@ const ChatMessageComponent = (props) => {
|
|
3605
3601
|
const convertRemToPx = (rem) => {
|
3606
3602
|
return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
|
3607
3603
|
};
|
3604
|
+
/**
|
3605
|
+
* Converts units of rem to units of pixels
|
3606
|
+
* @private
|
3607
|
+
* Disable dismiss on resize to work around a couple Fluent UI bugs
|
3608
|
+
* - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
|
3609
|
+
* happens when we change the VideoGallery layout, or even when the video stream element is internally resized
|
3610
|
+
* by the headless SDK.
|
3611
|
+
* - We also want to prevent dismiss when chat pane is scrolling especially a new message is added.
|
3612
|
+
* A side effect of this workaround is that the context menu stays open when window is resized, and may
|
3613
|
+
* get detached from original target visually. That bug is preferable to the bug when this value is not set -
|
3614
|
+
* The Callout (frequently) gets dismissed automatically.
|
3615
|
+
*/
|
3616
|
+
const preventDismissOnEvent = (ev) => {
|
3617
|
+
return ev.type === 'resize' || ev.type === 'scroll';
|
3618
|
+
};
|
3608
3619
|
|
3609
3620
|
// Copyright (c) Microsoft Corporation.
|
3610
3621
|
/**
|
@@ -3689,7 +3700,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
|
3689
3700
|
|
3690
3701
|
// Copyright (c) Microsoft Corporation.
|
3691
3702
|
// Licensed under the MIT license.
|
3692
|
-
var __awaiter$
|
3703
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3693
3704
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3694
3705
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3695
3706
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3916,7 +3927,7 @@ const MessageThread = (props) => {
|
|
3916
3927
|
setChatMessagesInitialized(chatMessagesInitialized);
|
3917
3928
|
};
|
3918
3929
|
// we try to only send those message status if user is scrolled to the bottom.
|
3919
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
3930
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
3920
3931
|
if (!isAtBottomOfScrollRef.current ||
|
3921
3932
|
!document.hasFocus() ||
|
3922
3933
|
!messagesRef.current ||
|
@@ -3967,7 +3978,7 @@ const MessageThread = (props) => {
|
|
3967
3978
|
setIsAtBottomOfScrollRef(atBottom);
|
3968
3979
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
3969
3980
|
// Infinite scrolling + threadInitialize function
|
3970
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
3981
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
3971
3982
|
if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
|
3972
3983
|
if (onLoadPreviousChatMessages) {
|
3973
3984
|
isLoadingChatMessagesRef.current = true;
|
@@ -4413,18 +4424,7 @@ const ParticipantItem = (props) => {
|
|
4413
4424
|
menuItems && menuItems.length > 0 && (React__default['default'].createElement(React__default['default'].Fragment, null,
|
4414
4425
|
menuButton,
|
4415
4426
|
React__default['default'].createElement(react.ContextualMenu, { items: menuItems, hidden: menuHidden, target: containerRef, onItemClick: onDismissMenu, onDismiss: onDismissMenu, directionalHint: react.DirectionalHint.bottomRightEdge, className: contextualMenuStyle, calloutProps: {
|
4416
|
-
|
4417
|
-
// - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
|
4418
|
-
// happens when we change the VideoGallery layout, or even when the video stream element is internally resized
|
4419
|
-
// by the headless SDK.
|
4420
|
-
// - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
|
4421
|
-
// of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
|
4422
|
-
// deterministically avoid dismissal.
|
4423
|
-
//
|
4424
|
-
// A side effect of this workaround is that the context menu stays open when window is resized, and may
|
4425
|
-
// get detached from original target visually. That bug is preferable to the bug when this value is not set -
|
4426
|
-
// The Callout (frequently) gets dismissed automatically.
|
4427
|
-
preventDismissOnResize: true
|
4427
|
+
preventDismissOnEvent
|
4428
4428
|
} })))));
|
4429
4429
|
};
|
4430
4430
|
|
@@ -6464,18 +6464,7 @@ const generateDefaultDeviceMenuProps = (props, strings) => {
|
|
6464
6464
|
maxWidth: '95%'
|
6465
6465
|
}
|
6466
6466
|
},
|
6467
|
-
|
6468
|
-
// - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
|
6469
|
-
// happens when we change the VideoGallery layout, or even when the video stream element is internally resized
|
6470
|
-
// by the headless SDK.
|
6471
|
-
// - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
|
6472
|
-
// of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
|
6473
|
-
// deterministically avoid dismissal.
|
6474
|
-
//
|
6475
|
-
// A side effect of this workaround is that the context menu stays open when window is resized, and may
|
6476
|
-
// get detached from original target visually. That bug is preferable to the bug when this value is not set -
|
6477
|
-
// The Callout (frequently) gets dismissed automatically.
|
6478
|
-
preventDismissOnResize: true
|
6467
|
+
preventDismissOnEvent
|
6479
6468
|
}
|
6480
6469
|
};
|
6481
6470
|
const menuItemStyles = react.merge(buttonFlyoutItemStyles, (_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.menuItemStyles) !== null && _b !== void 0 ? _b : {});
|
@@ -6588,7 +6577,7 @@ const DevicesButton = (props) => {
|
|
6588
6577
|
|
6589
6578
|
// Copyright (c) Microsoft Corporation.
|
6590
6579
|
// Licensed under the MIT license.
|
6591
|
-
var __awaiter$
|
6580
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6592
6581
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6593
6582
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6594
6583
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6625,7 +6614,7 @@ const CameraButton = (props) => {
|
|
6625
6614
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
6626
6615
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
6627
6616
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
6628
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
6617
|
+
const onToggleClick = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
|
6629
6618
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
6630
6619
|
if (onToggleCamera) {
|
6631
6620
|
setWaitForCamera(true);
|
@@ -6757,7 +6746,7 @@ const lightThemeCallButtonStyles = {
|
|
6757
6746
|
|
6758
6747
|
// Copyright (c) Microsoft Corporation.
|
6759
6748
|
// Licensed under the MIT license.
|
6760
|
-
var __awaiter$
|
6749
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6761
6750
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6762
6751
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6763
6752
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6798,7 +6787,7 @@ const MicrophoneButton = (props) => {
|
|
6798
6787
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
6799
6788
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
6800
6789
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
6801
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
6790
|
+
const onToggleClick = React.useCallback(() => __awaiter$n(void 0, void 0, void 0, function* () {
|
6802
6791
|
if (onToggleMicrophone) {
|
6803
6792
|
try {
|
6804
6793
|
yield onToggleMicrophone();
|
@@ -6899,18 +6888,7 @@ const ParticipantsButton = (props) => {
|
|
6899
6888
|
styles: react.merge(participantsButtonMenuPropsStyle, styles === null || styles === void 0 ? void 0 : styles.menuStyles),
|
6900
6889
|
items: [],
|
6901
6890
|
calloutProps: {
|
6902
|
-
|
6903
|
-
// - The Callout is dismissed whenever *any child of window (inclusive)* is resized. In practice, this
|
6904
|
-
// happens when we change the VideoGallery layout, or even when the video stream element is internally resized
|
6905
|
-
// by the headless SDK.
|
6906
|
-
// - There is a `preventDismissOnEvent` prop that we could theoretically use to only dismiss when the target of
|
6907
|
-
// of the 'resize' event is the window itself. But experimentation shows that setting that prop doesn't
|
6908
|
-
// deterministically avoid dismissal.
|
6909
|
-
//
|
6910
|
-
// A side effect of this workaround is that the context menu stays open when window is resized, and may
|
6911
|
-
// get detached from original target visually. That bug is preferable to the bug when this value is not set -
|
6912
|
-
// The Callout (frequently) gets dismissed automatically.
|
6913
|
-
preventDismissOnResize: true
|
6891
|
+
preventDismissOnEvent
|
6914
6892
|
}
|
6915
6893
|
};
|
6916
6894
|
if (participantCount > 0) {
|
@@ -6939,7 +6917,7 @@ const ParticipantsButton = (props) => {
|
|
6939
6917
|
},
|
6940
6918
|
// Disable dismiss on resize to work around a couple Fluent UI bugs
|
6941
6919
|
// See reasoning in the props for the parent menu.
|
6942
|
-
|
6920
|
+
preventDismissOnEvent
|
6943
6921
|
}
|
6944
6922
|
},
|
6945
6923
|
'data-ui-id': ids.participantButtonPeopleMenuItem
|
@@ -7530,8 +7508,9 @@ const primaryContentStyles = (theme) => {
|
|
7530
7508
|
const textFieldStyles = (theme) => ({
|
7531
7509
|
field: {
|
7532
7510
|
padding: 0,
|
7533
|
-
textAlign: '
|
7534
|
-
fontSize: '0.875rem'
|
7511
|
+
textAlign: 'left',
|
7512
|
+
fontSize: '0.875rem',
|
7513
|
+
paddingLeft: '0.5rem'
|
7535
7514
|
},
|
7536
7515
|
root: {
|
7537
7516
|
backgroundColor: `${theme.palette.neutralLighter}`,
|
@@ -7544,6 +7523,9 @@ const textFieldStyles = (theme) => ({
|
|
7544
7523
|
},
|
7545
7524
|
errorMessage: {
|
7546
7525
|
color: theme.semanticColors.errorText
|
7526
|
+
},
|
7527
|
+
suffix: {
|
7528
|
+
padding: 0
|
7547
7529
|
}
|
7548
7530
|
});
|
7549
7531
|
/**
|
@@ -7558,19 +7540,27 @@ const secondaryContentStyles = (theme) => {
|
|
7558
7540
|
minHeight: '0.75rem'
|
7559
7541
|
};
|
7560
7542
|
};
|
7543
|
+
/**
|
7544
|
+
* @private
|
7545
|
+
*/
|
7546
|
+
const iconButtonStyles = (theme) => {
|
7547
|
+
return {
|
7548
|
+
root: {
|
7549
|
+
color: `${theme.palette.black}`
|
7550
|
+
}
|
7551
|
+
};
|
7552
|
+
};
|
7561
7553
|
|
7562
7554
|
// Copyright (c) Microsoft Corporation.
|
7563
7555
|
// Licensed under the MIT license.
|
7564
7556
|
/**
|
7565
7557
|
* @private
|
7566
7558
|
*/
|
7567
|
-
const formatPhoneNumber = (
|
7559
|
+
const formatPhoneNumber = (phoneNumber) => {
|
7568
7560
|
// if input value is falsy eg if the user deletes the input, then just return
|
7569
|
-
if (!
|
7570
|
-
return
|
7561
|
+
if (!phoneNumber) {
|
7562
|
+
return phoneNumber;
|
7571
7563
|
}
|
7572
|
-
// clean the input for any non-digit values.
|
7573
|
-
let phoneNumber = value.replace(/[^\d*#+]/g, '');
|
7574
7564
|
// if phone number starts with 1, format like 1 (xxx)xxx-xxxx.
|
7575
7565
|
// if phone number starts with +, we format like +x (xxx)xxx-xxxx.
|
7576
7566
|
// For now we are only supporting NA phone number formatting with country code +x
|
@@ -7655,8 +7645,14 @@ const DialpadContainer = (props) => {
|
|
7655
7645
|
const theme = react.useTheme();
|
7656
7646
|
const [textValue, setTextValue] = React.useState('');
|
7657
7647
|
const { onSendDtmfTone, onClickDialpadButton, onDisplayDialpadInput, onChange } = props;
|
7648
|
+
const sanitizeInput = (input) => {
|
7649
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7650
|
+
return input.replace(/[^\d*#+]/g, '');
|
7651
|
+
};
|
7658
7652
|
const onClickDialpad = (input, index) => {
|
7659
|
-
|
7653
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7654
|
+
const value = sanitizeInput(textValue + input);
|
7655
|
+
setTextValue(value);
|
7660
7656
|
if (onSendDtmfTone) {
|
7661
7657
|
onSendDtmfTone(DtmfTones[index]);
|
7662
7658
|
}
|
@@ -7664,24 +7660,39 @@ const DialpadContainer = (props) => {
|
|
7664
7660
|
onClickDialpadButton(input, index);
|
7665
7661
|
}
|
7666
7662
|
if (onChange) {
|
7667
|
-
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(
|
7663
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(value) : formatPhoneNumber(value));
|
7668
7664
|
}
|
7669
7665
|
};
|
7670
7666
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7671
7667
|
const setText = (e) => {
|
7672
|
-
|
7668
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7669
|
+
const input = sanitizeInput(e.target.value);
|
7670
|
+
setTextValue(input);
|
7673
7671
|
};
|
7672
|
+
// Potential Improvement:
|
7674
7673
|
// comment out the following line for now to disable customization for dialpad content
|
7675
7674
|
// const dialpadButtonsContent = props.dialpadButtons ?? dialPadButtonsDefault;
|
7675
|
+
const deleteNumbers = () => {
|
7676
|
+
const modifiedInput = textValue.substring(0, textValue.length - 1);
|
7677
|
+
setTextValue(modifiedInput);
|
7678
|
+
if (onChange) {
|
7679
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(modifiedInput) : formatPhoneNumber(modifiedInput));
|
7680
|
+
}
|
7681
|
+
};
|
7676
7682
|
return (React__default['default'].createElement("div", { className: react.mergeStyles(containerStyles$1(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer" },
|
7677
7683
|
React__default['default'].createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: onDisplayDialpadInput ? onDisplayDialpadInput(textValue) : formatPhoneNumber(textValue),
|
7678
7684
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7679
7685
|
onChange: (e) => {
|
7680
7686
|
setText(e);
|
7687
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7688
|
+
const input = sanitizeInput(e.target.value);
|
7681
7689
|
if (onChange) {
|
7682
|
-
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(
|
7690
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(input) : formatPhoneNumber(input));
|
7683
7691
|
}
|
7684
|
-
}, placeholder: props.placeholderText, "data-test-id": "dialpad-input"
|
7692
|
+
}, placeholder: props.strings.placeholderText, "data-test-id": "dialpad-input", onRenderSuffix: () => {
|
7693
|
+
var _a;
|
7694
|
+
return (React__default['default'].createElement(React__default['default'].Fragment, null, textValue.length !== 0 && (React__default['default'].createElement(react.IconButton, { ariaLabel: props.strings.deleteButtonAriaLabel, onClick: deleteNumbers, styles: react.concatStyleSets(iconButtonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.deleteIcon), iconProps: { iconName: 'BackSpace' } }))));
|
7695
|
+
} }),
|
7685
7696
|
React__default['default'].createElement(react.FocusZone, null, dialPadButtonsDefault.map((rows, rowIndex) => {
|
7686
7697
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, key: `row_${rowIndex}`, horizontalAlign: "stretch" }, rows.map((button, columnIndex) => (React__default['default'].createElement(DialpadButton, { key: `button_${columnIndex}`,
|
7687
7698
|
/* row index = 0
|
@@ -7717,7 +7728,7 @@ const Dialpad = (props) => {
|
|
7717
7728
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
7718
7729
|
return (React__default['default'].createElement(React__default['default'].Fragment, null,
|
7719
7730
|
/* @conditional-compile-remove(dialpad) */
|
7720
|
-
React__default['default'].createElement(DialpadContainer, Object.assign({
|
7731
|
+
React__default['default'].createElement(DialpadContainer, Object.assign({ strings: strings }, props))));
|
7721
7732
|
};
|
7722
7733
|
|
7723
7734
|
// Copyright (c) Microsoft Corporation.
|
@@ -8180,7 +8191,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
8180
8191
|
|
8181
8192
|
// Copyright (c) Microsoft Corporation.
|
8182
8193
|
// Licensed under the MIT license.
|
8183
|
-
var __awaiter$
|
8194
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8184
8195
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8185
8196
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8186
8197
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8203,35 +8214,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
8203
8214
|
let messageIterator = undefined;
|
8204
8215
|
let readReceiptIterator = undefined;
|
8205
8216
|
return {
|
8206
|
-
onSendMessage: (content, options) => __awaiter$
|
8217
|
+
onSendMessage: (content, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8207
8218
|
const sendMessageRequest = {
|
8208
8219
|
content,
|
8209
8220
|
senderDisplayName: chatClient.getState().displayName
|
8210
8221
|
};
|
8211
8222
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
8212
8223
|
}),
|
8213
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
8224
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8214
8225
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
8215
8226
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
8216
8227
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
8217
8228
|
}),
|
8218
|
-
onDeleteMessage: (messageId) => __awaiter$
|
8229
|
+
onDeleteMessage: (messageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8219
8230
|
yield chatThreadClient.deleteMessage(messageId);
|
8220
8231
|
}),
|
8221
8232
|
// This handler is designed for chatThread to consume
|
8222
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
8233
|
+
onMessageSeen: (chatMessageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8223
8234
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
8224
8235
|
}),
|
8225
|
-
onTyping: () => __awaiter$
|
8236
|
+
onTyping: () => __awaiter$m(void 0, void 0, void 0, function* () {
|
8226
8237
|
yield chatThreadClient.sendTypingNotification();
|
8227
8238
|
}),
|
8228
|
-
onRemoveParticipant: (userId) => __awaiter$
|
8239
|
+
onRemoveParticipant: (userId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8229
8240
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
8230
8241
|
}),
|
8231
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
8242
|
+
updateThreadTopicName: (topicName) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8232
8243
|
yield chatThreadClient.updateTopic(topicName);
|
8233
8244
|
}),
|
8234
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
8245
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8235
8246
|
var _a, _b, _c;
|
8236
8247
|
if (messageIterator === undefined) {
|
8237
8248
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -8922,7 +8933,7 @@ const findSelector = (component) => {
|
|
8922
8933
|
|
8923
8934
|
// Copyright (c) Microsoft Corporation.
|
8924
8935
|
// Licensed under the MIT license.
|
8925
|
-
var __awaiter$
|
8936
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8926
8937
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8927
8938
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8928
8939
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8971,10 +8982,10 @@ class ProxyDeviceManager {
|
|
8971
8982
|
this.selectCamera = (videoDeviceInfo) => {
|
8972
8983
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
8973
8984
|
};
|
8974
|
-
this.videoDevicesUpdated = () => __awaiter$
|
8985
|
+
this.videoDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
|
8975
8986
|
this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
|
8976
8987
|
});
|
8977
|
-
this.audioDevicesUpdated = () => __awaiter$
|
8988
|
+
this.audioDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
|
8978
8989
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
8979
8990
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
8980
8991
|
});
|
@@ -9171,7 +9182,7 @@ class CallIdHistory {
|
|
9171
9182
|
|
9172
9183
|
// Copyright (c) Microsoft Corporation.
|
9173
9184
|
// Licensed under the MIT license.
|
9174
|
-
var __awaiter$
|
9185
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9175
9186
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9176
9187
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9177
9188
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9192,7 +9203,8 @@ const MAX_CALL_HISTORY_LENGTH = 10;
|
|
9192
9203
|
* @private
|
9193
9204
|
*/
|
9194
9205
|
class CallContext$1 {
|
9195
|
-
constructor(userId, maxListeners = 50
|
9206
|
+
constructor(userId, maxListeners = 50,
|
9207
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId) {
|
9196
9208
|
this._callIdHistory = new CallIdHistory();
|
9197
9209
|
this._logger = logger.createClientLogger('communication-react:calling-context');
|
9198
9210
|
this._state = {
|
@@ -9209,6 +9221,7 @@ class CallContext$1 {
|
|
9209
9221
|
},
|
9210
9222
|
callAgent: undefined,
|
9211
9223
|
userId: userId,
|
9224
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId: alternativeCallerId,
|
9212
9225
|
latestErrors: {}
|
9213
9226
|
};
|
9214
9227
|
this._emitter = new EventEmitter__default['default']();
|
@@ -9654,7 +9667,7 @@ class CallContext$1 {
|
|
9654
9667
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
9655
9668
|
*/
|
9656
9669
|
withAsyncErrorTeedToState(action, target) {
|
9657
|
-
return (...args) => __awaiter$
|
9670
|
+
return (...args) => __awaiter$k(this, void 0, void 0, function* () {
|
9658
9671
|
try {
|
9659
9672
|
return yield action(...args);
|
9660
9673
|
}
|
@@ -9718,7 +9731,7 @@ const findOldestCallEnded = (calls) => {
|
|
9718
9731
|
|
9719
9732
|
// Copyright (c) Microsoft Corporation.
|
9720
9733
|
// Licensed under the MIT license.
|
9721
|
-
var __awaiter$
|
9734
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9722
9735
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9723
9736
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9724
9737
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9738,63 +9751,63 @@ class ProxyCall {
|
|
9738
9751
|
switch (prop) {
|
9739
9752
|
case 'mute': {
|
9740
9753
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9741
|
-
return __awaiter$
|
9754
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9742
9755
|
return yield target.mute(...args);
|
9743
9756
|
});
|
9744
9757
|
}, 'Call.mute');
|
9745
9758
|
}
|
9746
9759
|
case 'unmute': {
|
9747
9760
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9748
|
-
return __awaiter$
|
9761
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9749
9762
|
return yield target.unmute(...args);
|
9750
9763
|
});
|
9751
9764
|
}, 'Call.unmute');
|
9752
9765
|
}
|
9753
9766
|
case 'startVideo': {
|
9754
9767
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9755
|
-
return __awaiter$
|
9768
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9756
9769
|
return yield target.startVideo(...args);
|
9757
9770
|
});
|
9758
9771
|
}, 'Call.startVideo');
|
9759
9772
|
}
|
9760
9773
|
case 'stopVideo': {
|
9761
9774
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9762
|
-
return __awaiter$
|
9775
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9763
9776
|
return yield target.stopVideo(...args);
|
9764
9777
|
});
|
9765
9778
|
}, 'Call.stopVideo');
|
9766
9779
|
}
|
9767
9780
|
case 'startScreenSharing': {
|
9768
9781
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9769
|
-
return __awaiter$
|
9782
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9770
9783
|
return yield target.startScreenSharing(...args);
|
9771
9784
|
});
|
9772
9785
|
}, 'Call.startScreenSharing');
|
9773
9786
|
}
|
9774
9787
|
case 'stopScreenSharing': {
|
9775
9788
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9776
|
-
return __awaiter$
|
9789
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9777
9790
|
return yield target.stopScreenSharing(...args);
|
9778
9791
|
});
|
9779
9792
|
}, 'Call.stopScreenSharing');
|
9780
9793
|
}
|
9781
9794
|
case 'hold': {
|
9782
9795
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9783
|
-
return __awaiter$
|
9796
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9784
9797
|
return yield target.hold(...args);
|
9785
9798
|
});
|
9786
9799
|
}, 'Call.hold');
|
9787
9800
|
}
|
9788
9801
|
case 'resume': {
|
9789
9802
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9790
|
-
return __awaiter$
|
9803
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9791
9804
|
return yield target.resume(...args);
|
9792
9805
|
});
|
9793
9806
|
}, 'Call.resume');
|
9794
9807
|
}
|
9795
9808
|
case 'addParticipant': {
|
9796
9809
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9797
|
-
return __awaiter$
|
9810
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9798
9811
|
return yield target.addParticipant(...args);
|
9799
9812
|
});
|
9800
9813
|
}, 'Call.addParticipant');
|
@@ -10002,7 +10015,7 @@ class RemoteVideoStreamSubscriber {
|
|
10002
10015
|
|
10003
10016
|
// Copyright (c) Microsoft Corporation.
|
10004
10017
|
// Licensed under the MIT license.
|
10005
|
-
var __awaiter$
|
10018
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10006
10019
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10007
10020
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10008
10021
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10012,7 +10025,7 @@ var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
10012
10025
|
});
|
10013
10026
|
};
|
10014
10027
|
function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
|
10015
|
-
return __awaiter$
|
10028
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
10016
10029
|
// Render RemoteVideoStream that is part of a Call
|
10017
10030
|
const streamId = stream.id;
|
10018
10031
|
let participantKey;
|
@@ -10120,7 +10133,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
10120
10133
|
});
|
10121
10134
|
}
|
10122
10135
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
10123
|
-
return __awaiter$
|
10136
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
10124
10137
|
_logEvent(callingStatefulLogger, {
|
10125
10138
|
name: EventNames.START_LOCAL_STREAM_RENDERING,
|
10126
10139
|
level: 'info',
|
@@ -10236,7 +10249,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
10236
10249
|
});
|
10237
10250
|
}
|
10238
10251
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
10239
|
-
return __awaiter$
|
10252
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
10240
10253
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
10241
10254
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
10242
10255
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -10796,7 +10809,7 @@ class CallSubscriber {
|
|
10796
10809
|
|
10797
10810
|
// Copyright (c) Microsoft Corporation.
|
10798
10811
|
// Licensed under the MIT license.
|
10799
|
-
var __awaiter$
|
10812
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10800
10813
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10801
10814
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10802
10815
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10816,14 +10829,14 @@ class ProxyIncomingCall {
|
|
10816
10829
|
switch (prop) {
|
10817
10830
|
case 'accept': {
|
10818
10831
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10819
|
-
return __awaiter$
|
10832
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
10820
10833
|
return yield target.accept(...args);
|
10821
10834
|
});
|
10822
10835
|
}, 'IncomingCall.accept');
|
10823
10836
|
}
|
10824
10837
|
case 'reject': {
|
10825
10838
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10826
|
-
return __awaiter$
|
10839
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
10827
10840
|
return yield target.reject(...args);
|
10828
10841
|
});
|
10829
10842
|
}, 'IncomingCall.reject');
|
@@ -11161,7 +11174,7 @@ class InternalCallContext {
|
|
11161
11174
|
|
11162
11175
|
// Copyright (c) Microsoft Corporation.
|
11163
11176
|
// Licensed under the MIT license.
|
11164
|
-
var __awaiter$
|
11177
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11165
11178
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11166
11179
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11167
11180
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11183,18 +11196,20 @@ class ProxyCallClient {
|
|
11183
11196
|
get(target, prop) {
|
11184
11197
|
switch (prop) {
|
11185
11198
|
case 'createCallAgent': {
|
11186
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
11199
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
11187
11200
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
11188
11201
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
11189
11202
|
// callAgent if the createCallAgent succeeds.
|
11190
11203
|
const callAgent = yield target.createCallAgent(...args);
|
11191
11204
|
this._callAgent = callAgentDeclaratify(callAgent, this._context, this._internalContext);
|
11192
|
-
this._context.setCallAgent({
|
11205
|
+
this._context.setCallAgent({
|
11206
|
+
displayName: this._callAgent.displayName
|
11207
|
+
});
|
11193
11208
|
return this._callAgent;
|
11194
11209
|
}), 'CallClient.createCallAgent');
|
11195
11210
|
}
|
11196
11211
|
case 'getDeviceManager': {
|
11197
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
11212
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$g(this, void 0, void 0, function* () {
|
11198
11213
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
11199
11214
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
11200
11215
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -11236,7 +11251,8 @@ class ProxyCallClient {
|
|
11236
11251
|
*/
|
11237
11252
|
const createStatefulCallClient = (args, options) => {
|
11238
11253
|
callingStatefulLogger.info(`Creating calling stateful client using library version: ${_getApplicationId()}`);
|
11239
|
-
return createStatefulCallClientWithDeps(new communicationCalling.CallClient(withTelemetryTag(options === null || options === void 0 ? void 0 : options.callClientOptions)), new CallContext$1(communicationCommon.getIdentifierKind(args.userId), options === null || options === void 0 ? void 0 : options.maxStateChangeListeners
|
11254
|
+
return createStatefulCallClientWithDeps(new communicationCalling.CallClient(withTelemetryTag(options === null || options === void 0 ? void 0 : options.callClientOptions)), new CallContext$1(communicationCommon.getIdentifierKind(args.userId), options === null || options === void 0 ? void 0 : options.maxStateChangeListeners,
|
11255
|
+
/* @conditional-compile-remove(PSTN-calls) */ args.alternativeCallerId), new InternalCallContext());
|
11240
11256
|
};
|
11241
11257
|
/**
|
11242
11258
|
* Package-internal version of createStatefulCallClient that allows dependency injection.
|
@@ -11316,7 +11332,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
11316
11332
|
|
11317
11333
|
// Copyright (c) Microsoft Corporation.
|
11318
11334
|
// Licensed under the MIT license.
|
11319
|
-
var __awaiter$
|
11335
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11320
11336
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11321
11337
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11322
11338
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11591,7 +11607,7 @@ class ChatContext$1 {
|
|
11591
11607
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
11592
11608
|
*/
|
11593
11609
|
withAsyncErrorTeedToState(f, target) {
|
11594
|
-
return (...args) => __awaiter$
|
11610
|
+
return (...args) => __awaiter$f(this, void 0, void 0, function* () {
|
11595
11611
|
try {
|
11596
11612
|
return yield f(...args);
|
11597
11613
|
}
|
@@ -11698,7 +11714,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
11698
11714
|
|
11699
11715
|
// Copyright (c) Microsoft Corporation.
|
11700
11716
|
// Licensed under the MIT license.
|
11701
|
-
var __awaiter$
|
11717
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11702
11718
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11703
11719
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11704
11720
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11782,7 +11798,7 @@ class EventSubscriber {
|
|
11782
11798
|
this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
|
11783
11799
|
};
|
11784
11800
|
// This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
|
11785
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
11801
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$e(this, void 0, void 0, function* () {
|
11786
11802
|
var e_1, _a;
|
11787
11803
|
try {
|
11788
11804
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -11868,7 +11884,7 @@ class EventSubscriber {
|
|
11868
11884
|
|
11869
11885
|
// Copyright (c) Microsoft Corporation.
|
11870
11886
|
// Licensed under the MIT license.
|
11871
|
-
var __awaiter$
|
11887
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11872
11888
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11873
11889
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11874
11890
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11890,7 +11906,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
11890
11906
|
const threadsIterator = iteratorCreator(...args);
|
11891
11907
|
return {
|
11892
11908
|
next() {
|
11893
|
-
return __awaiter$
|
11909
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
11894
11910
|
const result = yield threadsIterator.next();
|
11895
11911
|
if (!result.done && result.value) {
|
11896
11912
|
decorateFn(result.value, context);
|
@@ -11905,7 +11921,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
11905
11921
|
const pages = threadsIterator.byPage(settings);
|
11906
11922
|
return {
|
11907
11923
|
next() {
|
11908
|
-
return __awaiter$
|
11924
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
11909
11925
|
const result = yield pages.next();
|
11910
11926
|
const page = result.value;
|
11911
11927
|
if (!result.done && result.value) {
|
@@ -11989,7 +12005,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
11989
12005
|
|
11990
12006
|
// Copyright (c) Microsoft Corporation.
|
11991
12007
|
// Licensed under the MIT license.
|
11992
|
-
var __awaiter$
|
12008
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11993
12009
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11994
12010
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11995
12011
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12008,14 +12024,14 @@ class ProxyChatThreadClient {
|
|
12008
12024
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
12009
12025
|
}
|
12010
12026
|
case 'getMessage': {
|
12011
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12027
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12012
12028
|
const message = yield chatThreadClient.getMessage(...args);
|
12013
12029
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
12014
12030
|
return message;
|
12015
12031
|
}), 'ChatThreadClient.getMessage');
|
12016
12032
|
}
|
12017
12033
|
case 'sendMessage': {
|
12018
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12034
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12019
12035
|
// Retry logic?
|
12020
12036
|
const [request, options] = args;
|
12021
12037
|
const { content } = request;
|
@@ -12055,7 +12071,7 @@ class ProxyChatThreadClient {
|
|
12055
12071
|
}), 'ChatThreadClient.sendMessage');
|
12056
12072
|
}
|
12057
12073
|
case 'addParticipants': {
|
12058
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12074
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12059
12075
|
const result = yield chatThreadClient.addParticipants(...args);
|
12060
12076
|
const [addRequest] = args;
|
12061
12077
|
const participantsToAdd = addRequest.participants;
|
@@ -12064,7 +12080,7 @@ class ProxyChatThreadClient {
|
|
12064
12080
|
}), 'ChatThreadClient.addParticipants');
|
12065
12081
|
}
|
12066
12082
|
case 'deleteMessage': {
|
12067
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12083
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12068
12084
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
12069
12085
|
const [messageId] = args;
|
12070
12086
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -12082,7 +12098,7 @@ class ProxyChatThreadClient {
|
|
12082
12098
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
12083
12099
|
}
|
12084
12100
|
case 'removeParticipant': {
|
12085
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12101
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12086
12102
|
const result = yield chatThreadClient.removeParticipant(...args);
|
12087
12103
|
const [removeIdentifier] = args;
|
12088
12104
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -12090,7 +12106,7 @@ class ProxyChatThreadClient {
|
|
12090
12106
|
}), 'ChatThreadClient.removeParticipant');
|
12091
12107
|
}
|
12092
12108
|
case 'updateMessage': {
|
12093
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12109
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12094
12110
|
const result = yield chatThreadClient.updateMessage(...args);
|
12095
12111
|
const [messageId, updateOption] = args;
|
12096
12112
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -12098,7 +12114,7 @@ class ProxyChatThreadClient {
|
|
12098
12114
|
}), 'ChatThreadClient.updateMessage');
|
12099
12115
|
}
|
12100
12116
|
case 'updateTopic': {
|
12101
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12117
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12102
12118
|
const result = yield chatThreadClient.updateTopic(...args);
|
12103
12119
|
const [topic] = args;
|
12104
12120
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -12106,7 +12122,7 @@ class ProxyChatThreadClient {
|
|
12106
12122
|
}), 'ChatThreadClient.updateTopic');
|
12107
12123
|
}
|
12108
12124
|
case 'getProperties': {
|
12109
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12125
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12110
12126
|
const result = yield chatThreadClient.getProperties(...args);
|
12111
12127
|
this._context.updateThread(chatThreadClient.threadId, result);
|
12112
12128
|
return result;
|
@@ -12143,7 +12159,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
12143
12159
|
|
12144
12160
|
// Copyright (c) Microsoft Corporation.
|
12145
12161
|
// Licensed under the MIT license.
|
12146
|
-
var __awaiter$
|
12162
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12147
12163
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12148
12164
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12149
12165
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12162,7 +12178,7 @@ const proxyChatClient = {
|
|
12162
12178
|
switch (prop) {
|
12163
12179
|
case 'createChatThread': {
|
12164
12180
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12165
|
-
return __awaiter$
|
12181
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12166
12182
|
const result = yield chatClient.createChatThread(...args);
|
12167
12183
|
const thread = result.chatThread;
|
12168
12184
|
if (thread) {
|
@@ -12175,7 +12191,7 @@ const proxyChatClient = {
|
|
12175
12191
|
}
|
12176
12192
|
case 'deleteChatThread': {
|
12177
12193
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12178
|
-
return __awaiter$
|
12194
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12179
12195
|
const result = yield chatClient.deleteChatThread(...args);
|
12180
12196
|
context.deleteThread(args[0]);
|
12181
12197
|
return result;
|
@@ -12195,7 +12211,7 @@ const proxyChatClient = {
|
|
12195
12211
|
}
|
12196
12212
|
case 'startRealtimeNotifications': {
|
12197
12213
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12198
|
-
return __awaiter$
|
12214
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12199
12215
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
12200
12216
|
if (!receiver.eventSubscriber) {
|
12201
12217
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -12206,7 +12222,7 @@ const proxyChatClient = {
|
|
12206
12222
|
}
|
12207
12223
|
case 'stopRealtimeNotifications': {
|
12208
12224
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12209
|
-
return __awaiter$
|
12225
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12210
12226
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
12211
12227
|
if (receiver.eventSubscriber) {
|
12212
12228
|
receiver.eventSubscriber.unsubscribe();
|
@@ -12790,7 +12806,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
12790
12806
|
|
12791
12807
|
// Copyright (c) Microsoft Corporation.
|
12792
12808
|
// Licensed under the MIT license.
|
12793
|
-
var __awaiter$
|
12809
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12794
12810
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12795
12811
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12796
12812
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12916,9 +12932,9 @@ class AzureCommunicationChatAdapter {
|
|
12916
12932
|
this.unsubscribeAllEvents();
|
12917
12933
|
}
|
12918
12934
|
fetchInitialData() {
|
12919
|
-
return __awaiter$
|
12935
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
12920
12936
|
// If get properties fails we dont want to try to get the participants after.
|
12921
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
12937
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12922
12938
|
var e_1, _a;
|
12923
12939
|
yield this.chatThreadClient.getProperties();
|
12924
12940
|
try {
|
@@ -12952,8 +12968,8 @@ class AzureCommunicationChatAdapter {
|
|
12952
12968
|
this.context.offStateChange(handler);
|
12953
12969
|
}
|
12954
12970
|
sendMessage(content, options = {}) {
|
12955
|
-
return __awaiter$
|
12956
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
12971
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
12972
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12957
12973
|
/* @conditional-compile-remove(file-sharing) */
|
12958
12974
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
12959
12975
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -12970,49 +12986,49 @@ class AzureCommunicationChatAdapter {
|
|
12970
12986
|
});
|
12971
12987
|
}
|
12972
12988
|
sendReadReceipt(chatMessageId) {
|
12973
|
-
return __awaiter$
|
12974
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
12989
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
12990
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12975
12991
|
yield this.handlers.onMessageSeen(chatMessageId);
|
12976
12992
|
}));
|
12977
12993
|
});
|
12978
12994
|
}
|
12979
12995
|
sendTypingIndicator() {
|
12980
|
-
return __awaiter$
|
12996
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
12981
12997
|
yield this.handlers.onTyping();
|
12982
12998
|
});
|
12983
12999
|
}
|
12984
13000
|
removeParticipant(userId) {
|
12985
|
-
return __awaiter$
|
12986
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13001
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13002
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12987
13003
|
yield this.handlers.onRemoveParticipant(userId);
|
12988
13004
|
}));
|
12989
13005
|
});
|
12990
13006
|
}
|
12991
13007
|
setTopic(topicName) {
|
12992
|
-
return __awaiter$
|
12993
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13008
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13009
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12994
13010
|
yield this.handlers.updateThreadTopicName(topicName);
|
12995
13011
|
}));
|
12996
13012
|
});
|
12997
13013
|
}
|
12998
13014
|
loadPreviousChatMessages(messagesToLoad) {
|
12999
|
-
return __awaiter$
|
13000
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13015
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13016
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
13001
13017
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
13002
13018
|
}));
|
13003
13019
|
});
|
13004
13020
|
}
|
13005
13021
|
updateMessage(messageId, content, metadata, options) {
|
13006
|
-
return __awaiter$
|
13007
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13022
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13023
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
13008
13024
|
/* @conditional-compile-remove(file-sharing) */
|
13009
13025
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
13010
13026
|
}));
|
13011
13027
|
});
|
13012
13028
|
}
|
13013
13029
|
deleteMessage(messageId) {
|
13014
|
-
return __awaiter$
|
13015
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13030
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13031
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
13016
13032
|
return yield this.handlers.onDeleteMessage(messageId);
|
13017
13033
|
}));
|
13018
13034
|
});
|
@@ -13093,7 +13109,7 @@ class AzureCommunicationChatAdapter {
|
|
13093
13109
|
this.emitter.off(event, listener);
|
13094
13110
|
}
|
13095
13111
|
asyncTeeErrorToEventEmitter(f) {
|
13096
|
-
return __awaiter$
|
13112
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13097
13113
|
try {
|
13098
13114
|
return yield f();
|
13099
13115
|
}
|
@@ -13135,7 +13151,7 @@ const convertEventType = (type) => {
|
|
13135
13151
|
*
|
13136
13152
|
* @public
|
13137
13153
|
*/
|
13138
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
13154
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$a(void 0, void 0, void 0, function* () {
|
13139
13155
|
const chatClient = createStatefulChatClient({
|
13140
13156
|
userId,
|
13141
13157
|
displayName,
|
@@ -13198,7 +13214,7 @@ beforeDispose) => {
|
|
13198
13214
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
13199
13215
|
return;
|
13200
13216
|
}
|
13201
|
-
(() => __awaiter$
|
13217
|
+
(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
13202
13218
|
if (adapterRef.current) {
|
13203
13219
|
// Dispose the old adapter when a new one is created.
|
13204
13220
|
//
|
@@ -13230,7 +13246,7 @@ beforeDispose) => {
|
|
13230
13246
|
// Dispose any existing adapter when the component unmounts.
|
13231
13247
|
React.useEffect(() => {
|
13232
13248
|
return () => {
|
13233
|
-
(() => __awaiter$
|
13249
|
+
(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
13234
13250
|
if (adapterRef.current) {
|
13235
13251
|
if (beforeDisposeRef.current) {
|
13236
13252
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -13251,7 +13267,7 @@ beforeDispose) => {
|
|
13251
13267
|
*
|
13252
13268
|
* @public
|
13253
13269
|
*/
|
13254
|
-
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$
|
13270
|
+
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$a(void 0, void 0, void 0, function* () {
|
13255
13271
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
13256
13272
|
});
|
13257
13273
|
const isChatError = (e) => {
|
@@ -13432,7 +13448,7 @@ const sendboxContainerStyles = {
|
|
13432
13448
|
|
13433
13449
|
// Copyright (c) Microsoft Corporation.
|
13434
13450
|
// Licensed under the MIT license.
|
13435
|
-
var __awaiter$
|
13451
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13436
13452
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13437
13453
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13438
13454
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13453,7 +13469,7 @@ const AvatarPersona = (props) => {
|
|
13453
13469
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
13454
13470
|
const [data, setData] = React.useState();
|
13455
13471
|
React.useEffect(() => {
|
13456
|
-
(() => __awaiter$
|
13472
|
+
(() => __awaiter$9(void 0, void 0, void 0, function* () {
|
13457
13473
|
if (dataProvider && userId) {
|
13458
13474
|
const newData = yield dataProvider(userId);
|
13459
13475
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -14128,7 +14144,7 @@ const getCallCompositePage = (call, previousCall) => {
|
|
14128
14144
|
|
14129
14145
|
// Copyright (c) Microsoft Corporation.
|
14130
14146
|
// Licensed under the MIT license.
|
14131
|
-
var __awaiter$
|
14147
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14132
14148
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14133
14149
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14134
14150
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14147,68 +14163,68 @@ _component) => {
|
|
14147
14163
|
return createCompositeHandlers(useAdapter());
|
14148
14164
|
};
|
14149
14165
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
14150
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
14166
|
+
onCreateLocalStreamView: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14151
14167
|
return yield adapter.createStreamView(undefined, options);
|
14152
14168
|
}),
|
14153
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
14169
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14154
14170
|
return yield adapter.createStreamView(userId, options);
|
14155
14171
|
}),
|
14156
|
-
onHangUp: () => __awaiter$
|
14172
|
+
onHangUp: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14157
14173
|
yield adapter.leaveCall();
|
14158
14174
|
}),
|
14159
14175
|
/* @conditional-compile-remove(PSTN-calls) */
|
14160
|
-
onToggleHold: () => __awaiter$
|
14176
|
+
onToggleHold: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14161
14177
|
var _a;
|
14162
14178
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
14163
14179
|
}),
|
14164
14180
|
/* @conditional-compile-remove(PSTN-calls) */
|
14165
|
-
onAddParticipant: (participant, options) => __awaiter$
|
14181
|
+
onAddParticipant: (participant, options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14166
14182
|
return yield adapter.addParticipant(participant, options);
|
14167
14183
|
}),
|
14168
|
-
onRemoveParticipant: (userId) => __awaiter$
|
14184
|
+
onRemoveParticipant: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14169
14185
|
yield adapter.removeParticipant(userId);
|
14170
14186
|
}),
|
14171
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
14187
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14172
14188
|
yield adapter.setCamera(deviceInfo, options);
|
14173
14189
|
}),
|
14174
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
14190
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14175
14191
|
yield adapter.setMicrophone(deviceInfo);
|
14176
14192
|
}),
|
14177
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
14193
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14178
14194
|
yield adapter.setSpeaker(deviceInfo);
|
14179
14195
|
}),
|
14180
14196
|
onStartCall: (participants, options) => {
|
14181
14197
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
14182
14198
|
return adapter.startCall(rawIds, options);
|
14183
14199
|
},
|
14184
|
-
onStartScreenShare: () => __awaiter$
|
14200
|
+
onStartScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14185
14201
|
yield adapter.startScreenShare();
|
14186
14202
|
}),
|
14187
|
-
onStopScreenShare: () => __awaiter$
|
14203
|
+
onStopScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14188
14204
|
yield adapter.stopScreenShare();
|
14189
14205
|
}),
|
14190
|
-
onToggleCamera: (options) => __awaiter$
|
14206
|
+
onToggleCamera: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14191
14207
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
14192
14208
|
}),
|
14193
|
-
onToggleMicrophone: () => __awaiter$
|
14209
|
+
onToggleMicrophone: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14194
14210
|
var _b;
|
14195
14211
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
14196
14212
|
}),
|
14197
|
-
onToggleScreenShare: () => __awaiter$
|
14213
|
+
onToggleScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14198
14214
|
var _c;
|
14199
14215
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
|
14200
14216
|
? yield adapter.stopScreenShare()
|
14201
14217
|
: yield adapter.startScreenShare();
|
14202
14218
|
}),
|
14203
|
-
onStartLocalVideo: () => __awaiter$
|
14219
|
+
onStartLocalVideo: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14204
14220
|
if (adapter.getState().call) {
|
14205
14221
|
return adapter.startCamera();
|
14206
14222
|
}
|
14207
14223
|
}),
|
14208
|
-
onDisposeLocalStreamView: () => __awaiter$
|
14224
|
+
onDisposeLocalStreamView: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14209
14225
|
return adapter.disposeStreamView();
|
14210
14226
|
}),
|
14211
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
14227
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14212
14228
|
return adapter.disposeStreamView(userId);
|
14213
14229
|
})
|
14214
14230
|
}));
|
@@ -15248,7 +15264,7 @@ const localPreviewTileStyle = {
|
|
15248
15264
|
|
15249
15265
|
// Copyright (c) Microsoft Corporation.
|
15250
15266
|
// Licensed under the MIT license.
|
15251
|
-
var __awaiter$
|
15267
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15252
15268
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15253
15269
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15254
15270
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15268,7 +15284,7 @@ const LocalPreview = (props) => {
|
|
15268
15284
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
15269
15285
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
15270
15286
|
const adapter = useAdapter();
|
15271
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
15287
|
+
const onToggleMic = React.useCallback(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
15272
15288
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
15273
15289
|
}), [adapter, isLocalMicrophoneEnabled]);
|
15274
15290
|
const theme = useTheme();
|
@@ -15599,7 +15615,7 @@ const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.as
|
|
15599
15615
|
|
15600
15616
|
// Copyright (c) Microsoft Corporation.
|
15601
15617
|
// Licensed under the MIT license.
|
15602
|
-
var __awaiter$
|
15618
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15603
15619
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15604
15620
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15605
15621
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15646,7 +15662,7 @@ const MainScreen = (props) => {
|
|
15646
15662
|
const CallComposite = (props) => {
|
15647
15663
|
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
|
15648
15664
|
React.useEffect(() => {
|
15649
|
-
(() => __awaiter$
|
15665
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
15650
15666
|
yield adapter.askDevicePermission({ video: true, audio: true });
|
15651
15667
|
adapter.queryCameras();
|
15652
15668
|
adapter.queryMicrophones();
|
@@ -15737,7 +15753,7 @@ class DiagnosticsForwarder {
|
|
15737
15753
|
|
15738
15754
|
// Copyright (c) Microsoft Corporation.
|
15739
15755
|
// Licensed under the MIT license.
|
15740
|
-
var __awaiter$
|
15756
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15741
15757
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15742
15758
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15743
15759
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15902,29 +15918,29 @@ class AzureCommunicationCallAdapter {
|
|
15902
15918
|
this.callAgent.dispose();
|
15903
15919
|
}
|
15904
15920
|
queryCameras() {
|
15905
|
-
return __awaiter$
|
15906
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
15921
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15922
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15907
15923
|
return this.deviceManager.getCameras();
|
15908
15924
|
}));
|
15909
15925
|
});
|
15910
15926
|
}
|
15911
15927
|
queryMicrophones() {
|
15912
|
-
return __awaiter$
|
15913
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
15928
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15929
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15914
15930
|
return this.deviceManager.getMicrophones();
|
15915
15931
|
}));
|
15916
15932
|
});
|
15917
15933
|
}
|
15918
15934
|
querySpeakers() {
|
15919
|
-
return __awaiter$
|
15920
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
15935
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15936
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15921
15937
|
return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];
|
15922
15938
|
}));
|
15923
15939
|
});
|
15924
15940
|
}
|
15925
15941
|
askDevicePermission(constrain) {
|
15926
|
-
return __awaiter$
|
15927
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
15942
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15943
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15928
15944
|
yield this.deviceManager.askDevicePermission(constrain);
|
15929
15945
|
}));
|
15930
15946
|
});
|
@@ -15935,30 +15951,46 @@ class AzureCommunicationCallAdapter {
|
|
15935
15951
|
throw new Error('You are already in the call!');
|
15936
15952
|
}
|
15937
15953
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
15938
|
-
|
15939
|
-
if (
|
15940
|
-
|
15954
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
15955
|
+
if (isOutboundCall(this.locator)) {
|
15956
|
+
const phoneNumber = this.getState().alternativeCallerId;
|
15957
|
+
return this.startCall(this.locator.participantIDs, {
|
15958
|
+
alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined
|
15959
|
+
});
|
15941
15960
|
}
|
15942
15961
|
return this.teeErrorToEventEmitter(() => {
|
15943
15962
|
const audioOptions = { muted: microphoneOn !== null && microphoneOn !== void 0 ? microphoneOn : !this.getState().isLocalPreviewMicrophoneEnabled };
|
15944
15963
|
// TODO: find a way to expose stream to here
|
15945
15964
|
const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };
|
15946
|
-
const
|
15947
|
-
const call = isTeamsMeeting
|
15948
|
-
? this.callAgent.join(this.locator, {
|
15949
|
-
audioOptions,
|
15950
|
-
videoOptions
|
15951
|
-
})
|
15952
|
-
: this.callAgent.join(this.locator, {
|
15953
|
-
audioOptions,
|
15954
|
-
videoOptions
|
15955
|
-
});
|
15965
|
+
const call = this._joinCall(audioOptions, videoOptions);
|
15956
15966
|
this.processNewCall(call);
|
15957
15967
|
return call;
|
15958
15968
|
});
|
15959
15969
|
}
|
15970
|
+
_joinCall(audioOptions, videoOptions) {
|
15971
|
+
const isTeamsMeeting = !('groupId' in this.locator);
|
15972
|
+
/* @conditional-compile-remove(rooms) */
|
15973
|
+
const isRoomsCall = !('roomId' in this.locator);
|
15974
|
+
if (isTeamsMeeting) {
|
15975
|
+
return this.callAgent.join(this.locator, {
|
15976
|
+
audioOptions,
|
15977
|
+
videoOptions
|
15978
|
+
});
|
15979
|
+
}
|
15980
|
+
/* @conditional-compile-remove(rooms) */
|
15981
|
+
if (isRoomsCall) {
|
15982
|
+
return this.callAgent.join(this.locator, {
|
15983
|
+
audioOptions,
|
15984
|
+
videoOptions
|
15985
|
+
});
|
15986
|
+
}
|
15987
|
+
return this.callAgent.join(this.locator, {
|
15988
|
+
audioOptions,
|
15989
|
+
videoOptions
|
15990
|
+
});
|
15991
|
+
}
|
15960
15992
|
createStreamView(remoteUserId, options) {
|
15961
|
-
return __awaiter$
|
15993
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15962
15994
|
if (remoteUserId === undefined) {
|
15963
15995
|
return yield this.handlers.onCreateLocalStreamView(options);
|
15964
15996
|
}
|
@@ -15968,7 +16000,7 @@ class AzureCommunicationCallAdapter {
|
|
15968
16000
|
});
|
15969
16001
|
}
|
15970
16002
|
disposeStreamView(remoteUserId) {
|
15971
|
-
return __awaiter$
|
16003
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15972
16004
|
if (remoteUserId === undefined) {
|
15973
16005
|
yield this.handlers.onDisposeLocalStreamView();
|
15974
16006
|
}
|
@@ -15979,7 +16011,7 @@ class AzureCommunicationCallAdapter {
|
|
15979
16011
|
}
|
15980
16012
|
leaveCall() {
|
15981
16013
|
var _a;
|
15982
|
-
return __awaiter$
|
16014
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15983
16015
|
const callId = (_a = this.call) === null || _a === void 0 ? void 0 : _a.id;
|
15984
16016
|
yield this.handlers.onHangUp();
|
15985
16017
|
this.unsubscribeCallEvents();
|
@@ -15994,29 +16026,29 @@ class AzureCommunicationCallAdapter {
|
|
15994
16026
|
});
|
15995
16027
|
}
|
15996
16028
|
setCamera(device, options) {
|
15997
|
-
return __awaiter$
|
15998
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16029
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16030
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15999
16031
|
yield this.handlers.onSelectCamera(device, options);
|
16000
16032
|
}));
|
16001
16033
|
});
|
16002
16034
|
}
|
16003
16035
|
setMicrophone(device) {
|
16004
|
-
return __awaiter$
|
16005
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16036
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16037
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16006
16038
|
yield this.handlers.onSelectMicrophone(device);
|
16007
16039
|
}));
|
16008
16040
|
});
|
16009
16041
|
}
|
16010
16042
|
setSpeaker(device) {
|
16011
|
-
return __awaiter$
|
16012
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16043
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16044
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16013
16045
|
yield this.handlers.onSelectSpeaker(device);
|
16014
16046
|
}));
|
16015
16047
|
});
|
16016
16048
|
}
|
16017
16049
|
startCamera(options) {
|
16018
|
-
return __awaiter$
|
16019
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16050
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16051
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16020
16052
|
if (!isCameraOn(this.getState())) {
|
16021
16053
|
yield this.handlers.onToggleCamera(options);
|
16022
16054
|
}
|
@@ -16024,8 +16056,8 @@ class AzureCommunicationCallAdapter {
|
|
16024
16056
|
});
|
16025
16057
|
}
|
16026
16058
|
stopCamera() {
|
16027
|
-
return __awaiter$
|
16028
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16059
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16060
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16029
16061
|
if (isCameraOn(this.getState())) {
|
16030
16062
|
yield this.handlers.onToggleCamera();
|
16031
16063
|
}
|
@@ -16033,8 +16065,8 @@ class AzureCommunicationCallAdapter {
|
|
16033
16065
|
});
|
16034
16066
|
}
|
16035
16067
|
mute() {
|
16036
|
-
return __awaiter$
|
16037
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16068
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16069
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16038
16070
|
var _a, _b;
|
16039
16071
|
this.context.setIsLocalMicrophoneEnabled(false);
|
16040
16072
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -16044,8 +16076,8 @@ class AzureCommunicationCallAdapter {
|
|
16044
16076
|
});
|
16045
16077
|
}
|
16046
16078
|
unmute() {
|
16047
|
-
return __awaiter$
|
16048
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16079
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16080
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16049
16081
|
var _a, _b;
|
16050
16082
|
this.context.setIsLocalMicrophoneEnabled(true);
|
16051
16083
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -16055,8 +16087,8 @@ class AzureCommunicationCallAdapter {
|
|
16055
16087
|
});
|
16056
16088
|
}
|
16057
16089
|
startScreenShare() {
|
16058
|
-
return __awaiter$
|
16059
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16090
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16091
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16060
16092
|
var _a;
|
16061
16093
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
16062
16094
|
yield this.handlers.onToggleScreenShare();
|
@@ -16065,8 +16097,8 @@ class AzureCommunicationCallAdapter {
|
|
16065
16097
|
});
|
16066
16098
|
}
|
16067
16099
|
stopScreenShare() {
|
16068
|
-
return __awaiter$
|
16069
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16100
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16101
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16070
16102
|
var _a;
|
16071
16103
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
16072
16104
|
yield this.handlers.onToggleScreenShare();
|
@@ -16110,20 +16142,20 @@ class AzureCommunicationCallAdapter {
|
|
16110
16142
|
this.subscribeCallEvents();
|
16111
16143
|
}
|
16112
16144
|
removeParticipant(userId) {
|
16113
|
-
return __awaiter$
|
16145
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16114
16146
|
this.handlers.onRemoveParticipant(userId);
|
16115
16147
|
});
|
16116
16148
|
}
|
16117
16149
|
/* @conditional-compile-remove(PSTN-calls) */
|
16118
16150
|
addParticipant(participant, options) {
|
16119
|
-
return __awaiter$
|
16151
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16120
16152
|
this.handlers.onAddParticipant(participant, options);
|
16121
16153
|
});
|
16122
16154
|
}
|
16123
16155
|
/* @conditional-compile-remove(PSTN-calls) */
|
16124
16156
|
holdCall() {
|
16125
16157
|
var _a;
|
16126
|
-
return __awaiter$
|
16158
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16127
16159
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
16128
16160
|
this.handlers.onToggleHold();
|
16129
16161
|
}
|
@@ -16132,7 +16164,7 @@ class AzureCommunicationCallAdapter {
|
|
16132
16164
|
/* @conditional-compile-remove(PSTN-calls) */
|
16133
16165
|
resumeCall() {
|
16134
16166
|
var _a;
|
16135
|
-
return __awaiter$
|
16167
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16136
16168
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
16137
16169
|
this.handlers.onToggleHold();
|
16138
16170
|
}
|
@@ -16206,7 +16238,7 @@ class AzureCommunicationCallAdapter {
|
|
16206
16238
|
this.emitter.off(event, listener);
|
16207
16239
|
}
|
16208
16240
|
asyncTeeErrorToEventEmitter(f) {
|
16209
|
-
return __awaiter$
|
16241
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16210
16242
|
try {
|
16211
16243
|
return yield f();
|
16212
16244
|
}
|
@@ -16239,9 +16271,15 @@ class AzureCommunicationCallAdapter {
|
|
16239
16271
|
*
|
16240
16272
|
* @public
|
16241
16273
|
*/
|
16242
|
-
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator
|
16243
|
-
|
16244
|
-
const
|
16274
|
+
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
16275
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
16276
|
+
const callClient = createStatefulCallClient({
|
16277
|
+
userId,
|
16278
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId
|
16279
|
+
});
|
16280
|
+
const callAgent = yield callClient.createCallAgent(credential, {
|
16281
|
+
displayName
|
16282
|
+
});
|
16245
16283
|
const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);
|
16246
16284
|
return adapter;
|
16247
16285
|
});
|
@@ -16296,7 +16334,7 @@ beforeDispose) => {
|
|
16296
16334
|
if (!credential || !displayName || !locator || !userId) {
|
16297
16335
|
return;
|
16298
16336
|
}
|
16299
|
-
(() => __awaiter$
|
16337
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
16300
16338
|
if (adapterRef.current) {
|
16301
16339
|
// Dispose the old adapter when a new one is created.
|
16302
16340
|
//
|
@@ -16327,7 +16365,7 @@ beforeDispose) => {
|
|
16327
16365
|
// Dispose any existing adapter when the component unmounts.
|
16328
16366
|
React.useEffect(() => {
|
16329
16367
|
return () => {
|
16330
|
-
(() => __awaiter$
|
16368
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
16331
16369
|
if (adapterRef.current) {
|
16332
16370
|
if (beforeDisposeRef.current) {
|
16333
16371
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -16348,7 +16386,7 @@ beforeDispose) => {
|
|
16348
16386
|
*
|
16349
16387
|
* @public
|
16350
16388
|
*/
|
16351
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$
|
16389
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$5(void 0, void 0, void 0, function* () {
|
16352
16390
|
const deviceManager = (yield callClient.getDeviceManager());
|
16353
16391
|
return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);
|
16354
16392
|
});
|
@@ -16356,7 +16394,8 @@ const isCallError = (e) => {
|
|
16356
16394
|
return e['target'] !== undefined && e['innerError'] !== undefined;
|
16357
16395
|
};
|
16358
16396
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
16359
|
-
|
16397
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
16398
|
+
const isOutboundCall = (callLocator) => {
|
16360
16399
|
return 'participantIDs' in callLocator;
|
16361
16400
|
};
|
16362
16401
|
|
@@ -16793,7 +16832,7 @@ const modalLayerHostStyle = {
|
|
16793
16832
|
|
16794
16833
|
// Copyright (c) Microsoft Corporation.
|
16795
16834
|
// Licensed under the MIT license.
|
16796
|
-
var __awaiter$
|
16835
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16797
16836
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16798
16837
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16799
16838
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16854,36 +16893,36 @@ class CallWithChatBackedCallAdapter {
|
|
16854
16893
|
this.joinCall = (microphoneOn) => {
|
16855
16894
|
return this.callWithChatAdapter.joinCall(microphoneOn);
|
16856
16895
|
};
|
16857
|
-
this.leaveCall = () => __awaiter$
|
16896
|
+
this.leaveCall = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
|
16858
16897
|
this.startCall = (participants, options) => {
|
16859
16898
|
return this.callWithChatAdapter.startCall(participants, options);
|
16860
16899
|
};
|
16861
|
-
this.setCamera = (sourceId, options) => __awaiter$
|
16862
|
-
this.setMicrophone = (sourceId) => __awaiter$
|
16863
|
-
this.setSpeaker = (sourceId) => __awaiter$
|
16864
|
-
this.askDevicePermission = (constraints) => __awaiter$
|
16865
|
-
this.queryCameras = () => __awaiter$
|
16866
|
-
this.queryMicrophones = () => __awaiter$
|
16867
|
-
this.querySpeakers = () => __awaiter$
|
16868
|
-
this.startCamera = (options) => __awaiter$
|
16869
|
-
this.stopCamera = () => __awaiter$
|
16870
|
-
this.mute = () => __awaiter$
|
16871
|
-
this.unmute = () => __awaiter$
|
16872
|
-
this.startScreenShare = () => __awaiter$
|
16873
|
-
this.stopScreenShare = () => __awaiter$
|
16874
|
-
this.removeParticipant = (userId) => __awaiter$
|
16875
|
-
this.createStreamView = (remoteUserId, options) => __awaiter$
|
16876
|
-
this.disposeStreamView = (remoteUserId, options) => __awaiter$
|
16900
|
+
this.setCamera = (sourceId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
|
16901
|
+
this.setMicrophone = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
|
16902
|
+
this.setSpeaker = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
|
16903
|
+
this.askDevicePermission = (constraints) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
|
16904
|
+
this.queryCameras = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
|
16905
|
+
this.queryMicrophones = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
|
16906
|
+
this.querySpeakers = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
|
16907
|
+
this.startCamera = (options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
|
16908
|
+
this.stopCamera = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
|
16909
|
+
this.mute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
|
16910
|
+
this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
|
16911
|
+
this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
|
16912
|
+
this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
|
16913
|
+
this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
16914
|
+
this.createStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
|
16915
|
+
this.disposeStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
|
16877
16916
|
/* @conditional-compile-remove(PSTN-calls) */
|
16878
|
-
this.holdCall = () => __awaiter$
|
16917
|
+
this.holdCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
16879
16918
|
yield this.callWithChatAdapter.holdCall();
|
16880
16919
|
});
|
16881
16920
|
/* @conditional-compile-remove(PSTN-calls) */
|
16882
|
-
this.resumeCall = () => __awaiter$
|
16921
|
+
this.resumeCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
16883
16922
|
yield this.callWithChatAdapter.resumeCall();
|
16884
16923
|
});
|
16885
16924
|
/* @conditional-compile-remove(PSTN-calls) */
|
16886
|
-
this.addParticipant = (participant, options) => __awaiter$
|
16925
|
+
this.addParticipant = (participant, options) => __awaiter$4(this, void 0, void 0, function* () {
|
16887
16926
|
yield this.callWithChatAdapter.addParticipant(participant, options);
|
16888
16927
|
});
|
16889
16928
|
this.callWithChatAdapter = callWithChatAdapter;
|
@@ -16904,7 +16943,7 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
16904
16943
|
|
16905
16944
|
// Copyright (c) Microsoft Corporation.
|
16906
16945
|
// Licensed under the MIT license.
|
16907
|
-
var __awaiter$
|
16946
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16908
16947
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16909
16948
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16910
16949
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16925,12 +16964,12 @@ class CallWithChatBackedChatAdapter {
|
|
16925
16964
|
// For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.
|
16926
16965
|
// In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
|
16927
16966
|
this.eventStore = new Map();
|
16928
|
-
this.fetchInitialData = () => __awaiter$
|
16929
|
-
this.sendMessage = (content) => __awaiter$
|
16930
|
-
this.sendReadReceipt = (chatMessageId) => __awaiter$
|
16931
|
-
this.sendTypingIndicator = () => __awaiter$
|
16932
|
-
this.removeParticipant = (userId) => __awaiter$
|
16933
|
-
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$
|
16967
|
+
this.fetchInitialData = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
|
16968
|
+
this.sendMessage = (content) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
|
16969
|
+
this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
|
16970
|
+
this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
|
16971
|
+
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
16972
|
+
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
|
16934
16973
|
this.dispose = () => this.callWithChatAdapter.dispose();
|
16935
16974
|
this.onStateChange = (handler) => {
|
16936
16975
|
const convertedHandler = (state) => {
|
@@ -16969,44 +17008,44 @@ class CallWithChatBackedChatAdapter {
|
|
16969
17008
|
return this.callWithChatAdapter.off(event, listener);
|
16970
17009
|
}
|
16971
17010
|
};
|
16972
|
-
this.updateMessage = (messageId, content, metadata) => __awaiter$
|
16973
|
-
this.deleteMessage = (messageId) => __awaiter$
|
17011
|
+
this.updateMessage = (messageId, content, metadata) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
|
17012
|
+
this.deleteMessage = (messageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
|
16974
17013
|
this.clearErrors = (errorTypes) => {
|
16975
17014
|
throw new Error(`Method not supported in CallWithChatComposite.`);
|
16976
17015
|
};
|
16977
|
-
this.setTopic = (topicName) => __awaiter$
|
17016
|
+
this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
|
16978
17017
|
throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
|
16979
17018
|
});
|
17019
|
+
/* @conditional-compile-remove(file-sharing) */
|
17020
|
+
this.registerActiveFileUploads = (files) => {
|
17021
|
+
return this.callWithChatAdapter.registerActiveFileUploads(files);
|
17022
|
+
};
|
17023
|
+
/* @conditional-compile-remove(file-sharing) */
|
17024
|
+
this.registerCompletedFileUploads = (metadata) => {
|
17025
|
+
return this.callWithChatAdapter.registerCompletedFileUploads(metadata);
|
17026
|
+
};
|
17027
|
+
/* @conditional-compile-remove(file-sharing) */
|
17028
|
+
this.clearFileUploads = () => {
|
17029
|
+
this.callWithChatAdapter.clearFileUploads();
|
17030
|
+
};
|
17031
|
+
/* @conditional-compile-remove(file-sharing) */
|
17032
|
+
this.cancelFileUpload = (id) => {
|
17033
|
+
this.callWithChatAdapter.cancelFileUpload(id);
|
17034
|
+
};
|
17035
|
+
/* @conditional-compile-remove(file-sharing) */
|
17036
|
+
this.updateFileUploadProgress = (id, progress) => {
|
17037
|
+
this.callWithChatAdapter.updateFileUploadProgress(id, progress);
|
17038
|
+
};
|
17039
|
+
/* @conditional-compile-remove(file-sharing) */
|
17040
|
+
this.updateFileUploadErrorMessage = (id, errorMessage) => {
|
17041
|
+
this.callWithChatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
17042
|
+
};
|
17043
|
+
/* @conditional-compile-remove(file-sharing) */
|
17044
|
+
this.updateFileUploadMetadata = (id, metadata) => {
|
17045
|
+
this.callWithChatAdapter.updateFileUploadMetadata(id, metadata);
|
17046
|
+
};
|
16980
17047
|
this.callWithChatAdapter = callWithChatAdapter;
|
16981
17048
|
}
|
16982
|
-
/* @conditional-compile-remove(file-sharing) */
|
16983
|
-
registerActiveFileUploads(files) {
|
16984
|
-
return this.callWithChatAdapter.registerActiveFileUploads(files);
|
16985
|
-
}
|
16986
|
-
/* @conditional-compile-remove(file-sharing) */
|
16987
|
-
registerCompletedFileUploads(metadata) {
|
16988
|
-
return this.callWithChatAdapter.registerCompletedFileUploads(metadata);
|
16989
|
-
}
|
16990
|
-
/* @conditional-compile-remove(file-sharing) */
|
16991
|
-
clearFileUploads() {
|
16992
|
-
this.callWithChatAdapter.clearFileUploads();
|
16993
|
-
}
|
16994
|
-
/* @conditional-compile-remove(file-sharing) */
|
16995
|
-
cancelFileUpload(id) {
|
16996
|
-
this.callWithChatAdapter.cancelFileUpload(id);
|
16997
|
-
}
|
16998
|
-
/* @conditional-compile-remove(file-sharing) */
|
16999
|
-
updateFileUploadProgress(id, progress) {
|
17000
|
-
this.callWithChatAdapter.updateFileUploadProgress(id, progress);
|
17001
|
-
}
|
17002
|
-
/* @conditional-compile-remove(file-sharing) */
|
17003
|
-
updateFileUploadErrorMessage(id, errorMessage) {
|
17004
|
-
this.callWithChatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
17005
|
-
}
|
17006
|
-
/* @conditional-compile-remove(file-sharing) */
|
17007
|
-
updateFileUploadMetadata(id, metadata) {
|
17008
|
-
this.callWithChatAdapter.updateFileUploadMetadata(id, metadata);
|
17009
|
-
}
|
17010
17049
|
}
|
17011
17050
|
function chatAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState) {
|
17012
17051
|
if (!callWithChatAdapterState.chat) {
|
@@ -17162,10 +17201,9 @@ const SidePaneHeader = (props) => {
|
|
17162
17201
|
iconHovered: { color: theme.palette.neutralSecondary },
|
17163
17202
|
iconPressed: { color: theme.palette.neutralSecondary }
|
17164
17203
|
}), [theme.palette.neutralSecondary]);
|
17165
|
-
const callWithChatStrings = useCallWithChatCompositeStrings();
|
17166
17204
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: sidePaneHeaderContainerStyles },
|
17167
17205
|
React__default['default'].createElement(react.Stack.Item, { styles: sidePaneHeaderStyles }, props.headingText),
|
17168
|
-
React__default['default'].createElement(react.CommandBarButton, { ariaLabel:
|
17206
|
+
React__default['default'].createElement(react.CommandBarButton, { ariaLabel: props.strings.dismissSidePaneButtonLabel, styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose })));
|
17169
17207
|
};
|
17170
17208
|
|
17171
17209
|
// Copyright (c) Microsoft Corporation.
|
@@ -17383,7 +17421,7 @@ const copyLinkButtonStyles = {
|
|
17383
17421
|
*/
|
17384
17422
|
const linkIconStyles = { marginRight: '0.5rem' };
|
17385
17423
|
|
17386
|
-
var __awaiter$
|
17424
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17387
17425
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17388
17426
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17389
17427
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17396,7 +17434,7 @@ var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
17396
17434
|
* @private
|
17397
17435
|
*/
|
17398
17436
|
const PeoplePaneContent = (props) => {
|
17399
|
-
const {
|
17437
|
+
const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings, onRemoveParticipant } = props;
|
17400
17438
|
const participantListDefaultProps = usePropsFor$1(ParticipantList);
|
17401
17439
|
const setDrawerMenuItemsForParticipant = React.useMemo(() => {
|
17402
17440
|
return (participant) => {
|
@@ -17417,13 +17455,13 @@ const PeoplePaneContent = (props) => {
|
|
17417
17455
|
setDrawerMenuItems
|
17418
17456
|
]);
|
17419
17457
|
const participantListProps = React.useMemo(() => {
|
17420
|
-
const
|
17458
|
+
const onRemoveAParticipant = (participantId) => __awaiter$2(void 0, void 0, void 0, function* () { return onRemoveParticipant(participantId); });
|
17421
17459
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
17422
17460
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
17423
|
-
onRemoveParticipant: props.mobileView ? undefined :
|
17461
|
+
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
17424
17462
|
// We want the drawer menu items to appear when participants in ParticipantList are clicked
|
17425
17463
|
onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined });
|
17426
|
-
}, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant,
|
17464
|
+
}, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, onRemoveParticipant]);
|
17427
17465
|
const participantList = (React__default['default'].createElement(ParticipantListWithHeading, { isMobile: props.mobileView, participantListProps: participantListProps, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, title: props.strings.peoplePaneSubTitle }));
|
17428
17466
|
const theme = react.useTheme();
|
17429
17467
|
const copyLinkButtonStylesThemed = React.useMemo(() => react.concatStyleSets(copyLinkButtonStyles, {
|
@@ -17443,14 +17481,6 @@ const PeoplePaneContent = (props) => {
|
|
17443
17481
|
React__default['default'].createElement(react.DefaultButton, { text: strings.copyInviteLinkButtonLabel, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "Link", style: linkIconStyles }), onClick: () => copy__default['default'](inviteLink), styles: copyLinkButtonStylesThemed }))),
|
17444
17482
|
participantList));
|
17445
17483
|
};
|
17446
|
-
/**
|
17447
|
-
* In a CallWithChat when a participant is removed, we must remove them from both
|
17448
|
-
* the call and the chat thread.
|
17449
|
-
*/
|
17450
|
-
const removeParticipantFromCallWithChat = (callAdapter, chatAdapter, participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
|
17451
|
-
yield callAdapter.removeParticipant(participantId);
|
17452
|
-
yield chatAdapter.removeParticipant(participantId);
|
17453
|
-
});
|
17454
17484
|
/**
|
17455
17485
|
* Create default contextual menu items for particant
|
17456
17486
|
* @param participant - participant to create contextual menu items for
|
@@ -17459,12 +17489,12 @@ const removeParticipantFromCallWithChat = (callAdapter, chatAdapter, participant
|
|
17459
17489
|
* @param localParticipantUserId - Local participant user id
|
17460
17490
|
* @returns - IContextualMenuItem[]
|
17461
17491
|
*/
|
17462
|
-
const createDefaultContextualMenuItems = (participant,
|
17492
|
+
const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId) => {
|
17463
17493
|
const menuItems = [];
|
17464
17494
|
if ((participant === null || participant === void 0 ? void 0 : participant.userId) !== localParticipantUserId) {
|
17465
17495
|
menuItems.push({
|
17466
17496
|
key: 'remove',
|
17467
|
-
text:
|
17497
|
+
text: strings.removeMenuLabel,
|
17468
17498
|
onClick: () => {
|
17469
17499
|
if (participant === null || participant === void 0 ? void 0 : participant.userId) {
|
17470
17500
|
onRemoveParticipant === null || onRemoveParticipant === void 0 ? void 0 : onRemoveParticipant(participant === null || participant === void 0 ? void 0 : participant.userId);
|
@@ -17556,8 +17586,9 @@ const mobilePaneButtonStyles = {
|
|
17556
17586
|
* @private
|
17557
17587
|
*/
|
17558
17588
|
const TabHeader = (props) => {
|
17589
|
+
const { onClose, onChatButtonClicked, onPeopleButtonClicked, activeTab, strings } = props;
|
17559
17590
|
const theme = useTheme();
|
17560
|
-
const haveMultipleTabs =
|
17591
|
+
const haveMultipleTabs = onChatButtonClicked && onPeopleButtonClicked;
|
17561
17592
|
const mobilePaneButtonStylesThemed = React.useMemo(() => {
|
17562
17593
|
return react.concatStyleSets(mobilePaneButtonStyles, {
|
17563
17594
|
root: {
|
@@ -17575,15 +17606,22 @@ const TabHeader = (props) => {
|
|
17575
17606
|
}
|
17576
17607
|
: {});
|
17577
17608
|
}, [theme, haveMultipleTabs]);
|
17578
|
-
const strings = useCallWithChatCompositeStrings();
|
17579
17609
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, grow: true, styles: mobilePaneControlBarStyle },
|
17580
|
-
React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick:
|
17581
|
-
React__default['default'].createElement(react.Stack.Item, { grow: true },
|
17582
|
-
React__default['default'].createElement(react.Stack.Item, { grow: true },
|
17610
|
+
React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick: onClose, styles: mobilePaneBackButtonStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }), autoFocus: true }),
|
17611
|
+
React__default['default'].createElement(react.Stack.Item, { grow: true }, onChatButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'chat', role: 'tab' }, strings.chatButtonLabel))),
|
17612
|
+
React__default['default'].createElement(react.Stack.Item, { grow: true }, onPeopleButtonClicked && (React__default['default'].createElement(react.DefaultButton, { onClick: onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'people', role: 'tab' }, strings.peopleButtonLabel))),
|
17583
17613
|
React__default['default'].createElement(react.DefaultButton, { styles: mobilePaneHiddenIconStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }) })));
|
17584
17614
|
};
|
17585
17615
|
|
17586
|
-
|
17616
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17617
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17618
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
17619
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17620
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17621
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17622
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17623
|
+
});
|
17624
|
+
};
|
17587
17625
|
/**
|
17588
17626
|
* Pane that is used to store chat and people for CallWithChat composite
|
17589
17627
|
* @private
|
@@ -17594,7 +17632,7 @@ const CallWithChatPane = (props) => {
|
|
17594
17632
|
const paneStyles = hidden ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
|
17595
17633
|
const callWithChatStrings = useCallWithChatCompositeStrings();
|
17596
17634
|
const theme = useTheme();
|
17597
|
-
const header = props.activePane === 'none' ? null : props.mobileView ? (React__default['default'].createElement(TabHeader, Object.assign({}, props, { activeTab: props.activePane }))) : (React__default['default'].createElement(SidePaneHeader, Object.assign({}, props, { headingText: props.activePane === 'chat'
|
17635
|
+
const header = props.activePane === 'none' ? null : props.mobileView ? (React__default['default'].createElement(TabHeader, Object.assign({}, props, { strings: callWithChatStrings, activeTab: props.activePane }))) : (React__default['default'].createElement(SidePaneHeader, Object.assign({}, props, { strings: callWithChatStrings, headingText: props.activePane === 'chat'
|
17598
17636
|
? callWithChatStrings.chatPaneTitle
|
17599
17637
|
: props.activePane === 'people'
|
17600
17638
|
? callWithChatStrings.peoplePaneTitle
|
@@ -17606,8 +17644,16 @@ const CallWithChatPane = (props) => {
|
|
17606
17644
|
/* @conditional-compile-remove(file-sharing) */
|
17607
17645
|
fileSharing: props.fileSharing
|
17608
17646
|
}, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })));
|
17647
|
+
/**
|
17648
|
+
* In a CallWithChat when a participant is removed, we must remove them from both
|
17649
|
+
* the call and the chat thread.
|
17650
|
+
*/
|
17651
|
+
const removeParticipantFromCallWithChat = (participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
|
17652
|
+
yield props.callAdapter.removeParticipant(participantId);
|
17653
|
+
yield props.chatAdapter.removeParticipant(participantId);
|
17654
|
+
});
|
17609
17655
|
const peopleContent = (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
17610
|
-
React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
|
17656
|
+
React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { onRemoveParticipant: removeParticipantFromCallWithChat, setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
|
17611
17657
|
// Use document.getElementById until Fluent's Stack supports componentRef property: https://github.com/microsoft/fluentui/issues/20410
|
17612
17658
|
const modalLayerHostElement = document.getElementById(props.modalLayerHostId);
|
17613
17659
|
const modalHostRef = React.useRef(modalLayerHostElement);
|
@@ -17923,6 +17969,34 @@ class CallWithChatContext {
|
|
17923
17969
|
*/
|
17924
17970
|
class AzureCommunicationCallWithChatAdapter {
|
17925
17971
|
constructor(callAdapter, chatAdapter) {
|
17972
|
+
/* @conditional-compile-remove(file-sharing) */
|
17973
|
+
this.registerActiveFileUploads = (files) => {
|
17974
|
+
return this.chatAdapter.registerActiveFileUploads(files);
|
17975
|
+
};
|
17976
|
+
/* @conditional-compile-remove(file-sharing) */
|
17977
|
+
this.registerCompletedFileUploads = (metadata) => {
|
17978
|
+
return this.chatAdapter.registerCompletedFileUploads(metadata);
|
17979
|
+
};
|
17980
|
+
/* @conditional-compile-remove(file-sharing) */
|
17981
|
+
this.clearFileUploads = () => {
|
17982
|
+
this.chatAdapter.clearFileUploads();
|
17983
|
+
};
|
17984
|
+
/* @conditional-compile-remove(file-sharing) */
|
17985
|
+
this.cancelFileUpload = (id) => {
|
17986
|
+
this.chatAdapter.cancelFileUpload(id);
|
17987
|
+
};
|
17988
|
+
/* @conditional-compile-remove(file-sharing) */
|
17989
|
+
this.updateFileUploadProgress = (id, progress) => {
|
17990
|
+
this.chatAdapter.updateFileUploadProgress(id, progress);
|
17991
|
+
};
|
17992
|
+
/* @conditional-compile-remove(file-sharing) */
|
17993
|
+
this.updateFileUploadErrorMessage = (id, errorMessage) => {
|
17994
|
+
this.chatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
17995
|
+
};
|
17996
|
+
/* @conditional-compile-remove(file-sharing) */
|
17997
|
+
this.updateFileUploadMetadata = (id, metadata) => {
|
17998
|
+
this.chatAdapter.updateFileUploadMetadata(id, metadata);
|
17999
|
+
};
|
17926
18000
|
this.bindPublicMethods();
|
17927
18001
|
this.callAdapter = callAdapter;
|
17928
18002
|
this.chatAdapter = chatAdapter;
|
@@ -18169,34 +18243,6 @@ class AzureCommunicationCallWithChatAdapter {
|
|
18169
18243
|
return yield this.chatAdapter.deleteMessage(messageId);
|
18170
18244
|
});
|
18171
18245
|
}
|
18172
|
-
/* @conditional-compile-remove(file-sharing) */
|
18173
|
-
registerActiveFileUploads(files) {
|
18174
|
-
return this.chatAdapter.registerActiveFileUploads(files);
|
18175
|
-
}
|
18176
|
-
/* @conditional-compile-remove(file-sharing) */
|
18177
|
-
registerCompletedFileUploads(metadata) {
|
18178
|
-
return this.chatAdapter.registerCompletedFileUploads(metadata);
|
18179
|
-
}
|
18180
|
-
/* @conditional-compile-remove(file-sharing) */
|
18181
|
-
clearFileUploads() {
|
18182
|
-
this.chatAdapter.clearFileUploads();
|
18183
|
-
}
|
18184
|
-
/* @conditional-compile-remove(file-sharing) */
|
18185
|
-
cancelFileUpload(id) {
|
18186
|
-
this.chatAdapter.cancelFileUpload(id);
|
18187
|
-
}
|
18188
|
-
/* @conditional-compile-remove(file-sharing) */
|
18189
|
-
updateFileUploadProgress(id, progress) {
|
18190
|
-
this.chatAdapter.updateFileUploadProgress(id, progress);
|
18191
|
-
}
|
18192
|
-
/* @conditional-compile-remove(file-sharing) */
|
18193
|
-
updateFileUploadErrorMessage(id, errorMessage) {
|
18194
|
-
this.chatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
18195
|
-
}
|
18196
|
-
/* @conditional-compile-remove(file-sharing) */
|
18197
|
-
updateFileUploadMetadata(id, metadata) {
|
18198
|
-
this.chatAdapter.updateFileUploadMetadata(id, metadata);
|
18199
|
-
}
|
18200
18246
|
/* @conditional-compile-remove(PSTN-calls) */
|
18201
18247
|
holdCall() {
|
18202
18248
|
return __awaiter(this, void 0, void 0, function* () {
|