@azure/communication-react 1.3.3-alpha-202209220018.0 → 1.3.3-alpha-202210060021.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 +92 -11
- package/dist/dist-cjs/communication-react/index.js +441 -248
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/identifier.d.ts +5 -0
- package/dist/dist-esm/acs-ui-common/src/identifier.js +10 -0
- package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.d.ts +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +5 -8
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +3 -3
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js +21 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -1
- package/dist/dist-esm/communication-react/src/index.js +2 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js +3 -3
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.d.ts +53 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js +22 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +4 -2
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.js +2 -2
- package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HoldButton.js +3 -3
- package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +2 -6
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +3 -3
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +2 -2
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +3 -3
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +13 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/index.js +2 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +5 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +5 -0
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +15 -2
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +10 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +15 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +27 -17
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js +46 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js +49 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +50 -28
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +10 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +2 -1
- 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 +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +9 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +11 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts +2 -5
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +26 -12
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +2 -0
- package/package.json +10 -10
@@ -188,11 +188,21 @@ const fromFlatCommunicationIdentifier = (id) => {
|
|
188
188
|
}
|
189
189
|
return { id };
|
190
190
|
};
|
191
|
+
/**
|
192
|
+
* Returns a CommunicationIdentifier.
|
193
|
+
* @internal
|
194
|
+
*/
|
195
|
+
const _toCommunicationIdentifier = (id) => {
|
196
|
+
if (typeof id === 'string') {
|
197
|
+
return fromFlatCommunicationIdentifier(id);
|
198
|
+
}
|
199
|
+
return id;
|
200
|
+
};
|
191
201
|
|
192
202
|
// Copyright (c) Microsoft Corporation.
|
193
203
|
// Licensed under the MIT license.
|
194
204
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
195
|
-
var telemetryVersion = '1.3.3-alpha-
|
205
|
+
var telemetryVersion = '1.3.3-alpha-202210060021.0';
|
196
206
|
|
197
207
|
// Copyright (c) Microsoft Corporation.
|
198
208
|
/**
|
@@ -391,7 +401,7 @@ const getCallState = (state, props) => { var _a; return (_a = state.calls[props.
|
|
391
401
|
|
392
402
|
// Copyright (c) Microsoft Corporation.
|
393
403
|
// Licensed under the MIT license.
|
394
|
-
var __awaiter$
|
404
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
395
405
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
396
406
|
return new (P || (P = Promise))(function (resolve, reject) {
|
397
407
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -429,7 +439,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
429
439
|
*
|
430
440
|
* @private
|
431
441
|
*/
|
432
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
442
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$y(void 0, void 0, void 0, function* () {
|
433
443
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
434
444
|
for (const view of unparentedViews) {
|
435
445
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -536,7 +546,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
536
546
|
|
537
547
|
// Copyright (c) Microsoft Corporation.
|
538
548
|
// Licensed under the MIT license.
|
539
|
-
var __awaiter$
|
549
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
540
550
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
541
551
|
return new (P || (P = Promise))(function (resolve, reject) {
|
542
552
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -560,7 +570,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
560
570
|
* @public
|
561
571
|
*/
|
562
572
|
const createDefaultCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
563
|
-
const onStartLocalVideo = () => __awaiter$
|
573
|
+
const onStartLocalVideo = () => __awaiter$x(void 0, void 0, void 0, function* () {
|
564
574
|
// Before the call object creates a stream, dispose of any local preview streams.
|
565
575
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
566
576
|
// of disposing and creating a new stream?
|
@@ -580,7 +590,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
580
590
|
yield call.startVideo(stream);
|
581
591
|
}
|
582
592
|
});
|
583
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
593
|
+
const onStopLocalVideo = (stream) => __awaiter$x(void 0, void 0, void 0, function* () {
|
584
594
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
585
595
|
if (!callId) {
|
586
596
|
return;
|
@@ -593,7 +603,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
593
603
|
});
|
594
604
|
}
|
595
605
|
});
|
596
|
-
const onToggleCamera = (options) => __awaiter$
|
606
|
+
const onToggleCamera = (options) => __awaiter$x(void 0, void 0, void 0, function* () {
|
597
607
|
if (call && _isInCall(call.state)) {
|
598
608
|
const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
599
609
|
if (stream) {
|
@@ -619,23 +629,22 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
619
629
|
}
|
620
630
|
}
|
621
631
|
});
|
622
|
-
// FIXME: onStartCall API should use string, not the underlying SDK types.
|
623
632
|
const onStartCall = (participants, options) => {
|
624
633
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
625
634
|
};
|
626
|
-
const onSelectMicrophone = (device) => __awaiter$
|
635
|
+
const onSelectMicrophone = (device) => __awaiter$x(void 0, void 0, void 0, function* () {
|
627
636
|
if (!deviceManager) {
|
628
637
|
return;
|
629
638
|
}
|
630
639
|
return deviceManager.selectMicrophone(device);
|
631
640
|
});
|
632
|
-
const onSelectSpeaker = (device) => __awaiter$
|
641
|
+
const onSelectSpeaker = (device) => __awaiter$x(void 0, void 0, void 0, function* () {
|
633
642
|
if (!deviceManager) {
|
634
643
|
return;
|
635
644
|
}
|
636
645
|
return deviceManager.selectSpeaker(device);
|
637
646
|
});
|
638
|
-
const onSelectCamera = (device, options) => __awaiter$
|
647
|
+
const onSelectCamera = (device, options) => __awaiter$x(void 0, void 0, void 0, function* () {
|
639
648
|
if (!deviceManager) {
|
640
649
|
return;
|
641
650
|
}
|
@@ -658,19 +667,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
658
667
|
}, options);
|
659
668
|
}
|
660
669
|
});
|
661
|
-
const onToggleMicrophone = () => __awaiter$
|
670
|
+
const onToggleMicrophone = () => __awaiter$x(void 0, void 0, void 0, function* () {
|
662
671
|
if (!call || !_isInCall(call.state)) {
|
663
672
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
664
673
|
}
|
665
674
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
666
675
|
});
|
667
|
-
const onStartScreenShare = () => __awaiter$
|
668
|
-
const onStopScreenShare = () => __awaiter$
|
669
|
-
const onToggleScreenShare = () => __awaiter$
|
670
|
-
const onHangUp = () => __awaiter$
|
676
|
+
const onStartScreenShare = () => __awaiter$x(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
677
|
+
const onStopScreenShare = () => __awaiter$x(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
678
|
+
const onToggleScreenShare = () => __awaiter$x(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
679
|
+
const onHangUp = () => __awaiter$x(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
|
671
680
|
/* @conditional-compile-remove(PSTN-calls) */
|
672
|
-
const onToggleHold = () => __awaiter$
|
673
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
681
|
+
const onToggleHold = () => __awaiter$x(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()); });
|
682
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$x(void 0, void 0, void 0, function* () {
|
674
683
|
var _a;
|
675
684
|
if (!call || call.localVideoStreams.length === 0) {
|
676
685
|
return;
|
@@ -686,7 +695,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
686
695
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
687
696
|
return view ? { view } : undefined;
|
688
697
|
});
|
689
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
698
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$x(void 0, void 0, void 0, function* () {
|
690
699
|
if (!call) {
|
691
700
|
return;
|
692
701
|
}
|
@@ -714,7 +723,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
714
723
|
}
|
715
724
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
716
725
|
});
|
717
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
726
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$x(void 0, void 0, void 0, function* () {
|
718
727
|
if (!call) {
|
719
728
|
return;
|
720
729
|
}
|
@@ -735,7 +744,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
735
744
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
736
745
|
}
|
737
746
|
});
|
738
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
747
|
+
const onDisposeLocalStreamView = () => __awaiter$x(void 0, void 0, void 0, function* () {
|
739
748
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
740
749
|
const callState = call && callClient.getState().calls[call.id];
|
741
750
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -747,11 +756,12 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
747
756
|
// TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
|
748
757
|
yield disposeAllLocalPreviewViews(callClient);
|
749
758
|
});
|
750
|
-
const onRemoveParticipant = (userId) => __awaiter$
|
751
|
-
|
759
|
+
const onRemoveParticipant = (userId) => __awaiter$x(void 0, void 0, void 0, function* () {
|
760
|
+
const participant = _toCommunicationIdentifier(userId);
|
761
|
+
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
752
762
|
});
|
753
763
|
/* @conditional-compile-remove(PSTN-calls) */
|
754
|
-
const onAddParticipant = (participant, options) => __awaiter$
|
764
|
+
const onAddParticipant = (participant, options) => __awaiter$x(void 0, void 0, void 0, function* () {
|
755
765
|
const participantType = participantTypeHelper(participant);
|
756
766
|
switch (participantType) {
|
757
767
|
case 'PSTN':
|
@@ -763,7 +773,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
763
773
|
}
|
764
774
|
});
|
765
775
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
766
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
776
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$x(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
767
777
|
return {
|
768
778
|
onHangUp,
|
769
779
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -3494,7 +3504,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
3494
3504
|
return actionMenuProps;
|
3495
3505
|
};
|
3496
3506
|
|
3497
|
-
var __awaiter$
|
3507
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3498
3508
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3499
3509
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3500
3510
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3519,7 +3529,7 @@ const _FileDownloadCards = (props) => {
|
|
3519
3529
|
var _a, _b;
|
3520
3530
|
return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile) !== null && _b !== void 0 ? _b : localeStrings.downloadFile;
|
3521
3531
|
}, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile, localeStrings.downloadFile]);
|
3522
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
3532
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$w(void 0, void 0, void 0, function* () {
|
3523
3533
|
if (!props.downloadHandler) {
|
3524
3534
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
3525
3535
|
}
|
@@ -3667,7 +3677,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
3667
3677
|
|
3668
3678
|
// Copyright (c) Microsoft Corporation.
|
3669
3679
|
// Licensed under the MIT license.
|
3670
|
-
var __awaiter$
|
3680
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3671
3681
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3672
3682
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3673
3683
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3701,7 +3711,7 @@ const ChatMessageComponent = (props) => {
|
|
3701
3711
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
3702
3712
|
}
|
3703
3713
|
else if (isEditing) {
|
3704
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
3714
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$v(void 0, void 0, void 0, function* () {
|
3705
3715
|
props.onUpdateMessage &&
|
3706
3716
|
props.message.messageId &&
|
3707
3717
|
(yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
|
@@ -3800,7 +3810,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
|
3800
3810
|
|
3801
3811
|
// Copyright (c) Microsoft Corporation.
|
3802
3812
|
// Licensed under the MIT license.
|
3803
|
-
var __awaiter$
|
3813
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3804
3814
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3805
3815
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3806
3816
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4027,7 +4037,7 @@ const MessageThread = (props) => {
|
|
4027
4037
|
setChatMessagesInitialized(chatMessagesInitialized);
|
4028
4038
|
};
|
4029
4039
|
// we try to only send those message status if user is scrolled to the bottom.
|
4030
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
4040
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$u(void 0, void 0, void 0, function* () {
|
4031
4041
|
if (!isAtBottomOfScrollRef.current ||
|
4032
4042
|
!document.hasFocus() ||
|
4033
4043
|
!messagesRef.current ||
|
@@ -4078,14 +4088,13 @@ const MessageThread = (props) => {
|
|
4078
4088
|
setIsAtBottomOfScrollRef(atBottom);
|
4079
4089
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
4080
4090
|
// Infinite scrolling + threadInitialize function
|
4081
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
4091
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$u(void 0, void 0, void 0, function* () {
|
4082
4092
|
if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
|
4083
4093
|
if (onLoadPreviousChatMessages) {
|
4084
4094
|
isLoadingChatMessagesRef.current = true;
|
4085
4095
|
// Fetch message until scrollTop reach the threshold for fetching new message
|
4086
4096
|
while (!isAllChatMessagesLoadedRef.current && chatScrollDivRef.current.scrollTop <= 500) {
|
4087
4097
|
isAllChatMessagesLoadedRef.current = yield onLoadPreviousChatMessages(numberOfChatMessagesToReload);
|
4088
|
-
// Release CPU resources for 200 milliseconds between each loop.
|
4089
4098
|
yield delay(200);
|
4090
4099
|
}
|
4091
4100
|
isLoadingChatMessagesRef.current = false;
|
@@ -4113,11 +4122,8 @@ const MessageThread = (props) => {
|
|
4113
4122
|
if (!chatScrollDivRef.current) {
|
4114
4123
|
return;
|
4115
4124
|
}
|
4116
|
-
|
4117
|
-
|
4118
|
-
chatScrollDivRef.current.scrollTop =
|
4119
|
-
chatScrollDivRef.current.scrollTop + currentHeight - previousHeightRef.current;
|
4120
|
-
}
|
4125
|
+
chatScrollDivRef.current.scrollTop =
|
4126
|
+
chatScrollDivRef.current.scrollHeight - (previousHeightRef.current - previousTopRef.current);
|
4121
4127
|
}, [messages]);
|
4122
4128
|
// Fetch more messages to make the scroll bar appear, infinity scroll is then handled in the handleScroll function.
|
4123
4129
|
React.useEffect(() => {
|
@@ -4568,10 +4574,20 @@ const participantStateStringTrampoline$1 = (props, strings) => {
|
|
4568
4574
|
};
|
4569
4575
|
|
4570
4576
|
// Copyright (c) Microsoft Corporation.
|
4577
|
+
/**
|
4578
|
+
* @internal
|
4579
|
+
*/
|
4580
|
+
const defaultPermissions = {
|
4581
|
+
cameraButton: true,
|
4582
|
+
microphoneButton: true,
|
4583
|
+
screenShare: true,
|
4584
|
+
removeParticipantButton: true
|
4585
|
+
};
|
4571
4586
|
/**
|
4572
4587
|
* @internal
|
4573
4588
|
*/
|
4574
4589
|
const presenterPermissions = {
|
4590
|
+
role: 'Presenter',
|
4575
4591
|
cameraButton: true,
|
4576
4592
|
microphoneButton: true,
|
4577
4593
|
screenShare: true,
|
@@ -4581,6 +4597,7 @@ const presenterPermissions = {
|
|
4581
4597
|
* @internal
|
4582
4598
|
*/
|
4583
4599
|
const consumerPermissions = {
|
4600
|
+
role: 'Consumer',
|
4584
4601
|
cameraButton: false,
|
4585
4602
|
microphoneButton: false,
|
4586
4603
|
screenShare: false,
|
@@ -4590,6 +4607,7 @@ const consumerPermissions = {
|
|
4590
4607
|
* @internal
|
4591
4608
|
*/
|
4592
4609
|
const attendeePermissions = {
|
4610
|
+
role: 'Attendee',
|
4593
4611
|
cameraButton: true,
|
4594
4612
|
microphoneButton: true,
|
4595
4613
|
screenShare: false,
|
@@ -4598,7 +4616,7 @@ const attendeePermissions = {
|
|
4598
4616
|
/**
|
4599
4617
|
* @internal
|
4600
4618
|
*/
|
4601
|
-
const PermissionsContext = React.createContext(
|
4619
|
+
const PermissionsContext = React.createContext(defaultPermissions);
|
4602
4620
|
/**
|
4603
4621
|
* @internal
|
4604
4622
|
*/
|
@@ -4621,9 +4639,10 @@ const _getPermissions = (role) => {
|
|
4621
4639
|
else if (role === 'Attendee') {
|
4622
4640
|
return attendeePermissions;
|
4623
4641
|
}
|
4624
|
-
else {
|
4642
|
+
else if (role === 'Presenter') {
|
4625
4643
|
return presenterPermissions;
|
4626
4644
|
}
|
4645
|
+
return defaultPermissions;
|
4627
4646
|
};
|
4628
4647
|
|
4629
4648
|
// Copyright (c) Microsoft Corporation.
|
@@ -6384,11 +6403,17 @@ const VideoGallery = (props) => {
|
|
6384
6403
|
lastVisibleParticipants: visibleAudioParticipants.current,
|
6385
6404
|
maxDominantSpeakers: MAX_AUDIO_DOMINANT_SPEAKERS
|
6386
6405
|
});
|
6406
|
+
/* @conditional-compile-remove(rooms) */
|
6407
|
+
const permissions = _usePermissions();
|
6387
6408
|
/**
|
6388
6409
|
* Utility function for memoized rendering of LocalParticipant.
|
6389
6410
|
*/
|
6390
6411
|
const localVideoTile = React.useMemo(() => {
|
6391
6412
|
var _a, _b;
|
6413
|
+
/* @conditional-compile-remove(rooms) */
|
6414
|
+
if (!permissions.cameraButton) {
|
6415
|
+
return undefined;
|
6416
|
+
}
|
6392
6417
|
if (onRenderLocalVideoTile) {
|
6393
6418
|
return onRenderLocalVideoTile(localParticipant);
|
6394
6419
|
}
|
@@ -6416,7 +6441,8 @@ const VideoGallery = (props) => {
|
|
6416
6441
|
strings.localVideoSelectedDescription,
|
6417
6442
|
strings.displayNamePlaceholder,
|
6418
6443
|
styles === null || styles === void 0 ? void 0 : styles.localVideo,
|
6419
|
-
theme.effects.roundedCorner4
|
6444
|
+
theme.effects.roundedCorner4,
|
6445
|
+
/* @conditional-compile-remove(rooms) */ permissions.cameraButton
|
6420
6446
|
]);
|
6421
6447
|
const defaultOnRenderVideoTile = React.useCallback((participant, isVideoParticipant) => {
|
6422
6448
|
const remoteVideoStream = participant.videoStream;
|
@@ -6461,7 +6487,7 @@ const VideoGallery = (props) => {
|
|
6461
6487
|
}
|
6462
6488
|
};
|
6463
6489
|
const horizontalGalleryTiles = createHorizontalGalleryTiles();
|
6464
|
-
if (!shouldFloatLocalVideo &&
|
6490
|
+
if (!shouldFloatLocalVideo && localVideoTile) {
|
6465
6491
|
gridTiles.push(localVideoTile);
|
6466
6492
|
}
|
6467
6493
|
const localScreenShareStreamComponent = React__default['default'].createElement(LocalScreenShare, { localParticipant: localParticipant });
|
@@ -6471,10 +6497,10 @@ const VideoGallery = (props) => {
|
|
6471
6497
|
return (React__default['default'].createElement("div", { "data-ui-id": ids.videoGallery, ref: containerRef, className: react.mergeStyles(videoGalleryOuterDivStyle, styles === null || styles === void 0 ? void 0 : styles.root) },
|
6472
6498
|
shouldFloatLocalVideo &&
|
6473
6499
|
!shouldFloatNonDraggableLocalVideo &&
|
6474
|
-
|
6500
|
+
localVideoTile &&
|
6475
6501
|
(horizontalGalleryPresent ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileContainerStyle(theme, isNarrow)) }, localVideoTile)) : (React__default['default'].createElement(_ModalClone, { isOpen: true, isModeless: true, dragOptions: DRAG_OPTIONS$1, styles: floatingLocalVideoModalStyle(theme, isNarrow), layerProps: { hostId: layerHostId }, maxDragPosition: modalMaxDragPosition, minDragPosition: modalMinDragPosition }, localVideoTile))),
|
6476
6502
|
// When we use showCameraSwitcherInLocalPreview it disables dragging to allow keyboard navigation.
|
6477
|
-
shouldFloatNonDraggableLocalVideo &&
|
6503
|
+
shouldFloatNonDraggableLocalVideo && localVideoTile && remoteParticipants.length > 0 && (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(localVideoTileWithControlsContainerStyle(theme, isNarrow), {
|
6478
6504
|
boxShadow: theme.effects.elevation8,
|
6479
6505
|
zIndex: LOCAL_VIDEO_TILE_ZINDEX
|
6480
6506
|
}) }, localVideoTile)),
|
@@ -6697,9 +6723,9 @@ const ControlBarButton = (props) => {
|
|
6697
6723
|
/**
|
6698
6724
|
* This is a helper component to define and unify icon colors
|
6699
6725
|
*
|
6700
|
-
* @
|
6726
|
+
* @internal
|
6701
6727
|
*/
|
6702
|
-
const
|
6728
|
+
const _HighContrastAwareIcon = (props) => {
|
6703
6729
|
const { iconName, disabled } = props;
|
6704
6730
|
const theme = useTheme();
|
6705
6731
|
// setting colors for the icons using color from theme, so in dark mode or other accessibility modes, they have pre-defined contrast colors
|
@@ -6843,13 +6869,15 @@ const DevicesButton = (props) => {
|
|
6843
6869
|
const localeStrings = useLocale$1().strings.devicesButton;
|
6844
6870
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
6845
6871
|
const devicesButtonMenu = (_a = props.menuProps) !== null && _a !== void 0 ? _a : generateDefaultDeviceMenuProps(Object.assign(Object.assign({}, props), { styles: (_b = props.styles) === null || _b === void 0 ? void 0 : _b.menuStyles }), strings);
|
6846
|
-
const onRenderOptionsIcon = () =>
|
6872
|
+
const onRenderOptionsIcon = () => {
|
6873
|
+
return React__default['default'].createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonOptions" });
|
6874
|
+
};
|
6847
6875
|
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { menuProps: devicesButtonMenu, menuIconProps: { hidden: true }, onRenderIcon: onRenderIcon !== null && onRenderIcon !== void 0 ? onRenderIcon : onRenderOptionsIcon, strings: strings, labelKey: (_c = props.labelKey) !== null && _c !== void 0 ? _c : 'devicesButtonLabel' })));
|
6848
6876
|
};
|
6849
6877
|
|
6850
6878
|
// Copyright (c) Microsoft Corporation.
|
6851
6879
|
// Licensed under the MIT license.
|
6852
|
-
var __awaiter$
|
6880
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6853
6881
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6854
6882
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6855
6883
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6877,8 +6905,8 @@ const CameraButton = (props) => {
|
|
6877
6905
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
6878
6906
|
const [announcerString, setAnnouncerString] = React.useState(undefined);
|
6879
6907
|
const disabled = props.disabled || waitForCamera;
|
6880
|
-
const onRenderCameraOnIcon = () => (React__default['default'].createElement(
|
6881
|
-
const onRenderCameraOffIcon = () => (React__default['default'].createElement(
|
6908
|
+
const onRenderCameraOnIcon = () => (React__default['default'].createElement(_HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonCameraOn" }));
|
6909
|
+
const onRenderCameraOffIcon = () => (React__default['default'].createElement(_HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonCameraOff" }));
|
6882
6910
|
if (waitForCamera && strings.tooltipVideoLoadingContent) {
|
6883
6911
|
strings.tooltipDisabledContent = strings.tooltipVideoLoadingContent;
|
6884
6912
|
}
|
@@ -6887,7 +6915,7 @@ const CameraButton = (props) => {
|
|
6887
6915
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
6888
6916
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
6889
6917
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
6890
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
6918
|
+
const onToggleClick = React.useCallback(() => __awaiter$t(void 0, void 0, void 0, function* () {
|
6891
6919
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
6892
6920
|
if (onToggleCamera) {
|
6893
6921
|
setWaitForCamera(true);
|
@@ -7019,7 +7047,7 @@ const lightThemeCallButtonStyles = {
|
|
7019
7047
|
|
7020
7048
|
// Copyright (c) Microsoft Corporation.
|
7021
7049
|
// Licensed under the MIT license.
|
7022
|
-
var __awaiter$
|
7050
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7023
7051
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7024
7052
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7025
7053
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7050,17 +7078,17 @@ const MicrophoneButton = (props) => {
|
|
7050
7078
|
(isSplit && !((_c = props.microphones) === null || _c === void 0 ? void 0 : _c.length) && !((_d = props.speakers) === null || _d === void 0 ? void 0 : _d.length)) ||
|
7051
7079
|
(!isSplit && props.microphones && ((_e = props.microphones) === null || _e === void 0 ? void 0 : _e.length) === 0);
|
7052
7080
|
const onRenderMicOnIcon = () => {
|
7053
|
-
return React__default['default'].createElement(
|
7081
|
+
return React__default['default'].createElement(_HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonMicOn" });
|
7054
7082
|
};
|
7055
7083
|
const onRenderMicOffIcon = () => {
|
7056
|
-
return React__default['default'].createElement(
|
7084
|
+
return React__default['default'].createElement(_HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonMicOff" });
|
7057
7085
|
};
|
7058
7086
|
const isMicOn = props.checked;
|
7059
7087
|
const splitButtonAriaString = isMicOn ? strings.onSplitButtonAriaLabel : strings.offSplitButtonAriaLabel;
|
7060
7088
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
7061
7089
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
7062
7090
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
7063
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
7091
|
+
const onToggleClick = React.useCallback(() => __awaiter$s(void 0, void 0, void 0, function* () {
|
7064
7092
|
if (onToggleMicrophone) {
|
7065
7093
|
try {
|
7066
7094
|
yield onToggleMicrophone();
|
@@ -7196,7 +7224,7 @@ const ParticipantsButton = (props) => {
|
|
7196
7224
|
var _a, _b, _c, _d;
|
7197
7225
|
const { callInvitationURL, styles, onMuteAll, onRenderIcon, onRenderParticipantList, participants, myUserId, excludeMe, onRenderParticipant, onRenderAvatar, onRemoveParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip } = props;
|
7198
7226
|
const disabled = props.disabled;
|
7199
|
-
const onRenderPeopleIcon = () => (React__default['default'].createElement(
|
7227
|
+
const onRenderPeopleIcon = () => (React__default['default'].createElement(_HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonParticipants" }));
|
7200
7228
|
const ids = useIdentifiers();
|
7201
7229
|
const onMuteAllCallback = React.useCallback(() => {
|
7202
7230
|
if (onMuteAll) {
|
@@ -7339,8 +7367,8 @@ const ScreenShareButton = (props) => {
|
|
7339
7367
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
7340
7368
|
const theme = react.useTheme();
|
7341
7369
|
const styles = screenshareButtonStyles(theme);
|
7342
|
-
const onRenderScreenShareOnIcon = () => (React__default['default'].createElement(
|
7343
|
-
const onRenderScreenShareOffIcon = () => (React__default['default'].createElement(
|
7370
|
+
const onRenderScreenShareOnIcon = () => (React__default['default'].createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonScreenShareStop" }));
|
7371
|
+
const onRenderScreenShareOffIcon = () => (React__default['default'].createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonScreenShareStart" }));
|
7344
7372
|
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { className: react.mergeStyles(styles, props.styles), onClick: (_a = props.onToggleScreenShare) !== null && _a !== void 0 ? _a : props.onClick, onRenderOnIcon: (_b = props.onRenderOnIcon) !== null && _b !== void 0 ? _b : onRenderScreenShareOnIcon, onRenderOffIcon: (_c = props.onRenderOffIcon) !== null && _c !== void 0 ? _c : onRenderScreenShareOffIcon, strings: strings, labelKey: (_d = props.labelKey) !== null && _d !== void 0 ? _d : 'screenShareButtonLabel', disabled: props.disabled })));
|
7345
7373
|
};
|
7346
7374
|
const screenshareButtonStyles = (theme) => ({
|
@@ -7924,7 +7952,11 @@ const iconButtonStyles = (theme) => {
|
|
7924
7952
|
color: `${theme.palette.black}`
|
7925
7953
|
},
|
7926
7954
|
icon: {
|
7927
|
-
height: 'auto'
|
7955
|
+
height: 'auto',
|
7956
|
+
// Needed to keep the icon vertically centered.
|
7957
|
+
'> span': {
|
7958
|
+
display: 'flex'
|
7959
|
+
}
|
7928
7960
|
}
|
7929
7961
|
};
|
7930
7962
|
};
|
@@ -8036,7 +8068,7 @@ function useLongPress(onClick, onLongPress, isMobile) {
|
|
8036
8068
|
|
8037
8069
|
// Copyright (c) Microsoft Corporation.
|
8038
8070
|
// Licensed under the MIT license.
|
8039
|
-
var __awaiter$
|
8071
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8040
8072
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8041
8073
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8042
8074
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8077,10 +8109,10 @@ const DialpadButton = (props) => {
|
|
8077
8109
|
var _a, _b, _c, _d;
|
8078
8110
|
const theme = react.useTheme();
|
8079
8111
|
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
8080
|
-
const clickFunction = React.useCallback(() => __awaiter$
|
8112
|
+
const clickFunction = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
|
8081
8113
|
onClick(digit, index);
|
8082
8114
|
}), [digit, index, onClick]);
|
8083
|
-
const longPressFunction = React.useCallback(() => __awaiter$
|
8115
|
+
const longPressFunction = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
|
8084
8116
|
onLongPress(digit, index);
|
8085
8117
|
}), [digit, index, onLongPress]);
|
8086
8118
|
const { handlers } = useLongPress(clickFunction, longPressFunction, isMobile);
|
@@ -8200,10 +8232,10 @@ const sanitizeInput = (input) => {
|
|
8200
8232
|
const HoldButton = (props) => {
|
8201
8233
|
const { onToggleHold, strings } = props;
|
8202
8234
|
const onRenderHoldIcon = () => {
|
8203
|
-
return React__default['default'].createElement(
|
8235
|
+
return React__default['default'].createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "HoldCallButton" });
|
8204
8236
|
};
|
8205
8237
|
const onRenderResumeIcon = () => {
|
8206
|
-
return React__default['default'].createElement(
|
8238
|
+
return React__default['default'].createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "ResumeCall" });
|
8207
8239
|
};
|
8208
8240
|
return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { strings: strings, onClick: onToggleHold !== null && onToggleHold !== void 0 ? onToggleHold : props.onClick, onRenderOnIcon: onRenderResumeIcon, onRenderOffIcon: onRenderHoldIcon })));
|
8209
8241
|
};
|
@@ -8283,6 +8315,25 @@ const UnsupportedBrowser = (props) => {
|
|
8283
8315
|
return React__default['default'].createElement(UnsupportedBrowserContainer, Object.assign({}, props, { strings: strings }));
|
8284
8316
|
};
|
8285
8317
|
|
8318
|
+
// Copyright (c) Microsoft Corporation.
|
8319
|
+
/**
|
8320
|
+
* A dropdown to trigger device permission prompt
|
8321
|
+
*
|
8322
|
+
* @internal
|
8323
|
+
*/
|
8324
|
+
const _DevicePermissionDropdown = (props) => {
|
8325
|
+
const { icon, onClickActionButton, strings, options, styles } = props;
|
8326
|
+
const onRenderPlaceholder = () => {
|
8327
|
+
return (React__default['default'].createElement(react.Stack, { horizontal: true, verticalAlign: "center" },
|
8328
|
+
icon,
|
8329
|
+
React__default['default'].createElement(react.Text, null, strings === null || strings === void 0 ? void 0 : strings.placeHolderText)));
|
8330
|
+
};
|
8331
|
+
const onRenderCaretDown = () => {
|
8332
|
+
return React__default['default'].createElement(react.Text, null, strings === null || strings === void 0 ? void 0 : strings.actionButtonContent);
|
8333
|
+
};
|
8334
|
+
return (React__default['default'].createElement(react.Dropdown, { placeholder: strings === null || strings === void 0 ? void 0 : strings.placeHolderText, label: strings === null || strings === void 0 ? void 0 : strings.label, onRenderPlaceholder: onRenderPlaceholder, onRenderCaretDown: onRenderCaretDown, onClick: onClickActionButton, options: options !== null && options !== void 0 ? options : [], styles: styles }));
|
8335
|
+
};
|
8336
|
+
|
8286
8337
|
// Copyright (c) Microsoft Corporation.
|
8287
8338
|
// Licensed under the MIT license.
|
8288
8339
|
/**
|
@@ -8725,7 +8776,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
8725
8776
|
|
8726
8777
|
// Copyright (c) Microsoft Corporation.
|
8727
8778
|
// Licensed under the MIT license.
|
8728
|
-
var __awaiter$
|
8779
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8729
8780
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8730
8781
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8731
8782
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8748,35 +8799,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
8748
8799
|
let messageIterator = undefined;
|
8749
8800
|
let readReceiptIterator = undefined;
|
8750
8801
|
return {
|
8751
|
-
onSendMessage: (content, options) => __awaiter$
|
8802
|
+
onSendMessage: (content, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
8752
8803
|
const sendMessageRequest = {
|
8753
8804
|
content,
|
8754
8805
|
senderDisplayName: chatClient.getState().displayName
|
8755
8806
|
};
|
8756
8807
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
8757
8808
|
}),
|
8758
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
8809
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$q(void 0, void 0, void 0, function* () {
|
8759
8810
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
8760
8811
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
8761
8812
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
8762
8813
|
}),
|
8763
|
-
onDeleteMessage: (messageId) => __awaiter$
|
8814
|
+
onDeleteMessage: (messageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
8764
8815
|
yield chatThreadClient.deleteMessage(messageId);
|
8765
8816
|
}),
|
8766
8817
|
// This handler is designed for chatThread to consume
|
8767
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
8818
|
+
onMessageSeen: (chatMessageId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
8768
8819
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
8769
8820
|
}),
|
8770
|
-
onTyping: () => __awaiter$
|
8821
|
+
onTyping: () => __awaiter$q(void 0, void 0, void 0, function* () {
|
8771
8822
|
yield chatThreadClient.sendTypingNotification();
|
8772
8823
|
}),
|
8773
|
-
onRemoveParticipant: (userId) => __awaiter$
|
8824
|
+
onRemoveParticipant: (userId) => __awaiter$q(void 0, void 0, void 0, function* () {
|
8774
8825
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
8775
8826
|
}),
|
8776
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
8827
|
+
updateThreadTopicName: (topicName) => __awaiter$q(void 0, void 0, void 0, function* () {
|
8777
8828
|
yield chatThreadClient.updateTopic(topicName);
|
8778
8829
|
}),
|
8779
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
8830
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$q(void 0, void 0, void 0, function* () {
|
8780
8831
|
var _a, _b, _c;
|
8781
8832
|
if (messageIterator === undefined) {
|
8782
8833
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -9478,7 +9529,7 @@ const findSelector = (component) => {
|
|
9478
9529
|
|
9479
9530
|
// Copyright (c) Microsoft Corporation.
|
9480
9531
|
// Licensed under the MIT license.
|
9481
|
-
var __awaiter$
|
9532
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9482
9533
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9483
9534
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9484
9535
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9527,10 +9578,10 @@ class ProxyDeviceManager {
|
|
9527
9578
|
this.selectCamera = (videoDeviceInfo) => {
|
9528
9579
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
9529
9580
|
};
|
9530
|
-
this.videoDevicesUpdated = () => __awaiter$
|
9581
|
+
this.videoDevicesUpdated = () => __awaiter$p(this, void 0, void 0, function* () {
|
9531
9582
|
this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
|
9532
9583
|
});
|
9533
|
-
this.audioDevicesUpdated = () => __awaiter$
|
9584
|
+
this.audioDevicesUpdated = () => __awaiter$p(this, void 0, void 0, function* () {
|
9534
9585
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
9535
9586
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
9536
9587
|
});
|
@@ -9733,7 +9784,7 @@ class CallIdHistory {
|
|
9733
9784
|
|
9734
9785
|
// Copyright (c) Microsoft Corporation.
|
9735
9786
|
// Licensed under the MIT license.
|
9736
|
-
var __awaiter$
|
9787
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9737
9788
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9738
9789
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9739
9790
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10218,7 +10269,7 @@ class CallContext$1 {
|
|
10218
10269
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
10219
10270
|
*/
|
10220
10271
|
withAsyncErrorTeedToState(action, target) {
|
10221
|
-
return (...args) => __awaiter$
|
10272
|
+
return (...args) => __awaiter$o(this, void 0, void 0, function* () {
|
10222
10273
|
try {
|
10223
10274
|
return yield action(...args);
|
10224
10275
|
}
|
@@ -10282,7 +10333,7 @@ const findOldestCallEnded = (calls) => {
|
|
10282
10333
|
|
10283
10334
|
// Copyright (c) Microsoft Corporation.
|
10284
10335
|
// Licensed under the MIT license.
|
10285
|
-
var __awaiter$
|
10336
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10286
10337
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10287
10338
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10288
10339
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10302,63 +10353,63 @@ class ProxyCall {
|
|
10302
10353
|
switch (prop) {
|
10303
10354
|
case 'mute': {
|
10304
10355
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10305
|
-
return __awaiter$
|
10356
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10306
10357
|
return yield target.mute(...args);
|
10307
10358
|
});
|
10308
10359
|
}, 'Call.mute');
|
10309
10360
|
}
|
10310
10361
|
case 'unmute': {
|
10311
10362
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10312
|
-
return __awaiter$
|
10363
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10313
10364
|
return yield target.unmute(...args);
|
10314
10365
|
});
|
10315
10366
|
}, 'Call.unmute');
|
10316
10367
|
}
|
10317
10368
|
case 'startVideo': {
|
10318
10369
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10319
|
-
return __awaiter$
|
10370
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10320
10371
|
return yield target.startVideo(...args);
|
10321
10372
|
});
|
10322
10373
|
}, 'Call.startVideo');
|
10323
10374
|
}
|
10324
10375
|
case 'stopVideo': {
|
10325
10376
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10326
|
-
return __awaiter$
|
10377
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10327
10378
|
return yield target.stopVideo(...args);
|
10328
10379
|
});
|
10329
10380
|
}, 'Call.stopVideo');
|
10330
10381
|
}
|
10331
10382
|
case 'startScreenSharing': {
|
10332
10383
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10333
|
-
return __awaiter$
|
10384
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10334
10385
|
return yield target.startScreenSharing(...args);
|
10335
10386
|
});
|
10336
10387
|
}, 'Call.startScreenSharing');
|
10337
10388
|
}
|
10338
10389
|
case 'stopScreenSharing': {
|
10339
10390
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10340
|
-
return __awaiter$
|
10391
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10341
10392
|
return yield target.stopScreenSharing(...args);
|
10342
10393
|
});
|
10343
10394
|
}, 'Call.stopScreenSharing');
|
10344
10395
|
}
|
10345
10396
|
case 'hold': {
|
10346
10397
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10347
|
-
return __awaiter$
|
10398
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10348
10399
|
return yield target.hold(...args);
|
10349
10400
|
});
|
10350
10401
|
}, 'Call.hold');
|
10351
10402
|
}
|
10352
10403
|
case 'resume': {
|
10353
10404
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10354
|
-
return __awaiter$
|
10405
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10355
10406
|
return yield target.resume(...args);
|
10356
10407
|
});
|
10357
10408
|
}, 'Call.resume');
|
10358
10409
|
}
|
10359
10410
|
case 'addParticipant': {
|
10360
10411
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10361
|
-
return __awaiter$
|
10412
|
+
return __awaiter$n(this, void 0, void 0, function* () {
|
10362
10413
|
return yield target.addParticipant(...args);
|
10363
10414
|
});
|
10364
10415
|
}, 'Call.addParticipant');
|
@@ -10566,7 +10617,7 @@ class RemoteVideoStreamSubscriber {
|
|
10566
10617
|
|
10567
10618
|
// Copyright (c) Microsoft Corporation.
|
10568
10619
|
// Licensed under the MIT license.
|
10569
|
-
var __awaiter$
|
10620
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10570
10621
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10571
10622
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10572
10623
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10576,7 +10627,7 @@ var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
10576
10627
|
});
|
10577
10628
|
};
|
10578
10629
|
function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
|
10579
|
-
return __awaiter$
|
10630
|
+
return __awaiter$m(this, void 0, void 0, function* () {
|
10580
10631
|
// Render RemoteVideoStream that is part of a Call
|
10581
10632
|
const streamId = stream.id;
|
10582
10633
|
let participantKey;
|
@@ -10684,7 +10735,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
10684
10735
|
});
|
10685
10736
|
}
|
10686
10737
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
10687
|
-
return __awaiter$
|
10738
|
+
return __awaiter$m(this, void 0, void 0, function* () {
|
10688
10739
|
_logEvent(callingStatefulLogger, {
|
10689
10740
|
name: EventNames.START_LOCAL_STREAM_RENDERING,
|
10690
10741
|
level: 'info',
|
@@ -10800,7 +10851,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
10800
10851
|
});
|
10801
10852
|
}
|
10802
10853
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
10803
|
-
return __awaiter$
|
10854
|
+
return __awaiter$m(this, void 0, void 0, function* () {
|
10804
10855
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
10805
10856
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
10806
10857
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -11428,7 +11479,7 @@ class CallSubscriber {
|
|
11428
11479
|
|
11429
11480
|
// Copyright (c) Microsoft Corporation.
|
11430
11481
|
// Licensed under the MIT license.
|
11431
|
-
var __awaiter$
|
11482
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11432
11483
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11433
11484
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11434
11485
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11448,14 +11499,14 @@ class ProxyIncomingCall {
|
|
11448
11499
|
switch (prop) {
|
11449
11500
|
case 'accept': {
|
11450
11501
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
11451
|
-
return __awaiter$
|
11502
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
11452
11503
|
return yield target.accept(...args);
|
11453
11504
|
});
|
11454
11505
|
}, 'IncomingCall.accept');
|
11455
11506
|
}
|
11456
11507
|
case 'reject': {
|
11457
11508
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
11458
|
-
return __awaiter$
|
11509
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
11459
11510
|
return yield target.reject(...args);
|
11460
11511
|
});
|
11461
11512
|
}, 'IncomingCall.reject');
|
@@ -11503,6 +11554,16 @@ class IncomingCallSubscriber {
|
|
11503
11554
|
}
|
11504
11555
|
|
11505
11556
|
// Copyright (c) Microsoft Corporation.
|
11557
|
+
// Licensed under the MIT license.
|
11558
|
+
(window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11559
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11560
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
11561
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
11562
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
11563
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
11564
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
11565
|
+
});
|
11566
|
+
};
|
11506
11567
|
/**
|
11507
11568
|
* ProxyCallAgent proxies CallAgent and saves any returned state in the given context. It will subscribe to all state
|
11508
11569
|
* updates in the CallAgent and in the contained Calls and RemoteParticipants. When dispose is called it will
|
@@ -11656,10 +11717,10 @@ class ProxyCallAgent {
|
|
11656
11717
|
};
|
11657
11718
|
}
|
11658
11719
|
case 'dispose': {
|
11720
|
+
/* @conditional-compile-remove(calling-beta-sdk) */
|
11659
11721
|
return () => {
|
11660
|
-
|
11661
|
-
|
11662
|
-
});
|
11722
|
+
target.dispose();
|
11723
|
+
this.unsubscribe();
|
11663
11724
|
};
|
11664
11725
|
}
|
11665
11726
|
/**
|
@@ -11793,7 +11854,7 @@ class InternalCallContext {
|
|
11793
11854
|
|
11794
11855
|
// Copyright (c) Microsoft Corporation.
|
11795
11856
|
// Licensed under the MIT license.
|
11796
|
-
var __awaiter$
|
11857
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11797
11858
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11798
11859
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11799
11860
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11815,7 +11876,7 @@ class ProxyCallClient {
|
|
11815
11876
|
get(target, prop) {
|
11816
11877
|
switch (prop) {
|
11817
11878
|
case 'createCallAgent': {
|
11818
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
11879
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$k(this, void 0, void 0, function* () {
|
11819
11880
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
11820
11881
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
11821
11882
|
// callAgent if the createCallAgent succeeds.
|
@@ -11828,7 +11889,7 @@ class ProxyCallClient {
|
|
11828
11889
|
}), 'CallClient.createCallAgent');
|
11829
11890
|
}
|
11830
11891
|
case 'getDeviceManager': {
|
11831
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
11892
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$k(this, void 0, void 0, function* () {
|
11832
11893
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
11833
11894
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
11834
11895
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -11951,7 +12012,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
11951
12012
|
|
11952
12013
|
// Copyright (c) Microsoft Corporation.
|
11953
12014
|
// Licensed under the MIT license.
|
11954
|
-
var __awaiter$
|
12015
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11955
12016
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11956
12017
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11957
12018
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12226,7 +12287,7 @@ class ChatContext$1 {
|
|
12226
12287
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
12227
12288
|
*/
|
12228
12289
|
withAsyncErrorTeedToState(f, target) {
|
12229
|
-
return (...args) => __awaiter$
|
12290
|
+
return (...args) => __awaiter$j(this, void 0, void 0, function* () {
|
12230
12291
|
try {
|
12231
12292
|
return yield f(...args);
|
12232
12293
|
}
|
@@ -12333,7 +12394,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
12333
12394
|
|
12334
12395
|
// Copyright (c) Microsoft Corporation.
|
12335
12396
|
// Licensed under the MIT license.
|
12336
|
-
var __awaiter$
|
12397
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12337
12398
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12338
12399
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12339
12400
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12417,7 +12478,7 @@ class EventSubscriber {
|
|
12417
12478
|
this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
|
12418
12479
|
};
|
12419
12480
|
// This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
|
12420
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
12481
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$i(this, void 0, void 0, function* () {
|
12421
12482
|
var e_1, _a;
|
12422
12483
|
try {
|
12423
12484
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -12503,7 +12564,7 @@ class EventSubscriber {
|
|
12503
12564
|
|
12504
12565
|
// Copyright (c) Microsoft Corporation.
|
12505
12566
|
// Licensed under the MIT license.
|
12506
|
-
var __awaiter$
|
12567
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12507
12568
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12508
12569
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12509
12570
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12525,7 +12586,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
12525
12586
|
const threadsIterator = iteratorCreator(...args);
|
12526
12587
|
return {
|
12527
12588
|
next() {
|
12528
|
-
return __awaiter$
|
12589
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
12529
12590
|
const result = yield threadsIterator.next();
|
12530
12591
|
if (!result.done && result.value) {
|
12531
12592
|
decorateFn(result.value, context);
|
@@ -12540,7 +12601,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
12540
12601
|
const pages = threadsIterator.byPage(settings);
|
12541
12602
|
return {
|
12542
12603
|
next() {
|
12543
|
-
return __awaiter$
|
12604
|
+
return __awaiter$h(this, void 0, void 0, function* () {
|
12544
12605
|
const result = yield pages.next();
|
12545
12606
|
const page = result.value;
|
12546
12607
|
if (!result.done && result.value) {
|
@@ -12624,7 +12685,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
12624
12685
|
|
12625
12686
|
// Copyright (c) Microsoft Corporation.
|
12626
12687
|
// Licensed under the MIT license.
|
12627
|
-
var __awaiter$
|
12688
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12628
12689
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12629
12690
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12630
12691
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12643,14 +12704,14 @@ class ProxyChatThreadClient {
|
|
12643
12704
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
12644
12705
|
}
|
12645
12706
|
case 'getMessage': {
|
12646
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12707
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12647
12708
|
const message = yield chatThreadClient.getMessage(...args);
|
12648
12709
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
12649
12710
|
return message;
|
12650
12711
|
}), 'ChatThreadClient.getMessage');
|
12651
12712
|
}
|
12652
12713
|
case 'sendMessage': {
|
12653
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12714
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12654
12715
|
// Retry logic?
|
12655
12716
|
const [request, options] = args;
|
12656
12717
|
const { content } = request;
|
@@ -12690,7 +12751,7 @@ class ProxyChatThreadClient {
|
|
12690
12751
|
}), 'ChatThreadClient.sendMessage');
|
12691
12752
|
}
|
12692
12753
|
case 'addParticipants': {
|
12693
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12754
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12694
12755
|
const result = yield chatThreadClient.addParticipants(...args);
|
12695
12756
|
const [addRequest] = args;
|
12696
12757
|
const participantsToAdd = addRequest.participants;
|
@@ -12699,7 +12760,7 @@ class ProxyChatThreadClient {
|
|
12699
12760
|
}), 'ChatThreadClient.addParticipants');
|
12700
12761
|
}
|
12701
12762
|
case 'deleteMessage': {
|
12702
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12763
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12703
12764
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
12704
12765
|
const [messageId] = args;
|
12705
12766
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -12717,7 +12778,7 @@ class ProxyChatThreadClient {
|
|
12717
12778
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
12718
12779
|
}
|
12719
12780
|
case 'removeParticipant': {
|
12720
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12781
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12721
12782
|
const result = yield chatThreadClient.removeParticipant(...args);
|
12722
12783
|
const [removeIdentifier] = args;
|
12723
12784
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -12725,7 +12786,7 @@ class ProxyChatThreadClient {
|
|
12725
12786
|
}), 'ChatThreadClient.removeParticipant');
|
12726
12787
|
}
|
12727
12788
|
case 'updateMessage': {
|
12728
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12789
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12729
12790
|
const result = yield chatThreadClient.updateMessage(...args);
|
12730
12791
|
const [messageId, updateOption] = args;
|
12731
12792
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -12733,7 +12794,7 @@ class ProxyChatThreadClient {
|
|
12733
12794
|
}), 'ChatThreadClient.updateMessage');
|
12734
12795
|
}
|
12735
12796
|
case 'updateTopic': {
|
12736
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12797
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12737
12798
|
const result = yield chatThreadClient.updateTopic(...args);
|
12738
12799
|
const [topic] = args;
|
12739
12800
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -12741,7 +12802,7 @@ class ProxyChatThreadClient {
|
|
12741
12802
|
}), 'ChatThreadClient.updateTopic');
|
12742
12803
|
}
|
12743
12804
|
case 'getProperties': {
|
12744
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12805
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$g(this, void 0, void 0, function* () {
|
12745
12806
|
const result = yield chatThreadClient.getProperties(...args);
|
12746
12807
|
this._context.updateThread(chatThreadClient.threadId, result);
|
12747
12808
|
return result;
|
@@ -12778,7 +12839,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
12778
12839
|
|
12779
12840
|
// Copyright (c) Microsoft Corporation.
|
12780
12841
|
// Licensed under the MIT license.
|
12781
|
-
var __awaiter$
|
12842
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12782
12843
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12783
12844
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12784
12845
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12797,7 +12858,7 @@ const proxyChatClient = {
|
|
12797
12858
|
switch (prop) {
|
12798
12859
|
case 'createChatThread': {
|
12799
12860
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12800
|
-
return __awaiter$
|
12861
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
12801
12862
|
const result = yield chatClient.createChatThread(...args);
|
12802
12863
|
const thread = result.chatThread;
|
12803
12864
|
if (thread) {
|
@@ -12810,7 +12871,7 @@ const proxyChatClient = {
|
|
12810
12871
|
}
|
12811
12872
|
case 'deleteChatThread': {
|
12812
12873
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12813
|
-
return __awaiter$
|
12874
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
12814
12875
|
const result = yield chatClient.deleteChatThread(...args);
|
12815
12876
|
context.deleteThread(args[0]);
|
12816
12877
|
return result;
|
@@ -12830,7 +12891,7 @@ const proxyChatClient = {
|
|
12830
12891
|
}
|
12831
12892
|
case 'startRealtimeNotifications': {
|
12832
12893
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12833
|
-
return __awaiter$
|
12894
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
12834
12895
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
12835
12896
|
if (!receiver.eventSubscriber) {
|
12836
12897
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -12841,7 +12902,7 @@ const proxyChatClient = {
|
|
12841
12902
|
}
|
12842
12903
|
case 'stopRealtimeNotifications': {
|
12843
12904
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12844
|
-
return __awaiter$
|
12905
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
12845
12906
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
12846
12907
|
if (receiver.eventSubscriber) {
|
12847
12908
|
receiver.eventSubscriber.unsubscribe();
|
@@ -13030,7 +13091,7 @@ const CallCompositeIcon = (props) => (React__default['default'].createElement(re
|
|
13030
13091
|
*/
|
13031
13092
|
const CallWithChatCompositeIcon = (props) => (React__default['default'].createElement(react.FontIcon, Object.assign({}, props)));
|
13032
13093
|
|
13033
|
-
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",copyInviteLinkActionedAriaLabel:"Invite link copied",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",deniedPermissionToRoomDetails:"You do not have permission to join this room.",deniedPermissionToRoomTitle:"Permission denied to room",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",roomNotFoundDetails:"Room ID provided is not valid.",roomNotFoundTitle:"Room not found",soundLabel:"Sound",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",moreButtonCallingLabel:"More",resumeCallButtonLabel:"Resume",resumingCallButtonLabel:"Resuming...",resumeCallButtonAriaLabel:"Resume call",resumingCallButtonAriaLabel:"Resume call",holdScreenLabel:"You're on hold",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceHolderText:"Enter number"};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",copyInviteLinkActionedAriaLabel:"Invite link copied",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",openDialpadButtonLabel:"Dial phone number",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceHolderText:"Enter number"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
|
13094
|
+
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",copyInviteLinkActionedAriaLabel:"Invite link copied",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",deniedPermissionToRoomDetails:"You do not have permission to join this room.",deniedPermissionToRoomTitle:"Permission denied to room",peopleButtonLabel:"People",peoplePaneTitle:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",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",roomNotFoundDetails:"Room ID provided is not valid.",roomNotFoundTitle:"Room not found",soundLabel:"Sound",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",moreButtonCallingLabel:"More",resumeCallButtonLabel:"Resume",resumingCallButtonLabel:"Resuming...",resumeCallButtonAriaLabel:"Resume call",resumingCallButtonAriaLabel:"Resume call",holdScreenLabel:"You're on hold",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceHolderText:"Enter number"};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",copyInviteLinkActionedAriaLabel:"Invite link copied",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",openDialpadButtonLabel:"Dial phone number",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close dialpad",openDtmfDialpadLabel:"Show dialpad",dtmfDialpadPlaceHolderText:"Enter number"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
|
13034
13095
|
|
13035
13096
|
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};
|
13036
13097
|
|
@@ -13432,7 +13493,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
13432
13493
|
|
13433
13494
|
// Copyright (c) Microsoft Corporation.
|
13434
13495
|
// Licensed under the MIT license.
|
13435
|
-
var __awaiter$
|
13496
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13436
13497
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13437
13498
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13438
13499
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13558,9 +13619,9 @@ class AzureCommunicationChatAdapter {
|
|
13558
13619
|
this.unsubscribeAllEvents();
|
13559
13620
|
}
|
13560
13621
|
fetchInitialData() {
|
13561
|
-
return __awaiter$
|
13622
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13562
13623
|
// If get properties fails we dont want to try to get the participants after.
|
13563
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13624
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13564
13625
|
var e_1, _a;
|
13565
13626
|
yield this.chatThreadClient.getProperties();
|
13566
13627
|
try {
|
@@ -13594,8 +13655,8 @@ class AzureCommunicationChatAdapter {
|
|
13594
13655
|
this.context.offStateChange(handler);
|
13595
13656
|
}
|
13596
13657
|
sendMessage(content, options = {}) {
|
13597
|
-
return __awaiter$
|
13598
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13658
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13659
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13599
13660
|
/* @conditional-compile-remove(file-sharing) */
|
13600
13661
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
13601
13662
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -13612,49 +13673,49 @@ class AzureCommunicationChatAdapter {
|
|
13612
13673
|
});
|
13613
13674
|
}
|
13614
13675
|
sendReadReceipt(chatMessageId) {
|
13615
|
-
return __awaiter$
|
13616
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13676
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13677
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13617
13678
|
yield this.handlers.onMessageSeen(chatMessageId);
|
13618
13679
|
}));
|
13619
13680
|
});
|
13620
13681
|
}
|
13621
13682
|
sendTypingIndicator() {
|
13622
|
-
return __awaiter$
|
13683
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13623
13684
|
yield this.handlers.onTyping();
|
13624
13685
|
});
|
13625
13686
|
}
|
13626
13687
|
removeParticipant(userId) {
|
13627
|
-
return __awaiter$
|
13628
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13688
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13689
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13629
13690
|
yield this.handlers.onRemoveParticipant(userId);
|
13630
13691
|
}));
|
13631
13692
|
});
|
13632
13693
|
}
|
13633
13694
|
setTopic(topicName) {
|
13634
|
-
return __awaiter$
|
13635
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13695
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13696
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13636
13697
|
yield this.handlers.updateThreadTopicName(topicName);
|
13637
13698
|
}));
|
13638
13699
|
});
|
13639
13700
|
}
|
13640
13701
|
loadPreviousChatMessages(messagesToLoad) {
|
13641
|
-
return __awaiter$
|
13642
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13702
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13703
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13643
13704
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
13644
13705
|
}));
|
13645
13706
|
});
|
13646
13707
|
}
|
13647
13708
|
updateMessage(messageId, content, metadata, options) {
|
13648
|
-
return __awaiter$
|
13649
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13709
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13710
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13650
13711
|
/* @conditional-compile-remove(file-sharing) */
|
13651
13712
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
13652
13713
|
}));
|
13653
13714
|
});
|
13654
13715
|
}
|
13655
13716
|
deleteMessage(messageId) {
|
13656
|
-
return __awaiter$
|
13657
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13717
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13718
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$e(this, void 0, void 0, function* () {
|
13658
13719
|
return yield this.handlers.onDeleteMessage(messageId);
|
13659
13720
|
}));
|
13660
13721
|
});
|
@@ -13735,7 +13796,7 @@ class AzureCommunicationChatAdapter {
|
|
13735
13796
|
this.emitter.off(event, listener);
|
13736
13797
|
}
|
13737
13798
|
asyncTeeErrorToEventEmitter(f) {
|
13738
|
-
return __awaiter$
|
13799
|
+
return __awaiter$e(this, void 0, void 0, function* () {
|
13739
13800
|
try {
|
13740
13801
|
return yield f();
|
13741
13802
|
}
|
@@ -13777,7 +13838,7 @@ const convertEventType = (type) => {
|
|
13777
13838
|
*
|
13778
13839
|
* @public
|
13779
13840
|
*/
|
13780
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
13841
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$e(void 0, void 0, void 0, function* () {
|
13781
13842
|
const chatClient = createStatefulChatClient({
|
13782
13843
|
userId,
|
13783
13844
|
displayName,
|
@@ -13840,7 +13901,7 @@ beforeDispose) => {
|
|
13840
13901
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
13841
13902
|
return;
|
13842
13903
|
}
|
13843
|
-
(() => __awaiter$
|
13904
|
+
(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
13844
13905
|
if (adapterRef.current) {
|
13845
13906
|
// Dispose the old adapter when a new one is created.
|
13846
13907
|
//
|
@@ -13872,7 +13933,7 @@ beforeDispose) => {
|
|
13872
13933
|
// Dispose any existing adapter when the component unmounts.
|
13873
13934
|
React.useEffect(() => {
|
13874
13935
|
return () => {
|
13875
|
-
(() => __awaiter$
|
13936
|
+
(() => __awaiter$e(void 0, void 0, void 0, function* () {
|
13876
13937
|
if (adapterRef.current) {
|
13877
13938
|
if (beforeDisposeRef.current) {
|
13878
13939
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -13893,7 +13954,7 @@ beforeDispose) => {
|
|
13893
13954
|
*
|
13894
13955
|
* @public
|
13895
13956
|
*/
|
13896
|
-
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$
|
13957
|
+
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$e(void 0, void 0, void 0, function* () {
|
13897
13958
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
13898
13959
|
});
|
13899
13960
|
const isChatError = (e) => {
|
@@ -14095,7 +14156,7 @@ const sendboxContainerStyles = {
|
|
14095
14156
|
|
14096
14157
|
// Copyright (c) Microsoft Corporation.
|
14097
14158
|
// Licensed under the MIT license.
|
14098
|
-
var __awaiter$
|
14159
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14099
14160
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14100
14161
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14101
14162
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14116,7 +14177,7 @@ const AvatarPersona = (props) => {
|
|
14116
14177
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
14117
14178
|
const [data, setData] = React.useState();
|
14118
14179
|
React.useEffect(() => {
|
14119
|
-
(() => __awaiter$
|
14180
|
+
(() => __awaiter$d(void 0, void 0, void 0, function* () {
|
14120
14181
|
if (dataProvider && userId) {
|
14121
14182
|
const newData = yield dataProvider(userId);
|
14122
14183
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -14903,7 +14964,7 @@ const isDisabled$2 = (option) => {
|
|
14903
14964
|
|
14904
14965
|
// Copyright (c) Microsoft Corporation.
|
14905
14966
|
// Licensed under the MIT license.
|
14906
|
-
var __awaiter$
|
14967
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14907
14968
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14908
14969
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14909
14970
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14922,72 +14983,72 @@ _component) => {
|
|
14922
14983
|
return createCompositeHandlers(useAdapter());
|
14923
14984
|
};
|
14924
14985
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
14925
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
14986
|
+
onCreateLocalStreamView: (options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14926
14987
|
return yield adapter.createStreamView(undefined, options);
|
14927
14988
|
}),
|
14928
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
14989
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14929
14990
|
return yield adapter.createStreamView(userId, options);
|
14930
14991
|
}),
|
14931
|
-
onHangUp: () => __awaiter$
|
14992
|
+
onHangUp: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14932
14993
|
yield adapter.leaveCall();
|
14933
14994
|
}),
|
14934
14995
|
/* @conditional-compile-remove(PSTN-calls) */
|
14935
|
-
onToggleHold: () => __awaiter$
|
14996
|
+
onToggleHold: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14936
14997
|
var _a;
|
14937
14998
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
14938
14999
|
}),
|
14939
15000
|
/* @conditional-compile-remove(PSTN-calls) */
|
14940
|
-
onAddParticipant: (participant, options) => __awaiter$
|
15001
|
+
onAddParticipant: (participant, options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14941
15002
|
return yield adapter.addParticipant(participant, options);
|
14942
15003
|
}),
|
14943
15004
|
/* @conditional-compile-remove(PSTN-calls) */
|
14944
|
-
onSendDtmfTone: (dtmfTone) => __awaiter$
|
15005
|
+
onSendDtmfTone: (dtmfTone) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14945
15006
|
yield adapter.sendDtmfTone(dtmfTone);
|
14946
15007
|
}),
|
14947
|
-
onRemoveParticipant: (userId) => __awaiter$
|
15008
|
+
onRemoveParticipant: (userId) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14948
15009
|
yield adapter.removeParticipant(userId);
|
14949
15010
|
}),
|
14950
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
15011
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14951
15012
|
yield adapter.setCamera(deviceInfo, options);
|
14952
15013
|
}),
|
14953
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
15014
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14954
15015
|
yield adapter.setMicrophone(deviceInfo);
|
14955
15016
|
}),
|
14956
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
15017
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14957
15018
|
yield adapter.setSpeaker(deviceInfo);
|
14958
15019
|
}),
|
14959
15020
|
onStartCall: (participants, options) => {
|
14960
15021
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
14961
15022
|
return adapter.startCall(rawIds, options);
|
14962
15023
|
},
|
14963
|
-
onStartScreenShare: () => __awaiter$
|
15024
|
+
onStartScreenShare: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14964
15025
|
yield adapter.startScreenShare();
|
14965
15026
|
}),
|
14966
|
-
onStopScreenShare: () => __awaiter$
|
15027
|
+
onStopScreenShare: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14967
15028
|
yield adapter.stopScreenShare();
|
14968
15029
|
}),
|
14969
|
-
onToggleCamera: (options) => __awaiter$
|
15030
|
+
onToggleCamera: (options) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14970
15031
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
14971
15032
|
}),
|
14972
|
-
onToggleMicrophone: () => __awaiter$
|
15033
|
+
onToggleMicrophone: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14973
15034
|
var _b;
|
14974
15035
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
14975
15036
|
}),
|
14976
|
-
onToggleScreenShare: () => __awaiter$
|
15037
|
+
onToggleScreenShare: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14977
15038
|
var _c;
|
14978
15039
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
|
14979
15040
|
? yield adapter.stopScreenShare()
|
14980
15041
|
: yield adapter.startScreenShare();
|
14981
15042
|
}),
|
14982
|
-
onStartLocalVideo: () => __awaiter$
|
15043
|
+
onStartLocalVideo: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14983
15044
|
if (adapter.getState().call) {
|
14984
15045
|
return adapter.startCamera();
|
14985
15046
|
}
|
14986
15047
|
}),
|
14987
|
-
onDisposeLocalStreamView: () => __awaiter$
|
15048
|
+
onDisposeLocalStreamView: () => __awaiter$c(void 0, void 0, void 0, function* () {
|
14988
15049
|
return adapter.disposeStreamView();
|
14989
15050
|
}),
|
14990
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
15051
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$c(void 0, void 0, void 0, function* () {
|
14991
15052
|
return adapter.disposeStreamView(userId);
|
14992
15053
|
})
|
14993
15054
|
}));
|
@@ -15151,13 +15212,21 @@ const Devices = (props) => {
|
|
15151
15212
|
const permissions = _usePermissions();
|
15152
15213
|
/* @conditional-compile-remove(rooms) */
|
15153
15214
|
const locale = useLocale();
|
15215
|
+
/* @conditional-compile-remove(rooms) */
|
15216
|
+
const onlyManageSpeakers = !permissions.microphoneButton && !permissions.cameraButton;
|
15217
|
+
/* @conditional-compile-remove(rooms) */
|
15218
|
+
const onRenderDevicesIcon = () => {
|
15219
|
+
return React__default['default'].createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "OptionsSpeaker" });
|
15220
|
+
};
|
15154
15221
|
return (React__default['default'].createElement(DevicesButton
|
15155
15222
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
15156
15223
|
, Object.assign({
|
15157
15224
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
15158
15225
|
persistMenu: true }, devicesButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
|
15159
15226
|
/* @conditional-compile-remove(rooms) */
|
15160
|
-
strings: getLabelFromPermissions(permissions, locale)
|
15227
|
+
strings: getLabelFromPermissions(permissions, locale),
|
15228
|
+
/* @conditional-compile-remove(rooms) */
|
15229
|
+
onRenderIcon: onlyManageSpeakers ? onRenderDevicesIcon : undefined })));
|
15161
15230
|
};
|
15162
15231
|
/* @conditional-compile-remove(rooms) */
|
15163
15232
|
const getLabelFromPermissions = (permissions, locale) => {
|
@@ -15461,9 +15530,9 @@ const CallControls = (props) => {
|
|
15461
15530
|
const localeStrings = useLocale();
|
15462
15531
|
/* @conditional-compile-remove(one-to-n-calling) */
|
15463
15532
|
const peopleButtonStrings = React.useMemo(() => ({
|
15464
|
-
label: localeStrings.strings.
|
15465
|
-
tooltipOffContent: localeStrings.strings.
|
15466
|
-
tooltipOnContent: localeStrings.strings.
|
15533
|
+
label: localeStrings.strings.call.peopleButtonLabel,
|
15534
|
+
tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,
|
15535
|
+
tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose
|
15467
15536
|
}), [localeStrings]);
|
15468
15537
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
15469
15538
|
const moreButtonStrings = React.useMemo(() => ({
|
@@ -15500,19 +15569,21 @@ const CallControls = (props) => {
|
|
15500
15569
|
['data-ui-id']: 'call-composite-more-menu-people-button'
|
15501
15570
|
});
|
15502
15571
|
}
|
15503
|
-
|
15504
|
-
|
15505
|
-
|
15506
|
-
|
15507
|
-
|
15508
|
-
|
15509
|
-
|
15510
|
-
|
15511
|
-
|
15512
|
-
|
15513
|
-
|
15514
|
-
|
15515
|
-
|
15572
|
+
if (!isRoomsCallTrampoline()) {
|
15573
|
+
items.push({
|
15574
|
+
key: 'holdButtonKey',
|
15575
|
+
text: localeStrings.component.strings.holdButton.tooltipOffContent,
|
15576
|
+
onClick: () => {
|
15577
|
+
holdButtonProps.onToggleHold();
|
15578
|
+
},
|
15579
|
+
iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },
|
15580
|
+
itemProps: {
|
15581
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
15582
|
+
},
|
15583
|
+
disabled: isDisabled$2(options === null || options === void 0 ? void 0 : options.holdButton),
|
15584
|
+
['data-ui-id']: 'hold-button'
|
15585
|
+
});
|
15586
|
+
}
|
15516
15587
|
/* @conditional-compile-remove(PSTN-calls) */
|
15517
15588
|
// dtmf tone sending only works for 1:1 PSTN call
|
15518
15589
|
if (alternateCallerId) {
|
@@ -15569,11 +15640,18 @@ const CallControls = (props) => {
|
|
15569
15640
|
React__default['default'].createElement(People, { checked: props.peopleButtonChecked, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled$2(options === null || options === void 0 ? void 0 : options.participantsButton) })),
|
15570
15641
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.devicesButton) && (React__default['default'].createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled$2(options === null || options === void 0 ? void 0 : options.devicesButton) })),
|
15571
15642
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
15572
|
-
isEnabled$2(options === null || options === void 0 ? void 0 : options.moreButton) && (React__default['default'].createElement(MoreButton, { strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: !props.isMobile })),
|
15643
|
+
isEnabled$2(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonContextualMenuItems().length > 0 && (React__default['default'].createElement(MoreButton, { strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: !props.isMobile })),
|
15573
15644
|
customButtons['primary'],
|
15574
15645
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.endCallButton) && React__default['default'].createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
|
15575
15646
|
};
|
15576
15647
|
const isEnabled$2 = (option) => option !== false;
|
15648
|
+
/** @private */
|
15649
|
+
const isRoomsCallTrampoline = () => {
|
15650
|
+
/* @conditional-compile-remove(rooms) */
|
15651
|
+
const rolePermissions = _usePermissions();
|
15652
|
+
/* @conditional-compile-remove(rooms) */
|
15653
|
+
return !!rolePermissions.role;
|
15654
|
+
};
|
15577
15655
|
|
15578
15656
|
// Copyright (c) Microsoft Corporation.
|
15579
15657
|
/**
|
@@ -15938,12 +16016,34 @@ const DRAG_OPTIONS = {
|
|
15938
16016
|
menu: react.ContextualMenu,
|
15939
16017
|
keepInBounds: true
|
15940
16018
|
};
|
15941
|
-
|
16019
|
+
/**
|
16020
|
+
* A wrapping component with a draggable {@link LocalAndRemotePIP} component that is bound to a LayerHost component with id
|
16021
|
+
* specified by `modalLayerHostId` prop
|
16022
|
+
* @private
|
16023
|
+
*/
|
16024
|
+
const ModalLocalAndRemotePIP = (props) => {
|
15942
16025
|
var _a;
|
15943
16026
|
const rootStyles = props.hidden ? hiddenStyle : PIPContainerStyle;
|
16027
|
+
/* @conditional-compile-remove(rooms) */
|
16028
|
+
const rolePermissions = _usePermissions();
|
15944
16029
|
const pictureInPictureProps = useSelector$1(localAndRemotePIPSelector);
|
15945
16030
|
const pictureInPictureHandlers = useHandlers();
|
15946
|
-
const localAndRemotePIP = React.useMemo(() =>
|
16031
|
+
const localAndRemotePIP = React.useMemo(() => {
|
16032
|
+
var _a;
|
16033
|
+
/* @conditional-compile-remove(rooms) */
|
16034
|
+
if (!rolePermissions.cameraButton && ((_a = pictureInPictureProps.dominantRemoteParticipant) === null || _a === void 0 ? void 0 : _a.userId)) {
|
16035
|
+
return React__default['default'].createElement(_RemoteVideoTile, Object.assign({}, pictureInPictureProps.dominantRemoteParticipant));
|
16036
|
+
}
|
16037
|
+
return React__default['default'].createElement(LocalAndRemotePIP, Object.assign({}, pictureInPictureProps, pictureInPictureHandlers));
|
16038
|
+
}, [
|
16039
|
+
pictureInPictureProps,
|
16040
|
+
pictureInPictureHandlers,
|
16041
|
+
/* @conditional-compile-remove(rooms) */ rolePermissions.cameraButton
|
16042
|
+
]);
|
16043
|
+
/* @conditional-compile-remove(rooms) */
|
16044
|
+
if (!rolePermissions.cameraButton && !pictureInPictureProps.dominantRemoteParticipant) {
|
16045
|
+
return null;
|
16046
|
+
}
|
15947
16047
|
const modalStylesThemed = react.concatStyleSets(modalStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.modal);
|
15948
16048
|
return (React__default['default'].createElement(react.Stack, { styles: rootStyles },
|
15949
16049
|
React__default['default'].createElement(_ModalClone, { isOpen: true, isModeless: true, dragOptions: DRAG_OPTIONS, styles: modalStylesThemed, layerProps: { hostId: props.modalLayerHostId }, minDragPosition: props.minDragPosition, maxDragPosition: props.maxDragPosition },
|
@@ -15951,15 +16051,6 @@ const _ModalLocalAndRemotePIP = (props) => {
|
|
15951
16051
|
// possession of the dominant remote participant video stream
|
15952
16052
|
!props.hidden && localAndRemotePIP)));
|
15953
16053
|
};
|
15954
|
-
/**
|
15955
|
-
* A wrapping component with a draggable {@link LocalAndRemotePIP} component that is bound to a LayerHost component with id
|
15956
|
-
* specified by `modalLayerHostId` prop
|
15957
|
-
* @private
|
15958
|
-
*/
|
15959
|
-
const ModalLocalAndRemotePIP = (props) => {
|
15960
|
-
return (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
15961
|
-
React__default['default'].createElement(_ModalLocalAndRemotePIP, Object.assign({}, props), props.children)));
|
15962
|
-
};
|
15963
16054
|
|
15964
16055
|
// Copyright (c) Microsoft Corporation.
|
15965
16056
|
/**
|
@@ -16259,8 +16350,8 @@ const AddPeopleDropdown = (props) => {
|
|
16259
16350
|
if (mobileView) {
|
16260
16351
|
return (React__default['default'].createElement(react.Stack, null,
|
16261
16352
|
React__default['default'].createElement(Announcer, { ariaLive: 'assertive', announcementString: announcerStrings }),
|
16262
|
-
React__default['default'].createElement(react.Stack.Item, { styles: copyLinkButtonContainerStyles },
|
16263
|
-
React__default['default'].createElement(react.PrimaryButton, { onClick: setDrawerMenuItemsForAddPeople, styles: copyLinkButtonStylesThemed, onRenderIcon: () => PeoplePaneAddPersonIconTrampoline(), text: strings.peoplePaneAddPeopleButtonLabel, "data-ui-id": "call-add-people-button" })),
|
16353
|
+
defaultMenuProps.items.length > 0 && (React__default['default'].createElement(react.Stack.Item, { styles: copyLinkButtonContainerStyles },
|
16354
|
+
React__default['default'].createElement(react.PrimaryButton, { onClick: setDrawerMenuItemsForAddPeople, styles: copyLinkButtonStylesThemed, onRenderIcon: () => PeoplePaneAddPersonIconTrampoline(), text: strings.peoplePaneAddPeopleButtonLabel, "data-ui-id": "call-add-people-button" }))),
|
16264
16355
|
addPeopleDrawerMenuItems.length > 0 && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles, "data-ui-id": "call-add-people-dropdown" },
|
16265
16356
|
React__default['default'].createElement(_DrawerMenu, { onLightDismiss: () => setAddPeopleDrawerMenuItems([]), items: addPeopleDrawerMenuItems }))),
|
16266
16357
|
alternateCallerId && (React__default['default'].createElement(CallingDialpad, { isMobile: true, strings: strings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad, onAddParticipant: onAddParticipant, alternateCallerId: alternateCallerId }))));
|
@@ -16268,8 +16359,8 @@ const AddPeopleDropdown = (props) => {
|
|
16268
16359
|
return (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(react.Stack, null,
|
16269
16360
|
React__default['default'].createElement(Announcer, { ariaLive: 'assertive', announcementString: announcerStrings }),
|
16270
16361
|
alternateCallerId && (React__default['default'].createElement(CallingDialpad, { isMobile: false, strings: strings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad, onAddParticipant: onAddParticipant, alternateCallerId: alternateCallerId })),
|
16271
|
-
React__default['default'].createElement(react.Stack, { styles: copyLinkButtonStackStyles },
|
16272
|
-
React__default['default'].createElement(react.DefaultButton, { onRenderIcon: () => PeoplePaneAddPersonIconTrampoline(), text: strings.peoplePaneAddPeopleButtonLabel, menuProps: defaultMenuProps, styles: copyLinkButtonStylesThemed, "data-ui-id": "call-add-people-button" })))));
|
16362
|
+
defaultMenuProps.items.length > 0 && (React__default['default'].createElement(react.Stack, { styles: copyLinkButtonStackStyles },
|
16363
|
+
React__default['default'].createElement(react.DefaultButton, { onRenderIcon: () => PeoplePaneAddPersonIconTrampoline(), text: strings.peoplePaneAddPeopleButtonLabel, menuProps: defaultMenuProps, styles: copyLinkButtonStylesThemed, "data-ui-id": "call-add-people-button" }))))));
|
16273
16364
|
};
|
16274
16365
|
function PeoplePaneOpenDialpadIconNameTrampoline() {
|
16275
16366
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -16299,7 +16390,7 @@ const AddPeopleButton = (props) => {
|
|
16299
16390
|
|
16300
16391
|
// Copyright (c) Microsoft Corporation.
|
16301
16392
|
// Licensed under the MIT license.
|
16302
|
-
var __awaiter$
|
16393
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16303
16394
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16304
16395
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16305
16396
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16335,7 +16426,7 @@ const PeoplePaneContent = (props) => {
|
|
16335
16426
|
setDrawerMenuItems
|
16336
16427
|
]);
|
16337
16428
|
const participantListProps = React.useMemo(() => {
|
16338
|
-
const onRemoveAParticipant = (participantId) => __awaiter$
|
16429
|
+
const onRemoveAParticipant = (participantId) => __awaiter$b(void 0, void 0, void 0, function* () { return onRemoveParticipant(participantId); });
|
16339
16430
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
16340
16431
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
16341
16432
|
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
@@ -16533,7 +16624,7 @@ const useMinMaxDragPosition = (modalLayerHostId, rtl) => {
|
|
16533
16624
|
return { minDragPosition: minDragPosition, maxDragPosition: maxDragPosition };
|
16534
16625
|
};
|
16535
16626
|
|
16536
|
-
var __awaiter$
|
16627
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16537
16628
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16538
16629
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16539
16630
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16563,11 +16654,11 @@ const CallPane = (props) => {
|
|
16563
16654
|
/**
|
16564
16655
|
* In a Call Composite when a participant is removed, we must remove them from the call.
|
16565
16656
|
*/
|
16566
|
-
const removeParticipantFromCall = (participantId) => __awaiter$
|
16657
|
+
const removeParticipantFromCall = (participantId) => __awaiter$a(void 0, void 0, void 0, function* () {
|
16567
16658
|
yield props.callAdapter.removeParticipant(participantId);
|
16568
16659
|
});
|
16569
16660
|
/* @conditional-compile-remove(PSTN-calls) */
|
16570
|
-
const addParticipantToCall = (participant, options) => __awaiter$
|
16661
|
+
const addParticipantToCall = (participant, options) => __awaiter$a(void 0, void 0, void 0, function* () {
|
16571
16662
|
yield props.callAdapter.addParticipant(participant, options);
|
16572
16663
|
});
|
16573
16664
|
const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);
|
@@ -16587,7 +16678,8 @@ const CallPane = (props) => {
|
|
16587
16678
|
onAddParticipant: addParticipantToCall, setDrawerMenuItems: setDrawerMenuItems, strings: strings,
|
16588
16679
|
/* @conditional-compile-remove(PSTN-calls) */
|
16589
16680
|
alternateCallerId: alternateCallerId }))))))),
|
16590
|
-
props.mobileView && (React__default['default'].createElement(
|
16681
|
+
props.mobileView && (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
16682
|
+
React__default['default'].createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: !props.activePane, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition }))),
|
16591
16683
|
drawerMenuItems.length > 0 && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles },
|
16592
16684
|
React__default['default'].createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
|
16593
16685
|
};
|
@@ -17067,6 +17159,75 @@ const optionIconStyles = react.mergeStyles({
|
|
17067
17159
|
verticalAlign: 'text-top'
|
17068
17160
|
});
|
17069
17161
|
|
17162
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17163
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17164
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
17165
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17166
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17167
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17168
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17169
|
+
});
|
17170
|
+
};
|
17171
|
+
/**
|
17172
|
+
* @private
|
17173
|
+
*/
|
17174
|
+
const ConfigurationpageCameraDropdown = (props) => {
|
17175
|
+
/* @conditional-compile-remove(call-readiness) */
|
17176
|
+
const theme = useTheme();
|
17177
|
+
/* @conditional-compile-remove(call-readiness) */
|
17178
|
+
const adapter = useAdapter();
|
17179
|
+
/* @conditional-compile-remove(call-readiness) */
|
17180
|
+
const devicePermissionDropdownStringsCamera = {
|
17181
|
+
placeHolderText: 'Enable Camera (optional)',
|
17182
|
+
actionButtonContent: 'Allow'
|
17183
|
+
};
|
17184
|
+
/* @conditional-compile-remove(call-readiness) */
|
17185
|
+
const cameraBlockedDropdown = (React__default['default'].createElement(_DevicePermissionDropdown, { styles: dropDownStyles(theme), onClickActionButton: () => __awaiter$9(void 0, void 0, void 0, function* () {
|
17186
|
+
yield adapter.askDevicePermission({ video: true, audio: false });
|
17187
|
+
if (props.cameraPermissionGranted) {
|
17188
|
+
adapter.queryCameras();
|
17189
|
+
}
|
17190
|
+
}), strings: devicePermissionDropdownStringsCamera, icon: React__default['default'].createElement(CallCompositeIcon, { iconName: "ControlButtonCameraOn", style: { height: '1.25rem', marginRight: '0.625rem' } }) }));
|
17191
|
+
/* @conditional-compile-remove(call-readiness) */
|
17192
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null, props.cameraPermissionGranted ? props.cameraGrantedDropdown : cameraBlockedDropdown);
|
17193
|
+
};
|
17194
|
+
|
17195
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17196
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17197
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
17198
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17199
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17200
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17201
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17202
|
+
});
|
17203
|
+
};
|
17204
|
+
/**
|
17205
|
+
* @private
|
17206
|
+
*/
|
17207
|
+
const ConfigurationpageMicDropdown = (props) => {
|
17208
|
+
/* @conditional-compile-remove(call-readiness) */
|
17209
|
+
const theme = useTheme();
|
17210
|
+
/* @conditional-compile-remove(call-readiness) */
|
17211
|
+
const adapter = useAdapter();
|
17212
|
+
/* @conditional-compile-remove(call-readiness) */
|
17213
|
+
const devicePermissionDropdownStringsMicrophone = {
|
17214
|
+
placeHolderText: 'Enable Microphone (required)',
|
17215
|
+
actionButtonContent: 'Allow'
|
17216
|
+
};
|
17217
|
+
/* @conditional-compile-remove(call-readiness) */
|
17218
|
+
const microphoneBlockedDropdown = (React__default['default'].createElement(_DevicePermissionDropdown, { styles: dropDownStyles(theme), onClickActionButton: () => __awaiter$8(void 0, void 0, void 0, function* () {
|
17219
|
+
yield adapter.askDevicePermission({ video: false, audio: true });
|
17220
|
+
if (props.micPermissionGranted) {
|
17221
|
+
adapter.queryMicrophones();
|
17222
|
+
adapter.querySpeakers();
|
17223
|
+
}
|
17224
|
+
}), strings: devicePermissionDropdownStringsMicrophone, icon: React__default['default'].createElement(CallCompositeIcon, { iconName: "ControlButtonMicOn", style: { height: '1.25rem', marginRight: '0.625rem' } }) }));
|
17225
|
+
/* @conditional-compile-remove(call-readiness) */
|
17226
|
+
return React__default['default'].createElement(React__default['default'].Fragment, null,
|
17227
|
+
" ",
|
17228
|
+
props.micPermissionGranted ? props.micGrantedDropdown : microphoneBlockedDropdown);
|
17229
|
+
};
|
17230
|
+
|
17070
17231
|
// Copyright (c) Microsoft Corporation.
|
17071
17232
|
const getDropDownList = (list) => {
|
17072
17233
|
// Remove duplicates
|
@@ -17114,46 +17275,62 @@ const LocalDeviceSettings = (props) => {
|
|
17114
17275
|
var _a;
|
17115
17276
|
const theme = useTheme();
|
17116
17277
|
const locale = useLocale();
|
17278
|
+
/* @conditional-compile-remove(call-readiness) */
|
17279
|
+
const adapter = useAdapter();
|
17117
17280
|
const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;
|
17118
17281
|
const cameraLabel = locale.strings.call.cameraLabel;
|
17119
17282
|
const soundLabel = locale.strings.call.soundLabel;
|
17120
|
-
|
17121
|
-
|
17283
|
+
const cameraPermissionGranted = props.cameraPermissionGranted;
|
17284
|
+
const micPermissionGranted = props.microphonePermissionGranted;
|
17285
|
+
let roleCanUseCamera = true;
|
17286
|
+
let roleCanUseMic = true;
|
17122
17287
|
/* @conditional-compile-remove(rooms) */
|
17123
|
-
const
|
17288
|
+
const rolePermissions = _usePermissions();
|
17124
17289
|
/* @conditional-compile-remove(rooms) */
|
17125
|
-
|
17290
|
+
roleCanUseCamera = rolePermissions.cameraButton;
|
17126
17291
|
/* @conditional-compile-remove(rooms) */
|
17127
|
-
|
17292
|
+
roleCanUseMic = rolePermissions.microphoneButton;
|
17128
17293
|
// TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its
|
17129
17294
|
// actually granting access to query both microphone and speaker. However the browser popup asks you explicity for
|
17130
17295
|
// 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.
|
17296
|
+
/* @conditional-compile-remove(call-readiness) */
|
17297
|
+
React.useEffect(() => {
|
17298
|
+
if (cameraPermissionGranted) {
|
17299
|
+
adapter.queryCameras();
|
17300
|
+
}
|
17301
|
+
if (micPermissionGranted) {
|
17302
|
+
adapter.queryMicrophones();
|
17303
|
+
}
|
17304
|
+
adapter.querySpeakers();
|
17305
|
+
}, [adapter, cameraPermissionGranted, micPermissionGranted]);
|
17306
|
+
const cameraGrantedDropdown = (React__default['default'].createElement(react.Dropdown, { "data-ui-id": "call-composite-local-camera-settings", "aria-labelledby": 'call-composite-local-camera-settings-label', placeholder: defaultPlaceHolder, options: cameraPermissionGranted ? getDropDownList(props.cameras) : [{ key: 'deniedOrUnknown', text: '' }], styles: dropDownStyles(theme), disabled: !cameraPermissionGranted, errorMessage: props.cameraPermissionGranted === undefined || props.cameraPermissionGranted
|
17307
|
+
? undefined
|
17308
|
+
: locale.strings.call.cameraPermissionDenied, defaultSelectedKey: micPermissionGranted
|
17309
|
+
? props.selectedCamera
|
17310
|
+
? props.selectedCamera.id
|
17311
|
+
: props.cameras
|
17312
|
+
? (_a = props.cameras[0]) === null || _a === void 0 ? void 0 : _a.id
|
17313
|
+
: ''
|
17314
|
+
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
17315
|
+
props.onSelectCamera(props.cameras[index !== null && index !== void 0 ? index : 0], localVideoViewOptions);
|
17316
|
+
}, onRenderTitle: (props) => onRenderTitle('Camera', props) }));
|
17317
|
+
const micGrantedDropdown = (React__default['default'].createElement(React__default['default'].Fragment, null, roleCanUseMic && (React__default['default'].createElement(react.Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme), disabled: !micPermissionGranted, errorMessage: props.microphonePermissionGranted === undefined || props.microphonePermissionGranted
|
17318
|
+
? undefined
|
17319
|
+
: locale.strings.call.microphonePermissionDenied, options: micPermissionGranted ? getDropDownList(props.microphones) : [{ key: 'deniedOrUnknown', text: '' }], defaultSelectedKey: micPermissionGranted
|
17320
|
+
? props.selectedMicrophone
|
17321
|
+
? props.selectedMicrophone.id
|
17322
|
+
: defaultDeviceId(props.microphones)
|
17323
|
+
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
17324
|
+
props.onSelectMicrophone(props.microphones[index !== null && index !== void 0 ? index : 0]);
|
17325
|
+
}, onRenderTitle: (props) => onRenderTitle('Microphone', props) }))));
|
17131
17326
|
return (React__default['default'].createElement(react.Stack, { "data-ui-id": "call-composite-device-settings", tokens: mainStackTokens },
|
17132
|
-
|
17133
|
-
React__default['default'].createElement(react.Label, { id: 'call-composite-local-camera-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !
|
17134
|
-
React__default['default'].createElement(
|
17135
|
-
? undefined
|
17136
|
-
: locale.strings.call.cameraPermissionDenied, defaultSelectedKey: isSelectMicEnabled
|
17137
|
-
? props.selectedCamera
|
17138
|
-
? props.selectedCamera.id
|
17139
|
-
: props.cameras
|
17140
|
-
? (_a = props.cameras[0]) === null || _a === void 0 ? void 0 : _a.id
|
17141
|
-
: ''
|
17142
|
-
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
17143
|
-
props.onSelectCamera(props.cameras[index !== null && index !== void 0 ? index : 0], localVideoViewOptions);
|
17144
|
-
}, onRenderTitle: (props) => onRenderTitle('Camera', props) }))),
|
17327
|
+
roleCanUseCamera && (React__default['default'].createElement(react.Stack, null,
|
17328
|
+
React__default['default'].createElement(react.Label, { id: 'call-composite-local-camera-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !cameraPermissionGranted }, cameraLabel),
|
17329
|
+
React__default['default'].createElement(ConfigurationpageCameraDropdown, { cameraGrantedDropdown: cameraGrantedDropdown, cameraPermissionGranted: cameraPermissionGranted !== null && cameraPermissionGranted !== void 0 ? cameraPermissionGranted : false }))),
|
17145
17330
|
React__default['default'].createElement(react.Stack, null,
|
17146
|
-
React__default['default'].createElement(react.Label, { id: 'call-composite-local-sound-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !
|
17331
|
+
React__default['default'].createElement(react.Label, { id: 'call-composite-local-sound-settings-label', className: react.mergeStyles(dropDownStyles(theme).label), disabled: !micPermissionGranted }, soundLabel),
|
17147
17332
|
React__default['default'].createElement(react.Stack, { "data-ui-id": "call-composite-sound-settings", tokens: mainStackTokens },
|
17148
|
-
|
17149
|
-
? undefined
|
17150
|
-
: locale.strings.call.microphonePermissionDenied, options: isSelectMicEnabled ? getDropDownList(props.microphones) : [{ key: 'deniedOrUnknown', text: '' }], defaultSelectedKey: isSelectMicEnabled
|
17151
|
-
? props.selectedMicrophone
|
17152
|
-
? props.selectedMicrophone.id
|
17153
|
-
: defaultDeviceId(props.microphones)
|
17154
|
-
: 'deniedOrUnknown', onChange: (event, option, index) => {
|
17155
|
-
props.onSelectMicrophone(props.microphones[index !== null && index !== void 0 ? index : 0]);
|
17156
|
-
}, onRenderTitle: (props) => onRenderTitle('Microphone', props) })),
|
17333
|
+
React__default['default'].createElement(ConfigurationpageMicDropdown, { micGrantedDropdown: micGrantedDropdown, micPermissionGranted: micPermissionGranted !== null && micPermissionGranted !== void 0 ? micPermissionGranted : false }),
|
17157
17334
|
React__default['default'].createElement(react.Dropdown, { "aria-labelledby": 'call-composite-local-sound-settings-label', placeholder: defaultPlaceHolder, styles: dropDownStyles(theme), disabled: props.speakers.length === 0, options: getDropDownList(props.speakers), defaultSelectedKey: props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers), onChange: (event, option, index) => {
|
17158
17335
|
props.onSelectSpeaker(props.speakers[index !== null && index !== void 0 ? index : 0]);
|
17159
17336
|
}, onRenderTitle: (props) => onRenderTitle('Speaker', props) })))));
|
@@ -18071,7 +18248,7 @@ class CallContext {
|
|
18071
18248
|
this.emitter.off('callEnded', handler);
|
18072
18249
|
}
|
18073
18250
|
updateClientState(clientState) {
|
18074
|
-
var _a
|
18251
|
+
var _a;
|
18075
18252
|
const call = this.callId ? clientState.calls[this.callId] : undefined;
|
18076
18253
|
const latestEndedCall = findLatestEndedCall(clientState.callsEnded);
|
18077
18254
|
// As the state is transitioning to a new state, trigger appropriate callback events.
|
@@ -18079,13 +18256,11 @@ class CallContext {
|
|
18079
18256
|
const newPage = getCallCompositePage(call, latestEndedCall);
|
18080
18257
|
if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {
|
18081
18258
|
this.emitter.emit('callEnded', {
|
18082
|
-
callId: this.callId
|
18083
|
-
callEndedCode: (_a = latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.callEndReason) === null || _a === void 0 ? void 0 : _a.code,
|
18084
|
-
callEndedSubCode: (_b = latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.callEndReason) === null || _b === void 0 ? void 0 : _b.subCode
|
18259
|
+
callId: this.callId
|
18085
18260
|
});
|
18086
18261
|
}
|
18087
18262
|
if (this.state.page) {
|
18088
|
-
this.setState(Object.assign(Object.assign({}, this.state), { userId: clientState.userId, displayName: (
|
18263
|
+
this.setState(Object.assign(Object.assign({}, this.state), { userId: clientState.userId, displayName: (_a = clientState.callAgent) === null || _a === void 0 ? void 0 : _a.displayName, call, page: newPage, endedCall: latestEndedCall, devices: clientState.deviceManager, latestErrors: clientState.latestErrors }));
|
18089
18264
|
}
|
18090
18265
|
}
|
18091
18266
|
}
|
@@ -18400,10 +18575,10 @@ class AzureCommunicationCallAdapter {
|
|
18400
18575
|
const idsToAdd = participants.map((participant) => {
|
18401
18576
|
// FIXME: `onStartCall` does not allow a Teams user.
|
18402
18577
|
// Need some way to return an error if a Teams user is provided.
|
18403
|
-
const backendId =
|
18578
|
+
const backendId = _toCommunicationIdentifier(participant);
|
18404
18579
|
if (communicationCommon.isPhoneNumberIdentifier(backendId)) {
|
18405
18580
|
if ((options === null || options === void 0 ? void 0 : options.alternateCallerId) === undefined) {
|
18406
|
-
throw new Error('
|
18581
|
+
throw new Error('Unable to start call, PSTN user present with no alternateCallerId.');
|
18407
18582
|
}
|
18408
18583
|
return backendId;
|
18409
18584
|
}
|
@@ -18429,7 +18604,10 @@ class AzureCommunicationCallAdapter {
|
|
18429
18604
|
}
|
18430
18605
|
removeParticipant(userId) {
|
18431
18606
|
return __awaiter$4(this, void 0, void 0, function* () {
|
18432
|
-
|
18607
|
+
let participant = userId;
|
18608
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
18609
|
+
participant = _toCommunicationIdentifier(userId);
|
18610
|
+
this.handlers.onRemoveParticipant(participant);
|
18433
18611
|
});
|
18434
18612
|
}
|
18435
18613
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -19212,7 +19390,10 @@ class CallWithChatBackedCallAdapter {
|
|
19212
19390
|
};
|
19213
19391
|
this.leaveCall = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.leaveCall(); });
|
19214
19392
|
this.startCall = (participants, options) => {
|
19215
|
-
|
19393
|
+
let communicationParticipants = participants;
|
19394
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
19395
|
+
communicationParticipants = participants.map(_toCommunicationIdentifier);
|
19396
|
+
return this.callWithChatAdapter.startCall(communicationParticipants, options);
|
19216
19397
|
};
|
19217
19398
|
this.setCamera = (sourceId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setCamera(sourceId, options); });
|
19218
19399
|
this.setMicrophone = (sourceId) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.setMicrophone(sourceId); });
|
@@ -19227,7 +19408,12 @@ class CallWithChatBackedCallAdapter {
|
|
19227
19408
|
this.unmute = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
|
19228
19409
|
this.startScreenShare = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
|
19229
19410
|
this.stopScreenShare = () => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
|
19230
|
-
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () {
|
19411
|
+
this.removeParticipant = (userId) => __awaiter$3(this, void 0, void 0, function* () {
|
19412
|
+
let participant = userId;
|
19413
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
19414
|
+
participant = _toCommunicationIdentifier(userId);
|
19415
|
+
yield this.callWithChatAdapter.removeParticipant(participant);
|
19416
|
+
});
|
19231
19417
|
this.createStreamView = (remoteUserId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.createStreamView(remoteUserId, options); });
|
19232
19418
|
this.disposeStreamView = (remoteUserId, options) => __awaiter$3(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.disposeStreamView(remoteUserId, options); });
|
19233
19419
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -19621,7 +19807,8 @@ const CallWithChatPane = (props) => {
|
|
19621
19807
|
React__default['default'].createElement(react.Stack.Item, { verticalFill: true, styles: scrollableContainerContents },
|
19622
19808
|
React__default['default'].createElement(react.Stack, { styles: props.activePane === 'chat' ? availableSpaceStyles : hiddenStyles }, chatContent),
|
19623
19809
|
React__default['default'].createElement(react.Stack, { styles: props.activePane === 'people' ? availableSpaceStyles : hiddenStyles }, peopleContent)))),
|
19624
|
-
props.mobileView && (React__default['default'].createElement(
|
19810
|
+
props.mobileView && (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
19811
|
+
React__default['default'].createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition }))),
|
19625
19812
|
drawerMenuItems.length > 0 && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles$1 },
|
19626
19813
|
React__default['default'].createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
|
19627
19814
|
};
|
@@ -20039,7 +20226,10 @@ class AzureCommunicationCallWithChatAdapter {
|
|
20039
20226
|
}
|
20040
20227
|
/** Start a new Call. */
|
20041
20228
|
startCall(participants, options) {
|
20042
|
-
|
20229
|
+
let communicationParticipants = participants;
|
20230
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
20231
|
+
communicationParticipants = participants.map(_toCommunicationIdentifier);
|
20232
|
+
return this.callAdapter.startCall(communicationParticipants, options);
|
20043
20233
|
}
|
20044
20234
|
/**
|
20045
20235
|
* Subscribe to state change events.
|
@@ -20069,8 +20259,10 @@ class AzureCommunicationCallWithChatAdapter {
|
|
20069
20259
|
/** Remove a participant from the Call only. */
|
20070
20260
|
removeParticipant(userId) {
|
20071
20261
|
return __awaiter(this, void 0, void 0, function* () {
|
20072
|
-
|
20073
|
-
|
20262
|
+
let participant = userId;
|
20263
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
20264
|
+
participant = _toCommunicationIdentifier(userId);
|
20265
|
+
yield this.callAdapter.removeParticipant(participant);
|
20074
20266
|
});
|
20075
20267
|
}
|
20076
20268
|
setCamera(device, options) {
|
@@ -20638,6 +20830,7 @@ exports.TypingIndicator = TypingIndicator;
|
|
20638
20830
|
exports.UnsupportedBrowser = UnsupportedBrowser;
|
20639
20831
|
exports.VideoGallery = VideoGallery;
|
20640
20832
|
exports.VideoTile = VideoTile;
|
20833
|
+
exports._DevicePermissionDropdown = _DevicePermissionDropdown;
|
20641
20834
|
exports._IdentifierProvider = _IdentifierProvider;
|
20642
20835
|
exports.createAzureCommunicationCallAdapter = createAzureCommunicationCallAdapter;
|
20643
20836
|
exports.createAzureCommunicationCallAdapterFromClient = createAzureCommunicationCallAdapterFromClient;
|