@azure/communication-react 1.16.0-alpha-202404191930 → 1.16.0-alpha-202404230013
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 +141 -78
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-4y1CWxBv.js → ChatMessageComponentAsRichTextEditBox-DOJvvifs.js} +3 -3
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-4y1CWxBv.js.map → ChatMessageComponentAsRichTextEditBox-DOJvvifs.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-B-wg-pZ5.js → index-C_f2xMbE.js} +300 -380
- package/dist/dist-cjs/communication-react/index-C_f2xMbE.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 -7
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +5 -32
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -8
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js +0 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +22 -24
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +0 -2
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -4
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -2
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/AttachmentCard.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/AttachmentCard.js +2 -2
- package/dist/dist-esm/react-components/src/components/AttachmentCard.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.d.ts +3 -4
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js +2 -2
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +6 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +2 -2
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js +8 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +2 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +20 -13
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +4 -4
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/SendBox.js +20 -14
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +6 -6
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +0 -4
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +7 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -5
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/index.js +0 -4
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +7 -3
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +0 -4
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +0 -7
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +6 -6
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.js +0 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +0 -6
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/themes.js +4 -2
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.d.ts +48 -24
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +4 -19
- 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/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +4 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +20 -18
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +17 -11
- 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 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +27 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.d.ts +14 -13
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js +30 -21
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +5 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +30 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +10 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +10 -10
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +7 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.d.ts +5 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +2 -27
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +0 -20
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +0 -13
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +4 -15
- 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 +1 -17
- 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/CaptionLanguageSettingsDrawer.js +0 -9
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +0 -23
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js +0 -9
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -1
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/index-B-wg-pZ5.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.d.ts +0 -6
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +0 -11
- package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +0 -1
@@ -176,7 +176,7 @@ function getDefaultExportFromCjs (x) {
|
|
176
176
|
// Copyright (c) Microsoft Corporation.
|
177
177
|
// Licensed under the MIT License.
|
178
178
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
179
|
-
var telemetryVersion = '1.16.0-alpha-
|
179
|
+
var telemetryVersion = '1.16.0-alpha-202404230013';
|
180
180
|
|
181
181
|
|
182
182
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -484,43 +484,36 @@ const getParticipantCount = (state, props) => {
|
|
484
484
|
/* @conditional-compile-remove(total-participant-count) */
|
485
485
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.totalParticipantCount;
|
486
486
|
};
|
487
|
-
/* @conditional-compile-remove(close-captions) */
|
488
487
|
/** @private */
|
489
488
|
const getCaptions = (state, props) => {
|
490
489
|
var _a;
|
491
490
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.captions;
|
492
491
|
};
|
493
|
-
/* @conditional-compile-remove(close-captions) */
|
494
492
|
/** @private */
|
495
493
|
const getCaptionsStatus$1 = (state, props) => {
|
496
494
|
var _a;
|
497
495
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.isCaptionsFeatureActive;
|
498
496
|
};
|
499
|
-
/* @conditional-compile-remove(close-captions) */
|
500
497
|
/** @private */
|
501
498
|
const getStartCaptionsInProgress = (state, props) => {
|
502
499
|
var _a;
|
503
500
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.startCaptionsInProgress;
|
504
501
|
};
|
505
|
-
/* @conditional-compile-remove(close-captions) */
|
506
502
|
/** @private */
|
507
503
|
const getCurrentCaptionLanguage = (state, props) => {
|
508
504
|
var _a;
|
509
505
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentCaptionLanguage;
|
510
506
|
};
|
511
|
-
/* @conditional-compile-remove(close-captions) */
|
512
507
|
/** @private */
|
513
508
|
const getCurrentSpokenLanguage = (state, props) => {
|
514
509
|
var _a;
|
515
510
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentSpokenLanguage;
|
516
511
|
};
|
517
|
-
/* @conditional-compile-remove(close-captions) */
|
518
512
|
/** @private */
|
519
513
|
const getSupportedCaptionLanguages = (state, props) => {
|
520
514
|
var _a;
|
521
515
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.supportedCaptionLanguages;
|
522
516
|
};
|
523
|
-
/* @conditional-compile-remove(close-captions) */
|
524
517
|
/** @private */
|
525
518
|
const getSupportedSpokenLanguages = (state, props) => {
|
526
519
|
var _a;
|
@@ -1101,22 +1094,18 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1101
1094
|
return (createEffect && stream.feature(communicationCalling.Features.VideoEffects).startEffects(createEffect(backgroundReplacementConfig)));
|
1102
1095
|
}
|
1103
1096
|
});
|
1104
|
-
/* @conditional-compile-remove(close-captions) */
|
1105
1097
|
const onStartCaptions = (options) => __awaiter$R(void 0, void 0, void 0, function* () {
|
1106
1098
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1107
1099
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.startCaptions(options));
|
1108
1100
|
});
|
1109
|
-
/* @conditional-compile-remove(close-captions) */
|
1110
1101
|
const onStopCaptions = () => __awaiter$R(void 0, void 0, void 0, function* () {
|
1111
1102
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1112
1103
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.stopCaptions());
|
1113
1104
|
});
|
1114
|
-
/* @conditional-compile-remove(close-captions) */
|
1115
1105
|
const onSetSpokenLanguage = (language) => __awaiter$R(void 0, void 0, void 0, function* () {
|
1116
1106
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1117
1107
|
yield (captionsFeature === null || captionsFeature === void 0 ? void 0 : captionsFeature.setSpokenLanguage(language));
|
1118
1108
|
});
|
1119
|
-
/* @conditional-compile-remove(close-captions) */
|
1120
1109
|
const onSetCaptionLanguage = (language) => __awaiter$R(void 0, void 0, void 0, function* () {
|
1121
1110
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(communicationCalling.Features.Captions).captions;
|
1122
1111
|
yield captionsFeature.setCaptionLanguage(language);
|
@@ -1198,13 +1187,9 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1198
1187
|
onRemoveVideoBackgroundEffects,
|
1199
1188
|
onBlurVideoBackground,
|
1200
1189
|
onReplaceVideoBackground,
|
1201
|
-
/* @conditional-compile-remove(close-captions) */
|
1202
1190
|
onStartCaptions,
|
1203
|
-
/* @conditional-compile-remove(close-captions) */
|
1204
1191
|
onStopCaptions,
|
1205
|
-
/* @conditional-compile-remove(close-captions) */
|
1206
1192
|
onSetCaptionLanguage,
|
1207
|
-
/* @conditional-compile-remove(close-captions) */
|
1208
1193
|
onSetSpokenLanguage,
|
1209
1194
|
/* @conditional-compile-remove(end-of-call-survey) */
|
1210
1195
|
onSubmitSurvey,
|
@@ -1332,8 +1317,6 @@ const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, dev
|
|
1332
1317
|
|
1333
1318
|
// Copyright (c) Microsoft Corporation.
|
1334
1319
|
// Licensed under the MIT License.
|
1335
|
-
/* @conditional-compile-remove(close-captions) */
|
1336
|
-
/* @conditional-compile-remove(close-captions) */
|
1337
1320
|
/**
|
1338
1321
|
* Selector for {@link StartCaptionsButton} component.
|
1339
1322
|
*
|
@@ -1346,7 +1329,6 @@ const _startCaptionsButtonSelector = reselect__namespace.createSelector([getCapt
|
|
1346
1329
|
currentSpokenLanguage: currentSpokenLanguage !== null && currentSpokenLanguage !== void 0 ? currentSpokenLanguage : 'en-us'
|
1347
1330
|
};
|
1348
1331
|
});
|
1349
|
-
/* @conditional-compile-remove(close-captions) */
|
1350
1332
|
/**
|
1351
1333
|
* Selector for Changing caption language and spoken language
|
1352
1334
|
*
|
@@ -1367,34 +1349,19 @@ const _captionSettingsSelector = reselect__namespace.createSelector([
|
|
1367
1349
|
isCaptionsFeatureActive: isCaptionsFeatureActive !== null && isCaptionsFeatureActive !== void 0 ? isCaptionsFeatureActive : false
|
1368
1350
|
};
|
1369
1351
|
});
|
1370
|
-
/* @conditional-compile-remove(close-captions) */
|
1371
1352
|
/**
|
1372
1353
|
* Selector for {@link CaptionsBanner} component.
|
1373
1354
|
*
|
1374
1355
|
* @internal
|
1375
1356
|
*/
|
1376
1357
|
const _captionsBannerSelector = reselect__namespace.createSelector([getCaptions, getCaptionsStatus$1, getStartCaptionsInProgress], (captions, isCaptionsFeatureActive, startCaptionsInProgress) => {
|
1377
|
-
|
1378
|
-
|
1379
|
-
// This will give customers a stable captions experience when others talking over the dominant speaker
|
1380
|
-
// First turn all partial captions that are older than 5 seconds to final
|
1381
|
-
captions === null || captions === void 0 ? void 0 : captions.filter((captions) => captions.resultType === 'Partial').forEach((c) => {
|
1382
|
-
// if c is created more than 5 seconds ago, make it final
|
1383
|
-
if (c.timestamp.getTime() + 5000 < Date.now()) {
|
1384
|
-
// make it final
|
1385
|
-
c.resultType = 'Final';
|
1386
|
-
}
|
1387
|
-
});
|
1388
|
-
const captionsToRender = captions === null || captions === void 0 ? void 0 : captions.filter((captions) => captions.resultType === 'Final');
|
1389
|
-
const firstPartialCaptions = captions === null || captions === void 0 ? void 0 : captions.filter((captions) => captions.resultType === 'Partial').sort(captionsComparator)[0];
|
1390
|
-
firstPartialCaptions && (captionsToRender === null || captionsToRender === void 0 ? void 0 : captionsToRender.push(firstPartialCaptions));
|
1391
|
-
const captionsInfo = captionsToRender === null || captionsToRender === void 0 ? void 0 : captionsToRender.map((c) => {
|
1392
|
-
var _a, _b;
|
1358
|
+
const captionsInfo = captions === null || captions === void 0 ? void 0 : captions.map((c, index) => {
|
1359
|
+
var _a, _b, _c;
|
1393
1360
|
const userId = getCaptionsSpeakerIdentifier(c);
|
1394
1361
|
return {
|
1395
|
-
id: c.
|
1396
|
-
displayName: (
|
1397
|
-
captionText: (
|
1362
|
+
id: (_a = c.speaker.displayName) !== null && _a !== void 0 ? _a : 'Unnamed Participant' + index,
|
1363
|
+
displayName: (_b = c.speaker.displayName) !== null && _b !== void 0 ? _b : 'Unnamed Participant',
|
1364
|
+
captionText: (_c = c.captionText) !== null && _c !== void 0 ? _c : '',
|
1398
1365
|
userId
|
1399
1366
|
};
|
1400
1367
|
});
|
@@ -1404,12 +1371,6 @@ const _captionsBannerSelector = reselect__namespace.createSelector([getCaptions,
|
|
1404
1371
|
startCaptionsInProgress: startCaptionsInProgress !== null && startCaptionsInProgress !== void 0 ? startCaptionsInProgress : false
|
1405
1372
|
};
|
1406
1373
|
});
|
1407
|
-
/* @conditional-compile-remove(close-captions) */
|
1408
|
-
const captionsComparator = (captionsA, captionsB) => {
|
1409
|
-
return (captionsA.timestamp.getTime() - captionsB.timestamp.getTime() ||
|
1410
|
-
getCaptionsSpeakerIdentifier(captionsA).localeCompare(getCaptionsSpeakerIdentifier(captionsB)));
|
1411
|
-
};
|
1412
|
-
/* @conditional-compile-remove(close-captions) */
|
1413
1374
|
const getCaptionsSpeakerIdentifier = (captions) => {
|
1414
1375
|
return captions.speaker.identifier ? toFlatCommunicationIdentifier(captions.speaker.identifier) : '';
|
1415
1376
|
};
|
@@ -1862,7 +1823,6 @@ function convertSdkCallToDeclarativeCall(call) {
|
|
1862
1823
|
startTime: new Date(),
|
1863
1824
|
endTime: undefined,
|
1864
1825
|
role: call.role,
|
1865
|
-
/* @conditional-compile-remove(close-captions) */
|
1866
1826
|
captionsFeature: {
|
1867
1827
|
captions: [],
|
1868
1828
|
supportedSpokenLanguages: [],
|
@@ -1908,7 +1868,6 @@ function convertFromSDKToDeclarativeVideoStreamRendererView(view) {
|
|
1908
1868
|
target: view.target
|
1909
1869
|
};
|
1910
1870
|
}
|
1911
|
-
/* @conditional-compile-remove(close-captions) */
|
1912
1871
|
/**
|
1913
1872
|
* @private
|
1914
1873
|
*/
|
@@ -2066,9 +2025,7 @@ let CallContext$2 = class CallContext {
|
|
2066
2025
|
/* @conditional-compile-remove(total-participant-count) */
|
2067
2026
|
existingCall.totalParticipantCount = call.totalParticipantCount;
|
2068
2027
|
// We don't update the startTime and endTime if we are updating an existing active call
|
2069
|
-
/* @conditional-compile-remove(close-captions) */
|
2070
2028
|
existingCall.captionsFeature.currentSpokenLanguage = call.captionsFeature.currentSpokenLanguage;
|
2071
|
-
/* @conditional-compile-remove(close-captions) */
|
2072
2029
|
existingCall.captionsFeature.currentCaptionLanguage = call.captionsFeature.currentCaptionLanguage;
|
2073
2030
|
/* @conditional-compile-remove(meeting-id) */
|
2074
2031
|
existingCall.info = call.info;
|
@@ -2713,28 +2670,36 @@ let CallContext$2 = class CallContext {
|
|
2713
2670
|
this._atomicId++;
|
2714
2671
|
return id;
|
2715
2672
|
}
|
2716
|
-
/* @conditional-compile-remove(close-captions) */
|
2717
2673
|
processNewCaption(captions, newCaption) {
|
2718
|
-
//
|
2719
|
-
|
2720
|
-
|
2721
|
-
|
2722
|
-
|
2723
|
-
|
2724
|
-
|
2725
|
-
|
2726
|
-
|
2727
|
-
|
2728
|
-
|
2674
|
+
// time stamp when new caption comes in
|
2675
|
+
newCaption.timestamp = new Date();
|
2676
|
+
// if this is the first caption, push it in
|
2677
|
+
if (captions.length === 0) {
|
2678
|
+
captions.push(newCaption);
|
2679
|
+
}
|
2680
|
+
// if the last caption is final, then push the new one in
|
2681
|
+
else if (captions[captions.length - 1].resultType === 'Final') {
|
2682
|
+
captions.push(newCaption);
|
2683
|
+
}
|
2684
|
+
// if the last caption is Partial, then check if the speaker is the same as the new caption, if so, update the last caption
|
2685
|
+
else {
|
2686
|
+
if (toFlatCommunicationIdentifier(captions[captions.length - 1].speaker.identifier) === toFlatCommunicationIdentifier(newCaption.speaker.identifier)) {
|
2687
|
+
captions[captions.length - 1] = newCaption;
|
2688
|
+
}
|
2689
|
+
// if different speaker, ignore the interjector until the current speaker finishes
|
2690
|
+
// edge case: if we dont receive the final caption from the current speaker for 5 secs, we turn the current speaker caption to final and push in the new interjector
|
2691
|
+
else {
|
2692
|
+
if (Date.now() - captions[captions.length - 1].timestamp.getTime() > 5000) {
|
2693
|
+
captions[captions.length - 1].resultType = 'Final';
|
2694
|
+
captions.push(newCaption);
|
2695
|
+
}
|
2729
2696
|
}
|
2730
2697
|
}
|
2731
|
-
captions.push(newCaption);
|
2732
2698
|
// If the array length exceeds 50, remove the oldest caption
|
2733
2699
|
if (captions.length > 50) {
|
2734
2700
|
captions.shift();
|
2735
2701
|
}
|
2736
2702
|
}
|
2737
|
-
/* @conditional-compile-remove(close-captions) */
|
2738
2703
|
addTeamsCaption(callId, caption) {
|
2739
2704
|
this.modifyState((draft) => {
|
2740
2705
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2766,7 +2731,6 @@ let CallContext$2 = class CallContext {
|
|
2766
2731
|
}
|
2767
2732
|
});
|
2768
2733
|
}
|
2769
|
-
/* @conditional-compile-remove(close-captions) */
|
2770
2734
|
clearCaptions(callId) {
|
2771
2735
|
this.modifyState((draft) => {
|
2772
2736
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2775,7 +2739,6 @@ let CallContext$2 = class CallContext {
|
|
2775
2739
|
}
|
2776
2740
|
});
|
2777
2741
|
}
|
2778
|
-
/* @conditional-compile-remove(close-captions) */
|
2779
2742
|
setIsCaptionActive(callId, isCaptionsActive) {
|
2780
2743
|
this.modifyState((draft) => {
|
2781
2744
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2784,7 +2747,6 @@ let CallContext$2 = class CallContext {
|
|
2784
2747
|
}
|
2785
2748
|
});
|
2786
2749
|
}
|
2787
|
-
/* @conditional-compile-remove(close-captions) */
|
2788
2750
|
setStartCaptionsInProgress(callId, startCaptionsInProgress) {
|
2789
2751
|
this.modifyState((draft) => {
|
2790
2752
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2793,7 +2755,6 @@ let CallContext$2 = class CallContext {
|
|
2793
2755
|
}
|
2794
2756
|
});
|
2795
2757
|
}
|
2796
|
-
/* @conditional-compile-remove(close-captions) */
|
2797
2758
|
setSelectedSpokenLanguage(callId, spokenLanguage) {
|
2798
2759
|
this.modifyState((draft) => {
|
2799
2760
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2802,7 +2763,6 @@ let CallContext$2 = class CallContext {
|
|
2802
2763
|
}
|
2803
2764
|
});
|
2804
2765
|
}
|
2805
|
-
/* @conditional-compile-remove(close-captions) */
|
2806
2766
|
setSelectedCaptionLanguage(callId, captionLanguage) {
|
2807
2767
|
this.modifyState((draft) => {
|
2808
2768
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2811,7 +2771,6 @@ let CallContext$2 = class CallContext {
|
|
2811
2771
|
}
|
2812
2772
|
});
|
2813
2773
|
}
|
2814
|
-
/* @conditional-compile-remove(close-captions) */
|
2815
2774
|
setAvailableCaptionLanguages(callId, captionLanguages) {
|
2816
2775
|
this.modifyState((draft) => {
|
2817
2776
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2820,7 +2779,6 @@ let CallContext$2 = class CallContext {
|
|
2820
2779
|
}
|
2821
2780
|
});
|
2822
2781
|
}
|
2823
|
-
/* @conditional-compile-remove(close-captions) */
|
2824
2782
|
setAvailableSpokenLanguages(callId, spokenLanguages) {
|
2825
2783
|
this.modifyState((draft) => {
|
2826
2784
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -2913,7 +2871,6 @@ function clearParticipantReactionState(callContext, callId, participantKey) {
|
|
2913
2871
|
|
2914
2872
|
// Copyright (c) Microsoft Corporation.
|
2915
2873
|
// Licensed under the MIT License.
|
2916
|
-
/* @conditional-compile-remove(close-captions) */
|
2917
2874
|
/**
|
2918
2875
|
* @private
|
2919
2876
|
*/
|
@@ -4195,7 +4152,6 @@ class CallSubscriber {
|
|
4195
4152
|
constructor(call, context, internalContext) {
|
4196
4153
|
this.subscribe = () => {
|
4197
4154
|
this._call.on('stateChanged', this.stateChanged);
|
4198
|
-
/* @conditional-compile-remove(close-captions) */
|
4199
4155
|
this._call.on('stateChanged', this.initCaptionSubscriber);
|
4200
4156
|
/* @conditional-compile-remove(local-recording-notification) */
|
4201
4157
|
this._call.on('stateChanged', this.initLocalRecordingNotificationSubscriber);
|
@@ -4221,7 +4177,6 @@ class CallSubscriber {
|
|
4221
4177
|
this.unsubscribe = () => {
|
4222
4178
|
var _a, _b, _c, _d;
|
4223
4179
|
this._call.off('stateChanged', this.stateChanged);
|
4224
|
-
/* @conditional-compile-remove(close-captions) */
|
4225
4180
|
this._call.off('stateChanged', this.initCaptionSubscriber);
|
4226
4181
|
/* @conditional-compile-remove(local-recording-notification) */
|
4227
4182
|
this._call.off('stateChanged', this.initLocalRecordingNotificationSubscriber);
|
@@ -4262,7 +4217,6 @@ class CallSubscriber {
|
|
4262
4217
|
this.stateChanged = () => {
|
4263
4218
|
this._context.setCallState(this._callIdRef.callId, this._call.state);
|
4264
4219
|
};
|
4265
|
-
/* @conditional-compile-remove(close-captions) */
|
4266
4220
|
this.initCaptionSubscriber = () => {
|
4267
4221
|
// subscribe to captions here so that we don't call captions when call is not initialized
|
4268
4222
|
if (this._call.state === 'Connected' && !this._CaptionsFeatureSubscriber) {
|
@@ -4734,7 +4688,6 @@ class ProxyCallCommon {
|
|
4734
4688
|
case 'feature': {
|
4735
4689
|
// these are mini version of Proxy object - if it grows too big, a real Proxy object should be used.
|
4736
4690
|
return this._context.withErrorTeedToState((...args) => {
|
4737
|
-
/* @conditional-compile-remove(close-captions) */
|
4738
4691
|
if (args[0] === communicationCalling.Features.Captions) {
|
4739
4692
|
const captionsFeature = target.feature(communicationCalling.Features.Captions).captions;
|
4740
4693
|
let proxyFeature;
|
@@ -4765,7 +4718,6 @@ class ProxyCallCommon {
|
|
4765
4718
|
}
|
4766
4719
|
}
|
4767
4720
|
}
|
4768
|
-
/* @conditional-compile-remove(close-captions) */
|
4769
4721
|
/**
|
4770
4722
|
* @private
|
4771
4723
|
*/
|
@@ -6526,7 +6478,8 @@ const lightTheme = {
|
|
6526
6478
|
callRedDark: '#8b2c3d',
|
6527
6479
|
callRedDarker: '#772a38',
|
6528
6480
|
iconWhite: '#ffffff',
|
6529
|
-
raiseHandGold: '#eaa300'
|
6481
|
+
raiseHandGold: '#eaa300',
|
6482
|
+
videoTileLabelBackgroundLight: 'rgba(255,255,255,0.8)'
|
6530
6483
|
},
|
6531
6484
|
semanticColors: {
|
6532
6485
|
errorText: '#a80000'
|
@@ -6568,7 +6521,8 @@ const darkTheme = {
|
|
6568
6521
|
callRedDark: '#a42e43',
|
6569
6522
|
callRedDarker: '#8b2c3d',
|
6570
6523
|
iconWhite: '#ffffff',
|
6571
|
-
raiseHandGold: '#eaa300'
|
6524
|
+
raiseHandGold: '#eaa300',
|
6525
|
+
videoTileLabelBackgroundLight: 'rgba(37,36,35,0.8)'
|
6572
6526
|
},
|
6573
6527
|
semanticColors: {
|
6574
6528
|
errorText: '#f1707b'
|
@@ -6847,15 +6801,10 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
6847
6801
|
VerticalGalleryRightButton: React.createElement(GalleryRightButton, null),
|
6848
6802
|
ControlButtonVideoEffectsOption: React.createElement(reactIcons.VideoBackgroundEffect20Regular, null),
|
6849
6803
|
ConfigurationScreenVideoEffectsButton: React.createElement(reactIcons.VideoBackgroundEffect20Filled, null),
|
6850
|
-
/* @conditional-compile-remove(close-captions) */
|
6851
6804
|
CaptionsIcon: React.createElement(reactIcons.ClosedCaption20Regular, null),
|
6852
|
-
/* @conditional-compile-remove(close-captions) */
|
6853
6805
|
CaptionsOffIcon: React.createElement(reactIcons.ClosedCaptionOff20Regular, null),
|
6854
|
-
/* @conditional-compile-remove(close-captions) */
|
6855
6806
|
CaptionsSettingsIcon: React.createElement(reactIcons.Settings20Regular, null),
|
6856
|
-
/* @conditional-compile-remove(close-captions) */
|
6857
6807
|
ChangeSpokenLanguageIcon: React.createElement(reactIcons.PersonVoice20Regular, null),
|
6858
|
-
/* @conditional-compile-remove(close-captions) */
|
6859
6808
|
ChangeCaptionLanguageIcon: React.createElement(reactIcons.Translate20Regular, null),
|
6860
6809
|
ContextMenuCameraIcon: React.createElement(reactIcons.Video20Regular, null),
|
6861
6810
|
ContextMenuMicIcon: React.createElement(reactIcons.Mic20Regular, null),
|
@@ -8813,15 +8762,15 @@ const SendBoxErrorBar = (props) => {
|
|
8813
8762
|
* @private
|
8814
8763
|
*/
|
8815
8764
|
const SendBoxErrors = (props) => {
|
8816
|
-
const {
|
8765
|
+
const { attachmentProgressError, attachmentUploadsPendingError } = props;
|
8817
8766
|
const errorToDisplay = React.useMemo(() => {
|
8818
|
-
if (
|
8819
|
-
return
|
8820
|
-
?
|
8767
|
+
if (attachmentProgressError && attachmentUploadsPendingError) {
|
8768
|
+
return attachmentProgressError.timestamp > attachmentUploadsPendingError.timestamp
|
8769
|
+
? attachmentProgressError
|
8821
8770
|
: attachmentUploadsPendingError;
|
8822
8771
|
}
|
8823
|
-
return
|
8824
|
-
}, [
|
8772
|
+
return attachmentProgressError || attachmentUploadsPendingError;
|
8773
|
+
}, [attachmentProgressError, attachmentUploadsPendingError]);
|
8825
8774
|
return React.createElement(SendBoxErrorBar, { error: errorToDisplay, dismissAfterMs: 10 * 1000 });
|
8826
8775
|
};
|
8827
8776
|
|
@@ -8884,8 +8833,8 @@ const _AttachmentCard = (props) => {
|
|
8884
8833
|
const { attachment, menuActions, onActionHandlerFailed } = props;
|
8885
8834
|
const attachmentCardStyles = useAttachmentCardStyles();
|
8886
8835
|
const progress = React.useMemo(() => {
|
8887
|
-
return attachment.progress;
|
8888
|
-
}, [attachment
|
8836
|
+
return 'progress' in attachment ? attachment.progress : undefined;
|
8837
|
+
}, [attachment]);
|
8889
8838
|
const isUploadComplete = React.useMemo(() => {
|
8890
8839
|
return progress !== undefined && progress > 0 && progress < 1;
|
8891
8840
|
}, [progress]);
|
@@ -8987,7 +8936,7 @@ const actionIconStyle = { height: '1rem' };
|
|
8987
8936
|
*/
|
8988
8937
|
const _AttachmentUploadCards = (props) => {
|
8989
8938
|
var _a;
|
8990
|
-
const attachments = props.
|
8939
|
+
const attachments = props.attachmentsWithProgress;
|
8991
8940
|
const localeStrings = useLocaleAttachmentCardStringsTrampoline();
|
8992
8941
|
const removeAttachmentButtonString = React.useMemo(() => () => {
|
8993
8942
|
var _a, _b;
|
@@ -8998,7 +8947,7 @@ const _AttachmentUploadCards = (props) => {
|
|
8998
8947
|
}
|
8999
8948
|
return (React.createElement(_AttachmentCardGroup, null, attachments &&
|
9000
8949
|
attachments
|
9001
|
-
.filter((attachment) => !attachment.
|
8950
|
+
.filter((attachment) => !attachment.error)
|
9002
8951
|
.map((attachment) => {
|
9003
8952
|
var _a, _b;
|
9004
8953
|
return (React.createElement(_AttachmentCard, { attachment: attachment, key: attachment.id, menuActions: [
|
@@ -9033,18 +8982,18 @@ const EMPTY_MESSAGE_REGEX = /^\s*$/;
|
|
9033
8982
|
/**
|
9034
8983
|
* @private
|
9035
8984
|
*/
|
9036
|
-
const hasIncompleteAttachmentUploads = (
|
9037
|
-
return !!((
|
9038
|
-
!
|
9039
|
-
.filter((attachmentUpload) => !attachmentUpload.
|
8985
|
+
const hasIncompleteAttachmentUploads = (attachmentsWithProgress) => {
|
8986
|
+
return !!((attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.length) &&
|
8987
|
+
!attachmentsWithProgress
|
8988
|
+
.filter((attachmentUpload) => !attachmentUpload.error)
|
9040
8989
|
.every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined));
|
9041
8990
|
};
|
9042
8991
|
/* @conditional-compile-remove(attachment-upload) */
|
9043
8992
|
/**
|
9044
8993
|
* @private
|
9045
8994
|
*/
|
9046
|
-
const hasCompletedAttachmentUploads = (
|
9047
|
-
return !!(
|
8995
|
+
const hasCompletedAttachmentUploads = (attachmentsWithProgress) => {
|
8996
|
+
return !!(attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.find((attachment) => !attachment.error));
|
9048
8997
|
};
|
9049
8998
|
/**
|
9050
8999
|
* @private
|
@@ -9436,7 +9385,7 @@ const SendBox = (props) => {
|
|
9436
9385
|
/* @conditional-compile-remove(mention) */
|
9437
9386
|
mentionLookupOptions,
|
9438
9387
|
/* @conditional-compile-remove(attachment-upload) */
|
9439
|
-
|
9388
|
+
attachmentsWithProgress } = props;
|
9440
9389
|
const theme = useTheme();
|
9441
9390
|
const localeStrings = useLocale$1().strings.sendBox;
|
9442
9391
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
@@ -9456,7 +9405,7 @@ const SendBox = (props) => {
|
|
9456
9405
|
/* @conditional-compile-remove(attachment-upload) */
|
9457
9406
|
setAttachmentUploadsPendingError(undefined);
|
9458
9407
|
/* @conditional-compile-remove(attachment-upload) */
|
9459
|
-
if (hasIncompleteAttachmentUploads(
|
9408
|
+
if (hasIncompleteAttachmentUploads(attachmentsWithProgress)) {
|
9460
9409
|
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
9461
9410
|
return;
|
9462
9411
|
}
|
@@ -9464,7 +9413,7 @@ const SendBox = (props) => {
|
|
9464
9413
|
// we don't want to send empty messages including spaces, newlines, tabs
|
9465
9414
|
// Message can be empty if there is a valid attachment upload
|
9466
9415
|
if (sanitizeText(message).length > 0 ||
|
9467
|
-
/* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads(
|
9416
|
+
/* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads(attachmentsWithProgress)) {
|
9468
9417
|
onSendMessage && onSendMessage(message);
|
9469
9418
|
setTextValue('');
|
9470
9419
|
}
|
@@ -9484,13 +9433,13 @@ const SendBox = (props) => {
|
|
9484
9433
|
const mergedSendIconStyle = React.useMemo(() => sendIconStyle({
|
9485
9434
|
theme,
|
9486
9435
|
hasText: !!textValue,
|
9487
|
-
/* @conditional-compile-remove(attachment-upload) */ hasAttachment: hasCompletedAttachmentUploads(
|
9436
|
+
/* @conditional-compile-remove(attachment-upload) */ hasAttachment: hasCompletedAttachmentUploads(attachmentsWithProgress),
|
9488
9437
|
hasErrorMessage: !!errorMessage,
|
9489
9438
|
customSendIconStyle: styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon
|
9490
9439
|
}), [
|
9491
9440
|
theme,
|
9492
9441
|
textValue,
|
9493
|
-
/* @conditional-compile-remove(attachment-upload) */
|
9442
|
+
/* @conditional-compile-remove(attachment-upload) */ attachmentsWithProgress,
|
9494
9443
|
errorMessage,
|
9495
9444
|
styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon
|
9496
9445
|
]);
|
@@ -9498,34 +9447,34 @@ const SendBox = (props) => {
|
|
9498
9447
|
// Ensure that errors are cleared when there are no attachments in sendBox
|
9499
9448
|
/* @conditional-compile-remove(attachment-upload) */
|
9500
9449
|
React.useEffect(() => {
|
9501
|
-
if (!(
|
9450
|
+
if (!(attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((upload) => !upload.error).length)) {
|
9502
9451
|
setAttachmentUploadsPendingError(undefined);
|
9503
9452
|
}
|
9504
|
-
}, [
|
9453
|
+
}, [attachmentsWithProgress]);
|
9505
9454
|
/* @conditional-compile-remove(attachment-upload) */
|
9506
9455
|
const sendBoxErrorsProps = React.useMemo(() => {
|
9507
9456
|
var _a;
|
9508
9457
|
return {
|
9509
9458
|
attachmentUploadsPendingError: attachmentUploadsPendingError,
|
9510
|
-
|
9459
|
+
attachmentProgressError: (_a = attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error
|
9511
9460
|
};
|
9512
|
-
}, [
|
9461
|
+
}, [attachmentsWithProgress, attachmentUploadsPendingError]);
|
9513
9462
|
/* @conditional-compile-remove(attachment-upload) */
|
9514
9463
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
9515
9464
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
9516
|
-
if (!(
|
9465
|
+
if (!(attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((upload) => !upload.error).length)) {
|
9517
9466
|
return null;
|
9518
9467
|
}
|
9519
9468
|
return props.onRenderAttachmentUploads ? (props.onRenderAttachmentUploads()) : (React.createElement(react.Stack, { className: attachmentUploadCardsStyles },
|
9520
9469
|
React.createElement(FluentV9ThemeProvider, { v8Theme: theme },
|
9521
|
-
React.createElement(_AttachmentUploadCards, {
|
9470
|
+
React.createElement(_AttachmentUploadCards, { attachmentsWithProgress: attachmentsWithProgress, onCancelAttachmentUpload: props.onCancelAttachmentUpload, strings: {
|
9522
9471
|
removeAttachment: (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.removeAttachment) !== null && _b !== void 0 ? _b : localeStrings.removeAttachment,
|
9523
9472
|
uploading: (_d = (_c = props.strings) === null || _c === void 0 ? void 0 : _c.uploading) !== null && _d !== void 0 ? _d : localeStrings.uploading,
|
9524
9473
|
uploadCompleted: (_f = (_e = props.strings) === null || _e === void 0 ? void 0 : _e.uploadCompleted) !== null && _f !== void 0 ? _f : localeStrings.uploadCompleted,
|
9525
9474
|
attachmentMoreMenu: (_h = (_g = props.strings) === null || _g === void 0 ? void 0 : _g.attachmentMoreMenu) !== null && _h !== void 0 ? _h : localeStrings.attachmentMoreMenu
|
9526
9475
|
} }))));
|
9527
9476
|
}, [
|
9528
|
-
|
9477
|
+
attachmentsWithProgress,
|
9529
9478
|
props,
|
9530
9479
|
theme,
|
9531
9480
|
localeStrings.removeAttachment,
|
@@ -9534,8 +9483,14 @@ const SendBox = (props) => {
|
|
9534
9483
|
localeStrings.attachmentMoreMenu
|
9535
9484
|
]);
|
9536
9485
|
return (React.createElement(react.Stack, { className: react.mergeStyles(sendBoxWrapperStyles, { overflow: 'visible' } // This is needed for the mention popup to be visible
|
9537
|
-
) },
|
9538
|
-
|
9486
|
+
) },
|
9487
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9488
|
+
React.createElement(SendBoxErrors, { attachmentProgressError: sendBoxErrorsProps.attachmentProgressError
|
9489
|
+
? {
|
9490
|
+
message: sendBoxErrorsProps.attachmentProgressError.message,
|
9491
|
+
timestamp: Date.now()
|
9492
|
+
}
|
9493
|
+
: undefined, attachmentUploadsPendingError: sendBoxErrorsProps.attachmentUploadsPendingError }),
|
9539
9494
|
React.createElement(react.Stack, { className: borderAndBoxShadowStyle({
|
9540
9495
|
theme,
|
9541
9496
|
hasErrorMessage: !!errorMessage,
|
@@ -10031,7 +9986,9 @@ const insertTableMenuCellButtonStyles = (theme) => {
|
|
10031
9986
|
border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`,
|
10032
9987
|
display: 'inline-block',
|
10033
9988
|
cursor: 'pointer',
|
10034
|
-
background: 'transparent'
|
9989
|
+
background: 'transparent',
|
9990
|
+
// include border into width value as the parent element has fixed width
|
9991
|
+
boxSizing: 'border-box'
|
10035
9992
|
};
|
10036
9993
|
};
|
10037
9994
|
/**
|
@@ -10056,9 +10013,11 @@ const insertTableMenuTablePane = react.mergeStyles({
|
|
10056
10013
|
const insertTableMenuFocusZone = (theme) => {
|
10057
10014
|
return react.mergeStyles({
|
10058
10015
|
lineHeight: '12px',
|
10059
|
-
width
|
10016
|
+
// fixed width is required to show columns in a grid correctly
|
10017
|
+
width: '5rem',
|
10060
10018
|
border: `solid 0.0625rem ${theme.palette.neutralTertiaryAlt}`,
|
10061
|
-
|
10019
|
+
// don't include border into width value as otherwise it may be broken when zoom value is changed
|
10020
|
+
boxSizing: 'content-box'
|
10062
10021
|
});
|
10063
10022
|
};
|
10064
10023
|
/**
|
@@ -10106,6 +10065,14 @@ const insertTable = (editor, columns, rows) => {
|
|
10106
10065
|
const vTable = new roosterjsEditorDom.VTable(table);
|
10107
10066
|
vTable.writeBack();
|
10108
10067
|
editor.insertNode(table);
|
10068
|
+
const nextElementAfterTable = table.nextElementSibling;
|
10069
|
+
// insert br only if there is no next element after the table
|
10070
|
+
if (nextElementAfterTable === null) {
|
10071
|
+
// insert br after the table
|
10072
|
+
// so users can easily input content after table
|
10073
|
+
editor.select(new roosterjsEditorDom.Position(table, roosterjsEditorTypesCompatible.CompatiblePositionType.After));
|
10074
|
+
editor.insertNode(document.createElement('br'));
|
10075
|
+
}
|
10109
10076
|
editor.runAsync((editor) => editor.select(new roosterjsEditorDom.Position(table, roosterjsEditorTypesCompatible.CompatiblePositionType.Begin).normalize()));
|
10110
10077
|
}, roosterjsEditorTypesCompatible.CompatibleChangeSource.Format, undefined /* canUndoByBackspace */, {
|
10111
10078
|
formatApiName: 'insertTable'
|
@@ -10632,7 +10599,8 @@ const focusAndUpdateContent = (editor, content) => {
|
|
10632
10599
|
editor.setContent(content);
|
10633
10600
|
// this is a recommended way (by RoosterJS team) to set focus at the end of the text
|
10634
10601
|
// RoosterJS v9 has this issue fixed and this code can be removed
|
10635
|
-
|
10602
|
+
// CompatibleContentPosition.DomEnd shouldn't be used here as it set focus after the editor div
|
10603
|
+
editor.insertContent('<span id="focus-position-span"></span>', { position: roosterjsEditorTypesCompatible.CompatibleContentPosition.End });
|
10636
10604
|
const elements = editor.queryElements('#focus-position-span');
|
10637
10605
|
if (elements.length > 0) {
|
10638
10606
|
const placeholder = editor.queryElements('#focus-position-span')[0];
|
@@ -10751,7 +10719,7 @@ const RichTextInputBoxComponent = (props) => {
|
|
10751
10719
|
const RichTextSendBoxErrors = (props) => {
|
10752
10720
|
const {
|
10753
10721
|
/* @conditional-compile-remove(attachment-upload) */
|
10754
|
-
|
10722
|
+
attachmentProgressError,
|
10755
10723
|
/* @conditional-compile-remove(attachment-upload) */
|
10756
10724
|
attachmentUploadsPendingError, systemMessage, textTooLongMessage } = props;
|
10757
10725
|
const [sendBoxError, setSendBoxError] = React.useState(undefined);
|
@@ -10782,8 +10750,8 @@ const RichTextSendBoxErrors = (props) => {
|
|
10782
10750
|
errors.push(attachmentUploadsPendingError);
|
10783
10751
|
}
|
10784
10752
|
/* @conditional-compile-remove(attachment-upload) */
|
10785
|
-
if (
|
10786
|
-
errors.push(
|
10753
|
+
if (attachmentProgressError) {
|
10754
|
+
errors.push(attachmentProgressError);
|
10787
10755
|
}
|
10788
10756
|
if (errors.length === 0) {
|
10789
10757
|
return undefined;
|
@@ -10793,7 +10761,7 @@ const RichTextSendBoxErrors = (props) => {
|
|
10793
10761
|
return sortedErrors[0];
|
10794
10762
|
});
|
10795
10763
|
}, [
|
10796
|
-
/* @conditional-compile-remove(attachment-upload) */
|
10764
|
+
/* @conditional-compile-remove(attachment-upload) */ attachmentProgressError,
|
10797
10765
|
/* @conditional-compile-remove(attachment-upload) */ attachmentUploadsPendingError
|
10798
10766
|
]);
|
10799
10767
|
const onDismiss = React.useCallback(() => {
|
@@ -10819,7 +10787,7 @@ const isMessageEmpty$1 = (message) => {
|
|
10819
10787
|
const RichTextSendBox = (props) => {
|
10820
10788
|
const { disabled = false, systemMessage, autoFocus, onSendMessage, onTyping,
|
10821
10789
|
/* @conditional-compile-remove(attachment-upload) */
|
10822
|
-
|
10790
|
+
attachmentsWithProgress,
|
10823
10791
|
/* @conditional-compile-remove(attachment-upload) */
|
10824
10792
|
onCancelAttachmentUpload } = props;
|
10825
10793
|
const theme = useTheme();
|
@@ -10853,7 +10821,7 @@ const RichTextSendBox = (props) => {
|
|
10853
10821
|
/* @conditional-compile-remove(attachment-upload) */
|
10854
10822
|
setAttachmentUploadsPendingError(undefined);
|
10855
10823
|
/* @conditional-compile-remove(attachment-upload) */
|
10856
|
-
if (hasIncompleteAttachmentUploads(
|
10824
|
+
if (hasIncompleteAttachmentUploads(attachmentsWithProgress)) {
|
10857
10825
|
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
10858
10826
|
return;
|
10859
10827
|
}
|
@@ -10869,7 +10837,7 @@ const RichTextSendBox = (props) => {
|
|
10869
10837
|
// we don't want to send empty messages including spaces, newlines, tabs
|
10870
10838
|
// Message can be empty if there is a valid attachment upload
|
10871
10839
|
if (hasContent ||
|
10872
|
-
/* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads(
|
10840
|
+
/* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads(attachmentsWithProgress)) {
|
10873
10841
|
onSendMessage(message);
|
10874
10842
|
setContentValue('');
|
10875
10843
|
(_b = editorComponentRef.current) === null || _b === void 0 ? void 0 : _b.setEmptyContent();
|
@@ -10881,7 +10849,7 @@ const RichTextSendBox = (props) => {
|
|
10881
10849
|
disabled,
|
10882
10850
|
onSendMessage,
|
10883
10851
|
strings.placeholderText,
|
10884
|
-
/* @conditional-compile-remove(attachment-upload) */
|
10852
|
+
/* @conditional-compile-remove(attachment-upload) */ attachmentsWithProgress,
|
10885
10853
|
/* @conditional-compile-remove(attachment-upload) */ strings.attachmentUploadsPendingError
|
10886
10854
|
]);
|
10887
10855
|
const hasErrorMessage = React.useMemo(() => {
|
@@ -10891,10 +10859,10 @@ const RichTextSendBox = (props) => {
|
|
10891
10859
|
/* @conditional-compile-remove(attachment-upload) */
|
10892
10860
|
!!attachmentUploadsPendingError ||
|
10893
10861
|
/* @conditional-compile-remove(attachment-upload) */
|
10894
|
-
!!((_a =
|
10862
|
+
!!((_a = attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error));
|
10895
10863
|
}, [
|
10896
10864
|
/* @conditional-compile-remove(attachment-upload) */
|
10897
|
-
|
10865
|
+
attachmentsWithProgress,
|
10898
10866
|
contentTooLongMessage,
|
10899
10867
|
/* @conditional-compile-remove(attachment-upload) */
|
10900
10868
|
attachmentUploadsPendingError,
|
@@ -10921,18 +10889,25 @@ const RichTextSendBox = (props) => {
|
|
10921
10889
|
}) }));
|
10922
10890
|
}, [contentValue, disabled, hasErrorMessage, strings.placeholderText, theme]);
|
10923
10891
|
const sendBoxErrorsProps = React.useMemo(() => {
|
10924
|
-
var _a;
|
10892
|
+
var _a, _b;
|
10893
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10894
|
+
const uploadErrorMessage = (_b = (_a = attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message;
|
10925
10895
|
return {
|
10926
10896
|
/* @conditional-compile-remove(attachment-upload) */
|
10927
10897
|
attachmentUploadsPendingError: attachmentUploadsPendingError,
|
10928
10898
|
/* @conditional-compile-remove(attachment-upload) */
|
10929
|
-
|
10899
|
+
attachmentProgressError: uploadErrorMessage
|
10900
|
+
? {
|
10901
|
+
message: uploadErrorMessage,
|
10902
|
+
timestamp: Date.now()
|
10903
|
+
}
|
10904
|
+
: undefined,
|
10930
10905
|
systemMessage: systemMessage,
|
10931
10906
|
textTooLongMessage: contentTooLongMessage
|
10932
10907
|
};
|
10933
10908
|
}, [
|
10934
10909
|
/* @conditional-compile-remove(attachment-upload) */
|
10935
|
-
|
10910
|
+
attachmentsWithProgress,
|
10936
10911
|
contentTooLongMessage,
|
10937
10912
|
/* @conditional-compile-remove(attachment-upload) */
|
10938
10913
|
attachmentUploadsPendingError,
|
@@ -10942,14 +10917,14 @@ const RichTextSendBox = (props) => {
|
|
10942
10917
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
10943
10918
|
return (React.createElement(react.Stack, { className: attachmentUploadCardsStyles },
|
10944
10919
|
React.createElement(FluentV9ThemeProvider, { v8Theme: theme },
|
10945
|
-
React.createElement(_AttachmentUploadCards, {
|
10920
|
+
React.createElement(_AttachmentUploadCards, { attachmentsWithProgress: attachmentsWithProgress, onCancelAttachmentUpload: onCancelAttachmentUpload, strings: {
|
10946
10921
|
removeAttachment: strings.removeAttachment,
|
10947
10922
|
uploading: strings.uploading,
|
10948
10923
|
uploadCompleted: strings.uploadCompleted,
|
10949
10924
|
attachmentMoreMenu: strings.attachmentMoreMenu
|
10950
10925
|
} }))));
|
10951
10926
|
}, [
|
10952
|
-
|
10927
|
+
attachmentsWithProgress,
|
10953
10928
|
onCancelAttachmentUpload,
|
10954
10929
|
strings.removeAttachment,
|
10955
10930
|
strings.uploadCompleted,
|
@@ -10965,8 +10940,8 @@ const RichTextSendBox = (props) => {
|
|
10965
10940
|
}, [localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);
|
10966
10941
|
/* @conditional-compile-remove(attachment-upload) */
|
10967
10942
|
const hasAttachmentUploads = React.useMemo(() => {
|
10968
|
-
return (hasCompletedAttachmentUploads(
|
10969
|
-
}, [
|
10943
|
+
return (hasCompletedAttachmentUploads(attachmentsWithProgress) || hasIncompleteAttachmentUploads(attachmentsWithProgress));
|
10944
|
+
}, [attachmentsWithProgress]);
|
10970
10945
|
return (React.createElement(react.Stack, null,
|
10971
10946
|
React.createElement(RichTextSendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
|
10972
10947
|
React.createElement(RichTextInputBoxComponent
|
@@ -12206,13 +12181,13 @@ const extractContentForAllyMessage = (props) => {
|
|
12206
12181
|
imageTextNode.innerHTML = 'image ';
|
12207
12182
|
parsedContent.replaceChild(imageTextNode, child);
|
12208
12183
|
});
|
12209
|
-
// Inject attachment
|
12210
|
-
|
12211
|
-
|
12212
|
-
|
12213
|
-
|
12184
|
+
// Inject message attachment count for aria.
|
12185
|
+
// this is only applying to file attachments not for inline images.
|
12186
|
+
/* @conditional-compile-remove(attachment-download) */
|
12187
|
+
if (attachments && attachments.length > 0) {
|
12188
|
+
const attachmentCardDescription = attachmentCardGroupDescription(props);
|
12214
12189
|
const attachmentTextNode = document.createElement('div');
|
12215
|
-
attachmentTextNode.innerHTML =
|
12190
|
+
attachmentTextNode.innerHTML = `${attachmentCardDescription}`;
|
12216
12191
|
parsedContent.appendChild(attachmentTextNode);
|
12217
12192
|
}
|
12218
12193
|
// Strip all html tags from the content for aria.
|
@@ -12747,7 +12722,7 @@ const ChatMessageComponentAsEditBox = (props) => {
|
|
12747
12722
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
12748
12723
|
return (!!attachmentMetadata &&
|
12749
12724
|
attachmentMetadata.length > 0 && (React.createElement("div", { style: { margin: '0.25rem' } },
|
12750
|
-
React.createElement(_AttachmentUploadCards, {
|
12725
|
+
React.createElement(_AttachmentUploadCards, { attachmentsWithProgress: attachmentMetadata, onCancelAttachmentUpload: (attachmentId) => {
|
12751
12726
|
setAttachmentMetadata(attachmentMetadata === null || attachmentMetadata === void 0 ? void 0 : attachmentMetadata.filter((attachment) => attachment.id !== attachmentId));
|
12752
12727
|
} }))));
|
12753
12728
|
}, [attachmentMetadata]);
|
@@ -12823,7 +12798,7 @@ class ErrorBoundary extends React.Component {
|
|
12823
12798
|
// Copyright (c) Microsoft Corporation.
|
12824
12799
|
// Licensed under the MIT License.
|
12825
12800
|
/* @conditional-compile-remove(rich-text-editor) */
|
12826
|
-
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
12801
|
+
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DOJvvifs.js'); }));
|
12827
12802
|
/**
|
12828
12803
|
* @private
|
12829
12804
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -12831,7 +12806,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
|
|
12831
12806
|
*
|
12832
12807
|
* @conditional-compile-remove(rich-text-editor)
|
12833
12808
|
*/
|
12834
|
-
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
12809
|
+
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DOJvvifs.js'); });
|
12835
12810
|
/**
|
12836
12811
|
* @private
|
12837
12812
|
*/
|
@@ -15214,13 +15189,6 @@ const disabledVideoHint = react.mergeStyles({
|
|
15214
15189
|
padding: '0.15rem',
|
15215
15190
|
maxWidth: '100%'
|
15216
15191
|
});
|
15217
|
-
/**
|
15218
|
-
* @private
|
15219
|
-
*/
|
15220
|
-
const videoHint = react.mergeStyles(disabledVideoHint, {
|
15221
|
-
// This will appear on top of the video stream, so no dependency on theme and explicitly use a translucent white
|
15222
|
-
backgroundColor: 'rgba(255,255,255,0.8)'
|
15223
|
-
});
|
15224
15192
|
/**
|
15225
15193
|
* @private
|
15226
15194
|
*/
|
@@ -15350,16 +15318,6 @@ const reactionRenderingStyle = (args) => {
|
|
15350
15318
|
});
|
15351
15319
|
};
|
15352
15320
|
|
15353
|
-
// Copyright (c) Microsoft Corporation.
|
15354
|
-
// Licensed under the MIT License.
|
15355
|
-
/**
|
15356
|
-
* @private
|
15357
|
-
*/
|
15358
|
-
const getVideoTileOverrideColor = (isVideoRendered, theme, color) => {
|
15359
|
-
// when video is being rendered, the info has a grey-ish background, so no use of theme
|
15360
|
-
return { color: isVideoRendered ? react.DefaultPalette[color] : theme.palette[color] };
|
15361
|
-
};
|
15362
|
-
|
15363
15321
|
// Copyright (c) Microsoft Corporation.
|
15364
15322
|
// Licensed under the MIT License.
|
15365
15323
|
/**
|
@@ -15500,6 +15458,7 @@ const VideoTile = (props) => {
|
|
15500
15458
|
const videoTileRef = React.useRef(null);
|
15501
15459
|
const locale = useLocale$1();
|
15502
15460
|
const theme = useTheme();
|
15461
|
+
const callingPalette = theme.callingPalette;
|
15503
15462
|
const isVideoRendered = !!renderElement;
|
15504
15463
|
const observer = React.useRef(new ResizeObserver((entries) => {
|
15505
15464
|
const { width, height } = entries[0].contentRect;
|
@@ -15570,14 +15529,16 @@ const VideoTile = (props) => {
|
|
15570
15529
|
styles: defaultPersonaStyles$1,
|
15571
15530
|
hidePersonaDetails: true
|
15572
15531
|
};
|
15573
|
-
const videoHintWithBorderRadius = react.mergeStyles(
|
15574
|
-
|
15532
|
+
const videoHintWithBorderRadius = react.mergeStyles(disabledVideoHint, {
|
15533
|
+
borderRadius: theme.effects.roundedCorner4,
|
15534
|
+
backgroundColor: callingPalette.videoTileLabelBackgroundLight
|
15535
|
+
});
|
15536
|
+
const tileInfoStyle = React.useMemo(() => react.mergeStyles(isVideoRendered || props.alwaysShowLabelBackground ? videoHintWithBorderRadius : disabledVideoHint, styles === null || styles === void 0 ? void 0 : styles.displayNameContainer), [isVideoRendered, videoHintWithBorderRadius, styles === null || styles === void 0 ? void 0 : styles.displayNameContainer, props.alwaysShowLabelBackground]);
|
15575
15537
|
const ids = useIdentifiers();
|
15576
15538
|
const canShowLabel = showLabel && (displayName || (showMuteIndicator && isMuted));
|
15577
15539
|
const participantStateString = participantStateStringTrampoline(props, locale);
|
15578
15540
|
const canShowContextMenuButton = isHovered || isFocused;
|
15579
15541
|
let raisedHandBackgroundColor = '';
|
15580
|
-
const callingPalette = theme.callingPalette;
|
15581
15542
|
raisedHandBackgroundColor = callingPalette.raiseHandGold;
|
15582
15543
|
return (React.createElement(react.Stack, Object.assign({ "data-ui-id": ids.videoTile, className: react.mergeStyles(rootStyles, {
|
15583
15544
|
background: theme.palette.neutralLighter,
|
@@ -16415,7 +16376,7 @@ const _RemoteVideoTile = React.memo((props) => {
|
|
16415
16376
|
/* @conditional-compile-remove(hide-attendee-name) */
|
16416
16377
|
displayName = formatDisplayName();
|
16417
16378
|
return (React.createElement(react.Stack, { tabIndex: menuKind === 'drawer' ? 0 : undefined, onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined, style: remoteVideoTileWrapperStyle },
|
16418
|
-
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, isSpeaking: remoteParticipant.isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel,
|
16379
|
+
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, isSpeaking: remoteParticipant.isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: props.showLabel, alwaysShowLabelBackground: props.alwaysShowLabelBackground,
|
16419
16380
|
/* @conditional-compile-remove(one-to-n-calling) */
|
16420
16381
|
/* @conditional-compile-remove(PSTN-calls) */
|
16421
16382
|
participantState: participantState }, videoTileContextualMenuProps, { isPinned: props.isPinned, onLongTouch: () => setDrawerMenuItemProps(convertContextualMenuItemsToDrawerMenuItemProps$1(contextualMenuProps, () => setDrawerMenuItemProps([]))),
|
@@ -16666,7 +16627,7 @@ const LocalVideoCameraCycleButton = (props) => {
|
|
16666
16627
|
* @internal
|
16667
16628
|
*/
|
16668
16629
|
const _LocalVideoTile = React.memo((props) => {
|
16669
|
-
const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription, raisedHand, reaction,
|
16630
|
+
const { isAvailable, isMuted, onCreateLocalStreamView, onDisposeLocalStreamView, localVideoViewOptions, renderElement, userId, showLabel, alwaysShowLabelBackground, displayName, initialsName, onRenderAvatar, showMuteIndicator, styles, showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription, raisedHand, reaction,
|
16670
16631
|
/* @conditional-compile-remove(spotlight) */
|
16671
16632
|
isSpotlighted,
|
16672
16633
|
/* @conditional-compile-remove(spotlight) */
|
@@ -16768,7 +16729,7 @@ const _LocalVideoTile = React.memo((props) => {
|
|
16768
16729
|
const reactionOverlay = reactionResources !== undefined ? (React.createElement(MeetingReactionOverlay, { overlayMode: "grid-tiles", reaction: reaction, reactionResources: reactionResources })) : undefined;
|
16769
16730
|
return (React.createElement(react.Stack, { className: react.mergeStyles({ width: '100%', height: '100%' }),
|
16770
16731
|
/* @conditional-compile-remove(spotlight) */ onKeyDown: menuKind === 'drawer' ? onKeyDown : undefined },
|
16771
|
-
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,
|
16732
|
+
React.createElement(VideoTile, Object.assign({ key: userId !== null && userId !== void 0 ? userId : 'local-video-tile', userId: userId, renderElement: renderVideoStreamElement, showLabel: showLabel, alwaysShowLabelBackground: alwaysShowLabelBackground, displayName: displayName, initialsName: initialsName, styles: videoTileStyles, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, raisedHand: raisedHand,
|
16772
16733
|
/* @conditional-compile-remove(spotlight) */
|
16773
16734
|
isSpotlighted: isSpotlighted }, videoTileContextualMenuProps, {
|
16774
16735
|
/* @conditional-compile-remove(spotlight) */
|
@@ -18810,7 +18771,7 @@ const VideoGallery = (props) => {
|
|
18810
18771
|
/* @conditional-compile-remove(spotlight) */
|
18811
18772
|
onStopRemoteSpotlight,
|
18812
18773
|
/* @conditional-compile-remove(spotlight) */
|
18813
|
-
maxParticipantsToSpotlight, reactionResources } = props;
|
18774
|
+
maxParticipantsToSpotlight, reactionResources, videoTilesOptions } = props;
|
18814
18775
|
const ids = useIdentifiers();
|
18815
18776
|
const theme = useTheme();
|
18816
18777
|
const localeStrings = useLocale$1().strings.videoGallery;
|
@@ -18866,7 +18827,7 @@ const VideoGallery = (props) => {
|
|
18866
18827
|
return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;
|
18867
18828
|
};
|
18868
18829
|
return (React.createElement(react.Stack, { styles: localVideoTileContainerStyles, key: "local-video-tile-key", tabIndex: 0, "aria-label": strings.localVideoMovementLabel, role: 'dialog' },
|
18869
|
-
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, reaction: localParticipant.reaction,
|
18830
|
+
React.createElement(_LocalVideoTile, { alwaysShowLabelBackground: videoTilesOptions === null || videoTilesOptions === void 0 ? void 0 : videoTilesOptions.alwaysShowLabelBackground, 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, reaction: localParticipant.reaction,
|
18870
18831
|
/* @conditional-compile-remove(spotlight) */
|
18871
18832
|
spotlightedParticipantUserIds: spotlightedParticipants,
|
18872
18833
|
/* @conditional-compile-remove(spotlight) */
|
@@ -18914,7 +18875,8 @@ const VideoGallery = (props) => {
|
|
18914
18875
|
strings,
|
18915
18876
|
/* @conditional-compile-remove(spotlight) */
|
18916
18877
|
drawerMenuHostId,
|
18917
|
-
reactionResources
|
18878
|
+
reactionResources,
|
18879
|
+
videoTilesOptions
|
18918
18880
|
]);
|
18919
18881
|
const onPinParticipant = React.useCallback((userId) => {
|
18920
18882
|
if (pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES) {
|
@@ -18963,7 +18925,7 @@ const VideoGallery = (props) => {
|
|
18963
18925
|
}
|
18964
18926
|
: remoteVideoViewOptions;
|
18965
18927
|
};
|
18966
|
-
return (React.createElement(_RemoteVideoTile, { streamId: remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.id, key: participant.userId, userId: participant.userId, remoteParticipant: participant, onCreateRemoteStreamView: isVideoParticipant ? onCreateRemoteStreamView : undefined, onDisposeRemoteStreamView: isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined, isAvailable: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isAvailable : false, isReceiving: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isReceiving : false, renderElement: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.renderElement : undefined, remoteVideoViewOptions: createViewOptions(), onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
|
18928
|
+
return (React.createElement(_RemoteVideoTile, { alwaysShowLabelBackground: videoTilesOptions === null || videoTilesOptions === void 0 ? void 0 : videoTilesOptions.alwaysShowLabelBackground, streamId: remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.id, key: participant.userId, userId: participant.userId, remoteParticipant: participant, onCreateRemoteStreamView: isVideoParticipant ? onCreateRemoteStreamView : undefined, onDisposeRemoteStreamView: isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined, isAvailable: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isAvailable : false, isReceiving: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.isReceiving : false, renderElement: isVideoParticipant ? remoteVideoStream === null || remoteVideoStream === void 0 ? void 0 : remoteVideoStream.renderElement : undefined, remoteVideoViewOptions: createViewOptions(), onRenderAvatar: onRenderAvatar, showMuteIndicator: showMuteIndicator, strings: strings,
|
18967
18929
|
/* @conditional-compile-remove(PSTN-calls) */
|
18968
18930
|
participantState: participant.state, menuKind: participant.userId === localParticipant.userId
|
18969
18931
|
? undefined
|
@@ -19002,7 +18964,8 @@ const VideoGallery = (props) => {
|
|
19002
18964
|
/* @conditional-compile-remove(spotlight) */ onStartRemoteSpotlight,
|
19003
18965
|
/* @conditional-compile-remove(spotlight) */ onStopRemoteSpotlight,
|
19004
18966
|
/* @conditional-compile-remove(spotlight) */ maxParticipantsToSpotlight,
|
19005
|
-
reactionResources
|
18967
|
+
reactionResources,
|
18968
|
+
videoTilesOptions
|
19006
18969
|
]);
|
19007
18970
|
const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
|
19008
18971
|
const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
|
@@ -25426,7 +25389,7 @@ class AttachmentUpload {
|
|
25426
25389
|
constructor(data) {
|
25427
25390
|
this._emitter = new EventEmitter.EventEmitter();
|
25428
25391
|
this._emitter.setMaxListeners(_MAX_EVENT_LISTENERS);
|
25429
|
-
this.
|
25392
|
+
this.taskId = nanoid.nanoid();
|
25430
25393
|
if (data instanceof File) {
|
25431
25394
|
this.file = data;
|
25432
25395
|
}
|
@@ -25436,14 +25399,14 @@ class AttachmentUpload {
|
|
25436
25399
|
const name = data === null || data === void 0 ? void 0 : data.name;
|
25437
25400
|
this.name = name;
|
25438
25401
|
}
|
25439
|
-
|
25440
|
-
this._emitter.emit('uploadProgressChange', this.
|
25402
|
+
notifyUploadProgressChanged(value) {
|
25403
|
+
this._emitter.emit('uploadProgressChange', this.taskId, value);
|
25441
25404
|
}
|
25442
|
-
|
25443
|
-
this._emitter.emit('uploadComplete', this.id,
|
25405
|
+
notifyUploadCompleted(id, url) {
|
25406
|
+
this._emitter.emit('uploadComplete', this.taskId, id, url);
|
25444
25407
|
}
|
25445
|
-
|
25446
|
-
this._emitter.emit('uploadFail', this.
|
25408
|
+
notifyUploadFailed(message) {
|
25409
|
+
this._emitter.emit('uploadFail', this.taskId, message);
|
25447
25410
|
}
|
25448
25411
|
/**
|
25449
25412
|
* Attachment upload event subscriber.
|
@@ -25641,7 +25604,7 @@ const AttachmentUploadButton = (props) => {
|
|
25641
25604
|
} })));
|
25642
25605
|
};
|
25643
25606
|
const SendBoxAttachFileIconTrampoline = () => {
|
25644
|
-
|
25607
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25645
25608
|
return React.createElement(ChatCompositeIcon, { iconName: "SendBoxAttachFile" });
|
25646
25609
|
};
|
25647
25610
|
/**
|
@@ -25675,27 +25638,27 @@ class AttachmentUploadContext {
|
|
25675
25638
|
this.chatContext = chatContext;
|
25676
25639
|
}
|
25677
25640
|
getAttachmentUploads() {
|
25678
|
-
return this.chatContext.getState().
|
25641
|
+
return this.chatContext.getState()._attachmentUploads;
|
25679
25642
|
}
|
25680
25643
|
addAttachmentUploads(attachmentUploads) {
|
25681
25644
|
const attachmentUploadsMap = convertObservableAttachmentUploadToAttachmentUploadsUiState(attachmentUploads);
|
25682
25645
|
this.chatContext.setState(immer.produce(this.chatContext.getState(), (draft) => {
|
25683
|
-
draft.
|
25684
|
-
draft.
|
25646
|
+
draft._attachmentUploads = draft._attachmentUploads || {};
|
25647
|
+
draft._attachmentUploads = Object.assign(Object.assign({}, draft._attachmentUploads), attachmentUploadsMap);
|
25685
25648
|
}));
|
25686
25649
|
}
|
25687
25650
|
clearUploads() {
|
25688
25651
|
this.chatContext.setState(immer.produce(this.chatContext.getState(), (draft) => {
|
25689
|
-
draft.
|
25652
|
+
draft._attachmentUploads = {};
|
25690
25653
|
}));
|
25691
25654
|
}
|
25692
25655
|
updateAttachmentUpload(id, data) {
|
25693
25656
|
this.chatContext.setState(immer.produce(this.chatContext.getState(), (draft) => {
|
25694
25657
|
var _a, _b, _c, _d;
|
25695
|
-
if ((_a = draft.
|
25696
|
-
draft.
|
25658
|
+
if ((_a = draft._attachmentUploads) === null || _a === void 0 ? void 0 : _a[id]) {
|
25659
|
+
draft._attachmentUploads[(_b = data.id) !== null && _b !== void 0 ? _b : id] = Object.assign(Object.assign({}, (_c = draft._attachmentUploads) === null || _c === void 0 ? void 0 : _c[id]), data);
|
25697
25660
|
if (data.id) {
|
25698
|
-
(_d = draft.
|
25661
|
+
(_d = draft._attachmentUploads) === null || _d === void 0 ? true : delete _d[id];
|
25699
25662
|
}
|
25700
25663
|
}
|
25701
25664
|
}));
|
@@ -25704,10 +25667,10 @@ class AttachmentUploadContext {
|
|
25704
25667
|
this.chatContext.setState(immer.produce(this.chatContext.getState(), (draft) => {
|
25705
25668
|
ids.forEach((id) => {
|
25706
25669
|
var _a;
|
25707
|
-
const keys = Object.keys((_a = draft === null || draft === void 0 ? void 0 : draft.
|
25670
|
+
const keys = Object.keys((_a = draft === null || draft === void 0 ? void 0 : draft._attachmentUploads) !== null && _a !== void 0 ? _a : []).filter((rawID) => { var _a; return ((_a = draft._attachmentUploads) === null || _a === void 0 ? void 0 : _a[rawID].id) === id; });
|
25708
25671
|
keys.forEach((key) => {
|
25709
25672
|
var _a;
|
25710
|
-
(_a = draft.
|
25673
|
+
(_a = draft._attachmentUploads) === null || _a === void 0 ? true : delete _a[key];
|
25711
25674
|
});
|
25712
25675
|
});
|
25713
25676
|
}));
|
@@ -25723,16 +25686,16 @@ class AzureCommunicationAttachmentUploadAdapter {
|
|
25723
25686
|
this.context = new AttachmentUploadContext(chatContext);
|
25724
25687
|
}
|
25725
25688
|
findAttachmentUpload(id) {
|
25726
|
-
return this.attachmentUploads.find((attachmentUpload) => attachmentUpload.
|
25689
|
+
return this.attachmentUploads.find((attachmentUpload) => attachmentUpload.taskId === id);
|
25727
25690
|
}
|
25728
25691
|
deleteAttachmentUploads(ids) {
|
25729
|
-
this.attachmentUploads = this.attachmentUploads.filter((attachmentUpload) => !ids.includes(attachmentUpload.
|
25692
|
+
this.attachmentUploads = this.attachmentUploads.filter((attachmentUpload) => !ids.includes(attachmentUpload.taskId));
|
25730
25693
|
this.context.deleteAttachmentUploads(ids);
|
25731
25694
|
}
|
25732
25695
|
deleteErroneousAttachmentUploads() {
|
25733
25696
|
const attachmentUploads = this.context.getAttachmentUploads() || {};
|
25734
25697
|
const ids = Object.values(attachmentUploads)
|
25735
|
-
.filter((item) => item.
|
25698
|
+
.filter((item) => item.error)
|
25736
25699
|
.map((item) => item.id);
|
25737
25700
|
ids.forEach((id) => {
|
25738
25701
|
const attachmentUpload = this.findAttachmentUpload(id);
|
@@ -25771,9 +25734,8 @@ class AzureCommunicationAttachmentUploadAdapter {
|
|
25771
25734
|
}
|
25772
25735
|
updateUploadStatusMessage(id, errorMessage) {
|
25773
25736
|
this.context.updateAttachmentUpload(id, {
|
25774
|
-
|
25775
|
-
message: errorMessage
|
25776
|
-
timestamp: Date.now()
|
25737
|
+
error: {
|
25738
|
+
message: errorMessage
|
25777
25739
|
}
|
25778
25740
|
});
|
25779
25741
|
}
|
@@ -25786,20 +25748,30 @@ class AzureCommunicationAttachmentUploadAdapter {
|
|
25786
25748
|
extension: metadata.extension
|
25787
25749
|
});
|
25788
25750
|
}
|
25751
|
+
setAttachmentMetadata(taskId, attachmentId, attachmentUrl) {
|
25752
|
+
const attachmentUpload = this.findAttachmentUpload(taskId);
|
25753
|
+
this.context.updateAttachmentUpload(taskId, {
|
25754
|
+
progress: 1,
|
25755
|
+
id: attachmentId,
|
25756
|
+
name: attachmentUpload === null || attachmentUpload === void 0 ? void 0 : attachmentUpload.name,
|
25757
|
+
url: attachmentUrl,
|
25758
|
+
extension: (attachmentUpload === null || attachmentUpload === void 0 ? void 0 : attachmentUpload.name.split('.').pop()) || ''
|
25759
|
+
});
|
25760
|
+
}
|
25789
25761
|
subscribeAllEvents(attachmentUpload) {
|
25790
25762
|
attachmentUpload.on('uploadProgressChange', this.updateUploadProgress.bind(this));
|
25791
|
-
attachmentUpload.on('uploadComplete', this.
|
25763
|
+
attachmentUpload.on('uploadComplete', this.setAttachmentMetadata.bind(this));
|
25792
25764
|
attachmentUpload.on('uploadFail', this.updateUploadStatusMessage.bind(this));
|
25793
25765
|
}
|
25794
25766
|
unsubscribeAllEvents(attachmentUpload) {
|
25795
25767
|
attachmentUpload === null || attachmentUpload === void 0 ? void 0 : attachmentUpload.off('uploadProgressChange', this.updateUploadProgress.bind(this));
|
25796
|
-
attachmentUpload === null || attachmentUpload === void 0 ? void 0 : attachmentUpload.off('uploadComplete', this.
|
25768
|
+
attachmentUpload === null || attachmentUpload === void 0 ? void 0 : attachmentUpload.off('uploadComplete', this.setAttachmentMetadata.bind(this));
|
25797
25769
|
attachmentUpload === null || attachmentUpload === void 0 ? void 0 : attachmentUpload.off('uploadFail', this.updateUploadStatusMessage.bind(this));
|
25798
25770
|
}
|
25799
25771
|
}
|
25800
25772
|
/* @conditional-compile-remove(attachment-upload) */
|
25801
25773
|
/**
|
25802
|
-
* @param attachmentUploadUiState {@link
|
25774
|
+
* @param attachmentUploadUiState {@link _AttachmentUploadsUiState}
|
25803
25775
|
* @private
|
25804
25776
|
*/
|
25805
25777
|
const convertAttachmentUploadsUiStateToMessageMetadata = (attachmentUploads) => {
|
@@ -25807,7 +25779,7 @@ const convertAttachmentUploadsUiStateToMessageMetadata = (attachmentUploads) =>
|
|
25807
25779
|
const attachmentMetadata = [];
|
25808
25780
|
Object.keys(attachmentUploads).forEach((key) => {
|
25809
25781
|
const attachment = attachmentUploads[key];
|
25810
|
-
if (attachment && !attachment.
|
25782
|
+
if (attachment && !attachment.error) {
|
25811
25783
|
attachmentMetadata.push({
|
25812
25784
|
id: attachment.id,
|
25813
25785
|
name: attachment.name,
|
@@ -25829,8 +25801,8 @@ const convertAttachmentUploadsUiStateToMessageMetadata = (attachmentUploads) =>
|
|
25829
25801
|
*/
|
25830
25802
|
const convertObservableAttachmentUploadToAttachmentUploadsUiState = (attachmentUploads) => {
|
25831
25803
|
return attachmentUploads.reduce((map, attachmentUpload) => {
|
25832
|
-
map[attachmentUpload.
|
25833
|
-
id: attachmentUpload.
|
25804
|
+
map[attachmentUpload.taskId] = {
|
25805
|
+
id: attachmentUpload.taskId,
|
25834
25806
|
name: attachmentUpload.name,
|
25835
25807
|
progress: 0,
|
25836
25808
|
extension: attachmentUpload.name.split('.').pop() || ''
|
@@ -25839,6 +25811,23 @@ const convertObservableAttachmentUploadToAttachmentUploadsUiState = (attachmentU
|
|
25839
25811
|
}, {});
|
25840
25812
|
};
|
25841
25813
|
|
25814
|
+
// Copyright (c) Microsoft Corporation.
|
25815
|
+
// Licensed under the MIT License.
|
25816
|
+
/**
|
25817
|
+
* @private
|
25818
|
+
*/
|
25819
|
+
const UNSUPPORTED_CHAT_THREAD_TYPE = ['@thread.tacv2', '@thread.skype'];
|
25820
|
+
/**
|
25821
|
+
* @private
|
25822
|
+
*/
|
25823
|
+
const TEAMS_LIMITATION_LEARN_MORE = 'https://learn.microsoft.com/en-us/azure/communication-services/concepts/join-teams-meeting#limitations-and-known-issues';
|
25824
|
+
/**
|
25825
|
+
* @remarks
|
25826
|
+
* This value is publicly documented in the ChatComposite API documentation.
|
25827
|
+
* Changing this value will require updating the API documentation.
|
25828
|
+
*/
|
25829
|
+
const CHAT_CONTAINER_MIN_WIDTH_REM = 17.5;
|
25830
|
+
|
25842
25831
|
// Copyright (c) Microsoft Corporation.
|
25843
25832
|
// Licensed under the MIT License.
|
25844
25833
|
var __awaiter$o = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -25904,7 +25893,7 @@ class ChatContext {
|
|
25904
25893
|
latestErrors: clientState.latestErrors
|
25905
25894
|
};
|
25906
25895
|
/* @conditional-compile-remove(attachment-upload) */
|
25907
|
-
updatedState = Object.assign(Object.assign({}, updatedState), {
|
25896
|
+
updatedState = Object.assign(Object.assign({}, updatedState), { _attachmentUploads: this.state._attachmentUploads });
|
25908
25897
|
this.setState(updatedState);
|
25909
25898
|
}
|
25910
25899
|
}
|
@@ -25939,6 +25928,8 @@ class AzureCommunicationChatAdapter {
|
|
25939
25928
|
this.dispose = this.dispose.bind(this);
|
25940
25929
|
this.fetchInitialData = this.fetchInitialData.bind(this);
|
25941
25930
|
this.sendMessage = this.sendMessage.bind(this);
|
25931
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25932
|
+
this.sendMessageWithAttachments = this.sendMessageWithAttachments.bind(this);
|
25942
25933
|
this.sendReadReceipt = this.sendReadReceipt.bind(this);
|
25943
25934
|
this.sendTypingIndicator = this.sendTypingIndicator.bind(this);
|
25944
25935
|
this.updateMessage = this.updateMessage.bind(this);
|
@@ -26011,7 +26002,7 @@ class AzureCommunicationChatAdapter {
|
|
26011
26002
|
return __awaiter$o(this, arguments, void 0, function* (content, options = {}) {
|
26012
26003
|
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$o(this, void 0, void 0, function* () {
|
26013
26004
|
/* @conditional-compile-remove(attachment-upload) */
|
26014
|
-
options.metadata = Object.assign(Object.assign({}, options.metadata), convertAttachmentUploadsUiStateToMessageMetadata(this.context.getState().
|
26005
|
+
options.metadata = Object.assign(Object.assign({}, options.metadata), convertAttachmentUploadsUiStateToMessageMetadata(this.context.getState()._attachmentUploads));
|
26015
26006
|
/* @conditional-compile-remove(attachment-upload) */
|
26016
26007
|
/**
|
26017
26008
|
* All the current uploads need to be clear from the state before a message has been sent.
|
@@ -26025,6 +26016,28 @@ class AzureCommunicationChatAdapter {
|
|
26025
26016
|
}));
|
26026
26017
|
});
|
26027
26018
|
}
|
26019
|
+
/* @conditional-compile-remove(attachment-upload) */
|
26020
|
+
/** Send a chat message with attachments. */
|
26021
|
+
sendMessageWithAttachments(content, attachments) {
|
26022
|
+
return __awaiter$o(this, void 0, void 0, function* () {
|
26023
|
+
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$o(this, void 0, void 0, function* () {
|
26024
|
+
const fileSharingMetadata = {
|
26025
|
+
fileSharingMetadata: JSON.stringify(attachments)
|
26026
|
+
};
|
26027
|
+
/**
|
26028
|
+
* All the current uploads need to be clear from the state before a message has been sent.
|
26029
|
+
* This ensures the following behavior:
|
26030
|
+
* 1. Attachment Upload cards are removed from sendbox at the same time text in sendbox is removed.
|
26031
|
+
* 2. any component rendering these attachment uploads doesn't continue to do so.
|
26032
|
+
* 3. Cleans the state for new attachment uploads with a fresh message.
|
26033
|
+
*/
|
26034
|
+
this.attachmentUploadAdapter.clearUploads();
|
26035
|
+
yield this.handlers.onSendMessage(content, {
|
26036
|
+
metadata: fileSharingMetadata
|
26037
|
+
});
|
26038
|
+
}));
|
26039
|
+
});
|
26040
|
+
}
|
26028
26041
|
sendReadReceipt(chatMessageId) {
|
26029
26042
|
return __awaiter$o(this, void 0, void 0, function* () {
|
26030
26043
|
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$o(this, void 0, void 0, function* () {
|
@@ -26274,6 +26287,9 @@ const _createLazyAzureCommunicationChatAdapterInner = (endpoint_2, userId_2, dis
|
|
26274
26287
|
credential
|
26275
26288
|
}, undefined, telemetryImplementationHint);
|
26276
26289
|
return threadId.then((threadId) => __awaiter$o(void 0, void 0, void 0, function* () {
|
26290
|
+
if (UNSUPPORTED_CHAT_THREAD_TYPE.some((t) => threadId.includes(t))) {
|
26291
|
+
console.error(`Invalid Chat ThreadId: ${threadId}. Please note with Teams Channel Meetings, only Calling is supported and Chat is not currently supported. Read more: ${TEAMS_LIMITATION_LEARN_MORE}.`);
|
26292
|
+
}
|
26277
26293
|
const chatThreadClient = yield chatClient.getChatThreadClient(threadId);
|
26278
26294
|
yield chatClient.startRealtimeNotifications();
|
26279
26295
|
const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);
|
@@ -26497,18 +26513,6 @@ const useAdapter$1 = () => {
|
|
26497
26513
|
return adapter;
|
26498
26514
|
};
|
26499
26515
|
|
26500
|
-
// Copyright (c) Microsoft Corporation.
|
26501
|
-
// Licensed under the MIT License.
|
26502
|
-
/**
|
26503
|
-
* @private
|
26504
|
-
*/
|
26505
|
-
/**
|
26506
|
-
* @remarks
|
26507
|
-
* This value is publicly documented in the ChatComposite API documentation.
|
26508
|
-
* Changing this value will require updating the API documentation.
|
26509
|
-
*/
|
26510
|
-
const CHAT_CONTAINER_MIN_WIDTH_REM = 17.5;
|
26511
|
-
|
26512
26516
|
// Copyright (c) Microsoft Corporation.
|
26513
26517
|
// Licensed under the MIT License.
|
26514
26518
|
const CHAT_CONTAINER_MAX_WIDTH_REM = 41.25;
|
@@ -27072,7 +27076,7 @@ const useSelector$2 = (selector, selectorProps) => {
|
|
27072
27076
|
*/
|
27073
27077
|
const getAttachmentUploads = (state) => {
|
27074
27078
|
/* @conditional-compile-remove(attachment-upload) */
|
27075
|
-
return state === null || state === void 0 ? void 0 : state.
|
27079
|
+
return state === null || state === void 0 ? void 0 : state._attachmentUploads;
|
27076
27080
|
};
|
27077
27081
|
|
27078
27082
|
// Copyright (c) Microsoft Corporation.
|
@@ -27172,9 +27176,9 @@ const ChatScreen = (props) => {
|
|
27172
27176
|
return;
|
27173
27177
|
}
|
27174
27178
|
/* @conditional-compile-remove(attachment-upload) */
|
27175
|
-
const
|
27179
|
+
const uploadTasks = adapter.registerActiveUploads(Array.from(files));
|
27176
27180
|
/* @conditional-compile-remove(attachment-upload) */
|
27177
|
-
(_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.
|
27181
|
+
(_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handleAttachmentSelection(uploadTasks);
|
27178
27182
|
}, [adapter, attachmentOptions]);
|
27179
27183
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
27180
27184
|
const onRenderAttachmentDownloads = React.useCallback((userId, message) => {
|
@@ -27273,18 +27277,18 @@ const ChatScreen = (props) => {
|
|
27273
27277
|
}, [overlayImageItem === null || overlayImageItem === void 0 ? void 0 : overlayImageItem.attachmentId]);
|
27274
27278
|
const AttachmentButton = React.useCallback(() => {
|
27275
27279
|
var _a, _b, _c;
|
27276
|
-
if (!((_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.
|
27280
|
+
if (!((_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handleAttachmentSelection)) {
|
27277
27281
|
return null;
|
27278
27282
|
}
|
27279
27283
|
return (React.createElement(AttachmentUploadButtonWrapper, { supportedMediaTypes: (_b = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _b === void 0 ? void 0 : _b.supportedMediaTypes, disableMultipleUploads: (_c = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _c === void 0 ? void 0 : _c.disableMultipleUploads, onChange: attachmentUploadButtonOnChange }));
|
27280
27284
|
}, [
|
27281
|
-
(_b = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _b === void 0 ? void 0 : _b.
|
27285
|
+
(_b = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _b === void 0 ? void 0 : _b.handleAttachmentSelection,
|
27282
27286
|
(_c = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _c === void 0 ? void 0 : _c.supportedMediaTypes,
|
27283
27287
|
(_d = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _d === void 0 ? void 0 : _d.disableMultipleUploads,
|
27284
27288
|
attachmentUploadButtonOnChange
|
27285
27289
|
]);
|
27286
27290
|
/* @conditional-compile-remove(attachment-upload) */
|
27287
|
-
const
|
27291
|
+
const attachmentsWithProgress = useSelector$2(attachmentUploadsSelector).attachments;
|
27288
27292
|
return (React.createElement(react.Stack, { className: chatContainer, grow: true },
|
27289
27293
|
(options === null || options === void 0 ? void 0 : options.topic) !== false && React.createElement(ChatHeader, Object.assign({}, headerProps)),
|
27290
27294
|
React.createElement(react.Stack, { className: chatArea, tokens: participantListContainerPadding, horizontal: true, grow: true },
|
@@ -27305,9 +27309,13 @@ const ChatScreen = (props) => {
|
|
27305
27309
|
React.createElement(react.Stack, { grow: true },
|
27306
27310
|
React.createElement(SendBox, Object.assign({}, sendBoxProps, { autoFocus: options === null || options === void 0 ? void 0 : options.autoFocus, styles: sendBoxStyles,
|
27307
27311
|
/* @conditional-compile-remove(attachment-upload) */
|
27308
|
-
|
27312
|
+
attachmentsWithProgress: attachmentsWithProgress,
|
27309
27313
|
/* @conditional-compile-remove(attachment-upload) */
|
27310
|
-
onCancelAttachmentUpload:
|
27314
|
+
onCancelAttachmentUpload: (id) => {
|
27315
|
+
var _a, _b, _c;
|
27316
|
+
(_a = adapter.cancelUpload) === null || _a === void 0 ? void 0 : _a.call(adapter, id);
|
27317
|
+
(_c = (_b = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _b === void 0 ? void 0 : _b.handleAttachmentRemoval) === null || _c === void 0 ? void 0 : _c.call(_b, id);
|
27318
|
+
} }))),
|
27311
27319
|
formFactor !== 'mobile' && React.createElement(AttachmentButton, null)))),
|
27312
27320
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
27313
27321
|
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React.createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' }))),
|
@@ -28113,19 +28121,15 @@ const createCompositeHandlers = memoizeOne((adapter, capabilities) => {
|
|
28113
28121
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
28114
28122
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
28115
28123
|
}),
|
28116
|
-
/* @conditional-compile-remove(close-captions) */
|
28117
28124
|
onStartCaptions: (options) => __awaiter$k(void 0, void 0, void 0, function* () {
|
28118
28125
|
yield adapter.startCaptions(options);
|
28119
28126
|
}),
|
28120
|
-
/* @conditional-compile-remove(close-captions) */
|
28121
28127
|
onStopCaptions: () => __awaiter$k(void 0, void 0, void 0, function* () {
|
28122
28128
|
yield adapter.stopCaptions();
|
28123
28129
|
}),
|
28124
|
-
/* @conditional-compile-remove(close-captions) */
|
28125
28130
|
onSetSpokenLanguage: (language) => __awaiter$k(void 0, void 0, void 0, function* () {
|
28126
28131
|
yield adapter.setSpokenLanguage(language);
|
28127
28132
|
}),
|
28128
|
-
/* @conditional-compile-remove(close-captions) */
|
28129
28133
|
onSetCaptionLanguage: (language) => __awaiter$k(void 0, void 0, void 0, function* () {
|
28130
28134
|
yield adapter.setCaptionLanguage(language);
|
28131
28135
|
}),
|
@@ -28174,13 +28178,9 @@ const createCompositeHandlers = memoizeOne((adapter, capabilities) => {
|
|
28174
28178
|
// Licensed under the MIT License.
|
28175
28179
|
/** @private */
|
28176
28180
|
const CaptionsSettingsModal = (props) => {
|
28177
|
-
/* @conditional-compile-remove(close-captions) */
|
28178
28181
|
const CaptionsSettingsModalProps = useAdaptedSelector(_captionSettingsSelector);
|
28179
|
-
/* @conditional-compile-remove(close-captions) */
|
28180
28182
|
const handlers = useHandlers();
|
28181
|
-
/* @conditional-compile-remove(close-captions) */
|
28182
28183
|
const strings = useLocale().strings.call;
|
28183
|
-
/* @conditional-compile-remove(close-captions) */
|
28184
28184
|
const modalStrings = {
|
28185
28185
|
captionsSettingsModalTitle: strings.captionsSettingsModalTitle,
|
28186
28186
|
captionsSettingsSpokenLanguageDropdownLabel: strings.captionsSettingsSpokenLanguageDropdownLabel,
|
@@ -28192,11 +28192,8 @@ const CaptionsSettingsModal = (props) => {
|
|
28192
28192
|
captionsSettingsModalAriaLabel: strings.captionsSettingsModalAriaLabel,
|
28193
28193
|
captionsSettingsCloseModalButtonAriaLabel: strings.captionsSettingsCloseModalButtonAriaLabel
|
28194
28194
|
};
|
28195
|
-
/* @conditional-compile-remove(close-captions) */
|
28196
28195
|
const spokenLanguageStrings = strings.spokenLanguageStrings;
|
28197
|
-
/* @conditional-compile-remove(close-captions) */
|
28198
28196
|
const captionLanguageStrings = strings.captionLanguageStrings;
|
28199
|
-
/* @conditional-compile-remove(close-captions) */
|
28200
28197
|
return (React.createElement(_CaptionsSettingsModal, Object.assign({}, CaptionsSettingsModalProps, handlers, { strings: modalStrings, spokenLanguageStrings: spokenLanguageStrings, captionLanguageStrings: captionLanguageStrings, showModal: props.showCaptionsSettingsModal, onDismissCaptionsSettings: props.onDismissCaptionsSettings, changeCaptionLanguage: props.changeCaptionLanguage })));
|
28201
28198
|
};
|
28202
28199
|
|
@@ -28323,26 +28320,19 @@ var __awaiter$j = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
28323
28320
|
* @private
|
28324
28321
|
*/
|
28325
28322
|
const CaptionsBannerMoreButton = (props) => {
|
28326
|
-
/* @conditional-compile-remove(close-captions) */
|
28327
28323
|
const localeStrings = useLocale();
|
28328
|
-
/* @conditional-compile-remove(close-captions) */
|
28329
28324
|
const startCaptionsButtonProps = useAdaptedSelector(_startCaptionsButtonSelector);
|
28330
|
-
/* @conditional-compile-remove(close-captions) */
|
28331
28325
|
const startCaptionsButtonHandlers = useHandlers();
|
28332
|
-
/* @conditional-compile-remove(close-captions) */
|
28333
28326
|
const moreButtonStrings = React.useMemo(() => ({
|
28334
28327
|
label: localeStrings.strings.call.captionsBannerMoreButtonCallingLabel,
|
28335
28328
|
tooltipOffContent: localeStrings.strings.call.captionsBannerMoreButtonTooltip
|
28336
28329
|
}), [localeStrings]);
|
28337
|
-
/* @conditional-compile-remove(close-captions) */
|
28338
28330
|
const moreButtonContextualMenuItems = [];
|
28339
|
-
/* @conditional-compile-remove(close-captions) */
|
28340
28331
|
const startCaptions = React.useCallback(() => __awaiter$j(void 0, void 0, void 0, function* () {
|
28341
28332
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
28342
28333
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
28343
28334
|
});
|
28344
28335
|
}), [startCaptionsButtonHandlers, startCaptionsButtonProps.currentSpokenLanguage]);
|
28345
|
-
/* @conditional-compile-remove(close-captions) */
|
28346
28336
|
moreButtonContextualMenuItems.push({
|
28347
28337
|
key: 'ToggleCaptionsKey',
|
28348
28338
|
text: startCaptionsButtonProps.checked
|
@@ -28363,7 +28353,6 @@ const CaptionsBannerMoreButton = (props) => {
|
|
28363
28353
|
styles: buttonFlyoutIncreasedSizeStyles
|
28364
28354
|
}
|
28365
28355
|
});
|
28366
|
-
/* @conditional-compile-remove(close-captions) */
|
28367
28356
|
if (props.onCaptionsSettingsClick) {
|
28368
28357
|
moreButtonContextualMenuItems.push({
|
28369
28358
|
key: 'openCaptionsSettingsKey',
|
@@ -28380,7 +28369,6 @@ const CaptionsBannerMoreButton = (props) => {
|
|
28380
28369
|
disabled: !startCaptionsButtonProps.checked
|
28381
28370
|
});
|
28382
28371
|
}
|
28383
|
-
/* @conditional-compile-remove(close-captions) */
|
28384
28372
|
return (React.createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "captions-banner-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: {
|
28385
28373
|
items: moreButtonContextualMenuItems,
|
28386
28374
|
calloutProps: {
|
@@ -28391,49 +28379,35 @@ const CaptionsBannerMoreButton = (props) => {
|
|
28391
28379
|
|
28392
28380
|
// Copyright (c) Microsoft Corporation.
|
28393
28381
|
// Licensed under the MIT License.
|
28394
|
-
/* @conditional-compile-remove(close-captions) */
|
28395
28382
|
const mobileViewBannerWidth = '90%';
|
28396
28383
|
/** @private */
|
28397
28384
|
const CaptionsBanner = (props) => {
|
28398
|
-
/* @conditional-compile-remove(close-captions) */
|
28399
28385
|
const captionsBannerProps = useAdaptedSelector(_captionsBannerSelector);
|
28400
|
-
/* @conditional-compile-remove(close-captions) */
|
28401
28386
|
const handlers = useHandlers();
|
28402
|
-
/* @conditional-compile-remove(close-captions) */
|
28403
28387
|
const [isCaptionsSettingsOpen, setIsCaptionsSettingsOpen] = React.useState(false);
|
28404
|
-
/* @conditional-compile-remove(close-captions) */
|
28405
28388
|
const onClickCaptionsSettings = () => {
|
28406
28389
|
setIsCaptionsSettingsOpen(true);
|
28407
28390
|
};
|
28408
|
-
/* @conditional-compile-remove(close-captions) */
|
28409
28391
|
const onDismissCaptionsSettings = () => {
|
28410
28392
|
setIsCaptionsSettingsOpen(false);
|
28411
28393
|
};
|
28412
|
-
/* @conditional-compile-remove(close-captions) */
|
28413
28394
|
const containerClassName = react.mergeStyles({
|
28414
28395
|
position: 'relative'
|
28415
28396
|
});
|
28416
|
-
/* @conditional-compile-remove(close-captions) */
|
28417
28397
|
const floatingChildClassName = react.mergeStyles({
|
28418
28398
|
position: 'absolute',
|
28419
28399
|
right: 0,
|
28420
28400
|
top: 0
|
28421
28401
|
});
|
28422
|
-
/* @conditional-compile-remove(close-captions) */
|
28423
28402
|
const strings = useLocale().strings.call;
|
28424
|
-
/* @conditional-compile-remove(close-captions) */
|
28425
28403
|
const captionsBannerStrings = {
|
28426
28404
|
captionsBannerSpinnerText: strings.captionsBannerSpinnerText
|
28427
28405
|
};
|
28428
|
-
/* @conditional-compile-remove(close-captions) */
|
28429
28406
|
const onRenderAvatar = React.useCallback((userId, options) => {
|
28430
28407
|
return React.createElement(AvatarPersona, Object.assign({ userId: userId }, options, { dataProvider: props.onFetchAvatarPersonaData }));
|
28431
28408
|
}, [props.onFetchAvatarPersonaData]);
|
28432
|
-
/* @conditional-compile-remove(close-captions) */
|
28433
28409
|
const { innerWidth: width } = window;
|
28434
|
-
/* @conditional-compile-remove(close-captions) */
|
28435
28410
|
const [windowWidth, setWindowWidth] = React.useState(width);
|
28436
|
-
/* @conditional-compile-remove(close-captions) */
|
28437
28411
|
React.useEffect(() => {
|
28438
28412
|
function handleResize() {
|
28439
28413
|
setWindowWidth(window.innerWidth);
|
@@ -28441,11 +28415,10 @@ const CaptionsBanner = (props) => {
|
|
28441
28415
|
window.addEventListener('resize', handleResize);
|
28442
28416
|
return () => window.removeEventListener('resize', handleResize);
|
28443
28417
|
}, []);
|
28444
|
-
/* @conditional-compile-remove(close-captions) */
|
28445
28418
|
const desktopViewBannerWidth = windowWidth > 620 ? '35rem' : '80%';
|
28446
28419
|
return (React.createElement(React.Fragment, null,
|
28447
|
-
|
28448
|
-
|
28420
|
+
isCaptionsSettingsOpen && (React.createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: isCaptionsSettingsOpen, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: props.useTeamsCaptions })),
|
28421
|
+
React.createElement("div", { className: containerClassName },
|
28449
28422
|
React.createElement(react.Stack, { horizontalAlign: "center" },
|
28450
28423
|
React.createElement(react.Stack.Item, { style: { width: props.isMobile ? mobileViewBannerWidth : desktopViewBannerWidth } },
|
28451
28424
|
React.createElement(_CaptionsBanner, Object.assign({}, captionsBannerProps, handlers, { onRenderAvatar: onRenderAvatar, formFactor: props.isMobile ? 'compact' : 'default', strings: captionsBannerStrings })))),
|
@@ -28737,13 +28710,11 @@ const getCaptionsKind = (state) => {
|
|
28737
28710
|
var _a;
|
28738
28711
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.captionsKind;
|
28739
28712
|
};
|
28740
|
-
/* @conditional-compile-remove(close-captions) */
|
28741
28713
|
/** @private */
|
28742
28714
|
const getCaptionsStatus = (state) => {
|
28743
28715
|
var _a;
|
28744
28716
|
return (_a = state.call) === null || _a === void 0 ? void 0 : _a.captionsFeature.isCaptionsFeatureActive;
|
28745
28717
|
};
|
28746
|
-
/* @conditional-compile-remove(close-captions) */
|
28747
28718
|
/**
|
28748
28719
|
* @private
|
28749
28720
|
*/
|
@@ -29529,15 +29500,11 @@ var __awaiter$h = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
29529
29500
|
*/
|
29530
29501
|
const DesktopMoreButton = (props) => {
|
29531
29502
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
29532
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */
|
29533
29503
|
const localeStrings = useLocale();
|
29534
29504
|
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
29535
29505
|
const holdButtonProps = usePropsFor$1(HoldButton);
|
29536
|
-
/* @conditional-compile-remove(close-captions) */
|
29537
29506
|
const startCaptionsButtonProps = useAdaptedSelector(_startCaptionsButtonSelector);
|
29538
|
-
/* @conditional-compile-remove(close-captions) */
|
29539
29507
|
const startCaptionsButtonHandlers = useHandlers();
|
29540
|
-
/* @conditional-compile-remove(close-captions) */
|
29541
29508
|
const startCaptions = React.useCallback(() => __awaiter$h(void 0, void 0, void 0, function* () {
|
29542
29509
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
29543
29510
|
spokenLanguage: startCaptionsButtonProps.currentSpokenLanguage
|
@@ -29550,13 +29517,11 @@ const DesktopMoreButton = (props) => {
|
|
29550
29517
|
const callees = useSelector$1(getTargetCallees);
|
29551
29518
|
const allowDtmfDialer = showDtmfDialer(callees);
|
29552
29519
|
const [dtmfDialerChecked, setDtmfDialerChecked] = React.useState((_b = props.dtmfDialerPresent) !== null && _b !== void 0 ? _b : false);
|
29553
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */
|
29554
29520
|
const moreButtonStrings = React.useMemo(() => ({
|
29555
29521
|
label: localeStrings.strings.call.moreButtonCallingLabel,
|
29556
29522
|
tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
|
29557
29523
|
}), [localeStrings]);
|
29558
29524
|
const moreButtonContextualMenuItems = [];
|
29559
|
-
/* @conditional-compile-remove(close-captions) */
|
29560
29525
|
const menuSubIconStyleSet = {
|
29561
29526
|
root: {
|
29562
29527
|
height: 'unset',
|
@@ -29578,7 +29543,6 @@ const DesktopMoreButton = (props) => {
|
|
29578
29543
|
disabled: props.disableButtonsForHoldScreen
|
29579
29544
|
});
|
29580
29545
|
// is captions feature is active
|
29581
|
-
/* @conditional-compile-remove(close-captions) */
|
29582
29546
|
if (props.isCaptionsSupported) {
|
29583
29547
|
const captionsContextualMenuItems = [];
|
29584
29548
|
moreButtonContextualMenuItems.push({
|
@@ -29833,9 +29797,7 @@ const DesktopMoreButton = (props) => {
|
|
29833
29797
|
styles: buttonFlyoutIncreasedSizeStyles
|
29834
29798
|
} }, element));
|
29835
29799
|
});
|
29836
|
-
return (React.createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "common-call-composite-more-button",
|
29837
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */
|
29838
|
-
strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: {
|
29800
|
+
return (React.createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: {
|
29839
29801
|
items: moreButtonContextualMenuItems,
|
29840
29802
|
calloutProps: {
|
29841
29803
|
preventDismissOnEvent: _preventDismissOnEvent
|
@@ -30071,7 +30033,6 @@ const CommonCallControlBar = (props) => {
|
|
30071
30033
|
const [isOutOfSpace, setIsOutOfSpace] = React.useState(false);
|
30072
30034
|
const callWithChatStrings = useCallWithChatCompositeStrings();
|
30073
30035
|
const options = inferCommonCallControlOptions(props.mobileView, props.callControls);
|
30074
|
-
/* @conditional-compile-remove(close-captions) */
|
30075
30036
|
const [showCaptionsSettingsModal, setShowCaptionsSettingsModal] = React.useState(false);
|
30076
30037
|
/* @conditional-compile-remove(end-call-options) */
|
30077
30038
|
// If the hangup capability is not present, we default to true
|
@@ -30104,11 +30065,9 @@ const CommonCallControlBar = (props) => {
|
|
30104
30065
|
React.useEffect(() => {
|
30105
30066
|
setIsOutOfSpace(totalButtonsWidth > controlBarContainerWidth);
|
30106
30067
|
}, [totalButtonsWidth, controlBarContainerWidth]);
|
30107
|
-
/* @conditional-compile-remove(close-captions) */
|
30108
30068
|
const openCaptionsSettingsModal = React.useCallback(() => {
|
30109
30069
|
setShowCaptionsSettingsModal(true);
|
30110
30070
|
}, []);
|
30111
|
-
/* @conditional-compile-remove(close-captions) */
|
30112
30071
|
const onDismissCaptionsSettings = React.useCallback(() => {
|
30113
30072
|
setShowCaptionsSettingsModal(false);
|
30114
30073
|
}, []);
|
@@ -30164,17 +30123,15 @@ const CommonCallControlBar = (props) => {
|
|
30164
30123
|
const showExitSpotlightButton = (options === null || options === void 0 ? void 0 : options.exitSpotlightButton) !== false;
|
30165
30124
|
const showCaptionsButton = props.isCaptionsSupported &&
|
30166
30125
|
/* @conditional-compile-remove(acs-close-captions) */ isEnabled$1(options.captionsButton);
|
30167
|
-
const showDesktopMoreButton =
|
30168
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
30126
|
+
const showDesktopMoreButton = isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
30169
30127
|
(/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) ||
|
30170
|
-
|
30128
|
+
showCaptionsButton ||
|
30171
30129
|
props.onUserSetGalleryLayout);
|
30172
30130
|
const role = (_b = props.callAdapter.getState().call) === null || _b === void 0 ? void 0 : _b.role;
|
30173
30131
|
const hideRaiseHandButtonInRoomsCall = props.callAdapter.getState().isRoomsCall && role && ['Consumer', 'Unknown'].includes(role);
|
30174
30132
|
const reactionResources = props.callAdapter.getState().reactions;
|
30175
30133
|
return (React.createElement("div", { ref: controlBarSizeRef },
|
30176
|
-
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
30177
|
-
/* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (React.createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: props.isCaptionsOn && props.useTeamsCaptions }))),
|
30134
|
+
React.createElement(CallAdapterProvider, { adapter: props.callAdapter }, showCaptionsSettingsModal && (React.createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings, changeCaptionLanguage: props.isCaptionsOn && props.useTeamsCaptions }))),
|
30178
30135
|
React.createElement(react.Stack, { horizontal: true, reversed: !props.mobileView && !isOutOfSpace, horizontalAlign: "space-between", className: react.mergeStyles(callControlsContainerStyles, controlBarContainerStyles, controlBarDesktopContainerStyles) },
|
30179
30136
|
React.createElement(react.Stack.Item, { grow: true, className: react.mergeStyles(controlBarWrapperDesktopStyles) },
|
30180
30137
|
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
@@ -30214,11 +30171,7 @@ const CommonCallControlBar = (props) => {
|
|
30214
30171
|
props.mobileView && (React.createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage, disableTooltip: props.mobileView })),
|
30215
30172
|
!props.mobileView && showDesktopMoreButton && (React.createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles,
|
30216
30173
|
/*@conditional-compile-remove(PSTN-calls) */
|
30217
|
-
onClickShowDialpad: props.onClickShowDialpad, callControls: props.callControls,
|
30218
|
-
/* @conditional-compile-remove(close-captions) */
|
30219
|
-
isCaptionsSupported: showCaptionsButton,
|
30220
|
-
/* @conditional-compile-remove(close-captions) */
|
30221
|
-
onCaptionsSettingsClick: openCaptionsSettingsModal, onUserSetOverflowGalleryPositionChange: props.onUserSetOverflowGalleryPositionChange, onUserSetGalleryLayout: props.onUserSetGalleryLayout, userSetGalleryLayout: props.userSetGalleryLayout, dtmfDialerPresent: props.dtmfDialerPresent, onSetDialpadPage: props.onSetDialpadPage })),
|
30174
|
+
onClickShowDialpad: props.onClickShowDialpad, callControls: props.callControls, isCaptionsSupported: showCaptionsButton, onCaptionsSettingsClick: openCaptionsSettingsModal, onUserSetOverflowGalleryPositionChange: props.onUserSetOverflowGalleryPositionChange, onUserSetGalleryLayout: props.onUserSetGalleryLayout, userSetGalleryLayout: props.userSetGalleryLayout, dtmfDialerPresent: props.dtmfDialerPresent, onSetDialpadPage: props.onSetDialpadPage })),
|
30222
30175
|
React.createElement(EndCall, { displayType: "compact", mobileView: props.mobileView, styles: endCallButtonStyles,
|
30223
30176
|
/* @conditional-compile-remove(end-call-options) */
|
30224
30177
|
enableEndCallMenu: !isBoolean(props.callControls) &&
|
@@ -30415,13 +30368,10 @@ const captionSettingsDrawerStyles = (theme) => ({
|
|
30415
30368
|
/** @private */
|
30416
30369
|
const CaptionLanguageSettingsDrawer = (props) => {
|
30417
30370
|
var _a;
|
30418
|
-
/* @conditional-compile-remove(close-captions) */
|
30419
30371
|
const theme = useTheme();
|
30420
|
-
/* @conditional-compile-remove(close-captions) */
|
30421
30372
|
const onDrawerItemClick = React.useCallback((languageCode) => {
|
30422
30373
|
props.selectLanguage(languageCode);
|
30423
30374
|
}, [props]);
|
30424
|
-
/* @conditional-compile-remove(close-captions) */
|
30425
30375
|
const drawerItems = React.useMemo(() => {
|
30426
30376
|
var _a;
|
30427
30377
|
return _getKeys((_a = props.supportedLanguageStrings) !== null && _a !== void 0 ? _a : []).map((languageCode) => ({
|
@@ -30435,7 +30385,6 @@ const CaptionLanguageSettingsDrawer = (props) => {
|
|
30435
30385
|
const copy = [...drawerItems];
|
30436
30386
|
return copy.sort((a, b) => (a.text && b.text && a.text > b.text ? 1 : -1));
|
30437
30387
|
}, [drawerItems]);
|
30438
|
-
/* @conditional-compile-remove(close-captions) */
|
30439
30388
|
return (React.createElement(_DrawerMenu, { heading: (_a = props.strings) === null || _a === void 0 ? void 0 : _a.menuTitle, items: sortedDrawerItems !== null && sortedDrawerItems !== void 0 ? sortedDrawerItems : [], onLightDismiss: () => {
|
30440
30389
|
props.setCurrentLanguage(props.currentLanguage);
|
30441
30390
|
props.onLightDismiss();
|
@@ -30473,13 +30422,10 @@ const themedToggleButtonStyle = (theme, checked) => {
|
|
30473
30422
|
/** @private */
|
30474
30423
|
const SpokenLanguageSettingsDrawer = (props) => {
|
30475
30424
|
var _a;
|
30476
|
-
/* @conditional-compile-remove(close-captions) */
|
30477
30425
|
const theme = useTheme();
|
30478
|
-
/* @conditional-compile-remove(close-captions) */
|
30479
30426
|
const onDrawerItemClick = React.useCallback((languageCode) => {
|
30480
30427
|
props.selectLanguage(languageCode);
|
30481
30428
|
}, [props]);
|
30482
|
-
/* @conditional-compile-remove(close-captions) */
|
30483
30429
|
const drawerItems = React.useMemo(() => {
|
30484
30430
|
var _a;
|
30485
30431
|
return _getKeys((_a = props.supportedLanguageStrings) !== null && _a !== void 0 ? _a : []).map((languageCode) => ({
|
@@ -30493,7 +30439,6 @@ const SpokenLanguageSettingsDrawer = (props) => {
|
|
30493
30439
|
const copy = [...drawerItems];
|
30494
30440
|
return copy.sort((a, b) => (a.text && b.text && a.text > b.text ? 1 : -1));
|
30495
30441
|
}, [drawerItems]);
|
30496
|
-
/* @conditional-compile-remove(close-captions) */
|
30497
30442
|
return (React.createElement(_DrawerMenu, { heading: (_a = props.strings) === null || _a === void 0 ? void 0 : _a.menuTitle, items: sortedDrawerItems !== null && sortedDrawerItems !== void 0 ? sortedDrawerItems : [], onLightDismiss: () => {
|
30498
30443
|
props.setCurrentLanguage(props.currentLanguage);
|
30499
30444
|
props.onLightDismiss();
|
@@ -30521,7 +30466,6 @@ const inferCallWithChatControlOptions = (callWithChatControls) => {
|
|
30521
30466
|
/** @private */
|
30522
30467
|
const MoreDrawer = (props) => {
|
30523
30468
|
var _a, _b, _c, _d, _e, _f, _g;
|
30524
|
-
/* @conditional-compile-remove(close-captions) */
|
30525
30469
|
const theme = react.useTheme();
|
30526
30470
|
const callAdapter = useAdapter();
|
30527
30471
|
const drawerMenuItems = [];
|
@@ -30735,27 +30679,17 @@ const MoreDrawer = (props) => {
|
|
30735
30679
|
}
|
30736
30680
|
});
|
30737
30681
|
}
|
30738
|
-
/* @conditional-compile-remove(close-captions) */
|
30739
30682
|
//Captions drawer menu
|
30740
30683
|
const supportedSpokenLanguageStrings = useLocale().strings.call.spokenLanguageStrings;
|
30741
|
-
/* @conditional-compile-remove(close-captions) */
|
30742
30684
|
//Captions drawer menu
|
30743
30685
|
const supportedCaptionLanguageStrings = useLocale().strings.call.captionLanguageStrings;
|
30744
|
-
/* @conditional-compile-remove(close-captions) */
|
30745
30686
|
const captionSettingsProp = useAdaptedSelector(_captionSettingsSelector);
|
30746
|
-
/* @conditional-compile-remove(close-captions) */
|
30747
30687
|
const startCaptionsButtonHandlers = useHandlers();
|
30748
|
-
/* @conditional-compile-remove(close-captions) */
|
30749
30688
|
const captionSettingsHandlers = useHandlers();
|
30750
|
-
/* @conditional-compile-remove(close-captions) */
|
30751
30689
|
const [isSpokenLanguageDrawerOpen, setIsSpokenLanguageDrawerOpen] = React.useState(false);
|
30752
|
-
/* @conditional-compile-remove(close-captions) */
|
30753
30690
|
const [isCaptionLanguageDrawerOpen, setIsCaptionLanguageDrawerOpen] = React.useState(false);
|
30754
|
-
/* @conditional-compile-remove(close-captions) */
|
30755
30691
|
const [currentSpokenLanguage, setCurrentSpokenLanguage] = React.useState((_f = captionSettingsProp.currentSpokenLanguage) !== null && _f !== void 0 ? _f : 'en-us');
|
30756
|
-
/* @conditional-compile-remove(close-captions) */
|
30757
30692
|
const [currentCaptionLanguage, setCurrentCaptionLanguage] = React.useState((_g = captionSettingsProp.currentCaptionLanguage) !== null && _g !== void 0 ? _g : _spokenLanguageToCaptionLanguage[currentSpokenLanguage]);
|
30758
|
-
/* @conditional-compile-remove(close-captions) */
|
30759
30693
|
const onToggleChange = React.useCallback(() => __awaiter$g(void 0, void 0, void 0, function* () {
|
30760
30694
|
if (!captionSettingsProp.isCaptionsFeatureActive) {
|
30761
30695
|
yield startCaptionsButtonHandlers.onStartCaptions({
|
@@ -30766,7 +30700,6 @@ const MoreDrawer = (props) => {
|
|
30766
30700
|
startCaptionsButtonHandlers.onStopCaptions();
|
30767
30701
|
}
|
30768
30702
|
}), [captionSettingsProp.isCaptionsFeatureActive, startCaptionsButtonHandlers, currentSpokenLanguage]);
|
30769
|
-
/* @conditional-compile-remove(close-captions) */
|
30770
30703
|
if (showCaptionsButton) {
|
30771
30704
|
const captionsDrawerItems = [];
|
30772
30705
|
const spokenLanguageString = supportedSpokenLanguageStrings
|
@@ -30846,7 +30779,6 @@ const MoreDrawer = (props) => {
|
|
30846
30779
|
customDrawerButtons['overflow'].forEach((element) => {
|
30847
30780
|
drawerMenuItems.push(element);
|
30848
30781
|
});
|
30849
|
-
/* @conditional-compile-remove(close-captions) */
|
30850
30782
|
return (React.createElement(React.Fragment, null,
|
30851
30783
|
isSpokenLanguageDrawerOpen && showCaptionsButton && (React.createElement(SpokenLanguageSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentSpokenLanguage, setCurrentLanguage: captionSettingsHandlers.onSetSpokenLanguage, currentLanguage: currentSpokenLanguage, strings: { menuTitle: props.strings.spokenLanguageMenuTitle }, supportedLanguageStrings: supportedSpokenLanguageStrings })),
|
30852
30784
|
isCaptionLanguageDrawerOpen && showCaptionsButton && (React.createElement(CaptionLanguageSettingsDrawer, { onLightDismiss: props.onLightDismiss, selectLanguage: setCurrentCaptionLanguage, setCurrentLanguage: captionSettingsHandlers.onSetCaptionLanguage, currentLanguage: currentCaptionLanguage, strings: { menuTitle: props.strings.captionLanguageMenuTitle }, supportedLanguageStrings: supportedCaptionLanguageStrings })),
|
@@ -30879,11 +30811,8 @@ const PreparedMoreDrawer = (props) => {
|
|
30879
30811
|
audioDeviceMenuTitle: strings.moreDrawerAudioDeviceMenuTitle,
|
30880
30812
|
microphoneMenuTitle: strings.moreDrawerMicrophoneMenuTitle,
|
30881
30813
|
speakerMenuTitle: strings.moreDrawerSpeakerMenuTitle,
|
30882
|
-
/* @conditional-compile-remove(close-captions) */
|
30883
30814
|
captionsMenuTitle: strings.moreDrawerCaptionsMenuTitle,
|
30884
|
-
/* @conditional-compile-remove(close-captions) */
|
30885
30815
|
spokenLanguageMenuTitle: strings.moreDrawerSpokenLanguageMenuTitle,
|
30886
|
-
/* @conditional-compile-remove(close-captions) */
|
30887
30816
|
captionLanguageMenuTitle: strings.moreDrawerCaptionLanguageMenuTitle,
|
30888
30817
|
galleryOptionsMenuTitle: strings.moreDrawerGalleryOptionsMenuTitle
|
30889
30818
|
}), [strings]);
|
@@ -32687,11 +32616,8 @@ const CallArrangement = (props) => {
|
|
32687
32616
|
}
|
32688
32617
|
/* @conditional-compile-remove(acs-close-captions) */
|
32689
32618
|
const isTeamsCaptions = useSelector$1(getCaptionsKind) === 'TeamsCaptions';
|
32690
|
-
/* @conditional-compile-remove(close-captions) */
|
32691
32619
|
const useTeamsCaptions = useSelector$1(getIsTeamsCall) || /* @conditional-compile-remove(acs-close-captions) */ isTeamsCaptions;
|
32692
|
-
/* @conditional-compile-remove(close-captions) */
|
32693
32620
|
const hasJoinedCall = useSelector$1(getCallStatus) === 'Connected';
|
32694
|
-
/* @conditional-compile-remove(close-captions) */
|
32695
32621
|
const isCaptionsOn = useSelector$1(getCaptionsStatus);
|
32696
32622
|
const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId);
|
32697
32623
|
const pipStyles = React.useMemo(() => getPipStyles(theme), [theme]);
|
@@ -32712,25 +32638,15 @@ const CallArrangement = (props) => {
|
|
32712
32638
|
/* @conditional-compile-remove(one-to-n-calling) */
|
32713
32639
|
onPeopleButtonClicked: togglePeoplePane, displayVertical: verticalControlBar }))) : (React.createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby,
|
32714
32640
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
32715
|
-
disableButtonsForHoldScreen: isInLocalHold, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked,
|
32716
|
-
|
32717
|
-
isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) ||
|
32718
|
-
/* @conditional-compile-remove(acs-close-captions) */ hasJoinedCall,
|
32719
|
-
/* @conditional-compile-remove(close-captions) */
|
32720
|
-
useTeamsCaptions: useTeamsCaptions,
|
32721
|
-
/* @conditional-compile-remove(close-captions) */
|
32722
|
-
isCaptionsOn: isCaptionsOn, onClickVideoEffects: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined, displayVertical: verticalControlBar, onUserSetOverflowGalleryPositionChange: props.onUserSetOverflowGalleryPositionChange, onUserSetGalleryLayout: props.onUserSetGalleryLayoutChange, userSetGalleryLayout: props.userSetGalleryLayout, onSetDialpadPage: props.onSetDialpadPage, dtmfDialerPresent: props.dtmfDialerPresent, peopleButtonRef: peopleButtonRef, cameraButtonRef: cameraButtonRef,
|
32641
|
+
disableButtonsForHoldScreen: isInLocalHold, peopleButtonChecked: isPeoplePaneOpen, onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked, isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) ||
|
32642
|
+
/* @conditional-compile-remove(acs-close-captions) */ hasJoinedCall, useTeamsCaptions: useTeamsCaptions, isCaptionsOn: isCaptionsOn, onClickVideoEffects: onResolveVideoEffectDependency ? openVideoEffectsPane : undefined, displayVertical: verticalControlBar, onUserSetOverflowGalleryPositionChange: props.onUserSetOverflowGalleryPositionChange, onUserSetGalleryLayout: props.onUserSetGalleryLayoutChange, userSetGalleryLayout: props.userSetGalleryLayout, onSetDialpadPage: props.onSetDialpadPage, dtmfDialerPresent: props.dtmfDialerPresent, peopleButtonRef: peopleButtonRef, cameraButtonRef: cameraButtonRef,
|
32723
32643
|
/* @conditional-compile-remove(spotlight) */
|
32724
32644
|
onStopLocalSpotlight: !hideSpotlightButtons && localParticipant.spotlight ? onStopLocalSpotlightWithPrompt : undefined }))))),
|
32725
32645
|
((_j = props.callControlProps) === null || _j === void 0 ? void 0 : _j.options) !== false && showDrawer && (React.createElement(react.Stack, { styles: drawerContainerStylesValue },
|
32726
32646
|
React.createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
32727
32647
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
32728
|
-
disableButtonsForHoldScreen: isInLocalHold,
|
32729
|
-
|
32730
|
-
isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) ||
|
32731
|
-
/* @conditional-compile-remove(acs-close-captions) */ hasJoinedCall,
|
32732
|
-
/* @conditional-compile-remove(close-captions) */
|
32733
|
-
useTeamsCaptions: useTeamsCaptions, onUserSetGalleryLayout: props.onUserSetGalleryLayoutChange, userSetGalleryLayout: props.userSetGalleryLayout, onSetDialpadPage: props.onSetDialpadPage, dtmfDialerPresent: props.dtmfDialerPresent, reactionResources: adapter.getState().reactions }))),
|
32648
|
+
disableButtonsForHoldScreen: isInLocalHold, isCaptionsSupported: (useTeamsCaptions && hasJoinedCall) ||
|
32649
|
+
/* @conditional-compile-remove(acs-close-captions) */ hasJoinedCall, useTeamsCaptions: useTeamsCaptions, onUserSetGalleryLayout: props.onUserSetGalleryLayoutChange, userSetGalleryLayout: props.userSetGalleryLayout, onSetDialpadPage: props.onSetDialpadPage, dtmfDialerPresent: props.dtmfDialerPresent, reactionResources: adapter.getState().reactions }))),
|
32734
32650
|
React.createElement(react.Stack, { horizontal: true, grow: true },
|
32735
32651
|
React.createElement(react.Stack.Item, { style: callCompositeContainerCSS },
|
32736
32652
|
React.createElement(react.Stack.Item, { styles: callGalleryStyles, grow: true },
|
@@ -32745,10 +32661,7 @@ const CallArrangement = (props) => {
|
|
32745
32661
|
React.createElement(CapabilitiesChangedNotificationBar, Object.assign({}, props.capabilitiesChangedNotificationBarProps, { capabilitiesChangedNotifications: filteredCapabilitesChangedNotifications !== null && filteredCapabilitesChangedNotifications !== void 0 ? filteredCapabilitesChangedNotifications : [] })))),
|
32746
32662
|
canUnmute && !!props.mutedNotificationProps && (React.createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps)))),
|
32747
32663
|
renderGallery && props.onRenderGalleryContent && props.onRenderGalleryContent(),
|
32748
|
-
/* @conditional-compile-remove(
|
32749
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !isInLocalHold && (React.createElement(CaptionsBanner, { isMobile: props.mobileView, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData,
|
32750
|
-
/* @conditional-compile-remove(close-captions) */
|
32751
|
-
useTeamsCaptions: useTeamsCaptions }))))),
|
32664
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !isInLocalHold && (React.createElement(CaptionsBanner, { isMobile: props.mobileView, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, useTeamsCaptions: useTeamsCaptions }))))),
|
32752
32665
|
React.createElement(SidePane, { mobileView: props.mobileView, maxWidth: isVideoPaneOpen ? `${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem` : undefined, minWidth: isVideoPaneOpen ? `${VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM}rem` : undefined, updateSidePaneRenderer: props.updateSidePaneRenderer, onPeopleButtonClicked: props.mobileView && !shouldShowPeopleTabHeaderButton(props.callControlProps.options)
|
32753
32666
|
? undefined
|
32754
32667
|
: togglePeoplePane, disablePeopleButton: typeof props.callControlProps.options !== 'boolean' &&
|
@@ -32812,7 +32725,7 @@ const MediaGallery = (props) => {
|
|
32812
32725
|
const { pinnedParticipants = [], setPinnedParticipants,
|
32813
32726
|
/* @conditional-compile-remove(spotlight) */ setIsPromptOpen,
|
32814
32727
|
/* @conditional-compile-remove(spotlight) */ setPromptProps,
|
32815
|
-
/* @conditional-compile-remove(spotlight) */ hideSpotlightButtons } = props;
|
32728
|
+
/* @conditional-compile-remove(spotlight) */ hideSpotlightButtons, videoTilesOptions } = props;
|
32816
32729
|
const videoGalleryProps = usePropsFor$1(VideoGallery);
|
32817
32730
|
const cameraSwitcherCameras = useSelector$1(localVideoCameraCycleButtonSelector);
|
32818
32731
|
const cameraSwitcherCallback = useHandlers();
|
@@ -32880,7 +32793,7 @@ const MediaGallery = (props) => {
|
|
32880
32793
|
const layoutBasedOnUserSelection = () => {
|
32881
32794
|
return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;
|
32882
32795
|
};
|
32883
|
-
return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions$2, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar, remoteVideoTileMenu: remoteVideoTileMenuOptions, overflowGalleryPosition: overflowGalleryPosition, localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')
|
32796
|
+
return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { videoTilesOptions: videoTilesOptions, localVideoViewOptions: localVideoViewOptions$2, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar, remoteVideoTileMenu: remoteVideoTileMenuOptions, overflowGalleryPosition: overflowGalleryPosition, localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')
|
32884
32797
|
? 'hidden'
|
32885
32798
|
: props.isMobile && containerAspectRatio < 1
|
32886
32799
|
? '9:16'
|
@@ -32919,7 +32832,8 @@ const MediaGallery = (props) => {
|
|
32919
32832
|
/* @conditional-compile-remove(spotlight) */
|
32920
32833
|
onStopRemoteSpotlightWithPrompt,
|
32921
32834
|
/* @conditional-compile-remove(spotlight) */
|
32922
|
-
hideSpotlightButtons
|
32835
|
+
hideSpotlightButtons,
|
32836
|
+
videoTilesOptions
|
32923
32837
|
]);
|
32924
32838
|
return (React.createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
|
32925
32839
|
React.createElement(Announcer$1, { announcementString: announcerString, ariaLive: 'polite' }),
|
@@ -33253,7 +33167,7 @@ const CallPage = (props) => {
|
|
33253
33167
|
/* @conditional-compile-remove(spotlight) */
|
33254
33168
|
setPromptProps: setPromptProps,
|
33255
33169
|
/* @conditional-compile-remove(spotlight) */
|
33256
|
-
hideSpotlightButtons: (_a = options === null || options === void 0 ? void 0 : options.spotlight) === null || _a === void 0 ? void 0 : _a.hideSpotlightButtons })));
|
33170
|
+
hideSpotlightButtons: (_a = options === null || options === void 0 ? void 0 : options.spotlight) === null || _a === void 0 ? void 0 : _a.hideSpotlightButtons, videoTilesOptions: options === null || options === void 0 ? void 0 : options.videoTilesOptions })));
|
33257
33171
|
}
|
33258
33172
|
};
|
33259
33173
|
return (React.createElement(React.Fragment, null,
|
@@ -36255,13 +36169,10 @@ class AzureCommunicationCallAdapter {
|
|
36255
36169
|
this.sendDtmfTone.bind(this);
|
36256
36170
|
/* @conditional-compile-remove(unsupported-browser) */
|
36257
36171
|
this.allowUnsupportedBrowserVersion.bind(this);
|
36258
|
-
|
36259
|
-
|
36260
|
-
|
36261
|
-
|
36262
|
-
this.setSpokenLanguage.bind(this);
|
36263
|
-
this.setCaptionLanguage.bind(this);
|
36264
|
-
}
|
36172
|
+
this.startCaptions.bind(this);
|
36173
|
+
this.stopCaptions.bind(this);
|
36174
|
+
this.setSpokenLanguage.bind(this);
|
36175
|
+
this.setCaptionLanguage.bind(this);
|
36265
36176
|
this.startVideoBackgroundEffect.bind(this);
|
36266
36177
|
this.stopVideoBackgroundEffects.bind(this);
|
36267
36178
|
this.updateBackgroundPickerImages.bind(this);
|
@@ -36704,25 +36615,21 @@ class AzureCommunicationCallAdapter {
|
|
36704
36615
|
this.handlers.onSendDtmfTone(dtmfTone);
|
36705
36616
|
});
|
36706
36617
|
}
|
36707
|
-
/* @conditional-compile-remove(close-captions) */
|
36708
36618
|
startCaptions(options) {
|
36709
36619
|
return __awaiter$5(this, void 0, void 0, function* () {
|
36710
36620
|
this.handlers.onStartCaptions(options);
|
36711
36621
|
});
|
36712
36622
|
}
|
36713
|
-
/* @conditional-compile-remove(close-captions) */
|
36714
36623
|
stopCaptions() {
|
36715
36624
|
return __awaiter$5(this, void 0, void 0, function* () {
|
36716
36625
|
this.handlers.onStopCaptions();
|
36717
36626
|
});
|
36718
36627
|
}
|
36719
|
-
/* @conditional-compile-remove(close-captions) */
|
36720
36628
|
setCaptionLanguage(language) {
|
36721
36629
|
return __awaiter$5(this, void 0, void 0, function* () {
|
36722
36630
|
this.handlers.onSetCaptionLanguage(language);
|
36723
36631
|
});
|
36724
36632
|
}
|
36725
|
-
/* @conditional-compile-remove(close-captions) */
|
36726
36633
|
setSpokenLanguage(language) {
|
36727
36634
|
return __awaiter$5(this, void 0, void 0, function* () {
|
36728
36635
|
this.handlers.onSetSpokenLanguage(language);
|
@@ -36765,7 +36672,6 @@ class AzureCommunicationCallAdapter {
|
|
36765
36672
|
on(event, listener) {
|
36766
36673
|
this.emitter.on(event, listener);
|
36767
36674
|
}
|
36768
|
-
/* @conditional-compile-remove(close-captions) */
|
36769
36675
|
subscribeToCaptionEvents() {
|
36770
36676
|
var _a, _b;
|
36771
36677
|
if (this.call && this.call.state === 'Connected') {
|
@@ -36788,7 +36694,6 @@ class AzureCommunicationCallAdapter {
|
|
36788
36694
|
}
|
36789
36695
|
}
|
36790
36696
|
}
|
36791
|
-
/* @conditional-compile-remove(close-captions) */
|
36792
36697
|
unsubscribeFromCaptionEvents() {
|
36793
36698
|
var _a, _b, _c;
|
36794
36699
|
if (this.call && this.call.state === 'Connected') {
|
@@ -36821,7 +36726,6 @@ class AzureCommunicationCallAdapter {
|
|
36821
36726
|
(_b = this.call) === null || _b === void 0 ? void 0 : _b.on('isMutedChanged', this.isMyMutedChanged.bind(this));
|
36822
36727
|
(_c = this.call) === null || _c === void 0 ? void 0 : _c.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));
|
36823
36728
|
(_d = this.call) === null || _d === void 0 ? void 0 : _d.on('idChanged', this.callIdChanged.bind(this));
|
36824
|
-
/* @conditional-compile-remove(close-captions) */
|
36825
36729
|
(_e = this.call) === null || _e === void 0 ? void 0 : _e.on('stateChanged', this.subscribeToCaptionEvents.bind(this));
|
36826
36730
|
(_f = this.call) === null || _f === void 0 ? void 0 : _f.on('roleChanged', this.roleChanged.bind(this));
|
36827
36731
|
(_g = this.call) === null || _g === void 0 ? void 0 : _g.feature(communicationCalling.Features.Transfer).on('transferAccepted', this.transferAccepted.bind(this));
|
@@ -36840,7 +36744,6 @@ class AzureCommunicationCallAdapter {
|
|
36840
36744
|
(_c = this.call) === null || _c === void 0 ? void 0 : _c.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));
|
36841
36745
|
(_d = this.call) === null || _d === void 0 ? void 0 : _d.off('idChanged', this.callIdChanged.bind(this));
|
36842
36746
|
(_e = this.call) === null || _e === void 0 ? void 0 : _e.off('roleChanged', this.roleChanged.bind(this));
|
36843
|
-
/* @conditional-compile-remove(close-captions) */
|
36844
36747
|
this.unsubscribeFromCaptionEvents();
|
36845
36748
|
if (this.callingSoundSubscriber) {
|
36846
36749
|
this.callingSoundSubscriber.unsubscribeAll();
|
@@ -36866,7 +36769,6 @@ class AzureCommunicationCallAdapter {
|
|
36866
36769
|
var _a;
|
36867
36770
|
this.emitter.emit('isLocalScreenSharingActiveChanged', { isScreenSharingOn: (_a = this.call) === null || _a === void 0 ? void 0 : _a.isScreenSharingOn });
|
36868
36771
|
}
|
36869
|
-
/* @conditional-compile-remove(close-captions) */
|
36870
36772
|
teamsCaptionsReceived(captionsInfo) {
|
36871
36773
|
this.emitter.emit('captionsReceived', { captionsInfo });
|
36872
36774
|
}
|
@@ -36874,7 +36776,6 @@ class AzureCommunicationCallAdapter {
|
|
36874
36776
|
captionsReceived(captionsInfo) {
|
36875
36777
|
this.emitter.emit('captionsReceived', { captionsInfo });
|
36876
36778
|
}
|
36877
|
-
/* @conditional-compile-remove(close-captions) */
|
36878
36779
|
isCaptionsActiveChanged() {
|
36879
36780
|
var _a;
|
36880
36781
|
const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Captions).captions;
|
@@ -36882,7 +36783,6 @@ class AzureCommunicationCallAdapter {
|
|
36882
36783
|
isActive: captionsFeature.isCaptionsFeatureActive
|
36883
36784
|
});
|
36884
36785
|
}
|
36885
|
-
/* @conditional-compile-remove(close-captions) */
|
36886
36786
|
isSpokenLanguageChanged() {
|
36887
36787
|
var _a;
|
36888
36788
|
const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Captions).captions;
|
@@ -36890,7 +36790,6 @@ class AzureCommunicationCallAdapter {
|
|
36890
36790
|
activeSpokenLanguage: captionsFeature.activeSpokenLanguage
|
36891
36791
|
});
|
36892
36792
|
}
|
36893
|
-
/* @conditional-compile-remove(close-captions) */
|
36894
36793
|
isCaptionLanguageChanged() {
|
36895
36794
|
var _a;
|
36896
36795
|
const captionsFeature = (_a = this.call) === null || _a === void 0 ? void 0 : _a.feature(communicationCalling.Features.Captions).captions;
|
@@ -37461,25 +37360,21 @@ class CallWithChatBackedCallAdapter {
|
|
37461
37360
|
allowUnsupportedBrowserVersion() {
|
37462
37361
|
return this.callWithChatAdapter.allowUnsupportedBrowserVersion();
|
37463
37362
|
}
|
37464
|
-
/* @conditional-compile-remove(close-captions) */
|
37465
37363
|
startCaptions(options) {
|
37466
37364
|
return __awaiter$4(this, void 0, void 0, function* () {
|
37467
37365
|
this.callWithChatAdapter.startCaptions(options);
|
37468
37366
|
});
|
37469
37367
|
}
|
37470
|
-
/* @conditional-compile-remove(close-captions) */
|
37471
37368
|
stopCaptions() {
|
37472
37369
|
return __awaiter$4(this, void 0, void 0, function* () {
|
37473
37370
|
this.callWithChatAdapter.stopCaptions();
|
37474
37371
|
});
|
37475
37372
|
}
|
37476
|
-
/* @conditional-compile-remove(close-captions) */
|
37477
37373
|
setCaptionLanguage(language) {
|
37478
37374
|
return __awaiter$4(this, void 0, void 0, function* () {
|
37479
37375
|
this.callWithChatAdapter.setCaptionLanguage(language);
|
37480
37376
|
});
|
37481
37377
|
}
|
37482
|
-
/* @conditional-compile-remove(close-captions) */
|
37483
37378
|
setSpokenLanguage(language) {
|
37484
37379
|
return __awaiter$4(this, void 0, void 0, function* () {
|
37485
37380
|
this.callWithChatAdapter.setSpokenLanguage(language);
|
@@ -37580,7 +37475,7 @@ class CallWithChatBackedChatAdapter {
|
|
37580
37475
|
this.dispose = () => this.callWithChatAdapter.dispose();
|
37581
37476
|
this.onStateChange = (handler) => {
|
37582
37477
|
const convertedHandler = (state) => {
|
37583
|
-
handler(chatAdapterStateFromCallWithChatAdapterState(state));
|
37478
|
+
!!state.chat && handler(chatAdapterStateFromCallWithChatAdapterState(state));
|
37584
37479
|
};
|
37585
37480
|
this.callWithChatAdapter.onStateChange(convertedHandler);
|
37586
37481
|
this.eventStore.set(handler, convertedHandler);
|
@@ -37653,6 +37548,10 @@ class CallWithChatBackedChatAdapter {
|
|
37653
37548
|
};
|
37654
37549
|
this.callWithChatAdapter = callWithChatAdapter;
|
37655
37550
|
}
|
37551
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37552
|
+
sendMessageWithAttachments(content, attachments) {
|
37553
|
+
return this.callWithChatAdapter.sendMessageWithAttachments(content, attachments);
|
37554
|
+
}
|
37656
37555
|
downloadResourceToCache(resourceDetails) {
|
37657
37556
|
return __awaiter$3(this, void 0, void 0, function* () {
|
37658
37557
|
this.callWithChatAdapter.downloadResourceToCache(resourceDetails);
|
@@ -37664,7 +37563,26 @@ class CallWithChatBackedChatAdapter {
|
|
37664
37563
|
}
|
37665
37564
|
function chatAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState) {
|
37666
37565
|
if (!callWithChatAdapterState.chat) {
|
37667
|
-
|
37566
|
+
// Return some empty state if chat is not initialized yet
|
37567
|
+
return {
|
37568
|
+
userId: callWithChatAdapterState.userId,
|
37569
|
+
displayName: callWithChatAdapterState.displayName || '',
|
37570
|
+
thread: {
|
37571
|
+
chatMessages: {},
|
37572
|
+
participants: {
|
37573
|
+
[toFlatCommunicationIdentifier(callWithChatAdapterState.userId)]: {
|
37574
|
+
id: callWithChatAdapterState.userId
|
37575
|
+
}
|
37576
|
+
},
|
37577
|
+
threadId: '',
|
37578
|
+
readReceipts: [],
|
37579
|
+
typingIndicators: [],
|
37580
|
+
latestReadTime: new Date()
|
37581
|
+
},
|
37582
|
+
latestErrors: callWithChatAdapterState.latestChatErrors,
|
37583
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37584
|
+
_attachmentUploads: callWithChatAdapterState._attachmentUploads
|
37585
|
+
};
|
37668
37586
|
}
|
37669
37587
|
return {
|
37670
37588
|
userId: callWithChatAdapterState.userId,
|
@@ -37672,7 +37590,7 @@ function chatAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
37672
37590
|
thread: callWithChatAdapterState.chat,
|
37673
37591
|
latestErrors: callWithChatAdapterState.latestChatErrors,
|
37674
37592
|
/* @conditional-compile-remove(attachment-upload) */
|
37675
|
-
|
37593
|
+
_attachmentUploads: callWithChatAdapterState._attachmentUploads
|
37676
37594
|
};
|
37677
37595
|
}
|
37678
37596
|
|
@@ -38084,7 +38002,7 @@ function callWithChatAdapterStateFromBackingStates(callAdapter) {
|
|
38084
38002
|
latestCallErrors: callAdapterState.latestErrors,
|
38085
38003
|
latestChatErrors: {},
|
38086
38004
|
/* @conditional-compile-remove(attachment-upload) */
|
38087
|
-
|
38005
|
+
_attachmentUploads: {},
|
38088
38006
|
/* @conditional-compile-remove(PSTN-calls) */
|
38089
38007
|
alternateCallerId: callAdapterState.alternateCallerId,
|
38090
38008
|
/* @conditional-compile-remove(unsupported-browser) */
|
@@ -38104,7 +38022,7 @@ function callWithChatAdapterStateFromBackingStates(callAdapter) {
|
|
38104
38022
|
function mergeChatAdapterStateIntoCallWithChatAdapterState(existingCallWithChatAdapterState, chatAdapterState) {
|
38105
38023
|
return Object.assign(Object.assign({}, existingCallWithChatAdapterState), { chat: chatAdapterState.thread, latestChatErrors: chatAdapterState.latestErrors,
|
38106
38024
|
/* @conditional-compile-remove(attachment-upload) */
|
38107
|
-
|
38025
|
+
_attachmentUploads: chatAdapterState._attachmentUploads });
|
38108
38026
|
}
|
38109
38027
|
/**
|
38110
38028
|
* @private
|
@@ -38250,6 +38168,8 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38250
38168
|
this.disposeScreenShareStreamView.bind(this);
|
38251
38169
|
this.fetchInitialData.bind(this);
|
38252
38170
|
this.sendMessage.bind(this);
|
38171
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38172
|
+
this.sendMessageWithAttachments.bind(this);
|
38253
38173
|
this.sendReadReceipt.bind(this);
|
38254
38174
|
this.sendTypingIndicator.bind(this);
|
38255
38175
|
this.loadPreviousChatMessages.bind(this);
|
@@ -38282,12 +38202,10 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38282
38202
|
this.sendDtmfTone.bind(this);
|
38283
38203
|
/* @conditional-compile-remove(unsupported-browser) */
|
38284
38204
|
this.allowUnsupportedBrowserVersion.bind(this);
|
38285
|
-
|
38286
|
-
|
38287
|
-
|
38288
|
-
|
38289
|
-
this.setCaptionLanguage.bind(this);
|
38290
|
-
}
|
38205
|
+
this.startCaptions.bind(this);
|
38206
|
+
this.stopCaptions.bind(this);
|
38207
|
+
this.setSpokenLanguage.bind(this);
|
38208
|
+
this.setCaptionLanguage.bind(this);
|
38291
38209
|
this.startVideoBackgroundEffect.bind(this);
|
38292
38210
|
this.stopVideoBackgroundEffects.bind(this);
|
38293
38211
|
this.updateBackgroundPickerImages.bind(this);
|
@@ -38500,6 +38418,20 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38500
38418
|
});
|
38501
38419
|
});
|
38502
38420
|
}
|
38421
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38422
|
+
/** Send a chat message with attachments. */
|
38423
|
+
sendMessageWithAttachments(content, attachments) {
|
38424
|
+
return __awaiter$2(this, void 0, void 0, function* () {
|
38425
|
+
return yield this.chatAdapterPromise.then((adapter) => {
|
38426
|
+
const fileSharingMetadata = {
|
38427
|
+
fileSharingMetadata: JSON.stringify(attachments)
|
38428
|
+
};
|
38429
|
+
return adapter.sendMessage(content, {
|
38430
|
+
metadata: fileSharingMetadata
|
38431
|
+
});
|
38432
|
+
});
|
38433
|
+
});
|
38434
|
+
}
|
38503
38435
|
/** Send a chat read receipt. */
|
38504
38436
|
sendReadReceipt(chatMessageId) {
|
38505
38437
|
return __awaiter$2(this, void 0, void 0, function* () {
|
@@ -38585,25 +38517,21 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38585
38517
|
allowUnsupportedBrowserVersion() {
|
38586
38518
|
return this.callAdapter.allowUnsupportedBrowserVersion();
|
38587
38519
|
}
|
38588
|
-
/* @conditional-compile-remove(close-captions) */
|
38589
38520
|
startCaptions(options) {
|
38590
38521
|
return __awaiter$2(this, void 0, void 0, function* () {
|
38591
38522
|
yield this.callAdapter.startCaptions(options);
|
38592
38523
|
});
|
38593
38524
|
}
|
38594
|
-
/* @conditional-compile-remove(close-captions) */
|
38595
38525
|
stopCaptions() {
|
38596
38526
|
return __awaiter$2(this, void 0, void 0, function* () {
|
38597
38527
|
yield this.callAdapter.stopCaptions();
|
38598
38528
|
});
|
38599
38529
|
}
|
38600
|
-
/* @conditional-compile-remove(close-captions) */
|
38601
38530
|
setCaptionLanguage(language) {
|
38602
38531
|
return __awaiter$2(this, void 0, void 0, function* () {
|
38603
38532
|
yield this.callAdapter.setCaptionLanguage(language);
|
38604
38533
|
});
|
38605
38534
|
}
|
38606
|
-
/* @conditional-compile-remove(close-captions) */
|
38607
38535
|
setSpokenLanguage(language) {
|
38608
38536
|
return __awaiter$2(this, void 0, void 0, function* () {
|
38609
38537
|
yield this.callAdapter.setSpokenLanguage(language);
|
@@ -38682,19 +38610,15 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38682
38610
|
case 'selectedSpeakerChanged':
|
38683
38611
|
this.callAdapter.on('selectedSpeakerChanged', listener);
|
38684
38612
|
break;
|
38685
|
-
/* @conditional-compile-remove(close-captions) */
|
38686
38613
|
case 'captionsReceived':
|
38687
38614
|
this.callAdapter.on('captionsReceived', listener);
|
38688
38615
|
break;
|
38689
|
-
/* @conditional-compile-remove(close-captions) */
|
38690
38616
|
case 'isCaptionsActiveChanged':
|
38691
38617
|
this.callAdapter.on('isCaptionsActiveChanged', listener);
|
38692
38618
|
break;
|
38693
|
-
/* @conditional-compile-remove(close-captions) */
|
38694
38619
|
case 'isCaptionLanguageChanged':
|
38695
38620
|
this.callAdapter.on('isCaptionLanguageChanged', listener);
|
38696
38621
|
break;
|
38697
|
-
/* @conditional-compile-remove(close-captions) */
|
38698
38622
|
case 'isSpokenLanguageChanged':
|
38699
38623
|
this.callAdapter.on('isSpokenLanguageChanged', listener);
|
38700
38624
|
break;
|
@@ -38778,19 +38702,15 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38778
38702
|
case 'selectedSpeakerChanged':
|
38779
38703
|
this.callAdapter.off('selectedSpeakerChanged', listener);
|
38780
38704
|
break;
|
38781
|
-
/* @conditional-compile-remove(close-captions) */
|
38782
38705
|
case 'captionsReceived':
|
38783
38706
|
this.callAdapter.off('captionsReceived', listener);
|
38784
38707
|
break;
|
38785
|
-
/* @conditional-compile-remove(close-captions) */
|
38786
38708
|
case 'isCaptionsActiveChanged':
|
38787
38709
|
this.callAdapter.off('isCaptionsActiveChanged', listener);
|
38788
38710
|
break;
|
38789
|
-
/* @conditional-compile-remove(close-captions) */
|
38790
38711
|
case 'isCaptionLanguageChanged':
|
38791
38712
|
this.callAdapter.off('isCaptionLanguageChanged', listener);
|
38792
38713
|
break;
|
38793
|
-
/* @conditional-compile-remove(close-captions) */
|
38794
38714
|
case 'isSpokenLanguageChanged':
|
38795
38715
|
this.callAdapter.off('isSpokenLanguageChanged', listener);
|
38796
38716
|
break;
|
@@ -39662,4 +39582,4 @@ exports.useTeamsCall = useTeamsCall;
|
|
39662
39582
|
exports.useTeamsCallAdapter = useTeamsCallAdapter;
|
39663
39583
|
exports.useTeamsCallAgent = useTeamsCallAgent;
|
39664
39584
|
exports.useTheme = useTheme;
|
39665
|
-
//# sourceMappingURL=index-
|
39585
|
+
//# sourceMappingURL=index-C_f2xMbE.js.map
|