@azure/communication-react 1.3.3-alpha-202208260016.0 → 1.3.3-alpha-202208300017.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 +13 -19
- package/dist/dist-cjs/communication-react/index.js +224 -119
- 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 +7 -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 +65 -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/components/CallControls.js +20 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.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/CallWithChatComposite/CallWithChatComposite.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.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 +2 -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.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +1 -2
- 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.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +1 -2
- 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/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-202208300017.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,92 @@ 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, isMobile) {
|
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
|
+
// when it's mobile use ontouchstart and ontouchend to fire onclick and onlongpress event
|
7839
|
+
if (isMobile) {
|
7840
|
+
return;
|
7841
|
+
}
|
7842
|
+
onClick();
|
7843
|
+
if (isLongPress) {
|
7844
|
+
onLongPress();
|
7845
|
+
return;
|
7846
|
+
}
|
7847
|
+
}
|
7848
|
+
function handleOnKeyDown() {
|
7849
|
+
if (action) {
|
7850
|
+
setAction(false);
|
7851
|
+
startPressTimer();
|
7852
|
+
}
|
7853
|
+
}
|
7854
|
+
function handleOnKeyUp() {
|
7855
|
+
setAction(true);
|
7856
|
+
timerRef.current && clearTimeout(timerRef.current);
|
7857
|
+
}
|
7858
|
+
function handleOnMouseDown() {
|
7859
|
+
startPressTimer();
|
7860
|
+
}
|
7861
|
+
function handleOnMouseUp() {
|
7862
|
+
timerRef.current && clearTimeout(timerRef.current);
|
7863
|
+
}
|
7864
|
+
function handleOnTouchStart() {
|
7865
|
+
startPressTimer();
|
7866
|
+
}
|
7867
|
+
function handleOnTouchEnd() {
|
7868
|
+
if (isMobile) {
|
7869
|
+
isLongPress ? onLongPress() : onClick();
|
7870
|
+
}
|
7871
|
+
timerRef.current && clearTimeout(timerRef.current);
|
7872
|
+
}
|
7873
|
+
return {
|
7874
|
+
handlers: {
|
7875
|
+
onClick: handleOnClick,
|
7876
|
+
onMouseDown: handleOnMouseDown,
|
7877
|
+
onMouseUp: handleOnMouseUp,
|
7878
|
+
onTouchStart: handleOnTouchStart,
|
7879
|
+
onTouchEnd: handleOnTouchEnd,
|
7880
|
+
onKeyDown: handleOnKeyDown,
|
7881
|
+
onKeyUp: handleOnKeyUp
|
7882
|
+
}
|
7883
|
+
};
|
7884
|
+
}
|
7885
|
+
|
7886
|
+
// Copyright (c) Microsoft Corporation.
|
7887
|
+
// Licensed under the MIT license.
|
7888
|
+
var __awaiter$p = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7889
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7890
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
7891
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
7892
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7893
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7894
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
7895
|
+
});
|
7829
7896
|
};
|
7830
7897
|
const dialPadButtonsDefault = [
|
7898
|
+
[{ digit: '1' }, { digit: '2', letter: 'ABC' }, { digit: '3', letter: 'DEF' }],
|
7831
7899
|
[
|
7832
|
-
{
|
7833
|
-
{
|
7834
|
-
{
|
7835
|
-
],
|
7836
|
-
[
|
7837
|
-
{ primaryContent: '4', secondaryContent: 'GHI' },
|
7838
|
-
{ primaryContent: '5', secondaryContent: 'JKL' },
|
7839
|
-
{ primaryContent: '6', secondaryContent: 'MNO' }
|
7900
|
+
{ digit: '4', letter: 'GHI' },
|
7901
|
+
{ digit: '5', letter: 'JKL' },
|
7902
|
+
{ digit: '6', letter: 'MNO' }
|
7840
7903
|
],
|
7841
7904
|
[
|
7842
|
-
{
|
7843
|
-
{
|
7844
|
-
{
|
7905
|
+
{ digit: '7', letter: 'PQRS' },
|
7906
|
+
{ digit: '8', letter: 'TUV' },
|
7907
|
+
{ digit: '9', letter: 'WXYZ' }
|
7845
7908
|
],
|
7846
|
-
[{
|
7909
|
+
[{ digit: '*' }, { digit: '0', letter: '+' }, { digit: '#' }]
|
7847
7910
|
];
|
7848
7911
|
const DtmfTones = [
|
7849
7912
|
'Num1',
|
@@ -7859,58 +7922,76 @@ const DtmfTones = [
|
|
7859
7922
|
'Num0',
|
7860
7923
|
'Pound'
|
7861
7924
|
];
|
7925
|
+
const DialpadButton = (props) => {
|
7926
|
+
var _a, _b, _c, _d;
|
7927
|
+
const theme = react.useTheme();
|
7928
|
+
const { digit, index, onClick, onLongPress, isMobile = false } = props;
|
7929
|
+
const clickFunction = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
7930
|
+
onClick(digit, index);
|
7931
|
+
}), [digit, index, onClick]);
|
7932
|
+
const longPressFunction = React.useCallback(() => __awaiter$p(void 0, void 0, void 0, function* () {
|
7933
|
+
onLongPress(digit, index);
|
7934
|
+
}), [digit, index, onLongPress]);
|
7935
|
+
const { handlers } = useLongPress(clickFunction, longPressFunction, isMobile);
|
7936
|
+
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),
|
7937
|
+
React__default['default'].createElement(react.Stack, null,
|
7938
|
+
React__default['default'].createElement(react.Text, { className: react.mergeStyles(digitStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.digit) }, props.digit),
|
7939
|
+
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 : ' '))));
|
7940
|
+
};
|
7862
7941
|
const DialpadContainer = (props) => {
|
7863
7942
|
var _a, _b;
|
7864
7943
|
const theme = react.useTheme();
|
7865
|
-
const
|
7866
|
-
const
|
7867
|
-
|
7868
|
-
|
7869
|
-
|
7870
|
-
|
7944
|
+
const { onSendDtmfTone, onClickDialpadButton, textFieldValue, onChange, showDeleteButton = true, isMobile = false } = props;
|
7945
|
+
const [plainTextValue, setPlainTextValue] = React.useState(textFieldValue !== null && textFieldValue !== void 0 ? textFieldValue : '');
|
7946
|
+
React.useEffect(() => {
|
7947
|
+
if (onChange) {
|
7948
|
+
onChange(plainTextValue);
|
7949
|
+
}
|
7950
|
+
}, [plainTextValue, onChange]);
|
7951
|
+
React.useEffect(() => {
|
7952
|
+
setText(textFieldValue !== null && textFieldValue !== void 0 ? textFieldValue : '');
|
7953
|
+
}, [textFieldValue]);
|
7871
7954
|
const onClickDialpad = (input, index) => {
|
7872
|
-
|
7873
|
-
const value = sanitizeInput(textValue + input);
|
7874
|
-
setTextValue(value);
|
7955
|
+
setText(plainTextValue + input);
|
7875
7956
|
if (onSendDtmfTone) {
|
7876
7957
|
onSendDtmfTone(DtmfTones[index]);
|
7877
7958
|
}
|
7878
7959
|
if (onClickDialpadButton) {
|
7879
7960
|
onClickDialpadButton(input, index);
|
7880
7961
|
}
|
7881
|
-
|
7882
|
-
|
7962
|
+
};
|
7963
|
+
const onLongPressDialpad = (input, index) => {
|
7964
|
+
if (input === '0' && index === 10) {
|
7965
|
+
setText(plainTextValue + '+');
|
7966
|
+
}
|
7967
|
+
else {
|
7968
|
+
setText(plainTextValue + input);
|
7969
|
+
}
|
7970
|
+
if (onSendDtmfTone) {
|
7971
|
+
onSendDtmfTone(DtmfTones[index]);
|
7972
|
+
}
|
7973
|
+
if (onClickDialpadButton) {
|
7974
|
+
onClickDialpadButton(input, index);
|
7883
7975
|
}
|
7884
7976
|
};
|
7885
7977
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7886
|
-
const setText = (
|
7978
|
+
const setText = (input) => {
|
7887
7979
|
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
7888
|
-
const
|
7889
|
-
|
7980
|
+
const plainInput = sanitizeInput(input);
|
7981
|
+
setPlainTextValue(plainInput);
|
7890
7982
|
};
|
7891
|
-
// Potential Improvement:
|
7892
|
-
// comment out the following line for now to disable customization for dialpad content
|
7893
|
-
// const dialpadButtonsContent = props.dialpadButtons ?? dialPadButtonsDefault;
|
7894
7983
|
const deleteNumbers = () => {
|
7895
|
-
const modifiedInput =
|
7896
|
-
|
7897
|
-
if (onChange) {
|
7898
|
-
onChange(onDisplayDialpadInput ? onDisplayDialpadInput(modifiedInput) : formatPhoneNumber(modifiedInput));
|
7899
|
-
}
|
7984
|
+
const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);
|
7985
|
+
setText(modifiedInput);
|
7900
7986
|
};
|
7901
7987
|
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:
|
7988
|
+
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
7989
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7904
7990
|
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
|
-
}
|
7991
|
+
setText(e.target.value);
|
7911
7992
|
}, placeholder: props.strings.placeholderText, "data-test-id": "dialpad-input", onRenderSuffix: () => {
|
7912
7993
|
var _a;
|
7913
|
-
return (React__default['default'].createElement(React__default['default'].Fragment, null, showDeleteButton &&
|
7994
|
+
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
7995
|
} }),
|
7915
7996
|
React__default['default'].createElement(react.FocusZone, null, dialPadButtonsDefault.map((rows, rowIndex) => {
|
7916
7997
|
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 +8012,7 @@ const DialpadContainer = (props) => {
|
|
7931
8012
|
then use this index to locate the corresponding dtmf tones
|
7932
8013
|
DtmfTones[index]
|
7933
8014
|
*/
|
7934
|
-
index: columnIndex + rowIndex * rows.length,
|
8015
|
+
index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad, isMobile: isMobile })))));
|
7935
8016
|
}))));
|
7936
8017
|
};
|
7937
8018
|
/**
|
@@ -7950,6 +8031,10 @@ const Dialpad = (props) => {
|
|
7950
8031
|
const strings = Object.assign(Object.assign({}, dialpadLocaleStringsTrampoline()), props.strings);
|
7951
8032
|
return React__default['default'].createElement(DialpadContainer, Object.assign({ strings: strings }, props));
|
7952
8033
|
};
|
8034
|
+
const sanitizeInput = (input) => {
|
8035
|
+
// remove non-valid characters from input: letters,special characters excluding +, *,#
|
8036
|
+
return input.replace(/[^\d*#+]/g, '');
|
8037
|
+
};
|
7953
8038
|
|
7954
8039
|
// Copyright (c) Microsoft Corporation.
|
7955
8040
|
/**
|
@@ -7964,7 +8049,7 @@ const Dialpad = (props) => {
|
|
7964
8049
|
const HoldButton = (props) => {
|
7965
8050
|
const { onToggleHold, strings } = props;
|
7966
8051
|
const onRenderHoldIcon = () => {
|
7967
|
-
return React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "
|
8052
|
+
return React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "HoldCallButton" });
|
7968
8053
|
};
|
7969
8054
|
const onRenderResumeIcon = () => {
|
7970
8055
|
return React__default['default'].createElement(HighContrastAwareIcon, { disabled: props.disabled, iconName: "ResumeCall" });
|
@@ -14675,7 +14760,8 @@ const buttonFlyoutIncreasedSizeStyles = {
|
|
14675
14760
|
maxHeight: 'unset'
|
14676
14761
|
},
|
14677
14762
|
icon: {
|
14678
|
-
maxHeight: 'unset'
|
14763
|
+
maxHeight: 'unset',
|
14764
|
+
textAlign: 'center'
|
14679
14765
|
}
|
14680
14766
|
};
|
14681
14767
|
/**
|
@@ -14977,14 +15063,13 @@ const themedDialpadStyle$1 = (isMobile, theme) => ({
|
|
14977
15063
|
backgroundColor: theme.palette.white,
|
14978
15064
|
fontSize: theme.fonts.large.fontSize,
|
14979
15065
|
padding: '0 0.5rem ',
|
14980
|
-
direction: 'rtl',
|
14981
15066
|
textAlign: 'center',
|
14982
15067
|
':active': {
|
14983
15068
|
padding: '0 0.5rem'
|
14984
15069
|
}
|
14985
15070
|
}
|
14986
15071
|
},
|
14987
|
-
|
15072
|
+
digit: {
|
14988
15073
|
color: theme.palette.themeDarkAlt
|
14989
15074
|
}
|
14990
15075
|
});
|
@@ -15046,13 +15131,13 @@ const SendDtmfDialpad = (props) => {
|
|
15046
15131
|
return (React__default['default'].createElement(react.Stack, null, showDialpad && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles$1 },
|
15047
15132
|
React__default['default'].createElement(_DrawerSurface, { onLightDismiss: onDismissTriggered },
|
15048
15133
|
React__default['default'].createElement(react.Stack, { style: { padding: '1rem' } },
|
15049
|
-
React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: strings }))))))));
|
15134
|
+
React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: strings, isMobile: isMobile }))))))));
|
15050
15135
|
}
|
15051
15136
|
return (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(react.Modal, { titleAriaId: strings.dialpadModalAriaLabel, isOpen: showDialpad, onDismiss: onDismissTriggered, isBlocking: true, styles: dialpadModalStyle },
|
15052
15137
|
React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "end", verticalAlign: "center" },
|
15053
15138
|
React__default['default'].createElement(react.IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings.dialpadCloseModalButtonAriaLabel, onClick: onDismissTriggered, style: { color: theme.palette.black } })),
|
15054
15139
|
React__default['default'].createElement(react.Stack, { style: { overflow: 'hidden' } },
|
15055
|
-
React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: strings }))))));
|
15140
|
+
React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: strings, isMobile: isMobile }))))));
|
15056
15141
|
};
|
15057
15142
|
|
15058
15143
|
// Copyright (c) Microsoft Corporation.
|
@@ -15084,6 +15169,8 @@ const CallControls = (props) => {
|
|
15084
15169
|
}), [localeStrings]);
|
15085
15170
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
15086
15171
|
const holdButtonProps = usePropsFor$1(HoldButton);
|
15172
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
15173
|
+
const alternateCallerId = useAdapter().getState().alternateCallerId;
|
15087
15174
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
15088
15175
|
const moreButtonContextualMenuItems = () => {
|
15089
15176
|
const items = [];
|
@@ -15096,7 +15183,7 @@ const CallControls = (props) => {
|
|
15096
15183
|
props.onPeopleButtonClicked();
|
15097
15184
|
}
|
15098
15185
|
},
|
15099
|
-
iconProps: { iconName: '
|
15186
|
+
iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },
|
15100
15187
|
itemProps: {
|
15101
15188
|
styles: buttonFlyoutIncreasedSizeStyles
|
15102
15189
|
},
|
@@ -15109,7 +15196,7 @@ const CallControls = (props) => {
|
|
15109
15196
|
onClick: () => {
|
15110
15197
|
holdButtonProps.onToggleHold();
|
15111
15198
|
},
|
15112
|
-
iconProps: { iconName: '
|
15199
|
+
iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },
|
15113
15200
|
itemProps: {
|
15114
15201
|
styles: buttonFlyoutIncreasedSizeStyles
|
15115
15202
|
},
|
@@ -15117,17 +15204,20 @@ const CallControls = (props) => {
|
|
15117
15204
|
['data-ui-id']: 'hold-button'
|
15118
15205
|
});
|
15119
15206
|
/* @conditional-compile-remove(PSTN-calls) */
|
15120
|
-
|
15121
|
-
|
15122
|
-
|
15123
|
-
|
15124
|
-
|
15125
|
-
|
15126
|
-
|
15127
|
-
|
15128
|
-
styles:
|
15129
|
-
|
15130
|
-
|
15207
|
+
// dtmf tone sending only works for 1:1 PSTN call
|
15208
|
+
if (alternateCallerId) {
|
15209
|
+
items.push({
|
15210
|
+
key: 'showDialpadKey',
|
15211
|
+
text: localeStrings.strings.call.openDtmfDialpadLabel,
|
15212
|
+
onClick: () => {
|
15213
|
+
setShowDialpad(true);
|
15214
|
+
},
|
15215
|
+
iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },
|
15216
|
+
itemProps: {
|
15217
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
15218
|
+
}
|
15219
|
+
});
|
15220
|
+
}
|
15131
15221
|
return items;
|
15132
15222
|
};
|
15133
15223
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -15652,14 +15742,13 @@ const themedDialpadStyle = (isMobile, theme) => ({
|
|
15652
15742
|
backgroundColor: theme.palette.white,
|
15653
15743
|
fontSize: theme.fonts.large.fontSize,
|
15654
15744
|
padding: '0 0.5rem',
|
15655
|
-
direction: 'rtl',
|
15656
15745
|
textAlign: isMobile ? 'center' : 'left',
|
15657
15746
|
':active': {
|
15658
15747
|
padding: '0 0.5rem'
|
15659
15748
|
}
|
15660
15749
|
}
|
15661
15750
|
},
|
15662
|
-
|
15751
|
+
digit: {
|
15663
15752
|
color: theme.palette.themeDarkAlt
|
15664
15753
|
}
|
15665
15754
|
});
|
@@ -15706,7 +15795,7 @@ const CallingDialpad = (props) => {
|
|
15706
15795
|
const callButtonStyle = React.useMemo(() => themedCallButtonStyle(theme), [theme]);
|
15707
15796
|
const dialpadComponent = () => {
|
15708
15797
|
return (React__default['default'].createElement(React__default['default'].Fragment, null,
|
15709
|
-
React__default['default'].createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput }),
|
15798
|
+
React__default['default'].createElement(Dialpad, { styles: dialpadStyle, onChange: setTextFieldInput, isMobile: isMobile }),
|
15710
15799
|
React__default['default'].createElement(react.PrimaryButton, { text: strings.dialpadStartCallButtonLabel, onRenderIcon: () => DialpadStartCallIconTrampoline(), onClick: onClickCall, styles: callButtonStyle, disabled: textFieldInput === '' })));
|
15711
15800
|
};
|
15712
15801
|
if (isMobile) {
|
@@ -15866,10 +15955,11 @@ var __awaiter$9 = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
15866
15955
|
const PeoplePaneContent = (props) => {
|
15867
15956
|
const { inviteLink, onFetchParticipantMenuItems, setDrawerMenuItems, strings, onRemoveParticipant } = props;
|
15868
15957
|
const participantListDefaultProps = usePropsFor$1(ParticipantList);
|
15958
|
+
const disableRemoveButton = !hasRemoveParticipantsPermissionTrampoline();
|
15869
15959
|
const setDrawerMenuItemsForParticipant = React.useMemo(() => {
|
15870
15960
|
return (participant) => {
|
15871
15961
|
if (participant) {
|
15872
|
-
let contextualMenuItems = createDefaultContextualMenuItems(participant, strings, participantListDefaultProps.onRemoveParticipant, participantListDefaultProps.myUserId);
|
15962
|
+
let contextualMenuItems = createDefaultContextualMenuItems(participant, strings, participantListDefaultProps.onRemoveParticipant, participantListDefaultProps.myUserId, disableRemoveButton);
|
15873
15963
|
if (onFetchParticipantMenuItems) {
|
15874
15964
|
contextualMenuItems = onFetchParticipantMenuItems(participant.userId, participantListDefaultProps.myUserId, contextualMenuItems);
|
15875
15965
|
}
|
@@ -15881,6 +15971,7 @@ const PeoplePaneContent = (props) => {
|
|
15881
15971
|
strings,
|
15882
15972
|
participantListDefaultProps.onRemoveParticipant,
|
15883
15973
|
participantListDefaultProps.myUserId,
|
15974
|
+
disableRemoveButton,
|
15884
15975
|
onFetchParticipantMenuItems,
|
15885
15976
|
setDrawerMenuItems
|
15886
15977
|
]);
|
@@ -15916,7 +16007,11 @@ const PeoplePaneContent = (props) => {
|
|
15916
16007
|
* @param localParticipantUserId - Local participant user id
|
15917
16008
|
* @returns - IContextualMenuItem[]
|
15918
16009
|
*/
|
15919
|
-
const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId) => {
|
16010
|
+
const createDefaultContextualMenuItems = (participant, strings, onRemoveParticipant, localParticipantUserId, disableRemoveButton) => {
|
16011
|
+
let disabled = !participant.isRemovable;
|
16012
|
+
if (disableRemoveButton) {
|
16013
|
+
disabled = disabled || disableRemoveButton;
|
16014
|
+
}
|
15920
16015
|
const menuItems = [];
|
15921
16016
|
if ((participant === null || participant === void 0 ? void 0 : participant.userId) !== localParticipantUserId) {
|
15922
16017
|
menuItems.push({
|
@@ -15930,11 +16025,18 @@ const createDefaultContextualMenuItems = (participant, strings, onRemoveParticip
|
|
15930
16025
|
iconProps: {
|
15931
16026
|
iconName: 'UserRemove'
|
15932
16027
|
},
|
15933
|
-
disabled:
|
16028
|
+
disabled: disabled
|
15934
16029
|
});
|
15935
16030
|
}
|
15936
16031
|
return menuItems;
|
15937
16032
|
};
|
16033
|
+
/**
|
16034
|
+
* @private
|
16035
|
+
*/
|
16036
|
+
const hasRemoveParticipantsPermissionTrampoline = () => {
|
16037
|
+
/* @conditional-compile-remove(rooms) */
|
16038
|
+
return _usePermissions().removeParticipantButton;
|
16039
|
+
};
|
15938
16040
|
|
15939
16041
|
// Copyright (c) Microsoft Corporation.
|
15940
16042
|
/**
|
@@ -18441,7 +18543,7 @@ const DesktopMoreButton = (props) => {
|
|
18441
18543
|
onClick: () => {
|
18442
18544
|
holdButtonProps.onToggleHold();
|
18443
18545
|
},
|
18444
|
-
iconProps: { iconName: '
|
18546
|
+
iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },
|
18445
18547
|
itemProps: {
|
18446
18548
|
styles: buttonFlyoutIncreasedSizeStyles
|
18447
18549
|
},
|
@@ -18972,10 +19074,11 @@ const MoreDrawer = (props) => {
|
|
18972
19074
|
onItemClick: () => {
|
18973
19075
|
holdButtonProps.onToggleHold();
|
18974
19076
|
},
|
18975
|
-
iconProps: { iconName: '
|
19077
|
+
iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } }
|
18976
19078
|
});
|
18977
19079
|
}
|
18978
19080
|
/*@conditional-compile-remove(PSTN-calls) */
|
19081
|
+
// dtmf tone sending only works for 1:1 PSTN call
|
18979
19082
|
if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.peopleButton) && props.onClickShowDialpad) {
|
18980
19083
|
drawerMenuItems.push({
|
18981
19084
|
itemKey: 'showDialpadKey',
|
@@ -19218,6 +19321,8 @@ const CallWithChatScreen = (props) => {
|
|
19218
19321
|
dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
|
19219
19322
|
placeholderText: callWithChatStrings.dtmfDialpadPlaceHolderText
|
19220
19323
|
}), [callWithChatStrings]);
|
19324
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
19325
|
+
const alternateCallerId = callAdapter.getState().alternateCallerId;
|
19221
19326
|
return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles) },
|
19222
19327
|
React__default['default'].createElement(react.Stack, { verticalFill: true, grow: true, styles: compositeOuterContainerStyles, id: compositeParentDivId },
|
19223
19328
|
React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
|
@@ -19234,13 +19339,13 @@ const CallWithChatScreen = (props) => {
|
|
19234
19339
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
19235
19340
|
disableButtonsForHoldScreen: isInLocalHold, callControls: props.callControls, containerHeight: containerHeight, containerWidth: containerWidth,
|
19236
19341
|
/* @conditional-compile-remove(PSTN-calls) */
|
19237
|
-
onClickShowDialpad: onClickShowDialpad })))),
|
19342
|
+
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined })))),
|
19238
19343
|
showControlBar && showDrawer && (React__default['default'].createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
|
19239
19344
|
React__default['default'].createElement(CallAdapterProvider, { adapter: callAdapter },
|
19240
19345
|
React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles$1 },
|
19241
19346
|
React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControls, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
19242
19347
|
/* @conditional-compile-remove(PSTN-calls) */
|
19243
|
-
onClickShowDialpad: onClickShowDialpad,
|
19348
|
+
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
|
19244
19349
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
19245
19350
|
disableButtonsForHoldScreen: isInLocalHold }))))),
|
19246
19351
|
/* @conditional-compile-remove(PSTN-calls) */
|