@azure/communication-react 1.14.0-alpha-202403150012 → 1.14.0-alpha-202403190012
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 +39 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-UUKnVH43.js → RichTextSendBoxWrapper-Bw9vaT1f.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-UUKnVH43.js.map → RichTextSendBoxWrapper-Bw9vaT1f.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-Db9LOYoW.js → index-DyaTe_Bz.js} +733 -623
- package/dist/dist-cjs/communication-react/index-DyaTe_Bz.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +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/baseSelectors.js +0 -3
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +0 -3
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +2 -9
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +3 -11
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -9
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +19 -28
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +6 -17
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +35 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +5 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +29 -7
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -6
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +3 -5
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +17 -0
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +36 -0
- package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/OptimalVideoCountSubscriber.js +0 -1
- package/dist/dist-esm/calling-stateful-client/src/OptimalVideoCountSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RaiseHandSubscriber.js +0 -2
- package/dist/dist-esm/calling-stateful-client/src/RaiseHandSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +11 -0
- package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/useSelector.d.ts +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedIterator.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js +0 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/mergedHooks.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +12 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +46 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +91 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/{FluentChatMessageComponentWrapper.d.ts → MessageComponents/FluentChatMessageComponent.d.ts} +6 -7
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +122 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/{ChatMessageComponent.d.ts → MyMessageComponents/ChatMyMessageComponent.d.ts} +9 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/{ChatMessageComponent.js → MyMessageComponents/ChatMyMessageComponent.js} +5 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/{ChatMessageComponentAsMessageBubble.d.ts → MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts} +10 -19
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +162 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/{FluentChatMessageComponentWrapper.js → MyMessageComponents/FluentChatMyMessageComponent.js} +12 -54
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +2 -6
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -17
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RaiseHandButton.js +0 -7
- package/dist/dist-esm/react-components/src/components/RaiseHandButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -3
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +3 -3
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +3 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +98 -118
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -9
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js +0 -2
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js +0 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +29 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +92 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.d.ts +2 -3
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +2 -2
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +0 -5
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.js +0 -2
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +5 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +1 -15
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.js +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSelector.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +1 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +4 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useAdaptedSelector.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +2 -5
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +0 -5
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +0 -12
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-Db9LOYoW.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +0 -218
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +0 -1
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
|
|
173
173
|
// Copyright (c) Microsoft Corporation.
|
174
174
|
// Licensed under the MIT License.
|
175
175
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
176
|
-
var telemetryVersion = '1.14.0-alpha-
|
176
|
+
var telemetryVersion = '1.14.0-alpha-202403190012';
|
177
177
|
|
178
178
|
|
179
179
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -408,7 +408,6 @@ const getRemoteParticipants$1 = (state, props) => {
|
|
408
408
|
var _a;
|
409
409
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.remoteParticipants;
|
410
410
|
};
|
411
|
-
/* @conditional-compile-remove(raise-hand) */
|
412
411
|
/**
|
413
412
|
* @private
|
414
413
|
*/
|
@@ -440,7 +439,6 @@ const getIsScreenSharingOn = (state, props) => { var _a; return (_a = state.call
|
|
440
439
|
* @private
|
441
440
|
*/
|
442
441
|
const getIsMuted = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.isMuted; };
|
443
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
444
442
|
/**
|
445
443
|
* @private
|
446
444
|
*/
|
@@ -469,7 +467,6 @@ const getLatestErrors$1 = (state) => state.latestErrors;
|
|
469
467
|
* @private
|
470
468
|
*/
|
471
469
|
const getDiagnostics = (state, props) => { var _a; return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.diagnostics; };
|
472
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(raise-hand) */
|
473
470
|
/**
|
474
471
|
* @private
|
475
472
|
*/
|
@@ -695,7 +692,6 @@ const cameraButtonSelector = reselect__namespace.createSelector([
|
|
695
692
|
selectedCamera: deviceManager.selectedCamera
|
696
693
|
};
|
697
694
|
});
|
698
|
-
/* @conditional-compile-remove(raise-hand) */
|
699
695
|
/**
|
700
696
|
* Selector for {@link RaiseHandButton} component.
|
701
697
|
*
|
@@ -928,11 +924,8 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
928
924
|
}, options);
|
929
925
|
}
|
930
926
|
});
|
931
|
-
/* @conditional-compile-remove(raise-hand) */
|
932
927
|
const onRaiseHand = () => __awaiter$Q(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()); });
|
933
|
-
/* @conditional-compile-remove(raise-hand) */
|
934
928
|
const onLowerHand = () => __awaiter$Q(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()); });
|
935
|
-
/* @conditional-compile-remove(raise-hand) */
|
936
929
|
const onToggleRaiseHand = () => __awaiter$Q(void 0, void 0, void 0, function* () {
|
937
930
|
const raiseHandFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.RaiseHand);
|
938
931
|
const localUserId = callClient.getState().userId;
|
@@ -971,7 +964,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
971
964
|
const onHangUp = (forEveryone) => __awaiter$Q(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
|
972
965
|
/* @conditional-compile-remove(PSTN-calls) */
|
973
966
|
const onToggleHold = () => __awaiter$Q(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()); });
|
974
|
-
const onCreateLocalStreamView = (
|
967
|
+
const onCreateLocalStreamView = (...args_1) => __awaiter$Q(void 0, [...args_1], void 0, function* (options = { scalingMode: 'Crop', isMirrored: true }) {
|
975
968
|
var _d;
|
976
969
|
if (!call || call.localVideoStreams.length === 0) {
|
977
970
|
return;
|
@@ -987,7 +980,7 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
987
980
|
const { view } = (_d = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _d !== void 0 ? _d : {};
|
988
981
|
return view ? { view } : undefined;
|
989
982
|
});
|
990
|
-
const onCreateRemoteStreamView = (
|
983
|
+
const onCreateRemoteStreamView = (userId_1, ...args_2) => __awaiter$Q(void 0, [userId_1, ...args_2], void 0, function* (userId, options = { scalingMode: 'Crop' }) {
|
991
984
|
if (!call) {
|
992
985
|
return;
|
993
986
|
}
|
@@ -1218,11 +1211,8 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1218
1211
|
onDisposeLocalStreamView,
|
1219
1212
|
onDisposeRemoteScreenShareStreamView,
|
1220
1213
|
onDisposeRemoteVideoStreamView,
|
1221
|
-
/* @conditional-compile-remove(raise-hand) */
|
1222
1214
|
onRaiseHand,
|
1223
|
-
/* @conditional-compile-remove(raise-hand) */
|
1224
1215
|
onLowerHand,
|
1225
|
-
/* @conditional-compile-remove(raise-hand) */
|
1226
1216
|
onToggleRaiseHand,
|
1227
1217
|
/* @conditional-compile-remove(reaction) */
|
1228
1218
|
onReactionClick: onReactionClick,
|
@@ -1785,7 +1775,6 @@ function convertSdkParticipantToDeclarativeParticipant(participant) {
|
|
1785
1775
|
videoStreams: declarativeVideoStreams,
|
1786
1776
|
isMuted: participant.isMuted,
|
1787
1777
|
isSpeaking: participant.isSpeaking,
|
1788
|
-
/* @conditional-compile-remove(raise-hand) */
|
1789
1778
|
raisedHand: undefined,
|
1790
1779
|
/* @conditional-compile-remove(hide-attendee-name) */
|
1791
1780
|
role: participant.role,
|
@@ -1826,9 +1815,10 @@ function convertSdkCallToDeclarativeCall(call) {
|
|
1826
1815
|
remoteParticipants: declarativeRemoteParticipants,
|
1827
1816
|
remoteParticipantsEnded: {},
|
1828
1817
|
recording: { isRecordingActive: false },
|
1818
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
1819
|
+
localRecording: { isLocalRecordingActive: false },
|
1829
1820
|
/* @conditional-compile-remove(ppt-live) */
|
1830
1821
|
pptLive: { isActive: false },
|
1831
|
-
/* @conditional-compile-remove(raise-hand) */
|
1832
1822
|
raiseHand: { raisedHands: [] },
|
1833
1823
|
/* @conditional-compile-remove(reaction) */
|
1834
1824
|
localParticipantReaction: undefined,
|
@@ -1852,7 +1842,6 @@ function convertSdkCallToDeclarativeCall(call) {
|
|
1852
1842
|
transfer: {
|
1853
1843
|
acceptedTransfers: {}
|
1854
1844
|
},
|
1855
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
1856
1845
|
optimalVideoCount: {
|
1857
1846
|
maxRemoteVideoStreams: call.feature(communicationCalling.Features.OptimalVideoCount).optimalVideoCount
|
1858
1847
|
},
|
@@ -1903,7 +1892,6 @@ function convertFromSDKToDeclarativeVideoStreamVideoEffects(videoEffects) {
|
|
1903
1892
|
activeEffects: videoEffects
|
1904
1893
|
};
|
1905
1894
|
}
|
1906
|
-
/* @conditional-compile-remove(raise-hand) */
|
1907
1895
|
/**
|
1908
1896
|
* @private
|
1909
1897
|
*/
|
@@ -2029,14 +2017,11 @@ let CallContext$2 = class CallContext {
|
|
2029
2017
|
existingCall.localVideoStreams = call.localVideoStreams;
|
2030
2018
|
existingCall.remoteParticipants = call.remoteParticipants;
|
2031
2019
|
existingCall.transcription.isTranscriptionActive = call.transcription.isTranscriptionActive;
|
2032
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
2033
2020
|
existingCall.optimalVideoCount.maxRemoteVideoStreams = call.optimalVideoCount.maxRemoteVideoStreams;
|
2034
2021
|
existingCall.recording.isRecordingActive = call.recording.isRecordingActive;
|
2035
|
-
/* @conditional-compile-remove(raise-hand) */
|
2036
2022
|
existingCall.raiseHand.raisedHands = call.raiseHand.raisedHands;
|
2037
2023
|
/* @conditional-compile-remove(ppt-live) */
|
2038
2024
|
existingCall.pptLive.isActive = call.pptLive.isActive;
|
2039
|
-
/* @conditional-compile-remove(raise-hand) */
|
2040
2025
|
existingCall.raiseHand.localParticipantRaisedHand = call.raiseHand.localParticipantRaisedHand;
|
2041
2026
|
/* @conditional-compile-remove(rooms) */
|
2042
2027
|
existingCall.role = call.role;
|
@@ -2216,6 +2201,35 @@ let CallContext$2 = class CallContext {
|
|
2216
2201
|
}
|
2217
2202
|
});
|
2218
2203
|
}
|
2204
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
2205
|
+
setCallRecordingInfos(callId, recordingInfosAdded, lastStoppedRecording) {
|
2206
|
+
this.modifyState((draft) => {
|
2207
|
+
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
2208
|
+
if (call) {
|
2209
|
+
call.recording.activeRecordings = recordingInfosAdded;
|
2210
|
+
call.recording.lastStoppedRecording = lastStoppedRecording;
|
2211
|
+
}
|
2212
|
+
});
|
2213
|
+
}
|
2214
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
2215
|
+
setCallLocalRecordingActive(callId, isRecordingActive) {
|
2216
|
+
this.modifyState((draft) => {
|
2217
|
+
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
2218
|
+
if (call) {
|
2219
|
+
call.localRecording.isLocalRecordingActive = isRecordingActive;
|
2220
|
+
}
|
2221
|
+
});
|
2222
|
+
}
|
2223
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
2224
|
+
setCallLocalRecordingInfos(callId, localRecordingInfosAdded, lastStoppedRecording) {
|
2225
|
+
this.modifyState((draft) => {
|
2226
|
+
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
2227
|
+
if (call) {
|
2228
|
+
call.localRecording.activeLocalRecordings = localRecordingInfosAdded;
|
2229
|
+
call.localRecording.lastStoppedLocalRecording = lastStoppedRecording;
|
2230
|
+
}
|
2231
|
+
});
|
2232
|
+
}
|
2219
2233
|
/* @conditional-compile-remove(ppt-live) */
|
2220
2234
|
setCallPPTLiveActive(callId, isActive) {
|
2221
2235
|
this.modifyState((draft) => {
|
@@ -2238,7 +2252,6 @@ let CallContext$2 = class CallContext {
|
|
2238
2252
|
}
|
2239
2253
|
});
|
2240
2254
|
}
|
2241
|
-
/* @conditional-compile-remove(raise-hand) */
|
2242
2255
|
setCallRaisedHands(callId, raisedHands) {
|
2243
2256
|
this.modifyState((draft) => {
|
2244
2257
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2256,7 +2269,6 @@ let CallContext$2 = class CallContext {
|
|
2256
2269
|
}
|
2257
2270
|
});
|
2258
2271
|
}
|
2259
|
-
/* @conditional-compile-remove(raise-hand) */
|
2260
2272
|
setParticipantIsRaisedHand(callId, participantKey, raisedHand) {
|
2261
2273
|
this.modifyState((draft) => {
|
2262
2274
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2394,7 +2406,6 @@ let CallContext$2 = class CallContext {
|
|
2394
2406
|
}
|
2395
2407
|
});
|
2396
2408
|
}
|
2397
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
2398
2409
|
setOptimalVideoCount(callId, optimalVideoCount) {
|
2399
2410
|
this.modifyState((draft) => {
|
2400
2411
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -3745,13 +3756,21 @@ class RecordingSubscriber {
|
|
3745
3756
|
constructor(callIdRef, context, recording) {
|
3746
3757
|
this.subscribe = () => {
|
3747
3758
|
this._recording.on('isRecordingActiveChanged', this.isAvailableChanged);
|
3759
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
3760
|
+
this._recording.on('recordingsUpdated', this.isRecordingsUpdated);
|
3748
3761
|
};
|
3749
3762
|
this.unsubscribe = () => {
|
3750
3763
|
this._recording.off('isRecordingActiveChanged', this.isAvailableChanged);
|
3764
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
3765
|
+
this._recording.off('recordingsUpdated', this.isRecordingsUpdated);
|
3751
3766
|
};
|
3752
3767
|
this.isAvailableChanged = () => {
|
3753
3768
|
this._context.setCallRecordingActive(this._callIdRef.callId, this._recording.isRecordingActive);
|
3754
3769
|
};
|
3770
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
3771
|
+
this.isRecordingsUpdated = (data) => {
|
3772
|
+
this._context.setCallRecordingInfos(this._callIdRef.callId, this._recording.recordings, data.removed);
|
3773
|
+
};
|
3755
3774
|
this._callIdRef = callIdRef;
|
3756
3775
|
this._context = context;
|
3757
3776
|
this._recording = recording;
|
@@ -3759,6 +3778,9 @@ class RecordingSubscriber {
|
|
3759
3778
|
// be an event for it.
|
3760
3779
|
if (this._recording.isRecordingActive) {
|
3761
3780
|
this._context.setCallRecordingActive(this._callIdRef.callId, this._recording.isRecordingActive);
|
3781
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
3782
|
+
// recordings getter only returns a list of active recordings, so we can set the list of recordings here
|
3783
|
+
this._context.setCallRecordingInfos(this._callIdRef.callId, this._recording.recordings, []);
|
3762
3784
|
}
|
3763
3785
|
this.subscribe();
|
3764
3786
|
}
|
@@ -3915,8 +3937,6 @@ const latestFromEvent = (args) => ({
|
|
3915
3937
|
|
3916
3938
|
// Copyright (c) Microsoft Corporation.
|
3917
3939
|
// Licensed under the MIT License.
|
3918
|
-
/* @conditional-compile-remove(raise-hand) */
|
3919
|
-
/* @conditional-compile-remove(raise-hand) */
|
3920
3940
|
/**
|
3921
3941
|
* @private
|
3922
3942
|
*/
|
@@ -3949,7 +3969,6 @@ class RaiseHandSubscriber {
|
|
3949
3969
|
|
3950
3970
|
// Copyright (c) Microsoft Corporation.
|
3951
3971
|
// Licensed under the MIT License.
|
3952
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
3953
3972
|
/**
|
3954
3973
|
* Subscribes to a Optimal Video Count Feature events and updates the call context appropriately.
|
3955
3974
|
* @private
|
@@ -4053,6 +4072,42 @@ class SpotlightSubscriber {
|
|
4053
4072
|
}
|
4054
4073
|
}
|
4055
4074
|
|
4075
|
+
// Copyright (c) Microsoft Corporation.
|
4076
|
+
// Licensed under the MIT License.
|
4077
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
4078
|
+
/**
|
4079
|
+
* @private
|
4080
|
+
*/
|
4081
|
+
class LocalRecordingSubscriber {
|
4082
|
+
constructor(callIdRef, context, recording) {
|
4083
|
+
this.subscribe = () => {
|
4084
|
+
this._recording.on('isLocalRecordingActiveChanged', this.isAvailableChanged);
|
4085
|
+
this._recording.on('localRecordingsUpdated', this.isRecordingsUpdated);
|
4086
|
+
};
|
4087
|
+
this.unsubscribe = () => {
|
4088
|
+
this._recording.off('isLocalRecordingActiveChanged', this.isAvailableChanged);
|
4089
|
+
this._recording.off('localRecordingsUpdated', this.isRecordingsUpdated);
|
4090
|
+
};
|
4091
|
+
this.isAvailableChanged = () => {
|
4092
|
+
this._context.setCallLocalRecordingActive(this._callIdRef.callId, this._recording.isRecordingActive);
|
4093
|
+
};
|
4094
|
+
this.isRecordingsUpdated = (data) => {
|
4095
|
+
this._context.setCallLocalRecordingInfos(this._callIdRef.callId, this._recording.recordings, data.removed);
|
4096
|
+
};
|
4097
|
+
this._callIdRef = callIdRef;
|
4098
|
+
this._context = context;
|
4099
|
+
this._recording = recording;
|
4100
|
+
// If recording as already started when we joined the call, make sure it is reflected in state as there may not
|
4101
|
+
// be an event for it.
|
4102
|
+
if (this._recording.isRecordingActive) {
|
4103
|
+
this._context.setCallLocalRecordingActive(this._callIdRef.callId, this._recording.isRecordingActive);
|
4104
|
+
// recordings getter only returns a list of active recordings, so we can set the list of recordings here
|
4105
|
+
this._context.setCallLocalRecordingInfos(this._callIdRef.callId, this._recording.recordings, []);
|
4106
|
+
}
|
4107
|
+
this.subscribe();
|
4108
|
+
}
|
4109
|
+
}
|
4110
|
+
|
4056
4111
|
// Copyright (c) Microsoft Corporation.
|
4057
4112
|
// Licensed under the MIT License.
|
4058
4113
|
/**
|
@@ -4114,7 +4169,8 @@ class CallSubscriber {
|
|
4114
4169
|
this._diagnosticsSubscriber.unsubscribe();
|
4115
4170
|
this._recordingSubscriber.unsubscribe();
|
4116
4171
|
this._transcriptionSubscriber.unsubscribe();
|
4117
|
-
/* @conditional-compile-remove(
|
4172
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
4173
|
+
this._localRecordingSubscriber.unsubscribe();
|
4118
4174
|
this._optimalVideoCountSubscriber.unsubscribe();
|
4119
4175
|
/* @conditional-compile-remove(ppt-live) */
|
4120
4176
|
this._pptLiveSubscriber.unsubscribe();
|
@@ -4122,7 +4178,6 @@ class CallSubscriber {
|
|
4122
4178
|
(_a = this._TeamsCaptionsSubscriber) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
4123
4179
|
/* @conditional-compile-remove(acs-close-captions) */
|
4124
4180
|
(_b = this._CaptionsSubscriber) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
4125
|
-
/* @conditional-compile-remove(raise-hand) */
|
4126
4181
|
(_c = this._raiseHandSubscriber) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
4127
4182
|
/* @conditional-compile-remove(capabilities) */
|
4128
4183
|
this._capabilitiesSubscriber.unsubscribe();
|
@@ -4221,14 +4276,14 @@ class CallSubscriber {
|
|
4221
4276
|
this._diagnosticsSubscriber = new UserFacingDiagnosticsSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.UserFacingDiagnostics));
|
4222
4277
|
this._participantSubscribers = new Map();
|
4223
4278
|
this._recordingSubscriber = new RecordingSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Recording));
|
4279
|
+
/* @conditional-compile-remove(local-recording-notification) */
|
4280
|
+
this._localRecordingSubscriber = new LocalRecordingSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.LocalRecording));
|
4224
4281
|
/* @conditional-compile-remove(ppt-live) */
|
4225
4282
|
this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);
|
4226
4283
|
this._transcriptionSubscriber = new TranscriptionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Transcription));
|
4227
|
-
/* @conditional-compile-remove(raise-hand) */
|
4228
4284
|
this._raiseHandSubscriber = new RaiseHandSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.RaiseHand));
|
4229
4285
|
/* @conditional-compile-remove(reaction) */
|
4230
4286
|
this._reactionSubscriber = new ReactionSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Reaction));
|
4231
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
4232
4287
|
this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({
|
4233
4288
|
callIdRef: this._callIdRef,
|
4234
4289
|
context: this._context,
|
@@ -6417,7 +6472,6 @@ const lightTheme = {
|
|
6417
6472
|
callRedDark: '#8b2c3d',
|
6418
6473
|
callRedDarker: '#772a38',
|
6419
6474
|
iconWhite: '#ffffff',
|
6420
|
-
/* @conditional-compile-remove(raise-hand) */
|
6421
6475
|
raiseHandGold: '#eaa300'
|
6422
6476
|
},
|
6423
6477
|
semanticColors: {
|
@@ -6460,7 +6514,6 @@ const darkTheme = {
|
|
6460
6514
|
callRedDark: '#a42e43',
|
6461
6515
|
callRedDarker: '#8b2c3d',
|
6462
6516
|
iconWhite: '#ffffff',
|
6463
|
-
/* @conditional-compile-remove(raise-hand) */
|
6464
6517
|
raiseHandGold: '#eaa300'
|
6465
6518
|
},
|
6466
6519
|
semanticColors: {
|
@@ -6655,13 +6708,9 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
6655
6708
|
ControlButtonParticipantsContextualMenuItem: React.createElement(reactIcons.People20Regular, null),
|
6656
6709
|
ControlButtonScreenShareStart: React.createElement(reactIcons.ShareScreenStart20Filled, null),
|
6657
6710
|
ControlButtonScreenShareStop: React.createElement(reactIcons.ShareScreenStop20Filled, null),
|
6658
|
-
/* @conditional-compile-remove(raise-hand) */
|
6659
6711
|
ControlButtonRaiseHand: React.createElement(ControlButtonRaiseHandIcon, null),
|
6660
|
-
/* @conditional-compile-remove(raise-hand) */
|
6661
6712
|
ControlButtonLowerHand: React.createElement(ControlButtonLowerHandIcon, null),
|
6662
|
-
/* @conditional-compile-remove(raise-hand) */
|
6663
6713
|
RaiseHandContextualMenuItem: React.createElement(reactIcons.HandRight20Regular, null),
|
6664
|
-
/* @conditional-compile-remove(raise-hand) */
|
6665
6714
|
LowerHandContextualMenuItem: React.createElement(reactIcons.HandRightOff20Regular, null),
|
6666
6715
|
/* @conditional-compile-remove(reaction) */
|
6667
6716
|
ReactionButtonIcon: React.createElement(reactIcons.Emoji20Regular, null),
|
@@ -8285,8 +8334,8 @@ const TextFieldWithMention = (props) => {
|
|
8285
8334
|
});
|
8286
8335
|
}
|
8287
8336
|
}, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
|
8288
|
-
const handleOnChange = React.useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue })
|
8289
|
-
var
|
8337
|
+
const handleOnChange = React.useCallback((_b) => __awaiter$D(void 0, [_b], void 0, function* ({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) {
|
8338
|
+
var _c;
|
8290
8339
|
debouncedQueryUpdate.cancel();
|
8291
8340
|
if (event.currentTarget === null) {
|
8292
8341
|
return;
|
@@ -8295,7 +8344,7 @@ const TextFieldWithMention = (props) => {
|
|
8295
8344
|
// onSelect is not called for backspace as selection is not changed and local caret index is outdated
|
8296
8345
|
setCaretIndex(undefined);
|
8297
8346
|
const newValue = updatedValue !== null && updatedValue !== void 0 ? updatedValue : '';
|
8298
|
-
const triggerText = (
|
8347
|
+
const triggerText = (_c = mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger) !== null && _c !== void 0 ? _c : DEFAULT_MENTION_TRIGGER;
|
8299
8348
|
const newTextLength = newValue.length;
|
8300
8349
|
// updating indexes to set between 0 and text length, otherwise selectionRange won't be set correctly
|
8301
8350
|
const currentSelectionEndValue = getValidatedIndexInRange({
|
@@ -11080,6 +11129,63 @@ function createStyleFromV8Style(v8Style) {
|
|
11080
11129
|
return result;
|
11081
11130
|
}
|
11082
11131
|
|
11132
|
+
// Copyright (c) Microsoft Corporation.
|
11133
|
+
// Licensed under the MIT License.
|
11134
|
+
/**
|
11135
|
+
* @private
|
11136
|
+
*/
|
11137
|
+
const systemMessageIconStyle = react.mergeStyles({
|
11138
|
+
marginInlineEnd: '0.688rem'
|
11139
|
+
});
|
11140
|
+
|
11141
|
+
// Copyright (c) Microsoft Corporation.
|
11142
|
+
// Licensed under the MIT License.
|
11143
|
+
/**
|
11144
|
+
* @private
|
11145
|
+
*/
|
11146
|
+
const SystemMessage = (props) => {
|
11147
|
+
const { iconName, content } = props;
|
11148
|
+
const Icon = React.createElement(react.FontIcon, { iconName: iconName, className: react.mergeStyles(systemMessageIconStyle) });
|
11149
|
+
return (React.createElement(react.Stack, { horizontal: true, className: react.mergeStyles(props === null || props === void 0 ? void 0 : props.containerStyle), tabIndex: 0 },
|
11150
|
+
Icon,
|
11151
|
+
React.createElement(react.Text, { style: { wordBreak: 'break-word' }, role: "status", title: content, variant: 'small' }, content)));
|
11152
|
+
};
|
11153
|
+
|
11154
|
+
// Copyright (c) Microsoft Corporation.
|
11155
|
+
// Licensed under the MIT License.
|
11156
|
+
/**
|
11157
|
+
* @private
|
11158
|
+
*/
|
11159
|
+
const DefaultSystemMessage = (props) => {
|
11160
|
+
var _a;
|
11161
|
+
const message = props.message;
|
11162
|
+
switch (message.messageType) {
|
11163
|
+
case 'system':
|
11164
|
+
switch (message.systemMessageType) {
|
11165
|
+
case 'content':
|
11166
|
+
return (React.createElement(SystemMessage, { iconName: (message.iconName ? message.iconName : ''), content: (_a = message.content) !== null && _a !== void 0 ? _a : '', containerStyle: props === null || props === void 0 ? void 0 : props.messageContainerStyle }));
|
11167
|
+
case 'participantAdded':
|
11168
|
+
case 'participantRemoved':
|
11169
|
+
return (React.createElement(ParticipantSystemMessageComponent, { message: message, style: props.messageContainerStyle, defaultName: props.strings.noDisplayNameSub }));
|
11170
|
+
}
|
11171
|
+
}
|
11172
|
+
return React.createElement(React.Fragment, null);
|
11173
|
+
};
|
11174
|
+
const ParticipantSystemMessageComponent = ({ message, style, defaultName }) => {
|
11175
|
+
const { strings } = useLocale$1();
|
11176
|
+
const participantsStr = generateParticipantsStr(message.participants, defaultName);
|
11177
|
+
const messageSuffix = message.systemMessageType === 'participantAdded'
|
11178
|
+
? strings.messageThread.participantJoined
|
11179
|
+
: strings.messageThread.participantLeft;
|
11180
|
+
if (participantsStr !== '') {
|
11181
|
+
return (React.createElement(SystemMessage, { iconName: (message.iconName ? message.iconName : ''), content: `${participantsStr} ${messageSuffix}`, containerStyle: style }));
|
11182
|
+
}
|
11183
|
+
return React.createElement(React.Fragment, null);
|
11184
|
+
};
|
11185
|
+
const generateParticipantsStr = (participants, defaultName) => participants
|
11186
|
+
.map((participant) => `${!participant.displayName || participant.displayName === '' ? defaultName : participant.displayName}`)
|
11187
|
+
.join(', ');
|
11188
|
+
|
11083
11189
|
// Copyright (c) Microsoft Corporation.
|
11084
11190
|
// Licensed under the MIT License.
|
11085
11191
|
/**
|
@@ -11175,85 +11281,6 @@ const ChatMessageComponentAsEditBox = (props) => {
|
|
11175
11281
|
} }, getContent()));
|
11176
11282
|
};
|
11177
11283
|
|
11178
|
-
// Copyright (c) Microsoft Corporation.
|
11179
|
-
// Licensed under the MIT License.
|
11180
|
-
/**
|
11181
|
-
* @private
|
11182
|
-
*/
|
11183
|
-
const formatTimeForChatMessage = (messageDate) => {
|
11184
|
-
return messageDate.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
|
11185
|
-
};
|
11186
|
-
/**
|
11187
|
-
* @private
|
11188
|
-
*/
|
11189
|
-
const formatDateForChatMessage = (messageDate) => {
|
11190
|
-
return messageDate.toLocaleDateString();
|
11191
|
-
};
|
11192
|
-
/**
|
11193
|
-
* Given a message date object in ISO8601 and a current date object, generates a user friendly timestamp text
|
11194
|
-
* using the system locale.
|
11195
|
-
* <time in locale format>.
|
11196
|
-
* Yesterday <time in locale format>.
|
11197
|
-
* <dateStrings day of week> <time in locale format>.
|
11198
|
-
* <date in locale format> <time in locale format>.
|
11199
|
-
*
|
11200
|
-
* If message is after yesterday, then only show the time.
|
11201
|
-
* If message is before yesterday and after day before yesterday, then show 'Yesterday' plus the time.
|
11202
|
-
* If message is before day before yesterday and within the current week, then show 'Monday/Tuesday/etc' plus the time.
|
11203
|
-
* - We consider start of the week as Sunday. If current day is Sunday, then any time before that is in previous week.
|
11204
|
-
* If message is in previous or older weeks, then show date string plus the time.
|
11205
|
-
*
|
11206
|
-
* @param messageDate - date of message
|
11207
|
-
* @param currentDate - date used as offset to create the user friendly timestamp (e.g. to create 'Yesterday' instead of an absolute date)
|
11208
|
-
*
|
11209
|
-
* @private
|
11210
|
-
*/
|
11211
|
-
const formatTimestampForChatMessage = (messageDate, todayDate, dateStrings) => {
|
11212
|
-
// If message was in the same day timestamp string is just the time like '1:30 p.m.'.
|
11213
|
-
const startOfDay = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate());
|
11214
|
-
if (messageDate > startOfDay) {
|
11215
|
-
return formatTimeForChatMessage(messageDate);
|
11216
|
-
}
|
11217
|
-
// If message was yesterday then timestamp string is like this 'Yesterday 1:30 p.m.'.
|
11218
|
-
const yesterdayDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - 1);
|
11219
|
-
if (messageDate > yesterdayDate) {
|
11220
|
-
return dateStrings.yesterday + ' ' + formatTimeForChatMessage(messageDate);
|
11221
|
-
}
|
11222
|
-
// If message was before Sunday and today is Sunday (start of week) then timestamp string is like
|
11223
|
-
// '2021-01-10 1:30 p.m.'.
|
11224
|
-
const weekDay = todayDate.getDay();
|
11225
|
-
if (weekDay === 0) {
|
11226
|
-
return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);
|
11227
|
-
}
|
11228
|
-
// If message was before first day of the week then timestamp string is like Monday 1:30 p.m.
|
11229
|
-
const firstDayOfTheWeekDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - weekDay);
|
11230
|
-
if (messageDate > firstDayOfTheWeekDate) {
|
11231
|
-
return dayToDayName(messageDate.getDay(), dateStrings) + ' ' + formatTimeForChatMessage(messageDate);
|
11232
|
-
}
|
11233
|
-
// If message date is in previous or older weeks then timestamp string is like 2021-01-10 1:30 p.m.
|
11234
|
-
return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);
|
11235
|
-
};
|
11236
|
-
const dayToDayName = (day, dateStrings) => {
|
11237
|
-
switch (day) {
|
11238
|
-
case 0:
|
11239
|
-
return dateStrings.sunday;
|
11240
|
-
case 1:
|
11241
|
-
return dateStrings.monday;
|
11242
|
-
case 2:
|
11243
|
-
return dateStrings.tuesday;
|
11244
|
-
case 3:
|
11245
|
-
return dateStrings.wednesday;
|
11246
|
-
case 4:
|
11247
|
-
return dateStrings.thursday;
|
11248
|
-
case 5:
|
11249
|
-
return dateStrings.friday;
|
11250
|
-
case 6:
|
11251
|
-
return dateStrings.saturday;
|
11252
|
-
default:
|
11253
|
-
throw new Error(`Invalid day [${day}] passed`);
|
11254
|
-
}
|
11255
|
-
};
|
11256
|
-
|
11257
11284
|
// Copyright (c) Microsoft Corporation.
|
11258
11285
|
// Licensed under the MIT License.
|
11259
11286
|
/**
|
@@ -11426,6 +11453,29 @@ const preventUnwantedDismissProps = {
|
|
11426
11453
|
};
|
11427
11454
|
const calloutMenuProps = Object.assign(Object.assign({}, preventUnwantedDismissProps), { styles: { root: { marginRight: '3px' } } });
|
11428
11455
|
|
11456
|
+
// Copyright (c) Microsoft Corporation.
|
11457
|
+
// Licensed under the MIT License.
|
11458
|
+
/**
|
11459
|
+
* Props for the Chat.Message action menu.
|
11460
|
+
* This is the 3 dots that appear when hovering over one of your own chat messages.
|
11461
|
+
*
|
11462
|
+
* @private
|
11463
|
+
*/
|
11464
|
+
const chatMessageActionMenuProps = (menuProps) => {
|
11465
|
+
const { ariaLabel, enabled, theme, menuExpanded } = menuProps;
|
11466
|
+
// Show the action button while the flyout is open (otherwise this will dismiss when the pointer is hovered over the flyout)
|
11467
|
+
const showActionMenu = enabled || menuExpanded;
|
11468
|
+
const actionMenuProps = {
|
11469
|
+
children: (React.createElement("div", { tabIndex: showActionMenu ? 0 : undefined, key: "menuButton", "data-ui-id": "chat-composite-message-action-icon", ref: menuProps.menuButtonRef, onClick: showActionMenu ? () => menuProps.onActionButtonClick() : undefined, style: { margin: showActionMenu ? '1px' : 0, minHeight: showActionMenu ? undefined : '30px' }, role: "button", "aria-label": showActionMenu ? ariaLabel : undefined, "aria-haspopup": showActionMenu, "aria-expanded": menuExpanded, onKeyDown: (e) => {
|
11470
|
+
// simulate <button> tag behavior
|
11471
|
+
if (showActionMenu && (e.key === 'Enter' || e.key === ' ')) {
|
11472
|
+
menuProps.onActionButtonClick();
|
11473
|
+
}
|
11474
|
+
} }, showActionMenu ? (React.createElement(react.Icon, { iconName: "ChatMessageOptions", "aria-label": ariaLabel, styles: iconWrapperStyle(theme, menuExpanded) })) : undefined))
|
11475
|
+
};
|
11476
|
+
return actionMenuProps;
|
11477
|
+
};
|
11478
|
+
|
11429
11479
|
// Copyright (c) Microsoft Corporation.
|
11430
11480
|
// Licensed under the MIT License.
|
11431
11481
|
/**
|
@@ -11567,29 +11617,6 @@ const processHtmlToReact = (props) => {
|
|
11567
11617
|
return React.createElement(React.Fragment, null, parse((_a = props.message.content) !== null && _a !== void 0 ? _a : '', options));
|
11568
11618
|
};
|
11569
11619
|
|
11570
|
-
// Copyright (c) Microsoft Corporation.
|
11571
|
-
// Licensed under the MIT License.
|
11572
|
-
/**
|
11573
|
-
* Props for the Chat.Message action menu.
|
11574
|
-
* This is the 3 dots that appear when hovering over one of your own chat messages.
|
11575
|
-
*
|
11576
|
-
* @private
|
11577
|
-
*/
|
11578
|
-
const chatMessageActionMenuProps = (menuProps) => {
|
11579
|
-
const { ariaLabel, enabled, theme, menuExpanded } = menuProps;
|
11580
|
-
// Show the action button while the flyout is open (otherwise this will dismiss when the pointer is hovered over the flyout)
|
11581
|
-
const showActionMenu = enabled || menuExpanded;
|
11582
|
-
const actionMenuProps = {
|
11583
|
-
children: (React.createElement("div", { tabIndex: showActionMenu ? 0 : undefined, key: "menuButton", "data-ui-id": "chat-composite-message-action-icon", ref: menuProps.menuButtonRef, onClick: showActionMenu ? () => menuProps.onActionButtonClick() : undefined, style: { margin: showActionMenu ? '1px' : 0, minHeight: showActionMenu ? undefined : '30px' }, role: "button", "aria-label": showActionMenu ? ariaLabel : undefined, "aria-haspopup": showActionMenu, "aria-expanded": menuExpanded, onKeyDown: (e) => {
|
11584
|
-
// simulate <button> tag behavior
|
11585
|
-
if (showActionMenu && (e.key === 'Enter' || e.key === ' ')) {
|
11586
|
-
menuProps.onActionButtonClick();
|
11587
|
-
}
|
11588
|
-
} }, showActionMenu ? (React.createElement(react.Icon, { iconName: "ChatMessageOptions", "aria-label": ariaLabel, styles: iconWrapperStyle(theme, menuExpanded) })) : undefined))
|
11589
|
-
};
|
11590
|
-
return actionMenuProps;
|
11591
|
-
};
|
11592
|
-
|
11593
11620
|
// Copyright (c) Microsoft Corporation.
|
11594
11621
|
// Licensed under the MIT License.
|
11595
11622
|
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -11677,6 +11704,138 @@ const useLocaleStringsTrampoline = () => {
|
|
11677
11704
|
|
11678
11705
|
// Copyright (c) Microsoft Corporation.
|
11679
11706
|
// Licensed under the MIT License.
|
11707
|
+
/**
|
11708
|
+
* @private
|
11709
|
+
*/
|
11710
|
+
const formatTimeForChatMessage = (messageDate) => {
|
11711
|
+
return messageDate.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
|
11712
|
+
};
|
11713
|
+
/**
|
11714
|
+
* @private
|
11715
|
+
*/
|
11716
|
+
const formatDateForChatMessage = (messageDate) => {
|
11717
|
+
return messageDate.toLocaleDateString();
|
11718
|
+
};
|
11719
|
+
/**
|
11720
|
+
* Given a message date object in ISO8601 and a current date object, generates a user friendly timestamp text
|
11721
|
+
* using the system locale.
|
11722
|
+
* <time in locale format>.
|
11723
|
+
* Yesterday <time in locale format>.
|
11724
|
+
* <dateStrings day of week> <time in locale format>.
|
11725
|
+
* <date in locale format> <time in locale format>.
|
11726
|
+
*
|
11727
|
+
* If message is after yesterday, then only show the time.
|
11728
|
+
* If message is before yesterday and after day before yesterday, then show 'Yesterday' plus the time.
|
11729
|
+
* If message is before day before yesterday and within the current week, then show 'Monday/Tuesday/etc' plus the time.
|
11730
|
+
* - We consider start of the week as Sunday. If current day is Sunday, then any time before that is in previous week.
|
11731
|
+
* If message is in previous or older weeks, then show date string plus the time.
|
11732
|
+
*
|
11733
|
+
* @param messageDate - date of message
|
11734
|
+
* @param currentDate - date used as offset to create the user friendly timestamp (e.g. to create 'Yesterday' instead of an absolute date)
|
11735
|
+
*
|
11736
|
+
* @private
|
11737
|
+
*/
|
11738
|
+
const formatTimestampForChatMessage = (messageDate, todayDate, dateStrings) => {
|
11739
|
+
// If message was in the same day timestamp string is just the time like '1:30 p.m.'.
|
11740
|
+
const startOfDay = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate());
|
11741
|
+
if (messageDate > startOfDay) {
|
11742
|
+
return formatTimeForChatMessage(messageDate);
|
11743
|
+
}
|
11744
|
+
// If message was yesterday then timestamp string is like this 'Yesterday 1:30 p.m.'.
|
11745
|
+
const yesterdayDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - 1);
|
11746
|
+
if (messageDate > yesterdayDate) {
|
11747
|
+
return dateStrings.yesterday + ' ' + formatTimeForChatMessage(messageDate);
|
11748
|
+
}
|
11749
|
+
// If message was before Sunday and today is Sunday (start of week) then timestamp string is like
|
11750
|
+
// '2021-01-10 1:30 p.m.'.
|
11751
|
+
const weekDay = todayDate.getDay();
|
11752
|
+
if (weekDay === 0) {
|
11753
|
+
return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);
|
11754
|
+
}
|
11755
|
+
// If message was before first day of the week then timestamp string is like Monday 1:30 p.m.
|
11756
|
+
const firstDayOfTheWeekDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - weekDay);
|
11757
|
+
if (messageDate > firstDayOfTheWeekDate) {
|
11758
|
+
return dayToDayName(messageDate.getDay(), dateStrings) + ' ' + formatTimeForChatMessage(messageDate);
|
11759
|
+
}
|
11760
|
+
// If message date is in previous or older weeks then timestamp string is like 2021-01-10 1:30 p.m.
|
11761
|
+
return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);
|
11762
|
+
};
|
11763
|
+
const dayToDayName = (day, dateStrings) => {
|
11764
|
+
switch (day) {
|
11765
|
+
case 0:
|
11766
|
+
return dateStrings.sunday;
|
11767
|
+
case 1:
|
11768
|
+
return dateStrings.monday;
|
11769
|
+
case 2:
|
11770
|
+
return dateStrings.tuesday;
|
11771
|
+
case 3:
|
11772
|
+
return dateStrings.wednesday;
|
11773
|
+
case 4:
|
11774
|
+
return dateStrings.thursday;
|
11775
|
+
case 5:
|
11776
|
+
return dateStrings.friday;
|
11777
|
+
case 6:
|
11778
|
+
return dateStrings.saturday;
|
11779
|
+
default:
|
11780
|
+
throw new Error(`Invalid day [${day}] passed`);
|
11781
|
+
}
|
11782
|
+
};
|
11783
|
+
|
11784
|
+
// Copyright (c) Microsoft Corporation.
|
11785
|
+
// Licensed under the MIT License.
|
11786
|
+
/** @private
|
11787
|
+
* Return the string value for the FluentUI message attached prop based on the message's attached status.
|
11788
|
+
* @param attached - The message's attached status.
|
11789
|
+
*/
|
11790
|
+
const getFluentUIAttachedValue = (messageAttachedStatus) => {
|
11791
|
+
return messageAttachedStatus === 'top' || messageAttachedStatus === false ? 'top' : 'center';
|
11792
|
+
};
|
11793
|
+
/**
|
11794
|
+
* @private
|
11795
|
+
* Get the message bubble content for the message.
|
11796
|
+
*/
|
11797
|
+
function getMessageBubbleContent(message, strings, userId,
|
11798
|
+
/* @conditional-compile-remove(image-overlay) */
|
11799
|
+
inlineImageOptions,
|
11800
|
+
/* @conditional-compile-remove(file-sharing) */
|
11801
|
+
onRenderFileDownloads,
|
11802
|
+
/* @conditional-compile-remove(mention) */
|
11803
|
+
mentionDisplayOptions,
|
11804
|
+
/* @conditional-compile-remove(file-sharing) */
|
11805
|
+
fileDownloadHandler) {
|
11806
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
11807
|
+
if (message.messageType === 'blocked') {
|
11808
|
+
return (React.createElement("div", { tabIndex: 0 },
|
11809
|
+
React.createElement(BlockedMessageContent, { message: message, strings: strings })));
|
11810
|
+
}
|
11811
|
+
return (React.createElement("div", { tabIndex: 0, className: "ui-chat__message__content" },
|
11812
|
+
React.createElement(ChatMessageContent, { message: message, strings: strings,
|
11813
|
+
/* @conditional-compile-remove(mention) */
|
11814
|
+
mentionDisplayOptions: mentionDisplayOptions,
|
11815
|
+
/* @conditional-compile-remove(image-overlay) */
|
11816
|
+
inlineImageOptions: inlineImageOptions }),
|
11817
|
+
/* @conditional-compile-remove(file-sharing) */ onRenderFileDownloads
|
11818
|
+
? onRenderFileDownloads(userId, message)
|
11819
|
+
: defaultOnRenderFileDownloads(userId, message, strings,
|
11820
|
+
/* @conditional-compile-remove(file-sharing) */ fileDownloadHandler)));
|
11821
|
+
}
|
11822
|
+
/**
|
11823
|
+
* Default component for rendering file downloads.
|
11824
|
+
*/
|
11825
|
+
/* @conditional-compile-remove(file-sharing) */
|
11826
|
+
const defaultOnRenderFileDownloads = (userId, message, strings,
|
11827
|
+
/* @conditional-compile-remove(file-sharing) */
|
11828
|
+
fileDownloadHandler) => {
|
11829
|
+
/* @conditional-compile-remove(file-sharing) */
|
11830
|
+
return (React.createElement(_FileDownloadCards, { userId: userId,
|
11831
|
+
/* @conditional-compile-remove(file-sharing) */
|
11832
|
+
fileMetadata: message.files || [],
|
11833
|
+
/* @conditional-compile-remove(file-sharing) */
|
11834
|
+
downloadHandler: fileDownloadHandler,
|
11835
|
+
/* @conditional-compile-remove(file-sharing) */
|
11836
|
+
strings: { downloadFile: strings.downloadFile, fileCardGroupMessage: strings.fileCardGroupMessage } }));
|
11837
|
+
};
|
11838
|
+
/** @private */
|
11680
11839
|
const generateDefaultTimestamp = (createdOn, showDate, strings) => {
|
11681
11840
|
const formattedTimestamp = showDate
|
11682
11841
|
? formatTimestampForChatMessage(createdOn, new Date(), strings)
|
@@ -11684,16 +11843,31 @@ const generateDefaultTimestamp = (createdOn, showDate, strings) => {
|
|
11684
11843
|
return formattedTimestamp;
|
11685
11844
|
};
|
11686
11845
|
// onDisplayDateTimeString from props overwrite onDisplayDateTimeString from locale
|
11687
|
-
|
11846
|
+
/** @private */
|
11847
|
+
const generateCustomizedTimestamp = (createdOn, locale, onDisplayDateTimeString) => {
|
11688
11848
|
/* @conditional-compile-remove(date-time-customization) */
|
11689
|
-
return
|
11690
|
-
?
|
11849
|
+
return onDisplayDateTimeString
|
11850
|
+
? onDisplayDateTimeString(createdOn)
|
11691
11851
|
: locale.onDisplayDateTimeString
|
11692
11852
|
? locale.onDisplayDateTimeString(createdOn)
|
11693
11853
|
: '';
|
11694
11854
|
};
|
11855
|
+
/**
|
11856
|
+
* @private
|
11857
|
+
* Get the edited tag for the message if it is edited.
|
11858
|
+
*/
|
11859
|
+
const getMessageEditedDetails = (message, theme, editedTag) => {
|
11860
|
+
const editedOn = 'editedOn' in message ? message.editedOn : undefined;
|
11861
|
+
if (message.messageType === 'chat' && editedOn) {
|
11862
|
+
return React.createElement("div", { className: chatMessageEditedTagStyle(theme) }, editedTag);
|
11863
|
+
}
|
11864
|
+
return undefined;
|
11865
|
+
};
|
11866
|
+
|
11867
|
+
// Copyright (c) Microsoft Corporation.
|
11868
|
+
// Licensed under the MIT License.
|
11695
11869
|
/** @private */
|
11696
|
-
const MessageBubble = (props) => {
|
11870
|
+
const MessageBubble$1 = (props) => {
|
11697
11871
|
var _a;
|
11698
11872
|
const ids = useIdentifiers();
|
11699
11873
|
const theme = useTheme();
|
@@ -11702,12 +11876,20 @@ const MessageBubble = (props) => {
|
|
11702
11876
|
/* @conditional-compile-remove(file-sharing) */
|
11703
11877
|
fileDownloadHandler,
|
11704
11878
|
/* @conditional-compile-remove(image-overlay) */
|
11705
|
-
inlineImageOptions,
|
11706
|
-
|
11707
|
-
|
11708
|
-
|
11709
|
-
|
11710
|
-
const formattedTimestamp =
|
11879
|
+
inlineImageOptions,
|
11880
|
+
/* @conditional-compile-remove(file-sharing) */
|
11881
|
+
onRenderFileDownloads,
|
11882
|
+
/* @conditional-compile-remove(mention) */
|
11883
|
+
mentionDisplayOptions, onDisplayDateTimeString } = props;
|
11884
|
+
const formattedTimestamp = React.useMemo(() => {
|
11885
|
+
const defaultTimeStamp = message.createdOn
|
11886
|
+
? generateDefaultTimestamp(message.createdOn, showDate, strings)
|
11887
|
+
: undefined;
|
11888
|
+
const customTimestamp = message.createdOn
|
11889
|
+
? generateCustomizedTimestamp(message.createdOn, locale, onDisplayDateTimeString)
|
11890
|
+
: '';
|
11891
|
+
return customTimestamp || defaultTimeStamp;
|
11892
|
+
}, [locale, message.createdOn, onDisplayDateTimeString, showDate, strings]);
|
11711
11893
|
// Track if the action menu was opened by touch - if so we increase the touch targets for the items
|
11712
11894
|
const [wasInteractionByTouch, setWasInteractionByTouch] = React.useState(false);
|
11713
11895
|
// `focused` state is used for show/hide actionMenu
|
@@ -11741,139 +11923,95 @@ const MessageBubble = (props) => {
|
|
11741
11923
|
// or not we need to set the target to undefined here to actually hide the action flyout
|
11742
11924
|
setChatMessageActionFlyoutTarget(undefined);
|
11743
11925
|
}, [setChatMessageActionFlyoutTarget]);
|
11744
|
-
const defaultOnRenderFileDownloads = React.useCallback(() => {
|
11745
|
-
/* @conditional-compile-remove(file-sharing) */
|
11746
|
-
return (React.createElement(_FileDownloadCards, { userId: userId,
|
11747
|
-
/* @conditional-compile-remove(file-sharing) */
|
11748
|
-
fileMetadata: message.files || [],
|
11749
|
-
/* @conditional-compile-remove(file-sharing) */
|
11750
|
-
downloadHandler: fileDownloadHandler,
|
11751
|
-
/* @conditional-compile-remove(file-sharing) */
|
11752
|
-
strings: { downloadFile: strings.downloadFile, fileCardGroupMessage: strings.fileCardGroupMessage } }));
|
11753
|
-
}, [
|
11754
|
-
userId,
|
11755
|
-
message,
|
11756
|
-
/* @conditional-compile-remove(file-sharing) */
|
11757
|
-
strings,
|
11758
|
-
/* @conditional-compile-remove(file-sharing) */
|
11759
|
-
fileDownloadHandler
|
11760
|
-
]);
|
11761
|
-
const editedOn = 'editedOn' in message ? message.editedOn : undefined;
|
11762
11926
|
const getMessageDetails = React.useCallback(() => {
|
11763
11927
|
if (messageStatus === 'failed') {
|
11764
11928
|
return React.createElement("div", { className: chatMessageFailedTagStyle(theme) }, strings.failToSendTag);
|
11765
11929
|
}
|
11766
|
-
else
|
11767
|
-
return
|
11930
|
+
else {
|
11931
|
+
return getMessageEditedDetails(message, theme, strings.editedTag);
|
11768
11932
|
}
|
11769
|
-
|
11770
|
-
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
11933
|
+
}, [message, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
11771
11934
|
const getContent = React.useCallback(() => {
|
11772
|
-
|
11773
|
-
|
11774
|
-
|
11775
|
-
|
11776
|
-
|
11777
|
-
|
11778
|
-
|
11779
|
-
|
11780
|
-
|
11781
|
-
/* @conditional-compile-remove(image-overlay) */
|
11782
|
-
inlineImageOptions: inlineImageOptions }),
|
11783
|
-
/* @conditional-compile-remove(file-sharing) */ props.onRenderFileDownloads
|
11784
|
-
? props.onRenderFileDownloads(userId, message)
|
11785
|
-
: defaultOnRenderFileDownloads()));
|
11935
|
+
return getMessageBubbleContent(message, strings, userId,
|
11936
|
+
/* @conditional-compile-remove(image-overlay) */
|
11937
|
+
inlineImageOptions,
|
11938
|
+
/* @conditional-compile-remove(file-sharing) */
|
11939
|
+
onRenderFileDownloads,
|
11940
|
+
/* @conditional-compile-remove(mention) */
|
11941
|
+
mentionDisplayOptions,
|
11942
|
+
/* @conditional-compile-remove(file-sharing) */
|
11943
|
+
fileDownloadHandler);
|
11786
11944
|
}, [
|
11787
|
-
|
11945
|
+
/* @conditional-compile-remove(file-sharing) */ fileDownloadHandler,
|
11788
11946
|
/* @conditional-compile-remove(image-overlay) */ inlineImageOptions,
|
11947
|
+
/* @conditional-compile-remove(mention) */ mentionDisplayOptions,
|
11789
11948
|
message,
|
11790
|
-
|
11949
|
+
/* @conditional-compile-remove(file-sharing) */ onRenderFileDownloads,
|
11791
11950
|
strings,
|
11792
11951
|
userId
|
11793
11952
|
]);
|
11794
11953
|
const isBlockedMessage = /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked';
|
11795
11954
|
const chatMyMessageStyles = useChatMyMessageStyles();
|
11796
11955
|
const chatMessageCommonStyles = useChatMessageCommonStyles();
|
11797
|
-
const chatMessageStyles = useChatMessageStyles();
|
11798
|
-
const chatItemMessageContainerClassName = reactComponents.mergeClasses(
|
11799
|
-
// messageContainerStyle used in className and style prop as style prop can't handle CSS selectors
|
11800
|
-
chatMessageStyles.body,
|
11801
|
-
// disable placeholder functionality for GA releases as it might confuse users
|
11802
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
11803
|
-
chatMessageStyles.bodyWithPlaceholderImage, isBlockedMessage
|
11804
|
-
? chatMessageCommonStyles.blocked
|
11805
|
-
: props.message.status === 'failed'
|
11806
|
-
? chatMessageCommonStyles.failed
|
11807
|
-
: undefined, shouldOverlapAvatarAndMessage ? chatMessageStyles.avatarOverlap : chatMessageStyles.avatarNoOverlap, message.attached === 'top' || message.attached === false
|
11808
|
-
? chatMessageStyles.bodyWithAvatar
|
11809
|
-
: chatMessageStyles.bodyWithoutAvatar, react.mergeStyles(messageContainerStyle));
|
11810
11956
|
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
11811
11957
|
const chatMessage = (React.createElement(React.Fragment, null,
|
11812
|
-
React.createElement("div", { key: props.message.messageId },
|
11813
|
-
|
11814
|
-
|
11815
|
-
|
11816
|
-
|
11817
|
-
|
11818
|
-
|
11819
|
-
|
11820
|
-
|
11821
|
-
|
11822
|
-
|
11823
|
-
|
11824
|
-
|
11825
|
-
|
11826
|
-
|
11827
|
-
|
11958
|
+
React.createElement("div", { key: props.message.messageId },
|
11959
|
+
React.createElement(reactChat.ChatMyMessage, { attached: attached, key: props.message.messageId, body: {
|
11960
|
+
// messageContainerStyle used in className and style prop as style prop can't handle CSS selectors
|
11961
|
+
className: reactComponents.mergeClasses(chatMyMessageStyles.body, isBlockedMessage
|
11962
|
+
? chatMessageCommonStyles.blocked
|
11963
|
+
: props.message.status === 'failed'
|
11964
|
+
? chatMessageCommonStyles.failed
|
11965
|
+
: undefined, attached !== 'top' ? chatMyMessageStyles.bodyAttached : undefined, react.mergeStyles(messageContainerStyle)),
|
11966
|
+
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle)),
|
11967
|
+
ref: messageRef
|
11968
|
+
}, root: {
|
11969
|
+
className: chatMyMessageStyles.root,
|
11970
|
+
onBlur: (e) => {
|
11971
|
+
// `focused` controls is focused the whole `ChatMessage` or any of its children. When we're navigating
|
11972
|
+
// with keyboard the focused element will be changed and there is no way to use `:focus` selector
|
11973
|
+
if (chatMessageActionFlyoutTarget === null || chatMessageActionFlyoutTarget === void 0 ? void 0 : chatMessageActionFlyoutTarget.current) {
|
11974
|
+
// doesn't dismiss action button if flyout is open, otherwise, narrator's focus will stay on the closed action menu
|
11975
|
+
return;
|
11976
|
+
}
|
11977
|
+
const shouldPreserveFocusState = e.currentTarget.contains(e.relatedTarget);
|
11978
|
+
setFocused(shouldPreserveFocusState);
|
11979
|
+
},
|
11980
|
+
onFocus: () => {
|
11981
|
+
// react onFocus is called even when nested component receives focus (i.e. it bubbles)
|
11982
|
+
// so when focus moves within actionMenu, the `focus` state in chatMessage remains true, and keeps actionMenu visible
|
11983
|
+
setFocused(true);
|
11984
|
+
},
|
11985
|
+
// make body not focusable to remove repetitions from narrators.
|
11986
|
+
// inner components are already focusable
|
11987
|
+
role: 'none',
|
11988
|
+
tabIndex: -1
|
11989
|
+
}, "data-ui-id": "chat-composite-message", author: React.createElement(react.Text, { className: chatMessageDateStyle, tabIndex: 0 }, message.senderDisplayName), timestamp: React.createElement(react.Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp, tabIndex: 0 }, formattedTimestamp), details: getMessageDetails(), actions: {
|
11990
|
+
children: actionMenuProps === null || actionMenuProps === void 0 ? void 0 : actionMenuProps.children,
|
11991
|
+
className: reactComponents.mergeClasses(chatMyMessageStyles.menu,
|
11992
|
+
// Make actions menu visible when the message is focused or the flyout is shown
|
11993
|
+
focused || (chatMessageActionFlyoutTarget === null || chatMessageActionFlyoutTarget === void 0 ? void 0 : chatMessageActionFlyoutTarget.current)
|
11994
|
+
? chatMyMessageStyles.menuVisible
|
11995
|
+
: chatMyMessageStyles.menuHidden, attached !== 'top' ? chatMyMessageStyles.menuAttached : undefined)
|
11996
|
+
}, onTouchStart: () => setWasInteractionByTouch(true), onPointerDown: () => setWasInteractionByTouch(false), onKeyDown: () => setWasInteractionByTouch(false), onClick: () => {
|
11997
|
+
if (!wasInteractionByTouch) {
|
11828
11998
|
return;
|
11829
11999
|
}
|
11830
|
-
|
11831
|
-
|
11832
|
-
|
11833
|
-
|
11834
|
-
//
|
11835
|
-
|
11836
|
-
|
11837
|
-
|
11838
|
-
|
11839
|
-
|
11840
|
-
role: 'none',
|
11841
|
-
tabIndex: -1
|
11842
|
-
}, "data-ui-id": "chat-composite-message", author: React.createElement(react.Text, { className: chatMessageDateStyle, tabIndex: 0 }, message.senderDisplayName), timestamp: React.createElement(react.Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp, tabIndex: 0 }, formattedTimestamp), details: getMessageDetails(), actions: {
|
11843
|
-
children: actionMenuProps === null || actionMenuProps === void 0 ? void 0 : actionMenuProps.children,
|
11844
|
-
className: reactComponents.mergeClasses(chatMyMessageStyles.menu,
|
11845
|
-
// Make actions menu visible when the message is focused or the flyout is shown
|
11846
|
-
focused || (chatMessageActionFlyoutTarget === null || chatMessageActionFlyoutTarget === void 0 ? void 0 : chatMessageActionFlyoutTarget.current)
|
11847
|
-
? chatMyMessageStyles.menuVisible
|
11848
|
-
: chatMyMessageStyles.menuHidden, attached !== 'top' ? chatMyMessageStyles.menuAttached : undefined)
|
11849
|
-
}, onTouchStart: () => setWasInteractionByTouch(true), onPointerDown: () => setWasInteractionByTouch(false), onKeyDown: () => setWasInteractionByTouch(false), onClick: () => {
|
11850
|
-
if (!wasInteractionByTouch) {
|
11851
|
-
return;
|
11852
|
-
}
|
11853
|
-
// If the message was touched via touch we immediately open the menu
|
11854
|
-
// flyout (when using mouse the 3-dot menu that appears on hover
|
11855
|
-
// must be clicked to open the flyout).
|
11856
|
-
// In doing so here we set the target of the flyout to be the message and
|
11857
|
-
// not the 3-dot menu button to position the flyout correctly.
|
11858
|
-
setChatMessageActionFlyoutTarget(messageRef);
|
11859
|
-
if (message.messageType === 'chat') {
|
11860
|
-
props.onActionButtonClick(message, setMessageReadBy);
|
11861
|
-
}
|
11862
|
-
} }, getContent())) : (React.createElement(reactChat.ChatMessage, { attached: attached, key: props.message.messageId, root: {
|
11863
|
-
className: chatMessageStyles.root,
|
11864
|
-
// make body not focusable to remove repetitions from narrators.
|
11865
|
-
// inner components are already focusable
|
11866
|
-
tabIndex: -1,
|
11867
|
-
role: 'none'
|
11868
|
-
}, author: React.createElement(react.Text, { className: chatMessageAuthorStyle }, message.senderDisplayName), body: {
|
11869
|
-
className: chatItemMessageContainerClassName,
|
11870
|
-
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle))
|
11871
|
-
}, "data-ui-id": "chat-composite-message", timestamp: React.createElement(react.Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp }, formattedTimestamp), details: getMessageDetails() }, getContent()))),
|
12000
|
+
// If the message was touched via touch we immediately open the menu
|
12001
|
+
// flyout (when using mouse the 3-dot menu that appears on hover
|
12002
|
+
// must be clicked to open the flyout).
|
12003
|
+
// In doing so here we set the target of the flyout to be the message and
|
12004
|
+
// not the 3-dot menu button to position the flyout correctly.
|
12005
|
+
setChatMessageActionFlyoutTarget(messageRef);
|
12006
|
+
if (message.messageType === 'chat') {
|
12007
|
+
props.onActionButtonClick(message, setMessageReadBy);
|
12008
|
+
}
|
12009
|
+
} }, getContent())),
|
11872
12010
|
chatActionsEnabled && (React.createElement(ChatMessageActionFlyout, { hidden: !chatMessageActionFlyoutTarget, target: chatMessageActionFlyoutTarget, increaseFlyoutItemSize: wasInteractionByTouch, onDismiss: onActionFlyoutDismiss, onEditClick: onEditClick, onRemoveClick: onRemoveClick, onResendClick: onResendClick, strings: strings, messageReadBy: messageReadBy, messageStatus: messageStatus !== null && messageStatus !== void 0 ? messageStatus : 'failed', remoteParticipantsCount: remoteParticipantsCount, onRenderAvatar: onRenderAvatar, showMessageStatus: showMessageStatus }))));
|
11873
12011
|
return chatMessage;
|
11874
12012
|
};
|
11875
12013
|
/** @private */
|
11876
|
-
const
|
12014
|
+
const ChatMyMessageComponentAsMessageBubble = React.memo(MessageBubble$1);
|
11877
12015
|
|
11878
12016
|
// Copyright (c) Microsoft Corporation.
|
11879
12017
|
// Licensed under the MIT License.
|
@@ -11889,7 +12027,7 @@ var __awaiter$B = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
11889
12027
|
/**
|
11890
12028
|
* @private
|
11891
12029
|
*/
|
11892
|
-
const
|
12030
|
+
const ChatMyMessageComponent = (props) => {
|
11893
12031
|
var _a, _b;
|
11894
12032
|
const { onDeleteMessage, onSendMessage, message } = props;
|
11895
12033
|
const [isEditing, setIsEditing] = React.useState(false);
|
@@ -11923,7 +12061,7 @@ const ChatMessageComponent = (props) => {
|
|
11923
12061
|
mentionLookupOptions: (_a = props.mentionOptions) === null || _a === void 0 ? void 0 : _a.lookupOptions }));
|
11924
12062
|
}
|
11925
12063
|
else {
|
11926
|
-
return (React.createElement(
|
12064
|
+
return (React.createElement(ChatMyMessageComponentAsMessageBubble, Object.assign({}, props, { onRemoveClick: onRemoveClick, onEditClick: onEditClick, onResendClick: onResendClick, onRenderAvatar: props.onRenderAvatar,
|
11927
12065
|
/* @conditional-compile-remove(date-time-customization) */
|
11928
12066
|
onDisplayDateTimeString: props.onDisplayDateTimeString, strings: props.strings,
|
11929
12067
|
/* @conditional-compile-remove(image-overlay) */
|
@@ -11943,7 +12081,7 @@ const ChatMessageComponent = (props) => {
|
|
11943
12081
|
*
|
11944
12082
|
* @private
|
11945
12083
|
*/
|
11946
|
-
const
|
12084
|
+
const FluentChatMyMessageComponent = (props) => {
|
11947
12085
|
const { message, styles, shouldOverlapAvatarAndMessage, onRenderMessage, onRenderAvatar, showMessageStatus, onRenderMessageStatus, participantCount, readCount, onActionButtonClick,
|
11948
12086
|
/* @conditional-compile-remove(date-time-customization) */
|
11949
12087
|
onDisplayDateTimeString,
|
@@ -11965,7 +12103,7 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
11965
12103
|
const defaultChatMessageRenderer = React.useCallback((messageProps) => {
|
11966
12104
|
if (messageProps.message.messageType === 'chat' ||
|
11967
12105
|
/* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked') {
|
11968
|
-
return (React.createElement(
|
12106
|
+
return (React.createElement(ChatMyMessageComponent, Object.assign({}, messageProps, {
|
11969
12107
|
/* @conditional-compile-remove(file-sharing) */
|
11970
12108
|
onRenderFileDownloads: onRenderFileDownloadsMemo,
|
11971
12109
|
/* @conditional-compile-remove(file-sharing) */
|
@@ -12007,12 +12145,9 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
12007
12145
|
const messageStatusRenderer = React.useCallback((onRenderMessageStatus, defaultStatusRenderer, showMessageStatus, participantCount, readCount) => {
|
12008
12146
|
return showMessageStatus && statusToRender ? (onRenderMessageStatus ? (onRenderMessageStatus({ status: message.status })) : (defaultStatusRenderer(message, participantCount !== null && participantCount !== void 0 ? participantCount : 0, readCount !== null && readCount !== void 0 ? readCount : 0, message.status))) : (React.createElement("div", { className: react.mergeStyles(noMessageStatusStyle) }));
|
12009
12147
|
}, [message, statusToRender]);
|
12010
|
-
const shouldShowAvatar = React.useMemo(() => {
|
12011
|
-
return message.attached === 'top' || message.attached === false;
|
12012
|
-
}, [message.attached]);
|
12013
12148
|
const attached = React.useMemo(() => {
|
12014
|
-
return
|
12015
|
-
}, [
|
12149
|
+
return getFluentUIAttachedValue(message.attached);
|
12150
|
+
}, [message.attached]);
|
12016
12151
|
const myMessageRootProps = React.useMemo(() => {
|
12017
12152
|
return {
|
12018
12153
|
// myChatItemMessageContainer used in className and style prop as style prop can't handle CSS selectors
|
@@ -12048,6 +12183,166 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
12048
12183
|
showMessageStatus,
|
12049
12184
|
styles
|
12050
12185
|
]);
|
12186
|
+
// Fluent UI message components are used here as for default message renderer,
|
12187
|
+
// timestamp and author name should be shown but they aren't shown for custom renderer.
|
12188
|
+
// More investigations are needed to check if this can be simplified with states.
|
12189
|
+
// Status and avatar should be shown for both custom and default renderers.
|
12190
|
+
return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: myMessageRootProps, body: myMessageBodyProps, statusIcon: myMessageStatusIcon }, messageRenderer(Object.assign({}, props))));
|
12191
|
+
};
|
12192
|
+
|
12193
|
+
// Copyright (c) Microsoft Corporation.
|
12194
|
+
// Licensed under the MIT License.
|
12195
|
+
/** @private */
|
12196
|
+
const MessageBubble = (props) => {
|
12197
|
+
const ids = useIdentifiers();
|
12198
|
+
const theme = useTheme();
|
12199
|
+
const locale = useLocale$1();
|
12200
|
+
const { userId, message, showDate, messageContainerStyle, strings,
|
12201
|
+
/* @conditional-compile-remove(file-sharing) */
|
12202
|
+
fileDownloadHandler,
|
12203
|
+
/* @conditional-compile-remove(image-overlay) */
|
12204
|
+
inlineImageOptions, shouldOverlapAvatarAndMessage,
|
12205
|
+
/* @conditional-compile-remove(file-sharing) */
|
12206
|
+
onRenderFileDownloads,
|
12207
|
+
/* @conditional-compile-remove(mention) */
|
12208
|
+
mentionDisplayOptions, onDisplayDateTimeString } = props;
|
12209
|
+
const formattedTimestamp = React.useMemo(() => {
|
12210
|
+
const defaultTimeStamp = message.createdOn
|
12211
|
+
? generateDefaultTimestamp(message.createdOn, showDate, strings)
|
12212
|
+
: undefined;
|
12213
|
+
const customTimestamp = message.createdOn
|
12214
|
+
? generateCustomizedTimestamp(message.createdOn, locale, onDisplayDateTimeString)
|
12215
|
+
: '';
|
12216
|
+
return customTimestamp || defaultTimeStamp;
|
12217
|
+
}, [locale, message.createdOn, onDisplayDateTimeString, showDate, strings]);
|
12218
|
+
const getMessageDetails = React.useCallback(() => {
|
12219
|
+
return getMessageEditedDetails(message, theme, strings.editedTag);
|
12220
|
+
}, [strings.editedTag, theme, message]);
|
12221
|
+
const getContent = React.useCallback(() => {
|
12222
|
+
return getMessageBubbleContent(message, strings, userId,
|
12223
|
+
/* @conditional-compile-remove(image-overlay) */
|
12224
|
+
inlineImageOptions,
|
12225
|
+
/* @conditional-compile-remove(file-sharing) */
|
12226
|
+
onRenderFileDownloads,
|
12227
|
+
/* @conditional-compile-remove(mention) */
|
12228
|
+
mentionDisplayOptions,
|
12229
|
+
/* @conditional-compile-remove(file-sharing) */
|
12230
|
+
fileDownloadHandler);
|
12231
|
+
}, [
|
12232
|
+
/* @conditional-compile-remove(file-sharing) */ fileDownloadHandler,
|
12233
|
+
/* @conditional-compile-remove(image-overlay) */ inlineImageOptions,
|
12234
|
+
/* @conditional-compile-remove(mention) */ mentionDisplayOptions,
|
12235
|
+
message,
|
12236
|
+
/* @conditional-compile-remove(file-sharing) */ onRenderFileDownloads,
|
12237
|
+
strings,
|
12238
|
+
userId
|
12239
|
+
]);
|
12240
|
+
const isBlockedMessage = /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked';
|
12241
|
+
const chatMessageCommonStyles = useChatMessageCommonStyles();
|
12242
|
+
const chatMessageStyles = useChatMessageStyles();
|
12243
|
+
const chatItemMessageContainerClassName = reactComponents.mergeClasses(
|
12244
|
+
// messageContainerStyle used in className and style prop as style prop can't handle CSS selectors
|
12245
|
+
chatMessageStyles.body,
|
12246
|
+
// disable placeholder functionality for GA releases as it might confuse users
|
12247
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
12248
|
+
chatMessageStyles.bodyWithPlaceholderImage, isBlockedMessage
|
12249
|
+
? chatMessageCommonStyles.blocked
|
12250
|
+
: props.message.status === 'failed'
|
12251
|
+
? chatMessageCommonStyles.failed
|
12252
|
+
: undefined, shouldOverlapAvatarAndMessage ? chatMessageStyles.avatarOverlap : chatMessageStyles.avatarNoOverlap, message.attached === 'top' || message.attached === false
|
12253
|
+
? chatMessageStyles.bodyWithAvatar
|
12254
|
+
: chatMessageStyles.bodyWithoutAvatar, react.mergeStyles(messageContainerStyle));
|
12255
|
+
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
12256
|
+
const chatMessage = (React.createElement(React.Fragment, null,
|
12257
|
+
React.createElement("div", { key: props.message.messageId },
|
12258
|
+
React.createElement(reactChat.ChatMessage, { attached: attached, key: props.message.messageId, root: {
|
12259
|
+
className: chatMessageStyles.root,
|
12260
|
+
// make body not focusable to remove repetitions from narrators.
|
12261
|
+
// inner components are already focusable
|
12262
|
+
tabIndex: -1,
|
12263
|
+
role: 'none'
|
12264
|
+
}, author: React.createElement(react.Text, { className: chatMessageAuthorStyle }, message.senderDisplayName), body: {
|
12265
|
+
className: chatItemMessageContainerClassName,
|
12266
|
+
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle))
|
12267
|
+
}, "data-ui-id": "chat-composite-message", timestamp: React.createElement(react.Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp }, formattedTimestamp), details: getMessageDetails() }, getContent()))));
|
12268
|
+
return chatMessage;
|
12269
|
+
};
|
12270
|
+
/** @private */
|
12271
|
+
const ChatMessageComponentAsMessageBubble = React.memo(MessageBubble);
|
12272
|
+
|
12273
|
+
// Copyright (c) Microsoft Corporation.
|
12274
|
+
// Licensed under the MIT License.
|
12275
|
+
/**
|
12276
|
+
* The component for rendering a chat message using Fluent UI components
|
12277
|
+
* and handling default and custom renderers.
|
12278
|
+
* This component handles rendering for chat message body, avatar and message status.
|
12279
|
+
* The chat message body, avatar and message status should be shown for both default and custom renderers.
|
12280
|
+
*
|
12281
|
+
* @private
|
12282
|
+
*/
|
12283
|
+
const FluentChatMessageComponent = (props) => {
|
12284
|
+
const { message, styles, shouldOverlapAvatarAndMessage, onRenderMessage, onRenderAvatar,
|
12285
|
+
/* @conditional-compile-remove(date-time-customization) */
|
12286
|
+
onDisplayDateTimeString,
|
12287
|
+
/* @conditional-compile-remove(image-overlay) */
|
12288
|
+
inlineImageOptions,
|
12289
|
+
/* @conditional-compile-remove(file-sharing) */
|
12290
|
+
fileDownloadHandler, userId,
|
12291
|
+
/* @conditional-compile-remove(file-sharing) */
|
12292
|
+
onRenderFileDownloads,
|
12293
|
+
/* @conditional-compile-remove(mention) */
|
12294
|
+
mentionOptions } = props;
|
12295
|
+
const chatMessageRenderStyles = useChatMessageRenderStyles();
|
12296
|
+
const onRenderFileDownloadsMemo = React.useMemo(() => {
|
12297
|
+
/* @conditional-compile-remove(file-sharing) */
|
12298
|
+
return onRenderFileDownloads;
|
12299
|
+
}, [/* @conditional-compile-remove(file-sharing) */ onRenderFileDownloads]);
|
12300
|
+
// To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp
|
12301
|
+
// needs to be regenerated), the dependency on "new Date().toDateString()"" is added.
|
12302
|
+
const defaultChatMessageRenderer = React.useCallback((messageProps) => {
|
12303
|
+
if (messageProps.message.messageType === 'chat' ||
|
12304
|
+
/* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked') {
|
12305
|
+
return (React.createElement(ChatMessageComponentAsMessageBubble, Object.assign({}, messageProps, {
|
12306
|
+
/* @conditional-compile-remove(file-sharing) */
|
12307
|
+
onRenderFileDownloads: onRenderFileDownloadsMemo,
|
12308
|
+
/* @conditional-compile-remove(file-sharing) */
|
12309
|
+
strings: messageProps.strings, message: messageProps.message, userId: userId, shouldOverlapAvatarAndMessage: shouldOverlapAvatarAndMessage,
|
12310
|
+
/* @conditional-compile-remove(date-time-customization) */
|
12311
|
+
onDisplayDateTimeString: onDisplayDateTimeString,
|
12312
|
+
/* @conditional-compile-remove(image-overlay) */
|
12313
|
+
inlineImageOptions: inlineImageOptions,
|
12314
|
+
/* @conditional-compile-remove(file-sharing) */
|
12315
|
+
fileDownloadHandler: fileDownloadHandler,
|
12316
|
+
/* @conditional-compile-remove(mention) */
|
12317
|
+
mentionDisplayOptions: mentionOptions === null || mentionOptions === void 0 ? void 0 : mentionOptions.displayOptions })));
|
12318
|
+
}
|
12319
|
+
return React.createElement(React.Fragment, null);
|
12320
|
+
}, [
|
12321
|
+
onRenderFileDownloadsMemo,
|
12322
|
+
shouldOverlapAvatarAndMessage,
|
12323
|
+
userId,
|
12324
|
+
/* @conditional-compile-remove(date-time-customization) */
|
12325
|
+
onDisplayDateTimeString,
|
12326
|
+
/* @conditional-compile-remove(image-overlay) */
|
12327
|
+
inlineImageOptions,
|
12328
|
+
/* @conditional-compile-remove(file-sharing) */
|
12329
|
+
fileDownloadHandler,
|
12330
|
+
/* @conditional-compile-remove(mention) */
|
12331
|
+
mentionOptions,
|
12332
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
12333
|
+
new Date().toDateString()
|
12334
|
+
]);
|
12335
|
+
const messageRenderer = React.useCallback((messageProps) => {
|
12336
|
+
return onRenderMessage === undefined
|
12337
|
+
? defaultChatMessageRenderer(Object.assign({}, messageProps))
|
12338
|
+
: onRenderMessage(messageProps, defaultChatMessageRenderer);
|
12339
|
+
}, [defaultChatMessageRenderer, onRenderMessage]);
|
12340
|
+
const shouldShowAvatar = React.useMemo(() => {
|
12341
|
+
return message.attached === 'top' || message.attached === false;
|
12342
|
+
}, [message.attached]);
|
12343
|
+
const attached = React.useMemo(() => {
|
12344
|
+
return getFluentUIAttachedValue(message.attached);
|
12345
|
+
}, [message.attached]);
|
12051
12346
|
const messageRootProps = React.useMemo(() => {
|
12052
12347
|
return { className: reactComponents.mergeClasses(chatMessageRenderStyles.rootMessage, chatMessageRenderStyles.rootCommon) };
|
12053
12348
|
}, [chatMessageRenderStyles.rootCommon, chatMessageRenderStyles.rootMessage]);
|
@@ -12084,74 +12379,10 @@ const FluentChatMessageComponentWrapper = (props) => {
|
|
12084
12379
|
// Fluent UI message components are used here as for default message renderer,
|
12085
12380
|
// timestamp and author name should be shown but they aren't shown for custom renderer.
|
12086
12381
|
// More investigations are needed to check if this can be simplified with states.
|
12087
|
-
//
|
12088
|
-
|
12089
|
-
return (React.createElement("div", null,
|
12090
|
-
React.createElement(reactChat.ChatMyMessage, { attached: attached, root: myMessageRootProps, body: myMessageBodyProps, statusIcon: myMessageStatusIcon }, messageRenderer(Object.assign({}, props)))));
|
12091
|
-
}
|
12092
|
-
else {
|
12093
|
-
return (React.createElement("div", null,
|
12094
|
-
React.createElement(reactChat.ChatMessage, { attached: attached, root: messageRootProps, body: messageBodyProps, avatar: avatar }, messageRenderer(Object.assign({}, props)))));
|
12095
|
-
}
|
12096
|
-
};
|
12097
|
-
|
12098
|
-
// Copyright (c) Microsoft Corporation.
|
12099
|
-
// Licensed under the MIT License.
|
12100
|
-
/**
|
12101
|
-
* @private
|
12102
|
-
*/
|
12103
|
-
const systemMessageIconStyle = react.mergeStyles({
|
12104
|
-
marginInlineEnd: '0.688rem'
|
12105
|
-
});
|
12106
|
-
|
12107
|
-
// Copyright (c) Microsoft Corporation.
|
12108
|
-
// Licensed under the MIT License.
|
12109
|
-
/**
|
12110
|
-
* @private
|
12111
|
-
*/
|
12112
|
-
const SystemMessage = (props) => {
|
12113
|
-
const { iconName, content } = props;
|
12114
|
-
const Icon = React.createElement(react.FontIcon, { iconName: iconName, className: react.mergeStyles(systemMessageIconStyle) });
|
12115
|
-
return (React.createElement(react.Stack, { horizontal: true, className: react.mergeStyles(props === null || props === void 0 ? void 0 : props.containerStyle), tabIndex: 0 },
|
12116
|
-
Icon,
|
12117
|
-
React.createElement(react.Text, { style: { wordBreak: 'break-word' }, role: "status", title: content, variant: 'small' }, content)));
|
12382
|
+
// Avatar should be shown for both custom and default renderers.
|
12383
|
+
return (React.createElement(reactChat.ChatMessage, { attached: attached, root: messageRootProps, body: messageBodyProps, avatar: avatar }, messageRenderer(Object.assign({}, props))));
|
12118
12384
|
};
|
12119
12385
|
|
12120
|
-
// Copyright (c) Microsoft Corporation.
|
12121
|
-
// Licensed under the MIT License.
|
12122
|
-
/**
|
12123
|
-
* @private
|
12124
|
-
*/
|
12125
|
-
const DefaultSystemMessage = (props) => {
|
12126
|
-
var _a;
|
12127
|
-
const message = props.message;
|
12128
|
-
switch (message.messageType) {
|
12129
|
-
case 'system':
|
12130
|
-
switch (message.systemMessageType) {
|
12131
|
-
case 'content':
|
12132
|
-
return (React.createElement(SystemMessage, { iconName: (message.iconName ? message.iconName : ''), content: (_a = message.content) !== null && _a !== void 0 ? _a : '', containerStyle: props === null || props === void 0 ? void 0 : props.messageContainerStyle }));
|
12133
|
-
case 'participantAdded':
|
12134
|
-
case 'participantRemoved':
|
12135
|
-
return (React.createElement(ParticipantSystemMessageComponent, { message: message, style: props.messageContainerStyle, defaultName: props.strings.noDisplayNameSub }));
|
12136
|
-
}
|
12137
|
-
}
|
12138
|
-
return React.createElement(React.Fragment, null);
|
12139
|
-
};
|
12140
|
-
const ParticipantSystemMessageComponent = ({ message, style, defaultName }) => {
|
12141
|
-
const { strings } = useLocale$1();
|
12142
|
-
const participantsStr = generateParticipantsStr(message.participants, defaultName);
|
12143
|
-
const messageSuffix = message.systemMessageType === 'participantAdded'
|
12144
|
-
? strings.messageThread.participantJoined
|
12145
|
-
: strings.messageThread.participantLeft;
|
12146
|
-
if (participantsStr !== '') {
|
12147
|
-
return (React.createElement(SystemMessage, { iconName: (message.iconName ? message.iconName : ''), content: `${participantsStr} ${messageSuffix}`, containerStyle: style }));
|
12148
|
-
}
|
12149
|
-
return React.createElement(React.Fragment, null);
|
12150
|
-
};
|
12151
|
-
const generateParticipantsStr = (participants, defaultName) => participants
|
12152
|
-
.map((participant) => `${!participant.displayName || participant.displayName === '' ? defaultName : participant.displayName}`)
|
12153
|
-
.join(', ');
|
12154
|
-
|
12155
12386
|
// Copyright (c) Microsoft Corporation.
|
12156
12387
|
// Licensed under the MIT License.
|
12157
12388
|
/**
|
@@ -12178,7 +12409,7 @@ const ChatMessageComponentWrapper = (props) => {
|
|
12178
12409
|
: styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer;
|
12179
12410
|
const blockedMessageStyle = styles === null || styles === void 0 ? void 0 : styles.blockedMessageContainer;
|
12180
12411
|
const messageContainerStyle = message.mine ? myChatMessageStyle : blockedMessageStyle;
|
12181
|
-
return (
|
12412
|
+
return fluentChatComponent(Object.assign(Object.assign({}, props), { message: message, messageContainerStyle: messageContainerStyle }));
|
12182
12413
|
}
|
12183
12414
|
switch (message.messageType) {
|
12184
12415
|
case 'chat': {
|
@@ -12187,7 +12418,7 @@ const ChatMessageComponentWrapper = (props) => {
|
|
12187
12418
|
: styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer;
|
12188
12419
|
const chatMessageStyle = styles === null || styles === void 0 ? void 0 : styles.chatMessageContainer;
|
12189
12420
|
const messageContainerStyle = message.mine ? myChatMessageStyle : chatMessageStyle;
|
12190
|
-
return (
|
12421
|
+
return fluentChatComponent(Object.assign(Object.assign({}, props), { message: message, messageContainerStyle: messageContainerStyle }));
|
12191
12422
|
}
|
12192
12423
|
case 'system': {
|
12193
12424
|
const messageContainerStyle = styles === null || styles === void 0 ? void 0 : styles.systemMessageContainer;
|
@@ -12201,6 +12432,14 @@ const ChatMessageComponentWrapper = (props) => {
|
|
12201
12432
|
}
|
12202
12433
|
}
|
12203
12434
|
};
|
12435
|
+
const fluentChatComponent = (props) => {
|
12436
|
+
if (props.message.mine === true) {
|
12437
|
+
return React.createElement(FluentChatMyMessageComponent, Object.assign({}, props));
|
12438
|
+
}
|
12439
|
+
else {
|
12440
|
+
return React.createElement(FluentChatMessageComponent, Object.assign({}, props));
|
12441
|
+
}
|
12442
|
+
};
|
12204
12443
|
|
12205
12444
|
// Copyright (c) Microsoft Corporation.
|
12206
12445
|
// Licensed under the MIT License.
|
@@ -12970,8 +13209,6 @@ const participantStateStringTrampoline$1 = (props, strings) => {
|
|
12970
13209
|
|
12971
13210
|
// Copyright (c) Microsoft Corporation.
|
12972
13211
|
// Licensed under the MIT License.
|
12973
|
-
/* @conditional-compile-remove(raise-hand) */
|
12974
|
-
/* @conditional-compile-remove(raise-hand) */
|
12975
13212
|
/**
|
12976
13213
|
* Raised hand icon for ParticipantList and VideoTitle.
|
12977
13214
|
*
|
@@ -13240,16 +13477,12 @@ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvat
|
|
13240
13477
|
};
|
13241
13478
|
/* @conditional-compile-remove(hide-attendee-name) */
|
13242
13479
|
displayName = formatDisplayName();
|
13243
|
-
/* @conditional-compile-remove(raise-hand) */
|
13244
13480
|
const callingPalette = theme.callingPalette;
|
13245
|
-
const onRenderIcon = (callingParticipant === null || callingParticipant === void 0 ? void 0 : callingParticipant.isScreenSharing) ||
|
13246
|
-
(callingParticipant === null || callingParticipant === void 0 ? void 0 : callingParticipant.isMuted) ||
|
13247
|
-
(
|
13248
|
-
/* @conditional-compile-remove(raise-hand) */ callingParticipant === null || callingParticipant === void 0 ? void 0 : callingParticipant.raisedHand)
|
13481
|
+
const onRenderIcon = (callingParticipant === null || callingParticipant === void 0 ? void 0 : callingParticipant.isScreenSharing) || (callingParticipant === null || callingParticipant === void 0 ? void 0 : callingParticipant.isMuted) || (callingParticipant === null || callingParticipant === void 0 ? void 0 : callingParticipant.raisedHand)
|
13249
13482
|
? () => {
|
13250
13483
|
var _a;
|
13251
13484
|
return (React.createElement(react.Stack, { horizontal: true, tokens: { childrenGap: '0.5rem' } },
|
13252
|
-
|
13485
|
+
callingParticipant.raisedHand && (React.createElement(react.Stack, { horizontal: true, tokens: { childrenGap: '0.2rem' }, style: {
|
13253
13486
|
alignItems: 'center',
|
13254
13487
|
padding: '0.1rem 0.2rem',
|
13255
13488
|
backgroundColor: theme === null || theme === void 0 ? void 0 : theme.palette.neutralLighter,
|
@@ -13264,7 +13497,6 @@ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvat
|
|
13264
13497
|
/* @conditional-compile-remove(spotlight) */ callingParticipant.spotlight && (React.createElement(react.Icon, { iconName: "ParticipantItemSpotlighted", className: iconStyles$2 }))));
|
13265
13498
|
}
|
13266
13499
|
: () => null;
|
13267
|
-
/* @conditional-compile-remove(raise-hand) */
|
13268
13500
|
const onRenderAvatarWithRaiseHand = (callingParticipant === null || callingParticipant === void 0 ? void 0 : callingParticipant.raisedHand) && onRenderAvatar
|
13269
13501
|
? (userId, options, defaultOnRender) => onRenderAvatar(userId, Object.assign(Object.assign({}, options), { styles: { root: { border: callingPalette.raiseHandGold } } }), defaultOnRender)
|
13270
13502
|
: onRenderAvatar;
|
@@ -13277,11 +13509,9 @@ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvat
|
|
13277
13509
|
* Sort participants by raised hand order position
|
13278
13510
|
*/
|
13279
13511
|
const sortParticipants = (participants) => {
|
13280
|
-
/* @conditional-compile-remove(raise-hand) */
|
13281
13512
|
const isParticipantListCallParticipant = function (participant) {
|
13282
13513
|
return 'raisedHand' in participant;
|
13283
13514
|
};
|
13284
|
-
/* @conditional-compile-remove(raise-hand) */
|
13285
13515
|
participants.sort((a, b) => {
|
13286
13516
|
if (!isParticipantListCallParticipant(a) || !isParticipantListCallParticipant(b)) {
|
13287
13517
|
return 0;
|
@@ -13327,7 +13557,6 @@ const ParticipantList$k = (props) => {
|
|
13327
13557
|
totalParticipantCount,
|
13328
13558
|
/* @conditional-compile-remove(total-participant-count) */
|
13329
13559
|
strings, participantAriaLabelledBy } = props;
|
13330
|
-
/* @conditional-compile-remove(raise-hand) */
|
13331
13560
|
const theme = useTheme();
|
13332
13561
|
const ids = useIdentifiers();
|
13333
13562
|
const participantItemStrings = useLocale$1().strings.participantItem;
|
@@ -13362,7 +13591,6 @@ const ParticipantList$k = (props) => {
|
|
13362
13591
|
onFetchParticipantMenuItems,
|
13363
13592
|
onRemoveParticipant,
|
13364
13593
|
(_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles) === null || _b === void 0 ? void 0 : _b.participantSubMenuItemsStyles,
|
13365
|
-
/* @conditional-compile-remove(raise-hand) */
|
13366
13594
|
participantItemStrings.removeButtonLabel
|
13367
13595
|
]);
|
13368
13596
|
const participantItemStyles = React.useMemo(() => { var _a; return react.merge(participantListItemStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles); }, [(_c = props.styles) === null || _c === void 0 ? void 0 : _c.participantItemStyles]);
|
@@ -13371,9 +13599,7 @@ const ParticipantList$k = (props) => {
|
|
13371
13599
|
return (React.createElement(react.Stack, { "data-ui-id": ids.participantList, className: react.mergeStyles(participantListStyle$1, (_e = props.styles) === null || _e === void 0 ? void 0 : _e.root), role: 'menu' },
|
13372
13600
|
displayedParticipants.map((participant) => onRenderParticipant
|
13373
13601
|
? onRenderParticipant(participant)
|
13374
|
-
: onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy,
|
13375
|
-
/* @conditional-compile-remove(raise-hand) */
|
13376
|
-
theme)),
|
13602
|
+
: onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme)),
|
13377
13603
|
/* @conditional-compile-remove(total-participant-count) */ overflowParticipantCountString &&
|
13378
13604
|
totalParticipantCount &&
|
13379
13605
|
totalParticipantCount > displayedParticipants.length && (React.createElement(react.Text, { style: { fontWeight: 400, margin: '0.5rem' } }, _formatString(overflowParticipantCountString, {
|
@@ -14370,7 +14596,7 @@ function useLongPress(props) {
|
|
14370
14596
|
* @returns VideoGalleryRemoteParticipant[] {@link @azure/communication-react#VideoGalleryRemoteParticipant}
|
14371
14597
|
*/
|
14372
14598
|
const smartDominantSpeakerParticipants = (args) => {
|
14373
|
-
const { participants, dominantSpeakers = [],
|
14599
|
+
const { participants, dominantSpeakers = [], currentParticipants = [], maxDominantSpeakers } = args;
|
14374
14600
|
// Don't apply any logic if total number of video streams is less than max dominant speakers.
|
14375
14601
|
if (participants.length <= maxDominantSpeakers) {
|
14376
14602
|
return participants;
|
@@ -14378,7 +14604,7 @@ const smartDominantSpeakerParticipants = (args) => {
|
|
14378
14604
|
const participantsMap = participantsById(participants);
|
14379
14605
|
// Only use the Max allowed dominant speakers that exist in participants
|
14380
14606
|
const dominantSpeakerIds = dominantSpeakers.filter((id) => !!participantsMap[id]).slice(0, maxDominantSpeakers);
|
14381
|
-
const newVisibleParticipantIds =
|
14607
|
+
const newVisibleParticipantIds = currentParticipants.map((p) => p.userId).slice(0, maxDominantSpeakers);
|
14382
14608
|
const newDominantSpeakerIds = dominantSpeakerIds.filter((id) => !newVisibleParticipantIds.includes(id));
|
14383
14609
|
// Remove participants that are no longer dominant and replace them with new dominant speakers.
|
14384
14610
|
for (let index = 0; index < maxDominantSpeakers; index++) {
|
@@ -14414,99 +14640,61 @@ const participantsById = (participants) => {
|
|
14414
14640
|
const DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS = 6;
|
14415
14641
|
const DEFAULT_MAX_VIDEO_SREAMS = 4;
|
14416
14642
|
const MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY = 9;
|
14417
|
-
const
|
14418
|
-
const
|
14419
|
-
const
|
14420
|
-
|
14421
|
-
|
14422
|
-
|
14423
|
-
return MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY;
|
14424
|
-
}
|
14425
|
-
else {
|
14426
|
-
return maxRemoteVideoStreams;
|
14427
|
-
}
|
14428
|
-
};
|
14429
|
-
const maxRemoteVideoStreamsToUse = calculateMaxRemoteVideoStreams();
|
14643
|
+
const getOrganizedParticipants = (props) => {
|
14644
|
+
const { remoteParticipants = [], dominantSpeakers = [], maxRemoteVideoStreams = DEFAULT_MAX_VIDEO_SREAMS, maxOverflowGalleryDominantSpeakers = DEFAULT_MAX_OVERFLOW_GALLERY_DOMINANT_SPEAKERS, isScreenShareActive = false, layout, previousGridParticipants = [], previousOverflowParticipants = [] } = props;
|
14645
|
+
const maxRemoteVideoStreamsToUse = maxRemoteVideoStreams > MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY
|
14646
|
+
? MAX_GRID_PARTICIPANTS_NOT_LARGE_GALLERY
|
14647
|
+
: maxRemoteVideoStreams;
|
14648
|
+
const remoteParticipantsOrdered = putVideoParticipantsFirst(remoteParticipants);
|
14430
14649
|
const videoParticipants = remoteParticipants.filter((p) => { var _a; return (_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
|
14431
|
-
const
|
14432
|
-
|
14433
|
-
|
14434
|
-
|
14435
|
-
|
14436
|
-
|
14437
|
-
|
14438
|
-
participants: participantsToSortTrampoline(),
|
14439
|
-
dominantSpeakers,
|
14440
|
-
lastVisibleParticipants: visibleGridParticipants.current,
|
14441
|
-
maxDominantSpeakers: maxRemoteVideoStreamsToUse
|
14442
|
-
}).slice(0, maxRemoteVideoStreamsToUse);
|
14650
|
+
const participants = layout === 'floatingLocalVideo' && videoParticipants.length > 0 ? videoParticipants : remoteParticipantsOrdered;
|
14651
|
+
let newGridParticipants = smartDominantSpeakerParticipants({
|
14652
|
+
participants: participants,
|
14653
|
+
dominantSpeakers,
|
14654
|
+
currentParticipants: previousGridParticipants,
|
14655
|
+
maxDominantSpeakers: maxRemoteVideoStreamsToUse
|
14656
|
+
}).slice(0, maxRemoteVideoStreamsToUse);
|
14443
14657
|
const dominantSpeakerToGrid = layout === 'speaker'
|
14444
14658
|
? dominantSpeakers && dominantSpeakers[0]
|
14445
|
-
?
|
14446
|
-
: [
|
14659
|
+
? newGridParticipants.filter((p) => p.userId === dominantSpeakers[0])
|
14660
|
+
: [newGridParticipants[0]]
|
14447
14661
|
: [];
|
14448
14662
|
if (dominantSpeakerToGrid[0]) {
|
14449
|
-
|
14663
|
+
newGridParticipants = dominantSpeakerToGrid;
|
14450
14664
|
}
|
14451
|
-
const
|
14452
|
-
const remoteParticipantsOrdered = putVideoParticipantsFirst(remoteParticipants);
|
14665
|
+
const gridParticipantSet = new Set(newGridParticipants.map((p) => p.userId));
|
14453
14666
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14454
14667
|
const callingParticipants = remoteParticipantsOrdered.filter((p) => p.state === ('Connecting' ));
|
14455
14668
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14456
14669
|
const callingParticipantsSet = new Set(callingParticipants.map((p) => p.userId));
|
14457
|
-
|
14458
|
-
participants: remoteParticipantsOrdered.filter((p) => !
|
14670
|
+
const newOverflowGalleryParticipants = smartDominantSpeakerParticipants({
|
14671
|
+
participants: remoteParticipantsOrdered.filter((p) => !gridParticipantSet.has(p.userId) &&
|
14459
14672
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !callingParticipantsSet.has(p.userId)),
|
14460
14673
|
dominantSpeakers: dominantSpeakers,
|
14461
|
-
|
14674
|
+
currentParticipants: previousOverflowParticipants,
|
14462
14675
|
maxDominantSpeakers: maxOverflowGalleryDominantSpeakers
|
14463
14676
|
});
|
14464
|
-
const
|
14465
|
-
if (isScreenShareActive) {
|
14466
|
-
return [];
|
14467
|
-
}
|
14468
|
-
// if we have no grid participants we need to cap the max number of overflowGallery participants in the grid
|
14469
|
-
// we will use the max streams provided to the function to find the max participants that can go in the grid
|
14470
|
-
// if there are less participants than max streams then we will use all participants including joining in the grid
|
14471
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14472
|
-
return visibleGridParticipants.current.length > 0
|
14473
|
-
? visibleGridParticipants.current
|
14474
|
-
: visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse
|
14475
|
-
? visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse)
|
14476
|
-
: visibleOverflowGalleryParticipants.current.slice(0, maxRemoteVideoStreamsToUse).concat(callingParticipants);
|
14477
|
-
}, [
|
14478
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
|
14677
|
+
const gridParticipants = getGridParticipants({
|
14479
14678
|
isScreenShareActive,
|
14480
|
-
|
14481
|
-
|
14482
|
-
|
14483
|
-
|
14484
|
-
|
14485
|
-
|
14486
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14487
|
-
return visibleGridParticipants.current.concat(visibleOverflowGalleryParticipants.current.concat(callingParticipants));
|
14488
|
-
}
|
14489
|
-
else {
|
14490
|
-
// If screen sharing is not active, then assign all video tiles as grid tiles.
|
14491
|
-
// If there are no video tiles, then assign audio tiles as grid tiles.
|
14492
|
-
// if there are more overflow tiles than max streams then find the tiles that don't fit in the grid and put them in overflow
|
14493
|
-
// overflow should be empty if total participants including calling participants is less than max streams
|
14494
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14495
|
-
return visibleGridParticipants.current.length > 0
|
14496
|
-
? visibleOverflowGalleryParticipants.current.concat(callingParticipants)
|
14497
|
-
: visibleOverflowGalleryParticipants.current.length > maxRemoteVideoStreamsToUse
|
14498
|
-
? visibleOverflowGalleryParticipants.current.slice(maxRemoteVideoStreamsToUse).concat(callingParticipants)
|
14499
|
-
: [];
|
14500
|
-
}
|
14501
|
-
}, [
|
14502
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants,
|
14679
|
+
gridParticipants: newGridParticipants,
|
14680
|
+
overflowGalleryParticipants: newOverflowGalleryParticipants,
|
14681
|
+
maxRemoteVideoStreams: maxRemoteVideoStreamsToUse,
|
14682
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants
|
14683
|
+
});
|
14684
|
+
const overflowGalleryParticipants = getOverflowGalleryRemoteParticipants({
|
14503
14685
|
isScreenShareActive,
|
14504
|
-
|
14505
|
-
|
14506
|
-
|
14507
|
-
|
14686
|
+
gridParticipants: newGridParticipants,
|
14687
|
+
overflowGalleryParticipants: newOverflowGalleryParticipants,
|
14688
|
+
maxRemoteVideoStreams: maxRemoteVideoStreamsToUse,
|
14689
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ callingParticipants
|
14690
|
+
});
|
14691
|
+
return { gridParticipants, overflowGalleryParticipants };
|
14508
14692
|
};
|
14509
|
-
|
14693
|
+
/**
|
14694
|
+
* Hook to determine which participants should be in grid and overflow gallery and their order respectively
|
14695
|
+
* @private
|
14696
|
+
*/
|
14697
|
+
const useOrganizedParticipants = (props) => {
|
14510
14698
|
var _a, _b;
|
14511
14699
|
// map remote participants by userId
|
14512
14700
|
const remoteParticipantMap = props.remoteParticipants.reduce((map, remoteParticipant) => {
|
@@ -14514,35 +14702,62 @@ const _useOrganizedParticipantsWithFocusedParticipants = (props) => {
|
|
14514
14702
|
return map;
|
14515
14703
|
}, {});
|
14516
14704
|
const spotlightedParticipantUserIds = (_a = props.spotlightedParticipantUserIds) !== null && _a !== void 0 ? _a : [];
|
14517
|
-
|
14518
|
-
//
|
14519
|
-
|
14520
|
-
|
14521
|
-
];
|
14705
|
+
const pinnedParticipantUserIds = (_b = props.pinnedParticipantUserIds) !== null && _b !== void 0 ? _b : [];
|
14706
|
+
// declare set of focused participant user ids as spotlighted participants user ids followed by
|
14707
|
+
// pinned participants user ids which is deduplicated while maintaining order
|
14708
|
+
const focusedParticipantUserIdSet = new Set(spotlightedParticipantUserIds.concat(pinnedParticipantUserIds).filter((p) => remoteParticipantMap[p]));
|
14522
14709
|
// get focused participants from map of remote participants in the order of the user ids
|
14523
|
-
const focusedParticipants = [];
|
14524
|
-
|
14525
|
-
|
14526
|
-
if (pinnedParticipant) {
|
14527
|
-
focusedParticipants.push(pinnedParticipant);
|
14528
|
-
}
|
14529
|
-
});
|
14530
|
-
// get unfocused participants by filtering out set of focused participant user ids from all remote participants
|
14531
|
-
const focusedParticipantUserIdSet = new Set(focusedParticipantUserIds);
|
14710
|
+
const focusedParticipants = [...focusedParticipantUserIdSet].map((p) => remoteParticipantMap[p]);
|
14711
|
+
const currentGridParticipants = React.useRef([]);
|
14712
|
+
const currentOverflowGalleryParticipants = React.useRef([]);
|
14532
14713
|
const unfocusedParticipants = props.remoteParticipants.filter((p) => !focusedParticipantUserIdSet.has(p.userId));
|
14533
14714
|
const useOrganizedParticipantsProps = Object.assign(Object.assign({}, props), {
|
14534
|
-
// if there are
|
14535
|
-
remoteParticipants: unfocusedParticipants });
|
14536
|
-
const useOrganizedParticipantsResult =
|
14537
|
-
|
14538
|
-
|
14715
|
+
// if there are focused participants then leave no room in the grid by setting maxGridParticipants to 0
|
14716
|
+
maxRemoteVideoStreams: focusedParticipants.length > 0 || props.isScreenShareActive ? 0 : props.maxRemoteVideoStreams, remoteParticipants: unfocusedParticipants, previousGridParticipants: currentGridParticipants.current, previousOverflowParticipants: currentOverflowGalleryParticipants.current });
|
14717
|
+
const useOrganizedParticipantsResult = getOrganizedParticipants(useOrganizedParticipantsProps);
|
14718
|
+
currentGridParticipants.current = useOrganizedParticipantsResult.gridParticipants;
|
14719
|
+
currentOverflowGalleryParticipants.current = useOrganizedParticipantsResult.overflowGalleryParticipants;
|
14720
|
+
return focusedParticipants.length > 0
|
14721
|
+
? {
|
14722
|
+
gridParticipants: props.isScreenShareActive ? [] : focusedParticipants,
|
14723
|
+
overflowGalleryParticipants: props.isScreenShareActive
|
14724
|
+
? focusedParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)
|
14725
|
+
: useOrganizedParticipantsResult.overflowGalleryParticipants
|
14726
|
+
}
|
14727
|
+
: useOrganizedParticipantsResult;
|
14728
|
+
};
|
14729
|
+
const getGridParticipants = (args) => {
|
14730
|
+
if (args.isScreenShareActive) {
|
14731
|
+
return [];
|
14732
|
+
}
|
14733
|
+
// if we have no grid participants we need to cap the max number of overflowGallery participants in the grid
|
14734
|
+
// we will use the max streams provided to the function to find the max participants that can go in the grid
|
14735
|
+
// if there are less participants than max streams then we will use all participants including joining in the grid
|
14736
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14737
|
+
return args.gridParticipants.length > 0
|
14738
|
+
? args.gridParticipants
|
14739
|
+
: args.overflowGalleryParticipants.length > args.maxRemoteVideoStreams
|
14740
|
+
? args.overflowGalleryParticipants.slice(0, args.maxRemoteVideoStreams)
|
14741
|
+
: args.overflowGalleryParticipants.slice(0, args.maxRemoteVideoStreams).concat(args.callingParticipants);
|
14742
|
+
};
|
14743
|
+
const getOverflowGalleryRemoteParticipants = (args) => {
|
14744
|
+
if (args.isScreenShareActive) {
|
14745
|
+
// If screen sharing is active, assign video and audio participants as overflow gallery participants
|
14746
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14747
|
+
return args.gridParticipants.concat(args.overflowGalleryParticipants.concat(args.callingParticipants));
|
14748
|
+
}
|
14749
|
+
else {
|
14750
|
+
// If screen sharing is not active, then assign all video tiles as grid tiles.
|
14751
|
+
// If there are no video tiles, then assign audio tiles as grid tiles.
|
14752
|
+
// if there are more overflow tiles than max streams then find the tiles that don't fit in the grid and put them in overflow
|
14753
|
+
// overflow should be empty if total participants including calling participants is less than max streams
|
14754
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
14755
|
+
return args.gridParticipants.length > 0
|
14756
|
+
? args.overflowGalleryParticipants.concat(args.callingParticipants)
|
14757
|
+
: args.overflowGalleryParticipants.length > args.maxRemoteVideoStreams
|
14758
|
+
? args.overflowGalleryParticipants.slice(args.maxRemoteVideoStreams).concat(args.callingParticipants)
|
14759
|
+
: [];
|
14539
14760
|
}
|
14540
|
-
return {
|
14541
|
-
gridParticipants: props.isScreenShareActive ? [] : focusedParticipants,
|
14542
|
-
overflowGalleryParticipants: props.isScreenShareActive
|
14543
|
-
? focusedParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)
|
14544
|
-
: useOrganizedParticipantsResult.gridParticipants.concat(useOrganizedParticipantsResult.overflowGalleryParticipants)
|
14545
|
-
};
|
14546
14761
|
};
|
14547
14762
|
const putVideoParticipantsFirst = (remoteParticipants) => {
|
14548
14763
|
const videoParticipants = [];
|
@@ -14559,13 +14774,6 @@ const putVideoParticipantsFirst = (remoteParticipants) => {
|
|
14559
14774
|
const remoteParticipantSortedByVideo = videoParticipants.concat(audioParticipants);
|
14560
14775
|
return remoteParticipantSortedByVideo;
|
14561
14776
|
};
|
14562
|
-
/**
|
14563
|
-
* Hook to determine which participants should be in grid and overflow gallery and their order respectively
|
14564
|
-
* @private
|
14565
|
-
*/
|
14566
|
-
const useOrganizedParticipants = (args) => {
|
14567
|
-
return _useOrganizedParticipantsWithFocusedParticipants(args);
|
14568
|
-
};
|
14569
14777
|
/* @conditional-compile-remove(reaction) */
|
14570
14778
|
/**
|
14571
14779
|
* @private
|
@@ -14623,9 +14831,7 @@ const VideoTileMoreOptionsButton = (props) => {
|
|
14623
14831
|
const VideoTile = (props) => {
|
14624
14832
|
const { children, displayName, initialsName, isMirrored, isMuted,
|
14625
14833
|
/* @conditional-compile-remove(spotlight) */
|
14626
|
-
isSpotlighted, isPinned, onRenderPlaceholder, renderElement, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking,
|
14627
|
-
/* @conditional-compile-remove(raise-hand) */
|
14628
|
-
raisedHand,
|
14834
|
+
isSpotlighted, isPinned, onRenderPlaceholder, renderElement, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking, raisedHand,
|
14629
14835
|
/* @conditional-compile-remove(reaction) */
|
14630
14836
|
reaction, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX, contextualMenu,
|
14631
14837
|
/* @conditional-compile-remove(reaction) */
|
@@ -14689,9 +14895,7 @@ const VideoTile = (props) => {
|
|
14689
14895
|
const participantStateString = participantStateStringTrampoline(props, locale);
|
14690
14896
|
const canShowContextMenuButton = isHovered || isFocused;
|
14691
14897
|
let raisedHandBackgroundColor = '';
|
14692
|
-
/* @conditional-compile-remove(raise-hand) */
|
14693
14898
|
const callingPalette = theme.callingPalette;
|
14694
|
-
/* @conditional-compile-remove(raise-hand) */
|
14695
14899
|
raisedHandBackgroundColor = callingPalette.raiseHandGold;
|
14696
14900
|
/* @conditional-compile-remove(reaction) */
|
14697
14901
|
const backgroundImageUrl = reaction !== undefined && reactionResources !== undefined
|
@@ -14726,7 +14930,7 @@ const VideoTile = (props) => {
|
|
14726
14930
|
return (React.createElement(react.Stack, Object.assign({ "data-ui-id": ids.videoTile, className: react.mergeStyles(rootStyles, {
|
14727
14931
|
background: theme.palette.neutralLighter,
|
14728
14932
|
borderRadius: theme.effects.roundedCorner4
|
14729
|
-
}, (isSpeaking ||
|
14933
|
+
}, (isSpeaking || raisedHand) && {
|
14730
14934
|
'&::after': {
|
14731
14935
|
content: `''`,
|
14732
14936
|
position: 'absolute',
|
@@ -14767,7 +14971,7 @@ const VideoTile = (props) => {
|
|
14767
14971
|
React.createElement(react.Icon, { iconName: "VideoTilePinned", className: react.mergeStyles(pinIconStyle) }))),
|
14768
14972
|
React.createElement(VideoTileMoreOptionsButton, { contextualMenu: contextualMenu, canShowContextMenuButton: canShowContextMenuButton })))),
|
14769
14973
|
children && (React.createElement(react.Stack, { className: react.mergeStyles(overlayContainerStyles, styles === null || styles === void 0 ? void 0 : styles.overlayContainer) }, children)),
|
14770
|
-
|
14974
|
+
raisedHand && (React.createElement(react.Stack, { horizontal: true, tokens: { childrenGap: '0.2rem' }, className: raiseHandContainerStyles(theme, !canShowLabel) },
|
14771
14975
|
React.createElement(react.Stack.Item, null,
|
14772
14976
|
React.createElement(react.Text, null, raisedHand.raisedHandOrderPosition)),
|
14773
14977
|
React.createElement(react.Stack.Item, null,
|
@@ -14889,9 +15093,7 @@ const _RemoteVideoTile = React.memo((props) => {
|
|
14889
15093
|
/* @conditional-compile-remove(hide-attendee-name) */
|
14890
15094
|
displayName = formatDisplayName();
|
14891
15095
|
return (React.createElement(react.Stack, { tabIndex: menuKind === 'drawer' ? 0 : undefined, onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined, style: remoteVideoTileWrapperStyle },
|
14892
|
-
React.createElement(VideoTile, Object.assign({ key: userId, userId: userId, initialsName: (_b = remoteParticipant.displayName) !== null && _b !== void 0 ? _b : '', renderElement: renderVideoStreamElement, displayName: displayName, onRenderPlaceholder: onRenderAvatar, isMuted: remoteParticipant.isMuted,
|
14893
|
-
/* @conditional-compile-remove(raise-hand) */
|
14894
|
-
raisedHand: remoteParticipant.raisedHand,
|
15096
|
+
React.createElement(VideoTile, Object.assign({ key: userId, userId: userId, initialsName: (_b = remoteParticipant.displayName) !== null && _b !== void 0 ? _b : '', renderElement: renderVideoStreamElement, displayName: displayName, onRenderPlaceholder: onRenderAvatar, isMuted: remoteParticipant.isMuted, raisedHand: remoteParticipant.raisedHand,
|
14895
15097
|
/* @conditional-compile-remove(reaction) */
|
14896
15098
|
reaction: remoteParticipant.reaction, isSpeaking: remoteParticipant.isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel,
|
14897
15099
|
/* @conditional-compile-remove(one-to-n-calling) */
|
@@ -15146,9 +15348,7 @@ const LocalVideoCameraCycleButton = (props) => {
|
|
15146
15348
|
* @internal
|
15147
15349
|
*/
|
15148
15350
|
const _LocalVideoTile = React.memo((props) => {
|
15149
|
-
const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription,
|
15150
|
-
/* @conditional-compile-remove(raise-hand) */
|
15151
|
-
raisedHand,
|
15351
|
+
const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription, raisedHand,
|
15152
15352
|
/* @conditional-compile-remove(reaction) */
|
15153
15353
|
reaction,
|
15154
15354
|
/* @conditional-compile-remove(spotlight) */
|
@@ -15253,9 +15453,7 @@ const _LocalVideoTile = React.memo((props) => {
|
|
15253
15453
|
]);
|
15254
15454
|
return (React.createElement(react.Stack, { className: react.mergeStyles({ width: '100%', height: '100%' }),
|
15255
15455
|
/* @conditional-compile-remove(spotlight) */ onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined },
|
15256
|
-
React.createElement(VideoTile, Object.assign({ key: userId !== null && userId !== void 0 ? userId : 'local-video-tile', userId: userId, renderElement: renderVideoStreamElement, showLabel: showLabel, displayName: displayName, initialsName: initialsName, styles: videoTileStyles, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize,
|
15257
|
-
/* @conditional-compile-remove(raise-hand) */
|
15258
|
-
raisedHand: raisedHand,
|
15456
|
+
React.createElement(VideoTile, Object.assign({ key: userId !== null && userId !== void 0 ? userId : 'local-video-tile', userId: userId, renderElement: renderVideoStreamElement, showLabel: showLabel, displayName: displayName, initialsName: initialsName, styles: videoTileStyles, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, raisedHand: raisedHand,
|
15259
15457
|
/* @conditional-compile-remove(reaction) */
|
15260
15458
|
reaction: reaction,
|
15261
15459
|
/* @conditional-compile-remove(spotlight) */
|
@@ -17447,9 +17645,7 @@ const VideoGallery = (props) => {
|
|
17447
17645
|
return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;
|
17448
17646
|
};
|
17449
17647
|
return (React.createElement(react.Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
|
17450
|
-
React.createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: showLocalVideoTileLabel, showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles,
|
17451
|
-
/* @conditional-compile-remove(raise-hand) */
|
17452
|
-
raisedHand: localParticipant.raisedHand,
|
17648
|
+
React.createElement(_LocalVideoTile, { userId: localParticipant.userId, onCreateLocalStreamView: onCreateLocalStreamView, onDisposeLocalStreamView: onDisposeLocalStreamView, isAvailable: (_a = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable, isMuted: localParticipant.isMuted, renderElement: (_b = localParticipant === null || localParticipant === void 0 ? void 0 : localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement, displayName: showDisplayNameTrampoline(), initialsName: initialsName, localVideoViewOptions: localVideoViewOptions, onRenderAvatar: onRenderAvatar, showLabel: showLocalVideoTileLabel, showMuteIndicator: showMuteIndicator, showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: strings.localVideoCameraSwitcherLabel, localVideoSelectedDescription: strings.localVideoSelectedDescription, styles: localVideoTileStyles, raisedHand: localParticipant.raisedHand,
|
17453
17649
|
/* @conditional-compile-remove(reaction) */
|
17454
17650
|
reaction: localParticipant.reaction,
|
17455
17651
|
/* @conditional-compile-remove(spotlight) */
|
@@ -18804,8 +19000,6 @@ const screenshareButtonStyles = (theme) => ({
|
|
18804
19000
|
|
18805
19001
|
// Copyright (c) Microsoft Corporation.
|
18806
19002
|
// Licensed under the MIT License.
|
18807
|
-
/* @conditional-compile-remove(raise-hand) */
|
18808
|
-
/* @conditional-compile-remove(raise-hand) */
|
18809
19003
|
/**
|
18810
19004
|
* A button to start / stop screen sharing.
|
18811
19005
|
*
|
@@ -18823,7 +19017,6 @@ const RaiseHandButton = (props) => {
|
|
18823
19017
|
const onRenderLowerHandIcon = () => (React.createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "ControlButtonLowerHand" }));
|
18824
19018
|
return (React.createElement(ControlBarButton, Object.assign({}, props, { className: react.mergeStyles(styles, props.styles), onClick: (_a = props.onToggleRaiseHand) !== null && _a !== void 0 ? _a : props.onClick, onRenderOnIcon: (_b = props.onRenderOnIcon) !== null && _b !== void 0 ? _b : onRenderLowerHandIcon, onRenderOffIcon: (_c = props.onRenderOffIcon) !== null && _c !== void 0 ? _c : onRenderRaiseHandIcon, strings: strings, labelKey: (_d = props.labelKey) !== null && _d !== void 0 ? _d : 'raiseHandButtonLabel', disabled: props.disabled })));
|
18825
19019
|
};
|
18826
|
-
/* @conditional-compile-remove(raise-hand) */
|
18827
19020
|
const raiseHandButtonStyles = (theme) => ({
|
18828
19021
|
rootChecked: {
|
18829
19022
|
background: theme.palette.themePrimary,
|
@@ -21120,47 +21313,41 @@ const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAttendeeN
|
|
21120
21313
|
displayName = maskDisplayNameWithRole(displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
|
21121
21314
|
/* @conditional-compile-remove(reaction) */
|
21122
21315
|
const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
|
21123
|
-
return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName,
|
21124
|
-
/* @conditional-compile-remove(
|
21125
|
-
participant.
|
21316
|
+
return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName, participant.raisedHand,
|
21317
|
+
/* @conditional-compile-remove(ppt-live) */
|
21318
|
+
participant.contentSharingStream,
|
21126
21319
|
/* @conditional-compile-remove(reaction) */
|
21127
21320
|
remoteParticipantReaction,
|
21128
21321
|
/* @conditional-compile-remove(spotlight) */
|
21129
|
-
participant.spotlight
|
21130
|
-
/* @conditional-compile-remove(ppt-live) */
|
21131
|
-
participant.contentSharingStream);
|
21322
|
+
participant.spotlight);
|
21132
21323
|
}));
|
21133
21324
|
});
|
21134
21325
|
};
|
21135
|
-
const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName,
|
21136
|
-
/* @conditional-compile-remove(
|
21137
|
-
|
21326
|
+
const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, // temp unknown type to build stable
|
21327
|
+
/* @conditional-compile-remove(ppt-live) */
|
21328
|
+
contentSharingStream,
|
21138
21329
|
/* @conditional-compile-remove(reaction) */
|
21139
21330
|
reaction, // temp unknown type to build stable
|
21140
21331
|
/* @conditional-compile-remove(spotlight) */
|
21141
|
-
spotlight
|
21142
|
-
|
21143
|
-
|
21144
|
-
|
21145
|
-
|
21146
|
-
raisedHand,
|
21332
|
+
spotlight // temp unknown type to build stable
|
21333
|
+
) => {
|
21334
|
+
return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand,
|
21335
|
+
/* @conditional-compile-remove(ppt-live) */
|
21336
|
+
contentSharingStream,
|
21147
21337
|
/* @conditional-compile-remove(reaction) */
|
21148
21338
|
reaction,
|
21149
21339
|
/* @conditional-compile-remove(spotlight) */
|
21150
|
-
spotlight
|
21151
|
-
/* @conditional-compile-remove(ppt-live) */
|
21152
|
-
contentSharingStream);
|
21340
|
+
spotlight);
|
21153
21341
|
});
|
21154
21342
|
/** @private */
|
21155
|
-
const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName,
|
21156
|
-
/* @conditional-compile-remove(
|
21157
|
-
|
21343
|
+
const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, // temp unknown type to build stable
|
21344
|
+
/* @conditional-compile-remove(ppt-live) */
|
21345
|
+
contentSharingStream,
|
21158
21346
|
/* @conditional-compile-remove(reaction) */
|
21159
21347
|
reaction, // temp unknown type to build stable
|
21160
21348
|
/* @conditional-compile-remove(spotlight) */
|
21161
|
-
spotlight
|
21162
|
-
|
21163
|
-
contentSharingStream) => {
|
21349
|
+
spotlight // temp unknown type to build stable
|
21350
|
+
) => {
|
21164
21351
|
const rawVideoStreamsArray = Object.values(videoStreams);
|
21165
21352
|
let videoStream = undefined;
|
21166
21353
|
let screenShareStream = undefined;
|
@@ -21189,7 +21376,6 @@ contentSharingStream) => {
|
|
21189
21376
|
/* @conditional-compile-remove(one-to-n-calling) */
|
21190
21377
|
/* @conditional-compile-remove(PSTN-calls) */
|
21191
21378
|
state,
|
21192
|
-
/* @conditional-compile-remove(raise-hand) */
|
21193
21379
|
raisedHand: raisedHand,
|
21194
21380
|
/* @conditional-compile-remove(reaction) */
|
21195
21381
|
reaction: reaction,
|
@@ -21221,8 +21407,7 @@ const convertRemoteContentSharingStreamToVideoGalleryStream = (stream) => {
|
|
21221
21407
|
};
|
21222
21408
|
/** @private */
|
21223
21409
|
const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream,
|
21224
|
-
/* @conditional-compile-remove(rooms) */ role,
|
21225
|
-
/* @conditional-compile-remove(raise-hand) */ raisedHand,
|
21410
|
+
/* @conditional-compile-remove(rooms) */ role, raisedHand,
|
21226
21411
|
/* @conditional-compile-remove(reaction) */ reaction,
|
21227
21412
|
/* @conditional-compile-remove(spotlight) */ localSpotlight,
|
21228
21413
|
/* @conditional-compile-remove(spotlight) */ capabilities) => {
|
@@ -21239,7 +21424,6 @@ const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, is
|
|
21239
21424
|
},
|
21240
21425
|
/* @conditional-compile-remove(rooms) */
|
21241
21426
|
role,
|
21242
|
-
/* @conditional-compile-remove(raise-hand) */
|
21243
21427
|
raisedHand: raisedHand,
|
21244
21428
|
/* @conditional-compile-remove(reaction) */
|
21245
21429
|
reaction: reaction,
|
@@ -21286,11 +21470,9 @@ const videoGallerySelector = reselect.createSelector([
|
|
21286
21470
|
getDisplayName$2,
|
21287
21471
|
getIdentifier,
|
21288
21472
|
getDominantSpeakers,
|
21289
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
21290
21473
|
getOptimalVideoCount,
|
21291
21474
|
/* @conditional-compile-remove(rooms) */
|
21292
21475
|
getRole$1,
|
21293
|
-
/* @conditional-compile-remove(raise-hand) */
|
21294
21476
|
getLocalParticipantRaisedHand$1,
|
21295
21477
|
/* @conditional-compile-remove(hide-attendee-name) */
|
21296
21478
|
isHideAttendeeNamesEnabled,
|
@@ -21300,13 +21482,9 @@ const videoGallerySelector = reselect.createSelector([
|
|
21300
21482
|
getSpotlightCallFeature,
|
21301
21483
|
/* @conditional-compile-remove(spotlight) */
|
21302
21484
|
getCapabilities
|
21303
|
-
], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers,
|
21304
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
21305
|
-
optimalVideoCount,
|
21485
|
+
], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, optimalVideoCount,
|
21306
21486
|
/* @conditional-compile-remove(rooms) */
|
21307
|
-
role,
|
21308
|
-
/* @conditional-compile-remove(raise-hand) */
|
21309
|
-
raisedHand,
|
21487
|
+
role, raisedHand,
|
21310
21488
|
/* @conditional-compile-remove(hide-attendee-name) */
|
21311
21489
|
isHideAttendeeNamesEnabled,
|
21312
21490
|
/* @conditional-compile-remove(reaction) */
|
@@ -21328,17 +21506,15 @@ capabilities) => {
|
|
21328
21506
|
const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants);
|
21329
21507
|
return {
|
21330
21508
|
screenShareParticipant: screenShareRemoteParticipant
|
21331
|
-
? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName,
|
21332
|
-
/* @conditional-compile-remove(
|
21333
|
-
screenShareRemoteParticipant.
|
21509
|
+
? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand,
|
21510
|
+
/* @conditional-compile-remove(ppt-live) */
|
21511
|
+
screenShareRemoteParticipant.contentSharingStream,
|
21334
21512
|
/* @conditional-compile-remove(spotlight) */
|
21335
21513
|
screenShareRemoteParticipant.spotlight)
|
21336
21514
|
: undefined,
|
21337
21515
|
localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream,
|
21338
21516
|
/* @conditional-compile-remove(rooms) */
|
21339
|
-
role,
|
21340
|
-
/* @conditional-compile-remove(raise-hand) */
|
21341
|
-
raisedHand,
|
21517
|
+
role, raisedHand,
|
21342
21518
|
/* @conditional-compile-remove(reaction) */
|
21343
21519
|
localParticipantReactionState,
|
21344
21520
|
/* @conditional-compile-remove(spotlight) */
|
@@ -21351,7 +21527,6 @@ capabilities) => {
|
|
21351
21527
|
/* @conditional-compile-remove(hide-attendee-name) */
|
21352
21528
|
role),
|
21353
21529
|
dominantSpeakers: dominantSpeakerIds,
|
21354
|
-
/* @conditional-compile-remove(optimal-video-count) */
|
21355
21530
|
maxRemoteVideoStreams: optimalVideoCount,
|
21356
21531
|
/* @conditional-compile-remove(spotlight) */
|
21357
21532
|
spotlightedParticipants: spotlightedParticipantIds,
|
@@ -21395,9 +21570,7 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
|
|
21395
21570
|
const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
|
21396
21571
|
/* @conditional-compile-remove(spotlight) */
|
21397
21572
|
const spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));
|
21398
|
-
return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking,
|
21399
|
-
/* @conditional-compile-remove(raise-hand) */
|
21400
|
-
participant.raisedHand, localUserCanRemoveOthers,
|
21573
|
+
return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking, participant.raisedHand, localUserCanRemoveOthers,
|
21401
21574
|
/* @conditional-compile-remove(reaction) */
|
21402
21575
|
remoteParticipantReaction,
|
21403
21576
|
/* @conditional-compile-remove(spotlight) */
|
@@ -21432,7 +21605,7 @@ const participantListSelector = reselect.createSelector([
|
|
21432
21605
|
getRemoteParticipantsExcludingConsumers,
|
21433
21606
|
getIsScreenSharingOn,
|
21434
21607
|
getIsMuted,
|
21435
|
-
|
21608
|
+
getLocalParticipantRaisedHand$1,
|
21436
21609
|
getRole$1,
|
21437
21610
|
getParticipantCount,
|
21438
21611
|
/* @conditional-compile-remove(hide-attendee-name) */
|
@@ -21441,9 +21614,7 @@ const participantListSelector = reselect.createSelector([
|
|
21441
21614
|
getLocalParticipantReactionState,
|
21442
21615
|
/* @conditional-compile-remove(spotlight) */
|
21443
21616
|
getSpotlightCallFeature
|
21444
|
-
], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted,
|
21445
|
-
/* @conditional-compile-remove(raise-hand) */
|
21446
|
-
raisedHand, role, partitipantCount,
|
21617
|
+
], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, raisedHand, role, partitipantCount,
|
21447
21618
|
/* @conditional-compile-remove(hide-attendee-name) */
|
21448
21619
|
isHideAttendeeNamesEnabled,
|
21449
21620
|
/* @conditional-compile-remove(reaction) */
|
@@ -21467,7 +21638,6 @@ spotlightCallFeature) => {
|
|
21467
21638
|
displayName: displayName,
|
21468
21639
|
isScreenSharing: isScreenSharingOn,
|
21469
21640
|
isMuted: isMuted,
|
21470
|
-
/* @conditional-compile-remove(raise-hand) */
|
21471
21641
|
raisedHand: raisedHand,
|
21472
21642
|
state: 'Connected',
|
21473
21643
|
// Local participant can never remove themselves.
|
@@ -21782,10 +21952,6 @@ const getSelector$1 = (component) => {
|
|
21782
21952
|
if (component === HoldButton) {
|
21783
21953
|
return findConditionalCompiledSelector(component);
|
21784
21954
|
}
|
21785
|
-
/* @conditional-compile-remove(raise-hand) */
|
21786
|
-
if (component === RaiseHandButton) {
|
21787
|
-
return findConditionalCompiledSelector(component);
|
21788
|
-
}
|
21789
21955
|
/* @conditional-compile-remove(reaction) */
|
21790
21956
|
if (component === ReactionButton) {
|
21791
21957
|
return findConditionalCompiledSelector(component);
|
@@ -21817,20 +21983,18 @@ const findSelector$1 = (component) => {
|
|
21817
21983
|
return emptySelector;
|
21818
21984
|
case ErrorBar:
|
21819
21985
|
return errorBarSelector$1;
|
21986
|
+
case RaiseHandButton:
|
21987
|
+
return raiseHandButtonSelector;
|
21820
21988
|
}
|
21821
21989
|
return undefined;
|
21822
21990
|
};
|
21823
|
-
/* @conditional-compile-remove(PSTN-calls) */
|
21991
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
21824
21992
|
const findConditionalCompiledSelector = (component) => {
|
21825
21993
|
switch (component) {
|
21826
21994
|
/* @conditional-compile-remove(PSTN-calls) */
|
21827
21995
|
case HoldButton:
|
21828
21996
|
/* @conditional-compile-remove(PSTN-calls) */
|
21829
21997
|
return holdButtonSelector;
|
21830
|
-
/* @conditional-compile-remove(raise-hand) */
|
21831
|
-
case RaiseHandButton:
|
21832
|
-
/* @conditional-compile-remove(raise-hand) */
|
21833
|
-
return raiseHandButtonSelector;
|
21834
21998
|
/* @conditional-compile-remove(reaction) */
|
21835
21999
|
case ReactionButton:
|
21836
22000
|
/* @conditional-compile-remove(reaction) */
|
@@ -22908,8 +23072,8 @@ class ResourceDownloadQueue {
|
|
22908
23072
|
});
|
22909
23073
|
}
|
22910
23074
|
downloadAllPreviewUrls(message, operation) {
|
22911
|
-
var _a;
|
22912
23075
|
return __awaiter$t(this, void 0, void 0, function* () {
|
23076
|
+
var _a;
|
22913
23077
|
const attachments = (_a = message.content) === null || _a === void 0 ? void 0 : _a.attachments;
|
22914
23078
|
if (message.type === 'html' && attachments) {
|
22915
23079
|
if (message.resourceCache === undefined) {
|
@@ -23067,8 +23231,8 @@ let ChatContext$1 = class ChatContext {
|
|
23067
23231
|
}
|
23068
23232
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
23069
23233
|
downloadResourceToCache(threadId, messageId, resourceUrl) {
|
23070
|
-
var _a;
|
23071
23234
|
return __awaiter$s(this, void 0, void 0, function* () {
|
23235
|
+
var _a;
|
23072
23236
|
let message = (_a = this.getState().threads[threadId]) === null || _a === void 0 ? void 0 : _a.chatMessages[messageId];
|
23073
23237
|
if (message && this._fullsizeImageQueue) {
|
23074
23238
|
if (!message.resourceCache) {
|
@@ -24198,7 +24362,6 @@ const COMPOSITE_ONLY_ICONS = {
|
|
24198
24362
|
FloatingLocalVideoGalleryLayout: React.createElement(reactIcons.BoardSplit20Regular, null),
|
24199
24363
|
FocusedContentGalleryLayout: React.createElement(reactIcons.ContentView20Regular, null),
|
24200
24364
|
LargeGalleryLayout: React.createElement(reactIcons.Table20Regular, null),
|
24201
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
24202
24365
|
DefaultCustomButton: React.createElement(reactIcons.Circle20Regular, null),
|
24203
24366
|
DtmfDialpadButton: React.createElement(reactIcons.Dialpad20Regular, null),
|
24204
24367
|
/* @conditional-compile-remove(spotlight) */
|
@@ -24663,8 +24826,8 @@ class AzureCommunicationChatAdapter {
|
|
24663
24826
|
offStateChange(handler) {
|
24664
24827
|
this.context.offStateChange(handler);
|
24665
24828
|
}
|
24666
|
-
sendMessage(
|
24667
|
-
return __awaiter$n(this,
|
24829
|
+
sendMessage(content_1) {
|
24830
|
+
return __awaiter$n(this, arguments, void 0, function* (content, options = {}) {
|
24668
24831
|
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$n(this, void 0, void 0, function* () {
|
24669
24832
|
/* @conditional-compile-remove(file-sharing) */
|
24670
24833
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
@@ -24893,7 +25056,7 @@ const convertEventType = (type) => {
|
|
24893
25056
|
*
|
24894
25057
|
* @public
|
24895
25058
|
*/
|
24896
|
-
const createAzureCommunicationChatAdapter = (
|
25059
|
+
const createAzureCommunicationChatAdapter = (_a) => __awaiter$n(void 0, [_a], void 0, function* ({ endpoint: endpointUrl, userId, displayName, credential, threadId }) {
|
24897
25060
|
return _createAzureCommunicationChatAdapterInner(endpointUrl, userId, displayName, credential, threadId);
|
24898
25061
|
});
|
24899
25062
|
/**
|
@@ -24901,7 +25064,7 @@ const createAzureCommunicationChatAdapter = ({ endpoint: endpointUrl, userId, di
|
|
24901
25064
|
*
|
24902
25065
|
* @internal
|
24903
25066
|
*/
|
24904
|
-
const _createAzureCommunicationChatAdapterInner = (
|
25067
|
+
const _createAzureCommunicationChatAdapterInner = (endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1) => __awaiter$n(void 0, [endpoint_1, userId_1, displayName_1, credential_1, threadId_1, ...args_1], void 0, function* (endpoint, userId, displayName, credential, threadId, telemetryImplementationHint = 'Chat') {
|
24905
25068
|
if (!_isValidIdentifier(userId)) {
|
24906
25069
|
throw new Error('Provided userId is invalid. Please provide valid identifier object.');
|
24907
25070
|
}
|
@@ -25284,9 +25447,7 @@ const AvatarPersona = (props) => {
|
|
25284
25447
|
}
|
25285
25448
|
}))();
|
25286
25449
|
}, [data, dataProvider, userId]);
|
25287
|
-
/* @conditional-compile-remove(raise-hand) */
|
25288
25450
|
let activePersona = '';
|
25289
|
-
/* @conditional-compile-remove(raise-hand) */
|
25290
25451
|
if (props.allowActiveBorder) {
|
25291
25452
|
// Display a border for raised handed participants in participant list
|
25292
25453
|
activePersona = react.mergeStyles({
|
@@ -25299,9 +25460,7 @@ const AvatarPersona = (props) => {
|
|
25299
25460
|
});
|
25300
25461
|
react.mergeStyles(activePersona, props.styles);
|
25301
25462
|
}
|
25302
|
-
return (React.createElement(react.Persona, Object.assign({}, props, {
|
25303
|
-
/* @conditional-compile-remove(raise-hand) */
|
25304
|
-
className: activePersona, text: (_a = data === null || data === void 0 ? void 0 : data.text) !== null && _a !== void 0 ? _a : text, imageUrl: (_b = data === null || data === void 0 ? void 0 : data.imageUrl) !== null && _b !== void 0 ? _b : imageUrl, imageInitials: (_c = data === null || data === void 0 ? void 0 : data.imageInitials) !== null && _c !== void 0 ? _c : imageInitials, initialsColor: (_d = data === null || data === void 0 ? void 0 : data.initialsColor) !== null && _d !== void 0 ? _d : initialsColor, initialsTextColor: (_f = (_e = data === null || data === void 0 ? void 0 : data.initialsTextColor) !== null && _e !== void 0 ? _e : initialsTextColor) !== null && _f !== void 0 ? _f : 'white',
|
25463
|
+
return (React.createElement(react.Persona, Object.assign({}, props, { className: activePersona, text: (_a = data === null || data === void 0 ? void 0 : data.text) !== null && _a !== void 0 ? _a : text, imageUrl: (_b = data === null || data === void 0 ? void 0 : data.imageUrl) !== null && _b !== void 0 ? _b : imageUrl, imageInitials: (_c = data === null || data === void 0 ? void 0 : data.imageInitials) !== null && _c !== void 0 ? _c : imageInitials, initialsColor: (_d = data === null || data === void 0 ? void 0 : data.initialsColor) !== null && _d !== void 0 ? _d : initialsColor, initialsTextColor: (_f = (_e = data === null || data === void 0 ? void 0 : data.initialsTextColor) !== null && _e !== void 0 ? _e : initialsTextColor) !== null && _f !== void 0 ? _f : 'white',
|
25305
25464
|
// default disable tooltip unless specified
|
25306
25465
|
showOverflowTooltip: showOverflowTooltip !== null && showOverflowTooltip !== void 0 ? showOverflowTooltip : false,
|
25307
25466
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
@@ -25615,9 +25774,7 @@ const ParticipantListWithHeading = (props) => {
|
|
25615
25774
|
/* @conditional-compile-remove(total-participant-count) */ totalParticipantCount)),
|
25616
25775
|
React.createElement(react.FocusZone, { className: participantListContainerStyle, shouldFocusOnMount: true },
|
25617
25776
|
React.createElement(ParticipantList$k, Object.assign({}, participantListProps, { styles: props.isMobile ? participantListMobileStyle : participantListStyle, onRenderAvatar: (userId, options) => (React.createElement(React.Fragment, null,
|
25618
|
-
React.createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { hidePersonaDetails: !!(options === null || options === void 0 ? void 0 : options.text), dataProvider: onFetchAvatarPersonaData,
|
25619
|
-
/* @conditional-compile-remove(raise-hand) */
|
25620
|
-
allowActiveBorder: true })),
|
25777
|
+
React.createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { hidePersonaDetails: !!(options === null || options === void 0 ? void 0 : options.text), dataProvider: onFetchAvatarPersonaData, allowActiveBorder: true })),
|
25621
25778
|
(options === null || options === void 0 ? void 0 : options.text) && (React.createElement(react.Text, { nowrap: true, styles: displayNameStyles$1 }, options === null || options === void 0 ? void 0 : options.text)))), onFetchParticipantMenuItems: onFetchParticipantMenuItems, showParticipantOverflowTooltip: !props.isMobile, participantAriaLabelledBy: subheadingUniqueId })))));
|
25622
25779
|
};
|
25623
25780
|
const paneTitleTrampoline = (paneTitle, totalParticipantCount) => {
|
@@ -25695,7 +25852,7 @@ const useSelector$2 = (selector, selectorProps) => {
|
|
25695
25852
|
// Copyright (c) Microsoft Corporation.
|
25696
25853
|
// Licensed under the MIT License.
|
25697
25854
|
/* @conditional-compile-remove(rich-text-editor) */
|
25698
|
-
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
25855
|
+
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-Bw9vaT1f.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
|
25699
25856
|
/**
|
25700
25857
|
* @private
|
25701
25858
|
*/
|
@@ -26668,15 +26825,12 @@ const createCompositeHandlers = memoizeOne((adapter) => {
|
|
26668
26825
|
yield adapter.removeParticipant(_toCommunicationIdentifier(userId));
|
26669
26826
|
}
|
26670
26827
|
}),
|
26671
|
-
/* @conditional-compile-remove(raise-hand) */
|
26672
26828
|
onRaiseHand: () => __awaiter$j(void 0, void 0, void 0, function* () {
|
26673
26829
|
yield adapter.raiseHand();
|
26674
26830
|
}),
|
26675
|
-
/* @conditional-compile-remove(raise-hand) */
|
26676
26831
|
onLowerHand: () => __awaiter$j(void 0, void 0, void 0, function* () {
|
26677
26832
|
yield adapter.lowerHand();
|
26678
26833
|
}),
|
26679
|
-
/* @conditional-compile-remove(raise-hand) */
|
26680
26834
|
onToggleRaiseHand: () => __awaiter$j(void 0, void 0, void 0, function* () {
|
26681
26835
|
var _b;
|
26682
26836
|
((_b = adapter.getState().call) === null || _b === void 0 ? void 0 : _b.raiseHand.localParticipantRaisedHand)
|
@@ -27236,7 +27390,6 @@ const getDeviceManager = (state) => state.devices;
|
|
27236
27390
|
* @private
|
27237
27391
|
*/
|
27238
27392
|
const getIsScreenShareOn = (state) => { var _a, _b; return (_b = (_a = state.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn) !== null && _b !== void 0 ? _b : false; };
|
27239
|
-
/* @conditional-compile-remove(raise-hand) */
|
27240
27393
|
/**
|
27241
27394
|
* @private
|
27242
27395
|
*/
|
@@ -27523,7 +27676,6 @@ const callArrangementContainerStyles = (verticalControlBar) => {
|
|
27523
27676
|
|
27524
27677
|
// Copyright (c) Microsoft Corporation.
|
27525
27678
|
// Licensed under the MIT License.
|
27526
|
-
/* @conditional-compile-remove(raise-hand) */
|
27527
27679
|
/** @private */
|
27528
27680
|
const RaiseHand = (props) => {
|
27529
27681
|
const raiseHandButtonProps = usePropsFor$1(RaiseHandButton);
|
@@ -27535,7 +27687,6 @@ const RaiseHand = (props) => {
|
|
27535
27687
|
}
|
27536
27688
|
return (React.createElement(RaiseHandButton, Object.assign({ "data-ui-id": "call-composite-raisehand-button" }, raiseHandButtonProps, { showLabel: props.displayType !== 'compact', disabled: raiseHandButtonDisabled || props.disabled, styles: styles })));
|
27537
27689
|
};
|
27538
|
-
/* @conditional-compile-remove(raise-hand) */
|
27539
27690
|
const isDisabled$1 = (option) => {
|
27540
27691
|
if (option === undefined || option === true || option === false) {
|
27541
27692
|
return false;
|
@@ -27683,7 +27834,6 @@ const CallControls = (props) => {
|
|
27683
27834
|
const options = React.useMemo(() => inferCallControlOptions(!!props.isMobile, props.options), [props.isMobile, props.options]);
|
27684
27835
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(rooms) */
|
27685
27836
|
const adapter = useAdapter();
|
27686
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */
|
27687
27837
|
const localeStrings = useLocale();
|
27688
27838
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
27689
27839
|
const peopleButtonStrings = React.useMemo(() => ({
|
@@ -27691,14 +27841,12 @@ const CallControls = (props) => {
|
|
27691
27841
|
tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,
|
27692
27842
|
tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose
|
27693
27843
|
}), [localeStrings]);
|
27694
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */
|
27695
27844
|
const moreButtonStrings = React.useMemo(() => ({
|
27696
27845
|
label: localeStrings.strings.call.moreButtonCallingLabel,
|
27697
27846
|
tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
|
27698
27847
|
}), [localeStrings]);
|
27699
27848
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
27700
27849
|
const holdButtonProps = usePropsFor$1(HoldButton);
|
27701
|
-
/* @conditional-compile-remove(raise-hand) */
|
27702
27850
|
const raiseHandButtonProps = usePropsFor$1(RaiseHandButton);
|
27703
27851
|
/* @conditional-compile-remove(reaction) */
|
27704
27852
|
const capabilitiesSelector = useSelector$1(capabilitySelector);
|
@@ -27788,15 +27936,12 @@ const CallControls = (props) => {
|
|
27788
27936
|
}
|
27789
27937
|
/* @conditional-compile-remove(reaction) */
|
27790
27938
|
const reactionResources = adapter.getState().reactions;
|
27791
|
-
/* @conditional-compile-remove(raise-hand) */
|
27792
27939
|
const raiseHandButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.raiseHandButton);
|
27793
|
-
/* @conditional-compile-remove(raise-hand) */
|
27794
27940
|
let showRaiseHandButtonInControlBar = raiseHandButtonIsEnabled;
|
27795
27941
|
/* @conditional-compile-remove(rooms) */
|
27796
27942
|
const role = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
27797
27943
|
/* @conditional-compile-remove(rooms) */
|
27798
27944
|
const hideRaiseHandButtonInRoomsCall = adapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);
|
27799
|
-
/* @conditional-compile-remove(raise-hand) */
|
27800
27945
|
if (showRaiseHandButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {
|
27801
27946
|
numberOfButtons++;
|
27802
27947
|
}
|
@@ -27818,7 +27963,6 @@ const CallControls = (props) => {
|
|
27818
27963
|
['data-ui-id']: 'call-composite-more-menu-devices-button'
|
27819
27964
|
});
|
27820
27965
|
}
|
27821
|
-
/* @conditional-compile-remove(raise-hand) */
|
27822
27966
|
if (!showRaiseHandButtonInControlBar && /* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall) {
|
27823
27967
|
moreButtonMenuItems.push({
|
27824
27968
|
key: 'raiseHandButtonKey',
|
@@ -27876,7 +28020,7 @@ const CallControls = (props) => {
|
|
27876
28020
|
cameraButtonIsEnabled && (React.createElement(Camera, { displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.cameraButton) })),
|
27877
28021
|
/* @conditional-compile-remove(reaction) */
|
27878
28022
|
showReactionButtonInControlBar && reactionResources && (React.createElement(Reaction, { displayType: options === null || options === void 0 ? void 0 : options.displayType, reactionResource: reactionResources })),
|
27879
|
-
|
28023
|
+
showRaiseHandButtonInControlBar &&
|
27880
28024
|
/* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options === null || options === void 0 ? void 0 : options.displayType })),
|
27881
28025
|
screenShareButtonIsEnabled && (React.createElement(ScreenShare, { option: options === null || options === void 0 ? void 0 : options.screenShareButton, displayType: options === null || options === void 0 ? void 0 : options.displayType, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.screenShareButton) })),
|
27882
28026
|
showParticipantsButtonInControlBar && (React.createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile, disabled: isDisabled$4(options === null || options === void 0 ? void 0 : options.participantsButton) })) && (
|
@@ -27890,7 +28034,6 @@ const CallControls = (props) => {
|
|
27890
28034
|
// styles={commonButtonStyles}
|
27891
28035
|
showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', disableTooltip: props.isMobile }));
|
27892
28036
|
}),
|
27893
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */
|
27894
28037
|
showMoreButton && (React.createElement(MoreButton, { disableTooltip: props.isMobile, "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonMenuItems }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
|
27895
28038
|
isEnabled$2(options === null || options === void 0 ? void 0 : options.endCallButton) && React.createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
|
27896
28039
|
};
|
@@ -28395,15 +28538,12 @@ const DesktopMoreButton = (props) => {
|
|
28395
28538
|
(_h = (_g = galleryOptions.subMenuProps) === null || _g === void 0 ? void 0 : _g.items) === null || _h === void 0 ? void 0 : _h.push(overflowGalleryOption);
|
28396
28539
|
moreButtonContextualMenuItems.push(galleryOptions);
|
28397
28540
|
}
|
28398
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
28399
28541
|
const customDrawerButtons = React.useMemo(() => generateCustomCallDesktopOverflowButtons(onFetchCustomButtonPropsTrampoline(typeof props.callControls === 'object' ? props.callControls : undefined), typeof props.callControls === 'object' ? props.callControls.displayType : undefined), [props.callControls]);
|
28400
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
28401
28542
|
customDrawerButtons['primary'].slice(CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).forEach((element) => {
|
28402
28543
|
moreButtonContextualMenuItems.push(Object.assign({ itemProps: {
|
28403
28544
|
styles: buttonFlyoutIncreasedSizeStyles
|
28404
28545
|
} }, element));
|
28405
28546
|
});
|
28406
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
28407
28547
|
customDrawerButtons['secondary']
|
28408
28548
|
.slice(CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS)
|
28409
28549
|
.forEach((element) => {
|
@@ -28411,7 +28551,6 @@ const DesktopMoreButton = (props) => {
|
|
28411
28551
|
styles: buttonFlyoutIncreasedSizeStyles
|
28412
28552
|
} }, element));
|
28413
28553
|
});
|
28414
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
28415
28554
|
customDrawerButtons['overflow'].forEach((element) => {
|
28416
28555
|
moreButtonContextualMenuItems.push(Object.assign({ itemProps: {
|
28417
28556
|
styles: buttonFlyoutIncreasedSizeStyles
|
@@ -28656,7 +28795,7 @@ const CommonCallControlBar = (props) => {
|
|
28656
28795
|
isReactionAllowed &&
|
28657
28796
|
isEnabled$1(options.reactionButton) &&
|
28658
28797
|
reactionResources && (React.createElement(Reaction, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen, reactionResource: reactionResources })),
|
28659
|
-
|
28798
|
+
!props.mobileView &&
|
28660
28799
|
isEnabled$1(options.raiseHandButton) &&
|
28661
28800
|
/* @conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall && (React.createElement(RaiseHand, { displayType: options.displayType, styles: commonButtonStyles,
|
28662
28801
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
@@ -28679,9 +28818,7 @@ const CommonCallControlBar = (props) => {
|
|
28679
28818
|
props.mobileView && (React.createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage, disableTooltip: props.mobileView })),
|
28680
28819
|
!props.mobileView && showDesktopMoreButton && (React.createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles,
|
28681
28820
|
/*@conditional-compile-remove(PSTN-calls) */
|
28682
|
-
onClickShowDialpad: props.onClickShowDialpad,
|
28683
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
28684
|
-
callControls: props.callControls,
|
28821
|
+
onClickShowDialpad: props.onClickShowDialpad, callControls: props.callControls,
|
28685
28822
|
/* @conditional-compile-remove(close-captions) */
|
28686
28823
|
isCaptionsSupported: props.isCaptionsSupported,
|
28687
28824
|
/* @conditional-compile-remove(close-captions) */
|
@@ -28999,14 +29136,12 @@ const MoreDrawer = (props) => {
|
|
28999
29136
|
const callAdapter = useAdapter();
|
29000
29137
|
const drawerMenuItems = [];
|
29001
29138
|
const { speakers, onSelectSpeaker, onLightDismiss } = props;
|
29002
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */
|
29003
29139
|
const localeStrings = useLocale();
|
29004
29140
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
29005
29141
|
const holdButtonProps = usePropsFor$1(HoldButton);
|
29006
29142
|
const callees = useSelector$1(getTargetCallees);
|
29007
29143
|
const allowDtmfDialer = showDtmfDialer(callees);
|
29008
29144
|
const [dtmfDialerChecked, setDtmfDialerChecked] = React.useState((_a = props.dtmfDialerPresent) !== null && _a !== void 0 ? _a : false);
|
29009
|
-
/* @conditional-compile-remove(raise-hand) */
|
29010
29145
|
const raiseHandButtonProps = usePropsFor$1(RaiseHandButton);
|
29011
29146
|
const onSpeakerItemClick = React.useCallback((_ev, itemKey) => {
|
29012
29147
|
const selected = speakers === null || speakers === void 0 ? void 0 : speakers.find((speaker) => speaker.id === itemKey);
|
@@ -29184,7 +29319,6 @@ const MoreDrawer = (props) => {
|
|
29184
29319
|
const role = (_e = callAdapter.getState().call) === null || _e === void 0 ? void 0 : _e.role;
|
29185
29320
|
/*@conditional-compile-remove(rooms) */
|
29186
29321
|
const hideRaiseHandButtonInRoomsCall = callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);
|
29187
|
-
/* @conditional-compile-remove(raise-hand) */
|
29188
29322
|
if (drawerSelectionOptions !== false &&
|
29189
29323
|
isEnabled(drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.raiseHandButton) &&
|
29190
29324
|
/*@conditional-compile-remove(rooms) */ !hideRaiseHandButtonInRoomsCall) {
|
@@ -29308,17 +29442,13 @@ const MoreDrawer = (props) => {
|
|
29308
29442
|
});
|
29309
29443
|
}
|
29310
29444
|
}
|
29311
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
29312
29445
|
const customDrawerButtons = React.useMemo(() => generateCustomCallDrawerButtons(onFetchCustomButtonPropsTrampoline(drawerSelectionOptions !== false ? drawerSelectionOptions : undefined), drawerSelectionOptions !== false ? drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.displayType : undefined), [drawerSelectionOptions]);
|
29313
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
29314
29446
|
customDrawerButtons['primary'].slice(CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS).forEach((element) => {
|
29315
29447
|
drawerMenuItems.push(element);
|
29316
29448
|
});
|
29317
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
29318
29449
|
customDrawerButtons['secondary'].forEach((element) => {
|
29319
29450
|
drawerMenuItems.push(element);
|
29320
29451
|
});
|
29321
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
29322
29452
|
customDrawerButtons['overflow'].forEach((element) => {
|
29323
29453
|
drawerMenuItems.push(element);
|
29324
29454
|
});
|
@@ -30573,7 +30703,6 @@ const LocalAndRemotePIP = (props) => {
|
|
30573
30703
|
showCameraSwitcherInLocalPreview: false,
|
30574
30704
|
isAvailable: (_a = localParticipant.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable,
|
30575
30705
|
renderElement: (_b = localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement,
|
30576
|
-
/* @conditional-compile-remove(raise-hand) */
|
30577
30706
|
raisedHand: localParticipant.raisedHand
|
30578
30707
|
});
|
30579
30708
|
}, [
|
@@ -30582,7 +30711,6 @@ const LocalAndRemotePIP = (props) => {
|
|
30582
30711
|
(_b = localParticipant.videoStream) === null || _b === void 0 ? void 0 : _b.renderElement,
|
30583
30712
|
onCreateLocalStreamView,
|
30584
30713
|
onDisposeLocalStreamView,
|
30585
|
-
/* @conditional-compile-remove(raise-hand) */
|
30586
30714
|
localParticipant.raisedHand
|
30587
30715
|
]);
|
30588
30716
|
const remoteVideoTileProps = React.useMemo(() => {
|
@@ -30672,18 +30800,11 @@ const updateUserDisplayNamesTrampoline = (remoteParticipants) => {
|
|
30672
30800
|
* Picture in picture in picture needs to display the most-dominant remote speaker, as well as the local participant video.
|
30673
30801
|
* @private
|
30674
30802
|
*/
|
30675
|
-
const localAndRemotePIPSelector = reselect__namespace.createSelector([
|
30676
|
-
getDisplayName,
|
30677
|
-
dominantRemoteParticipantSelector,
|
30678
|
-
localVideoSelector,
|
30679
|
-
/* @conditional-compile-remove(raise-hand) */ getLocalParticipantRaisedHand
|
30680
|
-
], (displayName, dominantRemoteParticipant, localVideoStreamInfo,
|
30681
|
-
/* @conditional-compile-remove(raise-hand) */ raisedHand) => {
|
30803
|
+
const localAndRemotePIPSelector = reselect__namespace.createSelector([getDisplayName, dominantRemoteParticipantSelector, localVideoSelector, getLocalParticipantRaisedHand], (displayName, dominantRemoteParticipant, localVideoStreamInfo, raisedHand) => {
|
30682
30804
|
return {
|
30683
30805
|
localParticipant: {
|
30684
30806
|
displayName,
|
30685
30807
|
videoStream: localVideoStreamInfo,
|
30686
|
-
/* @conditional-compile-remove(raise-hand) */
|
30687
30808
|
raisedHand: raisedHand
|
30688
30809
|
},
|
30689
30810
|
dominantRemoteParticipant
|
@@ -34964,7 +35085,6 @@ class AzureCommunicationCallAdapter {
|
|
34964
35085
|
this.startCall.bind(this);
|
34965
35086
|
this.startScreenShare.bind(this);
|
34966
35087
|
this.stopScreenShare.bind(this);
|
34967
|
-
/* @conditional-compile-remove(raise-hand) */
|
34968
35088
|
this.raiseHand.bind(this);
|
34969
35089
|
/* @conditional-compile-remove(reaction) */
|
34970
35090
|
this.onReactionClick.bind(this);
|
@@ -35277,7 +35397,6 @@ class AzureCommunicationCallAdapter {
|
|
35277
35397
|
}));
|
35278
35398
|
});
|
35279
35399
|
}
|
35280
|
-
/* @conditional-compile-remove(raise-hand) */
|
35281
35400
|
raiseHand() {
|
35282
35401
|
return __awaiter$5(this, void 0, void 0, function* () {
|
35283
35402
|
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
@@ -35285,7 +35404,6 @@ class AzureCommunicationCallAdapter {
|
|
35285
35404
|
}));
|
35286
35405
|
});
|
35287
35406
|
}
|
35288
|
-
/* @conditional-compile-remove(raise-hand) */
|
35289
35407
|
lowerHand() {
|
35290
35408
|
return __awaiter$5(this, void 0, void 0, function* () {
|
35291
35409
|
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$5(this, void 0, void 0, function* () {
|
@@ -35405,8 +35523,8 @@ class AzureCommunicationCallAdapter {
|
|
35405
35523
|
}
|
35406
35524
|
/* @conditional-compile-remove(PSTN-calls) */
|
35407
35525
|
holdCall() {
|
35408
|
-
var _a, _b;
|
35409
35526
|
return __awaiter$5(this, void 0, void 0, function* () {
|
35527
|
+
var _a, _b;
|
35410
35528
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) !== 'LocalHold') {
|
35411
35529
|
if ((_b = this.call) === null || _b === void 0 ? void 0 : _b.isLocalVideoStarted) {
|
35412
35530
|
this.stopCamera().then(() => {
|
@@ -35421,8 +35539,8 @@ class AzureCommunicationCallAdapter {
|
|
35421
35539
|
}
|
35422
35540
|
/* @conditional-compile-remove(PSTN-calls) */
|
35423
35541
|
resumeCall() {
|
35424
|
-
var _a;
|
35425
35542
|
return __awaiter$5(this, void 0, void 0, function* () {
|
35543
|
+
var _a;
|
35426
35544
|
if (((_a = this.call) === null || _a === void 0 ? void 0 : _a.state) === 'LocalHold') {
|
35427
35545
|
this.handlers.onToggleHold().then(() => {
|
35428
35546
|
var _a;
|
@@ -35749,9 +35867,9 @@ function createAzureCommunicationCallAdapter(args) {
|
|
35749
35867
|
*
|
35750
35868
|
* @internal
|
35751
35869
|
*/
|
35752
|
-
const _createAzureCommunicationCallAdapterInner = ({ userId, displayName, credential, locator, targetCallees,
|
35870
|
+
const _createAzureCommunicationCallAdapterInner = (_a) => __awaiter$5(void 0, [_a], void 0, function* ({ userId, displayName, credential, locator, targetCallees,
|
35753
35871
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
35754
|
-
/* @conditional-compile-remove(video-background-effects) */ options, telemetryImplementationHint = 'Call' })
|
35872
|
+
/* @conditional-compile-remove(video-background-effects) */ options, telemetryImplementationHint = 'Call' }) {
|
35755
35873
|
if (!_isValidIdentifier(userId)) {
|
35756
35874
|
throw new Error('Invalid identifier. Please provide valid identifier object.');
|
35757
35875
|
}
|
@@ -35778,7 +35896,7 @@ const _createAzureCommunicationCallAdapterInner = ({ userId, displayName, creden
|
|
35778
35896
|
/**
|
35779
35897
|
* @beta
|
35780
35898
|
*/
|
35781
|
-
const createTeamsCallAdapter = (
|
35899
|
+
const createTeamsCallAdapter = (_b) => __awaiter$5(void 0, [_b], void 0, function* ({ userId, credential, locator, options }) {
|
35782
35900
|
if (communicationCommon.isCommunicationUserIdentifier(userId)) {
|
35783
35901
|
throw new Error('Communication User identifier is not supported by TeamsCallAdapter, please use our AzureCommunicationCallAdapter.');
|
35784
35902
|
}
|
@@ -36164,9 +36282,7 @@ class CallWithChatBackedCallAdapter {
|
|
36164
36282
|
this.unmute = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.unmute(); });
|
36165
36283
|
this.startScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.startScreenShare(); });
|
36166
36284
|
this.stopScreenShare = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.stopScreenShare(); });
|
36167
|
-
/* @conditional-compile-remove(raise-hand) */
|
36168
36285
|
this.raiseHand = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.raiseHand(); });
|
36169
|
-
/* @conditional-compile-remove(raise-hand) */
|
36170
36286
|
this.lowerHand = () => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.lowerHand(); });
|
36171
36287
|
/* @conditional-compile-remove(reaction) */
|
36172
36288
|
this.onReactionClick = (reaction) => __awaiter$4(this, void 0, void 0, function* () { return yield this.callWithChatAdapter.onReactionClick(reaction); });
|
@@ -36690,7 +36806,6 @@ const CallWithChatScreen = (props) => {
|
|
36690
36806
|
const callControlOptionsFromProps = React.useMemo(() => (Object.assign({}, (typeof props.callControls === 'object' ? props.callControls : {}))), [props.callControls]);
|
36691
36807
|
const injectedCustomButtonsFromProps = React.useMemo(() => {
|
36692
36808
|
var _a;
|
36693
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
36694
36809
|
return [...((_a = callControlOptionsFromProps.onFetchCustomButtonProps) !== null && _a !== void 0 ? _a : [])];
|
36695
36810
|
}, [callControlOptionsFromProps]);
|
36696
36811
|
const callCompositeOptions = React.useMemo(() => ({
|
@@ -36698,7 +36813,6 @@ const CallWithChatScreen = (props) => {
|
|
36698
36813
|
? false
|
36699
36814
|
: Object.assign(Object.assign({}, callControlOptionsFromProps), { onFetchCustomButtonProps: [
|
36700
36815
|
...(showChatButton ? [customChatButton] : []),
|
36701
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
36702
36816
|
...injectedCustomButtonsFromProps
|
36703
36817
|
], legacyControlBarExperience: false }),
|
36704
36818
|
/* @conditional-compile-remove(call-readiness) */
|
@@ -37037,9 +37151,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
37037
37151
|
this.unmute.bind(this);
|
37038
37152
|
this.startScreenShare.bind(this);
|
37039
37153
|
this.stopScreenShare.bind(this);
|
37040
|
-
/* @conditional-compile-remove(raise-hand) */
|
37041
37154
|
this.raiseHand.bind(this);
|
37042
|
-
/* @conditional-compile-remove(raise-hand) */
|
37043
37155
|
this.lowerHand.bind(this);
|
37044
37156
|
/* @conditional-compile-remove(reaction) */
|
37045
37157
|
this.onReactionClick.bind(this);
|
@@ -37234,14 +37346,12 @@ class AzureCommunicationCallWithChatAdapter {
|
|
37234
37346
|
yield this.callAdapter.stopScreenShare();
|
37235
37347
|
});
|
37236
37348
|
}
|
37237
|
-
/* @conditional-compile-remove(raise-hand) */
|
37238
37349
|
/** Raise hand for local user. */
|
37239
37350
|
raiseHand() {
|
37240
37351
|
return __awaiter$2(this, void 0, void 0, function* () {
|
37241
37352
|
yield this.callAdapter.raiseHand();
|
37242
37353
|
});
|
37243
37354
|
}
|
37244
|
-
/* @conditional-compile-remove(raise-hand) */
|
37245
37355
|
/** Lower hand for local user. */
|
37246
37356
|
lowerHand() {
|
37247
37357
|
return __awaiter$2(this, void 0, void 0, function* () {
|
@@ -37604,9 +37714,9 @@ class AzureCommunicationCallWithChatAdapter {
|
|
37604
37714
|
*
|
37605
37715
|
* @public
|
37606
37716
|
*/
|
37607
|
-
const createAzureCommunicationCallWithChatAdapter = ({ userId, displayName, credential, endpoint, locator,
|
37717
|
+
const createAzureCommunicationCallWithChatAdapter = (_a) => __awaiter$2(void 0, [_a], void 0, function* ({ userId, displayName, credential, endpoint, locator,
|
37608
37718
|
/* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,
|
37609
|
-
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions })
|
37719
|
+
/* @conditional-compile-remove(video-background-effects) */ callAdapterOptions }) {
|
37610
37720
|
const callAdapterLocator = isTeamsMeetingLinkLocator(locator) ? locator : locator.callLocator;
|
37611
37721
|
const createCallAdapterPromise = _createAzureCommunicationCallAdapterInner({
|
37612
37722
|
userId,
|
@@ -37750,9 +37860,9 @@ beforeDispose) => {
|
|
37750
37860
|
*
|
37751
37861
|
* @public
|
37752
37862
|
*/
|
37753
|
-
const createAzureCommunicationCallWithChatAdapterFromClients = ({ callClient, callAgent, callLocator, chatClient, chatThreadClient,
|
37863
|
+
const createAzureCommunicationCallWithChatAdapterFromClients = (_b) => __awaiter$2(void 0, [_b], void 0, function* ({ callClient, callAgent, callLocator, chatClient, chatThreadClient,
|
37754
37864
|
/* @conditional-compile-remove(video-background-effects) */
|
37755
|
-
callAdapterOptions })
|
37865
|
+
callAdapterOptions }) {
|
37756
37866
|
const createCallAdapterPromise = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, callLocator,
|
37757
37867
|
/* @conditional-compile-remove(video-background-effects) */
|
37758
37868
|
callAdapterOptions);
|
@@ -38319,4 +38429,4 @@ exports.useTeamsCall = useTeamsCall;
|
|
38319
38429
|
exports.useTeamsCallAdapter = useTeamsCallAdapter;
|
38320
38430
|
exports.useTeamsCallAgent = useTeamsCallAgent;
|
38321
38431
|
exports.useTheme = useTheme;
|
38322
|
-
//# sourceMappingURL=index-
|
38432
|
+
//# sourceMappingURL=index-DyaTe_Bz.js.map
|