@azure/communication-react 1.15.0-alpha-202404030013 → 1.15.0-alpha-202404050013
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 +11 -18
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-B3cXye-F.js +122 -0
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-B3cXye-F.js.map +1 -0
- package/dist/dist-cjs/communication-react/{index-aOBAWcNI.js → index-C4BFVPuO.js} +508 -473
- package/dist/dist-cjs/communication-react/index-C4BFVPuO.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +2 -2
- 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 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +5 -35
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.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 +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -3
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +16 -9
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +8 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js +5 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +23 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +24 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +7 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +11 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +9 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/ReactionDrawerMenuItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/ReactionDrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.js +6 -2
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js +1 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js +11 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +16 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +36 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +11 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +5 -5
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +25 -25
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +6 -6
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +18 -18
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +16 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js +3 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +21 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +4 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +6 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -3
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +4 -3
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +13 -19
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +5 -6
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +2 -2
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -23
- 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.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -2
- 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 +0 -3
- 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/CallControls.js +7 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js +0 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +1 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.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 +2 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +3 -14
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CapabilityChangedNotificationTracking.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js +0 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +15 -15
- 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 +2 -3
- 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/CallWithChatBackedChatAdapter.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +8 -8
- 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.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/ChatComposite.d.ts +0 -14
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +18 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js +6 -6
- 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.js +22 -22
- 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.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +1 -1
- 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/AttachmentUploadButton.js +4 -4
- 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/hooks/useHandlers.js +9 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.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/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/ControlBar/CommonCallControlBar.js +7 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -5
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/package.json +13 -12
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-B8qxZi1I.js +0 -54
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-B8qxZi1I.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-aOBAWcNI.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -9
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -20
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.js +0 -45
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.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.15.0-alpha-
|
179
|
+
var telemetryVersion = '1.15.0-alpha-202404050013';
|
180
180
|
|
181
181
|
|
182
182
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -390,7 +390,6 @@ const isHideAttendeeNamesEnabled = (state, props) => {
|
|
390
390
|
/* @conditional-compile-remove(hide-attendee-name) */
|
391
391
|
return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.hideAttendeeNames) !== null && _b !== void 0 ? _b : false;
|
392
392
|
};
|
393
|
-
/* @conditional-compile-remove(capabilities) */
|
394
393
|
/**
|
395
394
|
* @private
|
396
395
|
*/
|
@@ -643,21 +642,12 @@ const maskDisplayNameWithRole = (displayName, localUserRole, participantRole, is
|
|
643
642
|
*
|
644
643
|
* @public
|
645
644
|
*/
|
646
|
-
const microphoneButtonSelector = reselect__namespace.createSelector([
|
647
|
-
getCallExists,
|
648
|
-
getIsMuted,
|
649
|
-
getDeviceManager$1,
|
650
|
-
/* @conditional-compile-remove(capabilities) */ getCapabilities,
|
651
|
-
/* @conditional-compile-remove(capabilities) */ getRole$1
|
652
|
-
], (callExists, isMuted, deviceManager,
|
653
|
-
/* @conditional-compile-remove(capabilities) */ capabilities,
|
654
|
-
/* @conditional-compile-remove(capabilities) */ role) => {
|
645
|
+
const microphoneButtonSelector = reselect__namespace.createSelector([getCallExists, getIsMuted, getDeviceManager$1, getCapabilities, getRole$1], (callExists, isMuted, deviceManager, capabilities, role) => {
|
655
646
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.audio : true;
|
656
|
-
/* @conditional-compile-remove(capabilities) */
|
657
647
|
const incapable = ((capabilities === null || capabilities === void 0 ? void 0 : capabilities.unmuteMic.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.unmuteMic.reason) !== 'NotInitialized') ||
|
658
648
|
role === 'Consumer';
|
659
649
|
return {
|
660
|
-
disabled: !callExists || !permission ||
|
650
|
+
disabled: !callExists || !permission || incapable,
|
661
651
|
checked: callExists ? !isMuted : false,
|
662
652
|
microphones: deviceManager.microphones,
|
663
653
|
speakers: deviceManager.speakers,
|
@@ -670,25 +660,14 @@ const microphoneButtonSelector = reselect__namespace.createSelector([
|
|
670
660
|
*
|
671
661
|
* @public
|
672
662
|
*/
|
673
|
-
const cameraButtonSelector = reselect__namespace.createSelector([
|
674
|
-
getLocalVideoStreams$1,
|
675
|
-
getDeviceManager$1,
|
676
|
-
/* @conditional-compile-remove(capabilities) */ getCapabilities,
|
677
|
-
/* @conditional-compile-remove(capabilities) */ getRole$1
|
678
|
-
], (localVideoStreams, deviceManager,
|
679
|
-
/* @conditional-compile-remove(capabilities) */ capabilities,
|
680
|
-
/* @conditional-compile-remove(capabilities) */ role) => {
|
663
|
+
const cameraButtonSelector = reselect__namespace.createSelector([getLocalVideoStreams$1, getDeviceManager$1, getCapabilities, getRole$1], (localVideoStreams, deviceManager, capabilities, role) => {
|
681
664
|
const previewOn = _isPreviewOn(deviceManager);
|
682
665
|
const localVideoFromCall = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
|
683
666
|
const permission = deviceManager.deviceAccess ? deviceManager.deviceAccess.video : true;
|
684
|
-
/* @conditional-compile-remove(capabilities) */
|
685
667
|
const incapable = ((capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOn.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOn.reason) !== 'NotInitialized') ||
|
686
668
|
role === 'Consumer';
|
687
669
|
return {
|
688
|
-
disabled: !deviceManager.selectedCamera ||
|
689
|
-
!permission ||
|
690
|
-
!deviceManager.cameras.length ||
|
691
|
-
/* @conditional-compile-remove(capabilities) */ incapable,
|
670
|
+
disabled: !deviceManager.selectedCamera || !permission || !deviceManager.cameras.length || incapable,
|
692
671
|
checked: localVideoStreams !== undefined && localVideoStreams.length > 0 ? !!localVideoFromCall : previewOn,
|
693
672
|
cameras: deviceManager.cameras,
|
694
673
|
selectedCamera: deviceManager.selectedCamera
|
@@ -723,17 +702,8 @@ const reactionButtonSelector = reselect__namespace.createSelector([getLocalParti
|
|
723
702
|
*
|
724
703
|
* @public
|
725
704
|
*/
|
726
|
-
const screenShareButtonSelector = reselect__namespace.createSelector([
|
727
|
-
getIsScreenSharingOn,
|
728
|
-
/* @conditional-compile-remove(PSTN-calls) */ getCallState,
|
729
|
-
/* @conditional-compile-remove(capabilities) */ getCapabilities,
|
730
|
-
/* @conditional-compile-remove(capabilities) */ getRole$1
|
731
|
-
], (isScreenSharingOn,
|
732
|
-
/* @conditional-compile-remove(PSTN-calls) */ callState,
|
733
|
-
/* @conditional-compile-remove(capabilities) */ capabilities,
|
734
|
-
/* @conditional-compile-remove(capabilities) */ role) => {
|
705
|
+
const screenShareButtonSelector = reselect__namespace.createSelector([getIsScreenSharingOn, /* @conditional-compile-remove(PSTN-calls) */ getCallState, getCapabilities, getRole$1], (isScreenSharingOn, /* @conditional-compile-remove(PSTN-calls) */ callState, capabilities, role) => {
|
735
706
|
let disabled = undefined;
|
736
|
-
/* @conditional-compile-remove(capabilities) */
|
737
707
|
disabled =
|
738
708
|
disabled ||
|
739
709
|
((capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.isPresent) === false && (capabilities === null || capabilities === void 0 ? void 0 : capabilities.shareScreen.reason) !== 'NotInitialized') ||
|
@@ -2315,7 +2285,6 @@ let CallContext$2 = class CallContext {
|
|
2315
2285
|
}
|
2316
2286
|
});
|
2317
2287
|
}
|
2318
|
-
/* @conditional-compile-remove(capabilities) */
|
2319
2288
|
setCapabilities(callId, capabilities, capabilitiesChangeInfo) {
|
2320
2289
|
this.modifyState((draft) => {
|
2321
2290
|
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
|
@@ -3991,7 +3960,6 @@ class OptimalVideoCountSubscriber {
|
|
3991
3960
|
|
3992
3961
|
// Copyright (c) Microsoft Corporation.
|
3993
3962
|
// Licensed under the MIT License.
|
3994
|
-
/* @conditional-compile-remove(capabilities) */
|
3995
3963
|
/**
|
3996
3964
|
* @private
|
3997
3965
|
*/
|
@@ -4176,7 +4144,6 @@ class CallSubscriber {
|
|
4176
4144
|
/* @conditional-compile-remove(acs-close-captions) */
|
4177
4145
|
(_c = this._CaptionsSubscriber) === null || _c === void 0 ? void 0 : _c.unsubscribe();
|
4178
4146
|
(_d = this._raiseHandSubscriber) === null || _d === void 0 ? void 0 : _d.unsubscribe();
|
4179
|
-
/* @conditional-compile-remove(capabilities) */
|
4180
4147
|
this._capabilitiesSubscriber.unsubscribe();
|
4181
4148
|
/* @conditional-compile-remove(reaction) */
|
4182
4149
|
(_e = this._reactionSubscriber) === null || _e === void 0 ? void 0 : _e.unsubscribe();
|
@@ -4293,7 +4260,6 @@ class CallSubscriber {
|
|
4293
4260
|
localOptimalVideoCountFeature: this._call.feature(communicationCalling.Features.OptimalVideoCount)
|
4294
4261
|
});
|
4295
4262
|
this._localVideoStreamVideoEffectsSubscribers = new Map();
|
4296
|
-
/* @conditional-compile-remove(capabilities) */
|
4297
4263
|
this._capabilitiesSubscriber = new CapabilitiesSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Capabilities));
|
4298
4264
|
/* @conditional-compile-remove(spotlight) */
|
4299
4265
|
this._spotlightSubscriber = new SpotlightSubscriber(this._callIdRef, this._context, this._call.feature(communicationCalling.Features.Spotlight));
|
@@ -6359,9 +6325,8 @@ const sendButtonStyle = react.mergeStyles({
|
|
6359
6325
|
*/
|
6360
6326
|
const sendIconStyle = (props) => {
|
6361
6327
|
const { theme, hasText, disabled = false,
|
6362
|
-
/* @conditional-compile-remove(attachment-
|
6363
|
-
const hasNoContent = !hasText &&
|
6364
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ !hasAttachment;
|
6328
|
+
/* @conditional-compile-remove(attachment-upload) */ hasAttachment, hasErrorMessage, customSendIconStyle, defaultTextColor = theme.palette.neutralTertiary } = props;
|
6329
|
+
const hasNoContent = !hasText && /* @conditional-compile-remove(attachment-upload) */ !hasAttachment;
|
6365
6330
|
return react.mergeStyles(editorTextBoxButtonStyle, {
|
6366
6331
|
color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary
|
6367
6332
|
}, customSendIconStyle);
|
@@ -6705,7 +6670,7 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
6705
6670
|
LowerHandContextualMenuItem: React.createElement(reactIcons.HandRightOff20Regular, null),
|
6706
6671
|
/* @conditional-compile-remove(reaction) */
|
6707
6672
|
ReactionButtonIcon: React.createElement(reactIcons.Emoji20Regular, null),
|
6708
|
-
/* @conditional-compile-remove(attachment-
|
6673
|
+
/* @conditional-compile-remove(attachment-upload) */
|
6709
6674
|
CancelAttachmentUpload: React.createElement(reactIcons.Dismiss16Regular, null),
|
6710
6675
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
6711
6676
|
DownloadAttachment: React.createElement(reactIcons.ArrowDownload20Regular, null),
|
@@ -8965,7 +8930,7 @@ const _AttachmentUploadCards = (props) => {
|
|
8965
8930
|
*/
|
8966
8931
|
const MAXIMUM_LENGTH_OF_MESSAGE = 8000;
|
8967
8932
|
const EMPTY_MESSAGE_REGEX = /^\s*$/;
|
8968
|
-
/* @conditional-compile-remove(attachment-
|
8933
|
+
/* @conditional-compile-remove(attachment-upload) */
|
8969
8934
|
/**
|
8970
8935
|
* @private
|
8971
8936
|
*/
|
@@ -8975,7 +8940,7 @@ const hasIncompleteAttachmentUploads = (activeAttachmentUploads) => {
|
|
8975
8940
|
.filter((attachmentUpload) => !attachmentUpload.uploadError)
|
8976
8941
|
.every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined));
|
8977
8942
|
};
|
8978
|
-
/* @conditional-compile-remove(attachment-
|
8943
|
+
/* @conditional-compile-remove(attachment-upload) */
|
8979
8944
|
/**
|
8980
8945
|
* @private
|
8981
8946
|
*/
|
@@ -9367,11 +9332,11 @@ const FluentProviderWithStylesOverrides = (props) => {
|
|
9367
9332
|
*
|
9368
9333
|
* @public
|
9369
9334
|
*/
|
9370
|
-
const SendBox
|
9335
|
+
const SendBox = (props) => {
|
9371
9336
|
const { disabled, systemMessage, supportNewline, onSendMessage, onTyping, onRenderIcon, onRenderSystemMessage, styles, autoFocus,
|
9372
9337
|
/* @conditional-compile-remove(mention) */
|
9373
9338
|
mentionLookupOptions,
|
9374
|
-
/* @conditional-compile-remove(attachment-
|
9339
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9375
9340
|
activeAttachmentUploads } = props;
|
9376
9341
|
const theme = useTheme();
|
9377
9342
|
const localeStrings = useLocale$1().strings.sendBox;
|
@@ -9380,7 +9345,7 @@ const SendBox$1 = (props) => {
|
|
9380
9345
|
const [textValue, setTextValue] = React.useState('');
|
9381
9346
|
const [textValueOverflow, setTextValueOverflow] = React.useState(false);
|
9382
9347
|
const sendTextFieldRef = React.useRef(null);
|
9383
|
-
/* @conditional-compile-remove(attachment-
|
9348
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9384
9349
|
const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = React.useState(undefined);
|
9385
9350
|
const sendMessageOnClick = () => {
|
9386
9351
|
var _a;
|
@@ -9389,9 +9354,9 @@ const SendBox$1 = (props) => {
|
|
9389
9354
|
return;
|
9390
9355
|
}
|
9391
9356
|
// Don't send message until all attachments have been uploaded successfully
|
9392
|
-
/* @conditional-compile-remove(attachment-
|
9357
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9393
9358
|
setAttachmentUploadsPendingError(undefined);
|
9394
|
-
/* @conditional-compile-remove(attachment-
|
9359
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9395
9360
|
if (hasIncompleteAttachmentUploads(activeAttachmentUploads)) {
|
9396
9361
|
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
9397
9362
|
return;
|
@@ -9400,7 +9365,7 @@ const SendBox$1 = (props) => {
|
|
9400
9365
|
// we don't want to send empty messages including spaces, newlines, tabs
|
9401
9366
|
// Message can be empty if there is a valid attachment upload
|
9402
9367
|
if (sanitizeText(message).length > 0 ||
|
9403
|
-
/* @conditional-compile-remove(attachment-
|
9368
|
+
/* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads(activeAttachmentUploads)) {
|
9404
9369
|
onSendMessage && onSendMessage(message);
|
9405
9370
|
setTextValue('');
|
9406
9371
|
}
|
@@ -9420,25 +9385,25 @@ const SendBox$1 = (props) => {
|
|
9420
9385
|
const mergedSendIconStyle = React.useMemo(() => sendIconStyle({
|
9421
9386
|
theme,
|
9422
9387
|
hasText: !!textValue,
|
9423
|
-
/* @conditional-compile-remove(attachment-
|
9388
|
+
/* @conditional-compile-remove(attachment-upload) */ hasAttachment: hasCompletedAttachmentUploads(activeAttachmentUploads),
|
9424
9389
|
hasErrorMessage: !!errorMessage,
|
9425
9390
|
customSendIconStyle: styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon
|
9426
9391
|
}), [
|
9427
9392
|
theme,
|
9428
9393
|
textValue,
|
9429
|
-
/* @conditional-compile-remove(attachment-
|
9394
|
+
/* @conditional-compile-remove(attachment-upload) */ activeAttachmentUploads,
|
9430
9395
|
errorMessage,
|
9431
9396
|
styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon
|
9432
9397
|
]);
|
9433
9398
|
const onRenderSendIcon = React.useCallback((isHover) => onRenderIcon ? (onRenderIcon(isHover)) : (React.createElement(react.Icon, { iconName: isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend', className: mergedSendIconStyle })), [mergedSendIconStyle, onRenderIcon, textValue]);
|
9434
9399
|
// Ensure that errors are cleared when there are no attachments in sendBox
|
9435
|
-
/* @conditional-compile-remove(attachment-
|
9400
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9436
9401
|
React.useEffect(() => {
|
9437
9402
|
if (!(activeAttachmentUploads === null || activeAttachmentUploads === void 0 ? void 0 : activeAttachmentUploads.filter((upload) => !upload.uploadError).length)) {
|
9438
9403
|
setAttachmentUploadsPendingError(undefined);
|
9439
9404
|
}
|
9440
9405
|
}, [activeAttachmentUploads]);
|
9441
|
-
/* @conditional-compile-remove(attachment-
|
9406
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9442
9407
|
const sendBoxErrorsProps = React.useMemo(() => {
|
9443
9408
|
var _a;
|
9444
9409
|
return {
|
@@ -9446,7 +9411,7 @@ const SendBox$1 = (props) => {
|
|
9446
9411
|
attachmentUploadError: (_a = activeAttachmentUploads === null || activeAttachmentUploads === void 0 ? void 0 : activeAttachmentUploads.filter((attachmentUpload) => attachmentUpload.uploadError).pop()) === null || _a === void 0 ? void 0 : _a.uploadError
|
9447
9412
|
};
|
9448
9413
|
}, [activeAttachmentUploads, attachmentUploadsPendingError]);
|
9449
|
-
/* @conditional-compile-remove(attachment-
|
9414
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9450
9415
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
9451
9416
|
var _a, _b, _c, _d, _e, _f;
|
9452
9417
|
if (!(activeAttachmentUploads === null || activeAttachmentUploads === void 0 ? void 0 : activeAttachmentUploads.filter((upload) => !upload.uploadError).length)) {
|
@@ -9468,8 +9433,8 @@ const SendBox$1 = (props) => {
|
|
9468
9433
|
localeStrings.uploadCompleted
|
9469
9434
|
]);
|
9470
9435
|
return (React.createElement(react.Stack, { className: react.mergeStyles(sendBoxWrapperStyles, { overflow: 'visible' } // This is needed for the mention popup to be visible
|
9471
|
-
) },
|
9472
|
-
|
9436
|
+
) }, /* @conditional-compile-remove(attachment-upload) */
|
9437
|
+
React.createElement(SendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
|
9473
9438
|
React.createElement(react.Stack, { className: borderAndBoxShadowStyle({
|
9474
9439
|
theme,
|
9475
9440
|
hasErrorMessage: !!errorMessage,
|
@@ -9491,7 +9456,7 @@ const SendBox$1 = (props) => {
|
|
9491
9456
|
}
|
9492
9457
|
e.stopPropagation();
|
9493
9458
|
}, id: 'sendIconWrapper', className: mergedSendButtonStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel })),
|
9494
|
-
/* @conditional-compile-remove(attachment-
|
9459
|
+
/* @conditional-compile-remove(attachment-upload) */
|
9495
9460
|
onRenderAttachmentUploads())));
|
9496
9461
|
};
|
9497
9462
|
|
@@ -9943,6 +9908,15 @@ const richTextFormatButtonIconStyle = (theme, isSelected) => {
|
|
9943
9908
|
color: isSelected ? theme.palette.themePrimary : theme.palette.neutralSecondary
|
9944
9909
|
});
|
9945
9910
|
};
|
9911
|
+
/**
|
9912
|
+
* @private
|
9913
|
+
*/
|
9914
|
+
const editBoxRichTextEditorStyle = () => {
|
9915
|
+
return {
|
9916
|
+
minHeight: '2.25rem',
|
9917
|
+
maxHeight: '2.25rem'
|
9918
|
+
};
|
9919
|
+
};
|
9946
9920
|
/**
|
9947
9921
|
* @private
|
9948
9922
|
*/
|
@@ -10000,6 +9974,12 @@ const insertTableMenuTitleStyles = react.mergeStyles({
|
|
10000
9974
|
fontSize: '0.75rem',
|
10001
9975
|
marginBottom: '0.5rem'
|
10002
9976
|
});
|
9977
|
+
/**
|
9978
|
+
* @private
|
9979
|
+
*/
|
9980
|
+
const tableContextMenuIconStyles = react.mergeStyles({
|
9981
|
+
marginTop: '0.375rem'
|
9982
|
+
});
|
10003
9983
|
|
10004
9984
|
// Copyright (c) Microsoft Corporation.
|
10005
9985
|
// Licensed under the MIT License.
|
@@ -10153,8 +10133,7 @@ const insertTableButton = (theme, maxRowsNumber, maxColumnsNumber) => {
|
|
10153
10133
|
menuIconProps: {
|
10154
10134
|
hidden: true
|
10155
10135
|
},
|
10156
|
-
onRenderIcon: (
|
10157
|
-
console.log('onRenderIcon', item);
|
10136
|
+
onRenderIcon: () => {
|
10158
10137
|
return React.createElement(TableIcon, null);
|
10159
10138
|
},
|
10160
10139
|
buttonStyles: ribbonTableButtonStyle(theme),
|
@@ -10236,8 +10215,8 @@ const ribbonButtons = (theme) => {
|
|
10236
10215
|
dividerRibbonButton(theme, 'RichTextRibbonTextFormatDivider'),
|
10237
10216
|
bulletListButton(theme),
|
10238
10217
|
numberListButton(theme),
|
10239
|
-
indentIncreaseButton(theme),
|
10240
10218
|
indentDecreaseButton(theme),
|
10219
|
+
indentIncreaseButton(theme),
|
10241
10220
|
dividerRibbonButton(theme, 'RichTextRibbonTableDivider'),
|
10242
10221
|
insertTableButton(theme, MaxRowsNumber, MaxColumnsNumber)
|
10243
10222
|
].forEach((item) => {
|
@@ -10314,7 +10293,11 @@ const tableEditInsertMenuItem = {
|
|
10314
10293
|
menuNameTableInsertLeft: 'Insert left123 ',
|
10315
10294
|
menuNameTableInsertRight: 'Insert right'
|
10316
10295
|
},
|
10317
|
-
onClick
|
10296
|
+
onClick,
|
10297
|
+
iconProps: {
|
10298
|
+
iconName: 'RichTextTableInsertMenuIcon',
|
10299
|
+
styles: { root: tableContextMenuIconStyles }
|
10300
|
+
}
|
10318
10301
|
};
|
10319
10302
|
const tableEditDeleteMenuItem = {
|
10320
10303
|
key: 'menuNameTableDelete',
|
@@ -10324,7 +10307,11 @@ const tableEditDeleteMenuItem = {
|
|
10324
10307
|
menuNameTableDeleteRow: 'Delete row',
|
10325
10308
|
menuNameTableDeleteTable: 'Delete table'
|
10326
10309
|
},
|
10327
|
-
onClick
|
10310
|
+
onClick,
|
10311
|
+
iconProps: {
|
10312
|
+
iconName: 'RichTextTableDeleteMenuIcon',
|
10313
|
+
styles: { root: tableContextMenuIconStyles }
|
10314
|
+
}
|
10328
10315
|
};
|
10329
10316
|
const tableActions = [tableEditInsertMenuItem, tableEditDeleteMenuItem];
|
10330
10317
|
/**
|
@@ -10340,6 +10327,41 @@ const getEditingTable = (editor, node) => {
|
|
10340
10327
|
return (table === null || table === void 0 ? void 0 : table.isContentEditable) ? { table, td } : null;
|
10341
10328
|
};
|
10342
10329
|
|
10330
|
+
// Copyright (c) Microsoft Corporation.
|
10331
|
+
// Licensed under the MIT License.
|
10332
|
+
/**
|
10333
|
+
* CopyPastePlugin is a plugin for handling copy and paste events in the editor.
|
10334
|
+
*/
|
10335
|
+
class CopyPastePlugin {
|
10336
|
+
getName() {
|
10337
|
+
return 'CopyPastePlugin';
|
10338
|
+
}
|
10339
|
+
initialize() { }
|
10340
|
+
dispose() { }
|
10341
|
+
onPluginEvent(event) {
|
10342
|
+
removeImageElement(event);
|
10343
|
+
}
|
10344
|
+
}
|
10345
|
+
/**
|
10346
|
+
* @internal
|
10347
|
+
* Exported only for unit testing
|
10348
|
+
*/
|
10349
|
+
const removeImageElement = (event) => {
|
10350
|
+
// We don't support the pasting options such as paste as image yet.
|
10351
|
+
if (event.eventType === roosterjsEditorTypesCompatible.CompatiblePluginEventType.BeforePaste && event.pasteType === roosterjsEditorTypesCompatible.CompatiblePasteType.Normal) {
|
10352
|
+
event.fragment.querySelectorAll('img').forEach((image) => {
|
10353
|
+
// If the image is the only child of its parent, remove all the parents of this img element.
|
10354
|
+
let parentNode = image.parentElement;
|
10355
|
+
let currentNode = image;
|
10356
|
+
while ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.childNodes.length) === 1) {
|
10357
|
+
currentNode = parentNode;
|
10358
|
+
parentNode = parentNode.parentElement;
|
10359
|
+
}
|
10360
|
+
currentNode === null || currentNode === void 0 ? void 0 : currentNode.remove();
|
10361
|
+
});
|
10362
|
+
}
|
10363
|
+
};
|
10364
|
+
|
10343
10365
|
// Copyright (c) Microsoft Corporation.
|
10344
10366
|
// Licensed under the MIT License.
|
10345
10367
|
/**
|
@@ -10392,7 +10414,16 @@ const RichTextEditor = React.forwardRef((props, ref) => {
|
|
10392
10414
|
const updateContentPlugin = roosterjsReact.createUpdateContentPlugin(roosterjsReact.UpdateMode.OnContentChangedEvent | roosterjsReact.UpdateMode.OnUserInput, (content) => {
|
10393
10415
|
onChange && onChange(content);
|
10394
10416
|
});
|
10395
|
-
|
10417
|
+
const copyPastePlugin = new CopyPastePlugin();
|
10418
|
+
return [
|
10419
|
+
contentEdit,
|
10420
|
+
placeholderPlugin,
|
10421
|
+
updateContentPlugin,
|
10422
|
+
ribbonPlugin,
|
10423
|
+
contextPlugin,
|
10424
|
+
tableEditMenuProvider,
|
10425
|
+
copyPastePlugin
|
10426
|
+
];
|
10396
10427
|
}, [onChange, placeholderPlugin, ribbonPlugin, strings]);
|
10397
10428
|
const ribbon = React.useMemo(() => {
|
10398
10429
|
const buttons = ribbonButtons(theme);
|
@@ -10464,9 +10495,9 @@ const richTextBorderBoxStyle = (props) => {
|
|
10464
10495
|
*/
|
10465
10496
|
const RichTextInputBoxComponent = (props) => {
|
10466
10497
|
const { placeholderText, initialContent, onChange, onEnterKeyDown, editorComponentRef, disabled, strings, actionComponents,
|
10467
|
-
/* @conditional-compile-remove(attachment-
|
10498
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10468
10499
|
onRenderAttachmentUploads,
|
10469
|
-
/* @conditional-compile-remove(attachment-
|
10500
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10470
10501
|
hasAttachments, richTextEditorStyleProps, isHorizontalLayoutDisabled = false } = props;
|
10471
10502
|
const theme = useTheme();
|
10472
10503
|
const [showRichTextEditorFormatting, setShowRichTextEditorFormatting] = React.useState(false);
|
@@ -10505,11 +10536,11 @@ const RichTextInputBoxComponent = (props) => {
|
|
10505
10536
|
const useHorizontalLayout = React.useMemo(() => {
|
10506
10537
|
return (!isHorizontalLayoutDisabled &&
|
10507
10538
|
!showRichTextEditorFormatting &&
|
10508
|
-
/* @conditional-compile-remove(attachment-
|
10539
|
+
/* @conditional-compile-remove(attachment-upload) */ !hasAttachments);
|
10509
10540
|
}, [
|
10510
10541
|
isHorizontalLayoutDisabled,
|
10511
10542
|
showRichTextEditorFormatting,
|
10512
|
-
/* @conditional-compile-remove(attachment-
|
10543
|
+
/* @conditional-compile-remove(attachment-upload) */ hasAttachments
|
10513
10544
|
]);
|
10514
10545
|
return (React.createElement("div", { className: richTextBorderBoxStyle({
|
10515
10546
|
theme: theme,
|
@@ -10519,7 +10550,7 @@ const RichTextInputBoxComponent = (props) => {
|
|
10519
10550
|
React.createElement(react.Stack, { grow: true, className: inputBoxRichTextStackStyle },
|
10520
10551
|
React.createElement(react.Stack.Item, { className: inputBoxRichTextStackItemStyle },
|
10521
10552
|
React.createElement(RichTextEditor, { initialContent: initialContent, placeholderText: placeholderText, onChange: onChange, onKeyDown: onKeyDown, ref: editorComponentRef, strings: strings, showRichTextEditorFormatting: showRichTextEditorFormatting, styles: richTextEditorStyle })),
|
10522
|
-
/* @conditional-compile-remove(attachment-
|
10553
|
+
/* @conditional-compile-remove(attachment-upload) */ onRenderAttachmentUploads &&
|
10523
10554
|
onRenderAttachmentUploads()),
|
10524
10555
|
actionButtons)));
|
10525
10556
|
};
|
@@ -10531,9 +10562,9 @@ const RichTextInputBoxComponent = (props) => {
|
|
10531
10562
|
*/
|
10532
10563
|
const RichTextSendBoxErrors = (props) => {
|
10533
10564
|
const {
|
10534
|
-
/* @conditional-compile-remove(attachment-
|
10565
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10535
10566
|
attachmentUploadError,
|
10536
|
-
/* @conditional-compile-remove(attachment-
|
10567
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10537
10568
|
attachmentUploadsPendingError, systemMessage, textTooLongMessage } = props;
|
10538
10569
|
const [sendBoxError, setSendBoxError] = React.useState(undefined);
|
10539
10570
|
React.useEffect(() => {
|
@@ -10558,11 +10589,11 @@ const RichTextSendBoxErrors = (props) => {
|
|
10558
10589
|
if (prev) {
|
10559
10590
|
errors.push(prev);
|
10560
10591
|
}
|
10561
|
-
/* @conditional-compile-remove(attachment-
|
10592
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10562
10593
|
if (attachmentUploadsPendingError) {
|
10563
10594
|
errors.push(attachmentUploadsPendingError);
|
10564
10595
|
}
|
10565
|
-
/* @conditional-compile-remove(attachment-
|
10596
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10566
10597
|
if (attachmentUploadError) {
|
10567
10598
|
errors.push(attachmentUploadError);
|
10568
10599
|
}
|
@@ -10574,8 +10605,8 @@ const RichTextSendBoxErrors = (props) => {
|
|
10574
10605
|
return sortedErrors[0];
|
10575
10606
|
});
|
10576
10607
|
}, [
|
10577
|
-
/* @conditional-compile-remove(attachment-
|
10578
|
-
/* @conditional-compile-remove(attachment-
|
10608
|
+
/* @conditional-compile-remove(attachment-upload) */ attachmentUploadError,
|
10609
|
+
/* @conditional-compile-remove(attachment-upload) */ attachmentUploadsPendingError
|
10579
10610
|
]);
|
10580
10611
|
const onDismiss = React.useCallback(() => {
|
10581
10612
|
if (systemMessage && !isMessageEmpty$1(systemMessage)) {
|
@@ -10599,9 +10630,9 @@ const isMessageEmpty$1 = (message) => {
|
|
10599
10630
|
*/
|
10600
10631
|
const RichTextSendBox = (props) => {
|
10601
10632
|
const { disabled = false, systemMessage, onSendMessage,
|
10602
|
-
/* @conditional-compile-remove(attachment-
|
10633
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10603
10634
|
activeAttachmentUploads,
|
10604
|
-
/* @conditional-compile-remove(attachment-
|
10635
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10605
10636
|
onCancelAttachmentUpload } = props;
|
10606
10637
|
const theme = useTheme();
|
10607
10638
|
const locale = useLocale$1();
|
@@ -10614,7 +10645,7 @@ const RichTextSendBox = (props) => {
|
|
10614
10645
|
}, [localeStrings, props.strings]);
|
10615
10646
|
const [contentValue, setContentValue] = React.useState('');
|
10616
10647
|
const [contentValueOverflow, setContentValueOverflow] = React.useState(false);
|
10617
|
-
/* @conditional-compile-remove(attachment-
|
10648
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10618
10649
|
const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = React.useState(undefined);
|
10619
10650
|
const editorComponentRef = React.useRef(null);
|
10620
10651
|
const contentTooLongMessage = React.useMemo(() => (contentValueOverflow ? strings.textTooLong : undefined), [contentValueOverflow, strings.textTooLong]);
|
@@ -10631,9 +10662,9 @@ const RichTextSendBox = (props) => {
|
|
10631
10662
|
return;
|
10632
10663
|
}
|
10633
10664
|
// Don't send message until all attachments have been uploaded successfully
|
10634
|
-
/* @conditional-compile-remove(attachment-
|
10665
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10635
10666
|
setAttachmentUploadsPendingError(undefined);
|
10636
|
-
/* @conditional-compile-remove(attachment-
|
10667
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10637
10668
|
if (hasIncompleteAttachmentUploads(activeAttachmentUploads)) {
|
10638
10669
|
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
10639
10670
|
return;
|
@@ -10642,7 +10673,7 @@ const RichTextSendBox = (props) => {
|
|
10642
10673
|
// we don't want to send empty messages including spaces, newlines, tabs
|
10643
10674
|
// Message can be empty if there is a valid attachment upload
|
10644
10675
|
if (sanitizeText(message).length > 0 ||
|
10645
|
-
/* @conditional-compile-remove(attachment-
|
10676
|
+
/* @conditional-compile-remove(attachment-upload) */ hasCompletedAttachmentUploads(activeAttachmentUploads)) {
|
10646
10677
|
onSendMessage(message);
|
10647
10678
|
setContentValue('');
|
10648
10679
|
(_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.setEmptyContent();
|
@@ -10653,29 +10684,29 @@ const RichTextSendBox = (props) => {
|
|
10653
10684
|
contentValueOverflow,
|
10654
10685
|
disabled,
|
10655
10686
|
onSendMessage,
|
10656
|
-
/* @conditional-compile-remove(attachment-
|
10657
|
-
/* @conditional-compile-remove(attachment-
|
10687
|
+
/* @conditional-compile-remove(attachment-upload) */ activeAttachmentUploads,
|
10688
|
+
/* @conditional-compile-remove(attachment-upload) */ strings.attachmentUploadsPendingError
|
10658
10689
|
]);
|
10659
10690
|
const hasErrorMessage = React.useMemo(() => {
|
10660
10691
|
var _a;
|
10661
10692
|
return (!!systemMessage ||
|
10662
10693
|
!!contentTooLongMessage ||
|
10663
|
-
/* @conditional-compile-remove(attachment-
|
10694
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10664
10695
|
!!attachmentUploadsPendingError ||
|
10665
|
-
/* @conditional-compile-remove(attachment-
|
10696
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10666
10697
|
!!((_a = activeAttachmentUploads === null || activeAttachmentUploads === void 0 ? void 0 : activeAttachmentUploads.filter((attachmentUpload) => attachmentUpload.uploadError).pop()) === null || _a === void 0 ? void 0 : _a.uploadError));
|
10667
10698
|
}, [
|
10668
|
-
/* @conditional-compile-remove(attachment-
|
10699
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10669
10700
|
activeAttachmentUploads,
|
10670
10701
|
contentTooLongMessage,
|
10671
|
-
/* @conditional-compile-remove(attachment-
|
10702
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10672
10703
|
attachmentUploadsPendingError,
|
10673
10704
|
systemMessage
|
10674
10705
|
]);
|
10675
10706
|
const onRenderSendIcon = React.useCallback((isHover) => (React.createElement(react.Icon, { iconName: isHover && contentValue ? 'SendBoxSendHovered' : 'SendBoxSend', className: sendIconStyle({
|
10676
10707
|
theme,
|
10677
10708
|
hasText: !!contentValue,
|
10678
|
-
/* @conditional-compile-remove(attachment-
|
10709
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10679
10710
|
hasAttachment: false,
|
10680
10711
|
hasErrorMessage: hasErrorMessage,
|
10681
10712
|
defaultTextColor: theme.palette.neutralSecondary,
|
@@ -10684,22 +10715,22 @@ const RichTextSendBox = (props) => {
|
|
10684
10715
|
const sendBoxErrorsProps = React.useMemo(() => {
|
10685
10716
|
var _a;
|
10686
10717
|
return {
|
10687
|
-
/* @conditional-compile-remove(attachment-
|
10718
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10688
10719
|
attachmentUploadsPendingError: attachmentUploadsPendingError,
|
10689
|
-
/* @conditional-compile-remove(attachment-
|
10720
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10690
10721
|
attachmentUploadError: (_a = activeAttachmentUploads === null || activeAttachmentUploads === void 0 ? void 0 : activeAttachmentUploads.filter((attachmentUpload) => attachmentUpload.uploadError).pop()) === null || _a === void 0 ? void 0 : _a.uploadError,
|
10691
10722
|
systemMessage: systemMessage,
|
10692
10723
|
textTooLongMessage: contentTooLongMessage
|
10693
10724
|
};
|
10694
10725
|
}, [
|
10695
|
-
/* @conditional-compile-remove(attachment-
|
10726
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10696
10727
|
activeAttachmentUploads,
|
10697
10728
|
contentTooLongMessage,
|
10698
|
-
/* @conditional-compile-remove(attachment-
|
10729
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10699
10730
|
attachmentUploadsPendingError,
|
10700
10731
|
systemMessage
|
10701
10732
|
]);
|
10702
|
-
/* @conditional-compile-remove(attachment-
|
10733
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10703
10734
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
10704
10735
|
return (React.createElement(react.Stack, { className: attachmentUploadCardsStyles },
|
10705
10736
|
React.createElement(FluentV9ThemeProvider, { v8Theme: theme },
|
@@ -10722,16 +10753,16 @@ const RichTextSendBox = (props) => {
|
|
10722
10753
|
e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.
|
10723
10754
|
}, className: richTextActionButtonsStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel }));
|
10724
10755
|
}, [localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);
|
10725
|
-
/* @conditional-compile-remove(attachment-
|
10756
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10726
10757
|
const hasAttachmentUploads = React.useMemo(() => {
|
10727
10758
|
return (hasCompletedAttachmentUploads(activeAttachmentUploads) || hasIncompleteAttachmentUploads(activeAttachmentUploads));
|
10728
10759
|
}, [activeAttachmentUploads]);
|
10729
10760
|
return (React.createElement(react.Stack, null,
|
10730
10761
|
React.createElement(RichTextSendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
|
10731
10762
|
React.createElement(RichTextInputBoxComponent, { placeholderText: strings.placeholderText, onChange: setContent, onEnterKeyDown: sendMessageOnClick, editorComponentRef: editorComponentRef, strings: strings, disabled: disabled, actionComponents: sendButton, richTextEditorStyleProps: sendBoxRichTextEditorStyle,
|
10732
|
-
/* @conditional-compile-remove(attachment-
|
10763
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10733
10764
|
onRenderAttachmentUploads: onRenderAttachmentUploads,
|
10734
|
-
/* @conditional-compile-remove(attachment-
|
10765
|
+
/* @conditional-compile-remove(attachment-upload) */
|
10735
10766
|
hasAttachments: hasAttachmentUploads })));
|
10736
10767
|
};
|
10737
10768
|
|
@@ -10765,7 +10796,7 @@ const inputBoxIcon = react.mergeStyles({
|
|
10765
10796
|
/**
|
10766
10797
|
* @private
|
10767
10798
|
*/
|
10768
|
-
react.mergeStyles(editorTextBoxButtonStyle, {
|
10799
|
+
const richTextEditBoxActionButtonIcon = react.mergeStyles(editorTextBoxButtonStyle, {
|
10769
10800
|
'&:hover svg': {
|
10770
10801
|
stroke: 'currentColor'
|
10771
10802
|
}
|
@@ -11159,7 +11190,7 @@ const useChatMessageEditContainerStyles = reactComponents.makeStyles({
|
|
11159
11190
|
/**
|
11160
11191
|
* @private
|
11161
11192
|
*/
|
11162
|
-
reactComponents.makeStyles({
|
11193
|
+
const useChatMessageRichTextEditContainerStyles = reactComponents.makeStyles({
|
11163
11194
|
body: Object.assign(Object.assign(Object.assign(Object.assign({}, reactComponents.shorthands.padding(0)), { backgroundColor: 'transparent' }), reactComponents.shorthands.margin('1.25rem', 0, 0, 0)), { width: '100%' }),
|
11164
11195
|
bodyAttached: {
|
11165
11196
|
marginTop: '0.125rem',
|
@@ -11221,24 +11252,23 @@ const onRenderSubmitIcon = (className) => {
|
|
11221
11252
|
return React.createElement(react.Icon, { iconName: 'EditBoxSubmit', className: className });
|
11222
11253
|
};
|
11223
11254
|
function isMessageEmpty(messageText,
|
11224
|
-
/* @conditional-compile-remove(attachment-
|
11255
|
+
/* @conditional-compile-remove(attachment-upload) */
|
11225
11256
|
attachmentMetadata) {
|
11226
|
-
/* @conditional-compile-remove(attachment-
|
11257
|
+
/* @conditional-compile-remove(attachment-upload) */
|
11227
11258
|
return messageText.trim().length === 0 && (attachmentMetadata === null || attachmentMetadata === void 0 ? void 0 : attachmentMetadata.length) === 0;
|
11228
11259
|
}
|
11229
11260
|
/**
|
11230
11261
|
* @private
|
11231
11262
|
*/
|
11232
11263
|
function getMessageState(messageText,
|
11233
|
-
/* @conditional-compile-remove(attachment-
|
11234
|
-
return isMessageEmpty(messageText,
|
11235
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ attachmentMetadata)
|
11264
|
+
/* @conditional-compile-remove(attachment-upload) */ attachmentMetadata) {
|
11265
|
+
return isMessageEmpty(messageText, /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata)
|
11236
11266
|
? 'too short'
|
11237
11267
|
: isMessageTooLong(messageText.length)
|
11238
11268
|
? 'too long'
|
11239
11269
|
: 'OK';
|
11240
11270
|
}
|
11241
|
-
/* @conditional-compile-remove(attachment-
|
11271
|
+
/* @conditional-compile-remove(attachment-upload) */
|
11242
11272
|
/**
|
11243
11273
|
* @private
|
11244
11274
|
* @TODO: Remove when file-sharing feature becomes stable.
|
@@ -11663,97 +11693,6 @@ const generateParticipantsStr = (participants, defaultName) => participants
|
|
11663
11693
|
.map((participant) => `${!participant.displayName || participant.displayName === '' ? defaultName : participant.displayName}`)
|
11664
11694
|
.join(', ');
|
11665
11695
|
|
11666
|
-
// Copyright (c) Microsoft Corporation.
|
11667
|
-
// Licensed under the MIT License.
|
11668
|
-
/**
|
11669
|
-
* @private
|
11670
|
-
*/
|
11671
|
-
const ChatMessageComponentAsEditBox = (props) => {
|
11672
|
-
const { onCancel, onSubmit, strings, message } = props;
|
11673
|
-
/* @conditional-compile-remove(mention) */
|
11674
|
-
const { mentionLookupOptions } = props;
|
11675
|
-
const [textValue, setTextValue] = React.useState(message.content || '');
|
11676
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
11677
|
-
const [attachmentMetadata, setAttachmentMetadata] = React.useState(getMessageWithAttachmentMetadata(message));
|
11678
|
-
const editTextFieldRef = React.useRef(null);
|
11679
|
-
const theme = useTheme();
|
11680
|
-
const messageState = getMessageState(textValue,
|
11681
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ attachmentMetadata !== null && attachmentMetadata !== void 0 ? attachmentMetadata : []);
|
11682
|
-
const submitEnabled = messageState === 'OK';
|
11683
|
-
const editContainerStyles = useChatMessageEditContainerStyles();
|
11684
|
-
const chatMyMessageStyles = useChatMyMessageStyles();
|
11685
|
-
React.useEffect(() => {
|
11686
|
-
var _a;
|
11687
|
-
(_a = editTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
11688
|
-
}, []);
|
11689
|
-
const setText = (event, newValue) => {
|
11690
|
-
setTextValue(newValue !== null && newValue !== void 0 ? newValue : '');
|
11691
|
-
};
|
11692
|
-
const textTooLongMessage = messageState === 'too long'
|
11693
|
-
? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })
|
11694
|
-
: undefined;
|
11695
|
-
const iconClassName = React.useCallback((isHover) => {
|
11696
|
-
const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;
|
11697
|
-
return react.mergeStyles(inputBoxIcon, { color });
|
11698
|
-
}, [theme.palette.accent, theme.palette.neutralSecondary]);
|
11699
|
-
const onRenderThemedCancelIcon = React.useCallback((isHover) => {
|
11700
|
-
return onRenderCancelIcon(iconClassName(isHover));
|
11701
|
-
}, [iconClassName]);
|
11702
|
-
const onRenderThemedSubmitIcon = React.useCallback((isHover) => {
|
11703
|
-
return onRenderSubmitIcon(iconClassName(isHover));
|
11704
|
-
}, [iconClassName]);
|
11705
|
-
const editBoxStyles = React.useMemo(() => {
|
11706
|
-
return react.concatStyleSets(editBoxStyleSet, { textField: { borderColor: theme.palette.themePrimary } });
|
11707
|
-
}, [theme.palette.themePrimary]);
|
11708
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
11709
|
-
const onRenderAttachmentUploads = React.useCallback(() => {
|
11710
|
-
return (!!attachmentMetadata &&
|
11711
|
-
attachmentMetadata.length > 0 && (React.createElement("div", { style: { margin: '0.25rem' } },
|
11712
|
-
React.createElement(_AttachmentUploadCards, { activeAttachmentUploads: attachmentMetadata, onCancelAttachmentUpload: (attachmentId) => {
|
11713
|
-
setAttachmentMetadata(attachmentMetadata === null || attachmentMetadata === void 0 ? void 0 : attachmentMetadata.filter((attachment) => attachment.id !== attachmentId));
|
11714
|
-
} }))));
|
11715
|
-
}, [attachmentMetadata]);
|
11716
|
-
const getContent = () => {
|
11717
|
-
return (React.createElement(React.Fragment, null,
|
11718
|
-
React.createElement(InputBoxComponent, { "data-ui-id": "edit-box", textFieldRef: editTextFieldRef, inputClassName: editBoxStyle, placeholderText: strings.editBoxPlaceholderText, textValue: textValue, onChange: setText, onKeyDown: (ev) => {
|
11719
|
-
if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown') {
|
11720
|
-
ev.stopPropagation();
|
11721
|
-
}
|
11722
|
-
}, onEnterKeyDown: () => {
|
11723
|
-
submitEnabled &&
|
11724
|
-
onSubmit(textValue, message.metadata,
|
11725
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ {
|
11726
|
-
attachmentMetadata
|
11727
|
-
});
|
11728
|
-
}, supportNewline: false, maxLength: MAXIMUM_LENGTH_OF_MESSAGE, errorMessage: textTooLongMessage, styles: editBoxStyles,
|
11729
|
-
/* @conditional-compile-remove(mention) */
|
11730
|
-
mentionLookupOptions: mentionLookupOptions }),
|
11731
|
-
React.createElement(react.Stack, { horizontal: true, horizontalAlign: "end", className: editChatMessageButtonsStackStyle, tokens: { childrenGap: '0.25rem' } },
|
11732
|
-
message.failureReason && (React.createElement(react.Stack.Item, { grow: true, align: "stretch", className: chatMessageFailedTagStackItemStyle },
|
11733
|
-
React.createElement("div", { className: react.mergeStyles(chatMessageFailedTagStyle(theme), editChatMessageFailedTagStyle) }, message.failureReason))),
|
11734
|
-
React.createElement(react.Stack.Item, { align: "end" },
|
11735
|
-
React.createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
|
11736
|
-
onCancel && onCancel(message.messageId);
|
11737
|
-
}, id: 'dismissIconWrapper' })),
|
11738
|
-
React.createElement(react.Stack.Item, { align: "end" },
|
11739
|
-
React.createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxSubmitButton, tooltipContent: strings.editBoxSubmitButton, onRenderIcon: onRenderThemedSubmitIcon, onClick: (e) => {
|
11740
|
-
submitEnabled &&
|
11741
|
-
onSubmit(textValue, message.metadata,
|
11742
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ {
|
11743
|
-
attachmentMetadata
|
11744
|
-
});
|
11745
|
-
e.stopPropagation();
|
11746
|
-
}, id: 'submitIconWrapper' }))),
|
11747
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ onRenderAttachmentUploads()));
|
11748
|
-
};
|
11749
|
-
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
11750
|
-
return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
|
11751
|
-
className: chatMyMessageStyles.root
|
11752
|
-
}, body: {
|
11753
|
-
className: reactComponents.mergeClasses(editContainerStyles.body, message.failureReason !== undefined ? editContainerStyles.bodyError : editContainerStyles.bodyDefault, attached !== 'top' ? editContainerStyles.bodyAttached : undefined)
|
11754
|
-
} }, getContent()));
|
11755
|
-
};
|
11756
|
-
|
11757
11696
|
// Copyright (c) Microsoft Corporation.
|
11758
11697
|
// Licensed under the MIT License.
|
11759
11698
|
/**
|
@@ -12498,6 +12437,117 @@ const MessageBubble$1 = (props) => {
|
|
12498
12437
|
/** @private */
|
12499
12438
|
const ChatMyMessageComponentAsMessageBubble = React.memo(MessageBubble$1);
|
12500
12439
|
|
12440
|
+
// Copyright (c) Microsoft Corporation.
|
12441
|
+
// Licensed under the MIT License.
|
12442
|
+
/**
|
12443
|
+
* @private
|
12444
|
+
*/
|
12445
|
+
const ChatMessageComponentAsEditBox = (props) => {
|
12446
|
+
const { onCancel, onSubmit, strings, message } = props;
|
12447
|
+
/* @conditional-compile-remove(mention) */
|
12448
|
+
const { mentionLookupOptions } = props;
|
12449
|
+
const [textValue, setTextValue] = React.useState(message.content || '');
|
12450
|
+
/* @conditional-compile-remove(attachment-upload) */
|
12451
|
+
const [attachmentMetadata, setAttachmentMetadata] = React.useState(getMessageWithAttachmentMetadata(message));
|
12452
|
+
const editTextFieldRef = React.useRef(null);
|
12453
|
+
const theme = useTheme();
|
12454
|
+
const messageState = getMessageState(textValue,
|
12455
|
+
/* @conditional-compile-remove(attachment-upload) */ attachmentMetadata !== null && attachmentMetadata !== void 0 ? attachmentMetadata : []);
|
12456
|
+
const submitEnabled = messageState === 'OK';
|
12457
|
+
const editContainerStyles = useChatMessageEditContainerStyles();
|
12458
|
+
const chatMyMessageStyles = useChatMyMessageStyles();
|
12459
|
+
React.useEffect(() => {
|
12460
|
+
var _a;
|
12461
|
+
(_a = editTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
12462
|
+
}, []);
|
12463
|
+
const setText = (event, newValue) => {
|
12464
|
+
setTextValue(newValue !== null && newValue !== void 0 ? newValue : '');
|
12465
|
+
};
|
12466
|
+
const textTooLongMessage = messageState === 'too long'
|
12467
|
+
? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })
|
12468
|
+
: undefined;
|
12469
|
+
const iconClassName = React.useCallback((isHover) => {
|
12470
|
+
const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;
|
12471
|
+
return react.mergeStyles(inputBoxIcon, { color });
|
12472
|
+
}, [theme.palette.accent, theme.palette.neutralSecondary]);
|
12473
|
+
const onRenderThemedCancelIcon = React.useCallback((isHover) => {
|
12474
|
+
return onRenderCancelIcon(iconClassName(isHover));
|
12475
|
+
}, [iconClassName]);
|
12476
|
+
const onRenderThemedSubmitIcon = React.useCallback((isHover) => {
|
12477
|
+
return onRenderSubmitIcon(iconClassName(isHover));
|
12478
|
+
}, [iconClassName]);
|
12479
|
+
const editBoxStyles = React.useMemo(() => {
|
12480
|
+
return react.concatStyleSets(editBoxStyleSet, { textField: { borderColor: theme.palette.themePrimary } });
|
12481
|
+
}, [theme.palette.themePrimary]);
|
12482
|
+
/* @conditional-compile-remove(attachment-upload) */
|
12483
|
+
const onRenderAttachmentUploads = React.useCallback(() => {
|
12484
|
+
return (!!attachmentMetadata &&
|
12485
|
+
attachmentMetadata.length > 0 && (React.createElement("div", { style: { margin: '0.25rem' } },
|
12486
|
+
React.createElement(_AttachmentUploadCards, { activeAttachmentUploads: attachmentMetadata, onCancelAttachmentUpload: (attachmentId) => {
|
12487
|
+
setAttachmentMetadata(attachmentMetadata === null || attachmentMetadata === void 0 ? void 0 : attachmentMetadata.filter((attachment) => attachment.id !== attachmentId));
|
12488
|
+
} }))));
|
12489
|
+
}, [attachmentMetadata]);
|
12490
|
+
const getContent = () => {
|
12491
|
+
return (React.createElement(React.Fragment, null,
|
12492
|
+
React.createElement(InputBoxComponent, { "data-ui-id": "edit-box", textFieldRef: editTextFieldRef, inputClassName: editBoxStyle, placeholderText: strings.editBoxPlaceholderText, textValue: textValue, onChange: setText, onKeyDown: (ev) => {
|
12493
|
+
if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown') {
|
12494
|
+
ev.stopPropagation();
|
12495
|
+
}
|
12496
|
+
}, onEnterKeyDown: () => {
|
12497
|
+
submitEnabled &&
|
12498
|
+
onSubmit(textValue, message.metadata,
|
12499
|
+
/* @conditional-compile-remove(attachment-upload) */ {
|
12500
|
+
attachmentMetadata
|
12501
|
+
});
|
12502
|
+
}, supportNewline: false, maxLength: MAXIMUM_LENGTH_OF_MESSAGE, errorMessage: textTooLongMessage, styles: editBoxStyles,
|
12503
|
+
/* @conditional-compile-remove(mention) */
|
12504
|
+
mentionLookupOptions: mentionLookupOptions }),
|
12505
|
+
React.createElement(react.Stack, { horizontal: true, horizontalAlign: "end", className: editChatMessageButtonsStackStyle, tokens: { childrenGap: '0.25rem' } },
|
12506
|
+
message.failureReason && (React.createElement(react.Stack.Item, { grow: true, align: "stretch", className: chatMessageFailedTagStackItemStyle },
|
12507
|
+
React.createElement("div", { className: react.mergeStyles(chatMessageFailedTagStyle(theme), editChatMessageFailedTagStyle) }, message.failureReason))),
|
12508
|
+
React.createElement(react.Stack.Item, { align: "end" },
|
12509
|
+
React.createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
|
12510
|
+
onCancel && onCancel(message.messageId);
|
12511
|
+
}, id: 'dismissIconWrapper' })),
|
12512
|
+
React.createElement(react.Stack.Item, { align: "end" },
|
12513
|
+
React.createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxSubmitButton, tooltipContent: strings.editBoxSubmitButton, onRenderIcon: onRenderThemedSubmitIcon, onClick: (e) => {
|
12514
|
+
submitEnabled &&
|
12515
|
+
onSubmit(textValue, message.metadata,
|
12516
|
+
/* @conditional-compile-remove(attachment-upload) */ {
|
12517
|
+
attachmentMetadata
|
12518
|
+
});
|
12519
|
+
e.stopPropagation();
|
12520
|
+
}, id: 'submitIconWrapper' }))), /* @conditional-compile-remove(attachment-upload) */
|
12521
|
+
onRenderAttachmentUploads()));
|
12522
|
+
};
|
12523
|
+
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
12524
|
+
return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
|
12525
|
+
className: chatMyMessageStyles.root
|
12526
|
+
}, body: {
|
12527
|
+
className: reactComponents.mergeClasses(editContainerStyles.body, message.failureReason !== undefined ? editContainerStyles.bodyError : editContainerStyles.bodyDefault, attached !== 'top' ? editContainerStyles.bodyAttached : undefined)
|
12528
|
+
} }, getContent()));
|
12529
|
+
};
|
12530
|
+
|
12531
|
+
// Copyright (c) Microsoft Corporation.
|
12532
|
+
// Licensed under the MIT License.
|
12533
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
12534
|
+
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-B3cXye-F.js'); }).then((module) => ({
|
12535
|
+
default: module.ChatMessageComponentAsRichTextEditBox
|
12536
|
+
})));
|
12537
|
+
/**
|
12538
|
+
* @private
|
12539
|
+
*/
|
12540
|
+
const ChatMessageComponentAsEditBoxPicker = (props) => {
|
12541
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
12542
|
+
const { richTextEditor } = props;
|
12543
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
12544
|
+
if (richTextEditor) {
|
12545
|
+
return (React.createElement(React.Suspense, null,
|
12546
|
+
React.createElement(ChatMessageComponentAsRichTextEditBox, Object.assign({}, props))));
|
12547
|
+
}
|
12548
|
+
return React.createElement(ChatMessageComponentAsEditBox, Object.assign({}, props));
|
12549
|
+
};
|
12550
|
+
|
12501
12551
|
// Copyright (c) Microsoft Corporation.
|
12502
12552
|
// Licensed under the MIT License.
|
12503
12553
|
var __awaiter$C = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -12533,17 +12583,24 @@ const ChatMyMessageComponent = (props) => {
|
|
12533
12583
|
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
12534
12584
|
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
12535
12585
|
if (isEditing && message.messageType === 'chat') {
|
12536
|
-
return (React.createElement(
|
12586
|
+
return (React.createElement(ChatMessageComponentAsEditBoxPicker, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$C(void 0, void 0, void 0, function* () {
|
12537
12587
|
props.onUpdateMessage &&
|
12538
12588
|
message.messageId &&
|
12539
|
-
(yield props.onUpdateMessage(message.messageId, text,
|
12589
|
+
(yield props.onUpdateMessage(message.messageId, text,
|
12590
|
+
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
12591
|
+
{
|
12592
|
+
metadata: metadata,
|
12593
|
+
attachmentMetadata: options === null || options === void 0 ? void 0 : options.attachmentMetadata
|
12594
|
+
}));
|
12540
12595
|
setIsEditing(false);
|
12541
12596
|
}), onCancel: (messageId) => {
|
12542
12597
|
props.onCancelEditMessage && props.onCancelEditMessage(messageId);
|
12543
12598
|
setIsEditing(false);
|
12544
12599
|
},
|
12545
12600
|
/* @conditional-compile-remove(mention) */
|
12546
|
-
mentionLookupOptions: (_a = props.mentionOptions) === null || _a === void 0 ? void 0 : _a.lookupOptions
|
12601
|
+
mentionLookupOptions: (_a = props.mentionOptions) === null || _a === void 0 ? void 0 : _a.lookupOptions,
|
12602
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
12603
|
+
richTextEditor: props.richTextEditor }));
|
12547
12604
|
}
|
12548
12605
|
else {
|
12549
12606
|
return (React.createElement(ChatMyMessageComponentAsMessageBubble, Object.assign({}, props, { onRemoveClick: onRemoveClick, onEditClick: onEditClick, onResendClick: onResendClick, onRenderAvatar: props.onRenderAvatar,
|
@@ -12573,7 +12630,9 @@ const FluentChatMyMessageComponent = (props) => {
|
|
12573
12630
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
12574
12631
|
actionsForAttachment,
|
12575
12632
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
12576
|
-
onRenderAttachmentDownloads
|
12633
|
+
onRenderAttachmentDownloads,
|
12634
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
12635
|
+
richTextEditor } = props;
|
12577
12636
|
const chatMessageRenderStyles = useChatMessageRenderStyles();
|
12578
12637
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
12579
12638
|
const onRenderAttachmentDownloadsMemo = React.useMemo(() => {
|
@@ -12597,7 +12656,9 @@ const FluentChatMyMessageComponent = (props) => {
|
|
12597
12656
|
/* @conditional-compile-remove(mention) */
|
12598
12657
|
mentionOptions: mentionOptions,
|
12599
12658
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
12600
|
-
actionsForAttachment: actionsForAttachment
|
12659
|
+
actionsForAttachment: actionsForAttachment,
|
12660
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
12661
|
+
richTextEditor: richTextEditor })));
|
12601
12662
|
}
|
12602
12663
|
return React.createElement(React.Fragment, null);
|
12603
12664
|
}, [
|
@@ -12617,7 +12678,9 @@ const FluentChatMyMessageComponent = (props) => {
|
|
12617
12678
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
12618
12679
|
actionsForAttachment,
|
12619
12680
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
12620
|
-
new Date().toDateString()
|
12681
|
+
new Date().toDateString(),
|
12682
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
12683
|
+
richTextEditor
|
12621
12684
|
]);
|
12622
12685
|
const messageRenderer = React.useCallback((messageProps) => {
|
12623
12686
|
return onRenderMessage === undefined
|
@@ -13071,7 +13134,9 @@ const MessageThreadWrapper = (props) => {
|
|
13071
13134
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
13072
13135
|
attachmentOptions,
|
13073
13136
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
13074
|
-
onRenderAttachmentDownloads
|
13137
|
+
onRenderAttachmentDownloads,
|
13138
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
13139
|
+
richTextEditor = false } = props;
|
13075
13140
|
// We need this state to wait for one tick and scroll to bottom after messages have been initialized.
|
13076
13141
|
// Otherwise chatScrollDivRef.current.clientHeight is wrong if we scroll to bottom before messages are initialized.
|
13077
13142
|
const [chatMessagesInitialized, setChatMessagesInitialized] = React.useState(false);
|
@@ -13414,7 +13479,9 @@ const MessageThreadWrapper = (props) => {
|
|
13414
13479
|
/* @conditional-compile-remove(mention) */
|
13415
13480
|
mentionOptions: mentionOptions,
|
13416
13481
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
13417
|
-
onRenderAttachmentDownloads: onRenderAttachmentDownloads
|
13482
|
+
onRenderAttachmentDownloads: onRenderAttachmentDownloads,
|
13483
|
+
/* @conditional-compile-remove(rich-text-editor) */
|
13484
|
+
richTextEditor: richTextEditor })));
|
13418
13485
|
}))))));
|
13419
13486
|
};
|
13420
13487
|
const MemoChatMessageComponentWrapper = React.memo((obj) => {
|
@@ -14345,7 +14412,10 @@ const emojiStyles = (backgroundImage, frameCount) => {
|
|
14345
14412
|
animationDuration: '8.12s',
|
14346
14413
|
animationTimingFunction: `steps(${steps})`,
|
14347
14414
|
animationIterationCount: 'infinite',
|
14348
|
-
backgroundColor: '
|
14415
|
+
backgroundColor: 'transparent'
|
14416
|
+
},
|
14417
|
+
':active': {
|
14418
|
+
backgroundColor: 'transparent'
|
14349
14419
|
}
|
14350
14420
|
};
|
14351
14421
|
};
|
@@ -14457,7 +14527,7 @@ const _ReactionDrawerMenuItem = (props) => {
|
|
14457
14527
|
marginTop: '12px'
|
14458
14528
|
}
|
14459
14529
|
};
|
14460
|
-
return (React.createElement(react.Stack, { id: "reaction", role: "menuitem", horizontal: true, className: react.mergeStyles(drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small), props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined, modifiedFirstItemStyle.root) },
|
14530
|
+
return (React.createElement(react.Stack, { "data-ui-id": "reaction-mobile-drawer-menu-item", id: "reaction", role: "menuitem", horizontal: true, className: react.mergeStyles(drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small), props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined, modifiedFirstItemStyle.root) },
|
14461
14531
|
React.createElement("div", { style: mobileViewMenuItemStyle() }, emojis.map((emoji, index) => {
|
14462
14532
|
const resourceUrl = emojiResource.get(emoji.toString());
|
14463
14533
|
return (React.createElement(react.IconButton, { key: index, onClick: () => {
|
@@ -14765,10 +14835,31 @@ const useVideoTileContextualMenuProps = (props) => {
|
|
14765
14835
|
// Copyright (c) Microsoft Corporation.
|
14766
14836
|
// Licensed under the MIT License.
|
14767
14837
|
/* @conditional-compile-remove(reaction) */
|
14768
|
-
/**
|
14769
|
-
|
14770
|
-
*/
|
14771
|
-
|
14838
|
+
/** @private */
|
14839
|
+
const REACTION_START_DISPLAY_SIZE = 44;
|
14840
|
+
/* @conditional-compile-remove(reaction) */
|
14841
|
+
/** @private */
|
14842
|
+
const REACTION_NUMBER_OF_ANIMATION_FRAMES = 51;
|
14843
|
+
/* @conditional-compile-remove(reaction) */
|
14844
|
+
/** @private */
|
14845
|
+
const REACTION_SCREEN_SHARE_ANIMATION_TIME_MS = 4133;
|
14846
|
+
/* @conditional-compile-remove(reaction) */
|
14847
|
+
/** @private */
|
14848
|
+
const REACTION_DEFAULT_RESOURCE_FRAME_SIZE_PX = 128;
|
14849
|
+
/* @conditional-compile-remove(reaction) */
|
14850
|
+
/** @private */
|
14851
|
+
const getCombinedKey = (userId, reactionType, receivedAt) => {
|
14852
|
+
const receivedTime = receivedAt.toISOString();
|
14853
|
+
return userId + reactionType + receivedTime;
|
14854
|
+
};
|
14855
|
+
/* @conditional-compile-remove(reaction) */
|
14856
|
+
/** @private */
|
14857
|
+
const getReceivedUnixTime = (receivedTime) => {
|
14858
|
+
return receivedTime.getTime();
|
14859
|
+
};
|
14860
|
+
|
14861
|
+
// Copyright (c) Microsoft Corporation.
|
14862
|
+
// Licensed under the MIT License.
|
14772
14863
|
/**
|
14773
14864
|
* @private
|
14774
14865
|
*/
|
@@ -14927,12 +15018,12 @@ const raiseHandLimitedSpaceStyles = {
|
|
14927
15018
|
/**
|
14928
15019
|
* @private
|
14929
15020
|
*/
|
14930
|
-
const playFrames = react.memoizeFunction(() => react.keyframes({
|
15021
|
+
const playFrames = react.memoizeFunction((frameHightPx, frameCount) => react.keyframes({
|
14931
15022
|
from: {
|
14932
|
-
backgroundPosition:
|
15023
|
+
backgroundPosition: `0px 0px`
|
14933
15024
|
},
|
14934
15025
|
to: {
|
14935
|
-
backgroundPosition:
|
15026
|
+
backgroundPosition: `0px ${frameCount * -frameHightPx}px`
|
14936
15027
|
}
|
14937
15028
|
}));
|
14938
15029
|
/* @conditional-compile-remove(reaction) */
|
@@ -14942,24 +15033,21 @@ const playFrames = react.memoizeFunction(() => react.keyframes({
|
|
14942
15033
|
const reactionRenderingStyle = (args) => {
|
14943
15034
|
var _a;
|
14944
15035
|
const imageUrl = `url(${args.spriteImageUrl})`;
|
14945
|
-
const steps = (_a = args.frameCount) !== null && _a !== void 0 ? _a :
|
15036
|
+
const steps = (_a = args.frameCount) !== null && _a !== void 0 ? _a : 0;
|
15037
|
+
const frameSizePx = args.rawFrameSize;
|
14946
15038
|
return react.mergeStyles({
|
14947
|
-
height:
|
14948
|
-
width:
|
15039
|
+
height: `${frameSizePx}px`,
|
15040
|
+
width: `${frameSizePx}px`,
|
14949
15041
|
overflow: 'hidden',
|
14950
|
-
animationName: playFrames(),
|
15042
|
+
animationName: playFrames(frameSizePx, steps),
|
14951
15043
|
backgroundImage: imageUrl,
|
14952
|
-
animationDuration:
|
15044
|
+
animationDuration: `${REACTION_SCREEN_SHARE_ANIMATION_TIME_MS / 1000}s`,
|
14953
15045
|
animationTimingFunction: `steps(${steps})`,
|
14954
|
-
backgroundSize: `cover`,
|
14955
15046
|
animationPlayState: 'running',
|
14956
15047
|
animationIterationCount: 'infinite',
|
14957
|
-
|
14958
|
-
|
14959
|
-
|
14960
|
-
transform: `scale(${DEFAULT_ORIGINAL_EMOJI_SIZE < args.emojiSize
|
14961
|
-
? DEFAULT_ORIGINAL_EMOJI_SIZE / args.emojiSize
|
14962
|
-
: args.emojiSize / DEFAULT_ORIGINAL_EMOJI_SIZE})`
|
15048
|
+
// Scale the emoji to fit the parent container
|
15049
|
+
transform: `scale(${args.emojiSize / frameSizePx})`,
|
15050
|
+
transformOrigin: 'top left'
|
14963
15051
|
});
|
14964
15052
|
};
|
14965
15053
|
|
@@ -15458,28 +15546,26 @@ const getEmojiFrameCount = (reactionName, reactionResources) => {
|
|
15458
15546
|
return 0;
|
15459
15547
|
}
|
15460
15548
|
};
|
15461
|
-
|
15462
|
-
// Copyright (c) Microsoft Corporation.
|
15463
|
-
// Licensed under the MIT License.
|
15464
15549
|
/* @conditional-compile-remove(reaction) */
|
15465
|
-
/**
|
15466
|
-
|
15467
|
-
|
15468
|
-
|
15469
|
-
|
15470
|
-
|
15471
|
-
|
15472
|
-
|
15473
|
-
|
15474
|
-
|
15475
|
-
|
15476
|
-
|
15477
|
-
|
15478
|
-
|
15479
|
-
|
15480
|
-
|
15481
|
-
|
15482
|
-
|
15550
|
+
/**
|
15551
|
+
* @private
|
15552
|
+
*/
|
15553
|
+
const getEmojiFrameSize = (reactionName, reactionResources) => {
|
15554
|
+
var _a, _b, _c, _d, _e;
|
15555
|
+
switch (reactionName) {
|
15556
|
+
case 'like':
|
15557
|
+
return (_a = reactionResources.likeReaction) === null || _a === void 0 ? void 0 : _a.size;
|
15558
|
+
case 'heart':
|
15559
|
+
return (_b = reactionResources.heartReaction) === null || _b === void 0 ? void 0 : _b.size;
|
15560
|
+
case 'laugh':
|
15561
|
+
return (_c = reactionResources.laughReaction) === null || _c === void 0 ? void 0 : _c.size;
|
15562
|
+
case 'applause':
|
15563
|
+
return (_d = reactionResources.applauseReaction) === null || _d === void 0 ? void 0 : _d.size;
|
15564
|
+
case 'surprised':
|
15565
|
+
return (_e = reactionResources.surprisedReaction) === null || _e === void 0 ? void 0 : _e.size;
|
15566
|
+
default:
|
15567
|
+
return undefined;
|
15568
|
+
}
|
15483
15569
|
};
|
15484
15570
|
|
15485
15571
|
// Copyright (c) Microsoft Corporation.
|
@@ -15502,6 +15588,9 @@ const ParticipantVideoTileOverlay = React.memo((props) => {
|
|
15502
15588
|
const frameCount = reaction !== undefined && reactionResources !== undefined
|
15503
15589
|
? getEmojiFrameCount(reaction === null || reaction === void 0 ? void 0 : reaction.reactionType, reactionResources)
|
15504
15590
|
: undefined;
|
15591
|
+
const frameSize = reaction !== undefined && reactionResources !== undefined
|
15592
|
+
? getEmojiFrameSize(reaction === null || reaction === void 0 ? void 0 : reaction.reactionType, reactionResources)
|
15593
|
+
: undefined;
|
15505
15594
|
const currentUnixTimeStamp = Date.now();
|
15506
15595
|
const receivedUnixTimestamp = reaction ? getReceivedUnixTime(reaction.receivedOn) : undefined;
|
15507
15596
|
const canRenderReaction = (receivedUnixTimestamp
|
@@ -15520,18 +15609,24 @@ const ParticipantVideoTileOverlay = React.memo((props) => {
|
|
15520
15609
|
}, [backgroundImageUrl]);
|
15521
15610
|
const spriteImageUrl = backgroundImageUrl !== null && backgroundImageUrl !== void 0 ? backgroundImageUrl : undefined;
|
15522
15611
|
const reactionContainerStyles = React.useCallback(() => reactionRenderingStyle({
|
15523
|
-
spriteImageUrl,
|
15612
|
+
spriteImageUrl: spriteImageUrl !== null && spriteImageUrl !== void 0 ? spriteImageUrl : '',
|
15524
15613
|
emojiSize: emojiSize,
|
15525
|
-
frameCount
|
15526
|
-
|
15614
|
+
frameCount: frameCount !== null && frameCount !== void 0 ? frameCount : REACTION_NUMBER_OF_ANIMATION_FRAMES,
|
15615
|
+
rawFrameSize: frameSize !== null && frameSize !== void 0 ? frameSize : REACTION_DEFAULT_RESOURCE_FRAME_SIZE_PX
|
15616
|
+
}), [spriteImageUrl, emojiSize, frameCount, frameSize]);
|
15527
15617
|
return (React.createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles, {
|
15528
15618
|
display: 'flex',
|
15529
15619
|
justifyContent: 'center',
|
15530
15620
|
alignItems: 'center',
|
15531
|
-
backgroundColor: canRenderReaction ? 'rgba(0, 0, 0, 0.5)' : 'transparent'
|
15621
|
+
backgroundColor: canRenderReaction ? 'rgba(0, 0, 0, 0.5)' : 'transparent',
|
15622
|
+
borderRadius: '0.25rem'
|
15532
15623
|
}) },
|
15533
15624
|
React.createElement("div", { style: { height: '33.33%' } }),
|
15534
|
-
canRenderReaction && isValidImageSource && (React.createElement("div", { style: {
|
15625
|
+
canRenderReaction && isValidImageSource && (React.createElement("div", { style: {
|
15626
|
+
minHeight: `${emojiSize}px`,
|
15627
|
+
height: `${emojiSize}px`,
|
15628
|
+
width: `${emojiSize}px`
|
15629
|
+
} },
|
15535
15630
|
React.createElement("div", { className: reactionContainerStyles() })))));
|
15536
15631
|
});
|
15537
15632
|
|
@@ -15849,10 +15944,10 @@ const RemoteContentShareReactionOverlay = React.memo((props) => {
|
|
15849
15944
|
}
|
15850
15945
|
return canRender;
|
15851
15946
|
};
|
15852
|
-
const containerHeight = hostDivHeight !== null && hostDivHeight !== void 0 ? hostDivHeight : 0;
|
15853
|
-
const containerWidth = hostDivWidth !== null && hostDivWidth !== void 0 ? hostDivWidth : 0;
|
15854
15947
|
const styleBucket = () => getReactionStyleBucket();
|
15855
15948
|
const displaySizePx = () => REACTION_START_DISPLAY_SIZE * styleBucket().sizeScale;
|
15949
|
+
const containerHeight = hostDivHeight !== null && hostDivHeight !== void 0 ? hostDivHeight : 0;
|
15950
|
+
const containerWidth = (hostDivWidth !== null && hostDivWidth !== void 0 ? hostDivWidth : 0) - displaySizePx();
|
15856
15951
|
const leftPosition = (position) => generateStartPositionWave(position, containerWidth / 2, true);
|
15857
15952
|
const reactionMovementStyle = (position) => getReactionMovementStyle(leftPosition(position));
|
15858
15953
|
return (React.createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles, {
|
@@ -15887,7 +15982,7 @@ const RemoteContentShareReactionOverlay = React.memo((props) => {
|
|
15887
15982
|
* Emoji max size
|
15888
15983
|
* @internal
|
15889
15984
|
*/
|
15890
|
-
const DEFAULT_EMOJI_MAX_SIZE_PX =
|
15985
|
+
const DEFAULT_EMOJI_MAX_SIZE_PX = 70;
|
15891
15986
|
/* @conditional-compile-remove(reaction) */
|
15892
15987
|
/**
|
15893
15988
|
* Emoji min size
|
@@ -19988,7 +20083,7 @@ const ReactionButton = (props) => {
|
|
19988
20083
|
backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''
|
19989
20084
|
};
|
19990
20085
|
const classname = react.mergeStyles(reactionEmojiMenuStyles());
|
19991
|
-
const renderEmoji = (item, dismissMenu) => (React.createElement("div", { className: classname }, emojis.map((emoji, index) => {
|
20086
|
+
const renderEmoji = (item, dismissMenu) => (React.createElement("div", { "data-ui-id": "reaction-sub-menu", className: classname }, emojis.map((emoji, index) => {
|
19992
20087
|
const resourceUrl = emojiResource.get(emoji);
|
19993
20088
|
const frameCount = props.reactionResources !== undefined ? getEmojiFrameCount(emoji, props.reactionResources) : 0;
|
19994
20089
|
const classname = react.mergeStyles(emojiStyles(resourceUrl ? resourceUrl : '', frameCount));
|
@@ -22937,11 +23032,18 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
22937
23032
|
};
|
22938
23033
|
yield chatThreadClient.sendMessage(sendMessageRequest, options);
|
22939
23034
|
}),
|
22940
|
-
onUpdateMessage: (messageId, content,
|
22941
|
-
|
22942
|
-
|
22943
|
-
|
22944
|
-
|
23035
|
+
onUpdateMessage: (messageId, content,
|
23036
|
+
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
23037
|
+
options) => __awaiter$v(void 0, void 0, void 0, function* () {
|
23038
|
+
var _a;
|
23039
|
+
let updatedMetadata = {};
|
23040
|
+
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
23041
|
+
updatedMetadata = (options === null || options === void 0 ? void 0 : options.metadata) ? Object.assign({}, options.metadata) : {};
|
23042
|
+
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
23043
|
+
// need to set fileSharingMetadata explicitly to empty array to remove existing attachments
|
23044
|
+
// setting it to undefined or empty object will not remove the existing attachments
|
23045
|
+
if (updatedMetadata === null || updatedMetadata === void 0 ? void 0 : updatedMetadata.fileSharingMetadata) {
|
23046
|
+
updatedMetadata.fileSharingMetadata = JSON.stringify((_a = options === null || options === void 0 ? void 0 : options.attachmentMetadata) !== null && _a !== void 0 ? _a : []);
|
22945
23047
|
}
|
22946
23048
|
yield chatThreadClient.updateMessage(messageId, { content, metadata: updatedMetadata });
|
22947
23049
|
}),
|
@@ -22962,7 +23064,7 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
22962
23064
|
yield chatThreadClient.updateTopic(topicName);
|
22963
23065
|
}),
|
22964
23066
|
onLoadPreviousChatMessages: (messagesToLoad) => __awaiter$v(void 0, void 0, void 0, function* () {
|
22965
|
-
var
|
23067
|
+
var _b, _c, _d;
|
22966
23068
|
if (messageIterator === undefined) {
|
22967
23069
|
// Lazy definition so that errors in the method call are reported correctly.
|
22968
23070
|
// Also allows recovery via retries in case of transient errors.
|
@@ -22977,12 +23079,12 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
22977
23079
|
let earliestTime = Number.MAX_SAFE_INTEGER;
|
22978
23080
|
while (remainingMessagesToGet >= 1) {
|
22979
23081
|
const message = yield messageIterator.next();
|
22980
|
-
if ((
|
23082
|
+
if ((_b = message === null || message === void 0 ? void 0 : message.value) === null || _b === void 0 ? void 0 : _b.id) {
|
22981
23083
|
if (parseInt(message.value.id) < earliestTime) {
|
22982
23084
|
earliestTime = parseInt(message.value.id);
|
22983
23085
|
}
|
22984
23086
|
}
|
22985
|
-
if (((
|
23087
|
+
if (((_c = message.value) === null || _c === void 0 ? void 0 : _c.type) && message.value.type === 'text') {
|
22986
23088
|
remainingMessagesToGet--;
|
22987
23089
|
}
|
22988
23090
|
// We have traversed all messages in this thread
|
@@ -22993,7 +23095,7 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
22993
23095
|
}
|
22994
23096
|
// keep fetching read receipts until read receipt time < earlist message time
|
22995
23097
|
let readReceipt = yield readReceiptIterator.next();
|
22996
|
-
while (!readReceipt.done && parseInt((
|
23098
|
+
while (!readReceipt.done && parseInt((_d = readReceipt === null || readReceipt === void 0 ? void 0 : readReceipt.value) === null || _d === void 0 ? void 0 : _d.chatMessageId) >= earliestTime) {
|
22997
23099
|
readReceipt = yield readReceiptIterator.next();
|
22998
23100
|
}
|
22999
23101
|
return isAllChatMessagesLoaded;
|
@@ -23819,7 +23921,7 @@ const findSelector = (component) => {
|
|
23819
23921
|
return messageThreadSelectorImpl;
|
23820
23922
|
};
|
23821
23923
|
switch (component) {
|
23822
|
-
case SendBox
|
23924
|
+
case SendBox:
|
23823
23925
|
return sendBoxSelector;
|
23824
23926
|
/* @conditional-compile-remove(rich-text-editor) */
|
23825
23927
|
case RichTextSendBox:
|
@@ -25191,9 +25293,7 @@ const COMPOSITE_ONLY_ICONS = {
|
|
25191
25293
|
LocalCameraSwitch: React.createElement(reactIcons.CameraSwitch24Regular, null),
|
25192
25294
|
ControlBarChatButtonActive: React.createElement(reactIcons.Chat20Filled, null),
|
25193
25295
|
ControlBarChatButtonInactive: React.createElement(reactIcons.Chat20Regular, null),
|
25194
|
-
/* @conditional-compile-remove(capabilities) */
|
25195
25296
|
ControlButtonCameraProhibited: React.createElement(reactIcons.VideoProhibited20Filled, null),
|
25196
|
-
/* @conditional-compile-remove(capabilities) */
|
25197
25297
|
ControlButtonMicProhibited: React.createElement(reactIcons.MicProhibited20Filled, null),
|
25198
25298
|
/* @conditional-compile-remove(spotlight) */
|
25199
25299
|
ControlButtonExitSpotlight: React.createElement(reactIcons.VideoPersonStarOff20Filled, null),
|
@@ -25214,7 +25314,7 @@ const COMPOSITE_ONLY_ICONS = {
|
|
25214
25314
|
NoticePageRoomNotValid: React.createElement(reactIcons.Info20Filled, null),
|
25215
25315
|
NoticePageCallRejected: React.createElement(reactIcons.Info20Filled, null),
|
25216
25316
|
NoticePageCallTimeout: React.createElement(reactIcons.Info20Filled, null),
|
25217
|
-
/* @conditional-compile-remove(attachment-
|
25317
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25218
25318
|
SendBoxAttachFile: React.createElement(reactIcons.Attach20Regular, null),
|
25219
25319
|
/* @conditional-compile-remove(PSTN-calls) */
|
25220
25320
|
PeoplePaneAddPerson: React.createElement(reactIcons.PersonAdd20Regular, null),
|
@@ -25351,7 +25451,7 @@ const AttachmentUploadButton = (props) => {
|
|
25351
25451
|
} })));
|
25352
25452
|
};
|
25353
25453
|
const SendBoxAttachFileIconTrampoline = () => {
|
25354
|
-
// @conditional-compile-remove(attachment-
|
25454
|
+
// @conditional-compile-remove(attachment-upload)
|
25355
25455
|
return React.createElement(ChatCompositeIcon, { iconName: "SendBoxAttachFile" });
|
25356
25456
|
};
|
25357
25457
|
/**
|
@@ -25364,19 +25464,19 @@ const AttachmentUploadButtonWrapper = (
|
|
25364
25464
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
25365
25465
|
props) => {
|
25366
25466
|
return (React.createElement(React.Fragment, null,
|
25367
|
-
/* @conditional-compile-remove(attachment-
|
25467
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25368
25468
|
React.createElement(AttachmentUploadButton, Object.assign({}, props))));
|
25369
25469
|
};
|
25370
25470
|
const uploadAttachmentButtonStringTrampoline = () => {
|
25371
|
-
//@conditional-compile-remove(attachment-
|
25471
|
+
//@conditional-compile-remove(attachment-upload)
|
25372
25472
|
//eslint-disable-next-line react-hooks/rules-of-hooks
|
25373
25473
|
return useLocale().strings.chat.uploadAttachment;
|
25374
25474
|
};
|
25375
25475
|
|
25376
25476
|
// Copyright (c) Microsoft Corporation.
|
25377
25477
|
// Licensed under the MIT License.
|
25378
|
-
/* @conditional-compile-remove(attachment-
|
25379
|
-
/* @conditional-compile-remove(attachment-
|
25478
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25479
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25380
25480
|
/**
|
25381
25481
|
* @internal
|
25382
25482
|
*/
|
@@ -25423,7 +25523,7 @@ class AttachmentUploadContext {
|
|
25423
25523
|
}));
|
25424
25524
|
}
|
25425
25525
|
}
|
25426
|
-
/* @conditional-compile-remove(attachment-
|
25526
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25427
25527
|
/**
|
25428
25528
|
* @internal
|
25429
25529
|
*/
|
@@ -25507,7 +25607,7 @@ class AzureCommunicationAttachmentUploadAdapter {
|
|
25507
25607
|
attachmentUpload === null || attachmentUpload === void 0 ? void 0 : attachmentUpload.off('uploadFail', this.updateUploadStatusMessage.bind(this));
|
25508
25608
|
}
|
25509
25609
|
}
|
25510
|
-
/* @conditional-compile-remove(attachment-
|
25610
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25511
25611
|
/**
|
25512
25612
|
* @param attachmentUploadUiState {@link AttachmentUploadsUiState}
|
25513
25613
|
* @private
|
@@ -25533,7 +25633,7 @@ const convertAttachmentUploadsUiStateToMessageMetadata = (attachmentUploads) =>
|
|
25533
25633
|
}
|
25534
25634
|
return undefined;
|
25535
25635
|
};
|
25536
|
-
/* @conditional-compile-remove(attachment-
|
25636
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25537
25637
|
/**
|
25538
25638
|
* @private
|
25539
25639
|
*/
|
@@ -25613,7 +25713,7 @@ class ChatContext {
|
|
25613
25713
|
thread,
|
25614
25714
|
latestErrors: clientState.latestErrors
|
25615
25715
|
};
|
25616
|
-
/* @conditional-compile-remove(attachment-
|
25716
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25617
25717
|
updatedState = Object.assign(Object.assign({}, updatedState), { attachmentUploads: this.state.attachmentUploads });
|
25618
25718
|
this.setState(updatedState);
|
25619
25719
|
}
|
@@ -25628,7 +25728,7 @@ class AzureCommunicationChatAdapter {
|
|
25628
25728
|
this.chatClient = chatClient;
|
25629
25729
|
this.chatThreadClient = chatThreadClient;
|
25630
25730
|
this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId);
|
25631
|
-
/* @conditional-compile-remove(attachment-
|
25731
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25632
25732
|
this.attachmentUploadAdapter = new AzureCommunicationAttachmentUploadAdapter(this.context);
|
25633
25733
|
const onStateChange = (clientState) => {
|
25634
25734
|
// unsubscribe when the instance gets disposed
|
@@ -25658,19 +25758,19 @@ class AzureCommunicationChatAdapter {
|
|
25658
25758
|
this.loadPreviousChatMessages = this.loadPreviousChatMessages.bind(this);
|
25659
25759
|
this.on = this.on.bind(this);
|
25660
25760
|
this.off = this.off.bind(this);
|
25661
|
-
/* @conditional-compile-remove(attachment-
|
25761
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25662
25762
|
this.registerActiveUploads = this.registerActiveUploads.bind(this);
|
25663
|
-
/* @conditional-compile-remove(attachment-
|
25763
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25664
25764
|
this.registerCompletedUploads = this.registerCompletedUploads.bind(this);
|
25665
|
-
/* @conditional-compile-remove(attachment-
|
25765
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25666
25766
|
this.clearUploads = this.clearUploads.bind(this);
|
25667
|
-
/* @conditional-compile-remove(attachment-
|
25767
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25668
25768
|
this.cancelUpload = this.cancelUpload.bind(this);
|
25669
|
-
/* @conditional-compile-remove(attachment-
|
25769
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25670
25770
|
this.updateUploadProgress = this.updateUploadProgress.bind(this);
|
25671
|
-
/* @conditional-compile-remove(attachment-
|
25771
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25672
25772
|
this.updateUploadStatusMessage = this.updateUploadStatusMessage.bind(this);
|
25673
|
-
/* @conditional-compile-remove(attachment-
|
25773
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25674
25774
|
this.updateUploadMetadata = this.updateUploadMetadata.bind(this);
|
25675
25775
|
this.downloadResourceToCache = this.downloadResourceToCache.bind(this);
|
25676
25776
|
this.removeResourceFromCache = this.removeResourceFromCache.bind(this);
|
@@ -25720,9 +25820,9 @@ class AzureCommunicationChatAdapter {
|
|
25720
25820
|
sendMessage(content_1) {
|
25721
25821
|
return __awaiter$o(this, arguments, void 0, function* (content, options = {}) {
|
25722
25822
|
yield this.asyncTeeErrorToEventEmitter(() => __awaiter$o(this, void 0, void 0, function* () {
|
25723
|
-
/* @conditional-compile-remove(attachment-
|
25823
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25724
25824
|
options.metadata = Object.assign(Object.assign({}, options.metadata), convertAttachmentUploadsUiStateToMessageMetadata(this.context.getState().attachmentUploads));
|
25725
|
-
/* @conditional-compile-remove(attachment-
|
25825
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25726
25826
|
/**
|
25727
25827
|
* All the current uploads need to be clear from the state before a message has been sent.
|
25728
25828
|
* This ensures the following behavior:
|
@@ -25773,9 +25873,9 @@ class AzureCommunicationChatAdapter {
|
|
25773
25873
|
updateMessage(messageId, content, metadata, options) {
|
25774
25874
|
return __awaiter$o(this, void 0, void 0, function* () {
|
25775
25875
|
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$o(this, void 0, void 0, function* () {
|
25776
|
-
/* @conditional-compile-remove(attachment-
|
25876
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25777
25877
|
const updatedOptions = { attachmentMetadata: options === null || options === void 0 ? void 0 : options.attachmentMetadata, metadata: metadata };
|
25778
|
-
/* @conditional-compile-remove(attachment-
|
25878
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25779
25879
|
return yield this.handlers.onUpdateMessage(messageId, content, updatedOptions);
|
25780
25880
|
}));
|
25781
25881
|
});
|
@@ -25787,31 +25887,31 @@ class AzureCommunicationChatAdapter {
|
|
25787
25887
|
}));
|
25788
25888
|
});
|
25789
25889
|
}
|
25790
|
-
/* @conditional-compile-remove(attachment-
|
25890
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25791
25891
|
registerActiveUploads(files) {
|
25792
25892
|
return this.attachmentUploadAdapter.registerActiveUploads(files);
|
25793
25893
|
}
|
25794
|
-
/* @conditional-compile-remove(attachment-
|
25894
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25795
25895
|
registerCompletedUploads(metadata) {
|
25796
25896
|
return this.attachmentUploadAdapter.registerCompletedUploads(metadata);
|
25797
25897
|
}
|
25798
|
-
/* @conditional-compile-remove(attachment-
|
25898
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25799
25899
|
clearUploads() {
|
25800
25900
|
this.attachmentUploadAdapter.clearUploads();
|
25801
25901
|
}
|
25802
|
-
/* @conditional-compile-remove(attachment-
|
25902
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25803
25903
|
cancelUpload(id) {
|
25804
25904
|
this.attachmentUploadAdapter.cancelUpload(id);
|
25805
25905
|
}
|
25806
|
-
/* @conditional-compile-remove(attachment-
|
25906
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25807
25907
|
updateUploadProgress(id, progress) {
|
25808
25908
|
this.attachmentUploadAdapter.updateUploadProgress(id, progress);
|
25809
25909
|
}
|
25810
|
-
/* @conditional-compile-remove(attachment-
|
25910
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25811
25911
|
updateUploadStatusMessage(id, errorMessage) {
|
25812
25912
|
this.attachmentUploadAdapter.updateUploadStatusMessage(id, errorMessage);
|
25813
25913
|
}
|
25814
|
-
/* @conditional-compile-remove(attachment-
|
25914
|
+
/* @conditional-compile-remove(attachment-upload) */
|
25815
25915
|
updateUploadMetadata(id, metadata) {
|
25816
25916
|
this.attachmentUploadAdapter.updateUploadMetadata(id, metadata);
|
25817
25917
|
}
|
@@ -26496,13 +26596,17 @@ const createCompositeHandlers$1 = memoizeOne((adapter) => ({
|
|
26496
26596
|
onRemoveParticipant: adapter.removeParticipant,
|
26497
26597
|
updateThreadTopicName: adapter.setTopic,
|
26498
26598
|
onUpdateMessage: (messageId, content,
|
26499
|
-
/* @conditional-compile-remove(attachment-
|
26599
|
+
/* @conditional-compile-remove(attachment-upload) */
|
26500
26600
|
options) => {
|
26501
|
-
|
26502
|
-
/* @conditional-compile-remove(attachment-
|
26503
|
-
|
26601
|
+
let metadata = undefined;
|
26602
|
+
/* @conditional-compile-remove(attachment-upload) */
|
26603
|
+
metadata = options === null || options === void 0 ? void 0 : options.metadata;
|
26604
|
+
/* @conditional-compile-remove(attachment-upload) */
|
26605
|
+
const updatedOptions = {
|
26606
|
+
attachmentMetadata: options === null || options === void 0 ? void 0 : options.attachmentMetadata
|
26607
|
+
};
|
26504
26608
|
return adapter.updateMessage(messageId, content, metadata,
|
26505
|
-
/* @conditional-compile-remove(attachment-
|
26609
|
+
/* @conditional-compile-remove(attachment-upload) */ updatedOptions);
|
26506
26610
|
},
|
26507
26611
|
onDeleteMessage: adapter.deleteMessage
|
26508
26612
|
}));
|
@@ -26768,12 +26872,9 @@ const AttachmentDownloadErrorBar = (props) => {
|
|
26768
26872
|
/**
|
26769
26873
|
* @private
|
26770
26874
|
*/
|
26771
|
-
|
26772
|
-
|
26773
|
-
|
26774
|
-
const getAttachmentUploads = (state) => {
|
26775
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
26776
|
-
return state === null || state === void 0 ? void 0 : state.attachmentUploads;
|
26875
|
+
const useSelector$2 = (selector, selectorProps) => {
|
26876
|
+
// use selector with no adaptation
|
26877
|
+
return useSelectorWithAdaptation$1(selector, (state) => state, selectorProps);
|
26777
26878
|
};
|
26778
26879
|
|
26779
26880
|
// Copyright (c) Microsoft Corporation.
|
@@ -26781,56 +26882,23 @@ const getAttachmentUploads = (state) => {
|
|
26781
26882
|
/**
|
26782
26883
|
* @private
|
26783
26884
|
*/
|
26784
|
-
const attachmentUploadsSelector = reselect.createSelector([getAttachmentUploads], (attachmentUploads) => {
|
26785
|
-
const attachments = Object.values(attachmentUploads || {}).map((attachmentUpload) => (Object.assign(Object.assign({}, attachmentUpload), { uploadComplete: !!attachmentUpload })));
|
26786
|
-
return { attachments };
|
26787
|
-
});
|
26788
|
-
|
26789
|
-
// Copyright (c) Microsoft Corporation.
|
26790
|
-
// Licensed under the MIT License.
|
26791
26885
|
/**
|
26792
26886
|
* @private
|
26793
26887
|
*/
|
26794
|
-
const
|
26795
|
-
|
26796
|
-
return
|
26888
|
+
const getAttachmentUploads = (state) => {
|
26889
|
+
/* @conditional-compile-remove(attachment-upload) */
|
26890
|
+
return state === null || state === void 0 ? void 0 : state.attachmentUploads;
|
26797
26891
|
};
|
26798
26892
|
|
26799
26893
|
// Copyright (c) Microsoft Corporation.
|
26800
26894
|
// Licensed under the MIT License.
|
26801
|
-
/* @conditional-compile-remove(rich-text-editor) */
|
26802
|
-
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-B8qxZi1I.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
|
26803
26895
|
/**
|
26804
26896
|
* @private
|
26805
26897
|
*/
|
26806
|
-
const
|
26807
|
-
const {
|
26808
|
-
|
26809
|
-
|
26810
|
-
const sendBoxProps = usePropsFor$2(SendBox$1);
|
26811
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
26812
|
-
const activeAttachmentUploads = useSelector$2(attachmentUploadsSelector).attachments;
|
26813
|
-
const sendBoxStyles = React.useMemo(() => {
|
26814
|
-
return Object.assign({}, styles);
|
26815
|
-
}, [styles]);
|
26816
|
-
const simpleSendBox = React.useMemo(() => (React.createElement(SendBox$1, Object.assign({}, sendBoxProps, { autoFocus: options === null || options === void 0 ? void 0 : options.autoFocus, styles: sendBoxStyles,
|
26817
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
26818
|
-
activeAttachmentUploads: activeAttachmentUploads,
|
26819
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
26820
|
-
onCancelAttachmentUpload: adapter.cancelUpload }))), [
|
26821
|
-
sendBoxProps,
|
26822
|
-
options,
|
26823
|
-
sendBoxStyles,
|
26824
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ activeAttachmentUploads,
|
26825
|
-
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ adapter
|
26826
|
-
]);
|
26827
|
-
// /* @conditional-compile-remove(rich-text-editor) */
|
26828
|
-
if ((options === null || options === void 0 ? void 0 : options.richTextEditor) === true) {
|
26829
|
-
return (React.createElement(React.Suspense, { fallback: simpleSendBox },
|
26830
|
-
React.createElement(RichTextSendBoxWrapper, null)));
|
26831
|
-
}
|
26832
|
-
return simpleSendBox;
|
26833
|
-
};
|
26898
|
+
const attachmentUploadsSelector = reselect.createSelector([getAttachmentUploads], (attachmentUploads) => {
|
26899
|
+
const attachments = Object.values(attachmentUploads || {}).map((attachmentUpload) => (Object.assign(Object.assign({}, attachmentUpload), { uploadComplete: !!attachmentUpload })));
|
26900
|
+
return { attachments };
|
26901
|
+
});
|
26834
26902
|
|
26835
26903
|
// Copyright (c) Microsoft Corporation.
|
26836
26904
|
// Licensed under the MIT License.
|
@@ -26867,6 +26935,7 @@ const ChatScreen = (props) => {
|
|
26867
26935
|
fetchData();
|
26868
26936
|
}, [adapter]);
|
26869
26937
|
const messageThreadProps = usePropsFor$2(MessageThread);
|
26938
|
+
const sendBoxProps = usePropsFor$2(SendBox);
|
26870
26939
|
const typingIndicatorProps = usePropsFor$2(TypingIndicator);
|
26871
26940
|
const headerProps = useAdaptedSelector$1(getHeaderProps);
|
26872
26941
|
const errorBarProps = usePropsFor$2(ErrorBar);
|
@@ -26908,15 +26977,18 @@ const ChatScreen = (props) => {
|
|
26908
26977
|
const typingIndicatorStyles = React.useMemo(() => {
|
26909
26978
|
return Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.typingIndicator);
|
26910
26979
|
}, [styles === null || styles === void 0 ? void 0 : styles.typingIndicator]);
|
26980
|
+
const sendBoxStyles = React.useMemo(() => {
|
26981
|
+
return Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.sendBox);
|
26982
|
+
}, [styles === null || styles === void 0 ? void 0 : styles.sendBox]);
|
26911
26983
|
const userId = toFlatCommunicationIdentifier(adapter.getState().userId);
|
26912
26984
|
const attachmentUploadButtonOnChange = React.useCallback((files) => {
|
26913
26985
|
var _a;
|
26914
26986
|
if (!files) {
|
26915
26987
|
return;
|
26916
26988
|
}
|
26917
|
-
/* @conditional-compile-remove(attachment-
|
26989
|
+
/* @conditional-compile-remove(attachment-upload) */
|
26918
26990
|
const attachmentUploads = adapter.registerActiveUploads(Array.from(files));
|
26919
|
-
/* @conditional-compile-remove(attachment-
|
26991
|
+
/* @conditional-compile-remove(attachment-upload) */
|
26920
26992
|
(_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handler(attachmentUploads);
|
26921
26993
|
}, [adapter, attachmentOptions]);
|
26922
26994
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
@@ -27025,6 +27097,8 @@ const ChatScreen = (props) => {
|
|
27025
27097
|
(_d = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _d === void 0 ? void 0 : _d.disableMultipleUploads,
|
27026
27098
|
attachmentUploadButtonOnChange
|
27027
27099
|
]);
|
27100
|
+
/* @conditional-compile-remove(attachment-upload) */
|
27101
|
+
const activeAttachmentUploads = useSelector$2(attachmentUploadsSelector).attachments;
|
27028
27102
|
return (React.createElement(react.Stack, { className: chatContainer, grow: true },
|
27029
27103
|
(options === null || options === void 0 ? void 0 : options.topic) !== false && React.createElement(ChatHeader, Object.assign({}, headerProps)),
|
27030
27104
|
React.createElement(react.Stack, { className: chatArea, tokens: participantListContainerPadding, horizontal: true, grow: true },
|
@@ -27043,9 +27117,11 @@ const ChatScreen = (props) => {
|
|
27043
27117
|
formFactor === 'mobile' && (React.createElement(react.Stack, { verticalAlign: "center" },
|
27044
27118
|
React.createElement(AttachmentButton, null))),
|
27045
27119
|
React.createElement(react.Stack, { grow: true },
|
27046
|
-
React.createElement(SendBox, {
|
27047
|
-
/* @conditional-compile-remove(attachment-
|
27048
|
-
|
27120
|
+
React.createElement(SendBox, Object.assign({}, sendBoxProps, { autoFocus: options === null || options === void 0 ? void 0 : options.autoFocus, styles: sendBoxStyles,
|
27121
|
+
/* @conditional-compile-remove(attachment-upload) */
|
27122
|
+
activeAttachmentUploads: activeAttachmentUploads,
|
27123
|
+
/* @conditional-compile-remove(attachment-upload) */
|
27124
|
+
onCancelAttachmentUpload: adapter.cancelUpload }))),
|
27049
27125
|
formFactor !== 'mobile' && React.createElement(AttachmentButton, null)))),
|
27050
27126
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
27051
27127
|
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React.createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' }))),
|
@@ -28232,11 +28308,8 @@ const Camera = (props) => {
|
|
28232
28308
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
28233
28309
|
const adapter = useAdapter();
|
28234
28310
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
28235
|
-
/* @conditional-compile-remove(capabilities) */
|
28236
28311
|
const turnVideoOnCapability = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.turnVideoOn;
|
28237
|
-
return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disableTooltip: props.disableTooltip, disabled: cameraButtonProps.disabled || props.disabled || (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
28238
|
-
/* @conditional-compile-remove(capabilities) */
|
28239
|
-
onRenderOffIcon: turnVideoOnCapability && !turnVideoOnCapability.isPresent
|
28312
|
+
return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disableTooltip: props.disableTooltip, disabled: cameraButtonProps.disabled || props.disabled || (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'), onRenderOffIcon: turnVideoOnCapability && !turnVideoOnCapability.isPresent
|
28240
28313
|
? () => React.createElement(_HighContrastAwareIcon, { disabled: true, iconName: 'ControlButtonCameraProhibited' })
|
28241
28314
|
: undefined, onClickVideoEffects: props.onClickVideoEffects, componentRef: props.componentRef })));
|
28242
28315
|
};
|
@@ -28423,7 +28496,6 @@ const getMicrophones = (state) => state.devices.microphones;
|
|
28423
28496
|
* @private
|
28424
28497
|
*/
|
28425
28498
|
const getCameras = (state) => state.devices.cameras;
|
28426
|
-
/* @conditional-compile-remove(capabilities) */
|
28427
28499
|
/**
|
28428
28500
|
* @private
|
28429
28501
|
*/
|
@@ -28480,7 +28552,6 @@ const getCaptionsStatus = (state) => {
|
|
28480
28552
|
* @private
|
28481
28553
|
*/
|
28482
28554
|
const getIsTeamsCall = (state) => state.isTeamsCall;
|
28483
|
-
/* @conditional-compile-remove(capabilities) */
|
28484
28555
|
/**
|
28485
28556
|
* @private
|
28486
28557
|
*/
|
@@ -28514,7 +28585,6 @@ const Microphone = (props) => {
|
|
28514
28585
|
const isLocalMicrophoneEnabled = useSelector$1(getLocalMicrophoneEnabled);
|
28515
28586
|
const adapter = useAdapter();
|
28516
28587
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
28517
|
-
/* @conditional-compile-remove(capabilities) */
|
28518
28588
|
const unmuteMicCapability = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.unmuteMic;
|
28519
28589
|
/**
|
28520
28590
|
* When call is in connecting state, microphone button should be disabled.
|
@@ -28527,9 +28597,7 @@ const Microphone = (props) => {
|
|
28527
28597
|
}
|
28528
28598
|
const styles = React.useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
28529
28599
|
// tab focus on MicrophoneButton on page load
|
28530
|
-
return (React.createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', disableTooltip: props.disableTooltip, styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled || props.disabled || (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
28531
|
-
/* @conditional-compile-remove(capabilities) */
|
28532
|
-
onRenderOffIcon: unmuteMicCapability && !unmuteMicCapability.isPresent
|
28600
|
+
return (React.createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', disableTooltip: props.disableTooltip, styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled || props.disabled || (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'), onRenderOffIcon: unmuteMicCapability && !unmuteMicCapability.isPresent
|
28533
28601
|
? () => React.createElement(_HighContrastAwareIcon, { disabled: true, iconName: 'ControlButtonMicProhibited' })
|
28534
28602
|
: undefined })));
|
28535
28603
|
};
|
@@ -28563,7 +28631,6 @@ const ScreenShare = (props) => {
|
|
28563
28631
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
28564
28632
|
const screenShareButtonDisabled = () => {
|
28565
28633
|
var _a;
|
28566
|
-
/* @conditional-compile-remove(capabilities) */ /* @conditional-compile-remove(PSTN-calls) */
|
28567
28634
|
return (_a = screenShareButtonProps === null || screenShareButtonProps === void 0 ? void 0 : screenShareButtonProps.disabled) !== null && _a !== void 0 ? _a : isDisabled$2(props.option);
|
28568
28635
|
};
|
28569
28636
|
return (React.createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled() || props.disabled || (isRoomsCall && ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Unknown'), styles: styles })));
|
@@ -28824,6 +28891,18 @@ const capabilitySelector = reselect__namespace.createSelector([getCapabilites],
|
|
28824
28891
|
};
|
28825
28892
|
});
|
28826
28893
|
|
28894
|
+
// Copyright (c) Microsoft Corporation.
|
28895
|
+
// Licensed under the MIT License.
|
28896
|
+
/**
|
28897
|
+
* @private
|
28898
|
+
*/
|
28899
|
+
const callStatusSelector = reselect.createSelector([getCallStatus, getIsScreenShareOn], (callStatus, isScreenShareOn) => {
|
28900
|
+
return {
|
28901
|
+
callStatus,
|
28902
|
+
isScreenShareOn
|
28903
|
+
};
|
28904
|
+
});
|
28905
|
+
|
28827
28906
|
// Copyright (c) Microsoft Corporation.
|
28828
28907
|
// Licensed under the MIT License.
|
28829
28908
|
// Enforce a background color on control bar to ensure it matches the composite background color.
|
@@ -28863,7 +28942,11 @@ const CallControls = (props) => {
|
|
28863
28942
|
/* @conditional-compile-remove(reaction) */
|
28864
28943
|
const capabilitiesSelector = useSelector$1(capabilitySelector);
|
28865
28944
|
/* @conditional-compile-remove(reaction) */
|
28866
|
-
const
|
28945
|
+
const callState = useSelector$1(callStatusSelector);
|
28946
|
+
/* @conditional-compile-remove(reaction) */
|
28947
|
+
const isReactionAllowed = callState.callStatus !== 'Connected' ||
|
28948
|
+
!(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) ||
|
28949
|
+
capabilitiesSelector.capabilities.useReactions.isPresent;
|
28867
28950
|
const devicesButtonProps = usePropsFor$1(DevicesButton);
|
28868
28951
|
let numberOfButtons = 0;
|
28869
28952
|
const screenShareButtonIsEnabled = isEnabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton);
|
@@ -29881,7 +29964,11 @@ const CommonCallControlBar = (props) => {
|
|
29881
29964
|
/* @conditional-compile-remove(reaction) */
|
29882
29965
|
const capabilitiesSelector = useSelector$1(capabilitySelector);
|
29883
29966
|
/* @conditional-compile-remove(reaction) */
|
29884
|
-
const
|
29967
|
+
const callState = useSelector$1(callStatusSelector);
|
29968
|
+
/* @conditional-compile-remove(reaction) */
|
29969
|
+
const isReactionAllowed = callState.callStatus !== 'Connected' ||
|
29970
|
+
!(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) ||
|
29971
|
+
capabilitiesSelector.capabilities.useReactions.isPresent;
|
29885
29972
|
// when options is false then we want to hide the whole control bar.
|
29886
29973
|
if (options === false) {
|
29887
29974
|
return React.createElement(React.Fragment, null);
|
@@ -30119,18 +30206,6 @@ const textStyle = (theme) => {
|
|
30119
30206
|
const isSpeakingAndMutedAnimationStyles = Object.assign({}, react.AnimationStyles.fadeIn100);
|
30120
30207
|
const isNotSpeakingAndMutedAnimationStyles = Object.assign(Object.assign({}, react.AnimationStyles.fadeOut200), { display: 'none' });
|
30121
30208
|
|
30122
|
-
// Copyright (c) Microsoft Corporation.
|
30123
|
-
// Licensed under the MIT License.
|
30124
|
-
/**
|
30125
|
-
* @private
|
30126
|
-
*/
|
30127
|
-
const callStatusSelector = reselect.createSelector([getCallStatus, getIsScreenShareOn], (callStatus, isScreenShareOn) => {
|
30128
|
-
return {
|
30129
|
-
callStatus,
|
30130
|
-
isScreenShareOn
|
30131
|
-
};
|
30132
|
-
});
|
30133
|
-
|
30134
30209
|
// Copyright (c) Microsoft Corporation.
|
30135
30210
|
// Licensed under the MIT License.
|
30136
30211
|
/**
|
@@ -32036,8 +32111,6 @@ const ModalLocalAndRemotePIP = (props) => {
|
|
32036
32111
|
|
32037
32112
|
// Copyright (c) Microsoft Corporation.
|
32038
32113
|
// Licensed under the MIT License.
|
32039
|
-
/* @conditional-compile-remove(capabilities) */
|
32040
|
-
/* @conditional-compile-remove(capabilities) */
|
32041
32114
|
/**
|
32042
32115
|
* Notification bar for capabilities changed
|
32043
32116
|
* @private
|
@@ -32053,7 +32126,6 @@ const CapabilitiesChangedNotificationBar = (props) => {
|
|
32053
32126
|
return (React.createElement(react.MessageBar, { key: notification.capabilityName, styles: messageBarStyles, messageBarType: react.MessageBarType.warning, dismissIconProps: { iconName: 'ErrorBarClear' }, onDismiss: () => props.onDismissNotification(notification), messageBarIconProps: iconProps }, message));
|
32054
32127
|
})));
|
32055
32128
|
};
|
32056
|
-
/* @conditional-compile-remove(capabilities) */
|
32057
32129
|
const getCapabilityChangedNotificationString = (notification, strings) => {
|
32058
32130
|
var _a, _b, _c, _d, _e, _f;
|
32059
32131
|
switch (notification.capabilityName) {
|
@@ -32082,7 +32154,6 @@ const getCapabilityChangedNotificationString = (notification, strings) => {
|
|
32082
32154
|
}
|
32083
32155
|
return undefined;
|
32084
32156
|
};
|
32085
|
-
/* @conditional-compile-remove(capabilities) */
|
32086
32157
|
const getCustomMessageBarIconProps = (notification) => {
|
32087
32158
|
let iconName = undefined;
|
32088
32159
|
switch (notification.capabilityName) {
|
@@ -32107,7 +32178,6 @@ const getCustomMessageBarIconProps = (notification) => {
|
|
32107
32178
|
}
|
32108
32179
|
return { iconName, styles: { root: { '> *': { height: '1rem', width: '1rem' } } } };
|
32109
32180
|
};
|
32110
|
-
/* @conditional-compile-remove(capabilities) */
|
32111
32181
|
const messageBarStyles = {
|
32112
32182
|
innerText: {
|
32113
32183
|
alignSelf: 'center'
|
@@ -32444,7 +32514,6 @@ const CallArrangement = (props) => {
|
|
32444
32514
|
const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId);
|
32445
32515
|
const pipStyles = React.useMemo(() => getPipStyles(theme), [theme]);
|
32446
32516
|
const verticalControlBar = props.mobileView && containerWidth && containerHeight && containerWidth / containerHeight > 1 ? true : false;
|
32447
|
-
/* @conditional-compile-remove(capabilities) */
|
32448
32517
|
// Filter out shareScreen capability notifications if on mobile
|
32449
32518
|
const filteredCapabilitesChangedNotifications = props.mobileView
|
32450
32519
|
? (_e = props.capabilitiesChangedNotificationBarProps) === null || _e === void 0 ? void 0 : _e.capabilitiesChangedNotifications.filter((notification) => notification.capabilityName !== 'shareScreen')
|
@@ -32490,7 +32559,6 @@ const CallArrangement = (props) => {
|
|
32490
32559
|
React.createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
|
32491
32560
|
props.errorBarProps !== false && (React.createElement(react.Stack, { styles: bannerNotificationStyles },
|
32492
32561
|
React.createElement(ErrorBar, Object.assign({}, props.errorBarProps, { onDismissError: props.onDismissError, activeErrorMessages: filteredLatestErrors })))),
|
32493
|
-
/* @conditional-compile-remove(capabilities) */
|
32494
32562
|
props.capabilitiesChangedNotificationBarProps &&
|
32495
32563
|
props.capabilitiesChangedNotificationBarProps.capabilitiesChangedNotifications.length > 0 && (React.createElement(react.Stack, { styles: bannerNotificationStyles },
|
32496
32564
|
React.createElement(CapabilitiesChangedNotificationBar, Object.assign({}, props.capabilitiesChangedNotificationBarProps, { capabilitiesChangedNotifications: filteredCapabilitesChangedNotifications !== null && filteredCapabilitesChangedNotifications !== void 0 ? filteredCapabilitesChangedNotifications : [] })))),
|
@@ -32999,9 +33067,7 @@ const CallPage = (props) => {
|
|
32999
33067
|
const onRenderGalleryContentTrampoline = () => {
|
33000
33068
|
var _a;
|
33001
33069
|
if (dtmfDialerPresent) {
|
33002
|
-
return (React.createElement(DtmfDialpadPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError,
|
33003
|
-
/* @conditional-compile-remove(capabilities) */
|
33004
|
-
capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, compositeAudioContext: compositeAudioContext }));
|
33070
|
+
return (React.createElement(DtmfDialpadPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: props.latestErrors, onDismissError: props.onDismissError, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent, compositeAudioContext: compositeAudioContext }));
|
33005
33071
|
}
|
33006
33072
|
else {
|
33007
33073
|
return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants,
|
@@ -33019,9 +33085,7 @@ const CallPage = (props) => {
|
|
33019
33085
|
onFetchParticipantMenuItems: onFetchParticipantMenuItems,
|
33020
33086
|
options: callControlOptions,
|
33021
33087
|
increaseFlyoutItemSize: mobileView
|
33022
|
-
}, onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (onRenderGalleryContentTrampoline()) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React.createElement(React.Fragment, null)), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: onCloseChatPane, dataUiId: 'call-page', latestErrors: props.latestErrors, onDismissError: props.onDismissError, onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition, onUserSetGalleryLayoutChange: onUserSetGalleryLayoutChange, userSetGalleryLayout: galleryLayout,
|
33023
|
-
/* @conditional-compile-remove(capabilities) */
|
33024
|
-
capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent,
|
33088
|
+
}, onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView, modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (onRenderGalleryContentTrampoline()) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React.createElement(React.Fragment, null)), updateSidePaneRenderer: props.updateSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: onCloseChatPane, dataUiId: 'call-page', latestErrors: props.latestErrors, onDismissError: props.onDismissError, onUserSetOverflowGalleryPositionChange: onSetUserSetOverflowGalleryPosition, onUserSetGalleryLayoutChange: onUserSetGalleryLayoutChange, userSetGalleryLayout: galleryLayout, capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent,
|
33025
33089
|
/* @conditional-compile-remove(spotlight) */
|
33026
33090
|
setIsPromptOpen: setIsPromptOpen,
|
33027
33091
|
/* @conditional-compile-remove(spotlight) */
|
@@ -34219,12 +34283,7 @@ const ConfigurationPage = (props) => {
|
|
34219
34283
|
hostId: modalLayerHostId
|
34220
34284
|
}), [modalLayerHostId]);
|
34221
34285
|
const filteredErrorBarProps = React.useMemo(() => (Object.assign(Object.assign({}, errorBarProps), { activeErrorMessages: filteredLatestErrors })), [errorBarProps, filteredLatestErrors]);
|
34222
|
-
const containerStyles = React.useMemo(() => {
|
34223
|
-
var _a;
|
34224
|
-
return configurationContainerStyle(!mobileView,
|
34225
|
-
/* @conditional-compile-remove(custom-branding) */
|
34226
|
-
(_a = props.backgroundImage) === null || _a === void 0 ? void 0 : _a.url);
|
34227
|
-
}, [mobileView, /* @conditional-compile-remove(custom-branding) */ (_d = props.backgroundImage) === null || _d === void 0 ? void 0 : _d.url]);
|
34286
|
+
const containerStyles = React.useMemo(() => { var _a; return configurationContainerStyle(!mobileView, (_a = props.backgroundImage) === null || _a === void 0 ? void 0 : _a.url); }, [mobileView, (_d = props.backgroundImage) === null || _d === void 0 ? void 0 : _d.url]);
|
34228
34287
|
return (React.createElement(react.Stack, { styles: containerStyles },
|
34229
34288
|
React.createElement(react.Stack, { styles: bannerNotificationStyles },
|
34230
34289
|
React.createElement(ConfigurationPageErrorBar
|
@@ -34255,15 +34314,9 @@ const ConfigurationPage = (props) => {
|
|
34255
34314
|
/* @conditional-compile-remove(unsupported-browser) */
|
34256
34315
|
environmentInfo: environmentInfo, setIsPermissionsModalDismissed: setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick })),
|
34257
34316
|
React.createElement(react.Stack, { verticalFill: true, grow: true, horizontal: true, className: fillWidth },
|
34258
|
-
React.createElement(react.Stack, { className: configurationCenteredContent(mobileWithPreview,
|
34259
|
-
/* @conditional-compile-remove(custom-branding) */
|
34260
|
-
!!props.logo), verticalAlign: "center", verticalFill: mobileWithPreview, tokens: mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop },
|
34317
|
+
React.createElement(react.Stack, { className: configurationCenteredContent(mobileWithPreview, !!props.logo), verticalAlign: "center", verticalFill: mobileWithPreview, tokens: mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop },
|
34261
34318
|
React.createElement(react.Stack.Item, { styles: callDetailsContainerStyles },
|
34262
|
-
React.createElement(Logo
|
34263
|
-
/* @conditional-compile-remove(custom-branding) */
|
34264
|
-
, {
|
34265
|
-
/* @conditional-compile-remove(custom-branding) */
|
34266
|
-
logo: props.logo }),
|
34319
|
+
React.createElement(Logo, { logo: props.logo }),
|
34267
34320
|
title,
|
34268
34321
|
callDescription),
|
34269
34322
|
React.createElement(react.Stack, { horizontal: !mobileWithPreview, horizontalAlign: mobileWithPreview ? 'stretch' : 'center', verticalFill: mobileWithPreview, tokens: deviceConfigurationStackTokens },
|
@@ -34894,8 +34947,6 @@ const deviceCountSelector = reselect.createSelector([getCameras, getMicrophones]
|
|
34894
34947
|
|
34895
34948
|
// Copyright (c) Microsoft Corporation.
|
34896
34949
|
// Licensed under the MIT License.
|
34897
|
-
/* @conditional-compile-remove(capabilities) */
|
34898
|
-
/* @conditional-compile-remove(capabilities) */
|
34899
34950
|
/**
|
34900
34951
|
* @private
|
34901
34952
|
*/
|
@@ -34905,8 +34956,6 @@ const capabilitiesChangedInfoAndRoleSelector = reselect__namespace.createSelecto
|
|
34905
34956
|
|
34906
34957
|
// Copyright (c) Microsoft Corporation.
|
34907
34958
|
// Licensed under the MIT License.
|
34908
|
-
/* @conditional-compile-remove(capabilities) */
|
34909
|
-
/* @conditional-compile-remove(capabilities) */
|
34910
34959
|
/**
|
34911
34960
|
* Create a record for when the notification was most recently dismissed for tracking dismissed notifications.
|
34912
34961
|
*
|
@@ -34933,7 +34982,6 @@ const useTrackedCapabilityChangedNotifications = (capabilitiesChangedAndRoleInfo
|
|
34933
34982
|
onDismissNotification: onDismissCapabilityChangedNotification
|
34934
34983
|
};
|
34935
34984
|
};
|
34936
|
-
/* @conditional-compile-remove(capabilities) */
|
34937
34985
|
/**
|
34938
34986
|
* Take the set of active notifications, and filter to only those that are newer than previously dismissed notifications or have never been dismissed.
|
34939
34987
|
*
|
@@ -34948,7 +34996,6 @@ const filterLatestCapabilityChangedNotifications = (activeNotifications, tracked
|
|
34948
34996
|
});
|
34949
34997
|
return filteredNotifications;
|
34950
34998
|
};
|
34951
|
-
/* @conditional-compile-remove(capabilities) */
|
34952
34999
|
/**
|
34953
35000
|
* Maintain a record of the most recently active notification for each capability name.
|
34954
35001
|
*
|
@@ -34967,7 +35014,6 @@ const updateTrackedCapabilityChangedNotificationsWithActiveNotifications = (exis
|
|
34967
35014
|
}
|
34968
35015
|
return trackedNotifications;
|
34969
35016
|
};
|
34970
|
-
/* @conditional-compile-remove(capabilities) */
|
34971
35017
|
/**
|
34972
35018
|
* Create a record for when the notification was most recently dismissed for tracking dismissed notifications.
|
34973
35019
|
*
|
@@ -34978,7 +35024,6 @@ const trackCapabilityChangedNotificationAsDismissed = (capabilityName, trackedNo
|
|
34978
35024
|
const existingNotification = trackedNotifications[capabilityName];
|
34979
35025
|
return Object.assign(Object.assign({}, trackedNotifications), { [capabilityName]: Object.assign(Object.assign({}, (existingNotification || {})), { lastDismissedAt: now }) });
|
34980
35026
|
};
|
34981
|
-
/* @conditional-compile-remove(capabilities) */
|
34982
35027
|
const updateLatestCapabilityChangedNotificationMap = (capabilitiesChangedInfoAndRole, activeNotifications) => {
|
34983
35028
|
var _a, _b;
|
34984
35029
|
if (!capabilitiesChangedInfoAndRole.capabilitiesChangeInfo) {
|
@@ -35359,9 +35404,7 @@ const MainScreen = (props) => {
|
|
35359
35404
|
};
|
35360
35405
|
}, [adapter]);
|
35361
35406
|
const compositeAudioContext = React.useRef(new AudioContext());
|
35362
|
-
/* @conditional-compile-remove(capabilities) */
|
35363
35407
|
const capabilitiesChangedInfoAndRole = useSelector$1(capabilitiesChangedInfoAndRoleSelector);
|
35364
|
-
/* @conditional-compile-remove(capabilities) */
|
35365
35408
|
const capabilitiesChangedNotificationBarProps = useTrackedCapabilityChangedNotifications(capabilitiesChangedInfoAndRole);
|
35366
35409
|
// Track the last dismissed errors of any error kind to prevent errors from re-appearing on subsequent page navigation
|
35367
35410
|
// This works by tracking the most recent timestamp of any active error type.
|
@@ -35404,13 +35447,7 @@ const MainScreen = (props) => {
|
|
35404
35447
|
/* @conditional-compile-remove(call-readiness) */
|
35405
35448
|
onPermissionsTroubleshootingClick: (_e = props.options) === null || _e === void 0 ? void 0 : _e.onPermissionsTroubleshootingClick,
|
35406
35449
|
/* @conditional-compile-remove(call-readiness) */
|
35407
|
-
onNetworkingTroubleShootingClick: (_f = props.options) === null || _f === void 0 ? void 0 : _f.onNetworkingTroubleShootingClick,
|
35408
|
-
/* @conditional-compile-remove(capabilities) */
|
35409
|
-
capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps,
|
35410
|
-
/* @conditional-compile-remove(custom-branding) */
|
35411
|
-
logo: (_h = (_g = props.options) === null || _g === void 0 ? void 0 : _g.branding) === null || _h === void 0 ? void 0 : _h.logo,
|
35412
|
-
/* @conditional-compile-remove(custom-branding) */
|
35413
|
-
backgroundImage: (_k = (_j = props.options) === null || _j === void 0 ? void 0 : _j.branding) === null || _k === void 0 ? void 0 : _k.backgroundImage }));
|
35450
|
+
onNetworkingTroubleShootingClick: (_f = props.options) === null || _f === void 0 ? void 0 : _f.onNetworkingTroubleShootingClick, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps, logo: (_h = (_g = props.options) === null || _g === void 0 ? void 0 : _g.branding) === null || _h === void 0 ? void 0 : _h.logo, backgroundImage: (_k = (_j = props.options) === null || _j === void 0 ? void 0 : _j.branding) === null || _k === void 0 ? void 0 : _k.backgroundImage }));
|
35414
35451
|
break;
|
35415
35452
|
case 'accessDeniedTeamsMeeting':
|
35416
35453
|
pageElement = (React.createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
|
@@ -35435,26 +35472,18 @@ const MainScreen = (props) => {
|
|
35435
35472
|
break;
|
35436
35473
|
}
|
35437
35474
|
case 'lobby':
|
35438
|
-
pageElement = (React.createElement(LobbyPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestErrors, onDismissError: onDismissError,
|
35439
|
-
/* @conditional-compile-remove(capabilities) */
|
35440
|
-
capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps }));
|
35475
|
+
pageElement = (React.createElement(LobbyPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestErrors, onDismissError: onDismissError, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps }));
|
35441
35476
|
break;
|
35442
35477
|
/* @conditional-compile-remove(call-transfer) */
|
35443
35478
|
case 'transferring':
|
35444
|
-
pageElement = (React.createElement(TransferPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onFetchAvatarPersonaData: onFetchAvatarPersonaData, latestErrors: latestErrors, onDismissError: onDismissError,
|
35445
|
-
/* @conditional-compile-remove(capabilities) */
|
35446
|
-
capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps }));
|
35479
|
+
pageElement = (React.createElement(TransferPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onFetchAvatarPersonaData: onFetchAvatarPersonaData, latestErrors: latestErrors, onDismissError: onDismissError, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps }));
|
35447
35480
|
break;
|
35448
35481
|
case 'call':
|
35449
|
-
pageElement = (React.createElement(CallPage, { callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: props.onCloseChatPane, latestErrors: latestErrors, onDismissError: onDismissError, galleryLayout: userSetGalleryLayout, onUserSetGalleryLayoutChange: setUserSetGalleryLayout, onSetUserSetOverflowGalleryPosition: setUserSetOverflowGalleryPosition, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition,
|
35450
|
-
/* @conditional-compile-remove(capabilities) */
|
35451
|
-
capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants, compositeAudioContext: compositeAudioContext.current }));
|
35482
|
+
pageElement = (React.createElement(CallPage, { callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, onCloseChatPane: props.onCloseChatPane, latestErrors: latestErrors, onDismissError: onDismissError, galleryLayout: userSetGalleryLayout, onUserSetGalleryLayoutChange: setUserSetGalleryLayout, onSetUserSetOverflowGalleryPosition: setUserSetOverflowGalleryPosition, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants, compositeAudioContext: compositeAudioContext.current }));
|
35452
35483
|
break;
|
35453
35484
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
35454
35485
|
case 'hold':
|
35455
|
-
pageElement = (React.createElement(React.Fragment, null, React.createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestErrors, onDismissError: onDismissError,
|
35456
|
-
/* @conditional-compile-remove(capabilities) */
|
35457
|
-
capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps })));
|
35486
|
+
pageElement = (React.createElement(React.Fragment, null, React.createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options, updateSidePaneRenderer: setSidePaneRenderer, mobileChatTabHeader: props.mobileChatTabHeader, latestErrors: latestErrors, onDismissError: onDismissError, capabilitiesChangedNotificationBarProps: capabilitiesChangedNotificationBarProps })));
|
35458
35487
|
break;
|
35459
35488
|
}
|
35460
35489
|
useEndedCallConsoleErrors(endedCall);
|
@@ -36644,7 +36673,6 @@ class AzureCommunicationCallAdapter {
|
|
36644
36673
|
(_f = this.call) === null || _f === void 0 ? void 0 : _f.on('roleChanged', this.roleChanged.bind(this));
|
36645
36674
|
/* @conditional-compile-remove(call-transfer) */
|
36646
36675
|
(_g = this.call) === null || _g === void 0 ? void 0 : _g.feature(communicationCalling.Features.Transfer).on('transferAccepted', this.transferAccepted.bind(this));
|
36647
|
-
/* @conditional-compile-remove(capabilities) */
|
36648
36676
|
(_h = this.call) === null || _h === void 0 ? void 0 : _h.feature(communicationCalling.Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));
|
36649
36677
|
/* @conditional-compile-remove(spotlight) */
|
36650
36678
|
(_j = this.call) === null || _j === void 0 ? void 0 : _j.feature(communicationCalling.Features.Spotlight).on('spotlightChanged', this.spotlightChanged.bind(this));
|
@@ -36722,7 +36750,6 @@ class AzureCommunicationCallAdapter {
|
|
36722
36750
|
transferAccepted(args) {
|
36723
36751
|
this.emitter.emit('transferAccepted', args);
|
36724
36752
|
}
|
36725
|
-
/* @conditional-compile-remove(capabilities) */
|
36726
36753
|
capabilitiesChanged(data) {
|
36727
36754
|
var _a, _b, _c, _d, _e;
|
36728
36755
|
if (((_a = data.newValue.turnVideoOn) === null || _a === void 0 ? void 0 : _a.isPresent) === false) {
|
@@ -37447,31 +37474,31 @@ class CallWithChatBackedChatAdapter {
|
|
37447
37474
|
this.setTopic = (topicName) => __awaiter$3(this, void 0, void 0, function* () {
|
37448
37475
|
throw new Error(`Chat Topics are not supported in CallWithChatComposite.`);
|
37449
37476
|
});
|
37450
|
-
/* @conditional-compile-remove(attachment-
|
37477
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37451
37478
|
this.registerActiveUploads = (files) => {
|
37452
37479
|
return this.callWithChatAdapter.registerActiveUploads(files);
|
37453
37480
|
};
|
37454
|
-
/* @conditional-compile-remove(attachment-
|
37481
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37455
37482
|
this.registerCompletedUploads = (metadata) => {
|
37456
37483
|
return this.callWithChatAdapter.registerCompletedUploads(metadata);
|
37457
37484
|
};
|
37458
|
-
/* @conditional-compile-remove(attachment-
|
37485
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37459
37486
|
this.clearUploads = () => {
|
37460
37487
|
this.callWithChatAdapter.clearUploads();
|
37461
37488
|
};
|
37462
|
-
/* @conditional-compile-remove(attachment-
|
37489
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37463
37490
|
this.cancelUpload = (id) => {
|
37464
37491
|
this.callWithChatAdapter.cancelUpload(id);
|
37465
37492
|
};
|
37466
|
-
/* @conditional-compile-remove(attachment-
|
37493
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37467
37494
|
this.updateUploadProgress = (id, progress) => {
|
37468
37495
|
this.callWithChatAdapter.updateUploadProgress(id, progress);
|
37469
37496
|
};
|
37470
|
-
/* @conditional-compile-remove(attachment-
|
37497
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37471
37498
|
this.updateUploadStatusMessage = (id, errorMessage) => {
|
37472
37499
|
this.callWithChatAdapter.updateUploadStatusMessage(id, errorMessage);
|
37473
37500
|
};
|
37474
|
-
/* @conditional-compile-remove(attachment-
|
37501
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37475
37502
|
this.updateUploadMetadata = (id, metadata) => {
|
37476
37503
|
this.callWithChatAdapter.updateUploadMetadata(id, metadata);
|
37477
37504
|
};
|
@@ -37495,7 +37522,7 @@ function chatAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
|
|
37495
37522
|
displayName: callWithChatAdapterState.displayName || '',
|
37496
37523
|
thread: callWithChatAdapterState.chat,
|
37497
37524
|
latestErrors: callWithChatAdapterState.latestChatErrors,
|
37498
|
-
/* @conditional-compile-remove(attachment-
|
37525
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37499
37526
|
attachmentUploads: callWithChatAdapterState.attachmentUploads
|
37500
37527
|
};
|
37501
37528
|
}
|
@@ -37771,7 +37798,6 @@ const CallWithChatScreen = (props) => {
|
|
37771
37798
|
localVideoTile: props.localVideoTile,
|
37772
37799
|
/* @conditional-compile-remove(end-of-call-survey) */
|
37773
37800
|
surveyOptions: surveyOptions,
|
37774
|
-
/* @conditional-compile-remove(custom-branding) */
|
37775
37801
|
branding: {
|
37776
37802
|
logo: props.logo,
|
37777
37803
|
backgroundImage: props.backgroundImage
|
@@ -37797,9 +37823,7 @@ const CallWithChatScreen = (props) => {
|
|
37797
37823
|
props.remoteVideoTileMenuOptions,
|
37798
37824
|
/* @conditional-compile-remove(end-of-call-survey) */
|
37799
37825
|
surveyOptions,
|
37800
|
-
/* @conditional-compile-remove(custom-branding) */
|
37801
37826
|
props.logo,
|
37802
|
-
/* @conditional-compile-remove(custom-branding) */
|
37803
37827
|
props.backgroundImage,
|
37804
37828
|
/* @conditional-compile-remove(spotlight) */
|
37805
37829
|
props.spotlight
|
@@ -37863,11 +37887,7 @@ const CallWithChatComposite = (props) => {
|
|
37863
37887
|
/* @conditional-compile-remove(call-readiness) */
|
37864
37888
|
deviceChecks: options === null || options === void 0 ? void 0 : options.deviceChecks, callWithChatAdapter: adapter, formFactor: formFactor, callControls: options === null || options === void 0 ? void 0 : options.callControls, joinInvitationURL: joinInvitationURL, fluentTheme: fluentTheme, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions,
|
37865
37889
|
/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
|
37866
|
-
attachmentOptions: options === null || options === void 0 ? void 0 : options.attachmentOptions, localVideoTile: options === null || options === void 0 ? void 0 : options.localVideoTile, galleryOptions: options === null || options === void 0 ? void 0 : options.galleryOptions,
|
37867
|
-
/* @conditional-compile-remove(custom-branding) */
|
37868
|
-
logo: (_a = options === null || options === void 0 ? void 0 : options.branding) === null || _a === void 0 ? void 0 : _a.logo,
|
37869
|
-
/* @conditional-compile-remove(custom-branding) */
|
37870
|
-
backgroundImage: (_b = options === null || options === void 0 ? void 0 : options.branding) === null || _b === void 0 ? void 0 : _b.backgroundImage,
|
37890
|
+
attachmentOptions: options === null || options === void 0 ? void 0 : options.attachmentOptions, localVideoTile: options === null || options === void 0 ? void 0 : options.localVideoTile, galleryOptions: options === null || options === void 0 ? void 0 : options.galleryOptions, logo: (_a = options === null || options === void 0 ? void 0 : options.branding) === null || _a === void 0 ? void 0 : _a.logo, backgroundImage: (_b = options === null || options === void 0 ? void 0 : options.branding) === null || _b === void 0 ? void 0 : _b.backgroundImage,
|
37871
37891
|
/* @conditional-compile-remove(end-of-call-survey) */
|
37872
37892
|
surveyOptions: options === null || options === void 0 ? void 0 : options.surveyOptions,
|
37873
37893
|
/* @conditional-compile-remove(spotlight) */
|
@@ -37914,7 +37934,7 @@ function callWithChatAdapterStateFromBackingStates(callAdapter) {
|
|
37914
37934
|
isTeamsCall: callAdapterState.isTeamsCall,
|
37915
37935
|
latestCallErrors: callAdapterState.latestErrors,
|
37916
37936
|
latestChatErrors: {},
|
37917
|
-
/* @conditional-compile-remove(attachment-
|
37937
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37918
37938
|
attachmentUploads: {},
|
37919
37939
|
/* @conditional-compile-remove(PSTN-calls) */
|
37920
37940
|
alternateCallerId: callAdapterState.alternateCallerId,
|
@@ -37935,7 +37955,7 @@ function callWithChatAdapterStateFromBackingStates(callAdapter) {
|
|
37935
37955
|
*/
|
37936
37956
|
function mergeChatAdapterStateIntoCallWithChatAdapterState(existingCallWithChatAdapterState, chatAdapterState) {
|
37937
37957
|
return Object.assign(Object.assign({}, existingCallWithChatAdapterState), { chat: chatAdapterState.thread, latestChatErrors: chatAdapterState.latestErrors,
|
37938
|
-
/* @conditional-compile-remove(attachment-
|
37958
|
+
/* @conditional-compile-remove(attachment-upload) */
|
37939
37959
|
attachmentUploads: chatAdapterState.attachmentUploads });
|
37940
37960
|
}
|
37941
37961
|
/**
|
@@ -38016,41 +38036,41 @@ class CallWithChatContext {
|
|
38016
38036
|
*/
|
38017
38037
|
class AzureCommunicationCallWithChatAdapter {
|
38018
38038
|
constructor(callAdapter, chatAdapterPromise) {
|
38019
|
-
/* @conditional-compile-remove(attachment-
|
38039
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38020
38040
|
this.registerActiveUploads = (files) => {
|
38021
38041
|
var _a, _b;
|
38022
38042
|
return (_b = (_a = this.chatAdapter) === null || _a === void 0 ? void 0 : _a.registerActiveUploads(files)) !== null && _b !== void 0 ? _b : [];
|
38023
38043
|
};
|
38024
|
-
/* @conditional-compile-remove(attachment-
|
38044
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38025
38045
|
this.registerCompletedUploads = (metadata) => {
|
38026
38046
|
var _a, _b;
|
38027
38047
|
return (_b = (_a = this.chatAdapter) === null || _a === void 0 ? void 0 : _a.registerCompletedUploads(metadata)) !== null && _b !== void 0 ? _b : [];
|
38028
38048
|
};
|
38029
|
-
/* @conditional-compile-remove(attachment-
|
38049
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38030
38050
|
this.clearUploads = () => {
|
38031
38051
|
this.chatAdapterPromise.then((adapter) => {
|
38032
38052
|
adapter.clearUploads();
|
38033
38053
|
});
|
38034
38054
|
};
|
38035
|
-
/* @conditional-compile-remove(attachment-
|
38055
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38036
38056
|
this.cancelUpload = (id) => {
|
38037
38057
|
this.chatAdapterPromise.then((adapter) => {
|
38038
38058
|
adapter.cancelUpload(id);
|
38039
38059
|
});
|
38040
38060
|
};
|
38041
|
-
/* @conditional-compile-remove(attachment-
|
38061
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38042
38062
|
this.updateUploadProgress = (id, progress) => {
|
38043
38063
|
this.chatAdapterPromise.then((adapter) => {
|
38044
38064
|
adapter.updateUploadProgress(id, progress);
|
38045
38065
|
});
|
38046
38066
|
};
|
38047
|
-
/* @conditional-compile-remove(attachment-
|
38067
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38048
38068
|
this.updateUploadStatusMessage = (id, errorMessage) => {
|
38049
38069
|
this.chatAdapterPromise.then((adapter) => {
|
38050
38070
|
adapter.updateUploadStatusMessage(id, errorMessage);
|
38051
38071
|
});
|
38052
38072
|
};
|
38053
|
-
/* @conditional-compile-remove(attachment-
|
38073
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38054
38074
|
this.updateUploadMetadata = (id, metadata) => {
|
38055
38075
|
this.chatAdapterPromise.then((adapter) => {
|
38056
38076
|
adapter.updateUploadMetadata(id, metadata);
|
@@ -38114,19 +38134,19 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38114
38134
|
this.deleteMessage.bind(this);
|
38115
38135
|
this.on.bind(this);
|
38116
38136
|
this.off.bind(this);
|
38117
|
-
/* @conditional-compile-remove(attachment-
|
38137
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38118
38138
|
this.registerActiveUploads = this.registerActiveUploads.bind(this);
|
38119
|
-
/* @conditional-compile-remove(attachment-
|
38139
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38120
38140
|
this.registerCompletedUploads = this.registerCompletedUploads.bind(this);
|
38121
|
-
/* @conditional-compile-remove(attachment-
|
38141
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38122
38142
|
this.clearUploads = this.clearUploads.bind(this);
|
38123
|
-
/* @conditional-compile-remove(attachment-
|
38143
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38124
38144
|
this.cancelUpload = this.cancelUpload.bind(this);
|
38125
|
-
/* @conditional-compile-remove(attachment-
|
38145
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38126
38146
|
this.updateUploadProgress = this.updateUploadProgress.bind(this);
|
38127
|
-
/* @conditional-compile-remove(attachment-
|
38147
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38128
38148
|
this.updateUploadStatusMessage = this.updateUploadStatusMessage.bind(this);
|
38129
|
-
/* @conditional-compile-remove(attachment-
|
38149
|
+
/* @conditional-compile-remove(attachment-upload) */
|
38130
38150
|
this.updateUploadMetadata = this.updateUploadMetadata.bind(this);
|
38131
38151
|
this.downloadResourceToCache = this.downloadResourceToCache.bind(this);
|
38132
38152
|
this.removeResourceFromCache = this.removeResourceFromCache.bind(this);
|
@@ -38386,7 +38406,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
38386
38406
|
return __awaiter$2(this, void 0, void 0, function* () {
|
38387
38407
|
return this.chatAdapterPromise.then((adapter) => {
|
38388
38408
|
return adapter.updateMessage(messageId, content, metadata,
|
38389
|
-
/* @conditional-compile-remove(attachment-
|
38409
|
+
/* @conditional-compile-remove(attachment-upload) */ options);
|
38390
38410
|
});
|
38391
38411
|
});
|
38392
38412
|
}
|
@@ -39420,7 +39440,9 @@ exports.FluentThemeProvider = FluentThemeProvider;
|
|
39420
39440
|
exports.GridLayout = GridLayout;
|
39421
39441
|
exports.HoldButton = HoldButton;
|
39422
39442
|
exports.ImageOverlay = ImageOverlay;
|
39443
|
+
exports.InputBoxButton = InputBoxButton;
|
39423
39444
|
exports.LocalizationProvider = LocalizationProvider$1;
|
39445
|
+
exports.MAXIMUM_LENGTH_OF_MESSAGE = MAXIMUM_LENGTH_OF_MESSAGE;
|
39424
39446
|
exports.MessageStatusIndicator = MessageStatusIndicator;
|
39425
39447
|
exports.MessageThread = MessageThread;
|
39426
39448
|
exports.MicrophoneButton = MicrophoneButton;
|
@@ -39429,9 +39451,11 @@ exports.ParticipantItem = ParticipantItem;
|
|
39429
39451
|
exports.ParticipantList = ParticipantList$k;
|
39430
39452
|
exports.ParticipantsButton = ParticipantsButton;
|
39431
39453
|
exports.RaiseHandButton = RaiseHandButton;
|
39454
|
+
exports.RichTextInputBoxComponent = RichTextInputBoxComponent;
|
39432
39455
|
exports.RichTextSendBox = RichTextSendBox;
|
39456
|
+
exports.RichTextSendBoxErrors = RichTextSendBoxErrors;
|
39433
39457
|
exports.ScreenShareButton = ScreenShareButton;
|
39434
|
-
exports.SendBox = SendBox
|
39458
|
+
exports.SendBox = SendBox;
|
39435
39459
|
exports.StreamMedia = StreamMedia;
|
39436
39460
|
exports.TypingIndicator = TypingIndicator;
|
39437
39461
|
exports.UnsupportedBrowser = UnsupportedBrowser$k;
|
@@ -39440,6 +39464,7 @@ exports.UnsupportedOperatingSystem = UnsupportedOperatingSystem$k;
|
|
39440
39464
|
exports.VideoGallery = VideoGallery;
|
39441
39465
|
exports.VideoTile = VideoTile;
|
39442
39466
|
exports._IdentifierProvider = _IdentifierProvider;
|
39467
|
+
exports._formatString = _formatString;
|
39443
39468
|
exports.createAzureCommunicationCallAdapter = createAzureCommunicationCallAdapter;
|
39444
39469
|
exports.createAzureCommunicationCallAdapterFromClient = createAzureCommunicationCallAdapterFromClient;
|
39445
39470
|
exports.createAzureCommunicationCallWithChatAdapter = createAzureCommunicationCallWithChatAdapter;
|
@@ -39455,13 +39480,21 @@ exports.createTeamsCallAdapter = createTeamsCallAdapter;
|
|
39455
39480
|
exports.createTeamsCallAdapterFromClient = createTeamsCallAdapterFromClient;
|
39456
39481
|
exports.darkTheme = darkTheme;
|
39457
39482
|
exports.defaultAttachmentMenuAction = defaultAttachmentMenuAction;
|
39483
|
+
exports.editBoxRichTextEditorStyle = editBoxRichTextEditorStyle;
|
39484
|
+
exports.editBoxWidthStyles = editBoxWidthStyles;
|
39458
39485
|
exports.fromFlatCommunicationIdentifier = fromFlatCommunicationIdentifier;
|
39486
|
+
exports.getMessageState = getMessageState;
|
39487
|
+
exports.getMessageWithAttachmentMetadata = getMessageWithAttachmentMetadata;
|
39459
39488
|
exports.getSelector = getSelector$1;
|
39460
39489
|
exports.getSelector$1 = getSelector;
|
39461
39490
|
exports.imageOverlayTheme = imageOverlayTheme;
|
39462
39491
|
exports.lightTheme = lightTheme;
|
39492
|
+
exports.onRenderCancelIcon = onRenderCancelIcon;
|
39493
|
+
exports.onRenderSubmitIcon = onRenderSubmitIcon;
|
39463
39494
|
exports.onResolveVideoEffectDependency = onResolveVideoEffectDependency;
|
39464
39495
|
exports.onResolveVideoEffectDependencyLazy = onResolveVideoEffectDependencyLazy;
|
39496
|
+
exports.richTextActionButtonsStyle = richTextActionButtonsStyle;
|
39497
|
+
exports.richTextEditBoxActionButtonIcon = richTextEditBoxActionButtonIcon;
|
39465
39498
|
exports.toFlatCommunicationIdentifier = toFlatCommunicationIdentifier;
|
39466
39499
|
exports.useAzureCommunicationCallAdapter = useAzureCommunicationCallAdapter;
|
39467
39500
|
exports.useAzureCommunicationCallWithChatAdapter = useAzureCommunicationCallWithChatAdapter;
|
@@ -39470,13 +39503,15 @@ exports.useCall = useCall;
|
|
39470
39503
|
exports.useCallAgent = useCallAgent;
|
39471
39504
|
exports.useCallClient = useCallClient;
|
39472
39505
|
exports.useChatClient = useChatClient;
|
39506
|
+
exports.useChatMessageRichTextEditContainerStyles = useChatMessageRichTextEditContainerStyles;
|
39507
|
+
exports.useChatMyMessageStyles = useChatMyMessageStyles;
|
39473
39508
|
exports.useChatThreadClient = useChatThreadClient;
|
39474
39509
|
exports.useDeviceManager = useDeviceManager;
|
39475
|
-
exports.
|
39476
|
-
exports.usePropsFor
|
39510
|
+
exports.useLocale = useLocale$1;
|
39511
|
+
exports.usePropsFor = usePropsFor;
|
39477
39512
|
exports.useSelector = useSelector;
|
39478
39513
|
exports.useTeamsCall = useTeamsCall;
|
39479
39514
|
exports.useTeamsCallAdapter = useTeamsCallAdapter;
|
39480
39515
|
exports.useTeamsCallAgent = useTeamsCallAgent;
|
39481
39516
|
exports.useTheme = useTheme;
|
39482
|
-
//# sourceMappingURL=index-
|
39517
|
+
//# sourceMappingURL=index-C4BFVPuO.js.map
|