@azure/communication-react 1.2.3-alpha-202206150016.0 → 1.2.3-alpha-202206180014.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/dist/communication-react.d.ts +50 -4
- package/dist/dist-cjs/communication-react/index.js +187 -98
- 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/CallAgentDeclarative.d.ts +17 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js +22 -5
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.d.ts +22 -0
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.d.ts.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js +49 -0
- package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +13 -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.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/index.d.ts.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.d.ts.map +1 -1
- package/dist/dist-esm/communication-react/src/index.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 +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +6 -1
- 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 +13 -3
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +2 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +3 -2
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -4
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +4 -3
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -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 +12 -3
- 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 +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +2 -2
- 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 +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/package.json +7 -7
@@ -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.2.3-alpha-
|
194
|
+
var telemetryVersion = '1.2.3-alpha-202206180014.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$s = (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$s(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);
|
@@ -506,7 +506,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
506
506
|
|
507
507
|
// Copyright (c) Microsoft Corporation.
|
508
508
|
// Licensed under the MIT license.
|
509
|
-
var __awaiter$
|
509
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
510
510
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
511
511
|
return new (P || (P = Promise))(function (resolve, reject) {
|
512
512
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -530,7 +530,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
530
530
|
* @public
|
531
531
|
*/
|
532
532
|
const createDefaultCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
533
|
-
const onStartLocalVideo = () => __awaiter$
|
533
|
+
const onStartLocalVideo = () => __awaiter$r(void 0, void 0, void 0, function* () {
|
534
534
|
// Before the call object creates a stream, dispose of any local preview streams.
|
535
535
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
536
536
|
// of disposing and creating a new stream?
|
@@ -550,7 +550,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
550
550
|
yield call.startVideo(stream);
|
551
551
|
}
|
552
552
|
});
|
553
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
553
|
+
const onStopLocalVideo = (stream) => __awaiter$r(void 0, void 0, void 0, function* () {
|
554
554
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
555
555
|
if (!callId) {
|
556
556
|
return;
|
@@ -563,7 +563,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
563
563
|
});
|
564
564
|
}
|
565
565
|
});
|
566
|
-
const onToggleCamera = (options) => __awaiter$
|
566
|
+
const onToggleCamera = (options) => __awaiter$r(void 0, void 0, void 0, function* () {
|
567
567
|
if (call && _isInCall(call.state)) {
|
568
568
|
const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
569
569
|
if (stream) {
|
@@ -593,19 +593,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
593
593
|
const onStartCall = (participants, options) => {
|
594
594
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
595
595
|
};
|
596
|
-
const onSelectMicrophone = (device) => __awaiter$
|
596
|
+
const onSelectMicrophone = (device) => __awaiter$r(void 0, void 0, void 0, function* () {
|
597
597
|
if (!deviceManager) {
|
598
598
|
return;
|
599
599
|
}
|
600
600
|
return deviceManager.selectMicrophone(device);
|
601
601
|
});
|
602
|
-
const onSelectSpeaker = (device) => __awaiter$
|
602
|
+
const onSelectSpeaker = (device) => __awaiter$r(void 0, void 0, void 0, function* () {
|
603
603
|
if (!deviceManager) {
|
604
604
|
return;
|
605
605
|
}
|
606
606
|
return deviceManager.selectSpeaker(device);
|
607
607
|
});
|
608
|
-
const onSelectCamera = (device, options) => __awaiter$
|
608
|
+
const onSelectCamera = (device, options) => __awaiter$r(void 0, void 0, void 0, function* () {
|
609
609
|
if (!deviceManager) {
|
610
610
|
return;
|
611
611
|
}
|
@@ -628,19 +628,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
628
628
|
}, options);
|
629
629
|
}
|
630
630
|
});
|
631
|
-
const onToggleMicrophone = () => __awaiter$
|
631
|
+
const onToggleMicrophone = () => __awaiter$r(void 0, void 0, void 0, function* () {
|
632
632
|
if (!call || !_isInCall(call.state)) {
|
633
633
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
634
634
|
}
|
635
635
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
636
636
|
});
|
637
|
-
const onStartScreenShare = () => __awaiter$
|
638
|
-
const onStopScreenShare = () => __awaiter$
|
639
|
-
const onToggleScreenShare = () => __awaiter$
|
640
|
-
const onHangUp = () => __awaiter$
|
637
|
+
const onStartScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
638
|
+
const onStopScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
639
|
+
const onToggleScreenShare = () => __awaiter$r(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
640
|
+
const onHangUp = () => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
|
641
641
|
/* @conditional-compile-remove(PSTN-calls) */
|
642
|
-
const onToggleHold = () => __awaiter$
|
643
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
642
|
+
const onToggleHold = () => __awaiter$r(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()); });
|
643
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$r(void 0, void 0, void 0, function* () {
|
644
644
|
var _a;
|
645
645
|
if (!call || call.localVideoStreams.length === 0) {
|
646
646
|
return;
|
@@ -656,7 +656,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
656
656
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
657
657
|
return view ? { view } : undefined;
|
658
658
|
});
|
659
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
659
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$r(void 0, void 0, void 0, function* () {
|
660
660
|
if (!call) {
|
661
661
|
return;
|
662
662
|
}
|
@@ -684,7 +684,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
684
684
|
}
|
685
685
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
686
686
|
});
|
687
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
687
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$r(void 0, void 0, void 0, function* () {
|
688
688
|
if (!call) {
|
689
689
|
return;
|
690
690
|
}
|
@@ -705,7 +705,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
705
705
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
706
706
|
}
|
707
707
|
});
|
708
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
708
|
+
const onDisposeLocalStreamView = () => __awaiter$r(void 0, void 0, void 0, function* () {
|
709
709
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
710
710
|
const callState = call && callClient.getState().calls[call.id];
|
711
711
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -717,11 +717,11 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
717
717
|
// TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
|
718
718
|
yield disposeAllLocalPreviewViews(callClient);
|
719
719
|
});
|
720
|
-
const onRemoveParticipant = (userId) => __awaiter$
|
720
|
+
const onRemoveParticipant = (userId) => __awaiter$r(void 0, void 0, void 0, function* () {
|
721
721
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(fromFlatCommunicationIdentifier(userId)));
|
722
722
|
});
|
723
723
|
/* @conditional-compile-remove(PSTN-calls) */
|
724
|
-
const onAddParticipant = (participant, options) => __awaiter$
|
724
|
+
const onAddParticipant = (participant, options) => __awaiter$r(void 0, void 0, void 0, function* () {
|
725
725
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
726
726
|
yield (call === null || call === void 0 ? void 0 : call.addParticipant(participant, options));
|
727
727
|
}
|
@@ -730,7 +730,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
730
730
|
}
|
731
731
|
});
|
732
732
|
/* @conditional-compile-remove(dialpad) */
|
733
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
733
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$r(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
734
734
|
return {
|
735
735
|
onHangUp,
|
736
736
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -2990,6 +2990,7 @@ const ChatMessageActionFlyout = (props) => {
|
|
2990
2990
|
hidePersonaDetails: true,
|
2991
2991
|
size: react.PersonaSize.size24,
|
2992
2992
|
text: person.displayName,
|
2993
|
+
showOverflowTooltip: false,
|
2993
2994
|
styles: {
|
2994
2995
|
root: {
|
2995
2996
|
margin: '0.25rem'
|
@@ -3209,7 +3210,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
3209
3210
|
return actionMenuProps;
|
3210
3211
|
};
|
3211
3212
|
|
3212
|
-
var __awaiter$
|
3213
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3213
3214
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3214
3215
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3215
3216
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3228,7 +3229,7 @@ const actionIconStyle = { height: '1rem' };
|
|
3228
3229
|
const _FileDownloadCards = (props) => {
|
3229
3230
|
const { userId, fileMetadata } = props;
|
3230
3231
|
const [showSpinner, setShowSpinner] = React.useState(false);
|
3231
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
3232
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$q(void 0, void 0, void 0, function* () {
|
3232
3233
|
if (!props.downloadHandler) {
|
3233
3234
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
3234
3235
|
}
|
@@ -3348,7 +3349,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
3348
3349
|
|
3349
3350
|
// Copyright (c) Microsoft Corporation.
|
3350
3351
|
// Licensed under the MIT license.
|
3351
|
-
var __awaiter$
|
3352
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3352
3353
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3353
3354
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3354
3355
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3382,7 +3383,7 @@ const ChatMessageComponent = (props) => {
|
|
3382
3383
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
3383
3384
|
}
|
3384
3385
|
else if (isEditing) {
|
3385
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
3386
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$p(void 0, void 0, void 0, function* () {
|
3386
3387
|
props.onUpdateMessage &&
|
3387
3388
|
props.message.messageId &&
|
3388
3389
|
(yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
|
@@ -3492,7 +3493,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
|
3492
3493
|
|
3493
3494
|
// Copyright (c) Microsoft Corporation.
|
3494
3495
|
// Licensed under the MIT license.
|
3495
|
-
var __awaiter$
|
3496
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3496
3497
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3497
3498
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3498
3499
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3610,7 +3611,8 @@ const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate,
|
|
3610
3611
|
const personaOptions = {
|
3611
3612
|
hidePersonaDetails: true,
|
3612
3613
|
size: react.PersonaSize.size32,
|
3613
|
-
text: message.senderDisplayName
|
3614
|
+
text: message.senderDisplayName,
|
3615
|
+
showOverflowTooltip: false
|
3614
3616
|
};
|
3615
3617
|
const chatItemMessageStyle = (message.mine ? styles === null || styles === void 0 ? void 0 : styles.myChatItemMessageContainer : styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) ||
|
3616
3618
|
defaultChatItemMessageContainer(shouldOverlapAvatarAndMessage);
|
@@ -3718,7 +3720,7 @@ const MessageThread = (props) => {
|
|
3718
3720
|
setChatMessagesInitialized(chatMessagesInitialized);
|
3719
3721
|
};
|
3720
3722
|
// we try to only send those message status if user is scrolled to the bottom.
|
3721
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
3723
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
|
3722
3724
|
if (!isAtBottomOfScrollRef.current ||
|
3723
3725
|
!document.hasFocus() ||
|
3724
3726
|
!messagesRef.current ||
|
@@ -3769,7 +3771,7 @@ const MessageThread = (props) => {
|
|
3769
3771
|
setIsAtBottomOfScrollRef(atBottom);
|
3770
3772
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
3771
3773
|
// Infinite scrolling + threadInitialize function
|
3772
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
3774
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$o(void 0, void 0, void 0, function* () {
|
3773
3775
|
if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
|
3774
3776
|
if (onLoadPreviousChatMessages) {
|
3775
3777
|
isLoadingChatMessagesRef.current = true;
|
@@ -4172,7 +4174,7 @@ const meContainerStyle = {
|
|
4172
4174
|
*/
|
4173
4175
|
const ParticipantItem = (props) => {
|
4174
4176
|
var _a, _b, _c, _d;
|
4175
|
-
const { userId, displayName, onRenderAvatar, menuItems, onRenderIcon, presence, styles, me, onClick } = props;
|
4177
|
+
const { userId, displayName, onRenderAvatar, menuItems, onRenderIcon, presence, styles, me, onClick, showParticipantOverflowTooltip } = props;
|
4176
4178
|
const [itemHovered, setItemHovered] = React.useState(false);
|
4177
4179
|
const [menuHidden, setMenuHidden] = React.useState(true);
|
4178
4180
|
const containerRef = React.useRef(null);
|
@@ -4185,7 +4187,8 @@ const ParticipantItem = (props) => {
|
|
4185
4187
|
text: displayName,
|
4186
4188
|
size: react.PersonaSize.size32,
|
4187
4189
|
presence: presence,
|
4188
|
-
initialsTextColor: 'white'
|
4190
|
+
initialsTextColor: 'white',
|
4191
|
+
showOverflowTooltip: showParticipantOverflowTooltip
|
4189
4192
|
};
|
4190
4193
|
const avatar = onRenderAvatar ? (onRenderAvatar(userId !== null && userId !== void 0 ? userId : '', avatarOptions)) : (React__default['default'].createElement(react.Persona, Object.assign({ className: react.mergeStyles({
|
4191
4194
|
// Prevents persona text from being vertically truncated if a global line height is less than 1.15.
|
@@ -4254,7 +4257,7 @@ const iconStyles$1 = react.mergeStyles({
|
|
4254
4257
|
});
|
4255
4258
|
|
4256
4259
|
// Copyright (c) Microsoft Corporation.
|
4257
|
-
const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, styles, onParticipantClick) => {
|
4260
|
+
const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, styles, onParticipantClick, showParticipantOverflowTooltip) => {
|
4258
4261
|
const callingParticipant = participant;
|
4259
4262
|
let presence = undefined;
|
4260
4263
|
if (callingParticipant) {
|
@@ -4272,7 +4275,7 @@ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvat
|
|
4272
4275
|
callingParticipant.isMuted && (React__default['default'].createElement(react.Icon, { iconName: "ParticipantItemMicOff", className: iconStyles$1, ariaLabel: strings.mutedIconLabel }))))
|
4273
4276
|
: () => null;
|
4274
4277
|
const displayName = !participant.displayName ? strings.displayNamePlaceholder : participant.displayName;
|
4275
|
-
return (React__default['default'].createElement(ParticipantItem, { styles: styles, key: participant.userId, userId: participant.userId, displayName: displayName, me: myUserId ? participant.userId === myUserId : false, menuItems: menuItems, presence: presence, onRenderIcon: onRenderIcon, onRenderAvatar: onRenderAvatar, onClick: () => onParticipantClick === null || onParticipantClick === void 0 ? void 0 : onParticipantClick(participant) }));
|
4278
|
+
return (React__default['default'].createElement(ParticipantItem, { styles: styles, key: participant.userId, userId: participant.userId, displayName: displayName, me: myUserId ? participant.userId === myUserId : false, menuItems: menuItems, presence: presence, onRenderIcon: onRenderIcon, onRenderAvatar: onRenderAvatar, onClick: () => onParticipantClick === null || onParticipantClick === void 0 ? void 0 : onParticipantClick(participant), showParticipantOverflowTooltip: showParticipantOverflowTooltip }));
|
4276
4279
|
};
|
4277
4280
|
const getParticipantsForDefaultRender = (participants, excludeMe, myUserId) => {
|
4278
4281
|
if (!excludeMe || !myUserId) {
|
@@ -4295,7 +4298,7 @@ const getParticipantsForDefaultRender = (participants, excludeMe, myUserId) => {
|
|
4295
4298
|
*/
|
4296
4299
|
const ParticipantList = (props) => {
|
4297
4300
|
var _a, _b;
|
4298
|
-
const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems } = props;
|
4301
|
+
const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip } = props;
|
4299
4302
|
const ids = useIdentifiers();
|
4300
4303
|
const strings = useLocale$1().strings.participantItem;
|
4301
4304
|
const displayedParticipants = React.useMemo(() => {
|
@@ -4324,7 +4327,7 @@ const ParticipantList = (props) => {
|
|
4324
4327
|
const participantItemStyles = react.merge(participantListItemStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles);
|
4325
4328
|
return (React__default['default'].createElement(react.Stack, { "data-ui-id": ids.participantList, className: react.mergeStyles(participantListStyle$1, (_b = props.styles) === null || _b === void 0 ? void 0 : _b.root) }, displayedParticipants.map((participant) => onRenderParticipant
|
4326
4329
|
? onRenderParticipant(participant)
|
4327
|
-
: onRenderParticipantDefault(participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick))));
|
4330
|
+
: onRenderParticipantDefault(participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip))));
|
4328
4331
|
};
|
4329
4332
|
|
4330
4333
|
/**
|
@@ -4580,7 +4583,7 @@ const DEFAULT_PERSONA_MIN_SIZE_PX = 32;
|
|
4580
4583
|
const DefaultPlaceholder = (props) => {
|
4581
4584
|
const { text, noVideoAvailableAriaLabel, coinSize, styles, hidePersonaDetails } = props;
|
4582
4585
|
return (React__default['default'].createElement(react.Stack, { className: react.mergeStyles({ position: 'absolute', height: '100%', width: '100%' }) },
|
4583
|
-
React__default['default'].createElement(react.Persona, { styles: styles, coinSize: coinSize, hidePersonaDetails: hidePersonaDetails, text: text !== null && text !== void 0 ? text : '', initialsTextColor: "white", "aria-label": noVideoAvailableAriaLabel !== null && noVideoAvailableAriaLabel !== void 0 ? noVideoAvailableAriaLabel : '' })));
|
4586
|
+
React__default['default'].createElement(react.Persona, { styles: styles, coinSize: coinSize, hidePersonaDetails: hidePersonaDetails, text: text !== null && text !== void 0 ? text : '', initialsTextColor: "white", "aria-label": noVideoAvailableAriaLabel !== null && noVideoAvailableAriaLabel !== void 0 ? noVideoAvailableAriaLabel : '', showOverflowTooltip: false })));
|
4584
4587
|
};
|
4585
4588
|
const defaultPersonaStyles = { root: { margin: 'auto', maxHeight: '100%' } };
|
4586
4589
|
/**
|
@@ -6424,7 +6427,7 @@ const announcerStyles = {
|
|
6424
6427
|
|
6425
6428
|
// Copyright (c) Microsoft Corporation.
|
6426
6429
|
// Licensed under the MIT license.
|
6427
|
-
var __awaiter$
|
6430
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6428
6431
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6429
6432
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6430
6433
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6461,7 +6464,7 @@ const CameraButton = (props) => {
|
|
6461
6464
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
6462
6465
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
6463
6466
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
6464
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
6467
|
+
const onToggleClick = React.useCallback(() => __awaiter$n(void 0, void 0, void 0, function* () {
|
6465
6468
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
6466
6469
|
if (onToggleCamera) {
|
6467
6470
|
setWaitForCamera(true);
|
@@ -6593,7 +6596,7 @@ const lightThemeCallButtonStyles = {
|
|
6593
6596
|
|
6594
6597
|
// Copyright (c) Microsoft Corporation.
|
6595
6598
|
// Licensed under the MIT license.
|
6596
|
-
var __awaiter$
|
6599
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6597
6600
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6598
6601
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6599
6602
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6626,7 +6629,7 @@ const MicrophoneButton = (props) => {
|
|
6626
6629
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
6627
6630
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
6628
6631
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
6629
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
6632
|
+
const onToggleClick = React.useCallback(() => __awaiter$m(void 0, void 0, void 0, function* () {
|
6630
6633
|
if (onToggleMicrophone) {
|
6631
6634
|
try {
|
6632
6635
|
yield onToggleMicrophone();
|
@@ -6659,7 +6662,7 @@ const MicrophoneButton = (props) => {
|
|
6659
6662
|
*/
|
6660
6663
|
const ParticipantsButton = (props) => {
|
6661
6664
|
var _a, _b, _c, _d;
|
6662
|
-
const { callInvitationURL, styles, onMuteAll, onRenderIcon, onRenderParticipantList, participants, myUserId, excludeMe, onRenderParticipant, onRenderAvatar, onRemoveParticipant, onFetchParticipantMenuItems } = props;
|
6665
|
+
const { callInvitationURL, styles, onMuteAll, onRenderIcon, onRenderParticipantList, participants, myUserId, excludeMe, onRenderParticipant, onRenderAvatar, onRemoveParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip } = props;
|
6663
6666
|
const onRenderPeopleIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonParticipants" }));
|
6664
6667
|
const ids = useIdentifiers();
|
6665
6668
|
const onMuteAllCallback = React.useCallback(() => {
|
@@ -6669,7 +6672,7 @@ const ParticipantsButton = (props) => {
|
|
6669
6672
|
}, [onMuteAll]);
|
6670
6673
|
const defaultParticipantList = React.useCallback(() => {
|
6671
6674
|
var _a;
|
6672
|
-
return (React__default['default'].createElement(ParticipantList, { participants: participants, myUserId: myUserId, excludeMe: excludeMe, onRenderParticipant: onRenderParticipant, onRenderAvatar: onRenderAvatar, onRemoveParticipant: onRemoveParticipant, onFetchParticipantMenuItems: onFetchParticipantMenuItems, styles: react.merge(defaultParticipantListContainerStyle, (_a = styles === null || styles === void 0 ? void 0 : styles.menuStyles) === null || _a === void 0 ? void 0 : _a.participantListStyles) }));
|
6675
|
+
return (React__default['default'].createElement(ParticipantList, { participants: participants, myUserId: myUserId, excludeMe: excludeMe, onRenderParticipant: onRenderParticipant, onRenderAvatar: onRenderAvatar, onRemoveParticipant: onRemoveParticipant, onFetchParticipantMenuItems: onFetchParticipantMenuItems, styles: react.merge(defaultParticipantListContainerStyle, (_a = styles === null || styles === void 0 ? void 0 : styles.menuStyles) === null || _a === void 0 ? void 0 : _a.participantListStyles), showParticipantOverflowTooltip: showParticipantOverflowTooltip }));
|
6673
6676
|
}, [
|
6674
6677
|
excludeMe,
|
6675
6678
|
myUserId,
|
@@ -6678,7 +6681,8 @@ const ParticipantsButton = (props) => {
|
|
6678
6681
|
onRenderParticipant,
|
6679
6682
|
participants,
|
6680
6683
|
(_a = styles === null || styles === void 0 ? void 0 : styles.menuStyles) === null || _a === void 0 ? void 0 : _a.participantListStyles,
|
6681
|
-
onFetchParticipantMenuItems
|
6684
|
+
onFetchParticipantMenuItems,
|
6685
|
+
showParticipantOverflowTooltip
|
6682
6686
|
]);
|
6683
6687
|
const onCopyCallback = React.useCallback(() => {
|
6684
6688
|
if (callInvitationURL) {
|
@@ -7478,14 +7482,17 @@ const DialpadContainer = (props) => {
|
|
7478
7482
|
var _a, _b;
|
7479
7483
|
const theme = react.useTheme();
|
7480
7484
|
const [textValue, setTextValue] = React.useState('');
|
7481
|
-
const { onSendDtmfTone, onClickDialpadButton, onDisplayDialpadInput } = props;
|
7485
|
+
const { onSendDtmfTone, onClickDialpadButton, onDisplayDialpadInput, onChange } = props;
|
7482
7486
|
const onClickDialpad = (input, index) => {
|
7483
7487
|
setTextValue(textValue + input);
|
7484
7488
|
if (onSendDtmfTone) {
|
7485
7489
|
onSendDtmfTone(DtmfTones[index]);
|
7486
7490
|
}
|
7487
7491
|
if (onClickDialpadButton) {
|
7488
|
-
onClickDialpadButton();
|
7492
|
+
onClickDialpadButton(input, index);
|
7493
|
+
}
|
7494
|
+
if (onChange) {
|
7495
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(textValue + input) : formatPhoneNumber(textValue + input));
|
7489
7496
|
}
|
7490
7497
|
};
|
7491
7498
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -7495,7 +7502,14 @@ const DialpadContainer = (props) => {
|
|
7495
7502
|
// comment out the following line for now to disable customization for dialpad content
|
7496
7503
|
// const dialpadButtonsContent = props.dialpadButtons ?? dialPadButtonsDefault;
|
7497
7504
|
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" },
|
7498
|
-
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),
|
7505
|
+
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),
|
7506
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7507
|
+
onChange: (e) => {
|
7508
|
+
setText(e);
|
7509
|
+
if (onChange) {
|
7510
|
+
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(e.target.value) : formatPhoneNumber(e.target.value));
|
7511
|
+
}
|
7512
|
+
}, placeholder: props.placeholderText, "data-test-id": "dialpad-input" }),
|
7499
7513
|
React__default['default'].createElement(react.FocusZone, null, dialPadButtonsDefault.map((rows, rowIndex) => {
|
7500
7514
|
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}`,
|
7501
7515
|
/* row index = 0
|
@@ -7975,7 +7989,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
7975
7989
|
|
7976
7990
|
// Copyright (c) Microsoft Corporation.
|
7977
7991
|
// Licensed under the MIT license.
|
7978
|
-
var __awaiter$
|
7992
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7979
7993
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7980
7994
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7981
7995
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7998,35 +8012,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
7998
8012
|
let messageIterator = undefined;
|
7999
8013
|
let readReceiptIterator = undefined;
|
8000
8014
|
return {
|
8001
|
-
onSendMessage: (content, options) => __awaiter$
|
8015
|
+
onSendMessage: (content, options) => __awaiter$l(void 0, void 0, void 0, function* () {
|
8002
8016
|
const sendMessageRequest = {
|
8003
8017
|
content,
|
8004
8018
|
senderDisplayName: chatClient.getState().displayName
|
8005
8019
|
};
|
8006
8020
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
8007
8021
|
}),
|
8008
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
8022
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$l(void 0, void 0, void 0, function* () {
|
8009
8023
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
8010
8024
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
8011
8025
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
8012
8026
|
}),
|
8013
|
-
onDeleteMessage: (messageId) => __awaiter$
|
8027
|
+
onDeleteMessage: (messageId) => __awaiter$l(void 0, void 0, void 0, function* () {
|
8014
8028
|
yield chatThreadClient.deleteMessage(messageId);
|
8015
8029
|
}),
|
8016
8030
|
// This handler is designed for chatThread to consume
|
8017
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
8031
|
+
onMessageSeen: (chatMessageId) => __awaiter$l(void 0, void 0, void 0, function* () {
|
8018
8032
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
8019
8033
|
}),
|
8020
|
-
onTyping: () => __awaiter$
|
8034
|
+
onTyping: () => __awaiter$l(void 0, void 0, void 0, function* () {
|
8021
8035
|
yield chatThreadClient.sendTypingNotification();
|
8022
8036
|
}),
|
8023
|
-
onRemoveParticipant: (userId) => __awaiter$
|
8037
|
+
onRemoveParticipant: (userId) => __awaiter$l(void 0, void 0, void 0, function* () {
|
8024
8038
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
8025
8039
|
}),
|
8026
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
8040
|
+
updateThreadTopicName: (topicName) => __awaiter$l(void 0, void 0, void 0, function* () {
|
8027
8041
|
yield chatThreadClient.updateTopic(topicName);
|
8028
8042
|
}),
|
8029
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
8043
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$l(void 0, void 0, void 0, function* () {
|
8030
8044
|
var _a, _b, _c;
|
8031
8045
|
if (messageIterator === undefined) {
|
8032
8046
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -8717,7 +8731,7 @@ const findSelector = (component) => {
|
|
8717
8731
|
|
8718
8732
|
// Copyright (c) Microsoft Corporation.
|
8719
8733
|
// Licensed under the MIT license.
|
8720
|
-
var __awaiter$
|
8734
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8721
8735
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8722
8736
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8723
8737
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8766,10 +8780,10 @@ class ProxyDeviceManager {
|
|
8766
8780
|
this.selectCamera = (videoDeviceInfo) => {
|
8767
8781
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
8768
8782
|
};
|
8769
|
-
this.videoDevicesUpdated = () => __awaiter$
|
8783
|
+
this.videoDevicesUpdated = () => __awaiter$k(this, void 0, void 0, function* () {
|
8770
8784
|
this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
|
8771
8785
|
});
|
8772
|
-
this.audioDevicesUpdated = () => __awaiter$
|
8786
|
+
this.audioDevicesUpdated = () => __awaiter$k(this, void 0, void 0, function* () {
|
8773
8787
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
8774
8788
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
8775
8789
|
});
|
@@ -8966,7 +8980,7 @@ class CallIdHistory {
|
|
8966
8980
|
|
8967
8981
|
// Copyright (c) Microsoft Corporation.
|
8968
8982
|
// Licensed under the MIT license.
|
8969
|
-
var __awaiter$
|
8983
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8970
8984
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8971
8985
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8972
8986
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9449,7 +9463,7 @@ class CallContext$1 {
|
|
9449
9463
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
9450
9464
|
*/
|
9451
9465
|
withAsyncErrorTeedToState(action, target) {
|
9452
|
-
return (...args) => __awaiter$
|
9466
|
+
return (...args) => __awaiter$j(this, void 0, void 0, function* () {
|
9453
9467
|
try {
|
9454
9468
|
return yield action(...args);
|
9455
9469
|
}
|
@@ -9513,7 +9527,7 @@ const findOldestCallEnded = (calls) => {
|
|
9513
9527
|
|
9514
9528
|
// Copyright (c) Microsoft Corporation.
|
9515
9529
|
// Licensed under the MIT license.
|
9516
|
-
var __awaiter$
|
9530
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9517
9531
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9518
9532
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9519
9533
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9533,63 +9547,63 @@ class ProxyCall {
|
|
9533
9547
|
switch (prop) {
|
9534
9548
|
case 'mute': {
|
9535
9549
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9536
|
-
return __awaiter$
|
9550
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9537
9551
|
return yield target.mute(...args);
|
9538
9552
|
});
|
9539
9553
|
}, 'Call.mute');
|
9540
9554
|
}
|
9541
9555
|
case 'unmute': {
|
9542
9556
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9543
|
-
return __awaiter$
|
9557
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9544
9558
|
return yield target.unmute(...args);
|
9545
9559
|
});
|
9546
9560
|
}, 'Call.unmute');
|
9547
9561
|
}
|
9548
9562
|
case 'startVideo': {
|
9549
9563
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9550
|
-
return __awaiter$
|
9564
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9551
9565
|
return yield target.startVideo(...args);
|
9552
9566
|
});
|
9553
9567
|
}, 'Call.startVideo');
|
9554
9568
|
}
|
9555
9569
|
case 'stopVideo': {
|
9556
9570
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9557
|
-
return __awaiter$
|
9571
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9558
9572
|
return yield target.stopVideo(...args);
|
9559
9573
|
});
|
9560
9574
|
}, 'Call.stopVideo');
|
9561
9575
|
}
|
9562
9576
|
case 'startScreenSharing': {
|
9563
9577
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9564
|
-
return __awaiter$
|
9578
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9565
9579
|
return yield target.startScreenSharing(...args);
|
9566
9580
|
});
|
9567
9581
|
}, 'Call.startScreenSharing');
|
9568
9582
|
}
|
9569
9583
|
case 'stopScreenSharing': {
|
9570
9584
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9571
|
-
return __awaiter$
|
9585
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9572
9586
|
return yield target.stopScreenSharing(...args);
|
9573
9587
|
});
|
9574
9588
|
}, 'Call.stopScreenSharing');
|
9575
9589
|
}
|
9576
9590
|
case 'hold': {
|
9577
9591
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9578
|
-
return __awaiter$
|
9592
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9579
9593
|
return yield target.hold(...args);
|
9580
9594
|
});
|
9581
9595
|
}, 'Call.hold');
|
9582
9596
|
}
|
9583
9597
|
case 'resume': {
|
9584
9598
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9585
|
-
return __awaiter$
|
9599
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9586
9600
|
return yield target.resume(...args);
|
9587
9601
|
});
|
9588
9602
|
}, 'Call.resume');
|
9589
9603
|
}
|
9590
9604
|
case 'addParticipant': {
|
9591
9605
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9592
|
-
return __awaiter$
|
9606
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
9593
9607
|
return yield target.addParticipant(...args);
|
9594
9608
|
});
|
9595
9609
|
}, 'Call.addParticipant');
|
@@ -9797,7 +9811,7 @@ class RemoteVideoStreamSubscriber {
|
|
9797
9811
|
|
9798
9812
|
// Copyright (c) Microsoft Corporation.
|
9799
9813
|
// Licensed under the MIT license.
|
9800
|
-
var __awaiter$
|
9814
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9801
9815
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9802
9816
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9803
9817
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9807,7 +9821,7 @@ var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
9807
9821
|
});
|
9808
9822
|
};
|
9809
9823
|
function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
|
9810
|
-
return __awaiter$
|
9824
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
9811
9825
|
// Render RemoteVideoStream that is part of a Call
|
9812
9826
|
const streamId = stream.id;
|
9813
9827
|
let participantKey;
|
@@ -9915,7 +9929,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
9915
9929
|
});
|
9916
9930
|
}
|
9917
9931
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
9918
|
-
return __awaiter$
|
9932
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
9919
9933
|
_logEvent(callingStatefulLogger, {
|
9920
9934
|
name: EventNames.START_LOCAL_STREAM_RENDERING,
|
9921
9935
|
level: 'info',
|
@@ -10031,7 +10045,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
10031
10045
|
});
|
10032
10046
|
}
|
10033
10047
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
10034
|
-
return __awaiter$
|
10048
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
10035
10049
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
10036
10050
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
10037
10051
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -10589,6 +10603,55 @@ class CallSubscriber {
|
|
10589
10603
|
}
|
10590
10604
|
}
|
10591
10605
|
|
10606
|
+
// Copyright (c) Microsoft Corporation.
|
10607
|
+
// Licensed under the MIT license.
|
10608
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10609
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10610
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
10611
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
10612
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
10613
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
10614
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
10615
|
+
});
|
10616
|
+
};
|
10617
|
+
/**
|
10618
|
+
* @private
|
10619
|
+
*/
|
10620
|
+
class ProxyIncomingCall {
|
10621
|
+
constructor(context) {
|
10622
|
+
this._context = context;
|
10623
|
+
}
|
10624
|
+
get(target, prop) {
|
10625
|
+
switch (prop) {
|
10626
|
+
case 'accept': {
|
10627
|
+
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10628
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
10629
|
+
return yield target.accept(...args);
|
10630
|
+
});
|
10631
|
+
}, 'IncomingCall.accept');
|
10632
|
+
}
|
10633
|
+
case 'reject': {
|
10634
|
+
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10635
|
+
return __awaiter$g(this, void 0, void 0, function* () {
|
10636
|
+
return yield target.reject(...args);
|
10637
|
+
});
|
10638
|
+
}, 'IncomingCall.reject');
|
10639
|
+
}
|
10640
|
+
default:
|
10641
|
+
return Reflect.get(target, prop);
|
10642
|
+
}
|
10643
|
+
}
|
10644
|
+
}
|
10645
|
+
/**
|
10646
|
+
* Creates a declarative Incoming Call by proxying IncomingCall using ProxyIncomingCall.
|
10647
|
+
* @param incomingCall - IncomingCall from SDK
|
10648
|
+
* @returns proxied IncomingCall
|
10649
|
+
*/
|
10650
|
+
const incomingCallDeclaratify = (incomingCall, context) => {
|
10651
|
+
const proxyIncomingCall = new ProxyIncomingCall(context);
|
10652
|
+
return new Proxy(incomingCall, proxyIncomingCall);
|
10653
|
+
};
|
10654
|
+
|
10592
10655
|
// Copyright (c) Microsoft Corporation.
|
10593
10656
|
// Licensed under the MIT license.
|
10594
10657
|
/**
|
@@ -10646,6 +10709,7 @@ class ProxyCallAgent {
|
|
10646
10709
|
incomingCallSubscriber.unsubscribe();
|
10647
10710
|
}
|
10648
10711
|
this._incomingCallSubscribers.clear();
|
10712
|
+
this._declarativeIncomingCalls.clear();
|
10649
10713
|
for (const [_, declarativeCall] of this._declarativeCalls.entries()) {
|
10650
10714
|
declarativeCall.unsubscribe();
|
10651
10715
|
}
|
@@ -10686,14 +10750,16 @@ class ProxyCallAgent {
|
|
10686
10750
|
incomingCallSubscriber.unsubscribe();
|
10687
10751
|
this._incomingCallSubscribers.delete(incomingCallId);
|
10688
10752
|
}
|
10753
|
+
this._declarativeIncomingCalls.delete(incomingCallId);
|
10689
10754
|
this._context.setIncomingCallEnded(incomingCallId, callEndReason);
|
10690
10755
|
};
|
10691
|
-
this.incomingCall = (
|
10756
|
+
this.incomingCall = ({ incomingCall }) => {
|
10692
10757
|
// Make sure to not subscribe to the incoming call if we are already subscribed to it.
|
10693
|
-
if (!this._incomingCallSubscribers.has(
|
10694
|
-
this._incomingCallSubscribers.set(
|
10758
|
+
if (!this._incomingCallSubscribers.has(incomingCall.id)) {
|
10759
|
+
this._incomingCallSubscribers.set(incomingCall.id, new IncomingCallSubscriber(incomingCall, this.setIncomingCallEnded));
|
10695
10760
|
}
|
10696
|
-
this.
|
10761
|
+
this._declarativeIncomingCalls.set(incomingCall.id, incomingCallDeclaratify(incomingCall, this._context));
|
10762
|
+
this._context.setIncomingCall(convertSdkIncomingCallToDeclarativeIncomingCall(incomingCall));
|
10697
10763
|
};
|
10698
10764
|
this.addCall = (call) => {
|
10699
10765
|
var _a;
|
@@ -10718,6 +10784,7 @@ class ProxyCallAgent {
|
|
10718
10784
|
this._internalContext = internalContext;
|
10719
10785
|
this._callSubscribers = new Map();
|
10720
10786
|
this._incomingCallSubscribers = new Map();
|
10787
|
+
this._declarativeIncomingCalls = new Map();
|
10721
10788
|
this._declarativeCalls = new Map();
|
10722
10789
|
this._externalCallsUpdatedListeners = new Set();
|
10723
10790
|
this.subscribe();
|
@@ -10772,6 +10839,18 @@ class ProxyCallAgent {
|
|
10772
10839
|
});
|
10773
10840
|
};
|
10774
10841
|
}
|
10842
|
+
/**
|
10843
|
+
* This attribute is a special case and doesn't exist on the CallAgent interface.
|
10844
|
+
* We need this to be able to return a declarative incoming call object using the call agent.
|
10845
|
+
* In a standard headless SDK usage, the right way to get an incoming call is to use the `incomingCall` event.
|
10846
|
+
* However, using the declarative layer, the ideal usage would be to:
|
10847
|
+
* 1. subscribe to the `onStateChange` event
|
10848
|
+
* 2. Get the incoming call from the new state and it's ID
|
10849
|
+
* 3. Use `callAgent.incomingCalls` and filter an incoming call ID to get a declarative incoming call object
|
10850
|
+
*/
|
10851
|
+
case 'incomingCalls': {
|
10852
|
+
return this._declarativeIncomingCalls;
|
10853
|
+
}
|
10775
10854
|
default:
|
10776
10855
|
return Reflect.get(target, prop);
|
10777
10856
|
}
|
@@ -13215,12 +13294,14 @@ const avatarDeepDifferenceCheck = (currentData, newData) => {
|
|
13215
13294
|
*/
|
13216
13295
|
const AvatarPersona = (props) => {
|
13217
13296
|
var _a, _b, _c, _d, _e, _f;
|
13218
|
-
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor } = props;
|
13297
|
+
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
13219
13298
|
const userIds = React.useMemo(() => {
|
13220
13299
|
return [userId];
|
13221
13300
|
}, [userId]);
|
13222
13301
|
const [data] = useCustomAvatarPersonaData(userIds, dataProvider);
|
13223
|
-
return (React__default['default'].createElement(react.Persona, Object.assign({}, props, { text: (_a = data === null || data === void 0 ? void 0 : data.text) !== null && _a !== void 0 ? _a : text, imageUrl: (_b = data === null || data === void 0 ? void 0 : data.imageUrl) !== null && _b !== void 0 ? _b : imageUrl, imageInitials: (_c = data === null || data === void 0 ? void 0 : data.imageInitials) !== null && _c !== void 0 ? _c : imageInitials, initialsColor: (_d = data === null || data === void 0 ? void 0 : data.initialsColor) !== null && _d !== void 0 ? _d : initialsColor, initialsTextColor: (_f = (_e = data === null || data === void 0 ? void 0 : data.initialsTextColor) !== null && _e !== void 0 ? _e : initialsTextColor) !== null && _f !== void 0 ? _f : 'white'
|
13302
|
+
return (React__default['default'].createElement(react.Persona, Object.assign({}, props, { text: (_a = data === null || data === void 0 ? void 0 : data.text) !== null && _a !== void 0 ? _a : text, imageUrl: (_b = data === null || data === void 0 ? void 0 : data.imageUrl) !== null && _b !== void 0 ? _b : imageUrl, imageInitials: (_c = data === null || data === void 0 ? void 0 : data.imageInitials) !== null && _c !== void 0 ? _c : imageInitials, initialsColor: (_d = data === null || data === void 0 ? void 0 : data.initialsColor) !== null && _d !== void 0 ? _d : initialsColor, initialsTextColor: (_f = (_e = data === null || data === void 0 ? void 0 : data.initialsTextColor) !== null && _e !== void 0 ? _e : initialsTextColor) !== null && _f !== void 0 ? _f : 'white',
|
13303
|
+
// default disable tooltip unless specified
|
13304
|
+
showOverflowTooltip: showOverflowTooltip !== null && showOverflowTooltip !== void 0 ? showOverflowTooltip : false })));
|
13224
13305
|
};
|
13225
13306
|
|
13226
13307
|
// Copyright (c) Microsoft Corporation.
|
@@ -13481,7 +13562,7 @@ const ParticipantListWithHeading = (props) => {
|
|
13481
13562
|
return (React__default['default'].createElement(react.Stack, { className: participantListStack },
|
13482
13563
|
React__default['default'].createElement(react.Stack.Item, { styles: subheadingStyleThemed }, title),
|
13483
13564
|
React__default['default'].createElement(react.FocusZone, { className: participantListContainerStyle },
|
13484
|
-
React__default['default'].createElement(ParticipantList, Object.assign({}, participantListProps, { styles: props.isMobile ? participantListMobileStyle : participantListStyle, onRenderAvatar: (userId, options) => (React__default['default'].createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { dataProvider: onFetchAvatarPersonaData }))), onFetchParticipantMenuItems: onFetchParticipantMenuItems })))));
|
13565
|
+
React__default['default'].createElement(ParticipantList, Object.assign({}, participantListProps, { styles: props.isMobile ? participantListMobileStyle : participantListStyle, onRenderAvatar: (userId, options) => (React__default['default'].createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { dataProvider: onFetchAvatarPersonaData }))), onFetchParticipantMenuItems: onFetchParticipantMenuItems, showParticipantOverflowTooltip: !props.isMobile })))));
|
13485
13566
|
};
|
13486
13567
|
|
13487
13568
|
// Copyright (c) Microsoft Corporation.
|
@@ -13489,11 +13570,11 @@ const ParticipantListWithHeading = (props) => {
|
|
13489
13570
|
* @private
|
13490
13571
|
*/
|
13491
13572
|
const ChatScreenPeoplePane = (props) => {
|
13492
|
-
const { onFetchAvatarPersonaData, onFetchParticipantMenuItems } = props;
|
13573
|
+
const { onFetchAvatarPersonaData, onFetchParticipantMenuItems, isMobile } = props;
|
13493
13574
|
const locale = useLocale();
|
13494
13575
|
const chatListHeader = locale.strings.chat.chatListHeader;
|
13495
13576
|
const participantListProps = usePropsFor$2(ParticipantList);
|
13496
|
-
return (React__default['default'].createElement(ParticipantContainer, { participantListProps: participantListProps, title: chatListHeader, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems }));
|
13577
|
+
return (React__default['default'].createElement(ParticipantContainer, { participantListProps: participantListProps, title: chatListHeader, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, isMobile: isMobile }));
|
13497
13578
|
};
|
13498
13579
|
|
13499
13580
|
/**
|
@@ -13613,7 +13694,7 @@ const ChatScreen = (props) => {
|
|
13613
13694
|
onCancelFileUpload: adapter.cancelFileUpload }))),
|
13614
13695
|
formFactor !== 'mobile' && React__default['default'].createElement(AttachFileButton, null)))),
|
13615
13696
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
13616
|
-
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React__default['default'].createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems })))));
|
13697
|
+
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React__default['default'].createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' })))));
|
13617
13698
|
};
|
13618
13699
|
|
13619
13700
|
// Copyright (c) Microsoft Corporation.
|
@@ -13907,9 +13988,9 @@ const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
|
13907
13988
|
onSelectSpeaker: (deviceInfo) => __awaiter$7(void 0, void 0, void 0, function* () {
|
13908
13989
|
yield adapter.setSpeaker(deviceInfo);
|
13909
13990
|
}),
|
13910
|
-
onStartCall: (participants) => {
|
13991
|
+
onStartCall: (participants, options) => {
|
13911
13992
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
13912
|
-
return adapter.startCall(rawIds);
|
13993
|
+
return adapter.startCall(rawIds, options);
|
13913
13994
|
},
|
13914
13995
|
onStartScreenShare: () => __awaiter$7(void 0, void 0, void 0, function* () {
|
13915
13996
|
yield adapter.startScreenShare();
|
@@ -14218,7 +14299,7 @@ const Participants = (props) => {
|
|
14218
14299
|
var _a;
|
14219
14300
|
return concatButtonBaseStyles(props.increaseFlyoutItemSize ? participantButtonWithIncreasedTouchTargets : {}, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
|
14220
14301
|
}, [props.increaseFlyoutItemSize, props.styles]);
|
14221
|
-
return (React__default['default'].createElement(ParticipantsButton, Object.assign({ "data-ui-id": "call-composite-participants-button" }, participantsButtonProps, { showLabel: props.displayType !== 'compact', callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, disabled: isDisabled$1(props.option), styles: participantsButtonStyles })));
|
14302
|
+
return (React__default['default'].createElement(ParticipantsButton, Object.assign({ "data-ui-id": "call-composite-participants-button" }, participantsButtonProps, { showLabel: props.displayType !== 'compact', callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, disabled: isDisabled$1(props.option), styles: participantsButtonStyles, showParticipantOverflowTooltip: !props.isMobile })));
|
14222
14303
|
};
|
14223
14304
|
const isDisabled$1 = (option) => {
|
14224
14305
|
if (option === undefined || option === true || option === false) {
|
@@ -14259,7 +14340,7 @@ const CallControls = (props) => {
|
|
14259
14340
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.microphoneButton) && React__default['default'].createElement(Microphone, { displayType: options === null || options === void 0 ? void 0 : options.displayType }),
|
14260
14341
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.cameraButton) && React__default['default'].createElement(Camera, { displayType: options === null || options === void 0 ? void 0 : options.displayType }),
|
14261
14342
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton) && (React__default['default'].createElement(ScreenShare, { option: options === null || options === void 0 ? void 0 : options.screenShareButton, displayType: options === null || options === void 0 ? void 0 : options.displayType })),
|
14262
|
-
isEnabled$2(options === null || options === void 0 ? void 0 : options.participantsButton) && (React__default['default'].createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize })),
|
14343
|
+
isEnabled$2(options === null || options === void 0 ? void 0 : options.participantsButton) && (React__default['default'].createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile })),
|
14263
14344
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.devicesButton) && (React__default['default'].createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize })),
|
14264
14345
|
customButtons['primary'],
|
14265
14346
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.endCallButton) && React__default['default'].createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
|
@@ -14407,7 +14488,7 @@ const CallArrangement = (props) => {
|
|
14407
14488
|
!!props.mutedNotificationProps && React__default['default'].createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps))),
|
14408
14489
|
React__default['default'].createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React__default['default'].createElement(react.Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent()))),
|
14409
14490
|
((_a = props.callControlProps) === null || _a === void 0 ? void 0 : _a.options) !== false && (React__default['default'].createElement(react.Stack.Item, { className: callControlsContainerStyles },
|
14410
|
-
React__default['default'].createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight })))))));
|
14491
|
+
React__default['default'].createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView })))))));
|
14411
14492
|
};
|
14412
14493
|
|
14413
14494
|
// Copyright (c) Microsoft Corporation.
|
@@ -15807,8 +15888,7 @@ class AzureCommunicationCallAdapter {
|
|
15807
15888
|
}));
|
15808
15889
|
});
|
15809
15890
|
}
|
15810
|
-
|
15811
|
-
startCall(participants) {
|
15891
|
+
startCall(participants, options) {
|
15812
15892
|
var _a, _b;
|
15813
15893
|
if (_isInCall((_b = (_a = this.getState().call) === null || _a === void 0 ? void 0 : _a.state) !== null && _b !== void 0 ? _b : 'None')) {
|
15814
15894
|
throw new Error('You are already in the call.');
|
@@ -15817,9 +15897,18 @@ class AzureCommunicationCallAdapter {
|
|
15817
15897
|
// FIXME: `onStartCall` does not allow a Teams user.
|
15818
15898
|
// Need some way to return an error if a Teams user is provided.
|
15819
15899
|
const backendId = fromFlatCommunicationIdentifier(participant);
|
15900
|
+
if (communicationCommon.isPhoneNumberIdentifier(backendId)) {
|
15901
|
+
if ((options === null || options === void 0 ? void 0 : options.alternateCallerId) === undefined) {
|
15902
|
+
throw new Error('unable to start call, PSTN user present with no alternativeCallerID.');
|
15903
|
+
}
|
15904
|
+
return backendId;
|
15905
|
+
}
|
15906
|
+
else if (communicationCommon.isCommunicationUserIdentifier(backendId)) {
|
15907
|
+
return backendId;
|
15908
|
+
}
|
15820
15909
|
return backendId;
|
15821
15910
|
});
|
15822
|
-
const call = this.handlers.onStartCall(idsToAdd);
|
15911
|
+
const call = this.handlers.onStartCall(idsToAdd, options);
|
15823
15912
|
if (!call) {
|
15824
15913
|
throw new Error('Unable to start call.');
|
15825
15914
|
}
|
@@ -16583,8 +16672,8 @@ class CallWithChatBackedCallAdapter {
|
|
16583
16672
|
return this.callWithChatAdapter.joinCall(microphoneOn);
|
16584
16673
|
};
|
16585
16674
|
this.leaveCall = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
|
16586
|
-
this.startCall = (participants) => {
|
16587
|
-
return this.callWithChatAdapter.startCall(participants);
|
16675
|
+
this.startCall = (participants, options) => {
|
16676
|
+
return this.callWithChatAdapter.startCall(participants, options);
|
16588
16677
|
};
|
16589
16678
|
this.setCamera = (sourceId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
|
16590
16679
|
this.setMicrophone = (sourceId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
|
@@ -17732,8 +17821,8 @@ class AzureCommunicationCallWithChatAdapter {
|
|
17732
17821
|
});
|
17733
17822
|
}
|
17734
17823
|
/** Start a new Call. */
|
17735
|
-
startCall(participants) {
|
17736
|
-
return this.callAdapter.startCall(participants);
|
17824
|
+
startCall(participants, options) {
|
17825
|
+
return this.callAdapter.startCall(participants, options);
|
17737
17826
|
}
|
17738
17827
|
/**
|
17739
17828
|
* Subscribe to state change events.
|