@azure/communication-react 1.11.1-alpha-202401030012 → 1.11.1-alpha-202401040013
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/dist-cjs/communication-react/index.js +280 -118
- 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/calling-component-bindings/src/handlers/createCommonHandlers.js +8 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js +14 -2
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/DTMFToneGenerator.d.ts +80 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/DTMFToneGenerator.js +69 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/DTMFToneGenerator.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +41 -3
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js +28 -5
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.styles.js +11 -3
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +3 -3
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.styles.js +8 -5
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +4 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +7 -4
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
- package/package.json +1 -1
@@ -170,7 +170,7 @@ function getDefaultExportFromCjs (x) {
|
|
170
170
|
// Copyright (c) Microsoft Corporation.
|
171
171
|
// Licensed under the MIT License.
|
172
172
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
173
|
-
var telemetryVersion = '1.11.1-alpha-
|
173
|
+
var telemetryVersion = '1.11.1-alpha-202401040013';
|
174
174
|
|
175
175
|
|
176
176
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -506,7 +506,7 @@ const getSupportedSpokenLanguages = (state, props) => {
|
|
506
506
|
|
507
507
|
// Copyright (c) Microsoft Corporation.
|
508
508
|
// Licensed under the MIT License.
|
509
|
-
var __awaiter$
|
509
|
+
var __awaiter$N = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
510
510
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
511
511
|
return new (P || (P = Promise))(function (resolve, reject) {
|
512
512
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -545,7 +545,7 @@ const _isPreviewOn = (deviceManager) => {
|
|
545
545
|
*
|
546
546
|
* @private
|
547
547
|
*/
|
548
|
-
const disposeAllLocalPreviewViews = (callClient) => __awaiter$
|
548
|
+
const disposeAllLocalPreviewViews = (callClient) => __awaiter$N(void 0, void 0, void 0, function* () {
|
549
549
|
const unparentedViews = callClient.getState().deviceManager.unparentedViews;
|
550
550
|
for (const view of unparentedViews) {
|
551
551
|
yield callClient.disposeView(undefined, undefined, view);
|
@@ -741,7 +741,7 @@ const holdButtonSelector = reselect__namespace.createSelector([getCallState], (c
|
|
741
741
|
|
742
742
|
// Copyright (c) Microsoft Corporation.
|
743
743
|
// Licensed under the MIT License.
|
744
|
-
var __awaiter$
|
744
|
+
var __awaiter$M = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
745
745
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
746
746
|
return new (P || (P = Promise))(function (resolve, reject) {
|
747
747
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -762,7 +762,7 @@ const areStreamsEqual = (prevStream, newStream) => {
|
|
762
762
|
* @private
|
763
763
|
*/
|
764
764
|
const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager, call, options) => {
|
765
|
-
const onStartLocalVideo = () => __awaiter$
|
765
|
+
const onStartLocalVideo = () => __awaiter$M(void 0, void 0, void 0, function* () {
|
766
766
|
// Before the call object creates a stream, dispose of any local preview streams.
|
767
767
|
// @TODO: is there any way to parent the unparented view to the call object instead
|
768
768
|
// of disposing and creating a new stream?
|
@@ -782,7 +782,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
782
782
|
yield call.startVideo(stream);
|
783
783
|
}
|
784
784
|
});
|
785
|
-
const onStopLocalVideo = (stream) => __awaiter$
|
785
|
+
const onStopLocalVideo = (stream) => __awaiter$M(void 0, void 0, void 0, function* () {
|
786
786
|
const callId = call === null || call === void 0 ? void 0 : call.id;
|
787
787
|
if (!callId) {
|
788
788
|
return;
|
@@ -791,7 +791,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
791
791
|
yield call.stopVideo(stream);
|
792
792
|
}
|
793
793
|
});
|
794
|
-
const onToggleCamera = (options) => __awaiter$
|
794
|
+
const onToggleCamera = (options) => __awaiter$M(void 0, void 0, void 0, function* () {
|
795
795
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
796
796
|
// the disposal of the unparented views is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
|
797
797
|
// The root cause of the issue is caused by never transitioning the unparented view to the
|
@@ -848,26 +848,33 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
848
848
|
}
|
849
849
|
}
|
850
850
|
});
|
851
|
-
const onSelectMicrophone = (device) => __awaiter$
|
851
|
+
const onSelectMicrophone = (device) => __awaiter$M(void 0, void 0, void 0, function* () {
|
852
852
|
if (!deviceManager) {
|
853
853
|
return;
|
854
854
|
}
|
855
855
|
return deviceManager.selectMicrophone(device);
|
856
856
|
});
|
857
|
-
const onSelectSpeaker = (device) => __awaiter$
|
857
|
+
const onSelectSpeaker = (device) => __awaiter$M(void 0, void 0, void 0, function* () {
|
858
858
|
if (!deviceManager) {
|
859
859
|
return;
|
860
860
|
}
|
861
861
|
return deviceManager.selectSpeaker(device);
|
862
862
|
});
|
863
|
-
const onSelectCamera = (device, options) => __awaiter$
|
863
|
+
const onSelectCamera = (device, options) => __awaiter$M(void 0, void 0, void 0, function* () {
|
864
864
|
if (!deviceManager) {
|
865
865
|
return;
|
866
866
|
}
|
867
867
|
if (call && _isInCall(call.state)) {
|
868
868
|
deviceManager.selectCamera(device);
|
869
869
|
const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
870
|
-
|
870
|
+
yield (stream === null || stream === void 0 ? void 0 : stream.switchSource(device));
|
871
|
+
/// TODO: TEMPORARY SOLUTION
|
872
|
+
/// The Calling SDK needs to wait until the stream is ready before resolving the switchSource promise.
|
873
|
+
/// This is a temporary solution to wait for the stream to be ready before resolving the promise.
|
874
|
+
/// This allows the onSelectCamera to be throttled to prevent the streams from getting in to a frozen state
|
875
|
+
/// if the user switches cameras too rapidly.
|
876
|
+
/// This is to be removed once the Calling SDK has issued a fix.
|
877
|
+
yield (stream === null || stream === void 0 ? void 0 : stream.getMediaStream());
|
871
878
|
}
|
872
879
|
else {
|
873
880
|
const previewOn = _isPreviewOn(callClient.getState().deviceManager);
|
@@ -884,11 +891,11 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
884
891
|
}
|
885
892
|
});
|
886
893
|
/* @conditional-compile-remove(raise-hand) */
|
887
|
-
const onRaiseHand = () => __awaiter$
|
894
|
+
const onRaiseHand = () => __awaiter$M(void 0, void 0, void 0, function* () { var _a; return yield ((_a = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _a === void 0 ? void 0 : _a.raiseHand()); });
|
888
895
|
/* @conditional-compile-remove(raise-hand) */
|
889
|
-
const onLowerHand = () => __awaiter$
|
896
|
+
const onLowerHand = () => __awaiter$M(void 0, void 0, void 0, function* () { var _b; return yield ((_b = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand)) === null || _b === void 0 ? void 0 : _b.lowerHand()); });
|
890
897
|
/* @conditional-compile-remove(raise-hand) */
|
891
|
-
const onToggleRaiseHand = () => __awaiter$
|
898
|
+
const onToggleRaiseHand = () => __awaiter$M(void 0, void 0, void 0, function* () {
|
892
899
|
const raiseHandFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand);
|
893
900
|
const localUserId = callClient.getState().userId;
|
894
901
|
const isLocalRaisedHand = raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.getRaisedHands().find((publishedState) => toFlatCommunicationIdentifier(publishedState.identifier) === toFlatCommunicationIdentifier(localUserId));
|
@@ -899,19 +906,19 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
899
906
|
yield (raiseHandFeature === null || raiseHandFeature === void 0 ? void 0 : raiseHandFeature.raiseHand());
|
900
907
|
}
|
901
908
|
});
|
902
|
-
const onToggleMicrophone = () => __awaiter$
|
909
|
+
const onToggleMicrophone = () => __awaiter$M(void 0, void 0, void 0, function* () {
|
903
910
|
if (!call || !(_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {
|
904
911
|
throw new Error(`Please invoke onToggleMicrophone after call is started`);
|
905
912
|
}
|
906
913
|
return call.isMuted ? yield call.unmute() : yield call.mute();
|
907
914
|
});
|
908
|
-
const onStartScreenShare = () => __awaiter$
|
909
|
-
const onStopScreenShare = () => __awaiter$
|
910
|
-
const onToggleScreenShare = () => __awaiter$
|
911
|
-
const onHangUp = (forEveryone) => __awaiter$
|
915
|
+
const onStartScreenShare = () => __awaiter$M(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
|
916
|
+
const onStopScreenShare = () => __awaiter$M(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
|
917
|
+
const onToggleScreenShare = () => __awaiter$M(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
|
918
|
+
const onHangUp = (forEveryone) => __awaiter$M(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
912
919
|
/* @conditional-compile-remove(PSTN-calls) */
|
913
|
-
const onToggleHold = () => __awaiter$
|
914
|
-
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$
|
920
|
+
const onToggleHold = () => __awaiter$M(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()); });
|
921
|
+
const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter$M(void 0, void 0, void 0, function* () {
|
915
922
|
var _c;
|
916
923
|
if (!call || call.localVideoStreams.length === 0) {
|
917
924
|
return;
|
@@ -927,7 +934,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
927
934
|
const { view } = (_c = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _c !== void 0 ? _c : {};
|
928
935
|
return view ? { view } : undefined;
|
929
936
|
});
|
930
|
-
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$
|
937
|
+
const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter$M(void 0, void 0, void 0, function* () {
|
931
938
|
if (!call) {
|
932
939
|
return;
|
933
940
|
}
|
@@ -958,7 +965,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
958
965
|
}
|
959
966
|
return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
|
960
967
|
});
|
961
|
-
const onDisposeRemoteStreamView = (userId) => __awaiter$
|
968
|
+
const onDisposeRemoteStreamView = (userId) => __awaiter$M(void 0, void 0, void 0, function* () {
|
962
969
|
if (!call) {
|
963
970
|
return;
|
964
971
|
}
|
@@ -979,7 +986,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
979
986
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
980
987
|
}
|
981
988
|
});
|
982
|
-
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$
|
989
|
+
const onDisposeRemoteVideoStreamView = (userId) => __awaiter$M(void 0, void 0, void 0, function* () {
|
983
990
|
if (!call) {
|
984
991
|
return;
|
985
992
|
}
|
@@ -996,7 +1003,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
996
1003
|
callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
|
997
1004
|
}
|
998
1005
|
});
|
999
|
-
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$
|
1006
|
+
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1000
1007
|
if (!call) {
|
1001
1008
|
return;
|
1002
1009
|
}
|
@@ -1013,7 +1020,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1013
1020
|
callClient.disposeView(call.id, participant.identifier, screenShareStream);
|
1014
1021
|
}
|
1015
1022
|
});
|
1016
|
-
const onDisposeLocalStreamView = () => __awaiter$
|
1023
|
+
const onDisposeLocalStreamView = () => __awaiter$M(void 0, void 0, void 0, function* () {
|
1017
1024
|
// If the user is currently in a call, dispose of the local stream view attached to that call.
|
1018
1025
|
const callState = call && callClient.getState().calls[call.id];
|
1019
1026
|
const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
|
@@ -1026,18 +1033,18 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1026
1033
|
yield disposeAllLocalPreviewViews(callClient);
|
1027
1034
|
});
|
1028
1035
|
/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
|
1029
|
-
const onSendDtmfTone = (dtmfTone) => __awaiter$
|
1036
|
+
const onSendDtmfTone = (dtmfTone) => __awaiter$M(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
|
1030
1037
|
const notImplemented = () => {
|
1031
1038
|
throw new Error('Not implemented, cannot call a method from an abstract object');
|
1032
1039
|
};
|
1033
1040
|
/* @conditional-compile-remove(call-readiness) */
|
1034
|
-
const askDevicePermission = (constrain) => __awaiter$
|
1041
|
+
const askDevicePermission = (constrain) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1035
1042
|
if (deviceManager) {
|
1036
1043
|
yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
|
1037
1044
|
}
|
1038
1045
|
});
|
1039
1046
|
/* @conditional-compile-remove(video-background-effects) */
|
1040
|
-
const onRemoveVideoBackgroundEffects = () => __awaiter$
|
1047
|
+
const onRemoveVideoBackgroundEffects = () => __awaiter$M(void 0, void 0, void 0, function* () {
|
1041
1048
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1042
1049
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
1043
1050
|
if (stream) {
|
@@ -1050,7 +1057,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1050
1057
|
}
|
1051
1058
|
});
|
1052
1059
|
/* @conditional-compile-remove(video-background-effects) */
|
1053
|
-
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$
|
1060
|
+
const onBlurVideoBackground = (backgroundBlurConfig) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1054
1061
|
var _d;
|
1055
1062
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1056
1063
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1064,7 +1071,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1064
1071
|
}
|
1065
1072
|
});
|
1066
1073
|
/* @conditional-compile-remove(video-background-effects) */
|
1067
|
-
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$
|
1074
|
+
const onReplaceVideoBackground = (backgroundReplacementConfig) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1068
1075
|
var _e;
|
1069
1076
|
const stream = (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video')) ||
|
1070
1077
|
(deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video'));
|
@@ -1078,27 +1085,27 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1078
1085
|
}
|
1079
1086
|
});
|
1080
1087
|
/* @conditional-compile-remove(close-captions) */
|
1081
|
-
const onStartCaptions = (options) => __awaiter$
|
1088
|
+
const onStartCaptions = (options) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1082
1089
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1083
1090
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.startCaptions(options));
|
1084
1091
|
});
|
1085
1092
|
/* @conditional-compile-remove(close-captions) */
|
1086
|
-
const onStopCaptions = () => __awaiter$
|
1093
|
+
const onStopCaptions = () => __awaiter$M(void 0, void 0, void 0, function* () {
|
1087
1094
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1088
1095
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.stopCaptions());
|
1089
1096
|
});
|
1090
1097
|
/* @conditional-compile-remove(close-captions) */
|
1091
|
-
const onSetSpokenLanguage = (language) => __awaiter$
|
1098
|
+
const onSetSpokenLanguage = (language) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1092
1099
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1093
1100
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.setSpokenLanguage(language));
|
1094
1101
|
});
|
1095
1102
|
/* @conditional-compile-remove(close-captions) */
|
1096
|
-
const onSetCaptionLanguage = (language) => __awaiter$
|
1103
|
+
const onSetCaptionLanguage = (language) => __awaiter$M(void 0, void 0, void 0, function* () {
|
1097
1104
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1098
1105
|
yield captionsFeature.setCaptionLanguage(language);
|
1099
1106
|
});
|
1100
1107
|
/* @conditional-compile-remove(end-of-call-survey) */
|
1101
|
-
const onSubmitSurvey = (survey) => __awaiter$
|
1108
|
+
const onSubmitSurvey = (survey) => __awaiter$M(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.CallSurvey).submitSurvey(survey)); });
|
1102
1109
|
return {
|
1103
1110
|
onHangUp,
|
1104
1111
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -1152,7 +1159,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1152
1159
|
|
1153
1160
|
// Copyright (c) Microsoft Corporation.
|
1154
1161
|
// Licensed under the MIT License.
|
1155
|
-
var __awaiter$
|
1162
|
+
var __awaiter$L = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1156
1163
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1157
1164
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1158
1165
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1180,7 +1187,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1180
1187
|
return callAgent === null || callAgent === void 0 ? void 0 : callAgent.startCall(participants, options);
|
1181
1188
|
},
|
1182
1189
|
/* @conditional-compile-remove(PSTN-calls) */
|
1183
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1190
|
+
onAddParticipant: (userId, options) => __awaiter$L(void 0, void 0, void 0, function* () {
|
1184
1191
|
const participant = _toCommunicationIdentifier(userId);
|
1185
1192
|
if (communicationCommon.isPhoneNumberIdentifier(participant)) {
|
1186
1193
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
|
@@ -1188,7 +1195,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1188
1195
|
else if (communicationCommon.isCommunicationUserIdentifier(participant) || communicationCommon.isMicrosoftTeamsUserIdentifier(participant)) {
|
1189
1196
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1190
1197
|
}
|
1191
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1198
|
+
}), onRemoveParticipant: (userId) => __awaiter$L(void 0, void 0, void 0, function* () {
|
1192
1199
|
const participant = _toCommunicationIdentifier(userId);
|
1193
1200
|
yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
|
1194
1201
|
}) });
|
@@ -1196,7 +1203,7 @@ const createDefaultCallingHandlers = memoizeOne((...args) => {
|
|
1196
1203
|
|
1197
1204
|
// Copyright (c) Microsoft Corporation.
|
1198
1205
|
// Licensed under the MIT License.
|
1199
|
-
var __awaiter$
|
1206
|
+
var __awaiter$K = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1200
1207
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1201
1208
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1202
1209
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1228,7 +1235,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1228
1235
|
},
|
1229
1236
|
/* @conditional-compile-remove(teams-identity-support) */
|
1230
1237
|
/* @conditional-compile-remove(PSTN-calls) */
|
1231
|
-
onAddParticipant: (userId, options) => __awaiter$
|
1238
|
+
onAddParticipant: (userId, options) => __awaiter$K(void 0, void 0, void 0, function* () {
|
1232
1239
|
const participant = _toCommunicationIdentifier(userId);
|
1233
1240
|
/* @conditional-compile-remove(teams-identity-support) */
|
1234
1241
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
@@ -1244,7 +1251,7 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1244
1251
|
}
|
1245
1252
|
/* @conditional-compile-remove(teams-identity-support) */
|
1246
1253
|
call === null || call === void 0 ? void 0 : call.addParticipant(participant);
|
1247
|
-
}), onRemoveParticipant: (userId) => __awaiter$
|
1254
|
+
}), onRemoveParticipant: (userId) => __awaiter$K(void 0, void 0, void 0, function* () {
|
1248
1255
|
const participant = _toCommunicationIdentifier(userId);
|
1249
1256
|
if (communicationCommon.isCommunicationUserIdentifier(participant)) {
|
1250
1257
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
@@ -1335,7 +1342,7 @@ const getCaptionsSpeakerIdentifier = (captions) => {
|
|
1335
1342
|
|
1336
1343
|
// Copyright (c) Microsoft Corporation.
|
1337
1344
|
// Licensed under the MIT License.
|
1338
|
-
var __awaiter$
|
1345
|
+
var __awaiter$J = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1339
1346
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1340
1347
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1341
1348
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -1384,13 +1391,13 @@ class ProxyDeviceManager {
|
|
1384
1391
|
this.selectCamera = (videoDeviceInfo) => {
|
1385
1392
|
this._context.setDeviceManagerSelectedCamera(videoDeviceInfo);
|
1386
1393
|
};
|
1387
|
-
this.videoDevicesUpdated = () => __awaiter$
|
1394
|
+
this.videoDevicesUpdated = () => __awaiter$J(this, void 0, void 0, function* () {
|
1388
1395
|
// Device Manager always has a camera with '' name if there are no real camera devices available.
|
1389
1396
|
// We don't want to show that in the UI.
|
1390
1397
|
const realCameras = (yield this._deviceManager.getCameras()).filter((c) => !!c.name);
|
1391
1398
|
this._context.setDeviceManagerCameras(dedupeById(realCameras));
|
1392
1399
|
});
|
1393
|
-
this.audioDevicesUpdated = () => __awaiter$
|
1400
|
+
this.audioDevicesUpdated = () => __awaiter$J(this, void 0, void 0, function* () {
|
1394
1401
|
this._context.setDeviceManagerMicrophones(dedupeById(yield this._deviceManager.getMicrophones()));
|
1395
1402
|
this._context.setDeviceManagerSpeakers(dedupeById(yield this._deviceManager.getSpeakers()));
|
1396
1403
|
});
|
@@ -1787,7 +1794,7 @@ function convertFromSDKToRaisedHandState(raisedHand) {
|
|
1787
1794
|
|
1788
1795
|
// Copyright (c) Microsoft Corporation.
|
1789
1796
|
// Licensed under the MIT License.
|
1790
|
-
var __awaiter$
|
1797
|
+
var __awaiter$I = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
1791
1798
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
1792
1799
|
return new (P || (P = Promise))(function (resolve, reject) {
|
1793
1800
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -2558,7 +2565,7 @@ let CallContext$2 = class CallContext {
|
|
2558
2565
|
* @throws CallError. Exceptions thrown from `f` are tagged with the failed `target.
|
2559
2566
|
*/
|
2560
2567
|
withAsyncErrorTeedToState(action, target) {
|
2561
|
-
return (...args) => __awaiter$
|
2568
|
+
return (...args) => __awaiter$I(this, void 0, void 0, function* () {
|
2562
2569
|
try {
|
2563
2570
|
return yield action(...args);
|
2564
2571
|
}
|
@@ -3008,7 +3015,7 @@ function _logStreamEvent(eventName, streamLogInfo, error) {
|
|
3008
3015
|
|
3009
3016
|
// Copyright (c) Microsoft Corporation.
|
3010
3017
|
// Licensed under the MIT License.
|
3011
|
-
var __awaiter$
|
3018
|
+
var __awaiter$H = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3012
3019
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3013
3020
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3014
3021
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3018,7 +3025,7 @@ var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
3018
3025
|
});
|
3019
3026
|
};
|
3020
3027
|
function createViewVideo(context, internalContext, callId, stream, participantId, options) {
|
3021
|
-
return __awaiter$
|
3028
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
3022
3029
|
// we can only have 3 types of createView
|
3023
3030
|
let streamEventType;
|
3024
3031
|
// we will reuse these for local as well but we need to make sure the remote stream is passed in like before.
|
@@ -3147,7 +3154,7 @@ function createViewVideo(context, internalContext, callId, stream, participantId
|
|
3147
3154
|
});
|
3148
3155
|
}
|
3149
3156
|
function createViewUnparentedVideo(context, internalContext, stream, options) {
|
3150
|
-
return __awaiter$
|
3157
|
+
return __awaiter$H(this, void 0, void 0, function* () {
|
3151
3158
|
const renderInfo = internalContext.getUnparentedRenderInfo(stream);
|
3152
3159
|
if (renderInfo && renderInfo.status === 'Rendered') {
|
3153
3160
|
console.warn('Unparented LocalVideoStream is already rendered');
|
@@ -3316,7 +3323,7 @@ function createView(context, internalContext, callId, participantId, stream, opt
|
|
3316
3323
|
// Render LocalVideoStream that is not part of a Call
|
3317
3324
|
// Because it is not part of the call we don't tee errors to state naturally (e.g. via a Call Client function such as startVideo).
|
3318
3325
|
// We do not have a startLocalPreviewVideo function, so as a workaround we ensure any errors are propagated here.
|
3319
|
-
return context.withAsyncErrorTeedToState(() => __awaiter$
|
3326
|
+
return context.withAsyncErrorTeedToState(() => __awaiter$H(this, void 0, void 0, function* () { return yield createViewUnparentedVideo(context, internalContext, stream, options); }), 'Call.startVideo')();
|
3320
3327
|
}
|
3321
3328
|
else {
|
3322
3329
|
_logStreamEvent(EventNames.CREATE_STREAM_INVALID_PARAMS, { streamType });
|
@@ -3867,7 +3874,7 @@ class CallSubscriber {
|
|
3867
3874
|
|
3868
3875
|
// Copyright (c) Microsoft Corporation.
|
3869
3876
|
// Licensed under the MIT License.
|
3870
|
-
var __awaiter$
|
3877
|
+
var __awaiter$G = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3871
3878
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3872
3879
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3873
3880
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -3887,14 +3894,14 @@ class ProxyIncomingCall {
|
|
3887
3894
|
switch (prop) {
|
3888
3895
|
case 'accept': {
|
3889
3896
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3890
|
-
return __awaiter$
|
3897
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
3891
3898
|
return yield target.accept(...args);
|
3892
3899
|
});
|
3893
3900
|
}, 'IncomingCall.accept');
|
3894
3901
|
}
|
3895
3902
|
case 'reject': {
|
3896
3903
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
3897
|
-
return __awaiter$
|
3904
|
+
return __awaiter$G(this, void 0, void 0, function* () {
|
3898
3905
|
return yield target.reject(...args);
|
3899
3906
|
});
|
3900
3907
|
}, 'IncomingCall.reject');
|
@@ -4135,7 +4142,7 @@ const clearCallRelatedState = (context, internalContext) => {
|
|
4135
4142
|
|
4136
4143
|
// Copyright (c) Microsoft Corporation.
|
4137
4144
|
// Licensed under the MIT License.
|
4138
|
-
var __awaiter$
|
4145
|
+
var __awaiter$F = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4139
4146
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4140
4147
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4141
4148
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4161,56 +4168,56 @@ class ProxyCallCommon {
|
|
4161
4168
|
switch (prop) {
|
4162
4169
|
case 'mute': {
|
4163
4170
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4164
|
-
return __awaiter$
|
4171
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4165
4172
|
return yield target.mute(...args);
|
4166
4173
|
});
|
4167
4174
|
}, 'Call.mute');
|
4168
4175
|
}
|
4169
4176
|
case 'unmute': {
|
4170
4177
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4171
|
-
return __awaiter$
|
4178
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4172
4179
|
return yield target.unmute(...args);
|
4173
4180
|
});
|
4174
4181
|
}, 'Call.unmute');
|
4175
4182
|
}
|
4176
4183
|
case 'startVideo': {
|
4177
4184
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4178
|
-
return __awaiter$
|
4185
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4179
4186
|
return yield target.startVideo(...args);
|
4180
4187
|
});
|
4181
4188
|
}, 'Call.startVideo');
|
4182
4189
|
}
|
4183
4190
|
case 'stopVideo': {
|
4184
4191
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4185
|
-
return __awaiter$
|
4192
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4186
4193
|
return yield target.stopVideo(...args);
|
4187
4194
|
});
|
4188
4195
|
}, 'Call.stopVideo');
|
4189
4196
|
}
|
4190
4197
|
case 'startScreenSharing': {
|
4191
4198
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4192
|
-
return __awaiter$
|
4199
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4193
4200
|
return yield target.startScreenSharing(...args);
|
4194
4201
|
});
|
4195
4202
|
}, 'Call.startScreenSharing');
|
4196
4203
|
}
|
4197
4204
|
case 'stopScreenSharing': {
|
4198
4205
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4199
|
-
return __awaiter$
|
4206
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4200
4207
|
return yield target.stopScreenSharing(...args);
|
4201
4208
|
});
|
4202
4209
|
}, 'Call.stopScreenSharing');
|
4203
4210
|
}
|
4204
4211
|
case 'hold': {
|
4205
4212
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4206
|
-
return __awaiter$
|
4213
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4207
4214
|
return yield target.hold(...args);
|
4208
4215
|
});
|
4209
4216
|
}, 'Call.hold');
|
4210
4217
|
}
|
4211
4218
|
case 'resume': {
|
4212
4219
|
return this._context.withAsyncErrorTeedToState(function (...args) {
|
4213
|
-
return __awaiter$
|
4220
|
+
return __awaiter$F(this, void 0, void 0, function* () {
|
4214
4221
|
return yield target.resume(...args);
|
4215
4222
|
});
|
4216
4223
|
}, 'Call.resume');
|
@@ -4250,7 +4257,7 @@ class ProxyTeamsCaptions {
|
|
4250
4257
|
get(target, prop) {
|
4251
4258
|
switch (prop) {
|
4252
4259
|
case 'startCaptions':
|
4253
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4260
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$F(this, void 0, void 0, function* () {
|
4254
4261
|
var _a, _b;
|
4255
4262
|
this._context.setStartCaptionsInProgress(this._call.id, true);
|
4256
4263
|
const ret = yield target.startCaptions(...args);
|
@@ -4258,7 +4265,7 @@ class ProxyTeamsCaptions {
|
|
4258
4265
|
return ret;
|
4259
4266
|
}), 'Call.feature');
|
4260
4267
|
case 'stopCaptions':
|
4261
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4268
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$F(this, void 0, void 0, function* () {
|
4262
4269
|
const ret = yield target.stopCaptions(...args);
|
4263
4270
|
this._context.setIsCaptionActive(this._call.id, false);
|
4264
4271
|
this._context.setStartCaptionsInProgress(this._call.id, false);
|
@@ -4266,13 +4273,13 @@ class ProxyTeamsCaptions {
|
|
4266
4273
|
return ret;
|
4267
4274
|
}), 'Call.feature');
|
4268
4275
|
case 'setSpokenLanguage':
|
4269
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4276
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$F(this, void 0, void 0, function* () {
|
4270
4277
|
const ret = yield target.setSpokenLanguage(...args);
|
4271
4278
|
this._context.setSelectedSpokenLanguage(this._call.id, args[0]);
|
4272
4279
|
return ret;
|
4273
4280
|
}), 'Call.feature');
|
4274
4281
|
case 'setCaptionLanguage':
|
4275
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4282
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$F(this, void 0, void 0, function* () {
|
4276
4283
|
const ret = yield target.setCaptionLanguage(...args);
|
4277
4284
|
this._context.setSelectedCaptionLanguage(this._call.id, args[0]);
|
4278
4285
|
return ret;
|
@@ -4320,7 +4327,7 @@ class ProxyTransferCallFeature {
|
|
4320
4327
|
|
4321
4328
|
// Copyright (c) Microsoft Corporation.
|
4322
4329
|
// Licensed under the MIT License.
|
4323
|
-
var __awaiter$
|
4330
|
+
var __awaiter$E = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4324
4331
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4325
4332
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4326
4333
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4334,7 +4341,7 @@ class ProxyCall extends ProxyCallCommon {
|
|
4334
4341
|
switch (prop) {
|
4335
4342
|
case 'addParticipant': {
|
4336
4343
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4337
|
-
return __awaiter$
|
4344
|
+
return __awaiter$E(this, void 0, void 0, function* () {
|
4338
4345
|
return yield target.addParticipant(...args);
|
4339
4346
|
});
|
4340
4347
|
}, 'Call.addParticipant');
|
@@ -4572,7 +4579,7 @@ class InternalCallContext {
|
|
4572
4579
|
|
4573
4580
|
// Copyright (c) Microsoft Corporation.
|
4574
4581
|
// Licensed under the MIT License.
|
4575
|
-
var __awaiter$
|
4582
|
+
var __awaiter$D = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4576
4583
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4577
4584
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4578
4585
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4587,7 +4594,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
4587
4594
|
switch (prop) {
|
4588
4595
|
case 'addParticipant': {
|
4589
4596
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
4590
|
-
return __awaiter$
|
4597
|
+
return __awaiter$D(this, void 0, void 0, function* () {
|
4591
4598
|
return yield target.addParticipant(...args);
|
4592
4599
|
});
|
4593
4600
|
}, 'TeamsCall.addParticipant');
|
@@ -4704,7 +4711,7 @@ const teamsCallAgentDeclaratify = (callAgent, context, internalContext) => {
|
|
4704
4711
|
|
4705
4712
|
// Copyright (c) Microsoft Corporation.
|
4706
4713
|
// Licensed under the MIT License.
|
4707
|
-
var __awaiter$
|
4714
|
+
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4708
4715
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4709
4716
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4710
4717
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4726,7 +4733,7 @@ class ProxyVideoStreamRendererView {
|
|
4726
4733
|
get(target, prop) {
|
4727
4734
|
switch (prop) {
|
4728
4735
|
case 'updateScalingMode': {
|
4729
|
-
return (...args) => __awaiter$
|
4736
|
+
return (...args) => __awaiter$C(this, void 0, void 0, function* () {
|
4730
4737
|
yield target.updateScalingMode(...args);
|
4731
4738
|
this._context.setRemoteVideoStreamViewScalingMode(this._callId, this._participantId, this._streamId, args[0]);
|
4732
4739
|
});
|
@@ -4747,7 +4754,7 @@ const videoStreamRendererViewDeclaratify = (view, context, callId, participantId
|
|
4747
4754
|
|
4748
4755
|
// Copyright (c) Microsoft Corporation.
|
4749
4756
|
// Licensed under the MIT License.
|
4750
|
-
var __awaiter$
|
4757
|
+
var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4751
4758
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4752
4759
|
return new (P || (P = Promise))(function (resolve, reject) {
|
4753
4760
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -4769,7 +4776,7 @@ class ProxyCallClient {
|
|
4769
4776
|
get(target, prop) {
|
4770
4777
|
switch (prop) {
|
4771
4778
|
case 'createCallAgent': {
|
4772
|
-
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4779
|
+
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$B(this, void 0, void 0, function* () {
|
4773
4780
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4774
4781
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4775
4782
|
// callAgent if the createCallAgent succeeds.
|
@@ -4782,7 +4789,7 @@ class ProxyCallClient {
|
|
4782
4789
|
}), 'CallClient.createCallAgent');
|
4783
4790
|
}
|
4784
4791
|
case 'createTeamsCallAgent': {
|
4785
|
-
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$
|
4792
|
+
/* @conditional-compile-remove(teams-identity-support) */ return this._context.withAsyncErrorTeedToState((...args) => __awaiter$B(this, void 0, void 0, function* () {
|
4786
4793
|
// createCallAgent will throw an exception if the previous callAgent was not disposed. If the previous
|
4787
4794
|
// callAgent was disposed then it would have unsubscribed to events so we can just create a new declarative
|
4788
4795
|
// callAgent if the createCallAgent succeeds.
|
@@ -4795,7 +4802,7 @@ class ProxyCallClient {
|
|
4795
4802
|
}), 'CallClient.createTeamsCallAgent');
|
4796
4803
|
}
|
4797
4804
|
case 'getDeviceManager': {
|
4798
|
-
return this._context.withAsyncErrorTeedToState(() => __awaiter$
|
4805
|
+
return this._context.withAsyncErrorTeedToState(() => __awaiter$B(this, void 0, void 0, function* () {
|
4799
4806
|
// As of writing, the SDK always returns the same instance of DeviceManager so we keep a reference of
|
4800
4807
|
// DeviceManager and if it does not change we return the cached DeclarativeDeviceManager. If it does not we'll
|
4801
4808
|
// throw an error that indicate we need to fix this issue as our implementation has diverged from the SDK.
|
@@ -4824,7 +4831,7 @@ class ProxyCallClient {
|
|
4824
4831
|
/**
|
4825
4832
|
* add to this object if we want to proxy anything else off the DebugInfo feature object.
|
4826
4833
|
*/
|
4827
|
-
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$
|
4834
|
+
return Object.assign(Object.assign({}, feature), { getEnvironmentInfo: () => __awaiter$B(this, void 0, void 0, function* () {
|
4828
4835
|
const environmentInfo = yield feature.getEnvironmentInfo();
|
4829
4836
|
this._context.setEnvironmentInfo(environmentInfo);
|
4830
4837
|
return environmentInfo;
|
@@ -4885,7 +4892,7 @@ const createStatefulCallClientWithDeps = (callClient, context, internalContext)
|
|
4885
4892
|
});
|
4886
4893
|
Object.defineProperty(callClient, 'createView', {
|
4887
4894
|
configurable: false,
|
4888
|
-
value: (callId, participantId, stream, options) => __awaiter$
|
4895
|
+
value: (callId, participantId, stream, options) => __awaiter$B(void 0, void 0, void 0, function* () {
|
4889
4896
|
const participantIdKind = participantId ? communicationCommon.getIdentifierKind(participantId) : undefined;
|
4890
4897
|
const result = yield createView(context, internalContext, callId, participantIdKind, stream, options);
|
4891
4898
|
// We only need to declaratify the VideoStreamRendererView object for remote participants. Because the updateScalingMode only needs to be called on remote participant stream views.
|
@@ -7433,7 +7440,7 @@ const _MentionPopover = (props) => {
|
|
7433
7440
|
|
7434
7441
|
// Copyright (c) Microsoft Corporation.
|
7435
7442
|
// Licensed under the MIT License.
|
7436
|
-
var __awaiter$
|
7443
|
+
var __awaiter$A = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
7437
7444
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
7438
7445
|
return new (P || (P = Promise))(function (resolve, reject) {
|
7439
7446
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -7608,7 +7615,7 @@ const TextFieldWithMention = (props) => {
|
|
7608
7615
|
onSuggestionSelected,
|
7609
7616
|
updateMentionSuggestions
|
7610
7617
|
]);
|
7611
|
-
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$
|
7618
|
+
const debouncedQueryUpdate = useDebounce.useDebouncedCallback((query) => __awaiter$A(void 0, void 0, void 0, function* () {
|
7612
7619
|
var _a;
|
7613
7620
|
let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
|
7614
7621
|
suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');
|
@@ -7785,7 +7792,7 @@ const TextFieldWithMention = (props) => {
|
|
7785
7792
|
});
|
7786
7793
|
}
|
7787
7794
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
7788
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$
|
7795
|
+
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter$A(void 0, void 0, void 0, function* () {
|
7789
7796
|
var _b;
|
7790
7797
|
debouncedQueryUpdate.cancel();
|
7791
7798
|
if (event.currentTarget === null) {
|
@@ -10393,7 +10400,7 @@ const chatMessageActionMenuProps = (menuProps) => {
|
|
10393
10400
|
|
10394
10401
|
// Copyright (c) Microsoft Corporation.
|
10395
10402
|
// Licensed under the MIT License.
|
10396
|
-
var __awaiter$
|
10403
|
+
var __awaiter$z = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10397
10404
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10398
10405
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10399
10406
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10436,7 +10443,7 @@ const _FileDownloadCards = (props) => {
|
|
10436
10443
|
fileCount: `${(_c = fileMetadata === null || fileMetadata === void 0 ? void 0 : fileMetadata.filter(isFileSharingAttachment).length) !== null && _c !== void 0 ? _c : 0}`
|
10437
10444
|
});
|
10438
10445
|
}, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
|
10439
|
-
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$
|
10446
|
+
const fileDownloadHandler = React.useCallback((userId, file) => __awaiter$z(void 0, void 0, void 0, function* () {
|
10440
10447
|
if (!props.downloadHandler) {
|
10441
10448
|
window.open(file.url, '_blank', 'noopener,noreferrer');
|
10442
10449
|
}
|
@@ -10486,7 +10493,7 @@ const useLocaleStringsTrampoline = () => {
|
|
10486
10493
|
|
10487
10494
|
// Copyright (c) Microsoft Corporation.
|
10488
10495
|
// Licensed under the MIT License.
|
10489
|
-
var __awaiter$
|
10496
|
+
var __awaiter$y = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10490
10497
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10491
10498
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10492
10499
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10582,7 +10589,7 @@ const MessageBubble = (props) => {
|
|
10582
10589
|
}
|
10583
10590
|
return undefined;
|
10584
10591
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
10585
|
-
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$
|
10592
|
+
const handleOnInlineImageClicked = React.useCallback((attachmentId) => __awaiter$y(void 0, void 0, void 0, function* () {
|
10586
10593
|
if (onInlineImageClicked === undefined) {
|
10587
10594
|
return;
|
10588
10595
|
}
|
@@ -10683,7 +10690,7 @@ const ChatMessageComponentAsMessageBubble = React.memo(MessageBubble);
|
|
10683
10690
|
|
10684
10691
|
// Copyright (c) Microsoft Corporation.
|
10685
10692
|
// Licensed under the MIT License.
|
10686
|
-
var __awaiter$
|
10693
|
+
var __awaiter$x = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
10687
10694
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
10688
10695
|
return new (P || (P = Promise))(function (resolve, reject) {
|
10689
10696
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -10716,7 +10723,7 @@ const ChatMessageComponent = (props) => {
|
|
10716
10723
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
10717
10724
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
10718
10725
|
if (isEditing && message.messageType === 'chat') {
|
10719
|
-
return (React.createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$
|
10726
|
+
return (React.createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$x(void 0, void 0, void 0, function* () {
|
10720
10727
|
props.onUpdateMessage &&
|
10721
10728
|
message.messageId &&
|
10722
10729
|
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
@@ -11006,7 +11013,7 @@ const ChatMessageComponentWrapper = (props) => {
|
|
11006
11013
|
|
11007
11014
|
// Copyright (c) Microsoft Corporation.
|
11008
11015
|
// Licensed under the MIT License.
|
11009
|
-
var __awaiter$
|
11016
|
+
var __awaiter$w = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
11010
11017
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
11011
11018
|
return new (P || (P = Promise))(function (resolve, reject) {
|
11012
11019
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
@@ -11170,7 +11177,7 @@ const MessageThreadWrapper = (props) => {
|
|
11170
11177
|
// readCount and participantCount will only need to be updated on-fly when user hover on an indicator
|
11171
11178
|
const [readCountForHoveredIndicator, setReadCountForHoveredIndicator] = React.useState(undefined);
|
11172
11179
|
const [inlineAttachments, setInlineAttachments] = React.useState({});
|
11173
|
-
const onFetchInlineAttachment = React.useCallback((attachments, messageId) => __awaiter$
|
11180
|
+
const onFetchInlineAttachment = React.useCallback((attachments, messageId) => __awaiter$w(void 0, void 0, void 0, function* () {
|
11174
11181
|
if (!onFetchAttachments || attachments.length === 0) {
|
11175
11182
|
return;
|
11176
11183
|
}
|
@@ -11200,7 +11207,7 @@ const MessageThreadWrapper = (props) => {
|
|
11200
11207
|
const previousMessagesRef = React.useRef([]);
|
11201
11208
|
// an aria label for Narrator to notify when a message is deleted
|
11202
11209
|
const [deletedMessageAriaLabel, setDeletedMessageAriaLabel] = React.useState(undefined);
|
11203
|
-
const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$
|
11210
|
+
const onDeleteMessageCallback = React.useCallback((messageId) => __awaiter$w(void 0, void 0, void 0, function* () {
|
11204
11211
|
if (!onDeleteMessage) {
|
11205
11212
|
return;
|
11206
11213
|
}
|
@@ -11280,7 +11287,7 @@ const MessageThreadWrapper = (props) => {
|
|
11280
11287
|
*/
|
11281
11288
|
const clientHeight = (_a = chatThreadRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
|
11282
11289
|
// we try to only send those message status if user is scrolled to the bottom.
|
11283
|
-
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$
|
11290
|
+
const sendMessageStatusIfAtBottom = React.useCallback(() => __awaiter$w(void 0, void 0, void 0, function* () {
|
11284
11291
|
if (!isAtBottomOfScrollRef.current ||
|
11285
11292
|
!document.hasFocus() ||
|
11286
11293
|
!messagesRef.current ||
|
@@ -11331,7 +11338,7 @@ const MessageThreadWrapper = (props) => {
|
|
11331
11338
|
setIsAtBottomOfScrollRef(atBottom);
|
11332
11339
|
}, [scrollToBottom, sendMessageStatusIfAtBottom]);
|
11333
11340
|
// Infinite scrolling + threadInitialize function
|
11334
|
-
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$
|
11341
|
+
const fetchNewMessageWhenAtTop = React.useCallback(() => __awaiter$w(void 0, void 0, void 0, function* () {
|
11335
11342
|
if (!isLoadingChatMessagesRef.current) {
|
11336
11343
|
if (onLoadPreviousChatMessages) {
|
11337
11344
|
isLoadingChatMessagesRef.current = true;
|
@@ -13340,6 +13347,10 @@ const localVideoCameraCycleButtonStyles = (theme, size) => {
|
|
13340
13347
|
color: '#FFFFFF',
|
13341
13348
|
background: 'rgba(0,0,0,0.4)' // sets opacity of background to be visible on all backdrops in video stream.
|
13342
13349
|
},
|
13350
|
+
rootDisabled: {
|
13351
|
+
// In the disabled state, FluentUI sets the position to relative. We need to override this to keep the button correctly positioned.
|
13352
|
+
position: 'absolute'
|
13353
|
+
},
|
13343
13354
|
icon: {
|
13344
13355
|
paddingLeft: _pxToRem(3),
|
13345
13356
|
paddingRight: _pxToRem(3),
|
@@ -13360,6 +13371,15 @@ const localVideoTileContainerStyles = {
|
|
13360
13371
|
|
13361
13372
|
// Copyright (c) Microsoft Corporation.
|
13362
13373
|
// Licensed under the MIT License.
|
13374
|
+
var __awaiter$v = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
13375
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
13376
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
13377
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
13378
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
13379
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
13380
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
13381
|
+
});
|
13382
|
+
};
|
13363
13383
|
/**
|
13364
13384
|
* local video tile camera cycle button - for use on mobile screens only.
|
13365
13385
|
* @internal
|
@@ -13367,13 +13387,26 @@ const localVideoTileContainerStyles = {
|
|
13367
13387
|
const LocalVideoCameraCycleButton = (props) => {
|
13368
13388
|
const { cameras, selectedCamera, onSelectCamera, label, ariaDescription, size } = props;
|
13369
13389
|
const theme = react.useTheme();
|
13370
|
-
|
13390
|
+
const [waitForCamera, setWaitForCamera] = React.useState(false);
|
13391
|
+
const onChangeCameraClick = React.useCallback((device) => __awaiter$v(void 0, void 0, void 0, function* () {
|
13392
|
+
// Throttle changing camera to prevent too many callbacks
|
13393
|
+
if (onSelectCamera) {
|
13394
|
+
setWaitForCamera(true);
|
13395
|
+
try {
|
13396
|
+
yield onSelectCamera(device);
|
13397
|
+
}
|
13398
|
+
finally {
|
13399
|
+
setWaitForCamera(false);
|
13400
|
+
}
|
13401
|
+
}
|
13402
|
+
}), [onSelectCamera]);
|
13403
|
+
const disabled = !!waitForCamera;
|
13404
|
+
const cameraLoadingString = useLocale$1().strings.cameraButton.tooltipVideoLoadingContent;
|
13405
|
+
return (React.createElement(react.IconButton, { "data-ui-id": 'local-camera-switcher-button', styles: localVideoCameraCycleButtonStyles(theme, size), disabled: disabled, iconProps: { iconName: 'LocalCameraSwitch' }, ariaLabel: label, ariaDescription: disabled ? cameraLoadingString : ariaDescription, "aria-live": 'polite', onClick: () => {
|
13371
13406
|
if (cameras && cameras.length > 1 && selectedCamera !== undefined) {
|
13372
13407
|
const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);
|
13373
13408
|
const newCamera = cameras[(index + 1) % cameras.length];
|
13374
|
-
|
13375
|
-
onSelectCamera(newCamera);
|
13376
|
-
}
|
13409
|
+
onChangeCameraClick(newCamera);
|
13377
13410
|
}
|
13378
13411
|
} }));
|
13379
13412
|
};
|
@@ -16431,7 +16464,7 @@ const defaultLocalVideoViewOptions = {
|
|
16431
16464
|
*/
|
16432
16465
|
const CameraButton = (props) => {
|
16433
16466
|
var _a, _b, _c, _d, _e, _f, _g;
|
16434
|
-
const { localVideoViewOptions, onToggleCamera } = props;
|
16467
|
+
const { localVideoViewOptions, onToggleCamera, onSelectCamera } = props;
|
16435
16468
|
const [waitForCamera, setWaitForCamera] = React.useState(false);
|
16436
16469
|
const localeStrings = useLocale$1().strings.cameraButton;
|
16437
16470
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
@@ -16461,6 +16494,18 @@ const CameraButton = (props) => {
|
|
16461
16494
|
}
|
16462
16495
|
}
|
16463
16496
|
}), [cameraOn, localVideoViewOptions, onToggleCamera, toggleAnnouncerString]);
|
16497
|
+
const onChangeCameraClick = React.useCallback((device) => __awaiter$u(void 0, void 0, void 0, function* () {
|
16498
|
+
// Throttle changing camera to prevent too many callbacks
|
16499
|
+
if (onSelectCamera) {
|
16500
|
+
setWaitForCamera(true);
|
16501
|
+
try {
|
16502
|
+
yield onSelectCamera(device);
|
16503
|
+
}
|
16504
|
+
finally {
|
16505
|
+
setWaitForCamera(false);
|
16506
|
+
}
|
16507
|
+
}
|
16508
|
+
}), [onSelectCamera]);
|
16464
16509
|
const splitButtonMenuItems = [];
|
16465
16510
|
/* @conditional-compile-remove(video-background-effects) */
|
16466
16511
|
if (props.onClickVideoEffects) {
|
@@ -16500,7 +16545,7 @@ const CameraButton = (props) => {
|
|
16500
16545
|
return (React.createElement(React.Fragment, null,
|
16501
16546
|
React.createElement(Announcer$1, { announcementString: announcerString, ariaLive: 'polite' }),
|
16502
16547
|
React.createElement(ControlBarButton, Object.assign({}, props, { disabled: disabled, onClick: onToggleCamera ? onToggleClick : props.onClick, onRenderOnIcon: (_a = props.onRenderOnIcon) !== null && _a !== void 0 ? _a : onRenderCameraOnIcon, onRenderOffIcon: (_b = props.onRenderOffIcon) !== null && _b !== void 0 ? _b : onRenderCameraOffIcon, strings: strings, labelKey: (_c = props.labelKey) !== null && _c !== void 0 ? _c : 'cameraButtonLabel', menuProps: (_d = props.menuProps) !== null && _d !== void 0 ? _d : (props.enableDeviceSelectionMenu
|
16503
|
-
? generateDefaultDeviceMenuProps(Object.assign(Object.assign({}, props), { styles: (_e = props.styles) === null || _e === void 0 ? void 0 : _e.menuStyles }), strings, splitButtonPrimaryAction)
|
16548
|
+
? generateDefaultDeviceMenuProps(Object.assign(Object.assign({}, props), { onSelectCamera: onChangeCameraClick, styles: (_e = props.styles) === null || _e === void 0 ? void 0 : _e.menuStyles }), strings, splitButtonPrimaryAction)
|
16504
16549
|
: undefined), menuIconProps: ((_f = props.menuIconProps) !== null && _f !== void 0 ? _f : !props.enableDeviceSelectionMenu) ? { hidden: true } : undefined, split: (_g = props.split) !== null && _g !== void 0 ? _g : props.enableDeviceSelectionMenu, "aria-roledescription": props.enableDeviceSelectionMenu ? strings.cameraButtonSplitRoleDescription : undefined, splitButtonAriaLabel: props.enableDeviceSelectionMenu ? splitButtonAriaString : undefined, splitButtonMenuProps: splitButtonMenuProps }))));
|
16505
16550
|
};
|
16506
16551
|
|
@@ -17602,6 +17647,75 @@ const formatPhoneNumber = (phoneNumber) => {
|
|
17602
17647
|
return `${countryCodeNA}(${phoneNumber.slice(0, 3)}) ${phoneNumber.slice(3, 6)}-${phoneNumber.slice(6, phoneNumber.length)}`;
|
17603
17648
|
};
|
17604
17649
|
|
17650
|
+
// Copyright (c) Microsoft Corporation.
|
17651
|
+
// Licensed under the MIT License.
|
17652
|
+
/**
|
17653
|
+
* Class for playing individual DTMF Tones.
|
17654
|
+
*
|
17655
|
+
* @internal
|
17656
|
+
*/
|
17657
|
+
class Tone {
|
17658
|
+
constructor(context, frequency1, frequency2) {
|
17659
|
+
this.isPlaying = false;
|
17660
|
+
/**
|
17661
|
+
* Function to play the tone. will create new ocillators because they are one use objects so we need to make
|
17662
|
+
* new ones every time we play a tone.
|
17663
|
+
*/
|
17664
|
+
this.play = () => {
|
17665
|
+
if (this.isPlaying) {
|
17666
|
+
return;
|
17667
|
+
}
|
17668
|
+
const gainNode = this.context.createGain();
|
17669
|
+
gainNode.gain.value = 0.1;
|
17670
|
+
gainNode.connect(this.context.destination);
|
17671
|
+
this.oscillatorNode1 = this.context.createOscillator();
|
17672
|
+
this.oscillatorNode1.frequency.value = this.frequency1;
|
17673
|
+
this.oscillatorNode1.connect(gainNode);
|
17674
|
+
this.oscillatorNode2 = this.context.createOscillator();
|
17675
|
+
this.oscillatorNode2.frequency.value = this.frequency2;
|
17676
|
+
this.oscillatorNode2.connect(gainNode);
|
17677
|
+
this.oscillatorNode1.start();
|
17678
|
+
this.oscillatorNode2.start();
|
17679
|
+
this.isPlaying = true;
|
17680
|
+
};
|
17681
|
+
/**
|
17682
|
+
* Function to stop the tone.
|
17683
|
+
*/
|
17684
|
+
this.stop = () => {
|
17685
|
+
if (this.oscillatorNode1 && this.oscillatorNode2) {
|
17686
|
+
this.oscillatorNode1.stop();
|
17687
|
+
this.oscillatorNode2.stop();
|
17688
|
+
this.oscillatorNode1.disconnect();
|
17689
|
+
this.oscillatorNode2.disconnect();
|
17690
|
+
this.isPlaying = false;
|
17691
|
+
}
|
17692
|
+
};
|
17693
|
+
this.context = context;
|
17694
|
+
this.frequency1 = frequency1;
|
17695
|
+
this.frequency2 = frequency2;
|
17696
|
+
}
|
17697
|
+
}
|
17698
|
+
/**
|
17699
|
+
* Mapping of the different dtmf frequencies that are needed for the creation of sound that
|
17700
|
+
* matches the dtmf tones.
|
17701
|
+
*
|
17702
|
+
* @internal
|
17703
|
+
*/
|
17704
|
+
const dtmfFrequencies = {
|
17705
|
+
'1': { f1: 697, f2: 1209 },
|
17706
|
+
'2': { f1: 697, f2: 1336 },
|
17707
|
+
'3': { f1: 697, f2: 1477 },
|
17708
|
+
'4': { f1: 770, f2: 1209 },
|
17709
|
+
'5': { f1: 770, f2: 1336 },
|
17710
|
+
'6': { f1: 770, f2: 1477 },
|
17711
|
+
'7': { f1: 852, f2: 1209 },
|
17712
|
+
'8': { f1: 852, f2: 1336 },
|
17713
|
+
'9': { f1: 852, f2: 1477 },
|
17714
|
+
'*': { f1: 941, f2: 1209 },
|
17715
|
+
'0': { f1: 941, f2: 1336 },
|
17716
|
+
'#': { f1: 941, f2: 1477 }
|
17717
|
+
};
|
17718
|
+
|
17605
17719
|
// Copyright (c) Microsoft Corporation.
|
17606
17720
|
// Licensed under the MIT License.
|
17607
17721
|
var __awaiter$s = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -17644,7 +17758,12 @@ const DtmfTones = [
|
|
17644
17758
|
const DialpadButton = (props) => {
|
17645
17759
|
var _a, _b, _c, _d;
|
17646
17760
|
const theme = react.useTheme();
|
17647
|
-
const { digit, index, onClick, onLongPress, isMobile = false
|
17761
|
+
const { digit, index, onClick, onLongPress, isMobile = false,
|
17762
|
+
/* @conditional-compile-remove(dtmf-dialer) */ dtmfToneAudioContext } = props;
|
17763
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17764
|
+
const [buttonPressed, setButtonPressed] = React.useState(false);
|
17765
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17766
|
+
const dtmfToneSound = React.useRef(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));
|
17648
17767
|
const useLongPressProps = React.useMemo(() => ({
|
17649
17768
|
onClick: () => __awaiter$s(void 0, void 0, void 0, function* () {
|
17650
17769
|
onClick(digit, index);
|
@@ -17655,7 +17774,32 @@ const DialpadButton = (props) => {
|
|
17655
17774
|
touchEventsOnly: isMobile
|
17656
17775
|
}), [digit, index, isMobile, onClick, onLongPress]);
|
17657
17776
|
const longPressHandlers = useLongPress(useLongPressProps);
|
17658
|
-
return (React.createElement(react.DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: react.concatStyleSets(buttonStyles$1(), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, longPressHandlers)
|
17777
|
+
return (React.createElement(react.DefaultButton, Object.assign({ "data-test-id": `dialpad-button-${props.index}`, styles: react.concatStyleSets(buttonStyles$1(), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.button) }, longPressHandlers, { onKeyDown: (e) => {
|
17778
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17779
|
+
if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {
|
17780
|
+
dtmfToneSound.current.play();
|
17781
|
+
longPressHandlers.onKeyDown();
|
17782
|
+
setButtonPressed(true);
|
17783
|
+
return;
|
17784
|
+
}
|
17785
|
+
longPressHandlers.onKeyDown();
|
17786
|
+
}, onKeyUp: (e) => {
|
17787
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17788
|
+
if ((e.key === 'Enter' || e.key === ' ') && buttonPressed) {
|
17789
|
+
dtmfToneSound.current.stop();
|
17790
|
+
longPressHandlers.onKeyUp();
|
17791
|
+
setButtonPressed(false);
|
17792
|
+
}
|
17793
|
+
longPressHandlers.onKeyUp();
|
17794
|
+
}, onMouseDown: () => {
|
17795
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17796
|
+
dtmfToneSound.current.play();
|
17797
|
+
longPressHandlers.onMouseDown();
|
17798
|
+
}, onMouseUp: () => {
|
17799
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17800
|
+
dtmfToneSound.current.stop();
|
17801
|
+
longPressHandlers.onMouseUp();
|
17802
|
+
} }),
|
17659
17803
|
React.createElement(react.Stack, null,
|
17660
17804
|
React.createElement(react.Text, { className: react.mergeStyles(digitStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.digit) }, props.digit),
|
17661
17805
|
React.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 : ' '))));
|
@@ -17665,6 +17809,8 @@ const DialpadContainer = (props) => {
|
|
17665
17809
|
const theme = react.useTheme();
|
17666
17810
|
const { onSendDtmfTone, onClickDialpadButton, textFieldValue, onChange, showDeleteButton = true, isMobile = false } = props;
|
17667
17811
|
const [plainTextValue, setPlainTextValue] = React.useState(textFieldValue !== null && textFieldValue !== void 0 ? textFieldValue : '');
|
17812
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17813
|
+
const dtmfToneAudioContext = React.useRef(new AudioContext());
|
17668
17814
|
React.useEffect(() => {
|
17669
17815
|
if (onChange) {
|
17670
17816
|
onChange(plainTextValue);
|
@@ -17742,7 +17888,9 @@ const DialpadContainer = (props) => {
|
|
17742
17888
|
then use this index to locate the corresponding dtmf tones
|
17743
17889
|
DtmfTones[index]
|
17744
17890
|
*/
|
17745
|
-
index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad, isMobile: isMobile
|
17891
|
+
index: columnIndex + rowIndex * rows.length, digit: button.digit, letter: button.letter, styles: props.styles, onClick: onClickDialpad, onLongPress: onLongPressDialpad, isMobile: isMobile,
|
17892
|
+
/* @conditional-compile-remove(dtmf-dialer) */
|
17893
|
+
dtmfToneAudioContext: dtmfToneAudioContext.current })))));
|
17746
17894
|
}))));
|
17747
17895
|
};
|
17748
17896
|
/**
|
@@ -17773,7 +17921,7 @@ const sanitizeInput = (input) => {
|
|
17773
17921
|
*/
|
17774
17922
|
const helperTextStyle$1 = (theme) => react.mergeStyles({
|
17775
17923
|
fontWeight: 600,
|
17776
|
-
fontSize: _pxToRem(
|
17924
|
+
fontSize: _pxToRem(16),
|
17777
17925
|
lineHeight: _pxToRem(20),
|
17778
17926
|
color: theme.palette.neutralPrimary,
|
17779
17927
|
paddingTop: _pxToRem(20)
|
@@ -17796,10 +17944,18 @@ const ratingHelperTextStyle = (theme) => react.mergeStyles({
|
|
17796
17944
|
const ratingStyles = (theme) => {
|
17797
17945
|
return {
|
17798
17946
|
root: {
|
17799
|
-
textAlign: 'center'
|
17947
|
+
textAlign: 'center',
|
17948
|
+
height: 'auto',
|
17949
|
+
marginTop: _pxToRem(8)
|
17950
|
+
},
|
17951
|
+
ratingStarIsLarge: {
|
17952
|
+
height: 'auto',
|
17953
|
+
padding: 0
|
17800
17954
|
},
|
17801
17955
|
ratingStar: {
|
17802
|
-
transform: 'scale(1.
|
17956
|
+
transform: 'scale(1.2)',
|
17957
|
+
margin: _pxToRem(6),
|
17958
|
+
height: 'auto'
|
17803
17959
|
},
|
17804
17960
|
ratingStarFront: {
|
17805
17961
|
color: theme.palette.themePrimary
|
@@ -17869,7 +18025,7 @@ const _StarSurvey = (props) => {
|
|
17869
18025
|
*/
|
17870
18026
|
const questionTextStyle = (theme) => react.mergeStyles({
|
17871
18027
|
fontWeight: 600,
|
17872
|
-
fontSize: _pxToRem(
|
18028
|
+
fontSize: _pxToRem(16),
|
17873
18029
|
lineHeight: _pxToRem(20),
|
17874
18030
|
color: theme.palette.neutralPrimary,
|
17875
18031
|
paddingTop: _pxToRem(20)
|
@@ -17881,7 +18037,7 @@ const helperTextStyle = (theme) => react.mergeStyles({
|
|
17881
18037
|
fontWeight: 400,
|
17882
18038
|
fontSize: _pxToRem(12),
|
17883
18039
|
lineHeight: _pxToRem(16),
|
17884
|
-
color: theme.palette.
|
18040
|
+
color: theme.palette.neutralSecondary
|
17885
18041
|
});
|
17886
18042
|
/**
|
17887
18043
|
* @private
|
@@ -17895,8 +18051,7 @@ const checkboxClassName = react.mergeStyles({
|
|
17895
18051
|
*/
|
17896
18052
|
const freeFormTextCheckboxStyles = {
|
17897
18053
|
root: {
|
17898
|
-
|
17899
|
-
paddingLeft: 0,
|
18054
|
+
paddingBottom: _pxToRem(8),
|
17900
18055
|
width: '100%'
|
17901
18056
|
},
|
17902
18057
|
label: {
|
@@ -17907,7 +18062,11 @@ const freeFormTextCheckboxStyles = {
|
|
17907
18062
|
* @private
|
17908
18063
|
*/
|
17909
18064
|
const freeFormTextFieldClassName = react.mergeStyles({
|
17910
|
-
width: '100%'
|
18065
|
+
width: '100%',
|
18066
|
+
marginLeft: _pxToRem(4),
|
18067
|
+
input: {
|
18068
|
+
padding: 0
|
18069
|
+
}
|
17911
18070
|
});
|
17912
18071
|
|
17913
18072
|
// Copyright (c) Microsoft Corporation.
|
@@ -18009,8 +18168,7 @@ const _TagsSurvey = (props) => {
|
|
18009
18168
|
}, [strings === null || strings === void 0 ? void 0 : strings.tagsSurveyTextFieldDefaultText]);
|
18010
18169
|
return (React.createElement(React.Fragment, null,
|
18011
18170
|
React.createElement(react.Stack, { verticalAlign: "center" },
|
18012
|
-
React.createElement(react.Text, { className: questionTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.tagsSurveyQuestion),
|
18013
|
-
React.createElement(react.Text, { className: helperTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.tagsSurveyHelperText)),
|
18171
|
+
React.createElement(react.Text, { className: questionTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.tagsSurveyQuestion)),
|
18014
18172
|
React.createElement(react.Pivot, null, Object.keys(tags).map((key, i) => {
|
18015
18173
|
return (React.createElement(react.PivotItem, { key: `key-${i}`, headerText: categoryHeadings[key], headerButtonProps: {
|
18016
18174
|
'data-order': i,
|
@@ -18022,7 +18180,8 @@ const _TagsSurvey = (props) => {
|
|
18022
18180
|
showFreeFormTextField && (React.createElement(react.Checkbox, { styles: freeFormTextCheckboxStyles, onChange: (ev, checked) => onChange(key, checked !== null && checked !== void 0 ? checked : false), onRenderLabel: () => {
|
18023
18181
|
return onRenderLabel(key);
|
18024
18182
|
} }))));
|
18025
|
-
}))
|
18183
|
+
})),
|
18184
|
+
React.createElement(react.Text, { className: helperTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.tagsSurveyHelperText)));
|
18026
18185
|
};
|
18027
18186
|
|
18028
18187
|
// Copyright (c) Microsoft Corporation.
|
@@ -26809,8 +26968,11 @@ const PeopleAndChatHeader = (props) => {
|
|
26809
26968
|
}, [theme, haveMultipleTabs]);
|
26810
26969
|
return (React.createElement(react.Stack, { horizontal: true, grow: true, styles: mobilePaneControlBarStyle },
|
26811
26970
|
React.createElement(react.DefaultButton, { ariaLabel: strings.returnToCallButtonAriaLabel, ariaDescription: strings.returnToCallButtonAriaDescription, onClick: onClose, styles: mobilePaneBackButtonStyles, onRenderIcon: () => React.createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }), autoFocus: true }),
|
26812
|
-
React.createElement(react.Stack.Item, { grow: true
|
26813
|
-
|
26971
|
+
React.createElement(react.Stack.Item, { grow: true, role: "tablist" },
|
26972
|
+
React.createElement(react.FocusZone, { direction: react.FocusZoneDirection.horizontal, className: react.mergeStyles(availableSpaceStyles.root) },
|
26973
|
+
React.createElement(react.Stack, { horizontal: true, styles: availableSpaceStyles },
|
26974
|
+
React.createElement(react.Stack.Item, { grow: true }, onChatButtonClicked && (React.createElement(react.DefaultButton, { onClick: onChatButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'chat', "aria-selected": activeTab === 'chat', role: 'tab', disabled: props.disableChatButton }, strings.chatButtonLabel))),
|
26975
|
+
React.createElement(react.Stack.Item, { grow: true }, onPeopleButtonClicked && (React.createElement(react.DefaultButton, { onClick: onPeopleButtonClicked, styles: mobilePaneButtonStylesThemed, checked: activeTab === 'people', "aria-selected": activeTab === 'people', role: 'tab', disabled: props.disablePeopleButton }, strings.peopleButtonLabel)))))),
|
26814
26976
|
React.createElement(react.DefaultButton, { styles: mobilePaneHiddenIconStyles, onRenderIcon: () => React.createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }) })));
|
26815
26977
|
};
|
26816
26978
|
|
@@ -27253,9 +27415,9 @@ const AddPeopleButton = (props) => {
|
|
27253
27415
|
return (React.createElement(AddPeopleDropdown, { strings: strings, mobileView: mobileView, inviteLink: inviteLink, onAddParticipant: props.onAddParticipant, alternateCallerId: props.alternateCallerId }));
|
27254
27416
|
}
|
27255
27417
|
else {
|
27256
|
-
return (React.createElement(react.Stack, { tokens: peoplePaneContainerTokens, "data-ui-id": "people-pane-content" },
|
27418
|
+
return (React.createElement(react.Stack, { tokens: peoplePaneContainerTokens, "data-ui-id": "people-pane-content", verticalFill: true },
|
27257
27419
|
React.createElement(AddPeopleDropdown, { strings: strings, mobileView: mobileView, inviteLink: inviteLink, onAddParticipant: props.onAddParticipant, alternateCallerId: props.alternateCallerId }),
|
27258
|
-
participantList));
|
27420
|
+
React.createElement(react.Stack.Item, { grow: true, styles: { root: { overflowY: 'hidden' } } }, participantList)));
|
27259
27421
|
}
|
27260
27422
|
};
|
27261
27423
|
|
@@ -30202,7 +30364,7 @@ const SurveyPane = (props) => {
|
|
30202
30364
|
/* @conditional-compile-remove(end-of-call-survey) */
|
30203
30365
|
const [improvementSuggestions, setImprovementSuggestions] = React.useState({});
|
30204
30366
|
/* @conditional-compile-remove(end-of-call-survey) */
|
30205
|
-
const onRenderFooterContent = React.useCallback(() => (React.createElement(React.Fragment, null, showSubmitFeedbackButton && (React.createElement(react.Stack, {
|
30367
|
+
const onRenderFooterContent = React.useCallback(() => (React.createElement(React.Fragment, null, showSubmitFeedbackButton && (React.createElement(react.Stack, { horizontalAlign: "end" },
|
30206
30368
|
React.createElement(react.PrimaryButton, { style: { marginTop: '1rem' }, onClick: () => {
|
30207
30369
|
const surveyResults = { overallRating: { score: ratings } };
|
30208
30370
|
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.overallRating) {
|