@azure/communication-react 1.3.2-alpha-202207160015.0 → 1.3.2-alpha-202207210015.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 -1
- package/dist/dist-cjs/communication-react/index.js +574 -432
- 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/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 +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/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/index.d.ts.map +1 -1
- package/dist/dist-esm/react-components/src/index.js +2 -0
- package/dist/dist-esm/react-components/src/index.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/permissions/PermissionsProvider.d.ts +55 -0
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts.map +1 -0
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +61 -0
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -0
- package/dist/dist-esm/react-components/src/permissions/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/permissions/index.d.ts.map +1 -0
- package/dist/dist-esm/react-components/src/permissions/index.js +4 -0
- package/dist/dist-esm/react-components/src/permissions/index.js.map +1 -0
- 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 +5 -0
- 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 +30 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +36 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -1
- 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 +8 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.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 +30 -54
- 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 +1 -7
- 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 +1 -21
- 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 +4 -6
- 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 +7 -15
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +12 -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 +3 -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 +6 -7
- 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/common/styles/ModalLocalAndRemotePIP.styles.d.ts +35 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +58 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/styles/MobilePane.styles.d.ts → common/styles/Pane.styles.d.ts} +18 -2
- package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/styles/MobilePane.styles.js → common/styles/Pane.styles.js} +29 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.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/dist-esm/react-composites/src/composites/common/utils.d.ts +14 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js +32 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +22 -13
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +8 -8
- 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 +0 -9
- 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-202207210015.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.
|
@@ -7741,6 +7752,60 @@ const HoldButton = (props) => {
|
|
7741
7752
|
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { strings: strings, onClick: onToggleHold !== null && onToggleHold !== void 0 ? onToggleHold : props.onClick, onRenderOnIcon: onRenderResumeIcon, onRenderOffIcon: onRenderHoldIcon })));
|
7742
7753
|
};
|
7743
7754
|
|
7755
|
+
// Copyright (c) Microsoft Corporation.
|
7756
|
+
/**
|
7757
|
+
* @internal
|
7758
|
+
*/
|
7759
|
+
const presenterPermissions = {
|
7760
|
+
cameraButton: true,
|
7761
|
+
microphoneButton: true,
|
7762
|
+
screenShare: true,
|
7763
|
+
participantList: true
|
7764
|
+
};
|
7765
|
+
/**
|
7766
|
+
* @internal
|
7767
|
+
*/
|
7768
|
+
const consumerPermissions = {
|
7769
|
+
cameraButton: false,
|
7770
|
+
microphoneButton: false,
|
7771
|
+
screenShare: false,
|
7772
|
+
participantList: false
|
7773
|
+
};
|
7774
|
+
/**
|
7775
|
+
* @internal
|
7776
|
+
*/
|
7777
|
+
const attendeePermissions = {
|
7778
|
+
cameraButton: true,
|
7779
|
+
microphoneButton: true,
|
7780
|
+
screenShare: false,
|
7781
|
+
participantList: true
|
7782
|
+
};
|
7783
|
+
/**
|
7784
|
+
* @internal
|
7785
|
+
*/
|
7786
|
+
const PermissionsContext = React.createContext(presenterPermissions);
|
7787
|
+
/**
|
7788
|
+
* @internal
|
7789
|
+
*/
|
7790
|
+
const _PermissionsProvider = (props) => {
|
7791
|
+
const { permissions, children } = props;
|
7792
|
+
return React__default['default'].createElement(PermissionsContext.Provider, { value: permissions }, children);
|
7793
|
+
};
|
7794
|
+
/**
|
7795
|
+
* @internal
|
7796
|
+
*/
|
7797
|
+
const _getPermissions = (role) => {
|
7798
|
+
if (role === 'Consumer') {
|
7799
|
+
return consumerPermissions;
|
7800
|
+
}
|
7801
|
+
else if (role === 'Attendee') {
|
7802
|
+
return attendeePermissions;
|
7803
|
+
}
|
7804
|
+
else {
|
7805
|
+
return presenterPermissions;
|
7806
|
+
}
|
7807
|
+
};
|
7808
|
+
|
7744
7809
|
// Copyright (c) Microsoft Corporation.
|
7745
7810
|
// Licensed under the MIT license.
|
7746
7811
|
/**
|
@@ -8180,7 +8245,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
8180
8245
|
|
8181
8246
|
// Copyright (c) Microsoft Corporation.
|
8182
8247
|
// Licensed under the MIT license.
|
8183
|
-
var __awaiter$
|
8248
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8184
8249
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8185
8250
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8186
8251
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8203,35 +8268,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
8203
8268
|
let messageIterator = undefined;
|
8204
8269
|
let readReceiptIterator = undefined;
|
8205
8270
|
return {
|
8206
|
-
onSendMessage: (content, options) => __awaiter$
|
8271
|
+
onSendMessage: (content, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8207
8272
|
const sendMessageRequest = {
|
8208
8273
|
content,
|
8209
8274
|
senderDisplayName: chatClient.getState().displayName
|
8210
8275
|
};
|
8211
8276
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
8212
8277
|
}),
|
8213
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
8278
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8214
8279
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
8215
8280
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
8216
8281
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
8217
8282
|
}),
|
8218
|
-
onDeleteMessage: (messageId) => __awaiter$
|
8283
|
+
onDeleteMessage: (messageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8219
8284
|
yield chatThreadClient.deleteMessage(messageId);
|
8220
8285
|
}),
|
8221
8286
|
// This handler is designed for chatThread to consume
|
8222
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
8287
|
+
onMessageSeen: (chatMessageId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8223
8288
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
8224
8289
|
}),
|
8225
|
-
onTyping: () => __awaiter$
|
8290
|
+
onTyping: () => __awaiter$m(void 0, void 0, void 0, function* () {
|
8226
8291
|
yield chatThreadClient.sendTypingNotification();
|
8227
8292
|
}),
|
8228
|
-
onRemoveParticipant: (userId) => __awaiter$
|
8293
|
+
onRemoveParticipant: (userId) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8229
8294
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
8230
8295
|
}),
|
8231
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
8296
|
+
updateThreadTopicName: (topicName) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8232
8297
|
yield chatThreadClient.updateTopic(topicName);
|
8233
8298
|
}),
|
8234
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
8299
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$m(void 0, void 0, void 0, function* () {
|
8235
8300
|
var _a, _b, _c;
|
8236
8301
|
if (messageIterator === undefined) {
|
8237
8302
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -8922,7 +8987,7 @@ const findSelector = (component) => {
|
|
8922
8987
|
|
8923
8988
|
// Copyright (c) Microsoft Corporation.
|
8924
8989
|
// Licensed under the MIT license.
|
8925
|
-
var __awaiter$
|
8990
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8926
8991
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8927
8992
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8928
8993
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8971,10 +9036,10 @@ class ProxyDeviceManager {
|
|
8971
9036
|
this.selectCamera = (videoDeviceInfo) => {
|
8972
9037
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
8973
9038
|
};
|
8974
|
-
this.videoDevicesUpdated = () => __awaiter$
|
9039
|
+
this.videoDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
|
8975
9040
|
this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
|
8976
9041
|
});
|
8977
|
-
this.audioDevicesUpdated = () => __awaiter$
|
9042
|
+
this.audioDevicesUpdated = () => __awaiter$l(this, void 0, void 0, function* () {
|
8978
9043
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
8979
9044
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
8980
9045
|
});
|
@@ -9171,7 +9236,7 @@ class CallIdHistory {
|
|
9171
9236
|
|
9172
9237
|
// Copyright (c) Microsoft Corporation.
|
9173
9238
|
// Licensed under the MIT license.
|
9174
|
-
var __awaiter$
|
9239
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9175
9240
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9176
9241
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9177
9242
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9656,7 +9721,7 @@ class CallContext$1 {
|
|
9656
9721
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
9657
9722
|
*/
|
9658
9723
|
withAsyncErrorTeedToState(action, target) {
|
9659
|
-
return (...args) => __awaiter$
|
9724
|
+
return (...args) => __awaiter$k(this, void 0, void 0, function* () {
|
9660
9725
|
try {
|
9661
9726
|
return yield action(...args);
|
9662
9727
|
}
|
@@ -9720,7 +9785,7 @@ const findOldestCallEnded = (calls) => {
|
|
9720
9785
|
|
9721
9786
|
// Copyright (c) Microsoft Corporation.
|
9722
9787
|
// Licensed under the MIT license.
|
9723
|
-
var __awaiter$
|
9788
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9724
9789
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9725
9790
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9726
9791
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9740,63 +9805,63 @@ class ProxyCall {
|
|
9740
9805
|
switch (prop) {
|
9741
9806
|
case 'mute': {
|
9742
9807
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9743
|
-
return __awaiter$
|
9808
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9744
9809
|
return yield target.mute(...args);
|
9745
9810
|
});
|
9746
9811
|
}, 'Call.mute');
|
9747
9812
|
}
|
9748
9813
|
case 'unmute': {
|
9749
9814
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9750
|
-
return __awaiter$
|
9815
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9751
9816
|
return yield target.unmute(...args);
|
9752
9817
|
});
|
9753
9818
|
}, 'Call.unmute');
|
9754
9819
|
}
|
9755
9820
|
case 'startVideo': {
|
9756
9821
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9757
|
-
return __awaiter$
|
9822
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9758
9823
|
return yield target.startVideo(...args);
|
9759
9824
|
});
|
9760
9825
|
}, 'Call.startVideo');
|
9761
9826
|
}
|
9762
9827
|
case 'stopVideo': {
|
9763
9828
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9764
|
-
return __awaiter$
|
9829
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9765
9830
|
return yield target.stopVideo(...args);
|
9766
9831
|
});
|
9767
9832
|
}, 'Call.stopVideo');
|
9768
9833
|
}
|
9769
9834
|
case 'startScreenSharing': {
|
9770
9835
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9771
|
-
return __awaiter$
|
9836
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9772
9837
|
return yield target.startScreenSharing(...args);
|
9773
9838
|
});
|
9774
9839
|
}, 'Call.startScreenSharing');
|
9775
9840
|
}
|
9776
9841
|
case 'stopScreenSharing': {
|
9777
9842
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9778
|
-
return __awaiter$
|
9843
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9779
9844
|
return yield target.stopScreenSharing(...args);
|
9780
9845
|
});
|
9781
9846
|
}, 'Call.stopScreenSharing');
|
9782
9847
|
}
|
9783
9848
|
case 'hold': {
|
9784
9849
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9785
|
-
return __awaiter$
|
9850
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9786
9851
|
return yield target.hold(...args);
|
9787
9852
|
});
|
9788
9853
|
}, 'Call.hold');
|
9789
9854
|
}
|
9790
9855
|
case 'resume': {
|
9791
9856
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9792
|
-
return __awaiter$
|
9857
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9793
9858
|
return yield target.resume(...args);
|
9794
9859
|
});
|
9795
9860
|
}, 'Call.resume');
|
9796
9861
|
}
|
9797
9862
|
case 'addParticipant': {
|
9798
9863
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9799
|
-
return __awaiter$
|
9864
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
9800
9865
|
return yield target.addParticipant(...args);
|
9801
9866
|
});
|
9802
9867
|
}, 'Call.addParticipant');
|
@@ -10004,7 +10069,7 @@ class RemoteVideoStreamSubscriber {
|
|
10004
10069
|
|
10005
10070
|
// Copyright (c) Microsoft Corporation.
|
10006
10071
|
// Licensed under the MIT license.
|
10007
|
-
var __awaiter$
|
10072
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10008
10073
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10009
10074
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10010
10075
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10014,7 +10079,7 @@ var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
10014
10079
|
});
|
10015
10080
|
};
|
10016
10081
|
function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
|
10017
|
-
return __awaiter$
|
10082
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
10018
10083
|
// Render RemoteVideoStream that is part of a Call
|
10019
10084
|
const streamId = stream.id;
|
10020
10085
|
let participantKey;
|
@@ -10122,7 +10187,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
10122
10187
|
});
|
10123
10188
|
}
|
10124
10189
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
10125
|
-
return __awaiter$
|
10190
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
10126
10191
|
_logEvent(callingStatefulLogger, {
|
10127
10192
|
name: EventNames.START_LOCAL_STREAM_RENDERING,
|
10128
10193
|
level: 'info',
|
@@ -10238,7 +10303,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
10238
10303
|
});
|
10239
10304
|
}
|
10240
10305
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
10241
|
-
return __awaiter$
|
10306
|
+
return __awaiter$i(this, void 0, void 0, function* () {
|
10242
10307
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
10243
10308
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
10244
10309
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -10798,7 +10863,7 @@ class CallSubscriber {
|
|
10798
10863
|
|
10799
10864
|
// Copyright (c) Microsoft Corporation.
|
10800
10865
|
// Licensed under the MIT license.
|
10801
|
-
var __awaiter$
|
10866
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10802
10867
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10803
10868
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10804
10869
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10818,14 +10883,14 @@ class ProxyIncomingCall {
|
|
10818
10883
|
switch (prop) {
|
10819
10884
|
case 'accept': {
|
10820
10885
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10821
|
-
return __awaiter$
|
10886
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
10822
10887
|
return yield target.accept(...args);
|
10823
10888
|
});
|
10824
10889
|
}, 'IncomingCall.accept');
|
10825
10890
|
}
|
10826
10891
|
case 'reject': {
|
10827
10892
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10828
|
-
return __awaiter$
|
10893
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
10829
10894
|
return yield target.reject(...args);
|
10830
10895
|
});
|
10831
10896
|
}, 'IncomingCall.reject');
|
@@ -11163,7 +11228,7 @@ class InternalCallContext {
|
|
11163
11228
|
|
11164
11229
|
// Copyright (c) Microsoft Corporation.
|
11165
11230
|
// Licensed under the MIT license.
|
11166
|
-
var __awaiter$
|
11231
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11167
11232
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11168
11233
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11169
11234
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11185,7 +11250,7 @@ class ProxyCallClient {
|
|
11185
11250
|
get(target, prop) {
|
11186
11251
|
switch (prop) {
|
11187
11252
|
case 'createCallAgent': {
|
11188
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
11253
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
11189
11254
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
11190
11255
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
11191
11256
|
// callAgent if the createCallAgent succeeds.
|
@@ -11198,7 +11263,7 @@ class ProxyCallClient {
|
|
11198
11263
|
}), 'CallClient.createCallAgent');
|
11199
11264
|
}
|
11200
11265
|
case 'getDeviceManager': {
|
11201
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
11266
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$g(this, void 0, void 0, function* () {
|
11202
11267
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
11203
11268
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
11204
11269
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -11321,7 +11386,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
11321
11386
|
|
11322
11387
|
// Copyright (c) Microsoft Corporation.
|
11323
11388
|
// Licensed under the MIT license.
|
11324
|
-
var __awaiter$
|
11389
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11325
11390
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11326
11391
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11327
11392
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11596,7 +11661,7 @@ class ChatContext$1 {
|
|
11596
11661
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
11597
11662
|
*/
|
11598
11663
|
withAsyncErrorTeedToState(f, target) {
|
11599
|
-
return (...args) => __awaiter$
|
11664
|
+
return (...args) => __awaiter$f(this, void 0, void 0, function* () {
|
11600
11665
|
try {
|
11601
11666
|
return yield f(...args);
|
11602
11667
|
}
|
@@ -11703,7 +11768,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
11703
11768
|
|
11704
11769
|
// Copyright (c) Microsoft Corporation.
|
11705
11770
|
// Licensed under the MIT license.
|
11706
|
-
var __awaiter$
|
11771
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11707
11772
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11708
11773
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11709
11774
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11787,7 +11852,7 @@ class EventSubscriber {
|
|
11787
11852
|
this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
|
11788
11853
|
};
|
11789
11854
|
// This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
|
11790
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
11855
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$e(this, void 0, void 0, function* () {
|
11791
11856
|
var e_1, _a;
|
11792
11857
|
try {
|
11793
11858
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -11873,7 +11938,7 @@ class EventSubscriber {
|
|
11873
11938
|
|
11874
11939
|
// Copyright (c) Microsoft Corporation.
|
11875
11940
|
// Licensed under the MIT license.
|
11876
|
-
var __awaiter$
|
11941
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11877
11942
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11878
11943
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11879
11944
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11895,7 +11960,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
11895
11960
|
const threadsIterator = iteratorCreator(...args);
|
11896
11961
|
return {
|
11897
11962
|
next() {
|
11898
|
-
return __awaiter$
|
11963
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
11899
11964
|
const result = yield threadsIterator.next();
|
11900
11965
|
if (!result.done && result.value) {
|
11901
11966
|
decorateFn(result.value, context);
|
@@ -11910,7 +11975,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
11910
11975
|
const pages = threadsIterator.byPage(settings);
|
11911
11976
|
return {
|
11912
11977
|
next() {
|
11913
|
-
return __awaiter$
|
11978
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
11914
11979
|
const result = yield pages.next();
|
11915
11980
|
const page = result.value;
|
11916
11981
|
if (!result.done && result.value) {
|
@@ -11994,7 +12059,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
11994
12059
|
|
11995
12060
|
// Copyright (c) Microsoft Corporation.
|
11996
12061
|
// Licensed under the MIT license.
|
11997
|
-
var __awaiter$
|
12062
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11998
12063
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11999
12064
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12000
12065
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12013,14 +12078,14 @@ class ProxyChatThreadClient {
|
|
12013
12078
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
12014
12079
|
}
|
12015
12080
|
case 'getMessage': {
|
12016
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12081
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12017
12082
|
const message = yield chatThreadClient.getMessage(...args);
|
12018
12083
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
12019
12084
|
return message;
|
12020
12085
|
}), 'ChatThreadClient.getMessage');
|
12021
12086
|
}
|
12022
12087
|
case 'sendMessage': {
|
12023
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12088
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12024
12089
|
// Retry logic?
|
12025
12090
|
const [request, options] = args;
|
12026
12091
|
const { content } = request;
|
@@ -12060,7 +12125,7 @@ class ProxyChatThreadClient {
|
|
12060
12125
|
}), 'ChatThreadClient.sendMessage');
|
12061
12126
|
}
|
12062
12127
|
case 'addParticipants': {
|
12063
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12128
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12064
12129
|
const result = yield chatThreadClient.addParticipants(...args);
|
12065
12130
|
const [addRequest] = args;
|
12066
12131
|
const participantsToAdd = addRequest.participants;
|
@@ -12069,7 +12134,7 @@ class ProxyChatThreadClient {
|
|
12069
12134
|
}), 'ChatThreadClient.addParticipants');
|
12070
12135
|
}
|
12071
12136
|
case 'deleteMessage': {
|
12072
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12137
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12073
12138
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
12074
12139
|
const [messageId] = args;
|
12075
12140
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -12087,7 +12152,7 @@ class ProxyChatThreadClient {
|
|
12087
12152
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
12088
12153
|
}
|
12089
12154
|
case 'removeParticipant': {
|
12090
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12155
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12091
12156
|
const result = yield chatThreadClient.removeParticipant(...args);
|
12092
12157
|
const [removeIdentifier] = args;
|
12093
12158
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -12095,7 +12160,7 @@ class ProxyChatThreadClient {
|
|
12095
12160
|
}), 'ChatThreadClient.removeParticipant');
|
12096
12161
|
}
|
12097
12162
|
case 'updateMessage': {
|
12098
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12163
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12099
12164
|
const result = yield chatThreadClient.updateMessage(...args);
|
12100
12165
|
const [messageId, updateOption] = args;
|
12101
12166
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -12103,7 +12168,7 @@ class ProxyChatThreadClient {
|
|
12103
12168
|
}), 'ChatThreadClient.updateMessage');
|
12104
12169
|
}
|
12105
12170
|
case 'updateTopic': {
|
12106
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12171
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12107
12172
|
const result = yield chatThreadClient.updateTopic(...args);
|
12108
12173
|
const [topic] = args;
|
12109
12174
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -12111,7 +12176,7 @@ class ProxyChatThreadClient {
|
|
12111
12176
|
}), 'ChatThreadClient.updateTopic');
|
12112
12177
|
}
|
12113
12178
|
case 'getProperties': {
|
12114
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12179
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$c(this, void 0, void 0, function* () {
|
12115
12180
|
const result = yield chatThreadClient.getProperties(...args);
|
12116
12181
|
this._context.updateThread(chatThreadClient.threadId, result);
|
12117
12182
|
return result;
|
@@ -12148,7 +12213,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
12148
12213
|
|
12149
12214
|
// Copyright (c) Microsoft Corporation.
|
12150
12215
|
// Licensed under the MIT license.
|
12151
|
-
var __awaiter$
|
12216
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12152
12217
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12153
12218
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12154
12219
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12167,7 +12232,7 @@ const proxyChatClient = {
|
|
12167
12232
|
switch (prop) {
|
12168
12233
|
case 'createChatThread': {
|
12169
12234
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12170
|
-
return __awaiter$
|
12235
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12171
12236
|
const result = yield chatClient.createChatThread(...args);
|
12172
12237
|
const thread = result.chatThread;
|
12173
12238
|
if (thread) {
|
@@ -12180,7 +12245,7 @@ const proxyChatClient = {
|
|
12180
12245
|
}
|
12181
12246
|
case 'deleteChatThread': {
|
12182
12247
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12183
|
-
return __awaiter$
|
12248
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12184
12249
|
const result = yield chatClient.deleteChatThread(...args);
|
12185
12250
|
context.deleteThread(args[0]);
|
12186
12251
|
return result;
|
@@ -12200,7 +12265,7 @@ const proxyChatClient = {
|
|
12200
12265
|
}
|
12201
12266
|
case 'startRealtimeNotifications': {
|
12202
12267
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12203
|
-
return __awaiter$
|
12268
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12204
12269
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
12205
12270
|
if (!receiver.eventSubscriber) {
|
12206
12271
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -12211,7 +12276,7 @@ const proxyChatClient = {
|
|
12211
12276
|
}
|
12212
12277
|
case 'stopRealtimeNotifications': {
|
12213
12278
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12214
|
-
return __awaiter$
|
12279
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
12215
12280
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
12216
12281
|
if (receiver.eventSubscriber) {
|
12217
12282
|
receiver.eventSubscriber.unsubscribe();
|
@@ -12392,7 +12457,7 @@ const CallCompositeIcon = (props) => (React__default['default'].createElement(re
|
|
12392
12457
|
*/
|
12393
12458
|
const CallWithChatCompositeIcon = (props) => (React__default['default'].createElement(react.FontIcon, Object.assign({}, props)));
|
12394
12459
|
|
12395
|
-
var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",defaultPlaceHolder:"Select an option",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",soundLabel:"Sound",startCallButtonLabel:"Start call"
|
12460
|
+
var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",peopleButtonLabel:"People",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",soundLabel:"Sound",startCallButtonLabel:"Start call"};var chat$d={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$d={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
|
12396
12461
|
|
12397
12462
|
var call$c={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",defaultPlaceHolder:"Select an option",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",soundLabel:"Sound",startCallButtonLabel:"Start call",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby."};var chat$c={chatListHeader:"In this chat"};var callWithChat$c={peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",chatButtonLabel:"Chat",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipOpen:"Show chat",chatButtonTooltipClose:"Hide chat",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",chatPaneTitle:"Chat",chatButtonNewMessageNotificationLabel:"New Message",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButton:"Close",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_GB = {call:call$c,chat:chat$c,callWithChat:callWithChat$c};
|
12398
12463
|
|
@@ -12795,7 +12860,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
12795
12860
|
|
12796
12861
|
// Copyright (c) Microsoft Corporation.
|
12797
12862
|
// Licensed under the MIT license.
|
12798
|
-
var __awaiter$
|
12863
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12799
12864
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12800
12865
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12801
12866
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12921,9 +12986,9 @@ class AzureCommunicationChatAdapter {
|
|
12921
12986
|
this.unsubscribeAllEvents();
|
12922
12987
|
}
|
12923
12988
|
fetchInitialData() {
|
12924
|
-
return __awaiter$
|
12989
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
12925
12990
|
// If get properties fails we dont want to try to get the participants after.
|
12926
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
12991
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12927
12992
|
var e_1, _a;
|
12928
12993
|
yield this.chatThreadClient.getProperties();
|
12929
12994
|
try {
|
@@ -12957,8 +13022,8 @@ class AzureCommunicationChatAdapter {
|
|
12957
13022
|
this.context.offStateChange(handler);
|
12958
13023
|
}
|
12959
13024
|
sendMessage(content, options = {}) {
|
12960
|
-
return __awaiter$
|
12961
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13025
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13026
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12962
13027
|
/* @conditional-compile-remove(file-sharing) */
|
12963
13028
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
12964
13029
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -12975,49 +13040,49 @@ class AzureCommunicationChatAdapter {
|
|
12975
13040
|
});
|
12976
13041
|
}
|
12977
13042
|
sendReadReceipt(chatMessageId) {
|
12978
|
-
return __awaiter$
|
12979
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13043
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13044
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12980
13045
|
yield this.handlers.onMessageSeen(chatMessageId);
|
12981
13046
|
}));
|
12982
13047
|
});
|
12983
13048
|
}
|
12984
13049
|
sendTypingIndicator() {
|
12985
|
-
return __awaiter$
|
13050
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
12986
13051
|
yield this.handlers.onTyping();
|
12987
13052
|
});
|
12988
13053
|
}
|
12989
13054
|
removeParticipant(userId) {
|
12990
|
-
return __awaiter$
|
12991
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13055
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13056
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12992
13057
|
yield this.handlers.onRemoveParticipant(userId);
|
12993
13058
|
}));
|
12994
13059
|
});
|
12995
13060
|
}
|
12996
13061
|
setTopic(topicName) {
|
12997
|
-
return __awaiter$
|
12998
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13062
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13063
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
12999
13064
|
yield this.handlers.updateThreadTopicName(topicName);
|
13000
13065
|
}));
|
13001
13066
|
});
|
13002
13067
|
}
|
13003
13068
|
loadPreviousChatMessages(messagesToLoad) {
|
13004
|
-
return __awaiter$
|
13005
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13069
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13070
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
13006
13071
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
13007
13072
|
}));
|
13008
13073
|
});
|
13009
13074
|
}
|
13010
13075
|
updateMessage(messageId, content, metadata, options) {
|
13011
|
-
return __awaiter$
|
13012
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13076
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13077
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
13013
13078
|
/* @conditional-compile-remove(file-sharing) */
|
13014
13079
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
13015
13080
|
}));
|
13016
13081
|
});
|
13017
13082
|
}
|
13018
13083
|
deleteMessage(messageId) {
|
13019
|
-
return __awaiter$
|
13020
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13084
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13085
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$a(this, void 0, void 0, function* () {
|
13021
13086
|
return yield this.handlers.onDeleteMessage(messageId);
|
13022
13087
|
}));
|
13023
13088
|
});
|
@@ -13098,7 +13163,7 @@ class AzureCommunicationChatAdapter {
|
|
13098
13163
|
this.emitter.off(event, listener);
|
13099
13164
|
}
|
13100
13165
|
asyncTeeErrorToEventEmitter(f) {
|
13101
|
-
return __awaiter$
|
13166
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
13102
13167
|
try {
|
13103
13168
|
return yield f();
|
13104
13169
|
}
|
@@ -13140,7 +13205,7 @@ const convertEventType = (type) => {
|
|
13140
13205
|
*
|
13141
13206
|
* @public
|
13142
13207
|
*/
|
13143
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
13208
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$a(void 0, void 0, void 0, function* () {
|
13144
13209
|
const chatClient = createStatefulChatClient({
|
13145
13210
|
userId,
|
13146
13211
|
displayName,
|
@@ -13203,7 +13268,7 @@ beforeDispose) => {
|
|
13203
13268
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
13204
13269
|
return;
|
13205
13270
|
}
|
13206
|
-
(() => __awaiter$
|
13271
|
+
(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
13207
13272
|
if (adapterRef.current) {
|
13208
13273
|
// Dispose the old adapter when a new one is created.
|
13209
13274
|
//
|
@@ -13235,7 +13300,7 @@ beforeDispose) => {
|
|
13235
13300
|
// Dispose any existing adapter when the component unmounts.
|
13236
13301
|
React.useEffect(() => {
|
13237
13302
|
return () => {
|
13238
|
-
(() => __awaiter$
|
13303
|
+
(() => __awaiter$a(void 0, void 0, void 0, function* () {
|
13239
13304
|
if (adapterRef.current) {
|
13240
13305
|
if (beforeDisposeRef.current) {
|
13241
13306
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -13256,7 +13321,7 @@ beforeDispose) => {
|
|
13256
13321
|
*
|
13257
13322
|
* @public
|
13258
13323
|
*/
|
13259
|
-
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$
|
13324
|
+
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$a(void 0, void 0, void 0, function* () {
|
13260
13325
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
13261
13326
|
});
|
13262
13327
|
const isChatError = (e) => {
|
@@ -13437,7 +13502,7 @@ const sendboxContainerStyles = {
|
|
13437
13502
|
|
13438
13503
|
// Copyright (c) Microsoft Corporation.
|
13439
13504
|
// Licensed under the MIT license.
|
13440
|
-
var __awaiter$
|
13505
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13441
13506
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13442
13507
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13443
13508
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13458,7 +13523,7 @@ const AvatarPersona = (props) => {
|
|
13458
13523
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
13459
13524
|
const [data, setData] = React.useState();
|
13460
13525
|
React.useEffect(() => {
|
13461
|
-
(() => __awaiter$
|
13526
|
+
(() => __awaiter$9(void 0, void 0, void 0, function* () {
|
13462
13527
|
if (dataProvider && userId) {
|
13463
13528
|
const newData = yield dataProvider(userId);
|
13464
13529
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -14133,7 +14198,7 @@ const getCallCompositePage = (call, previousCall) => {
|
|
14133
14198
|
|
14134
14199
|
// Copyright (c) Microsoft Corporation.
|
14135
14200
|
// Licensed under the MIT license.
|
14136
|
-
var __awaiter$
|
14201
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14137
14202
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14138
14203
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14139
14204
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14152,68 +14217,68 @@ _component) => {
|
|
14152
14217
|
return createCompositeHandlers(useAdapter());
|
14153
14218
|
};
|
14154
14219
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
14155
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
14220
|
+
onCreateLocalStreamView: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14156
14221
|
return yield adapter.createStreamView(undefined, options);
|
14157
14222
|
}),
|
14158
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
14223
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14159
14224
|
return yield adapter.createStreamView(userId, options);
|
14160
14225
|
}),
|
14161
|
-
onHangUp: () => __awaiter$
|
14226
|
+
onHangUp: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14162
14227
|
yield adapter.leaveCall();
|
14163
14228
|
}),
|
14164
14229
|
/* @conditional-compile-remove(PSTN-calls) */
|
14165
|
-
onToggleHold: () => __awaiter$
|
14230
|
+
onToggleHold: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14166
14231
|
var _a;
|
14167
14232
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
14168
14233
|
}),
|
14169
14234
|
/* @conditional-compile-remove(PSTN-calls) */
|
14170
|
-
onAddParticipant: (participant, options) => __awaiter$
|
14235
|
+
onAddParticipant: (participant, options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14171
14236
|
return yield adapter.addParticipant(participant, options);
|
14172
14237
|
}),
|
14173
|
-
onRemoveParticipant: (userId) => __awaiter$
|
14238
|
+
onRemoveParticipant: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14174
14239
|
yield adapter.removeParticipant(userId);
|
14175
14240
|
}),
|
14176
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
14241
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14177
14242
|
yield adapter.setCamera(deviceInfo, options);
|
14178
14243
|
}),
|
14179
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
14244
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14180
14245
|
yield adapter.setMicrophone(deviceInfo);
|
14181
14246
|
}),
|
14182
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
14247
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14183
14248
|
yield adapter.setSpeaker(deviceInfo);
|
14184
14249
|
}),
|
14185
14250
|
onStartCall: (participants, options) => {
|
14186
14251
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
14187
14252
|
return adapter.startCall(rawIds, options);
|
14188
14253
|
},
|
14189
|
-
onStartScreenShare: () => __awaiter$
|
14254
|
+
onStartScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14190
14255
|
yield adapter.startScreenShare();
|
14191
14256
|
}),
|
14192
|
-
onStopScreenShare: () => __awaiter$
|
14257
|
+
onStopScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14193
14258
|
yield adapter.stopScreenShare();
|
14194
14259
|
}),
|
14195
|
-
onToggleCamera: (options) => __awaiter$
|
14260
|
+
onToggleCamera: (options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14196
14261
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
14197
14262
|
}),
|
14198
|
-
onToggleMicrophone: () => __awaiter$
|
14263
|
+
onToggleMicrophone: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14199
14264
|
var _b;
|
14200
14265
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
14201
14266
|
}),
|
14202
|
-
onToggleScreenShare: () => __awaiter$
|
14267
|
+
onToggleScreenShare: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14203
14268
|
var _c;
|
14204
14269
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
|
14205
14270
|
? yield adapter.stopScreenShare()
|
14206
14271
|
: yield adapter.startScreenShare();
|
14207
14272
|
}),
|
14208
|
-
onStartLocalVideo: () => __awaiter$
|
14273
|
+
onStartLocalVideo: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14209
14274
|
if (adapter.getState().call) {
|
14210
14275
|
return adapter.startCamera();
|
14211
14276
|
}
|
14212
14277
|
}),
|
14213
|
-
onDisposeLocalStreamView: () => __awaiter$
|
14278
|
+
onDisposeLocalStreamView: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
14214
14279
|
return adapter.disposeStreamView();
|
14215
14280
|
}),
|
14216
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
14281
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$8(void 0, void 0, void 0, function* () {
|
14217
14282
|
return adapter.disposeStreamView(userId);
|
14218
14283
|
})
|
14219
14284
|
}));
|
@@ -15253,7 +15318,7 @@ const localPreviewTileStyle = {
|
|
15253
15318
|
|
15254
15319
|
// Copyright (c) Microsoft Corporation.
|
15255
15320
|
// Licensed under the MIT license.
|
15256
|
-
var __awaiter$
|
15321
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15257
15322
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15258
15323
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15259
15324
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15273,7 +15338,7 @@ const LocalPreview = (props) => {
|
|
15273
15338
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
15274
15339
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
15275
15340
|
const adapter = useAdapter();
|
15276
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
15341
|
+
const onToggleMic = React.useCallback(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
15277
15342
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
15278
15343
|
}), [adapter, isLocalMicrophoneEnabled]);
|
15279
15344
|
const theme = useTheme();
|
@@ -15604,7 +15669,7 @@ const mainScreenContainerStyleMobile = react.mergeStyles(Object.assign(Object.as
|
|
15604
15669
|
|
15605
15670
|
// Copyright (c) Microsoft Corporation.
|
15606
15671
|
// Licensed under the MIT license.
|
15607
|
-
var __awaiter$
|
15672
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15608
15673
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15609
15674
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15610
15675
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15618,26 +15683,41 @@ const MainScreen = (props) => {
|
|
15618
15683
|
const page = useSelector$1(getPage);
|
15619
15684
|
const adapter = useAdapter();
|
15620
15685
|
const locale = useLocale();
|
15686
|
+
let pageElement;
|
15621
15687
|
switch (page) {
|
15622
15688
|
case 'configuration':
|
15623
|
-
|
15689
|
+
pageElement = (React__default['default'].createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {
|
15624
15690
|
adapter.joinCall();
|
15625
15691
|
} }));
|
15692
|
+
break;
|
15626
15693
|
case 'accessDeniedTeamsMeeting':
|
15627
|
-
|
15694
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
|
15695
|
+
break;
|
15628
15696
|
case 'removedFromCall':
|
15629
|
-
|
15697
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageRemovedFromCall", title: locale.strings.call.removedFromCallTitle, moreDetails: locale.strings.call.removedFromCallMoreDetails, dataUiId: 'removed-from-call-page' }));
|
15698
|
+
break;
|
15630
15699
|
case 'joinCallFailedDueToNoNetwork':
|
15631
|
-
|
15700
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageJoinCallFailedDueToNoNetwork", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' }));
|
15701
|
+
break;
|
15632
15702
|
case 'leftCall':
|
15633
|
-
|
15703
|
+
pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageLeftCall", title: locale.strings.call.leftCallTitle, moreDetails: locale.strings.call.leftCallMoreDetails, dataUiId: 'left-call-page' }));
|
15704
|
+
break;
|
15634
15705
|
case 'lobby':
|
15635
|
-
|
15706
|
+
pageElement = React__default['default'].createElement(LobbyPage, { mobileView: props.mobileView, options: props.options });
|
15707
|
+
break;
|
15636
15708
|
case 'call':
|
15637
|
-
|
15709
|
+
pageElement = (React__default['default'].createElement(CallPage, { onRenderAvatar: onRenderAvatar, callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, options: props.options }));
|
15710
|
+
break;
|
15638
15711
|
default:
|
15639
15712
|
throw new Error('Invalid call composite page');
|
15640
15713
|
}
|
15714
|
+
/* @conditional-compile-remove(rooms) */
|
15715
|
+
const permissions = _getPermissions(props.role);
|
15716
|
+
// default retElement for stable version
|
15717
|
+
let retElement = pageElement;
|
15718
|
+
/* @conditional-compile-remove(rooms) */
|
15719
|
+
retElement = React__default['default'].createElement(_PermissionsProvider, { permissions: permissions }, pageElement);
|
15720
|
+
return retElement;
|
15641
15721
|
};
|
15642
15722
|
/**
|
15643
15723
|
* A customizable UI composite for calling experience.
|
@@ -15649,9 +15729,11 @@ const MainScreen = (props) => {
|
|
15649
15729
|
* @public
|
15650
15730
|
*/
|
15651
15731
|
const CallComposite = (props) => {
|
15652
|
-
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop'
|
15732
|
+
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop',
|
15733
|
+
/* @conditional-compile-remove(rooms) */
|
15734
|
+
role } = props;
|
15653
15735
|
React.useEffect(() => {
|
15654
|
-
(() => __awaiter$
|
15736
|
+
(() => __awaiter$6(void 0, void 0, void 0, function* () {
|
15655
15737
|
yield adapter.askDevicePermission({ video: true, audio: true });
|
15656
15738
|
adapter.queryCameras();
|
15657
15739
|
adapter.queryMicrophones();
|
@@ -15665,7 +15747,9 @@ const CallComposite = (props) => {
|
|
15665
15747
|
return (React__default['default'].createElement("div", { className: mainScreenContainerClassName },
|
15666
15748
|
React__default['default'].createElement(BaseProvider, Object.assign({}, props),
|
15667
15749
|
React__default['default'].createElement(CallAdapterProvider, { adapter: adapter },
|
15668
|
-
React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, options: options
|
15750
|
+
React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, options: options,
|
15751
|
+
/* @conditional-compile-remove(rooms) */
|
15752
|
+
role: role })))));
|
15669
15753
|
};
|
15670
15754
|
|
15671
15755
|
/**
|
@@ -15742,7 +15826,7 @@ class DiagnosticsForwarder {
|
|
15742
15826
|
|
15743
15827
|
// Copyright (c) Microsoft Corporation.
|
15744
15828
|
// Licensed under the MIT license.
|
15745
|
-
var __awaiter$
|
15829
|
+
var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15746
15830
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15747
15831
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15748
15832
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15907,29 +15991,29 @@ class AzureCommunicationCallAdapter {
|
|
15907
15991
|
this.callAgent.dispose();
|
15908
15992
|
}
|
15909
15993
|
queryCameras() {
|
15910
|
-
return __awaiter$
|
15911
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
15994
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15995
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15912
15996
|
return this.deviceManager.getCameras();
|
15913
15997
|
}));
|
15914
15998
|
});
|
15915
15999
|
}
|
15916
16000
|
queryMicrophones() {
|
15917
|
-
return __awaiter$
|
15918
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16001
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16002
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15919
16003
|
return this.deviceManager.getMicrophones();
|
15920
16004
|
}));
|
15921
16005
|
});
|
15922
16006
|
}
|
15923
16007
|
querySpeakers() {
|
15924
|
-
return __awaiter$
|
15925
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16008
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16009
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15926
16010
|
return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];
|
15927
16011
|
}));
|
15928
16012
|
});
|
15929
16013
|
}
|
15930
16014
|
askDevicePermission(constrain) {
|
15931
|
-
return __awaiter$
|
15932
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16015
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16016
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
15933
16017
|
yield this.deviceManager.askDevicePermission(constrain);
|
15934
16018
|
}));
|
15935
16019
|
});
|
@@ -15940,9 +16024,12 @@ class AzureCommunicationCallAdapter {
|
|
15940
16024
|
throw new Error('You are already in the call!');
|
15941
16025
|
}
|
15942
16026
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
15943
|
-
|
15944
|
-
if (
|
15945
|
-
|
16027
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
16028
|
+
if (isOutboundCall(this.locator)) {
|
16029
|
+
const phoneNumber = this.getState().alternativeCallerId;
|
16030
|
+
return this.startCall(this.locator.participantIDs, {
|
16031
|
+
alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined
|
16032
|
+
});
|
15946
16033
|
}
|
15947
16034
|
return this.teeErrorToEventEmitter(() => {
|
15948
16035
|
const audioOptions = { muted: microphoneOn !== null && microphoneOn !== void 0 ? microphoneOn : !this.getState().isLocalPreviewMicrophoneEnabled };
|
@@ -15976,7 +16063,7 @@ class AzureCommunicationCallAdapter {
|
|
15976
16063
|
});
|
15977
16064
|
}
|
15978
16065
|
createStreamView(remoteUserId, options) {
|
15979
|
-
return __awaiter$
|
16066
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15980
16067
|
if (remoteUserId === undefined) {
|
15981
16068
|
return yield this.handlers.onCreateLocalStreamView(options);
|
15982
16069
|
}
|
@@ -15986,7 +16073,7 @@ class AzureCommunicationCallAdapter {
|
|
15986
16073
|
});
|
15987
16074
|
}
|
15988
16075
|
disposeStreamView(remoteUserId) {
|
15989
|
-
return __awaiter$
|
16076
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
15990
16077
|
if (remoteUserId === undefined) {
|
15991
16078
|
yield this.handlers.onDisposeLocalStreamView();
|
15992
16079
|
}
|
@@ -15997,7 +16084,7 @@ class AzureCommunicationCallAdapter {
|
|
15997
16084
|
}
|
15998
16085
|
leaveCall() {
|
15999
16086
|
var _a;
|
16000
|
-
return __awaiter$
|
16087
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16001
16088
|
const callId = (_a = this.call) === null || _a === void 0 ? void 0 : _a.id;
|
16002
16089
|
yield this.handlers.onHangUp();
|
16003
16090
|
this.unsubscribeCallEvents();
|
@@ -16012,29 +16099,29 @@ class AzureCommunicationCallAdapter {
|
|
16012
16099
|
});
|
16013
16100
|
}
|
16014
16101
|
setCamera(device, options) {
|
16015
|
-
return __awaiter$
|
16016
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16102
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16103
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16017
16104
|
yield this.handlers.onSelectCamera(device, options);
|
16018
16105
|
}));
|
16019
16106
|
});
|
16020
16107
|
}
|
16021
16108
|
setMicrophone(device) {
|
16022
|
-
return __awaiter$
|
16023
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16109
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16110
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16024
16111
|
yield this.handlers.onSelectMicrophone(device);
|
16025
16112
|
}));
|
16026
16113
|
});
|
16027
16114
|
}
|
16028
16115
|
setSpeaker(device) {
|
16029
|
-
return __awaiter$
|
16030
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16116
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16117
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16031
16118
|
yield this.handlers.onSelectSpeaker(device);
|
16032
16119
|
}));
|
16033
16120
|
});
|
16034
16121
|
}
|
16035
16122
|
startCamera(options) {
|
16036
|
-
return __awaiter$
|
16037
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16123
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16124
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16038
16125
|
if (!isCameraOn(this.getState())) {
|
16039
16126
|
yield this.handlers.onToggleCamera(options);
|
16040
16127
|
}
|
@@ -16042,8 +16129,8 @@ class AzureCommunicationCallAdapter {
|
|
16042
16129
|
});
|
16043
16130
|
}
|
16044
16131
|
stopCamera() {
|
16045
|
-
return __awaiter$
|
16046
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16132
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16133
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16047
16134
|
if (isCameraOn(this.getState())) {
|
16048
16135
|
yield this.handlers.onToggleCamera();
|
16049
16136
|
}
|
@@ -16051,8 +16138,8 @@ class AzureCommunicationCallAdapter {
|
|
16051
16138
|
});
|
16052
16139
|
}
|
16053
16140
|
mute() {
|
16054
|
-
return __awaiter$
|
16055
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16141
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16142
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16056
16143
|
var _a, _b;
|
16057
16144
|
this.context.setIsLocalMicrophoneEnabled(false);
|
16058
16145
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && !((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -16062,8 +16149,8 @@ class AzureCommunicationCallAdapter {
|
|
16062
16149
|
});
|
16063
16150
|
}
|
16064
16151
|
unmute() {
|
16065
|
-
return __awaiter$
|
16066
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16152
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16153
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16067
16154
|
var _a, _b;
|
16068
16155
|
this.context.setIsLocalMicrophoneEnabled(true);
|
16069
16156
|
if (_isInCall((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) && ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isMuted)) {
|
@@ -16073,8 +16160,8 @@ class AzureCommunicationCallAdapter {
|
|
16073
16160
|
});
|
16074
16161
|
}
|
16075
16162
|
startScreenShare() {
|
16076
|
-
return __awaiter$
|
16077
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16163
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16164
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16078
16165
|
var _a;
|
16079
16166
|
if (!((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn)) {
|
16080
16167
|
yield this.handlers.onToggleScreenShare();
|
@@ -16083,8 +16170,8 @@ class AzureCommunicationCallAdapter {
|
|
16083
16170
|
});
|
16084
16171
|
}
|
16085
16172
|
stopScreenShare() {
|
16086
|
-
return __awaiter$
|
16087
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
16173
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16174
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
16088
16175
|
var _a;
|
16089
16176
|
if ((_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) {
|
16090
16177
|
yield this.handlers.onToggleScreenShare();
|
@@ -16128,20 +16215,20 @@ class AzureCommunicationCallAdapter {
|
|
16128
16215
|
this.subscribeCallEvents();
|
16129
16216
|
}
|
16130
16217
|
removeParticipant(userId) {
|
16131
|
-
return __awaiter$
|
16218
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16132
16219
|
this.handlers.onRemoveParticipant(userId);
|
16133
16220
|
});
|
16134
16221
|
}
|
16135
16222
|
/* @conditional-compile-remove(PSTN-calls) */
|
16136
16223
|
addParticipant(participant, options) {
|
16137
|
-
return __awaiter$
|
16224
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16138
16225
|
this.handlers.onAddParticipant(participant, options);
|
16139
16226
|
});
|
16140
16227
|
}
|
16141
16228
|
/* @conditional-compile-remove(PSTN-calls) */
|
16142
16229
|
holdCall() {
|
16143
16230
|
var _a;
|
16144
|
-
return __awaiter$
|
16231
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16145
16232
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
16146
16233
|
this.handlers.onToggleHold();
|
16147
16234
|
}
|
@@ -16150,7 +16237,7 @@ class AzureCommunicationCallAdapter {
|
|
16150
16237
|
/* @conditional-compile-remove(PSTN-calls) */
|
16151
16238
|
resumeCall() {
|
16152
16239
|
var _a;
|
16153
|
-
return __awaiter$
|
16240
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16154
16241
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
16155
16242
|
this.handlers.onToggleHold();
|
16156
16243
|
}
|
@@ -16224,7 +16311,7 @@ class AzureCommunicationCallAdapter {
|
|
16224
16311
|
this.emitter.off(event, listener);
|
16225
16312
|
}
|
16226
16313
|
asyncTeeErrorToEventEmitter(f) {
|
16227
|
-
return __awaiter$
|
16314
|
+
return __awaiter$5(this, void 0, void 0, function* () {
|
16228
16315
|
try {
|
16229
16316
|
return yield f();
|
16230
16317
|
}
|
@@ -16258,7 +16345,7 @@ class AzureCommunicationCallAdapter {
|
|
16258
16345
|
* @public
|
16259
16346
|
*/
|
16260
16347
|
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
16261
|
-
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$
|
16348
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$5(void 0, void 0, void 0, function* () {
|
16262
16349
|
const callClient = createStatefulCallClient({
|
16263
16350
|
userId,
|
16264
16351
|
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId
|
@@ -16320,7 +16407,7 @@ beforeDispose) => {
|
|
16320
16407
|
if (!credential || !displayName || !locator || !userId) {
|
16321
16408
|
return;
|
16322
16409
|
}
|
16323
|
-
(() => __awaiter$
|
16410
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
16324
16411
|
if (adapterRef.current) {
|
16325
16412
|
// Dispose the old adapter when a new one is created.
|
16326
16413
|
//
|
@@ -16351,7 +16438,7 @@ beforeDispose) => {
|
|
16351
16438
|
// Dispose any existing adapter when the component unmounts.
|
16352
16439
|
React.useEffect(() => {
|
16353
16440
|
return () => {
|
16354
|
-
(() => __awaiter$
|
16441
|
+
(() => __awaiter$5(void 0, void 0, void 0, function* () {
|
16355
16442
|
if (adapterRef.current) {
|
16356
16443
|
if (beforeDisposeRef.current) {
|
16357
16444
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -16372,7 +16459,7 @@ beforeDispose) => {
|
|
16372
16459
|
*
|
16373
16460
|
* @public
|
16374
16461
|
*/
|
16375
|
-
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$
|
16462
|
+
const createAzureCommunicationCallAdapterFromClient = (callClient, callAgent, locator) => __awaiter$5(void 0, void 0, void 0, function* () {
|
16376
16463
|
const deviceManager = (yield callClient.getDeviceManager());
|
16377
16464
|
return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);
|
16378
16465
|
});
|
@@ -16380,7 +16467,8 @@ const isCallError = (e) => {
|
|
16380
16467
|
return e['target'] !== undefined && e['innerError'] !== undefined;
|
16381
16468
|
};
|
16382
16469
|
/* @conditional-compile-remove(teams-adhoc-call) */
|
16383
|
-
|
16470
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
16471
|
+
const isOutboundCall = (callLocator) => {
|
16384
16472
|
return 'participantIDs' in callLocator;
|
16385
16473
|
};
|
16386
16474
|
|
@@ -16817,7 +16905,7 @@ const modalLayerHostStyle = {
|
|
16817
16905
|
|
16818
16906
|
// Copyright (c) Microsoft Corporation.
|
16819
16907
|
// Licensed under the MIT license.
|
16820
|
-
var __awaiter$
|
16908
|
+
var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16821
16909
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16822
16910
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16823
16911
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16878,36 +16966,36 @@ class CallWithChatBackedCallAdapter {
|
|
16878
16966
|
this.joinCall = (microphoneOn) => {
|
16879
16967
|
return this.callWithChatAdapter.joinCall(microphoneOn);
|
16880
16968
|
};
|
16881
|
-
this.leaveCall = () => __awaiter$
|
16969
|
+
this.leaveCall = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
|
16882
16970
|
this.startCall = (participants, options) => {
|
16883
16971
|
return this.callWithChatAdapter.startCall(participants, options);
|
16884
16972
|
};
|
16885
|
-
this.setCamera = (sourceId, options) => __awaiter$
|
16886
|
-
this.setMicrophone = (sourceId) => __awaiter$
|
16887
|
-
this.setSpeaker = (sourceId) => __awaiter$
|
16888
|
-
this.askDevicePermission = (constraints) => __awaiter$
|
16889
|
-
this.queryCameras = () => __awaiter$
|
16890
|
-
this.queryMicrophones = () => __awaiter$
|
16891
|
-
this.querySpeakers = () => __awaiter$
|
16892
|
-
this.startCamera = (options) => __awaiter$
|
16893
|
-
this.stopCamera = () => __awaiter$
|
16894
|
-
this.mute = () => __awaiter$
|
16895
|
-
this.unmute = () => __awaiter$
|
16896
|
-
this.startScreenShare = () => __awaiter$
|
16897
|
-
this.stopScreenShare = () => __awaiter$
|
16898
|
-
this.removeParticipant = (userId) => __awaiter$
|
16899
|
-
this.createStreamView = (remoteUserId, options) => __awaiter$
|
16900
|
-
this.disposeStreamView = (remoteUserId, options) => __awaiter$
|
16973
|
+
this.setCamera = (sourceId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
|
16974
|
+
this.setMicrophone = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
|
16975
|
+
this.setSpeaker = (sourceId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setSpeaker(sourceId); });
|
16976
|
+
this.askDevicePermission = (constraints) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.askDevicePermission(constraints); });
|
16977
|
+
this.queryCameras = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryCameras(); });
|
16978
|
+
this.queryMicrophones = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.queryMicrophones(); });
|
16979
|
+
this.querySpeakers = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.querySpeakers(); });
|
16980
|
+
this.startCamera = (options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startCamera(options); });
|
16981
|
+
this.stopCamera = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopCamera(); });
|
16982
|
+
this.mute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.mute(); });
|
16983
|
+
this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
|
16984
|
+
this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
|
16985
|
+
this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
|
16986
|
+
this.removeParticipant = (userId) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
16987
|
+
this.createStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
|
16988
|
+
this.disposeStreamView = (remoteUserId, options) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
|
16901
16989
|
/* @conditional-compile-remove(PSTN-calls) */
|
16902
|
-
this.holdCall = () => __awaiter$
|
16990
|
+
this.holdCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
16903
16991
|
yield this.callWithChatAdapter.holdCall();
|
16904
16992
|
});
|
16905
16993
|
/* @conditional-compile-remove(PSTN-calls) */
|
16906
|
-
this.resumeCall = () => __awaiter$
|
16994
|
+
this.resumeCall = () => __awaiter$4(this, void 0, void 0, function* () {
|
16907
16995
|
yield this.callWithChatAdapter.resumeCall();
|
16908
16996
|
});
|
16909
16997
|
/* @conditional-compile-remove(PSTN-calls) */
|
16910
|
-
this.addParticipant = (participant, options) => __awaiter$
|
16998
|
+
this.addParticipant = (participant, options) => __awaiter$4(this, void 0, void 0, function* () {
|
16911
16999
|
yield this.callWithChatAdapter.addParticipant(participant, options);
|
16912
17000
|
});
|
16913
17001
|
this.callWithChatAdapter = callWithChatAdapter;
|
@@ -16928,7 +17016,7 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
16928
17016
|
|
16929
17017
|
// Copyright (c) Microsoft Corporation.
|
16930
17018
|
// Licensed under the MIT license.
|
16931
|
-
var __awaiter$
|
17019
|
+
var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16932
17020
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16933
17021
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16934
17022
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16949,12 +17037,12 @@ class CallWithChatBackedChatAdapter {
|
|
16949
17037
|
// For onStateChange we must convert CallWithChat state to chat state. This involves creating a new handler to be passed into the onStateChange.
|
16950
17038
|
// In order to unsubscribe the handler when offStateChange is called we must have a mapping of the original handler to the newly created handler.
|
16951
17039
|
this.eventStore = new Map();
|
16952
|
-
this.fetchInitialData = () => __awaiter$
|
16953
|
-
this.sendMessage = (content) => __awaiter$
|
16954
|
-
this.sendReadReceipt = (chatMessageId) => __awaiter$
|
16955
|
-
this.sendTypingIndicator = () => __awaiter$
|
16956
|
-
this.removeParticipant = (userId) => __awaiter$
|
16957
|
-
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$
|
17040
|
+
this.fetchInitialData = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.fetchInitialData(); });
|
17041
|
+
this.sendMessage = (content) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendMessage(content); });
|
17042
|
+
this.sendReadReceipt = (chatMessageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendReadReceipt(chatMessageId); });
|
17043
|
+
this.sendTypingIndicator = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.sendTypingIndicator(); });
|
17044
|
+
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.removeParticipant(userId); });
|
17045
|
+
this.loadPreviousChatMessages = (messagesToLoad) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.loadPreviousChatMessages(messagesToLoad); });
|
16958
17046
|
this.dispose = () => this.callWithChatAdapter.dispose();
|
16959
17047
|
this.onStateChange = (handler) => {
|
16960
17048
|
const convertedHandler = (state) => {
|
@@ -16993,44 +17081,44 @@ class CallWithChatBackedChatAdapter {
|
|
16993
17081
|
return this.callWithChatAdapter.off(event, listener);
|
16994
17082
|
}
|
16995
17083
|
};
|
16996
|
-
this.updateMessage = (messageId, content, metadata) => __awaiter$
|
16997
|
-
this.deleteMessage = (messageId) => __awaiter$
|
17084
|
+
this.updateMessage = (messageId, content, metadata) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.updateMessage(messageId, content, metadata); });
|
17085
|
+
this.deleteMessage = (messageId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.deleteMessage(messageId); });
|
16998
17086
|
this.clearErrors = (errorTypes) => {
|
16999
17087
|
throw new Error(`Method not supported in CallWithChatComposite.`);
|
17000
17088
|
};
|
17001
|
-
this.setTopic = (topicName) => __awaiter$
|
17089
|
+
this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
|
17002
17090
|
throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
|
17003
17091
|
});
|
17092
|
+
/* @conditional-compile-remove(file-sharing) */
|
17093
|
+
this.registerActiveFileUploads = (files) => {
|
17094
|
+
return this.callWithChatAdapter.registerActiveFileUploads(files);
|
17095
|
+
};
|
17096
|
+
/* @conditional-compile-remove(file-sharing) */
|
17097
|
+
this.registerCompletedFileUploads = (metadata) => {
|
17098
|
+
return this.callWithChatAdapter.registerCompletedFileUploads(metadata);
|
17099
|
+
};
|
17100
|
+
/* @conditional-compile-remove(file-sharing) */
|
17101
|
+
this.clearFileUploads = () => {
|
17102
|
+
this.callWithChatAdapter.clearFileUploads();
|
17103
|
+
};
|
17104
|
+
/* @conditional-compile-remove(file-sharing) */
|
17105
|
+
this.cancelFileUpload = (id) => {
|
17106
|
+
this.callWithChatAdapter.cancelFileUpload(id);
|
17107
|
+
};
|
17108
|
+
/* @conditional-compile-remove(file-sharing) */
|
17109
|
+
this.updateFileUploadProgress = (id, progress) => {
|
17110
|
+
this.callWithChatAdapter.updateFileUploadProgress(id, progress);
|
17111
|
+
};
|
17112
|
+
/* @conditional-compile-remove(file-sharing) */
|
17113
|
+
this.updateFileUploadErrorMessage = (id, errorMessage) => {
|
17114
|
+
this.callWithChatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
17115
|
+
};
|
17116
|
+
/* @conditional-compile-remove(file-sharing) */
|
17117
|
+
this.updateFileUploadMetadata = (id, metadata) => {
|
17118
|
+
this.callWithChatAdapter.updateFileUploadMetadata(id, metadata);
|
17119
|
+
};
|
17004
17120
|
this.callWithChatAdapter = callWithChatAdapter;
|
17005
17121
|
}
|
17006
|
-
/* @conditional-compile-remove(file-sharing) */
|
17007
|
-
registerActiveFileUploads(files) {
|
17008
|
-
return this.callWithChatAdapter.registerActiveFileUploads(files);
|
17009
|
-
}
|
17010
|
-
/* @conditional-compile-remove(file-sharing) */
|
17011
|
-
registerCompletedFileUploads(metadata) {
|
17012
|
-
return this.callWithChatAdapter.registerCompletedFileUploads(metadata);
|
17013
|
-
}
|
17014
|
-
/* @conditional-compile-remove(file-sharing) */
|
17015
|
-
clearFileUploads() {
|
17016
|
-
this.callWithChatAdapter.clearFileUploads();
|
17017
|
-
}
|
17018
|
-
/* @conditional-compile-remove(file-sharing) */
|
17019
|
-
cancelFileUpload(id) {
|
17020
|
-
this.callWithChatAdapter.cancelFileUpload(id);
|
17021
|
-
}
|
17022
|
-
/* @conditional-compile-remove(file-sharing) */
|
17023
|
-
updateFileUploadProgress(id, progress) {
|
17024
|
-
this.callWithChatAdapter.updateFileUploadProgress(id, progress);
|
17025
|
-
}
|
17026
|
-
/* @conditional-compile-remove(file-sharing) */
|
17027
|
-
updateFileUploadErrorMessage(id, errorMessage) {
|
17028
|
-
this.callWithChatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
17029
|
-
}
|
17030
|
-
/* @conditional-compile-remove(file-sharing) */
|
17031
|
-
updateFileUploadMetadata(id, metadata) {
|
17032
|
-
this.callWithChatAdapter.updateFileUploadMetadata(id, metadata);
|
17033
|
-
}
|
17034
17122
|
}
|
17035
17123
|
function chatAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState) {
|
17036
17124
|
if (!callWithChatAdapterState.chat) {
|
@@ -17186,10 +17274,9 @@ const SidePaneHeader = (props) => {
|
|
17186
17274
|
iconHovered: { color: theme.palette.neutralSecondary },
|
17187
17275
|
iconPressed: { color: theme.palette.neutralSecondary }
|
17188
17276
|
}), [theme.palette.neutralSecondary]);
|
17189
|
-
const callWithChatStrings = useCallWithChatCompositeStrings();
|
17190
17277
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", styles: sidePaneHeaderContainerStyles },
|
17191
17278
|
React__default['default'].createElement(react.Stack.Item, { styles: sidePaneHeaderStyles }, props.headingText),
|
17192
|
-
React__default['default'].createElement(react.CommandBarButton, { ariaLabel:
|
17279
|
+
React__default['default'].createElement(react.CommandBarButton, { ariaLabel: props.strings.dismissSidePaneButtonLabel, styles: sidePaneCloseButtonStyles, iconProps: { iconName: 'cancel' }, onClick: props.onClose })));
|
17193
17280
|
};
|
17194
17281
|
|
17195
17282
|
// Copyright (c) Microsoft Corporation.
|
@@ -17313,6 +17400,61 @@ const localAndRemotePIPSelector = reselect__namespace.createSelector([getDisplay
|
|
17313
17400
|
};
|
17314
17401
|
});
|
17315
17402
|
|
17403
|
+
// Copyright (c) Microsoft Corporation.
|
17404
|
+
/**
|
17405
|
+
* Default Modal PIP related pixel measurements used for ModalLocalAndremotePIP and common/utils.
|
17406
|
+
*
|
17407
|
+
* @private
|
17408
|
+
*/
|
17409
|
+
const MODAL_PIP_DEFAULT_PX = {
|
17410
|
+
rightPositionPx: 16,
|
17411
|
+
topPositionPx: 52,
|
17412
|
+
widthPx: 88,
|
17413
|
+
heightPx: 128
|
17414
|
+
};
|
17415
|
+
/**
|
17416
|
+
* @private
|
17417
|
+
*/
|
17418
|
+
const getPipStyles = (theme) => ({
|
17419
|
+
modal: {
|
17420
|
+
main: Object.assign(Object.assign({ borderRadius: theme.effects.roundedCorner4, boxShadow: theme.effects.elevation8,
|
17421
|
+
// Above the message thread / people pane.
|
17422
|
+
zIndex: 2 }, (theme.rtl
|
17423
|
+
? { left: _pxToRem(MODAL_PIP_DEFAULT_PX.rightPositionPx) }
|
17424
|
+
: { right: _pxToRem(MODAL_PIP_DEFAULT_PX.rightPositionPx) })), { top: _pxToRem(MODAL_PIP_DEFAULT_PX.topPositionPx) })
|
17425
|
+
}
|
17426
|
+
});
|
17427
|
+
/**
|
17428
|
+
* @private
|
17429
|
+
*/
|
17430
|
+
const PIPContainerStyle = {
|
17431
|
+
root: { position: 'absolute', width: '100%', height: '100%', pointerEvents: 'none' }
|
17432
|
+
};
|
17433
|
+
/**
|
17434
|
+
* @private
|
17435
|
+
*/
|
17436
|
+
const hiddenStyle = react.concatStyleSets(PIPContainerStyle, { root: { display: 'none' } });
|
17437
|
+
/**
|
17438
|
+
* @private
|
17439
|
+
*/
|
17440
|
+
const modalStyle = {
|
17441
|
+
main: {
|
17442
|
+
minWidth: 'min-content',
|
17443
|
+
minHeight: 'min-content',
|
17444
|
+
position: 'absolute',
|
17445
|
+
overflow: 'hidden',
|
17446
|
+
// pointer events for root Modal div set to auto to make LocalAndRemotePIP interactive
|
17447
|
+
pointerEvents: 'auto',
|
17448
|
+
touchAction: 'none'
|
17449
|
+
},
|
17450
|
+
root: {
|
17451
|
+
width: '100%',
|
17452
|
+
height: '100%',
|
17453
|
+
// pointer events for root Modal div set to none to make descendants interactive
|
17454
|
+
pointerEvents: 'none'
|
17455
|
+
}
|
17456
|
+
};
|
17457
|
+
|
17316
17458
|
// Copyright (c) Microsoft Corporation.
|
17317
17459
|
/**
|
17318
17460
|
* Drag options for Modal in {@link ModalLocalAndRemotePIP} component
|
@@ -17345,27 +17487,6 @@ const ModalLocalAndRemotePIP = (props) => {
|
|
17345
17487
|
return (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
17346
17488
|
React__default['default'].createElement(_ModalLocalAndRemotePIP, Object.assign({}, props), props.children)));
|
17347
17489
|
};
|
17348
|
-
const PIPContainerStyle = {
|
17349
|
-
root: { position: 'absolute', width: '100%', height: '100%', pointerEvents: 'none' }
|
17350
|
-
};
|
17351
|
-
const hiddenStyle = react.concatStyleSets(PIPContainerStyle, { root: { display: 'none' } });
|
17352
|
-
const modalStyle = {
|
17353
|
-
main: {
|
17354
|
-
minWidth: 'min-content',
|
17355
|
-
minHeight: 'min-content',
|
17356
|
-
position: 'absolute',
|
17357
|
-
overflow: 'hidden',
|
17358
|
-
// pointer events for root Modal div set to auto to make LocalAndRemotePIP interactive
|
17359
|
-
pointerEvents: 'auto',
|
17360
|
-
touchAction: 'none'
|
17361
|
-
},
|
17362
|
-
root: {
|
17363
|
-
width: '100%',
|
17364
|
-
height: '100%',
|
17365
|
-
// pointer events for root Modal div set to none to make descendants interactive
|
17366
|
-
pointerEvents: 'none'
|
17367
|
-
}
|
17368
|
-
};
|
17369
17490
|
|
17370
17491
|
// Copyright (c) Microsoft Corporation.
|
17371
17492
|
/**
|
@@ -17407,7 +17528,7 @@ const copyLinkButtonStyles = {
|
|
17407
17528
|
*/
|
17408
17529
|
const linkIconStyles = { marginRight: '0.5rem' };
|
17409
17530
|
|
17410
|
-
var __awaiter$
|
17531
|
+
var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17411
17532
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17412
17533
|
return new (P || (P = Promise))(function (resolve, reject) {
|
17413
17534
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -17420,7 +17541,7 @@ var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
17420
17541
|
* @private
|
17421
17542
|
*/
|
17422
17543
|
const PeoplePaneContent = (props) => {
|
17423
|
-
const {
|
17544
|
+
const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings, onRemoveParticipant } = props;
|
17424
17545
|
const participantListDefaultProps = usePropsFor$1(ParticipantList);
|
17425
17546
|
const setDrawerMenuItemsForParticipant = React.useMemo(() => {
|
17426
17547
|
return (participant) => {
|
@@ -17441,13 +17562,13 @@ const PeoplePaneContent = (props) => {
|
|
17441
17562
|
setDrawerMenuItems
|
17442
17563
|
]);
|
17443
17564
|
const participantListProps = React.useMemo(() => {
|
17444
|
-
const
|
17565
|
+
const onRemoveAParticipant = (participantId) => __awaiter$2(void 0, void 0, void 0, function* () { return onRemoveParticipant(participantId); });
|
17445
17566
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
17446
17567
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
17447
|
-
onRemoveParticipant: props.mobileView ? undefined :
|
17568
|
+
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
17448
17569
|
// We want the drawer menu items to appear when participants in ParticipantList are clicked
|
17449
17570
|
onParticipantClick: props.mobileView ? setDrawerMenuItemsForParticipant : undefined });
|
17450
|
-
}, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant,
|
17571
|
+
}, [participantListDefaultProps, props.mobileView, setDrawerMenuItemsForParticipant, onRemoveParticipant]);
|
17451
17572
|
const participantList = (React__default['default'].createElement(ParticipantListWithHeading, { isMobile: props.mobileView, participantListProps: participantListProps, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, title: props.strings.peoplePaneSubTitle }));
|
17452
17573
|
const theme = react.useTheme();
|
17453
17574
|
const copyLinkButtonStylesThemed = React.useMemo(() => react.concatStyleSets(copyLinkButtonStyles, {
|
@@ -17467,28 +17588,20 @@ const PeoplePaneContent = (props) => {
|
|
17467
17588
|
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 }))),
|
17468
17589
|
participantList));
|
17469
17590
|
};
|
17470
|
-
/**
|
17471
|
-
* In a CallWithChat when a participant is removed, we must remove them from both
|
17472
|
-
* the call and the chat thread.
|
17473
|
-
*/
|
17474
|
-
const removeParticipantFromCallWithChat = (callAdapter, chatAdapter, participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
|
17475
|
-
yield callAdapter.removeParticipant(participantId);
|
17476
|
-
yield chatAdapter.removeParticipant(participantId);
|
17477
|
-
});
|
17478
17591
|
/**
|
17479
17592
|
* Create default contextual menu items for particant
|
17480
17593
|
* @param participant - participant to create contextual menu items for
|
17481
|
-
* @param
|
17594
|
+
* @param strings - localized strings for menu item text
|
17482
17595
|
* @param onRemoveParticipant - callback to remove participant
|
17483
17596
|
* @param localParticipantUserId - Local participant user id
|
17484
17597
|
* @returns - IContextualMenuItem[]
|
17485
17598
|
*/
|
17486
|
-
const createDefaultContextualMenuItems = (participant,
|
17599
|
+
const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId) => {
|
17487
17600
|
const menuItems = [];
|
17488
17601
|
if ((participant === null || participant === void 0 ? void 0 : participant.userId) !== localParticipantUserId) {
|
17489
17602
|
menuItems.push({
|
17490
17603
|
key: 'remove',
|
17491
|
-
text:
|
17604
|
+
text: strings.removeMenuLabel,
|
17492
17605
|
onClick: () => {
|
17493
17606
|
if (participant === null || participant === void 0 ? void 0 : participant.userId) {
|
17494
17607
|
onRemoveParticipant === null || onRemoveParticipant === void 0 ? void 0 : onRemoveParticipant(participant === null || participant === void 0 ? void 0 : participant.userId);
|
@@ -17574,14 +17687,43 @@ const mobilePaneButtonStyles = {
|
|
17574
17687
|
},
|
17575
17688
|
labelChecked: { fontWeight: 600 }
|
17576
17689
|
};
|
17690
|
+
/**
|
17691
|
+
* @private
|
17692
|
+
*/
|
17693
|
+
const hiddenStyles = {
|
17694
|
+
root: {
|
17695
|
+
display: 'none'
|
17696
|
+
}
|
17697
|
+
};
|
17698
|
+
/**
|
17699
|
+
* @private
|
17700
|
+
*/
|
17701
|
+
const sidePaneStyles = {
|
17702
|
+
root: {
|
17703
|
+
height: '100%',
|
17704
|
+
padding: '0.5rem 0.25rem',
|
17705
|
+
maxWidth: '21.5rem'
|
17706
|
+
}
|
17707
|
+
};
|
17708
|
+
/**
|
17709
|
+
* @private
|
17710
|
+
*/
|
17711
|
+
const availableSpaceStyles = { root: { width: '100%', height: '100%' } };
|
17712
|
+
/**
|
17713
|
+
* @private
|
17714
|
+
*/
|
17715
|
+
const sidePaneTokens = {
|
17716
|
+
childrenGap: '0.5rem'
|
17717
|
+
};
|
17577
17718
|
|
17578
17719
|
// Copyright (c) Microsoft Corporation.
|
17579
17720
|
/**
|
17580
17721
|
* @private
|
17581
17722
|
*/
|
17582
17723
|
const TabHeader = (props) => {
|
17724
|
+
const { onClose, onChatButtonClicked, onPeopleButtonClicked, activeTab, strings } = props;
|
17583
17725
|
const theme = useTheme();
|
17584
|
-
const haveMultipleTabs =
|
17726
|
+
const haveMultipleTabs = onChatButtonClicked && onPeopleButtonClicked;
|
17585
17727
|
const mobilePaneButtonStylesThemed = React.useMemo(() => {
|
17586
17728
|
return react.concatStyleSets(mobilePaneButtonStyles, {
|
17587
17729
|
root: {
|
@@ -17599,15 +17741,50 @@ const TabHeader = (props) => {
|
|
17599
17741
|
}
|
17600
17742
|
: {});
|
17601
17743
|
}, [theme, haveMultipleTabs]);
|
17602
|
-
const strings = useCallWithChatCompositeStrings();
|
17603
17744
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, grow: true, styles: mobilePaneControlBarStyle },
|
17604
|
-
React__default['default'].createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick:
|
17605
|
-
React__default['default'].createElement(react.Stack.Item, { grow: true },
|
17606
|
-
React__default['default'].createElement(react.Stack.Item, { grow: true },
|
17745
|
+
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 }),
|
17746
|
+
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))),
|
17747
|
+
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))),
|
17607
17748
|
React__default['default'].createElement(react.DefaultButton, { styles: mobilePaneHiddenIconStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }) })));
|
17608
17749
|
};
|
17609
17750
|
|
17610
17751
|
// Copyright (c) Microsoft Corporation.
|
17752
|
+
/**
|
17753
|
+
* @private
|
17754
|
+
*/
|
17755
|
+
// Use document.getElementById until Fluent's Stack supports componentRef property: https://github.com/microsoft/fluentui/issues/20410
|
17756
|
+
const useMinMaxDragPosition = (modalLayerHostId, rtl) => {
|
17757
|
+
const modalHostRef = React.useRef(document.getElementById(modalLayerHostId));
|
17758
|
+
const modalHostWidth = _useContainerWidth(modalHostRef);
|
17759
|
+
const modalHostHeight = _useContainerHeight(modalHostRef);
|
17760
|
+
const minDragPosition = React.useMemo(() => modalHostWidth === undefined
|
17761
|
+
? undefined
|
17762
|
+
: {
|
17763
|
+
x: rtl
|
17764
|
+
? -1 * MODAL_PIP_DEFAULT_PX.rightPositionPx
|
17765
|
+
: MODAL_PIP_DEFAULT_PX.rightPositionPx - modalHostWidth + MODAL_PIP_DEFAULT_PX.widthPx,
|
17766
|
+
y: -1 * MODAL_PIP_DEFAULT_PX.topPositionPx
|
17767
|
+
}, [modalHostWidth, rtl]);
|
17768
|
+
const maxDragPosition = React.useMemo(() => modalHostWidth === undefined || modalHostHeight === undefined
|
17769
|
+
? undefined
|
17770
|
+
: {
|
17771
|
+
x: rtl
|
17772
|
+
? modalHostWidth - MODAL_PIP_DEFAULT_PX.rightPositionPx - MODAL_PIP_DEFAULT_PX.widthPx
|
17773
|
+
: MODAL_PIP_DEFAULT_PX.rightPositionPx,
|
17774
|
+
y: modalHostHeight - MODAL_PIP_DEFAULT_PX.topPositionPx - MODAL_PIP_DEFAULT_PX.heightPx
|
17775
|
+
}, [modalHostHeight, modalHostWidth, rtl]);
|
17776
|
+
return { minDragPosition: minDragPosition, maxDragPosition: maxDragPosition };
|
17777
|
+
};
|
17778
|
+
|
17779
|
+
var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17780
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17781
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
17782
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17783
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17784
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17785
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17786
|
+
});
|
17787
|
+
};
|
17611
17788
|
/**
|
17612
17789
|
* Pane that is used to store chat and people for CallWithChat composite
|
17613
17790
|
* @private
|
@@ -17618,7 +17795,7 @@ const CallWithChatPane = (props) => {
|
|
17618
17795
|
const paneStyles = hidden ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
|
17619
17796
|
const callWithChatStrings = useCallWithChatCompositeStrings();
|
17620
17797
|
const theme = useTheme();
|
17621
|
-
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'
|
17798
|
+
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'
|
17622
17799
|
? callWithChatStrings.chatPaneTitle
|
17623
17800
|
: props.activePane === 'people'
|
17624
17801
|
? callWithChatStrings.peoplePaneTitle
|
@@ -17630,25 +17807,17 @@ const CallWithChatPane = (props) => {
|
|
17630
17807
|
/* @conditional-compile-remove(file-sharing) */
|
17631
17808
|
fileSharing: props.fileSharing
|
17632
17809
|
}, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })));
|
17810
|
+
/**
|
17811
|
+
* In a CallWithChat when a participant is removed, we must remove them from both
|
17812
|
+
* the call and the chat thread.
|
17813
|
+
*/
|
17814
|
+
const removeParticipantFromCallWithChat = (participantId) => __awaiter$1(void 0, void 0, void 0, function* () {
|
17815
|
+
yield props.callAdapter.removeParticipant(participantId);
|
17816
|
+
yield props.chatAdapter.removeParticipant(participantId);
|
17817
|
+
});
|
17633
17818
|
const peopleContent = (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
17634
|
-
React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
|
17635
|
-
|
17636
|
-
const modalLayerHostElement = document.getElementById(props.modalLayerHostId);
|
17637
|
-
const modalHostRef = React.useRef(modalLayerHostElement);
|
17638
|
-
const modalHostWidth = _useContainerWidth(modalHostRef);
|
17639
|
-
const modalHostHeight = _useContainerHeight(modalHostRef);
|
17640
|
-
const minDragPosition = React.useMemo(() => modalHostWidth === undefined
|
17641
|
-
? undefined
|
17642
|
-
: {
|
17643
|
-
x: props.rtl ? -1 * modalPipRightPositionPx : modalPipRightPositionPx - modalHostWidth + modalPipWidthPx,
|
17644
|
-
y: -1 * modalPipTopPositionPx
|
17645
|
-
}, [modalHostWidth, props.rtl]);
|
17646
|
-
const maxDragPosition = React.useMemo(() => modalHostWidth === undefined || modalHostHeight === undefined
|
17647
|
-
? undefined
|
17648
|
-
: {
|
17649
|
-
x: props.rtl ? modalHostWidth - modalPipRightPositionPx - modalPipWidthPx : modalPipRightPositionPx,
|
17650
|
-
y: modalHostHeight - modalPipTopPositionPx - modalPipHeightPx
|
17651
|
-
}, [modalHostHeight, modalHostWidth, props.rtl]);
|
17819
|
+
React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { onRemoveParticipant: removeParticipantFromCallWithChat, setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
|
17820
|
+
const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);
|
17652
17821
|
const pipStyles = React.useMemo(() => getPipStyles(theme), [theme]);
|
17653
17822
|
const dataUiId = props.activePane === 'chat'
|
17654
17823
|
? 'call-with-chat-composite-chat-pane'
|
@@ -17662,37 +17831,10 @@ const CallWithChatPane = (props) => {
|
|
17662
17831
|
React__default['default'].createElement(react.Stack.Item, { verticalFill: true, styles: scrollableContainerContents },
|
17663
17832
|
React__default['default'].createElement(react.Stack, { styles: props.activePane === 'chat' ? availableSpaceStyles : hiddenStyles }, chatContent),
|
17664
17833
|
React__default['default'].createElement(react.Stack, { styles: props.activePane === 'people' ? availableSpaceStyles : hiddenStyles }, peopleContent)))),
|
17665
|
-
props.mobileView && (React__default['default'].createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minDragPosition, maxDragPosition: maxDragPosition })),
|
17834
|
+
props.mobileView && (React__default['default'].createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition })),
|
17666
17835
|
drawerMenuItems.length > 0 && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles },
|
17667
17836
|
React__default['default'].createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
|
17668
17837
|
};
|
17669
|
-
const hiddenStyles = {
|
17670
|
-
root: {
|
17671
|
-
display: 'none'
|
17672
|
-
}
|
17673
|
-
};
|
17674
|
-
const sidePaneStyles = {
|
17675
|
-
root: {
|
17676
|
-
height: '100%',
|
17677
|
-
padding: '0.5rem 0.25rem',
|
17678
|
-
maxWidth: '21.5rem'
|
17679
|
-
}
|
17680
|
-
};
|
17681
|
-
const availableSpaceStyles = { root: { width: '100%', height: '100%' } };
|
17682
|
-
const sidePaneTokens = {
|
17683
|
-
childrenGap: '0.5rem'
|
17684
|
-
};
|
17685
|
-
const modalPipRightPositionPx = 16;
|
17686
|
-
const modalPipTopPositionPx = 52;
|
17687
|
-
const modalPipWidthPx = 88;
|
17688
|
-
const modalPipHeightPx = 128;
|
17689
|
-
const getPipStyles = (theme) => ({
|
17690
|
-
modal: {
|
17691
|
-
main: Object.assign(Object.assign({ borderRadius: theme.effects.roundedCorner4, boxShadow: theme.effects.elevation8,
|
17692
|
-
// Above the message thread / people pane.
|
17693
|
-
zIndex: 2 }, (theme.rtl ? { left: _pxToRem(modalPipRightPositionPx) } : { right: _pxToRem(modalPipRightPositionPx) })), { top: _pxToRem(modalPipTopPositionPx) })
|
17694
|
-
}
|
17695
|
-
});
|
17696
17838
|
|
17697
17839
|
// Copyright (c) Microsoft Corporation.
|
17698
17840
|
const CallWithChatScreen = (props) => {
|
@@ -17947,6 +18089,34 @@ class CallWithChatContext {
|
|
17947
18089
|
*/
|
17948
18090
|
class AzureCommunicationCallWithChatAdapter {
|
17949
18091
|
constructor(callAdapter, chatAdapter) {
|
18092
|
+
/* @conditional-compile-remove(file-sharing) */
|
18093
|
+
this.registerActiveFileUploads = (files) => {
|
18094
|
+
return this.chatAdapter.registerActiveFileUploads(files);
|
18095
|
+
};
|
18096
|
+
/* @conditional-compile-remove(file-sharing) */
|
18097
|
+
this.registerCompletedFileUploads = (metadata) => {
|
18098
|
+
return this.chatAdapter.registerCompletedFileUploads(metadata);
|
18099
|
+
};
|
18100
|
+
/* @conditional-compile-remove(file-sharing) */
|
18101
|
+
this.clearFileUploads = () => {
|
18102
|
+
this.chatAdapter.clearFileUploads();
|
18103
|
+
};
|
18104
|
+
/* @conditional-compile-remove(file-sharing) */
|
18105
|
+
this.cancelFileUpload = (id) => {
|
18106
|
+
this.chatAdapter.cancelFileUpload(id);
|
18107
|
+
};
|
18108
|
+
/* @conditional-compile-remove(file-sharing) */
|
18109
|
+
this.updateFileUploadProgress = (id, progress) => {
|
18110
|
+
this.chatAdapter.updateFileUploadProgress(id, progress);
|
18111
|
+
};
|
18112
|
+
/* @conditional-compile-remove(file-sharing) */
|
18113
|
+
this.updateFileUploadErrorMessage = (id, errorMessage) => {
|
18114
|
+
this.chatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
18115
|
+
};
|
18116
|
+
/* @conditional-compile-remove(file-sharing) */
|
18117
|
+
this.updateFileUploadMetadata = (id, metadata) => {
|
18118
|
+
this.chatAdapter.updateFileUploadMetadata(id, metadata);
|
18119
|
+
};
|
17950
18120
|
this.bindPublicMethods();
|
17951
18121
|
this.callAdapter = callAdapter;
|
17952
18122
|
this.chatAdapter = chatAdapter;
|
@@ -18193,34 +18363,6 @@ class AzureCommunicationCallWithChatAdapter {
|
|
18193
18363
|
return yield this.chatAdapter.deleteMessage(messageId);
|
18194
18364
|
});
|
18195
18365
|
}
|
18196
|
-
/* @conditional-compile-remove(file-sharing) */
|
18197
|
-
registerActiveFileUploads(files) {
|
18198
|
-
return this.chatAdapter.registerActiveFileUploads(files);
|
18199
|
-
}
|
18200
|
-
/* @conditional-compile-remove(file-sharing) */
|
18201
|
-
registerCompletedFileUploads(metadata) {
|
18202
|
-
return this.chatAdapter.registerCompletedFileUploads(metadata);
|
18203
|
-
}
|
18204
|
-
/* @conditional-compile-remove(file-sharing) */
|
18205
|
-
clearFileUploads() {
|
18206
|
-
this.chatAdapter.clearFileUploads();
|
18207
|
-
}
|
18208
|
-
/* @conditional-compile-remove(file-sharing) */
|
18209
|
-
cancelFileUpload(id) {
|
18210
|
-
this.chatAdapter.cancelFileUpload(id);
|
18211
|
-
}
|
18212
|
-
/* @conditional-compile-remove(file-sharing) */
|
18213
|
-
updateFileUploadProgress(id, progress) {
|
18214
|
-
this.chatAdapter.updateFileUploadProgress(id, progress);
|
18215
|
-
}
|
18216
|
-
/* @conditional-compile-remove(file-sharing) */
|
18217
|
-
updateFileUploadErrorMessage(id, errorMessage) {
|
18218
|
-
this.chatAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
18219
|
-
}
|
18220
|
-
/* @conditional-compile-remove(file-sharing) */
|
18221
|
-
updateFileUploadMetadata(id, metadata) {
|
18222
|
-
this.chatAdapter.updateFileUploadMetadata(id, metadata);
|
18223
|
-
}
|
18224
18366
|
/* @conditional-compile-remove(PSTN-calls) */
|
18225
18367
|
holdCall() {
|
18226
18368
|
return __awaiter(this, void 0, void 0, function* () {
|