@azure/communication-react 1.5.1-alpha-202303290014 → 1.5.1-alpha-202303300013
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 +40 -4
- package/dist/dist-cjs/communication-react/index.js +248 -108
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +29 -2
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.d.ts +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +32 -26
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +6 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +11 -13
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +34 -20
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +11 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +47 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +10 -3
- package/dist/dist-esm/react-components/src/components/MessageThread.js +57 -36
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +28 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +6 -4
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +3 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +8 -0
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +20 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +8 -0
- package/package.json +8 -8
@@ -162,7 +162,7 @@ const _toCommunicationIdentifier = (id) => {
|
|
162
162
|
// Copyright (c) Microsoft Corporation.
|
163
163
|
// Licensed under the MIT license.
|
164
164
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
165
|
-
var telemetryVersion = '1.5.1-alpha-
|
165
|
+
var telemetryVersion = '1.5.1-alpha-202303300013';
|
166
166
|
|
167
167
|
// Copyright (c) Microsoft Corporation.
|
168
168
|
/**
|
@@ -4166,7 +4166,7 @@ const typingIndicatorStringStyle = react.mergeStyles({
|
|
4166
4166
|
wordBreak: 'break-word'
|
4167
4167
|
});
|
4168
4168
|
|
4169
|
-
var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed participant",participantStateRinging:"Calling...",participantStateHold:"On hold"};var typingIndicator$d={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$d={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait.",removeFile:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed"};var messageStatusIndicator$d={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$d={label:"Leave",tooltipContent:"Leave call"};var cameraButton$d={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off",onSplitButtonPrimaryActionCamera:"Turn off camera",offSplitButtonPrimaryActionCamera:"Turn on camera",cameraPrimaryActionSplitButtonTitle:"Use camera"};var microphoneButton$d={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off",offSplitButtonMicrophonePrimaryAction:"Unmute microphone",onSplitButtonMicrophonePrimaryAction:"Mute microphone",micPrimaryActionSplitButtonTitle:"Use microphone"};var devicesButton$d={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose audio device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker"};var participantsButton$d={label:"People",tooltipContent:"Show participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied"};var screenShareButton$d={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$d={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{author} said {message}",messageContentMineAriaText:"You said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadFile:"Download file"};var errorBar$d={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneAccessDeniedSafari:"Unable to access microphone. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAccessDeniedSafari:"Unable to access camera. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link.",startScreenSharingGeneric:"There was an issue starting screen share.",cameraFrozenForRemoteParticipants:"Users in the call are having issues seeing your video. Please check your devices and network."};var videoGallery$d={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed participant",fitRemoteParticipantToFrame:"Fit to frame",fillRemoteParticipantFrame:"Fill frame",pinParticipantForMe:"Pin for me",pinParticipantForMeLimitReached:"Pin (limit reached)",unpinParticipantForMe:"Unpin",pinParticipantMenuItemAriaLabel:"Pin {participantName}",unpinParticipantMenuItemAriaLabel:"Unpin {participantName}",pinnedParticipantAnnouncementAriaLabel:"Pinned {participantName}",unpinnedParticipantAnnouncementAriaLabel:"Unpinned {participantName}"};var dialpad$d={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton$d={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile$d={participantStateRinging:"Calling...",participantStateHold:"On hold"};var CameraAndMicrophoneSitePermissionsRequest={primaryText:"Allow {appName} to use your camera and microphone",secondaryText:"This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Allow camera and microphone access"};var CameraSitePermissionsRequest={primaryText:"Allow {appName} to use your camera",secondaryText:"This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Allow camera access"};var MicrophoneSitePermissionsRequest={primaryText:"Allow {appName} to use your microphone",secondaryText:"This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Allow microphone access"};var CameraAndMicrophoneSitePermissionsCheck={primaryText:"Checking for camera and microphone access",secondaryText:"Allow access if prompted. This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Checking for camera and microphone access. Allow access if prompted."};var CameraSitePermissionsCheck={primaryText:"Checking for camera access",secondaryText:"Allow access if prompted. This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Checking for camera access. Allow access if prompted."};var MicrophoneSitePermissionsCheck={primaryText:"Checking for microphone access",secondaryText:"Allow access if prompted. This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Checking for microphone access. Allow access if prompted."};var CameraAndMicrophoneSitePermissionsDenied={primaryText:"Unable to access camera and microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraAndMicrophoneSitePermissionsDeniedSafari={primaryText:"Unable to access camera and microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDenied={primaryText:"Unable to access camera",secondaryText:"Click the lock icon in the address bar to grant camera permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDenied={primaryText:"Unable to access microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDeniedSafari={primaryText:"Unable to access camera",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDeniedSafari={primaryText:"Unable to access microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var UnsupportedBrowser$e={primaryText:"Browser not supported",secondaryText:"Please join this call using a compatible browser.",moreHelpLinkText:"See compatibility requirements"};var UnsupportedBrowserVersion$1={primaryText:"Browser update needed",secondaryText:"To ensure the best call possible, please update your browser and then try joining the call again.",moreHelpLinkText:"See compatibility requirements",continueAnywayButtonText:"Start call without updating"};var UnsupportedOperatingSystem$1={primaryText:"Operating system not supported",secondaryText:"Please join this call using a device with a compatible operating system.",moreHelpLinkText:"See compatibility requirements"};var BrowserPermissionDenied$d={primaryText:"Can't use your camera or microphone",secondaryText:"Your browser might not have access to your camera or microphone. To fix this, open System Preferences.",primaryButtonText:"Try again",linkText:"Need help? Get troubleshooting help"};var BrowserPermissionDeniedIOS$d={primaryText:"Allow microphone access to continue",secondaryText:"So other participants can hear you.",primaryButtonText:"Try again",imageAltText:"Microphone and camera device permission location for iOS",linkText:"Need help? Get troubleshooting help",step1Text:"Go to the Settings app",step2Text:"Scroll down to settings for this browser",step3Text:"Turn on Microphone (Camera optional)",step4Text:"Try joining the call again",step1DigitText:"1",step2DigitText:"2",step3DigitText:"3",step4DigitText:"4"};var VerticalGallery$1={leftNavButtonAriaLabel:"previous page",rightNavButtonAriaLabel:"next page"};var en_US$1 = {participantItem:participantItem$d,typingIndicator:typingIndicator$d,sendBox:sendBox$d,messageStatusIndicator:messageStatusIndicator$d,endCallButton:endCallButton$d,cameraButton:cameraButton$d,microphoneButton:microphoneButton$d,devicesButton:devicesButton$d,participantsButton:participantsButton$d,screenShareButton:screenShareButton$d,messageThread:messageThread$d,errorBar:errorBar$d,videoGallery:videoGallery$d,dialpad:dialpad$d,holdButton:holdButton$d,videoTile:videoTile$d,CameraAndMicrophoneSitePermissionsRequest:CameraAndMicrophoneSitePermissionsRequest,CameraSitePermissionsRequest:CameraSitePermissionsRequest,MicrophoneSitePermissionsRequest:MicrophoneSitePermissionsRequest,CameraAndMicrophoneSitePermissionsCheck:CameraAndMicrophoneSitePermissionsCheck,CameraSitePermissionsCheck:CameraSitePermissionsCheck,MicrophoneSitePermissionsCheck:MicrophoneSitePermissionsCheck,CameraAndMicrophoneSitePermissionsDenied:CameraAndMicrophoneSitePermissionsDenied,CameraAndMicrophoneSitePermissionsDeniedSafari:CameraAndMicrophoneSitePermissionsDeniedSafari,CameraSitePermissionsDenied:CameraSitePermissionsDenied,MicrophoneSitePermissionsDenied:MicrophoneSitePermissionsDenied,CameraSitePermissionsDeniedSafari:CameraSitePermissionsDeniedSafari,MicrophoneSitePermissionsDeniedSafari:MicrophoneSitePermissionsDeniedSafari,UnsupportedBrowser:UnsupportedBrowser$e,UnsupportedBrowserVersion:UnsupportedBrowserVersion$1,UnsupportedOperatingSystem:UnsupportedOperatingSystem$1,BrowserPermissionDenied:BrowserPermissionDenied$d,BrowserPermissionDeniedIOS:BrowserPermissionDeniedIOS$d,VerticalGallery:VerticalGallery$1};
|
4169
|
+
var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed participant",participantStateRinging:"Calling...",participantStateHold:"On hold"};var typingIndicator$d={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$d={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait.",removeFile:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed"};var messageStatusIndicator$d={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$d={label:"Leave",tooltipContent:"Leave call"};var cameraButton$d={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off",onSplitButtonPrimaryActionCamera:"Turn off camera",offSplitButtonPrimaryActionCamera:"Turn on camera",cameraPrimaryActionSplitButtonTitle:"Use camera"};var microphoneButton$d={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off",offSplitButtonMicrophonePrimaryAction:"Unmute microphone",onSplitButtonMicrophonePrimaryAction:"Mute microphone",micPrimaryActionSplitButtonTitle:"Use microphone"};var devicesButton$d={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose audio device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker"};var participantsButton$d={label:"People",tooltipContent:"Show participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link",copyInviteLinkActionedAriaLabel:"Invite link copied"};var screenShareButton$d={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$d={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{author} said {message}",messageContentMineAriaText:"You said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadFile:"Download file",blockedWarningText:"This message was deleted due to organizational policy.",blockedWarningLinkText:"Details"};var errorBar$d={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneAccessDeniedSafari:"Unable to access microphone. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAccessDeniedSafari:"Unable to access camera. Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link.",startScreenSharingGeneric:"There was an issue starting screen share.",cameraFrozenForRemoteParticipants:"Users in the call are having issues seeing your video. Please check your devices and network."};var videoGallery$d={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed participant",fitRemoteParticipantToFrame:"Fit to frame",fillRemoteParticipantFrame:"Fill frame",pinParticipantForMe:"Pin for me",pinParticipantForMeLimitReached:"Pin (limit reached)",unpinParticipantForMe:"Unpin",pinParticipantMenuItemAriaLabel:"Pin {participantName}",unpinParticipantMenuItemAriaLabel:"Unpin {participantName}",pinnedParticipantAnnouncementAriaLabel:"Pinned {participantName}",unpinnedParticipantAnnouncementAriaLabel:"Unpinned {participantName}"};var dialpad$d={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton$d={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile$d={participantStateRinging:"Calling...",participantStateHold:"On hold"};var CameraAndMicrophoneSitePermissionsRequest={primaryText:"Allow {appName} to use your camera and microphone",secondaryText:"This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Allow camera and microphone access"};var CameraSitePermissionsRequest={primaryText:"Allow {appName} to use your camera",secondaryText:"This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Allow camera access"};var MicrophoneSitePermissionsRequest={primaryText:"Allow {appName} to use your microphone",secondaryText:"This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Allow microphone access"};var CameraAndMicrophoneSitePermissionsCheck={primaryText:"Checking for camera and microphone access",secondaryText:"Allow access if prompted. This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera and microphone",ariaLabel:"Checking for camera and microphone access. Allow access if prompted."};var CameraSitePermissionsCheck={primaryText:"Checking for camera access",secondaryText:"Allow access if prompted. This is so participants can see you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without camera",ariaLabel:"Checking for camera access. Allow access if prompted."};var MicrophoneSitePermissionsCheck={primaryText:"Checking for microphone access",secondaryText:"Allow access if prompted. This is so participants can hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Continue without microphone",ariaLabel:"Checking for microphone access. Allow access if prompted."};var CameraAndMicrophoneSitePermissionsDenied={primaryText:"Unable to access camera and microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraAndMicrophoneSitePermissionsDeniedSafari={primaryText:"Unable to access camera and microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera and microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDenied={primaryText:"Unable to access camera",secondaryText:"Click the lock icon in the address bar to grant camera permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDenied={primaryText:"Unable to access microphone",secondaryText:"Click the lock icon in the address bar to grant microphone permissions to this webpage. A page refresh may be required.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var CameraSitePermissionsDeniedSafari={primaryText:"Unable to access camera",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without camera",linkText:"Need help? Get troubleshooting help"};var MicrophoneSitePermissionsDeniedSafari={primaryText:"Unable to access microphone",secondaryText:"Refresh the page to allow permissions, or check this browser’s settings and verify permissions are enabled for this website.",primaryButtonText:"Continue without microphone",linkText:"Need help? Get troubleshooting help"};var UnsupportedBrowser$e={primaryText:"Browser not supported",secondaryText:"Please join this call using a compatible browser.",moreHelpLinkText:"See compatibility requirements"};var UnsupportedBrowserVersion$1={primaryText:"Browser update needed",secondaryText:"To ensure the best call possible, please update your browser and then try joining the call again.",moreHelpLinkText:"See compatibility requirements",continueAnywayButtonText:"Start call without updating"};var UnsupportedOperatingSystem$1={primaryText:"Operating system not supported",secondaryText:"Please join this call using a device with a compatible operating system.",moreHelpLinkText:"See compatibility requirements"};var BrowserPermissionDenied$d={primaryText:"Can't use your camera or microphone",secondaryText:"Your browser might not have access to your camera or microphone. To fix this, open System Preferences.",primaryButtonText:"Try again",linkText:"Need help? Get troubleshooting help"};var BrowserPermissionDeniedIOS$d={primaryText:"Allow microphone access to continue",secondaryText:"So other participants can hear you.",primaryButtonText:"Try again",imageAltText:"Microphone and camera device permission location for iOS",linkText:"Need help? Get troubleshooting help",step1Text:"Go to the Settings app",step2Text:"Scroll down to settings for this browser",step3Text:"Turn on Microphone (Camera optional)",step4Text:"Try joining the call again",step1DigitText:"1",step2DigitText:"2",step3DigitText:"3",step4DigitText:"4"};var VerticalGallery$1={leftNavButtonAriaLabel:"previous page",rightNavButtonAriaLabel:"next page"};var en_US$1 = {participantItem:participantItem$d,typingIndicator:typingIndicator$d,sendBox:sendBox$d,messageStatusIndicator:messageStatusIndicator$d,endCallButton:endCallButton$d,cameraButton:cameraButton$d,microphoneButton:microphoneButton$d,devicesButton:devicesButton$d,participantsButton:participantsButton$d,screenShareButton:screenShareButton$d,messageThread:messageThread$d,errorBar:errorBar$d,videoGallery:videoGallery$d,dialpad:dialpad$d,holdButton:holdButton$d,videoTile:videoTile$d,CameraAndMicrophoneSitePermissionsRequest:CameraAndMicrophoneSitePermissionsRequest,CameraSitePermissionsRequest:CameraSitePermissionsRequest,MicrophoneSitePermissionsRequest:MicrophoneSitePermissionsRequest,CameraAndMicrophoneSitePermissionsCheck:CameraAndMicrophoneSitePermissionsCheck,CameraSitePermissionsCheck:CameraSitePermissionsCheck,MicrophoneSitePermissionsCheck:MicrophoneSitePermissionsCheck,CameraAndMicrophoneSitePermissionsDenied:CameraAndMicrophoneSitePermissionsDenied,CameraAndMicrophoneSitePermissionsDeniedSafari:CameraAndMicrophoneSitePermissionsDeniedSafari,CameraSitePermissionsDenied:CameraSitePermissionsDenied,MicrophoneSitePermissionsDenied:MicrophoneSitePermissionsDenied,CameraSitePermissionsDeniedSafari:CameraSitePermissionsDeniedSafari,MicrophoneSitePermissionsDeniedSafari:MicrophoneSitePermissionsDeniedSafari,UnsupportedBrowser:UnsupportedBrowser$e,UnsupportedBrowserVersion:UnsupportedBrowserVersion$1,UnsupportedOperatingSystem:UnsupportedOperatingSystem$1,BrowserPermissionDenied:BrowserPermissionDenied$d,BrowserPermissionDeniedIOS:BrowserPermissionDeniedIOS$d,VerticalGallery:VerticalGallery$1};
|
4170
4170
|
|
4171
4171
|
var participantItem$c={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed participant",participantStateConnecting:"Calling...",participantStateRinging:"Calling...",participantStateHold:"On hold"};var typingIndicator$c={singleUser:"{user} is typing ...",multipleUsers:"{users} are typing ...",multipleUsersAbbreviateOne:"{users} and 1 other are typing ...",multipleUsersAbbreviateMany:"{users} and {numOthers} others are typing ...",delimiter:", "};var sendBox$c={placeholderText:"Enter a message",textTooLong:"Your message length is over the maximum limit.",sendButtonAriaLabel:"Send message",fileUploadsPendingError:"Uploading... Please wait.",removeFile:"Remove file",uploading:"Uploading",uploadCompleted:"Upload completed"};var messageStatusIndicator$c={deliveredAriaLabel:"Message sent",deliveredTooltipText:"Sent",seenAriaLabel:"Message seen by others",seenTooltipText:"Seen",readByTooltipText:"Read by {messageThreadReadCount} of {remoteParticipantsCount}",sendingAriaLabel:"Message sending",sendingTooltipText:"Sending",failedToSendAriaLabel:"Message failed to send",failedToSendTooltipText:"Failed to send"};var endCallButton$c={label:"Leave",tooltipContent:"Leave call"};var cameraButton$c={onLabel:"Turn off",offLabel:"Turn on",tooltipDisabledContent:"Camera is disabled",tooltipOnContent:"Turn off camera",tooltipOffContent:"Turn on camera",tooltipVideoLoadingContent:"Video is loading",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",cameraButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Turn off camera and camera options",offSplitButtonAriaLabel:"Turn on camera and camera options",cameraActionTurnedOnAnnouncement:"Your camera has been turned on",cameraActionTurnedOffAnnouncement:"Your camera has been turned off"};var microphoneButton$c={onLabel:"Mute",offLabel:"Unmute",tooltipDisabledContent:"Microphone is disabled",tooltipOnContent:"Mute microphone",tooltipOffContent:"Unmute microphone",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker",microphoneButtonSplitRoleDescription:"Split button",onSplitButtonAriaLabel:"Mute microphone and audio options",offSplitButtonAriaLabel:"Unmute microphone and audio options",microphoneActionTurnedOnAnnouncement:"Your microphone has been turned on",microphoneActionTurnedOffAnnouncement:"Your microphone has been turned off"};var devicesButton$c={label:"Devices",tooltipContent:"Manage devices",cameraMenuTitle:"Camera",cameraMenuTooltip:"Choose camera",audioDeviceMenuTitle:"Audio Device",audioDeviceMenuTooltip:"Choose audio device",microphoneMenuTitle:"Microphone",microphoneMenuTooltip:"Choose microphone",speakerMenuTitle:"Speaker",speakerMenuTooltip:"Choose speaker"};var participantsButton$c={label:"People",tooltipContent:"Show participants",menuHeader:"In this call",participantsListButtonLabel:"{numParticipants} people",muteAllButtonLabel:"Mute all",copyInviteLinkButtonLabel:"Copy invite link"};var screenShareButton$c={onLabel:"Stop presenting",offLabel:"Present",tooltipDisabledContent:"Presenting is disabled",tooltipOnContent:"Presenting your screen",tooltipOffContent:"Present your screen"};var messageThread$c={yesterday:"Yesterday",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",participantJoined:"joined the chat.",participantLeft:"left the chat.",editMessage:"Edit",removeMessage:"Delete",resendMessage:"Try sending again",failToSendTag:"Failed to send",editedTag:"Edited",liveAuthorIntro:"{author} says",messageContentAriaText:"{author} said {message}",messageContentMineAriaText:"You said {message}",editBoxTextLimit:"Your message is over the limit of {limitNumber} characters",editBoxPlaceholderText:"Edit your message",newMessagesIndicator:"New messages",noDisplayNameSub:"No name",editBoxCancelButton:"Cancel",editBoxSubmitButton:"Submit",messageReadCount:"Read by {messageReadByCount} of {remoteParticipantsCount}",actionMenuMoreOptions:"More Options",downloadFile:"Download file"};var errorBar$c={unableToReachChatService:"You are offline",accessDenied:"Unable to access chat services - please check the user credentials provided",userNotInChatThread:"You are no longer in this chat thread",sendMessageNotInChatThread:"Failed to send message because you are no longer in this chat thread",sendMessageGeneric:"Failed to send message",callingNetworkFailure:"Troubling connecting call - you seem to be offline",startVideoGeneric:"Failed to start video",stopVideoGeneric:"Failed to stop video",muteGeneric:"Failed to mute microphone",unmuteGeneric:"Failed to unmute microphone",speakingWhileMuted:"Your microphone is muted",startScreenShareGeneric:"Failed to start screen sharing",stopScreenShareGeneric:"Failed to stop screen sharing",callNetworkQualityLow:"Network quality is low.",callNoSpeakerFound:"No speakers or headphones found. Connect an audio device to hear the call.",callNoMicrophoneFound:"No microphones found. Connect an audio input device.",callMicrophoneAccessDenied:"Unable to access microphone. Click the lock in the address bar to grant permission to this webpage.",callMicrophoneMutedBySystem:"You are muted by your system.",callMicrophoneUnmutedBySystem:"Your microphone recovered and you were unmuted by your system.",callMacOsMicrophoneAccessDenied:"Unable to access microphone. Grant microphone permission in your macOS privacy settings.",callLocalVideoFreeze:"Network bandwidth is poor. Your video may appear paused for others on the call.",callCameraAccessDenied:"Unable to access camera. Click the lock in the address bar to grant permission to this webpage.",callCameraAlreadyInUse:"Unable to access camera. It may already be in use by another application.",callVideoStoppedBySystem:"Your video has been stopped by your system.",callVideoRecoveredBySystem:"Your video has resumed.",callMacOsCameraAccessDenied:"MacOS is blocking access to your camera. Update your privacy settings to allow this browser to access your camera.",callMacOsScreenShareAccessDenied:"MacOS is blocking screen sharing. Update your privacy settings to allow this browser to record your screen.",dismissButtonAriaLabel:"Close",failedToJoinCallGeneric:"Failed to join call.",failedToJoinCallInvalidMeetingLink:"Unable to join Meeting. Invalid Link."};var videoGallery$c={screenIsBeingSharedMessage:"You are sharing your screen",screenShareLoadingMessage:"Loading {participant}'s screen",localVideoLabel:"You",localVideoCameraSwitcherLabel:"Switch camera",localVideoMovementLabel:"Movable Local Video Tile",localVideoSelectedDescription:"{cameraName} selected",displayNamePlaceholder:"Unnamed participant"};var dialpad$c={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton$c={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile$c={participantStateConnecting:"Calling...",participantStateRinging:"Calling...",participantStateHold:"On hold"};var SitePermissions$c={primaryText:"Allow {appName} to use your camera and microphone",secondaryText:"This is so participants can see and hear you.",linkText:"Need help? Get troubleshooting help",primaryButtonText:"Allow Access"};var UnsupportedBrowser$d={primaryText:"Browser not supported",secondaryText:"Please join this call using a compatible browser.",moreHelpLink:"More help"};var BrowserPermissionDenied$c={primaryText:"Can't use your camera or microphone",secondaryText:"Your browser might not have access to your camera or microphone. To fix this, open System Preferences.",primaryButtonText:"Try again",linkText:"Need help? Get troubleshooting help"};var BrowserPermissionDeniedIOS$c={primaryText:"Allow microphone access to continue",secondaryText:"So other participants can hear you.",primaryButtonText:"Try again",imageAltText:"Microphone and camera device permission location for iOS",linkText:"Need help? Get troubleshooting help",step1Text:"Go to the Settings app",step2Text:"Scroll down to settings for this browser",step3Text:"Turn on Microphone (Camera optional)",step4Text:"Try joining the call again",step1DigitText:"1",step2DigitText:"2",step3DigitText:"3",step4DigitText:"4"};var en_GB$1 = {participantItem:participantItem$c,typingIndicator:typingIndicator$c,sendBox:sendBox$c,messageStatusIndicator:messageStatusIndicator$c,endCallButton:endCallButton$c,cameraButton:cameraButton$c,microphoneButton:microphoneButton$c,devicesButton:devicesButton$c,participantsButton:participantsButton$c,screenShareButton:screenShareButton$c,messageThread:messageThread$c,errorBar:errorBar$c,videoGallery:videoGallery$c,dialpad:dialpad$c,holdButton:holdButton$c,videoTile:videoTile$c,SitePermissions:SitePermissions$c,UnsupportedBrowser:UnsupportedBrowser$d,BrowserPermissionDenied:BrowserPermissionDenied$c,BrowserPermissionDeniedIOS:BrowserPermissionDeniedIOS$c};
|
4172
4172
|
|
@@ -5233,6 +5233,10 @@ const BrowserPermissionDenied20Filled = () => {
|
|
5233
5233
|
React__default['default'].createElement("div", { className: react.mergeStyles(scaledIconStyles(theme)) },
|
5234
5234
|
React__default['default'].createElement(reactIcons.Important20Filled, null))));
|
5235
5235
|
};
|
5236
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
5237
|
+
const DataLossPreventionProhibited16Regular = () => {
|
5238
|
+
return React__default['default'].createElement(reactIcons.Prohibited16Regular, null);
|
5239
|
+
};
|
5236
5240
|
/**
|
5237
5241
|
* The default set of icons that are available to use in the UI components.
|
5238
5242
|
*
|
@@ -5257,6 +5261,8 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
5257
5261
|
CancelFileUpload: React__default['default'].createElement(reactIcons.Dismiss16Regular, null),
|
5258
5262
|
/* @conditional-compile-remove(file-sharing) */
|
5259
5263
|
DownloadFile: React__default['default'].createElement(reactIcons.ArrowDownload16Regular, null),
|
5264
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
5265
|
+
DataLossPreventionProhibited: React__default['default'].createElement(DataLossPreventionProhibited16Regular, null),
|
5260
5266
|
EditBoxCancel: React__default['default'].createElement(reactIcons.Dismiss20Regular, null),
|
5261
5267
|
EditBoxSubmit: React__default['default'].createElement(reactIcons.Checkmark20Regular, null),
|
5262
5268
|
ErrorBarCallCameraAccessDenied: React__default['default'].createElement(reactIcons.VideoProhibited16Filled, null),
|
@@ -6172,6 +6178,34 @@ const defaultChatMessageContainer = (theme) => ({
|
|
6172
6178
|
// This makes message bubble show border in high contrast mode making each message distinguishable
|
6173
6179
|
border: '1px solid transparent'
|
6174
6180
|
});
|
6181
|
+
/**
|
6182
|
+
* @private
|
6183
|
+
* @conditional-compile-remove(data-loss-prevention)
|
6184
|
+
*/
|
6185
|
+
const defaultBlockedMessageStyleContainer = (theme) => ({
|
6186
|
+
maxWidth: '100%',
|
6187
|
+
minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,
|
6188
|
+
marginRight: '0rem',
|
6189
|
+
color: theme.palette.neutralSecondary,
|
6190
|
+
'& i': {
|
6191
|
+
paddingTop: '0.25rem'
|
6192
|
+
},
|
6193
|
+
'& p': {
|
6194
|
+
// Deal with awkward padding seen in messages from Teams.
|
6195
|
+
// For more info see https://github.com/Azure/communication-ui-library/pull/1507
|
6196
|
+
marginBlock: '0.125rem',
|
6197
|
+
paddingRight: '0.75rem',
|
6198
|
+
fontStyle: 'italic'
|
6199
|
+
},
|
6200
|
+
'& a': {
|
6201
|
+
marginBlock: '0.125rem',
|
6202
|
+
fontStyle: 'normal',
|
6203
|
+
color: theme.palette.themePrimary,
|
6204
|
+
textDecoration: 'none'
|
6205
|
+
},
|
6206
|
+
// This makes message bubble show border in high contrast mode making each message distinguishable
|
6207
|
+
border: '1px solid transparent'
|
6208
|
+
});
|
6175
6209
|
/**
|
6176
6210
|
* @private
|
6177
6211
|
*/
|
@@ -6744,20 +6778,44 @@ const ChatMessageContent = (props) => {
|
|
6744
6778
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
6745
6779
|
}
|
6746
6780
|
};
|
6781
|
+
const MessageContentWithLiveAria = (props) => {
|
6782
|
+
return (React__default['default'].createElement("div", { "data-ui-status": props.message.status, role: "text", "aria-label": props.ariaLabel },
|
6783
|
+
React__default['default'].createElement(reactAriaLive.LiveMessage, { message: props.liveMessage, "aria-live": "polite" }),
|
6784
|
+
props.content));
|
6785
|
+
};
|
6747
6786
|
const MessageContentAsRichTextHTML = (props) => {
|
6748
6787
|
const htmlToReactParser = new htmlToReact.Parser();
|
6749
|
-
const liveAuthor = _formatString(props.liveAuthorIntro, { author: `${props.message.senderDisplayName}` });
|
6750
|
-
return (React__default['default'].createElement(
|
6751
|
-
React__default['default'].createElement(reactAriaLive.LiveMessage, { message: `${props.message.mine ? '' : liveAuthor} ${extractContent(props.message.content || '')}`, "aria-live": "polite" }),
|
6752
|
-
htmlToReactParser.parse(props.message.content)));
|
6788
|
+
const liveAuthor = _formatString(props.strings.liveAuthorIntro, { author: `${props.message.senderDisplayName}` });
|
6789
|
+
return (React__default['default'].createElement(MessageContentWithLiveAria, { message: props.message, liveMessage: `${props.message.mine ? '' : liveAuthor} ${extractContent(props.message.content || '')}`, ariaLabel: messageContentAriaText(props), content: htmlToReactParser.parse(props.message.content) }));
|
6753
6790
|
};
|
6754
6791
|
const MessageContentAsText = (props) => {
|
6755
|
-
const liveAuthor = _formatString(props.liveAuthorIntro, { author: `${props.message.senderDisplayName}` });
|
6756
|
-
return (React__default['default'].createElement(
|
6757
|
-
React__default['default'].createElement(reactAriaLive.LiveMessage, { message: `${props.message.mine ? '' : liveAuthor} ${props.message.content}`, "aria-live": "polite" }),
|
6758
|
-
React__default['default'].createElement(Linkify__default['default'], { componentDecorator: (decoratedHref, decoratedText, key) => {
|
6792
|
+
const liveAuthor = _formatString(props.strings.liveAuthorIntro, { author: `${props.message.senderDisplayName}` });
|
6793
|
+
return (React__default['default'].createElement(MessageContentWithLiveAria, { message: props.message, liveMessage: `${props.message.mine ? '' : liveAuthor} ${extractContent(props.message.content || '')}`, ariaLabel: messageContentAriaText(props), content: React__default['default'].createElement(Linkify__default['default'], { componentDecorator: (decoratedHref, decoratedText, key) => {
|
6759
6794
|
return (React__default['default'].createElement(react.Link, { target: "_blank", href: decoratedHref, key: key }, decoratedText));
|
6760
|
-
} }, props.message.content)));
|
6795
|
+
} }, props.message.content) }));
|
6796
|
+
};
|
6797
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
6798
|
+
/**
|
6799
|
+
* @private
|
6800
|
+
*/
|
6801
|
+
const BlockedMessageContent = (props) => {
|
6802
|
+
var _a;
|
6803
|
+
const Icon = React__default['default'].createElement(react.FontIcon, { iconName: 'DataLossPreventionProhibited' });
|
6804
|
+
const blockedMessage = props.message.warningText === false
|
6805
|
+
? ''
|
6806
|
+
: props.message.warningText === '' || props.message.warningText === undefined
|
6807
|
+
? props.strings.blockedWarningText
|
6808
|
+
: props.message.warningText;
|
6809
|
+
const blockedMessageLink = props.message.link;
|
6810
|
+
const blockedMessageLinkText = blockedMessageLink
|
6811
|
+
? (_a = props.message.linkText) !== null && _a !== void 0 ? _a : props.strings.blockedWarningLinkText
|
6812
|
+
: '';
|
6813
|
+
const liveAuthor = props.message.mine || props.message.senderDisplayName === undefined ? '' : props.message.senderDisplayName;
|
6814
|
+
const liveBlockedWarningText = `${liveAuthor} ${blockedMessage} ${blockedMessageLinkText}`;
|
6815
|
+
return (React__default['default'].createElement(MessageContentWithLiveAria, { message: props.message, liveMessage: liveBlockedWarningText, ariaLabel: liveBlockedWarningText, content: React__default['default'].createElement(react.Stack, { horizontal: true, wrap: true },
|
6816
|
+
Icon,
|
6817
|
+
blockedMessage && React__default['default'].createElement("p", null, blockedMessage),
|
6818
|
+
blockedMessageLink && (React__default['default'].createElement(react.Link, { target: '_blank', href: blockedMessageLink }, blockedMessageLinkText))) }));
|
6761
6819
|
};
|
6762
6820
|
// https://stackoverflow.com/questions/28899298/extract-the-text-out-of-html-string-using-javascript
|
6763
6821
|
const extractContent = (s) => {
|
@@ -6765,6 +6823,18 @@ const extractContent = (s) => {
|
|
6765
6823
|
span.innerHTML = s;
|
6766
6824
|
return span.textContent || span.innerText;
|
6767
6825
|
};
|
6826
|
+
const messageContentAriaText = (props) => {
|
6827
|
+
return props.message.content
|
6828
|
+
? props.message.mine
|
6829
|
+
? _formatString(props.strings.messageContentMineAriaText, {
|
6830
|
+
message: props.message.content
|
6831
|
+
})
|
6832
|
+
: _formatString(props.strings.messageContentAriaText, {
|
6833
|
+
author: `${props.message.senderDisplayName}`,
|
6834
|
+
message: props.message.content
|
6835
|
+
})
|
6836
|
+
: undefined;
|
6837
|
+
};
|
6768
6838
|
|
6769
6839
|
// Copyright (c) Microsoft Corporation.
|
6770
6840
|
/**
|
@@ -6900,7 +6970,10 @@ const MessageBubble = (props) => {
|
|
6900
6970
|
const messageRef = React.useRef(null);
|
6901
6971
|
const messageActionButtonRef = React.useRef(null);
|
6902
6972
|
const [chatMessageActionFlyoutTarget, setChatMessageActionFlyoutTarget] = React.useState(undefined);
|
6903
|
-
const chatActionsEnabled = !disableEditing &&
|
6973
|
+
const chatActionsEnabled = !disableEditing &&
|
6974
|
+
message.status !== 'sending' &&
|
6975
|
+
!!message.mine &&
|
6976
|
+
/* @conditional-compile-remove(data-loss-prevention) */ message.messageType !== 'blocked';
|
6904
6977
|
const [messageReadBy, setMessageReadBy] = React.useState([]);
|
6905
6978
|
const actionMenuProps = wasInteractionByTouch
|
6906
6979
|
? undefined
|
@@ -6911,8 +6984,10 @@ const MessageBubble = (props) => {
|
|
6911
6984
|
// Force show the action button while the flyout is open (otherwise this will dismiss when the pointer is hovered over the flyout)
|
6912
6985
|
forceShow: chatMessageActionFlyoutTarget === messageActionButtonRef,
|
6913
6986
|
onActionButtonClick: () => {
|
6914
|
-
|
6915
|
-
|
6987
|
+
if (message.messageType === 'chat') {
|
6988
|
+
props.onActionButtonClick(message, setMessageReadBy);
|
6989
|
+
setChatMessageActionFlyoutTarget(messageActionButtonRef);
|
6990
|
+
}
|
6916
6991
|
},
|
6917
6992
|
theme
|
6918
6993
|
});
|
@@ -6935,23 +7010,29 @@ const MessageBubble = (props) => {
|
|
6935
7010
|
locale,
|
6936
7011
|
fileDownloadHandler
|
6937
7012
|
]);
|
6938
|
-
const
|
6939
|
-
|
6940
|
-
|
6941
|
-
|
6942
|
-
|
6943
|
-
|
6944
|
-
|
6945
|
-
|
6946
|
-
|
6947
|
-
|
7013
|
+
const editedOn = 'editedOn' in message ? message.editedOn : undefined;
|
7014
|
+
const getMessageDetails = React.useCallback(() => {
|
7015
|
+
if (messageStatus === 'failed') {
|
7016
|
+
return React__default['default'].createElement("div", { className: chatMessageFailedTagStyle(theme) }, strings.failToSendTag);
|
7017
|
+
}
|
7018
|
+
else if (message.messageType === 'chat' && editedOn) {
|
7019
|
+
return React__default['default'].createElement("div", { className: chatMessageEditedTagStyle(theme) }, strings.editedTag);
|
7020
|
+
}
|
7021
|
+
return undefined;
|
7022
|
+
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
7023
|
+
const getContent = React.useCallback(() => {
|
7024
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
7025
|
+
if (message.messageType === 'blocked') {
|
7026
|
+
return (React__default['default'].createElement("div", { tabIndex: 0 },
|
7027
|
+
React__default['default'].createElement(BlockedMessageContent, { message: message, strings: strings })));
|
7028
|
+
}
|
7029
|
+
return (React__default['default'].createElement("div", { tabIndex: 0 },
|
7030
|
+
React__default['default'].createElement(ChatMessageContent, { message: message, strings: strings }),
|
7031
|
+
props.onRenderFileDownloads ? props.onRenderFileDownloads(userId, message) : defaultOnRenderFileDownloads()));
|
7032
|
+
}, [defaultOnRenderFileDownloads, message, props, strings, userId]);
|
6948
7033
|
const chatMessage = (React__default['default'].createElement(React__default['default'].Fragment, null,
|
6949
7034
|
React__default['default'].createElement("div", { ref: messageRef },
|
6950
|
-
React__default['default'].createElement(reactNorthstar.Chat.Message, { "data-ui-id": "chat-composite-message", className: react.mergeStyles(messageContainerStyle), styles: messageContainerStyle, content: React__default['default'].createElement(
|
6951
|
-
React__default['default'].createElement(ChatMessageContent, { message: message, liveAuthorIntro: strings.liveAuthorIntro, messageContentAriaText: messageContentAriaText }),
|
6952
|
-
props.onRenderFileDownloads
|
6953
|
-
? props.onRenderFileDownloads(userId, message)
|
6954
|
-
: defaultOnRenderFileDownloads()), author: React__default['default'].createElement(reactNorthstar.Text, { className: chatMessageDateStyle }, message.senderDisplayName), mine: message.mine, timestamp: React__default['default'].createElement(reactNorthstar.Text, { "data-ui-id": ids.messageTimestamp }, formattedTimestamp), details: messageStatus === 'failed' ? (React__default['default'].createElement("div", { className: chatMessageFailedTagStyle(theme) }, strings.failToSendTag)) : message.editedOn ? (React__default['default'].createElement("div", { className: chatMessageEditedTagStyle(theme) }, strings.editedTag)) : undefined, positionActionMenu: false, actionMenu: actionMenuProps, onTouchStart: () => setWasInteractionByTouch(true), onPointerDown: () => setWasInteractionByTouch(false), onKeyDown: () => setWasInteractionByTouch(false), onBlur: () => setWasInteractionByTouch(false), onClick: () => {
|
7035
|
+
React__default['default'].createElement(reactNorthstar.Chat.Message, { "data-ui-id": "chat-composite-message", className: react.mergeStyles(messageContainerStyle), styles: messageContainerStyle, content: getContent(), author: React__default['default'].createElement(reactNorthstar.Text, { className: chatMessageDateStyle }, message.senderDisplayName), mine: message.mine, timestamp: React__default['default'].createElement(reactNorthstar.Text, { "data-ui-id": ids.messageTimestamp }, formattedTimestamp), details: getMessageDetails(), positionActionMenu: false, actionMenu: actionMenuProps, onTouchStart: () => setWasInteractionByTouch(true), onPointerDown: () => setWasInteractionByTouch(false), onKeyDown: () => setWasInteractionByTouch(false), onBlur: () => setWasInteractionByTouch(false), onClick: () => {
|
6955
7036
|
if (!wasInteractionByTouch) {
|
6956
7037
|
return;
|
6957
7038
|
}
|
@@ -6961,7 +7042,9 @@ const MessageBubble = (props) => {
|
|
6961
7042
|
// In doing so here we set the target of the flyout to be the message and
|
6962
7043
|
// not the 3-dot menu button to position the flyout correctly.
|
6963
7044
|
setChatMessageActionFlyoutTarget(messageRef);
|
6964
|
-
|
7045
|
+
if (message.messageType === 'chat') {
|
7046
|
+
props.onActionButtonClick(message, setMessageReadBy);
|
7047
|
+
}
|
6965
7048
|
} })),
|
6966
7049
|
chatActionsEnabled && (React__default['default'].createElement(ChatMessageActionFlyout, { hidden: !chatMessageActionFlyoutTarget, target: chatMessageActionFlyoutTarget, increaseFlyoutItemSize: wasInteractionByTouch, onDismiss: onActionFlyoutDismiss, onEditClick: onEditClick, onRemoveClick: onRemoveClick, onResendClick: onResendClick, strings: strings, messageReadBy: messageReadBy, messageStatus: messageStatus !== null && messageStatus !== void 0 ? messageStatus : 'failed', remoteParticipantsCount: remoteParticipantsCount, onRenderAvatar: onRenderAvatar, showMessageStatus: showMessageStatus }))));
|
6967
7050
|
return chatMessage;
|
@@ -6987,28 +7070,26 @@ const ChatMessageComponent = (props) => {
|
|
6987
7070
|
const [isEditing, setIsEditing] = React.useState(false);
|
6988
7071
|
const onEditClick = React.useCallback(() => setIsEditing(true), [setIsEditing]);
|
6989
7072
|
const { onDeleteMessage, onSendMessage, message } = props;
|
7073
|
+
const clientMessageId = 'clientMessageId' in message ? message.clientMessageId : undefined;
|
7074
|
+
const content = 'content' in message ? message.content : undefined;
|
6990
7075
|
const onRemoveClick = React.useCallback(() => {
|
6991
7076
|
if (onDeleteMessage && message.messageId) {
|
6992
7077
|
onDeleteMessage(message.messageId);
|
6993
7078
|
}
|
6994
7079
|
// when fail to send, message does not have message id, delete message using clientmessageid
|
6995
|
-
else if (onDeleteMessage && message.clientMessageId) {
|
6996
|
-
onDeleteMessage(
|
7080
|
+
else if (onDeleteMessage && message.messageType === 'chat' && clientMessageId) {
|
7081
|
+
onDeleteMessage(clientMessageId);
|
6997
7082
|
}
|
6998
|
-
}, [message.messageId, message.
|
7083
|
+
}, [onDeleteMessage, message.messageId, message.messageType, clientMessageId]);
|
6999
7084
|
const onResendClick = React.useCallback(() => {
|
7000
|
-
|
7001
|
-
|
7002
|
-
|
7003
|
-
|
7004
|
-
if (props.message.messageType !== 'chat') {
|
7005
|
-
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
7006
|
-
}
|
7007
|
-
else if (isEditing) {
|
7085
|
+
onDeleteMessage && clientMessageId && onDeleteMessage(clientMessageId);
|
7086
|
+
onSendMessage && onSendMessage(content !== undefined ? content : '');
|
7087
|
+
}, [clientMessageId, content, onSendMessage, onDeleteMessage]);
|
7088
|
+
if (isEditing && message.messageType === 'chat') {
|
7008
7089
|
return (React__default['default'].createElement(ChatMessageComponentAsEditBox, { message: message, inlineEditButtons: props.inlineAcceptRejectEditButtons, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter$r(void 0, void 0, void 0, function* () {
|
7009
7090
|
props.onUpdateMessage &&
|
7010
|
-
|
7011
|
-
(yield props.onUpdateMessage(
|
7091
|
+
message.messageId &&
|
7092
|
+
(yield props.onUpdateMessage(message.messageId, text, metadata, options));
|
7012
7093
|
setIsEditing(false);
|
7013
7094
|
}), onCancel: () => {
|
7014
7095
|
setIsEditing(false);
|
@@ -7097,7 +7178,7 @@ const isShortHeight = (containerHeightRem) => containerHeightRem <= _convertRemT
|
|
7097
7178
|
*
|
7098
7179
|
* if MessageId of B is larger than message Id of A, then B is created after A
|
7099
7180
|
* if the last read message is created after the message A is sent, then user should have read message A as well */
|
7100
|
-
|
7181
|
+
var getParticipantsWhoHaveReadMessage = (message, readReceiptsBySenderId) => {
|
7101
7182
|
return (Object.entries(readReceiptsBySenderId)
|
7102
7183
|
// Filter to only read receipts that match the message OR the participant has read a different message after this message has been created
|
7103
7184
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
@@ -7207,7 +7288,7 @@ const DefaultSystemMessage = (props) => {
|
|
7207
7288
|
return React__default['default'].createElement(React__default['default'].Fragment, null);
|
7208
7289
|
};
|
7209
7290
|
const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate, showMessageStatus, onRenderAvatar, shouldOverlapAvatarAndMessage, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings, theme, _attached, statusToRender, participantCount, readCount, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, disableEditing) => {
|
7210
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
7291
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
7211
7292
|
const messageProps = {
|
7212
7293
|
message,
|
7213
7294
|
strings,
|
@@ -7217,40 +7298,54 @@ const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate,
|
|
7217
7298
|
onSendMessage,
|
7218
7299
|
disableEditing
|
7219
7300
|
};
|
7301
|
+
const chatMessageItemProps = (message, messageProps) => {
|
7302
|
+
var _a, _b, _c;
|
7303
|
+
const chatMessageComponent = onRenderMessage === undefined
|
7304
|
+
? defaultChatMessageRenderer(messageProps)
|
7305
|
+
: onRenderMessage(messageProps, defaultChatMessageRenderer);
|
7306
|
+
const personaOptions = {
|
7307
|
+
hidePersonaDetails: true,
|
7308
|
+
size: react.PersonaSize.size32,
|
7309
|
+
text: message.senderDisplayName,
|
7310
|
+
showOverflowTooltip: false
|
7311
|
+
};
|
7312
|
+
const chatItemMessageStyle = (message.mine ? styles === null || styles === void 0 ? void 0 : styles.myChatItemMessageContainer : styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) ||
|
7313
|
+
defaultChatItemMessageContainer(shouldOverlapAvatarAndMessage);
|
7314
|
+
const chatGutterStyles = message.attached === 'top' || message.attached === false ? gutterWithAvatar : gutterWithHiddenAvatar;
|
7315
|
+
return {
|
7316
|
+
gutter: {
|
7317
|
+
styles: chatGutterStyles,
|
7318
|
+
content: message.mine ? ('') : onRenderAvatar ? (onRenderAvatar((_a = message.senderId) !== null && _a !== void 0 ? _a : '', personaOptions)) : (React__default['default'].createElement(react.Persona, Object.assign({}, personaOptions)))
|
7319
|
+
},
|
7320
|
+
contentPosition: message.mine ? 'end' : 'start',
|
7321
|
+
message: {
|
7322
|
+
styles: chatItemMessageStyle,
|
7323
|
+
content: (React__default['default'].createElement(reactNorthstar.Flex, { hAlign: message.mine ? 'end' : undefined, vAlign: "end" },
|
7324
|
+
chatMessageComponent,
|
7325
|
+
React__default['default'].createElement("div", { className: react.mergeStyles(messageStatusContainerStyle((_b = message.mine) !== null && _b !== void 0 ? _b : false), (styles === null || styles === void 0 ? void 0 : styles.messageStatusContainer) ? styles.messageStatusContainer((_c = message.mine) !== null && _c !== void 0 ? _c : false) : '') }, showMessageStatus && statusToRender ? (onRenderMessageStatus ? (onRenderMessageStatus({ status: statusToRender })) : (defaultStatusRenderer(message, statusToRender, participantCount !== null && participantCount !== void 0 ? participantCount : 0, readCount !== null && readCount !== void 0 ? readCount : 0))) : (React__default['default'].createElement("div", { className: react.mergeStyles(noMessageStatusStyle) })))))
|
7326
|
+
},
|
7327
|
+
attached: message.attached,
|
7328
|
+
key: _messageKey
|
7329
|
+
};
|
7330
|
+
};
|
7331
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
7332
|
+
// Similar logic as switch statement case 'chat', if statement for conditional compile (merge logic to switch case when stablize)
|
7333
|
+
if (message.messageType === 'blocked') {
|
7334
|
+
const myChatMessageStyle = message.status === 'failed'
|
7335
|
+
? (_b = (_a = styles === null || styles === void 0 ? void 0 : styles.failedMyChatMessageContainer) !== null && _a !== void 0 ? _a : styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _b !== void 0 ? _b : FailedMyChatMessageContainer
|
7336
|
+
: (_c = styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _c !== void 0 ? _c : defaultBlockedMessageStyleContainer(theme);
|
7337
|
+
const blockedMessageStyle = (_d = styles === null || styles === void 0 ? void 0 : styles.blockedMessageContainer) !== null && _d !== void 0 ? _d : defaultBlockedMessageStyleContainer(theme);
|
7338
|
+
messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : blockedMessageStyle;
|
7339
|
+
return chatMessageItemProps(message, messageProps);
|
7340
|
+
}
|
7220
7341
|
switch (message.messageType) {
|
7221
7342
|
case 'chat': {
|
7222
7343
|
const myChatMessageStyle = message.status === 'failed'
|
7223
|
-
? (
|
7224
|
-
: (
|
7225
|
-
const chatMessageStyle = (
|
7344
|
+
? (_f = (_e = styles === null || styles === void 0 ? void 0 : styles.failedMyChatMessageContainer) !== null && _e !== void 0 ? _e : styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _f !== void 0 ? _f : FailedMyChatMessageContainer
|
7345
|
+
: (_g = styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _g !== void 0 ? _g : defaultMyChatMessageContainer;
|
7346
|
+
const chatMessageStyle = (_h = styles === null || styles === void 0 ? void 0 : styles.chatMessageContainer) !== null && _h !== void 0 ? _h : defaultChatMessageContainer(theme);
|
7226
7347
|
messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : chatMessageStyle;
|
7227
|
-
|
7228
|
-
? defaultChatMessageRenderer(messageProps)
|
7229
|
-
: onRenderMessage(messageProps, defaultChatMessageRenderer);
|
7230
|
-
const personaOptions = {
|
7231
|
-
hidePersonaDetails: true,
|
7232
|
-
size: react.PersonaSize.size32,
|
7233
|
-
text: message.senderDisplayName,
|
7234
|
-
showOverflowTooltip: false
|
7235
|
-
};
|
7236
|
-
const chatItemMessageStyle = (message.mine ? styles === null || styles === void 0 ? void 0 : styles.myChatItemMessageContainer : styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) ||
|
7237
|
-
defaultChatItemMessageContainer(shouldOverlapAvatarAndMessage);
|
7238
|
-
const chatGutterStyles = message.attached === 'top' || message.attached === false ? gutterWithAvatar : gutterWithHiddenAvatar;
|
7239
|
-
return {
|
7240
|
-
gutter: {
|
7241
|
-
styles: chatGutterStyles,
|
7242
|
-
content: message.mine ? ('') : onRenderAvatar ? (onRenderAvatar((_e = message.senderId) !== null && _e !== void 0 ? _e : '', personaOptions)) : (React__default['default'].createElement(react.Persona, Object.assign({}, personaOptions)))
|
7243
|
-
},
|
7244
|
-
contentPosition: message.mine ? 'end' : 'start',
|
7245
|
-
message: {
|
7246
|
-
styles: chatItemMessageStyle,
|
7247
|
-
content: (React__default['default'].createElement(reactNorthstar.Flex, { hAlign: message.mine ? 'end' : undefined, vAlign: "end" },
|
7248
|
-
chatMessageComponent,
|
7249
|
-
React__default['default'].createElement("div", { className: react.mergeStyles(messageStatusContainerStyle((_f = message.mine) !== null && _f !== void 0 ? _f : false), (styles === null || styles === void 0 ? void 0 : styles.messageStatusContainer) ? styles.messageStatusContainer((_g = message.mine) !== null && _g !== void 0 ? _g : false) : '') }, showMessageStatus && statusToRender ? (onRenderMessageStatus ? (onRenderMessageStatus({ status: statusToRender })) : (defaultStatusRenderer(message, statusToRender, participantCount !== null && participantCount !== void 0 ? participantCount : 0, readCount !== null && readCount !== void 0 ? readCount : 0))) : (React__default['default'].createElement("div", { className: react.mergeStyles(noMessageStatusStyle) })))))
|
7250
|
-
},
|
7251
|
-
attached: message.attached,
|
7252
|
-
key: _messageKey
|
7253
|
-
};
|
7348
|
+
return chatMessageItemProps(message, messageProps);
|
7254
7349
|
}
|
7255
7350
|
case 'system': {
|
7256
7351
|
messageProps.messageContainerStyle = styles === null || styles === void 0 ? void 0 : styles.systemMessageContainer;
|
@@ -7515,7 +7610,8 @@ const MessageThread = (props) => {
|
|
7515
7610
|
const strings = React.useMemo(() => (Object.assign(Object.assign({}, localeStrings), props.strings)), [localeStrings, props.strings]);
|
7516
7611
|
// To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp need to be regenerated)
|
7517
7612
|
const defaultChatMessageRenderer = React.useCallback((messageProps) => {
|
7518
|
-
if (messageProps.message.messageType === 'chat'
|
7613
|
+
if (messageProps.message.messageType === 'chat' ||
|
7614
|
+
/* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked') {
|
7519
7615
|
return (React__default['default'].createElement(ChatMessageComponent, Object.assign({}, messageProps, { onRenderFileDownloads: onRenderFileDownloads,
|
7520
7616
|
/* @conditional-compile-remove(file-sharing) */
|
7521
7617
|
strings: strings, message: messageProps.message, userId: props.userId, remoteParticipantsCount: participantCount ? participantCount - 1 : 0, inlineAcceptRejectEditButtons: !isNarrow, onRenderAvatar: onRenderAvatar, showMessageStatus: showMessageStatus, messageStatus: messageProps.message.status, onActionButtonClick: onActionButtonClickMemo,
|
@@ -7554,8 +7650,9 @@ const MessageThread = (props) => {
|
|
7554
7650
|
return messages.map((message, index) => {
|
7555
7651
|
let key = message.messageId;
|
7556
7652
|
let statusToRender = undefined;
|
7557
|
-
if (message.messageType === 'chat'
|
7558
|
-
|
7653
|
+
if (message.messageType === 'chat' ||
|
7654
|
+
/* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked') {
|
7655
|
+
if ((!message.messageId || message.messageId === '') && 'clientMessageId' in message) {
|
7559
7656
|
key = message.clientMessageId;
|
7560
7657
|
}
|
7561
7658
|
if (showMessageStatus && message.mine) {
|
@@ -7581,7 +7678,10 @@ const MessageThread = (props) => {
|
|
7581
7678
|
return memoizedMessageFn(key !== null && key !== void 0 ? key : 'id_' + index, message, showMessageDate, showMessageStatus, onRenderAvatar, isNarrow, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings, theme,
|
7582
7679
|
// Temporary solution to make sure we re-render if attach attribute is changed.
|
7583
7680
|
// The proper fix should be in selector.
|
7584
|
-
message.messageType === 'chat'
|
7681
|
+
message.messageType === 'chat' ||
|
7682
|
+
/* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked'
|
7683
|
+
? message.attached
|
7684
|
+
: undefined, statusToRender, participantCount, readCountForHoveredIndicator, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, props.disableEditing);
|
7585
7685
|
});
|
7586
7686
|
}), [
|
7587
7687
|
messages,
|
@@ -14153,6 +14253,10 @@ const PARTICIPANTS_THRESHOLD = 20;
|
|
14153
14253
|
* @private
|
14154
14254
|
*/
|
14155
14255
|
const MINUTE_IN_MS = 1000 * 60;
|
14256
|
+
/**
|
14257
|
+
* @private
|
14258
|
+
*/
|
14259
|
+
const DEFAULT_DATA_LOSS_PREVENTION_POLICY_URL = 'https://go.microsoft.com/fwlink/?LinkId=2132837';
|
14156
14260
|
/**
|
14157
14261
|
* @private
|
14158
14262
|
*
|
@@ -14197,39 +14301,49 @@ const updateMessagesWithAttached = (chatMessagesWithStatus) => {
|
|
14197
14301
|
chatMessagesWithStatus.sort(compareMessages);
|
14198
14302
|
chatMessagesWithStatus.forEach((message, index, messages) => {
|
14199
14303
|
var _a, _b;
|
14200
|
-
if (message.messageType
|
14201
|
-
|
14202
|
-
|
14203
|
-
|
14204
|
-
|
14205
|
-
|
14206
|
-
|
14207
|
-
|
14208
|
-
|
14209
|
-
|
14210
|
-
|
14211
|
-
|
14212
|
-
|
14213
|
-
|
14214
|
-
|
14215
|
-
|
14216
|
-
|
14217
|
-
|
14218
|
-
|
14219
|
-
|
14220
|
-
|
14221
|
-
|
14222
|
-
|
14223
|
-
|
14224
|
-
|
14304
|
+
if (message.messageType === 'chat' ||
|
14305
|
+
/* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked') {
|
14306
|
+
/**
|
14307
|
+
* Attached === true means it is within a group of messages in the current order
|
14308
|
+
* Attached === top/bottom means it is on the top/bottom boundary
|
14309
|
+
* Attached === false means it is just a single message
|
14310
|
+
* A group of messages: continuous messages that belong to the same sender and not intercepted by other senders.
|
14311
|
+
*/
|
14312
|
+
let attached = false;
|
14313
|
+
const previousMessage = index > 0 ? messages[index - 1] : undefined;
|
14314
|
+
const nextMessage = index === messages.length - 1 ? undefined : messages[index + 1];
|
14315
|
+
const previousSenderId = (previousMessage === null || previousMessage === void 0 ? void 0 : previousMessage.messageType) === 'chat' ||
|
14316
|
+
/* @conditional-compile-remove(data-loss-prevention) */ (previousMessage === null || previousMessage === void 0 ? void 0 : previousMessage.messageType) === 'blocked'
|
14317
|
+
? previousMessage.senderId
|
14318
|
+
: undefined;
|
14319
|
+
const nextSenderId = (nextMessage === null || nextMessage === void 0 ? void 0 : nextMessage.messageType) === 'chat' ||
|
14320
|
+
/* @conditional-compile-remove(data-loss-prevention) */ (nextMessage === null || nextMessage === void 0 ? void 0 : nextMessage.messageType) === 'blocked'
|
14321
|
+
? nextMessage.senderId
|
14322
|
+
: undefined;
|
14323
|
+
const timediff = new Date((_a = message === null || message === void 0 ? void 0 : message.createdOn) !== null && _a !== void 0 ? _a : '').getTime() - new Date((_b = previousMessage === null || previousMessage === void 0 ? void 0 : previousMessage.createdOn) !== null && _b !== void 0 ? _b : '').getTime();
|
14324
|
+
const diffMins = Math.round(timediff / MINUTE_IN_MS); // minutes
|
14325
|
+
if (previousSenderId !== message.senderId) {
|
14326
|
+
attached = message.senderId === nextSenderId ? 'top' : false;
|
14327
|
+
}
|
14328
|
+
else if (diffMins && diffMins >= 5) {
|
14329
|
+
// if there are more than or equal to 5 mins time gap between messages do not attach and show time stamp
|
14330
|
+
attached = false;
|
14331
|
+
}
|
14332
|
+
else {
|
14333
|
+
attached = message.senderId === nextSenderId ? true : 'bottom';
|
14334
|
+
}
|
14335
|
+
message.attached = attached;
|
14225
14336
|
}
|
14226
|
-
message.attached = attached;
|
14227
14337
|
});
|
14228
14338
|
};
|
14229
14339
|
|
14230
14340
|
// Copyright (c) Microsoft Corporation.
|
14231
14341
|
const memoizedAllConvertChatMessage = memoizeFnAll((_key, chatMessage, userId, isSeen, isLargeGroup) => {
|
14232
14342
|
const messageType = chatMessage.type.toLowerCase();
|
14343
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
14344
|
+
if (chatMessage.policyViolation) {
|
14345
|
+
return convertToUiBlockedMessage(chatMessage, userId, isSeen, isLargeGroup);
|
14346
|
+
}
|
14233
14347
|
if (messageType === ACSKnownMessageType.text ||
|
14234
14348
|
messageType === ACSKnownMessageType.richtextHtml ||
|
14235
14349
|
messageType === ACSKnownMessageType.html) {
|
@@ -14253,6 +14367,23 @@ const extractAttachedFilesMetadata = (metadata) => {
|
|
14253
14367
|
return [];
|
14254
14368
|
}
|
14255
14369
|
};
|
14370
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
14371
|
+
const convertToUiBlockedMessage = (message, userId, isSeen, isLargeGroup) => {
|
14372
|
+
var _a;
|
14373
|
+
const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;
|
14374
|
+
return {
|
14375
|
+
messageType: 'blocked',
|
14376
|
+
createdOn: message.createdOn,
|
14377
|
+
warningText: (_a = message.content) === null || _a === void 0 ? void 0 : _a.message,
|
14378
|
+
status: !isLargeGroup && message.status === 'delivered' && isSeen ? 'seen' : message.status,
|
14379
|
+
senderDisplayName: message.senderDisplayName,
|
14380
|
+
senderId: messageSenderId,
|
14381
|
+
messageId: message.id,
|
14382
|
+
deletedOn: message.deletedOn,
|
14383
|
+
mine: messageSenderId === userId,
|
14384
|
+
link: DEFAULT_DATA_LOSS_PREVENTION_POLICY_URL
|
14385
|
+
};
|
14386
|
+
};
|
14256
14387
|
const convertToUiChatMessage = (message, userId, isSeen, isLargeGroup) => {
|
14257
14388
|
var _a;
|
14258
14389
|
const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;
|
@@ -14341,7 +14472,7 @@ const messageThreadSelector = reselect.createSelector([getUserId, getChatMessage
|
|
14341
14472
|
// TODO: Add support for topicUpdated system messages in MessageThread component.
|
14342
14473
|
// message.type === ACSKnownMessageType.topicUpdated ||
|
14343
14474
|
message.clientMessageId !== undefined)
|
14344
|
-
.filter(
|
14475
|
+
.filter(isMessageValidToRender)
|
14345
14476
|
.map((message) => {
|
14346
14477
|
var _a;
|
14347
14478
|
return memoizedFn((_a = message.id) !== null && _a !== void 0 ? _a : message.clientMessageId, message, userId, message.createdOn <= latestReadTime, isLargeGroup);
|
@@ -14361,7 +14492,7 @@ const sanitizedMessageContentType = (type) => {
|
|
14361
14492
|
? lowerCaseType
|
14362
14493
|
: 'unknown';
|
14363
14494
|
};
|
14364
|
-
const
|
14495
|
+
const isMessageValidToRender = (message) => {
|
14365
14496
|
var _a, _b;
|
14366
14497
|
if (message.deletedOn) {
|
14367
14498
|
return false;
|
@@ -14369,6 +14500,10 @@ const messagesWithContentOrFileSharingMetadata = (message) => {
|
|
14369
14500
|
if ((_a = message.metadata) === null || _a === void 0 ? void 0 : _a['fileSharingMetadata']) {
|
14370
14501
|
return true;
|
14371
14502
|
}
|
14503
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
14504
|
+
if (message.policyViolation) {
|
14505
|
+
return true;
|
14506
|
+
}
|
14372
14507
|
return !!(message.content && ((_b = message.content) === null || _b === void 0 ? void 0 : _b.message) !== '');
|
14373
14508
|
};
|
14374
14509
|
|
@@ -15017,7 +15152,12 @@ const toChatError = (target, error) => {
|
|
15017
15152
|
* @private
|
15018
15153
|
*/
|
15019
15154
|
const convertChatMessage = (message, status = 'delivered', clientMessageId) => {
|
15020
|
-
|
15155
|
+
var _a, _b;
|
15156
|
+
return Object.assign(Object.assign({}, message), { clientMessageId: clientMessageId, status,
|
15157
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
15158
|
+
policyViolation: !!(((_a = message.sender) === null || _a === void 0 ? void 0 : _a.kind) === 'microsoftTeamsUser' &&
|
15159
|
+
!!message.editedOn &&
|
15160
|
+
((_b = message.content) === null || _b === void 0 ? void 0 : _b.message) === '') });
|
15021
15161
|
};
|
15022
15162
|
|
15023
15163
|
// Copyright (c) Microsoft Corporation.
|