@azure/communication-react 1.3.3-alpha-202208250017.0 → 1.3.3-alpha-202208280018.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 +20 -20
- package/dist/dist-cjs/communication-react/index.js +347 -216
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +5 -16
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +73 -55
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HoldButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +2 -2
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +58 -0
- package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -0
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +3 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +6 -2
- package/dist/dist-esm/react-components/src/theming/icons.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.js +1 -1
- 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 +1 -1
- 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.js +3 -3
- 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/HoldPane.js +31 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +12 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +20 -3
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +3 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +2 -0
- package/package.json +8 -8
@@ -192,7 +192,7 @@ const fromFlatCommunicationIdentifier = (id) => {
|
|
192
192
|
// Copyright (c) Microsoft Corporation.
|
193
193
|
// Licensed under the MIT license.
|
194
194
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
195
|
-
var telemetryVersion = '1.3.3-alpha-
|
195
|
+
var telemetryVersion = '1.3.3-alpha-202208280018.0';
|
196
196
|
|
197
197
|
// Copyright (c) Microsoft Corporation.
|
198
198
|
/**
|
@@ -391,7 +391,7 @@ const getCallState = (state, props) => { var _a; return (_a = state.calls[props.
|
|
391
391
|
|
392
392
|
// Copyright (c) Microsoft Corporation.
|
393
393
|
// Licensed under the MIT license.
|
394
|
-
var __awaiter$
|
394
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
395
395
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
396
396
|
return new (P || (P = Promise))(function (resolve, reject) {
|
397
397
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -429,7 +429,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
429
429
|
*
|
430
430
|
* @private
|
431
431
|
*/
|
432
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
432
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$w(void 0, void 0, void 0, function* () {
|
433
433
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
434
434
|
for (const view of unparentedViews) {
|
435
435
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -536,7 +536,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
536
536
|
|
537
537
|
// Copyright (c) Microsoft Corporation.
|
538
538
|
// Licensed under the MIT license.
|
539
|
-
var __awaiter$
|
539
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
540
540
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
541
541
|
return new (P || (P = Promise))(function (resolve, reject) {
|
542
542
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -560,7 +560,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
560
560
|
* @public
|
561
561
|
*/
|
562
562
|
const createDefaultCallingHandlers = memoizeOne__default['default']((callClient, callAgent, deviceManager, call) => {
|
563
|
-
const onStartLocalVideo = () => __awaiter$
|
563
|
+
const onStartLocalVideo = () => __awaiter$v(void 0, void 0, void 0, function* () {
|
564
564
|
// Before the call object creates a stream, dispose of any local preview streams.
|
565
565
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
566
566
|
// of disposing and creating a new stream?
|
@@ -580,7 +580,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
580
580
|
yield call.startVideo(stream);
|
581
581
|
}
|
582
582
|
});
|
583
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
583
|
+
const onStopLocalVideo = (stream) => __awaiter$v(void 0, void 0, void 0, function* () {
|
584
584
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
585
585
|
if (!callId) {
|
586
586
|
return;
|
@@ -593,7 +593,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
593
593
|
});
|
594
594
|
}
|
595
595
|
});
|
596
|
-
const onToggleCamera = (options) => __awaiter$
|
596
|
+
const onToggleCamera = (options) => __awaiter$v(void 0, void 0, void 0, function* () {
|
597
597
|
if (call && _isInCall(call.state)) {
|
598
598
|
const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
599
599
|
if (stream) {
|
@@ -623,19 +623,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
623
623
|
const onStartCall = (participants, options) => {
|
624
624
|
return callAgent ? callAgent.startCall(participants, options) : undefined;
|
625
625
|
};
|
626
|
-
const onSelectMicrophone = (device) => __awaiter$
|
626
|
+
const onSelectMicrophone = (device) => __awaiter$v(void 0, void 0, void 0, function* () {
|
627
627
|
if (!deviceManager) {
|
628
628
|
return;
|
629
629
|
}
|
630
630
|
return deviceManager.selectMicrophone(device);
|
631
631
|
});
|
632
|
-
const onSelectSpeaker = (device) => __awaiter$
|
632
|
+
const onSelectSpeaker = (device) => __awaiter$v(void 0, void 0, void 0, function* () {
|
633
633
|
if (!deviceManager) {
|
634
634
|
return;
|
635
635
|
}
|
636
636
|
return deviceManager.selectSpeaker(device);
|
637
637
|
});
|
638
|
-
const onSelectCamera = (device, options) => __awaiter$
|
638
|
+
const onSelectCamera = (device, options) => __awaiter$v(void 0, void 0, void 0, function* () {
|
639
639
|
if (!deviceManager) {
|
640
640
|
return;
|
641
641
|
}
|
@@ -658,19 +658,19 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
658
658
|
}, options);
|
659
659
|
}
|
660
660
|
});
|
661
|
-
const onToggleMicrophone = () => __awaiter$
|
661
|
+
const onToggleMicrophone = () => __awaiter$v(void 0, void 0, void 0, function* () {
|
662
662
|
if (!call || !_isInCall(call.state)) {
|
663
663
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
664
664
|
}
|
665
665
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
666
666
|
});
|
667
|
-
const onStartScreenShare = () => __awaiter$
|
668
|
-
const onStopScreenShare = () => __awaiter$
|
669
|
-
const onToggleScreenShare = () => __awaiter$
|
670
|
-
const onHangUp = () => __awaiter$
|
667
|
+
const onStartScreenShare = () => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
668
|
+
const onStopScreenShare = () => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
669
|
+
const onToggleScreenShare = () => __awaiter$v(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
670
|
+
const onHangUp = () => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp()); });
|
671
671
|
/* @conditional-compile-remove(PSTN-calls) */
|
672
|
-
const onToggleHold = () => __awaiter$
|
673
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
672
|
+
const onToggleHold = () => __awaiter$v(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()); });
|
673
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$v(void 0, void 0, void 0, function* () {
|
674
674
|
var _a;
|
675
675
|
if (!call || call.localVideoStreams.length === 0) {
|
676
676
|
return;
|
@@ -686,7 +686,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
686
686
|
const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
|
687
687
|
return view ? { view } : undefined;
|
688
688
|
});
|
689
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
689
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$v(void 0, void 0, void 0, function* () {
|
690
690
|
if (!call) {
|
691
691
|
return;
|
692
692
|
}
|
@@ -714,7 +714,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
714
714
|
}
|
715
715
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
716
716
|
});
|
717
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
717
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$v(void 0, void 0, void 0, function* () {
|
718
718
|
if (!call) {
|
719
719
|
return;
|
720
720
|
}
|
@@ -735,7 +735,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
735
735
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
736
736
|
}
|
737
737
|
});
|
738
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
738
|
+
const onDisposeLocalStreamView = () => __awaiter$v(void 0, void 0, void 0, function* () {
|
739
739
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
740
740
|
const callState = call && callClient.getState().calls[call.id];
|
741
741
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -747,11 +747,11 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
747
747
|
// TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
|
748
748
|
yield disposeAllLocalPreviewViews(callClient);
|
749
749
|
});
|
750
|
-
const onRemoveParticipant = (userId) => __awaiter$
|
750
|
+
const onRemoveParticipant = (userId) => __awaiter$v(void 0, void 0, void 0, function* () {
|
751
751
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(fromFlatCommunicationIdentifier(userId)));
|
752
752
|
});
|
753
753
|
/* @conditional-compile-remove(PSTN-calls) */
|
754
|
-
const onAddParticipant = (participant, options) => __awaiter$
|
754
|
+
const onAddParticipant = (participant, options) => __awaiter$v(void 0, void 0, void 0, function* () {
|
755
755
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
756
756
|
yield (call === null || call === void 0 ? void 0 : call.addParticipant(participant, options));
|
757
757
|
}
|
@@ -760,7 +760,7 @@ const createDefaultCallingHandlers = memoizeOne__default['default']((callClient,
|
|
760
760
|
}
|
761
761
|
});
|
762
762
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
763
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
763
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$v(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
764
764
|
return {
|
765
765
|
onHangUp,
|
766
766
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -1899,6 +1899,8 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
1899
1899
|
ControlButtonMicOn: React__default['default'].createElement(reactIcons.MicOn20Filled, null),
|
1900
1900
|
ControlButtonOptions: React__default['default'].createElement(reactIcons.Settings20Filled, null),
|
1901
1901
|
ControlButtonParticipants: React__default['default'].createElement(reactIcons.People20Filled, null),
|
1902
|
+
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
1903
|
+
ControlButtonParticipantsContextualMenuItem: React__default['default'].createElement(reactIcons.People20Regular, null),
|
1902
1904
|
ControlButtonScreenShareStart: React__default['default'].createElement(reactIcons.ShareScreenStart20Filled, null),
|
1903
1905
|
ControlButtonScreenShareStop: React__default['default'].createElement(reactIcons.ShareScreenStop20Filled, null),
|
1904
1906
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -1938,7 +1940,9 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
1938
1940
|
ParticipantItemOptionsHovered: React__default['default'].createElement(reactIcons.MoreHorizontal20Filled, null),
|
1939
1941
|
ParticipantItemScreenShareStart: React__default['default'].createElement(reactIcons.ShareScreenStart20Filled, null),
|
1940
1942
|
/* @conditional-compile-remove(PSTN-calls) */
|
1941
|
-
|
1943
|
+
HoldCallContextualMenuItem: React__default['default'].createElement(reactIcons.CallPause20Regular, null),
|
1944
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
1945
|
+
HoldCallButton: React__default['default'].createElement(reactIcons.CallPause20Filled, null),
|
1942
1946
|
/* @conditional-compile-remove(PSTN-calls) */
|
1943
1947
|
ResumeCall: React__default['default'].createElement(reactIcons.Play20Regular, null),
|
1944
1948
|
SendBoxSend: React__default['default'].createElement(reactIcons.Send20Regular, null),
|
@@ -3392,7 +3396,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
3392
3396
|
return actionMenuProps;
|
3393
3397
|
};
|
3394
3398
|
|
3395
|
-
var __awaiter$
|
3399
|
+
var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3396
3400
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3397
3401
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3398
3402
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3417,7 +3421,7 @@ const _FileDownloadCards = (props) => {
|
|
3417
3421
|
var _a, _b;
|
3418
3422
|
return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile) !== null && _b !== void 0 ? _b : localeStrings.downloadFile;
|
3419
3423
|
}, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile, localeStrings.downloadFile]);
|
3420
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
3424
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$u(void 0, void 0, void 0, function* () {
|
3421
3425
|
if (!props.downloadHandler) {
|
3422
3426
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
3423
3427
|
}
|
@@ -3565,7 +3569,7 @@ const ChatMessageComponentAsMessageBubble = React__default['default'].memo(Messa
|
|
3565
3569
|
|
3566
3570
|
// Copyright (c) Microsoft Corporation.
|
3567
3571
|
// Licensed under the MIT license.
|
3568
|
-
var __awaiter$
|
3572
|
+
var __awaiter$t = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3569
3573
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3570
3574
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3571
3575
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3599,7 +3603,7 @@ const ChatMessageComponent = (props) => {
|
|
3599
3603
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
3600
3604
|
}
|
3601
3605
|
else if (isEditing) {
|
3602
|
-
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
3606
|
+
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$t(void 0, void 0, void 0, function* () {
|
3603
3607
|
props.onUpdateMessage &&
|
3604
3608
|
props.message.messageId &&
|
3605
3609
|
(yield props.onUpdateMessage(props.message.messageId, text, metadata, options));
|
@@ -3698,7 +3702,7 @@ const getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
|
3698
3702
|
|
3699
3703
|
// Copyright (c) Microsoft Corporation.
|
3700
3704
|
// Licensed under the MIT license.
|
3701
|
-
var __awaiter$
|
3705
|
+
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3702
3706
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3703
3707
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3704
3708
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3925,7 +3929,7 @@ const MessageThread = (props) => {
|
|
3925
3929
|
setChatMessagesInitialized(chatMessagesInitialized);
|
3926
3930
|
};
|
3927
3931
|
// we try to only send those message status if user is scrolled to the bottom.
|
3928
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
3932
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$s(void 0, void 0, void 0, function* () {
|
3929
3933
|
if (!isAtBottomOfScrollRef.current ||
|
3930
3934
|
!document.hasFocus() ||
|
3931
3935
|
!messagesRef.current ||
|
@@ -3976,7 +3980,7 @@ const MessageThread = (props) => {
|
|
3976
3980
|
setIsAtBottomOfScrollRef(atBottom);
|
3977
3981
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
3978
3982
|
// Infinite scrolling + threadInitialize function
|
3979
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
3983
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$s(void 0, void 0, void 0, function* () {
|
3980
3984
|
if (chatScrollDivRef.current && !isLoadingChatMessagesRef.current) {
|
3981
3985
|
if (onLoadPreviousChatMessages) {
|
3982
3986
|
isLoadingChatMessagesRef.current = true;
|
@@ -4428,7 +4432,7 @@ const ParticipantItem = (props) => {
|
|
4428
4432
|
setMenuHidden(true);
|
4429
4433
|
};
|
4430
4434
|
const participantStateString = participantStateStringTrampoline$1(props, strings);
|
4431
|
-
return (React__default['default'].createElement("div", { ref: containerRef, role: 'menuitem', "data-is-focusable": true, className: react.mergeStyles(participantItemContainerStyle({ localparticipant: me, clickable: !!menuItems }), styles === null || styles === void 0 ? void 0 : styles.root), onMouseEnter: () => setItemHovered(true), onMouseLeave: () => setItemHovered(false), onClick: () => {
|
4435
|
+
return (React__default['default'].createElement("div", { ref: containerRef, role: 'menuitem', "data-is-focusable": true, "data-ui-id": "participant-item", className: react.mergeStyles(participantItemContainerStyle({ localparticipant: me, clickable: !!menuItems }), styles === null || styles === void 0 ? void 0 : styles.root), onMouseEnter: () => setItemHovered(true), onMouseLeave: () => setItemHovered(false), onClick: () => {
|
4432
4436
|
if (!participantStateString) {
|
4433
4437
|
setItemHovered(true);
|
4434
4438
|
setMenuHidden(false);
|
@@ -6789,7 +6793,7 @@ const DevicesButton = (props) => {
|
|
6789
6793
|
|
6790
6794
|
// Copyright (c) Microsoft Corporation.
|
6791
6795
|
// Licensed under the MIT license.
|
6792
|
-
var __awaiter$
|
6796
|
+
var __awaiter$r = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6793
6797
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6794
6798
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6795
6799
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -6831,7 +6835,7 @@ const CameraButton = (props) => {
|
|
6831
6835
|
const toggleAnnouncerString = React.useCallback((isCameraOn) => {
|
6832
6836
|
setAnnouncerString(!isCameraOn ? strings.cameraActionTurnedOffAnnouncement : strings.cameraActionTurnedOnAnnouncement);
|
6833
6837
|
}, [strings.cameraActionTurnedOffAnnouncement, strings.cameraActionTurnedOnAnnouncement]);
|
6834
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
6838
|
+
const onToggleClick = React.useCallback(() => __awaiter$r(void 0, void 0, void 0, function* () {
|
6835
6839
|
// Throttle click on camera, need to await onToggleCamera then allow another click
|
6836
6840
|
if (onToggleCamera) {
|
6837
6841
|
setWaitForCamera(true);
|
@@ -6963,7 +6967,7 @@ const lightThemeCallButtonStyles = {
|
|
6963
6967
|
|
6964
6968
|
// Copyright (c) Microsoft Corporation.
|
6965
6969
|
// Licensed under the MIT license.
|
6966
|
-
var __awaiter$
|
6970
|
+
var __awaiter$q = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
6967
6971
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
6968
6972
|
return new (P || (P = Promise))(function (resolve, reject) {
|
6969
6973
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7006,7 +7010,7 @@ const MicrophoneButton = (props) => {
|
|
7006
7010
|
const toggleAnnouncerString = React.useCallback((isMicOn) => {
|
7007
7011
|
setAnnouncerString(!isMicOn ? strings.microphoneActionTurnedOffAnnouncement : strings.microphoneActionTurnedOnAnnouncement);
|
7008
7012
|
}, [strings.microphoneActionTurnedOffAnnouncement, strings.microphoneActionTurnedOnAnnouncement]);
|
7009
|
-
const onToggleClick = React.useCallback(() => __awaiter$
|
7013
|
+
const onToggleClick = React.useCallback(() => __awaiter$q(void 0, void 0, void 0, function* () {
|
7010
7014
|
if (onToggleMicrophone) {
|
7011
7015
|
try {
|
7012
7016
|
yield onToggleMicrophone();
|
@@ -7718,7 +7722,7 @@ const buttonStyles = (theme) => ({
|
|
7718
7722
|
/**
|
7719
7723
|
* @private
|
7720
7724
|
*/
|
7721
|
-
const
|
7725
|
+
const digitStyles = (theme) => {
|
7722
7726
|
return {
|
7723
7727
|
fontSize: '1.25rem',
|
7724
7728
|
fontWeight: theme.fonts.medium.fontWeight,
|
@@ -7754,7 +7758,7 @@ const textFieldStyles = (theme) => ({
|
|
7754
7758
|
/**
|
7755
7759
|
* @private
|
7756
7760
|
*/
|
7757
|
-
const
|
7761
|
+
const letterStyles = (theme) => {
|
7758
7762
|
return {
|
7759
7763
|
fontSize: '0.625rem',
|
7760
7764
|
color: `${theme.palette.neutralSecondary}`,
|
@@ -7817,33 +7821,85 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
7817
7821
|
};
|
7818
7822
|
|
7819
7823
|
// Copyright (c) Microsoft Corporation.
|
7820
|
-
|
7821
|
-
|
7822
|
-
|
7823
|
-
|
7824
|
-
|
7825
|
-
|
7826
|
-
|
7827
|
-
|
7828
|
-
|
7824
|
+
/**
|
7825
|
+
* @private
|
7826
|
+
*/
|
7827
|
+
function useLongPress(onClick, onLongPress) {
|
7828
|
+
const timerRef = React.useRef();
|
7829
|
+
const [isLongPress, setIsLongPress] = React.useState(false);
|
7830
|
+
const [action, setAction] = React.useState(false);
|
7831
|
+
function startPressTimer() {
|
7832
|
+
setIsLongPress(false);
|
7833
|
+
timerRef.current = setTimeout(() => {
|
7834
|
+
setIsLongPress(true);
|
7835
|
+
}, 500);
|
7836
|
+
}
|
7837
|
+
function handleOnClick() {
|
7838
|
+
onClick();
|
7839
|
+
if (isLongPress) {
|
7840
|
+
onLongPress();
|
7841
|
+
return;
|
7842
|
+
}
|
7843
|
+
}
|
7844
|
+
function handleOnKeyDown() {
|
7845
|
+
if (action) {
|
7846
|
+
setAction(false);
|
7847
|
+
startPressTimer();
|
7848
|
+
}
|
7849
|
+
}
|
7850
|
+
function handleOnKeyUp() {
|
7851
|
+
setAction(true);
|
7852
|
+
timerRef.current && clearTimeout(timerRef.current);
|
7853
|
+
}
|
7854
|
+
function handleOnMouseDown() {
|
7855
|
+
startPressTimer();
|
7856
|
+
}
|
7857
|
+
function handleOnMouseUp() {
|
7858
|
+
timerRef.current && clearTimeout(timerRef.current);
|
7859
|
+
}
|
7860
|
+
function handleOnTouchStart() {
|
7861
|
+
startPressTimer();
|
7862
|
+
}
|
7863
|
+
function handleOnTouchEnd() {
|
7864
|
+
timerRef.current && clearTimeout(timerRef.current);
|
7865
|
+
}
|
7866
|
+
return {
|
7867
|
+
handlers: {
|
7868
|
+
onClick: handleOnClick,
|
7869
|
+
onMouseDown: handleOnMouseDown,
|
7870
|
+
onMouseUp: handleOnMouseUp,
|
7871
|
+
onTouchStart: handleOnTouchStart,
|
7872
|
+
onTouchEnd: handleOnTouchEnd,
|
7873
|
+
onKeyDown: handleOnKeyDown,
|
7874
|
+
onKeyUp: handleOnKeyUp
|
7875
|
+
}
|
7876
|
+
};
|
7877
|
+
}
|
7878
|
+
|
7879
|
+
// Copyright (c) Microsoft Corporation.
|
7880
|
+
// Licensed under the MIT license.
|
7881
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7882
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7883
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
7884
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
7885
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7886
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7887
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
7888
|
+
});
|
7829
7889
|
};
|
7830
7890
|
const dialPadButtonsDefault = [
|
7891
|
+
[{ digit: '1' }, { digit: '2', letter: 'ABC' }, { digit: '3', letter: 'DEF' }],
|
7831
7892
|
[
|
7832
|
-
{
|
7833
|
-
{
|
7834
|
-
{
|
7893
|
+
{ digit: '4', letter: 'GHI' },
|
7894
|
+
{ digit: '5', letter: 'JKL' },
|
7895
|
+
{ digit: '6', letter: 'MNO' }
|
7835
7896
|
],
|
7836
7897
|
[
|
7837
|
-
{
|
7838
|
-
{
|
7839
|
-
{
|
7898
|
+
{ digit: '7', letter: 'PQRS' },
|
7899
|
+
{ digit: '8', letter: 'TUV' },
|
7900
|
+
{ digit: '9', letter: 'WXYZ' }
|
7840
7901
|
],
|
7841
|
-
[
|
7842
|
-
{ primaryContent: '7', secondaryContent: 'PQRS' },
|
7843
|
-
{ primaryContent: '8', secondaryContent: 'TUV' },
|
7844
|
-
{ primaryContent: '9', secondaryContent: 'WXYZ' }
|
7845
|
-
],
|
7846
|
-
[{ primaryContent: '*' }, { primaryContent: '0', secondaryContent: '+' }, { primaryContent: '#' }]
|
7902
|
+
[{ digit: '*' }, { digit: '0', letter: '+' }, { digit: '#' }]
|
7847
7903
|
];
|
7848
7904
|
const DtmfTones = [
|
7849
7905
|
'Num1',
|
@@ -7859,58 +7915,76 @@ const DtmfTones = [
|
|
7859
7915
|
'Num0',
|
7860
7916
|
'Pound'
|
7861
7917
|
];
|
7918
|
+
const DialpadButton = (props) => {
|
7919
|
+
var _a, _b, _c, _d;
|
7920
|
+
const theme = react.useTheme();
|
7921
|
+
const { digit, index, onClick, onLongPress } = props;
|
7922
|
+
const clickFunction = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
7923
|
+
onClick(digit, index);
|
7924
|
+
}), [digit, index, onClick]);
|
7925
|
+
const longPressFunction = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
7926
|
+
onLongPress(digit, index);
|
7927
|
+
}), [digit, index, onLongPress]);
|
7928
|
+
const { handlers } = useLongPress(clickFunction, longPressFunction);
|
7929
|
+
return (React__default['default'].createElement(react.DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: react.concatStyleSets(buttonStyles(), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, handlers),
|
7930
|
+
React__default['default'].createElement(react.Stack, null,
|
7931
|
+
React__default['default'].createElement(react.Text, { className: react.mergeStyles(digitStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.digit) }, props.digit),
|
7932
|
+
React__default['default'].createElement(react.Text, { className: react.mergeStyles(letterStyles(theme), (_c = props.styles) === null || _c === void 0 ? void 0 : _c.letter) }, (_d = props.letter) !== null && _d !== void 0 ? _d : ' '))));
|
7933
|
+
};
|
7862
7934
|
const DialpadContainer = (props) => {
|
7863
7935
|
var _a, _b;
|
7864
7936
|
const theme = react.useTheme();
|
7865
|
-
const
|
7866
|
-
const
|
7867
|
-
|
7868
|
-
|
7869
|
-
|
7870
|
-
|
7937
|
+
const { onSendDtmfTone, onClickDialpadButton, textFieldValue, onChange, showDeleteButton = true } = props;
|
7938
|
+
const [plainTextValue, setPlainTextValue] = React.useState(textFieldValue !== null && textFieldValue !== void 0 ? textFieldValue : '');
|
7939
|
+
React.useEffect(() => {
|
7940
|
+
if (onChange) {
|
7941
|
+
onChange(plainTextValue);
|
7942
|
+
}
|
7943
|
+
}, [plainTextValue, onChange]);
|
7944
|
+
React.useEffect(() => {
|
7945
|
+
setText(textFieldValue !== null && textFieldValue !== void 0 ? textFieldValue : '');
|
7946
|
+
}, [textFieldValue]);
|
7871
7947
|
const onClickDialpad = (input, index) => {
|
7872
|
-
|
7873
|
-
const value = sanitizeInput(textValue + input);
|
7874
|
-
setTextValue(value);
|
7948
|
+
setText(plainTextValue + input);
|
7875
7949
|
if (onSendDtmfTone) {
|
7876
7950
|
onSendDtmfTone(DtmfTones[index]);
|
7877
7951
|
}
|
7878
7952
|
if (onClickDialpadButton) {
|
7879
7953
|
onClickDialpadButton(input, index);
|
7880
7954
|
}
|
7881
|
-
|
7882
|
-
|
7955
|
+
};
|
7956
|
+
const onLongPressDialpad = (input, index) => {
|
7957
|
+
if (input === '0' && index === 10) {
|
7958
|
+
setText(plainTextValue + '+');
|
7959
|
+
}
|
7960
|
+
else {
|
7961
|
+
setText(plainTextValue + input);
|
7962
|
+
}
|
7963
|
+
if (onSendDtmfTone) {
|
7964
|
+
onSendDtmfTone(DtmfTones[index]);
|
7965
|
+
}
|
7966
|
+
if (onClickDialpadButton) {
|
7967
|
+
onClickDialpadButton(input, index);
|
7883
7968
|
}
|
7884
7969
|
};
|
7885
7970
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7886
|
-
const setText = (
|
7971
|
+
const setText = (input) => {
|
7887
7972
|
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7888
|
-
const
|
7889
|
-
|
7973
|
+
const plainInput = sanitizeInput(input);
|
7974
|
+
setPlainTextValue(plainInput);
|
7890
7975
|
};
|
7891
|
-
// Potential Improvement:
|
7892
|
-
// comment out the following line for now to disable customization for dialpad content
|
7893
|
-
// const dialpadButtonsContent = props.dialpadButtons ?? dialPadButtonsDefault;
|
7894
7976
|
const deleteNumbers = () => {
|
7895
|
-
const modifiedInput =
|
7896
|
-
|
7897
|
-
if (onChange) {
|
7898
|
-
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(modifiedInput) : formatPhoneNumber(modifiedInput));
|
7899
|
-
}
|
7977
|
+
const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);
|
7978
|
+
setText(modifiedInput);
|
7900
7979
|
};
|
7901
7980
|
return (React__default['default'].createElement("div", { className: react.mergeStyles(containerStyles$1(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer", "data-ui-id": "dialpadContainer" },
|
7902
|
-
React__default['default'].createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value:
|
7981
|
+
React__default['default'].createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue),
|
7903
7982
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7904
7983
|
onChange: (e) => {
|
7905
|
-
setText(e);
|
7906
|
-
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7907
|
-
const input = sanitizeInput(e.target.value);
|
7908
|
-
if (onChange) {
|
7909
|
-
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(input) : formatPhoneNumber(input));
|
7910
|
-
}
|
7984
|
+
setText(e.target.value);
|
7911
7985
|
}, placeholder: props.strings.placeholderText, "data-test-id": "dialpad-input", onRenderSuffix: () => {
|
7912
7986
|
var _a;
|
7913
|
-
return (React__default['default'].createElement(React__default['default'].Fragment, null, showDeleteButton &&
|
7987
|
+
return (React__default['default'].createElement(React__default['default'].Fragment, null, showDeleteButton && plainTextValue.length !== 0 && (React__default['default'].createElement(react.IconButton, { ariaLabel: props.strings.deleteButtonAriaLabel, onClick: deleteNumbers, styles: react.concatStyleSets(iconButtonStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.deleteIcon), iconProps: { iconName: 'BackSpace' } }))));
|
7914
7988
|
} }),
|
7915
7989
|
React__default['default'].createElement(react.FocusZone, null, dialPadButtonsDefault.map((rows, rowIndex) => {
|
7916
7990
|
return (React__default['default'].createElement(react.Stack, { horizontal: true, key: `row_${rowIndex}`, horizontalAlign: "stretch" }, rows.map((button, columnIndex) => (React__default['default'].createElement(DialpadButton, { key: `button_${columnIndex}`,
|
@@ -7931,7 +8005,7 @@ const DialpadContainer = (props) => {
|
|
7931
8005
|
then use this index to locate the corresponding dtmf tones
|
7932
8006
|
DtmfTones[index]
|
7933
8007
|
*/
|
7934
|
-
index: columnIndex + rowIndex * rows.length,
|
8008
|
+
index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad })))));
|
7935
8009
|
}))));
|
7936
8010
|
};
|
7937
8011
|
/**
|
@@ -7950,6 +8024,10 @@ const Dialpad = (props) => {
|
|
7950
8024
|
const strings = Object.assign(Object.assign({}, dialpadLocaleStringsTrampoline()), props.strings);
|
7951
8025
|
return React__default['default'].createElement(DialpadContainer, Object.assign({ strings: strings }, props));
|
7952
8026
|
};
|
8027
|
+
const sanitizeInput = (input) => {
|
8028
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
8029
|
+
return input.replace(/[^\d*#+]/g, '');
|
8030
|
+
};
|
7953
8031
|
|
7954
8032
|
// Copyright (c) Microsoft Corporation.
|
7955
8033
|
/**
|
@@ -7964,7 +8042,7 @@ const Dialpad = (props) => {
|
|
7964
8042
|
const HoldButton = (props) => {
|
7965
8043
|
const { onToggleHold, strings } = props;
|
7966
8044
|
const onRenderHoldIcon = () => {
|
7967
|
-
return React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "
|
8045
|
+
return React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "HoldCallButton" });
|
7968
8046
|
};
|
7969
8047
|
const onRenderResumeIcon = () => {
|
7970
8048
|
return React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "ResumeCall" });
|
@@ -8414,7 +8492,7 @@ const findConditionalCompiledSelector = (component) => {
|
|
8414
8492
|
|
8415
8493
|
// Copyright (c) Microsoft Corporation.
|
8416
8494
|
// Licensed under the MIT license.
|
8417
|
-
var __awaiter$
|
8495
|
+
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
8418
8496
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
8419
8497
|
return new (P || (P = Promise))(function (resolve, reject) {
|
8420
8498
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -8437,35 +8515,35 @@ const createDefaultChatHandlers = memoizeOne__default['default']((chatClient, ch
|
|
8437
8515
|
let messageIterator = undefined;
|
8438
8516
|
let readReceiptIterator = undefined;
|
8439
8517
|
return {
|
8440
|
-
onSendMessage: (content, options) => __awaiter$
|
8518
|
+
onSendMessage: (content, options) => __awaiter$o(void 0, void 0, void 0, function* () {
|
8441
8519
|
const sendMessageRequest = {
|
8442
8520
|
content,
|
8443
8521
|
senderDisplayName: chatClient.getState().displayName
|
8444
8522
|
};
|
8445
8523
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
8446
8524
|
}),
|
8447
|
-
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$
|
8525
|
+
onUpdateMessage: (messageId, content, metadata, options) => __awaiter$o(void 0, void 0, void 0, function* () {
|
8448
8526
|
const updatedMetadata = metadata ? Object.assign({}, metadata) : {};
|
8449
8527
|
updatedMetadata['fileSharingMetadata'] = JSON.stringify((options === null || options === void 0 ? void 0 : options.attachedFilesMetadata) || []);
|
8450
8528
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
8451
8529
|
}),
|
8452
|
-
onDeleteMessage: (messageId) => __awaiter$
|
8530
|
+
onDeleteMessage: (messageId) => __awaiter$o(void 0, void 0, void 0, function* () {
|
8453
8531
|
yield chatThreadClient.deleteMessage(messageId);
|
8454
8532
|
}),
|
8455
8533
|
// This handler is designed for chatThread to consume
|
8456
|
-
onMessageSeen: (chatMessageId) => __awaiter$
|
8534
|
+
onMessageSeen: (chatMessageId) => __awaiter$o(void 0, void 0, void 0, function* () {
|
8457
8535
|
yield chatThreadClient.sendReadReceipt({ chatMessageId });
|
8458
8536
|
}),
|
8459
|
-
onTyping: () => __awaiter$
|
8537
|
+
onTyping: () => __awaiter$o(void 0, void 0, void 0, function* () {
|
8460
8538
|
yield chatThreadClient.sendTypingNotification();
|
8461
8539
|
}),
|
8462
|
-
onRemoveParticipant: (userId) => __awaiter$
|
8540
|
+
onRemoveParticipant: (userId) => __awaiter$o(void 0, void 0, void 0, function* () {
|
8463
8541
|
yield chatThreadClient.removeParticipant(fromFlatCommunicationIdentifier(userId));
|
8464
8542
|
}),
|
8465
|
-
updateThreadTopicName: (topicName) => __awaiter$
|
8543
|
+
updateThreadTopicName: (topicName) => __awaiter$o(void 0, void 0, void 0, function* () {
|
8466
8544
|
yield chatThreadClient.updateTopic(topicName);
|
8467
8545
|
}),
|
8468
|
-
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$
|
8546
|
+
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$o(void 0, void 0, void 0, function* () {
|
8469
8547
|
var _a, _b, _c;
|
8470
8548
|
if (messageIterator === undefined) {
|
8471
8549
|
// Lazy definition so that errors in the method call are reported correctly.
|
@@ -9156,7 +9234,7 @@ const findSelector = (component) => {
|
|
9156
9234
|
|
9157
9235
|
// Copyright (c) Microsoft Corporation.
|
9158
9236
|
// Licensed under the MIT license.
|
9159
|
-
var __awaiter$
|
9237
|
+
var __awaiter$n = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9160
9238
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9161
9239
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9162
9240
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9205,10 +9283,10 @@ class ProxyDeviceManager {
|
|
9205
9283
|
this.selectCamera = (videoDeviceInfo) => {
|
9206
9284
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
9207
9285
|
};
|
9208
|
-
this.videoDevicesUpdated = () => __awaiter$
|
9286
|
+
this.videoDevicesUpdated = () => __awaiter$n(this, void 0, void 0, function* () {
|
9209
9287
|
this._context.setDeviceManagerCameras(dedupeById(yield this._deviceManager.getCameras()));
|
9210
9288
|
});
|
9211
|
-
this.audioDevicesUpdated = () => __awaiter$
|
9289
|
+
this.audioDevicesUpdated = () => __awaiter$n(this, void 0, void 0, function* () {
|
9212
9290
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
9213
9291
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
9214
9292
|
});
|
@@ -9411,7 +9489,7 @@ class CallIdHistory {
|
|
9411
9489
|
|
9412
9490
|
// Copyright (c) Microsoft Corporation.
|
9413
9491
|
// Licensed under the MIT license.
|
9414
|
-
var __awaiter$
|
9492
|
+
var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9415
9493
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9416
9494
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9417
9495
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9896,7 +9974,7 @@ class CallContext$1 {
|
|
9896
9974
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
9897
9975
|
*/
|
9898
9976
|
withAsyncErrorTeedToState(action, target) {
|
9899
|
-
return (...args) => __awaiter$
|
9977
|
+
return (...args) => __awaiter$m(this, void 0, void 0, function* () {
|
9900
9978
|
try {
|
9901
9979
|
return yield action(...args);
|
9902
9980
|
}
|
@@ -9960,7 +10038,7 @@ const findOldestCallEnded = (calls) => {
|
|
9960
10038
|
|
9961
10039
|
// Copyright (c) Microsoft Corporation.
|
9962
10040
|
// Licensed under the MIT license.
|
9963
|
-
var __awaiter$
|
10041
|
+
var __awaiter$l = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
9964
10042
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
9965
10043
|
return new (P || (P = Promise))(function (resolve, reject) {
|
9966
10044
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -9980,63 +10058,63 @@ class ProxyCall {
|
|
9980
10058
|
switch (prop) {
|
9981
10059
|
case 'mute': {
|
9982
10060
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9983
|
-
return __awaiter$
|
10061
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
9984
10062
|
return yield target.mute(...args);
|
9985
10063
|
});
|
9986
10064
|
}, 'Call.mute');
|
9987
10065
|
}
|
9988
10066
|
case 'unmute': {
|
9989
10067
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9990
|
-
return __awaiter$
|
10068
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
9991
10069
|
return yield target.unmute(...args);
|
9992
10070
|
});
|
9993
10071
|
}, 'Call.unmute');
|
9994
10072
|
}
|
9995
10073
|
case 'startVideo': {
|
9996
10074
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
9997
|
-
return __awaiter$
|
10075
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
9998
10076
|
return yield target.startVideo(...args);
|
9999
10077
|
});
|
10000
10078
|
}, 'Call.startVideo');
|
10001
10079
|
}
|
10002
10080
|
case 'stopVideo': {
|
10003
10081
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10004
|
-
return __awaiter$
|
10082
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
10005
10083
|
return yield target.stopVideo(...args);
|
10006
10084
|
});
|
10007
10085
|
}, 'Call.stopVideo');
|
10008
10086
|
}
|
10009
10087
|
case 'startScreenSharing': {
|
10010
10088
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10011
|
-
return __awaiter$
|
10089
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
10012
10090
|
return yield target.startScreenSharing(...args);
|
10013
10091
|
});
|
10014
10092
|
}, 'Call.startScreenSharing');
|
10015
10093
|
}
|
10016
10094
|
case 'stopScreenSharing': {
|
10017
10095
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10018
|
-
return __awaiter$
|
10096
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
10019
10097
|
return yield target.stopScreenSharing(...args);
|
10020
10098
|
});
|
10021
10099
|
}, 'Call.stopScreenSharing');
|
10022
10100
|
}
|
10023
10101
|
case 'hold': {
|
10024
10102
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10025
|
-
return __awaiter$
|
10103
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
10026
10104
|
return yield target.hold(...args);
|
10027
10105
|
});
|
10028
10106
|
}, 'Call.hold');
|
10029
10107
|
}
|
10030
10108
|
case 'resume': {
|
10031
10109
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10032
|
-
return __awaiter$
|
10110
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
10033
10111
|
return yield target.resume(...args);
|
10034
10112
|
});
|
10035
10113
|
}, 'Call.resume');
|
10036
10114
|
}
|
10037
10115
|
case 'addParticipant': {
|
10038
10116
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
10039
|
-
return __awaiter$
|
10117
|
+
return __awaiter$l(this, void 0, void 0, function* () {
|
10040
10118
|
return yield target.addParticipant(...args);
|
10041
10119
|
});
|
10042
10120
|
}, 'Call.addParticipant');
|
@@ -10244,7 +10322,7 @@ class RemoteVideoStreamSubscriber {
|
|
10244
10322
|
|
10245
10323
|
// Copyright (c) Microsoft Corporation.
|
10246
10324
|
// Licensed under the MIT license.
|
10247
|
-
var __awaiter$
|
10325
|
+
var __awaiter$k = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10248
10326
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10249
10327
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10250
10328
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10254,7 +10332,7 @@ var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
10254
10332
|
});
|
10255
10333
|
};
|
10256
10334
|
function createViewRemoteVideo(context, internalContext, callId, participantId, stream, options) {
|
10257
|
-
return __awaiter$
|
10335
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
10258
10336
|
// Render RemoteVideoStream that is part of a Call
|
10259
10337
|
const streamId = stream.id;
|
10260
10338
|
let participantKey;
|
@@ -10362,7 +10440,7 @@ function createViewRemoteVideo(context, internalContext, callId, participantId,
|
|
10362
10440
|
});
|
10363
10441
|
}
|
10364
10442
|
function createViewLocalVideo(context, internalContext, callId, options) {
|
10365
|
-
return __awaiter$
|
10443
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
10366
10444
|
_logEvent(callingStatefulLogger, {
|
10367
10445
|
name: EventNames.START_LOCAL_STREAM_RENDERING,
|
10368
10446
|
level: 'info',
|
@@ -10478,7 +10556,7 @@ function createViewLocalVideo(context, internalContext, callId, options) {
|
|
10478
10556
|
});
|
10479
10557
|
}
|
10480
10558
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
10481
|
-
return __awaiter$
|
10559
|
+
return __awaiter$k(this, void 0, void 0, function* () {
|
10482
10560
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
10483
10561
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
10484
10562
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -11106,7 +11184,7 @@ class CallSubscriber {
|
|
11106
11184
|
|
11107
11185
|
// Copyright (c) Microsoft Corporation.
|
11108
11186
|
// Licensed under the MIT license.
|
11109
|
-
var __awaiter$
|
11187
|
+
var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11110
11188
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11111
11189
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11112
11190
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11126,14 +11204,14 @@ class ProxyIncomingCall {
|
|
11126
11204
|
switch (prop) {
|
11127
11205
|
case 'accept': {
|
11128
11206
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
11129
|
-
return __awaiter$
|
11207
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
11130
11208
|
return yield target.accept(...args);
|
11131
11209
|
});
|
11132
11210
|
}, 'IncomingCall.accept');
|
11133
11211
|
}
|
11134
11212
|
case 'reject': {
|
11135
11213
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
11136
|
-
return __awaiter$
|
11214
|
+
return __awaiter$j(this, void 0, void 0, function* () {
|
11137
11215
|
return yield target.reject(...args);
|
11138
11216
|
});
|
11139
11217
|
}, 'IncomingCall.reject');
|
@@ -11471,7 +11549,7 @@ class InternalCallContext {
|
|
11471
11549
|
|
11472
11550
|
// Copyright (c) Microsoft Corporation.
|
11473
11551
|
// Licensed under the MIT license.
|
11474
|
-
var __awaiter$
|
11552
|
+
var __awaiter$i = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11475
11553
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11476
11554
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11477
11555
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11493,7 +11571,7 @@ class ProxyCallClient {
|
|
11493
11571
|
get(target, prop) {
|
11494
11572
|
switch (prop) {
|
11495
11573
|
case 'createCallAgent': {
|
11496
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
11574
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$i(this, void 0, void 0, function* () {
|
11497
11575
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
11498
11576
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
11499
11577
|
// callAgent if the createCallAgent succeeds.
|
@@ -11506,7 +11584,7 @@ class ProxyCallClient {
|
|
11506
11584
|
}), 'CallClient.createCallAgent');
|
11507
11585
|
}
|
11508
11586
|
case 'getDeviceManager': {
|
11509
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
11587
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$i(this, void 0, void 0, function* () {
|
11510
11588
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
11511
11589
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
11512
11590
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -11629,7 +11707,7 @@ const chatStatefulLogger = logger.createClientLogger('communication-react:chat-s
|
|
11629
11707
|
|
11630
11708
|
// Copyright (c) Microsoft Corporation.
|
11631
11709
|
// Licensed under the MIT license.
|
11632
|
-
var __awaiter$
|
11710
|
+
var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11633
11711
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11634
11712
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11635
11713
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11904,7 +11982,7 @@ class ChatContext$1 {
|
|
11904
11982
|
* @throws ChatError. Exceptions thrown from `f` are tagged with the failed `target.
|
11905
11983
|
*/
|
11906
11984
|
withAsyncErrorTeedToState(f, target) {
|
11907
|
-
return (...args) => __awaiter$
|
11985
|
+
return (...args) => __awaiter$h(this, void 0, void 0, function* () {
|
11908
11986
|
try {
|
11909
11987
|
return yield f(...args);
|
11910
11988
|
}
|
@@ -12011,7 +12089,7 @@ const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
|
12011
12089
|
|
12012
12090
|
// Copyright (c) Microsoft Corporation.
|
12013
12091
|
// Licensed under the MIT license.
|
12014
|
-
var __awaiter$
|
12092
|
+
var __awaiter$g = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12015
12093
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12016
12094
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12017
12095
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12095,7 +12173,7 @@ class EventSubscriber {
|
|
12095
12173
|
this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
|
12096
12174
|
};
|
12097
12175
|
// This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
|
12098
|
-
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$
|
12176
|
+
this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$g(this, void 0, void 0, function* () {
|
12099
12177
|
var e_1, _a;
|
12100
12178
|
try {
|
12101
12179
|
for (var _b = __asyncValues$1(this.chatClient
|
@@ -12181,7 +12259,7 @@ class EventSubscriber {
|
|
12181
12259
|
|
12182
12260
|
// Copyright (c) Microsoft Corporation.
|
12183
12261
|
// Licensed under the MIT license.
|
12184
|
-
var __awaiter$
|
12262
|
+
var __awaiter$f = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12185
12263
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12186
12264
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12187
12265
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12203,7 +12281,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
12203
12281
|
const threadsIterator = iteratorCreator(...args);
|
12204
12282
|
return {
|
12205
12283
|
next() {
|
12206
|
-
return __awaiter$
|
12284
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
12207
12285
|
const result = yield threadsIterator.next();
|
12208
12286
|
if (!result.done && result.value) {
|
12209
12287
|
decorateFn(result.value, context);
|
@@ -12218,7 +12296,7 @@ const createDecoratedIterator = (iteratorCreator, context, decorateFn) => {
|
|
12218
12296
|
const pages = threadsIterator.byPage(settings);
|
12219
12297
|
return {
|
12220
12298
|
next() {
|
12221
|
-
return __awaiter$
|
12299
|
+
return __awaiter$f(this, void 0, void 0, function* () {
|
12222
12300
|
const result = yield pages.next();
|
12223
12301
|
const page = result.value;
|
12224
12302
|
if (!result.done && result.value) {
|
@@ -12302,7 +12380,7 @@ const createDecoratedListParticipants = (chatThreadClient, context) => {
|
|
12302
12380
|
|
12303
12381
|
// Copyright (c) Microsoft Corporation.
|
12304
12382
|
// Licensed under the MIT license.
|
12305
|
-
var __awaiter$
|
12383
|
+
var __awaiter$e = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12306
12384
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12307
12385
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12308
12386
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12321,14 +12399,14 @@ class ProxyChatThreadClient {
|
|
12321
12399
|
return createDecoratedListMessages(chatThreadClient, this._context);
|
12322
12400
|
}
|
12323
12401
|
case 'getMessage': {
|
12324
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12402
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12325
12403
|
const message = yield chatThreadClient.getMessage(...args);
|
12326
12404
|
this._context.setChatMessage(chatThreadClient.threadId, convertChatMessage(message));
|
12327
12405
|
return message;
|
12328
12406
|
}), 'ChatThreadClient.getMessage');
|
12329
12407
|
}
|
12330
12408
|
case 'sendMessage': {
|
12331
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12409
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12332
12410
|
// Retry logic?
|
12333
12411
|
const [request, options] = args;
|
12334
12412
|
const { content } = request;
|
@@ -12368,7 +12446,7 @@ class ProxyChatThreadClient {
|
|
12368
12446
|
}), 'ChatThreadClient.sendMessage');
|
12369
12447
|
}
|
12370
12448
|
case 'addParticipants': {
|
12371
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12449
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12372
12450
|
const result = yield chatThreadClient.addParticipants(...args);
|
12373
12451
|
const [addRequest] = args;
|
12374
12452
|
const participantsToAdd = addRequest.participants;
|
@@ -12377,7 +12455,7 @@ class ProxyChatThreadClient {
|
|
12377
12455
|
}), 'ChatThreadClient.addParticipants');
|
12378
12456
|
}
|
12379
12457
|
case 'deleteMessage': {
|
12380
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12458
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12381
12459
|
// DeleteMessage is able to either delete local one(for failed message) or synced message
|
12382
12460
|
const [messageId] = args;
|
12383
12461
|
if (this._context.deleteLocalMessage(chatThreadClient.threadId, messageId)) {
|
@@ -12395,7 +12473,7 @@ class ProxyChatThreadClient {
|
|
12395
12473
|
return createDecoratedListReadReceipts(chatThreadClient, this._context);
|
12396
12474
|
}
|
12397
12475
|
case 'removeParticipant': {
|
12398
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12476
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12399
12477
|
const result = yield chatThreadClient.removeParticipant(...args);
|
12400
12478
|
const [removeIdentifier] = args;
|
12401
12479
|
this._context.deleteParticipant(chatThreadClient.threadId, communicationCommon.getIdentifierKind(removeIdentifier));
|
@@ -12403,7 +12481,7 @@ class ProxyChatThreadClient {
|
|
12403
12481
|
}), 'ChatThreadClient.removeParticipant');
|
12404
12482
|
}
|
12405
12483
|
case 'updateMessage': {
|
12406
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12484
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12407
12485
|
const result = yield chatThreadClient.updateMessage(...args);
|
12408
12486
|
const [messageId, updateOption] = args;
|
12409
12487
|
this._context.updateChatMessageContent(chatThreadClient.threadId, messageId, updateOption === null || updateOption === void 0 ? void 0 : updateOption.content);
|
@@ -12411,7 +12489,7 @@ class ProxyChatThreadClient {
|
|
12411
12489
|
}), 'ChatThreadClient.updateMessage');
|
12412
12490
|
}
|
12413
12491
|
case 'updateTopic': {
|
12414
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12492
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12415
12493
|
const result = yield chatThreadClient.updateTopic(...args);
|
12416
12494
|
const [topic] = args;
|
12417
12495
|
this._context.updateThreadTopic(chatThreadClient.threadId, topic);
|
@@ -12419,7 +12497,7 @@ class ProxyChatThreadClient {
|
|
12419
12497
|
}), 'ChatThreadClient.updateTopic');
|
12420
12498
|
}
|
12421
12499
|
case 'getProperties': {
|
12422
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
12500
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$e(this, void 0, void 0, function* () {
|
12423
12501
|
const result = yield chatThreadClient.getProperties(...args);
|
12424
12502
|
this._context.updateThread(chatThreadClient.threadId, result);
|
12425
12503
|
return result;
|
@@ -12456,7 +12534,7 @@ const createDecoratedListThreads = (chatClient, context) => {
|
|
12456
12534
|
|
12457
12535
|
// Copyright (c) Microsoft Corporation.
|
12458
12536
|
// Licensed under the MIT license.
|
12459
|
-
var __awaiter$
|
12537
|
+
var __awaiter$d = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
12460
12538
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
12461
12539
|
return new (P || (P = Promise))(function (resolve, reject) {
|
12462
12540
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -12475,7 +12553,7 @@ const proxyChatClient = {
|
|
12475
12553
|
switch (prop) {
|
12476
12554
|
case 'createChatThread': {
|
12477
12555
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12478
|
-
return __awaiter$
|
12556
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
12479
12557
|
const result = yield chatClient.createChatThread(...args);
|
12480
12558
|
const thread = result.chatThread;
|
12481
12559
|
if (thread) {
|
@@ -12488,7 +12566,7 @@ const proxyChatClient = {
|
|
12488
12566
|
}
|
12489
12567
|
case 'deleteChatThread': {
|
12490
12568
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12491
|
-
return __awaiter$
|
12569
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
12492
12570
|
const result = yield chatClient.deleteChatThread(...args);
|
12493
12571
|
context.deleteThread(args[0]);
|
12494
12572
|
return result;
|
@@ -12508,7 +12586,7 @@ const proxyChatClient = {
|
|
12508
12586
|
}
|
12509
12587
|
case 'startRealtimeNotifications': {
|
12510
12588
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12511
|
-
return __awaiter$
|
12589
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
12512
12590
|
const ret = yield chatClient.startRealtimeNotifications(...args);
|
12513
12591
|
if (!receiver.eventSubscriber) {
|
12514
12592
|
receiver.eventSubscriber = new EventSubscriber(chatClient, context);
|
@@ -12519,7 +12597,7 @@ const proxyChatClient = {
|
|
12519
12597
|
}
|
12520
12598
|
case 'stopRealtimeNotifications': {
|
12521
12599
|
return context.withAsyncErrorTeedToState(function (...args) {
|
12522
|
-
return __awaiter$
|
12600
|
+
return __awaiter$d(this, void 0, void 0, function* () {
|
12523
12601
|
const ret = yield chatClient.stopRealtimeNotifications(...args);
|
12524
12602
|
if (receiver.eventSubscriber) {
|
12525
12603
|
receiver.eventSubscriber.unsubscribe();
|
@@ -12706,7 +12784,7 @@ const CallCompositeIcon = (props) => (React__default['default'].createElement(re
|
|
12706
12784
|
*/
|
12707
12785
|
const CallWithChatCompositeIcon = (props) => (React__default['default'].createElement(react.FontIcon, Object.assign({}, props)));
|
12708
12786
|
|
12709
|
-
var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",peopleButtonLabel:"People",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",soundLabel:"Sound",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close Dialpad",moreButtonCallingLabel:"More",resumeCallButtonLabel:"Resume",resumeCallButtonAriaLabel:"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",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};
|
12787
|
+
var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",peopleButtonLabel:"People",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",soundLabel:"Sound",startCallButtonLabel:"Start call",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",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};
|
12710
12788
|
|
12711
12789
|
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};
|
12712
12790
|
|
@@ -13108,7 +13186,7 @@ const convertObservableFileUploadToFileUploadsUiState = (fileUploads) => {
|
|
13108
13186
|
|
13109
13187
|
// Copyright (c) Microsoft Corporation.
|
13110
13188
|
// Licensed under the MIT license.
|
13111
|
-
var __awaiter$
|
13189
|
+
var __awaiter$c = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13112
13190
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13113
13191
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13114
13192
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13234,9 +13312,9 @@ class AzureCommunicationChatAdapter {
|
|
13234
13312
|
this.unsubscribeAllEvents();
|
13235
13313
|
}
|
13236
13314
|
fetchInitialData() {
|
13237
|
-
return __awaiter$
|
13315
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13238
13316
|
// If get properties fails we dont want to try to get the participants after.
|
13239
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13317
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13240
13318
|
var e_1, _a;
|
13241
13319
|
yield this.chatThreadClient.getProperties();
|
13242
13320
|
try {
|
@@ -13270,8 +13348,8 @@ class AzureCommunicationChatAdapter {
|
|
13270
13348
|
this.context.offStateChange(handler);
|
13271
13349
|
}
|
13272
13350
|
sendMessage(content, options = {}) {
|
13273
|
-
return __awaiter$
|
13274
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13351
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13352
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13275
13353
|
/* @conditional-compile-remove(file-sharing) */
|
13276
13354
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
13277
13355
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -13288,49 +13366,49 @@ class AzureCommunicationChatAdapter {
|
|
13288
13366
|
});
|
13289
13367
|
}
|
13290
13368
|
sendReadReceipt(chatMessageId) {
|
13291
|
-
return __awaiter$
|
13292
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13369
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13370
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13293
13371
|
yield this.handlers.onMessageSeen(chatMessageId);
|
13294
13372
|
}));
|
13295
13373
|
});
|
13296
13374
|
}
|
13297
13375
|
sendTypingIndicator() {
|
13298
|
-
return __awaiter$
|
13376
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13299
13377
|
yield this.handlers.onTyping();
|
13300
13378
|
});
|
13301
13379
|
}
|
13302
13380
|
removeParticipant(userId) {
|
13303
|
-
return __awaiter$
|
13304
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13381
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13382
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13305
13383
|
yield this.handlers.onRemoveParticipant(userId);
|
13306
13384
|
}));
|
13307
13385
|
});
|
13308
13386
|
}
|
13309
13387
|
setTopic(topicName) {
|
13310
|
-
return __awaiter$
|
13311
|
-
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13388
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13389
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13312
13390
|
yield this.handlers.updateThreadTopicName(topicName);
|
13313
13391
|
}));
|
13314
13392
|
});
|
13315
13393
|
}
|
13316
13394
|
loadPreviousChatMessages(messagesToLoad) {
|
13317
|
-
return __awaiter$
|
13318
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13395
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13396
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13319
13397
|
return yield this.handlers.onLoadPreviousChatMessages(messagesToLoad);
|
13320
13398
|
}));
|
13321
13399
|
});
|
13322
13400
|
}
|
13323
13401
|
updateMessage(messageId, content, metadata, options) {
|
13324
|
-
return __awaiter$
|
13325
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13402
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13403
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13326
13404
|
/* @conditional-compile-remove(file-sharing) */
|
13327
13405
|
return yield this.handlers.onUpdateMessage(messageId, content, metadata, options);
|
13328
13406
|
}));
|
13329
13407
|
});
|
13330
13408
|
}
|
13331
13409
|
deleteMessage(messageId) {
|
13332
|
-
return __awaiter$
|
13333
|
-
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$
|
13410
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13411
|
+
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$c(this, void 0, void 0, function* () {
|
13334
13412
|
return yield this.handlers.onDeleteMessage(messageId);
|
13335
13413
|
}));
|
13336
13414
|
});
|
@@ -13411,7 +13489,7 @@ class AzureCommunicationChatAdapter {
|
|
13411
13489
|
this.emitter.off(event, listener);
|
13412
13490
|
}
|
13413
13491
|
asyncTeeErrorToEventEmitter(f) {
|
13414
|
-
return __awaiter$
|
13492
|
+
return __awaiter$c(this, void 0, void 0, function* () {
|
13415
13493
|
try {
|
13416
13494
|
return yield f();
|
13417
13495
|
}
|
@@ -13453,7 +13531,7 @@ const convertEventType = (type) => {
|
|
13453
13531
|
*
|
13454
13532
|
* @public
|
13455
13533
|
*/
|
13456
|
-
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$
|
13534
|
+
const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) => __awaiter$c(void 0, void 0, void 0, function* () {
|
13457
13535
|
const chatClient = createStatefulChatClient({
|
13458
13536
|
userId,
|
13459
13537
|
displayName,
|
@@ -13516,7 +13594,7 @@ beforeDispose) => {
|
|
13516
13594
|
if (!credential || !displayName || !endpoint || !threadId || !userId) {
|
13517
13595
|
return;
|
13518
13596
|
}
|
13519
|
-
(() => __awaiter$
|
13597
|
+
(() => __awaiter$c(void 0, void 0, void 0, function* () {
|
13520
13598
|
if (adapterRef.current) {
|
13521
13599
|
// Dispose the old adapter when a new one is created.
|
13522
13600
|
//
|
@@ -13548,7 +13626,7 @@ beforeDispose) => {
|
|
13548
13626
|
// Dispose any existing adapter when the component unmounts.
|
13549
13627
|
React.useEffect(() => {
|
13550
13628
|
return () => {
|
13551
|
-
(() => __awaiter$
|
13629
|
+
(() => __awaiter$c(void 0, void 0, void 0, function* () {
|
13552
13630
|
if (adapterRef.current) {
|
13553
13631
|
if (beforeDisposeRef.current) {
|
13554
13632
|
yield beforeDisposeRef.current(adapterRef.current);
|
@@ -13569,7 +13647,7 @@ beforeDispose) => {
|
|
13569
13647
|
*
|
13570
13648
|
* @public
|
13571
13649
|
*/
|
13572
|
-
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$
|
13650
|
+
const createAzureCommunicationChatAdapterFromClient = (chatClient, chatThreadClient) => __awaiter$c(void 0, void 0, void 0, function* () {
|
13573
13651
|
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
13574
13652
|
});
|
13575
13653
|
const isChatError = (e) => {
|
@@ -13771,7 +13849,7 @@ const sendboxContainerStyles = {
|
|
13771
13849
|
|
13772
13850
|
// Copyright (c) Microsoft Corporation.
|
13773
13851
|
// Licensed under the MIT license.
|
13774
|
-
var __awaiter$
|
13852
|
+
var __awaiter$b = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13775
13853
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13776
13854
|
return new (P || (P = Promise))(function (resolve, reject) {
|
13777
13855
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -13792,7 +13870,7 @@ const AvatarPersona = (props) => {
|
|
13792
13870
|
const { userId, dataProvider, text, imageUrl, imageInitials, initialsColor, initialsTextColor, showOverflowTooltip } = props;
|
13793
13871
|
const [data, setData] = React.useState();
|
13794
13872
|
React.useEffect(() => {
|
13795
|
-
(() => __awaiter$
|
13873
|
+
(() => __awaiter$b(void 0, void 0, void 0, function* () {
|
13796
13874
|
if (dataProvider && userId) {
|
13797
13875
|
const newData = yield dataProvider(userId);
|
13798
13876
|
if (avatarDeepDifferenceCheck(data, newData)) {
|
@@ -14528,7 +14606,7 @@ const disableCallControls = (callControlOptions, disabledControls) => {
|
|
14528
14606
|
|
14529
14607
|
// Copyright (c) Microsoft Corporation.
|
14530
14608
|
// Licensed under the MIT license.
|
14531
|
-
var __awaiter$
|
14609
|
+
var __awaiter$a = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14532
14610
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
14533
14611
|
return new (P || (P = Promise))(function (resolve, reject) {
|
14534
14612
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -14547,72 +14625,72 @@ _component) => {
|
|
14547
14625
|
return createCompositeHandlers(useAdapter());
|
14548
14626
|
};
|
14549
14627
|
const createCompositeHandlers = memoizeOne__default['default']((adapter) => ({
|
14550
|
-
onCreateLocalStreamView: (options) => __awaiter$
|
14628
|
+
onCreateLocalStreamView: (options) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14551
14629
|
return yield adapter.createStreamView(undefined, options);
|
14552
14630
|
}),
|
14553
|
-
onCreateRemoteStreamView: (userId, options) => __awaiter$
|
14631
|
+
onCreateRemoteStreamView: (userId, options) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14554
14632
|
return yield adapter.createStreamView(userId, options);
|
14555
14633
|
}),
|
14556
|
-
onHangUp: () => __awaiter$
|
14634
|
+
onHangUp: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14557
14635
|
yield adapter.leaveCall();
|
14558
14636
|
}),
|
14559
14637
|
/* @conditional-compile-remove(PSTN-calls) */
|
14560
|
-
onToggleHold: () => __awaiter$
|
14638
|
+
onToggleHold: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14561
14639
|
var _a;
|
14562
14640
|
return ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold' ? yield adapter.resumeCall() : yield adapter.holdCall();
|
14563
14641
|
}),
|
14564
14642
|
/* @conditional-compile-remove(PSTN-calls) */
|
14565
|
-
onAddParticipant: (participant, options) => __awaiter$
|
14643
|
+
onAddParticipant: (participant, options) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14566
14644
|
return yield adapter.addParticipant(participant, options);
|
14567
14645
|
}),
|
14568
14646
|
/* @conditional-compile-remove(PSTN-calls) */
|
14569
|
-
onSendDtmfTone: (dtmfTone) => __awaiter$
|
14647
|
+
onSendDtmfTone: (dtmfTone) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14570
14648
|
yield adapter.sendDtmfTone(dtmfTone);
|
14571
14649
|
}),
|
14572
|
-
onRemoveParticipant: (userId) => __awaiter$
|
14650
|
+
onRemoveParticipant: (userId) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14573
14651
|
yield adapter.removeParticipant(userId);
|
14574
14652
|
}),
|
14575
|
-
onSelectCamera: (deviceInfo, options) => __awaiter$
|
14653
|
+
onSelectCamera: (deviceInfo, options) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14576
14654
|
yield adapter.setCamera(deviceInfo, options);
|
14577
14655
|
}),
|
14578
|
-
onSelectMicrophone: (deviceInfo) => __awaiter$
|
14656
|
+
onSelectMicrophone: (deviceInfo) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14579
14657
|
yield adapter.setMicrophone(deviceInfo);
|
14580
14658
|
}),
|
14581
|
-
onSelectSpeaker: (deviceInfo) => __awaiter$
|
14659
|
+
onSelectSpeaker: (deviceInfo) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14582
14660
|
yield adapter.setSpeaker(deviceInfo);
|
14583
14661
|
}),
|
14584
14662
|
onStartCall: (participants, options) => {
|
14585
14663
|
const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));
|
14586
14664
|
return adapter.startCall(rawIds, options);
|
14587
14665
|
},
|
14588
|
-
onStartScreenShare: () => __awaiter$
|
14666
|
+
onStartScreenShare: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14589
14667
|
yield adapter.startScreenShare();
|
14590
14668
|
}),
|
14591
|
-
onStopScreenShare: () => __awaiter$
|
14669
|
+
onStopScreenShare: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14592
14670
|
yield adapter.stopScreenShare();
|
14593
14671
|
}),
|
14594
|
-
onToggleCamera: (options) => __awaiter$
|
14672
|
+
onToggleCamera: (options) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14595
14673
|
isCameraOn(adapter.getState()) ? yield adapter.stopCamera() : yield adapter.startCamera(options);
|
14596
14674
|
}),
|
14597
|
-
onToggleMicrophone: () => __awaiter$
|
14675
|
+
onToggleMicrophone: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14598
14676
|
var _b;
|
14599
14677
|
return ((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.isMuted) ? yield adapter.unmute() : yield adapter.mute();
|
14600
14678
|
}),
|
14601
|
-
onToggleScreenShare: () => __awaiter$
|
14679
|
+
onToggleScreenShare: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14602
14680
|
var _c;
|
14603
14681
|
return ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.isScreenSharingOn)
|
14604
14682
|
? yield adapter.stopScreenShare()
|
14605
14683
|
: yield adapter.startScreenShare();
|
14606
14684
|
}),
|
14607
|
-
onStartLocalVideo: () => __awaiter$
|
14685
|
+
onStartLocalVideo: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14608
14686
|
if (adapter.getState().call) {
|
14609
14687
|
return adapter.startCamera();
|
14610
14688
|
}
|
14611
14689
|
}),
|
14612
|
-
onDisposeLocalStreamView: () => __awaiter$
|
14690
|
+
onDisposeLocalStreamView: () => __awaiter$a(void 0, void 0, void 0, function* () {
|
14613
14691
|
return adapter.disposeStreamView();
|
14614
14692
|
}),
|
14615
|
-
onDisposeRemoteStreamView: (userId) => __awaiter$
|
14693
|
+
onDisposeRemoteStreamView: (userId) => __awaiter$a(void 0, void 0, void 0, function* () {
|
14616
14694
|
return adapter.disposeStreamView(userId);
|
14617
14695
|
})
|
14618
14696
|
}));
|
@@ -14675,7 +14753,8 @@ const buttonFlyoutIncreasedSizeStyles = {
|
|
14675
14753
|
maxHeight: 'unset'
|
14676
14754
|
},
|
14677
14755
|
icon: {
|
14678
|
-
maxHeight: 'unset'
|
14756
|
+
maxHeight: 'unset',
|
14757
|
+
textAlign: 'center'
|
14679
14758
|
}
|
14680
14759
|
};
|
14681
14760
|
/**
|
@@ -14977,13 +15056,14 @@ const themedDialpadStyle$1 = (isMobile, theme) => ({
|
|
14977
15056
|
backgroundColor: theme.palette.white,
|
14978
15057
|
fontSize: theme.fonts.large.fontSize,
|
14979
15058
|
padding: '0 0.5rem ',
|
15059
|
+
direction: 'rtl',
|
14980
15060
|
textAlign: 'center',
|
14981
15061
|
':active': {
|
14982
15062
|
padding: '0 0.5rem'
|
14983
15063
|
}
|
14984
15064
|
}
|
14985
15065
|
},
|
14986
|
-
|
15066
|
+
digit: {
|
14987
15067
|
color: theme.palette.themeDarkAlt
|
14988
15068
|
}
|
14989
15069
|
});
|
@@ -15095,7 +15175,7 @@ const CallControls = (props) => {
|
|
15095
15175
|
props.onPeopleButtonClicked();
|
15096
15176
|
}
|
15097
15177
|
},
|
15098
|
-
iconProps: { iconName: '
|
15178
|
+
iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },
|
15099
15179
|
itemProps: {
|
15100
15180
|
styles: buttonFlyoutIncreasedSizeStyles
|
15101
15181
|
},
|
@@ -15108,7 +15188,7 @@ const CallControls = (props) => {
|
|
15108
15188
|
onClick: () => {
|
15109
15189
|
holdButtonProps.onToggleHold();
|
15110
15190
|
},
|
15111
|
-
iconProps: { iconName: '
|
15191
|
+
iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },
|
15112
15192
|
itemProps: {
|
15113
15193
|
styles: buttonFlyoutIncreasedSizeStyles
|
15114
15194
|
},
|
@@ -15122,7 +15202,7 @@ const CallControls = (props) => {
|
|
15122
15202
|
onClick: () => {
|
15123
15203
|
setShowDialpad(true);
|
15124
15204
|
},
|
15125
|
-
iconProps: { iconName: '
|
15205
|
+
iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },
|
15126
15206
|
itemProps: {
|
15127
15207
|
styles: buttonFlyoutIncreasedSizeStyles
|
15128
15208
|
}
|
@@ -15651,13 +15731,14 @@ const themedDialpadStyle = (isMobile, theme) => ({
|
|
15651
15731
|
backgroundColor: theme.palette.white,
|
15652
15732
|
fontSize: theme.fonts.large.fontSize,
|
15653
15733
|
padding: '0 0.5rem',
|
15734
|
+
direction: 'rtl',
|
15654
15735
|
textAlign: isMobile ? 'center' : 'left',
|
15655
15736
|
':active': {
|
15656
15737
|
padding: '0 0.5rem'
|
15657
15738
|
}
|
15658
15739
|
}
|
15659
15740
|
},
|
15660
|
-
|
15741
|
+
digit: {
|
15661
15742
|
color: theme.palette.themeDarkAlt
|
15662
15743
|
}
|
15663
15744
|
});
|
@@ -15849,7 +15930,7 @@ const AddPeopleButton = (props) => {
|
|
15849
15930
|
|
15850
15931
|
// Copyright (c) Microsoft Corporation.
|
15851
15932
|
// Licensed under the MIT license.
|
15852
|
-
var __awaiter$
|
15933
|
+
var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
15853
15934
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15854
15935
|
return new (P || (P = Promise))(function (resolve, reject) {
|
15855
15936
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -15864,10 +15945,11 @@ var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
15864
15945
|
const PeoplePaneContent = (props) => {
|
15865
15946
|
const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings, onRemoveParticipant } = props;
|
15866
15947
|
const participantListDefaultProps = usePropsFor$1(ParticipantList);
|
15948
|
+
const disableRemoveButton = !hasRemoveParticipantsPermissionTrampoline();
|
15867
15949
|
const setDrawerMenuItemsForParticipant = React.useMemo(() => {
|
15868
15950
|
return (participant) => {
|
15869
15951
|
if (participant) {
|
15870
|
-
let contextualMenuItems = createDefaultContextualMenuItems(participant, strings, participantListDefaultProps.onRemoveParticipant, participantListDefaultProps.myUserId);
|
15952
|
+
let contextualMenuItems = createDefaultContextualMenuItems(participant, strings, participantListDefaultProps.onRemoveParticipant, participantListDefaultProps.myUserId, disableRemoveButton);
|
15871
15953
|
if (onFetchParticipantMenuItems) {
|
15872
15954
|
contextualMenuItems = onFetchParticipantMenuItems(participant.userId, participantListDefaultProps.myUserId, contextualMenuItems);
|
15873
15955
|
}
|
@@ -15879,11 +15961,12 @@ const PeoplePaneContent = (props) => {
|
|
15879
15961
|
strings,
|
15880
15962
|
participantListDefaultProps.onRemoveParticipant,
|
15881
15963
|
participantListDefaultProps.myUserId,
|
15964
|
+
disableRemoveButton,
|
15882
15965
|
onFetchParticipantMenuItems,
|
15883
15966
|
setDrawerMenuItems
|
15884
15967
|
]);
|
15885
15968
|
const participantListProps = React.useMemo(() => {
|
15886
|
-
const onRemoveAParticipant = (participantId) => __awaiter$
|
15969
|
+
const onRemoveAParticipant = (participantId) => __awaiter$9(void 0, void 0, void 0, function* () { return onRemoveParticipant(participantId); });
|
15887
15970
|
return Object.assign(Object.assign({}, participantListDefaultProps), {
|
15888
15971
|
// Passing undefined callback for mobile to avoid context menus for participants in ParticipantList are clicked
|
15889
15972
|
onRemoveParticipant: props.mobileView ? undefined : onRemoveAParticipant,
|
@@ -15914,7 +15997,11 @@ const PeoplePaneContent = (props) => {
|
|
15914
15997
|
* @param localParticipantUserId - Local participant user id
|
15915
15998
|
* @returns - IContextualMenuItem[]
|
15916
15999
|
*/
|
15917
|
-
const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId) => {
|
16000
|
+
const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId, disableRemoveButton) => {
|
16001
|
+
let disabled = !participant.isRemovable;
|
16002
|
+
if (disableRemoveButton) {
|
16003
|
+
disabled = disabled || disableRemoveButton;
|
16004
|
+
}
|
15918
16005
|
const menuItems = [];
|
15919
16006
|
if ((participant === null || participant === void 0 ? void 0 : participant.userId) !== localParticipantUserId) {
|
15920
16007
|
menuItems.push({
|
@@ -15928,11 +16015,18 @@ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticip
|
|
15928
16015
|
iconProps: {
|
15929
16016
|
iconName: 'UserRemove'
|
15930
16017
|
},
|
15931
|
-
disabled:
|
16018
|
+
disabled: disabled
|
15932
16019
|
});
|
15933
16020
|
}
|
15934
16021
|
return menuItems;
|
15935
16022
|
};
|
16023
|
+
/**
|
16024
|
+
* @private
|
16025
|
+
*/
|
16026
|
+
const hasRemoveParticipantsPermissionTrampoline = () => {
|
16027
|
+
/* @conditional-compile-remove(rooms) */
|
16028
|
+
return _usePermissions().removeParticipantButton;
|
16029
|
+
};
|
15936
16030
|
|
15937
16031
|
// Copyright (c) Microsoft Corporation.
|
15938
16032
|
/**
|
@@ -16075,7 +16169,7 @@ const useMinMaxDragPosition = (modalLayerHostId, rtl) => {
|
|
16075
16169
|
return { minDragPosition: minDragPosition, maxDragPosition: maxDragPosition };
|
16076
16170
|
};
|
16077
16171
|
|
16078
|
-
var __awaiter$
|
16172
|
+
var __awaiter$8 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16079
16173
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16080
16174
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16081
16175
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16105,11 +16199,11 @@ const CallPane = (props) => {
|
|
16105
16199
|
/**
|
16106
16200
|
* In a Call Composite when a participant is removed, we must remove them from the call.
|
16107
16201
|
*/
|
16108
|
-
const removeParticipantFromCall = (participantId) => __awaiter$
|
16202
|
+
const removeParticipantFromCall = (participantId) => __awaiter$8(void 0, void 0, void 0, function* () {
|
16109
16203
|
yield props.callAdapter.removeParticipant(participantId);
|
16110
16204
|
});
|
16111
16205
|
/* @conditional-compile-remove(PSTN-calls) */
|
16112
|
-
const addParticipantToCall = (participant, options) => __awaiter$
|
16206
|
+
const addParticipantToCall = (participant, options) => __awaiter$8(void 0, void 0, void 0, function* () {
|
16113
16207
|
yield props.callAdapter.addParticipant(participant, options);
|
16114
16208
|
});
|
16115
16209
|
const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);
|
@@ -16818,7 +16912,7 @@ const localPreviewTileStyle = {
|
|
16818
16912
|
|
16819
16913
|
// Copyright (c) Microsoft Corporation.
|
16820
16914
|
// Licensed under the MIT license.
|
16821
|
-
var __awaiter$
|
16915
|
+
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
16822
16916
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
16823
16917
|
return new (P || (P = Promise))(function (resolve, reject) {
|
16824
16918
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -16838,7 +16932,7 @@ const LocalPreview = (props) => {
|
|
16838
16932
|
const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector$1(devicePermissionSelector);
|
16839
16933
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
16840
16934
|
const adapter = useAdapter();
|
16841
|
-
const onToggleMic = React.useCallback(() => __awaiter$
|
16935
|
+
const onToggleMic = React.useCallback(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
16842
16936
|
isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();
|
16843
16937
|
}), [adapter, isLocalMicrophoneEnabled]);
|
16844
16938
|
const theme = useTheme();
|
@@ -16977,6 +17071,15 @@ const ConfigurationPage = (props) => {
|
|
16977
17071
|
const errorBarProps = usePropsFor$1(ErrorBar);
|
16978
17072
|
const adapter = useAdapter();
|
16979
17073
|
const deviceState = adapter.getState().devices;
|
17074
|
+
let disableStartCallButton = !microphonePermissionGranted || ((_a = deviceState.microphones) === null || _a === void 0 ? void 0 : _a.length) === 0;
|
17075
|
+
/* @conditional-compile-remove(rooms) */
|
17076
|
+
const rolePermissions = _usePermissions();
|
17077
|
+
/* @conditional-compile-remove(rooms) */
|
17078
|
+
if (!rolePermissions.microphoneButton) {
|
17079
|
+
// If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button
|
17080
|
+
// because microphone device permission is not needed for the user's role
|
17081
|
+
disableStartCallButton = false;
|
17082
|
+
}
|
16980
17083
|
const locale = useLocale();
|
16981
17084
|
const title = (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop }, locale.strings.call.configurationPageTitle));
|
16982
17085
|
const callDescription = locale.strings.call.configurationPageCallDetails && (React__default['default'].createElement(react.Stack.Item, { className: mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop }, locale.strings.call.configurationPageCallDetails));
|
@@ -16995,7 +17098,7 @@ const ConfigurationPage = (props) => {
|
|
16995
17098
|
callDescription),
|
16996
17099
|
React__default['default'].createElement(LocalDeviceSettings, Object.assign({}, options, localDeviceSettingsHandlers, { cameraPermissionGranted: cameraPermissionGranted, microphonePermissionGranted: microphonePermissionGranted })))),
|
16997
17100
|
React__default['default'].createElement(react.Stack, { styles: mobileView ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop },
|
16998
|
-
React__default['default'].createElement(StartCallButton, { className: mobileView ? startCallButtonStyleMobile : undefined, onClick: startCallHandler, disabled:
|
17101
|
+
React__default['default'].createElement(StartCallButton, { className: mobileView ? startCallButtonStyleMobile : undefined, onClick: startCallHandler, disabled: disableStartCallButton }))))));
|
16999
17102
|
};
|
17000
17103
|
|
17001
17104
|
// Copyright (c) Microsoft Corporation.
|
@@ -17148,6 +17251,11 @@ const resumeButtonStyles = {
|
|
17148
17251
|
fontWeight: 400,
|
17149
17252
|
display: 'flex',
|
17150
17253
|
fontSize: _pxToRem(14)
|
17254
|
+
},
|
17255
|
+
labelDisabled: {
|
17256
|
+
fontWeight: 400,
|
17257
|
+
display: 'flex',
|
17258
|
+
fontSize: _pxToRem(14)
|
17151
17259
|
}
|
17152
17260
|
};
|
17153
17261
|
/**
|
@@ -17205,6 +17313,16 @@ const holdPaneContentStyles = {
|
|
17205
17313
|
};
|
17206
17314
|
|
17207
17315
|
// Copyright (c) Microsoft Corporation.
|
17316
|
+
// Licensed under the MIT license.
|
17317
|
+
var __awaiter$6 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
17318
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
17319
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
17320
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17321
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
17322
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17323
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
17324
|
+
});
|
17325
|
+
};
|
17208
17326
|
/**
|
17209
17327
|
* Hold pane to display when the user places themselves on hold
|
17210
17328
|
*
|
@@ -17218,6 +17336,7 @@ const HoldPane = () => {
|
|
17218
17336
|
const [time, setTime] = React.useState(0);
|
17219
17337
|
const elapsedTime = getReadableTime(time);
|
17220
17338
|
const startTime = React.useRef(performance.now());
|
17339
|
+
const [resumingCall, setResumingCall] = React.useState(false);
|
17221
17340
|
React__default['default'].useEffect(() => {
|
17222
17341
|
const interval = setInterval(() => {
|
17223
17342
|
setTime(performance.now() - startTime.current);
|
@@ -17226,14 +17345,24 @@ const HoldPane = () => {
|
|
17226
17345
|
clearInterval(interval);
|
17227
17346
|
};
|
17228
17347
|
}, [startTime]);
|
17348
|
+
const resumeSpinner = () => {
|
17349
|
+
return React__default['default'].createElement(react.Spinner, { label: strings.resumingCallButtonLabel, labelPosition: 'right' });
|
17350
|
+
};
|
17229
17351
|
return (React__default['default'].createElement(react.Stack, { styles: paneStyles },
|
17230
17352
|
React__default['default'].createElement(react.Stack, { horizontal: true, styles: holdPaneContentStyles },
|
17231
17353
|
React__default['default'].createElement(react.Text, { styles: holdPaneTimerStyles }, elapsedTime),
|
17232
17354
|
React__default['default'].createElement(react.Text, { styles: holdPaneLabelStyles }, strings.holdScreenLabel),
|
17233
|
-
React__default['default'].createElement(react.PrimaryButton, { text: strings.resumeCallButtonLabel, ariaLabel: strings.resumeCallButtonAriaLabel, styles: resumeButtonStyles, onClick: () => {
|
17234
|
-
|
17235
|
-
|
17236
|
-
|
17355
|
+
React__default['default'].createElement(react.PrimaryButton, { text: !resumingCall ? strings.resumeCallButtonLabel : undefined, ariaLabel: !resumingCall ? strings.resumeCallButtonAriaLabel : strings.resumingCallButtonAriaLabel, styles: resumeButtonStyles, disabled: resumingCall, onClick: () => __awaiter$6(void 0, void 0, void 0, function* () {
|
17356
|
+
setResumingCall(true);
|
17357
|
+
try {
|
17358
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
17359
|
+
yield holdButtonProps.onToggleHold();
|
17360
|
+
}
|
17361
|
+
catch (e) {
|
17362
|
+
setResumingCall(false);
|
17363
|
+
throw e;
|
17364
|
+
}
|
17365
|
+
}), "data-ui-id": "hold-page-resume-call-button" }, resumingCall && resumeSpinner()))));
|
17237
17366
|
};
|
17238
17367
|
const getMinutes = (time) => {
|
17239
17368
|
return Math.floor(getSeconds(time) / 60);
|
@@ -17258,7 +17387,9 @@ const stringsTrampoline = (locale) => {
|
|
17258
17387
|
return {
|
17259
17388
|
holdScreenLabel: locale.strings.call.holdScreenLabel,
|
17260
17389
|
resumeCallButtonLabel: locale.strings.call.resumeCallButtonLabel,
|
17261
|
-
resumeCallButtonAriaLabel: locale.strings.call.resumeCallButtonAriaLabel
|
17390
|
+
resumeCallButtonAriaLabel: locale.strings.call.resumeCallButtonAriaLabel,
|
17391
|
+
resumingCallButtonLabel: locale.strings.call.resumingCallButtonLabel,
|
17392
|
+
resumingCallButtonAriaLabel: locale.strings.call.resumingCallButtonAriaLabel
|
17262
17393
|
};
|
17263
17394
|
};
|
17264
17395
|
|
@@ -17720,7 +17851,7 @@ class AzureCommunicationCallAdapter {
|
|
17720
17851
|
});
|
17721
17852
|
}
|
17722
17853
|
_joinCall(audioOptions, videoOptions) {
|
17723
|
-
const isTeamsMeeting = '
|
17854
|
+
const isTeamsMeeting = 'meetingLink' in this.locator;
|
17724
17855
|
/* @conditional-compile-remove(rooms) */
|
17725
17856
|
const isRoomsCall = 'roomId' in this.locator;
|
17726
17857
|
if (isTeamsMeeting) {
|
@@ -18402,7 +18533,7 @@ const DesktopMoreButton = (props) => {
|
|
18402
18533
|
onClick: () => {
|
18403
18534
|
holdButtonProps.onToggleHold();
|
18404
18535
|
},
|
18405
|
-
iconProps: { iconName: '
|
18536
|
+
iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },
|
18406
18537
|
itemProps: {
|
18407
18538
|
styles: buttonFlyoutIncreasedSizeStyles
|
18408
18539
|
},
|
@@ -18933,7 +19064,7 @@ const MoreDrawer = (props) => {
|
|
18933
19064
|
onItemClick: () => {
|
18934
19065
|
holdButtonProps.onToggleHold();
|
18935
19066
|
},
|
18936
|
-
iconProps: { iconName: '
|
19067
|
+
iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } }
|
18937
19068
|
});
|
18938
19069
|
}
|
18939
19070
|
/*@conditional-compile-remove(PSTN-calls) */
|