@azure/communication-react 1.3.3-alpha-202208120013.0 → 1.3.3-alpha-202208180014.0

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.
Files changed (117) hide show
  1. package/dist/communication-react.d.ts +49 -2
  2. package/dist/dist-cjs/communication-react/index.js +764 -479
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +1 -1
  7. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts.map +1 -1
  9. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +2 -4
  10. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +1 -1
  12. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/ParticipantList.js +8 -1
  14. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +1 -5
  17. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +47 -6
  20. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +2 -1
  22. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/VideoTile.js +34 -40
  24. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +3 -3
  26. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +19 -9
  28. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/utils/common.d.ts +5 -0
  30. package/dist/dist-esm/react-components/src/components/utils/common.d.ts.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/utils/common.js +6 -0
  32. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +3 -0
  34. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts.map +1 -1
  35. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  36. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +3 -3
  37. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +1 -1
  38. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts.map +1 -1
  39. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +3 -3
  40. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/theming/icons.js +3 -3
  42. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts.map +1 -1
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +13 -0
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +24 -0
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts.map +1 -1
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts.map +1 -1
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts.map +1 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +4 -3
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts.map +1 -1
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +64 -2
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  56. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +12 -0
  57. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts.map +1 -0
  58. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +72 -0
  59. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -0
  60. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts.map +1 -1
  61. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +2 -23
  62. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  63. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts.map +1 -1
  64. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +1 -1
  65. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts.map +1 -1
  66. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -1
  67. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  68. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +15 -0
  69. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts.map +1 -0
  70. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +27 -0
  71. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -0
  72. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +32 -0
  73. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts.map +1 -0
  74. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +73 -0
  75. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -0
  76. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +5 -0
  77. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts.map +1 -1
  79. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +5 -0
  80. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +8 -0
  82. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +38 -3
  84. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +1 -0
  86. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +11 -23
  88. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.d.ts +1 -0
  90. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.d.ts.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +1 -1
  92. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +8 -0
  93. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts.map +1 -1
  94. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +12 -0
  95. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts.map +1 -0
  96. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +63 -0
  97. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -0
  98. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.d.ts +1 -0
  99. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.d.ts.map +1 -1
  100. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +32 -0
  101. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
  102. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/MoreButton.d.ts +0 -0
  103. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.d.ts.map +1 -0
  104. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/MoreButton.js +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -0
  106. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +1 -0
  107. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +2 -5
  109. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
  110. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +10 -2
  111. package/package.json +8 -8
  112. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/MediaGallery.styles.d.ts +0 -40
  113. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/MediaGallery.styles.d.ts.map +0 -1
  114. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/MediaGallery.styles.js +0 -64
  115. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/MediaGallery.styles.js.map +0 -1
  116. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/MoreButton.d.ts.map +0 -1
  117. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/MoreButton.js.map +0 -1
@@ -192,7 +192,7 @@ const fromFlatCommunicationIdentifier = (id) => {
192
192
  // Copyright (c) Microsoft Corporation.
193
193
  // Licensed under the MIT license.
194
194
  // GENERATED FILE. DO NOT EDIT MANUALLY.
195
- var telemetryVersion = '1.3.3-alpha-202208120013.0';
195
+ var telemetryVersion = '1.3.3-alpha-202208180014.0';
196
196
 
197
197
  // Copyright (c) Microsoft Corporation.
198
198
  /**
@@ -405,7 +405,7 @@ var __awaiter$u = (window && window.__awaiter) || function (thisArg, _arguments,
405
405
  *
406
406
  * @internal
407
407
  */
408
- const _isInCall = (callStatus) => !!callStatus && !['None', 'Disconnected', 'Connecting'].includes(callStatus);
408
+ const _isInCall = (callStatus) => !!callStatus && !['None', 'Disconnected', 'Connecting', 'LocalHold', 'Ringing', 'EarlyMedia'].includes(callStatus);
409
409
  /**
410
410
  * Check if the call state represents being in the lobby or waiting to be admitted.
411
411
  *
@@ -957,7 +957,7 @@ const typingIndicatorStringStyle = react.mergeStyles({
957
957
  wordBreak: 'break-word'
958
958
  });
959
959
 
960
- var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant",participantStateConnecting:"Calling...",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"};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"};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"};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.",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$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"};var dialpad$d={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var HoldButton$e={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};var videoTile={participantStateConnecting:"Calling...",participantStateRinging:"Calling...",participantStateHold:"On Hold"};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$e,videoTile:videoTile};
960
+ var participantItem$d={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant",participantStateConnecting:"Calling...",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"};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"};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"};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.",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$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"};var dialpad$d={placeholderText:"Enter phone number",deleteButtonAriaLabel:"Delete"};var holdButton={onLabel:"Resume",offLabel:"Hold",tooltipOnContent:"Resume call",tooltipOffContent:"Hold call"};var videoTile={participantStateConnecting:"Calling...",participantStateRinging:"Calling...",participantStateHold:"On Hold"};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,videoTile:videoTile};
961
961
 
962
962
  var participantItem$c={isMeText:"(you)",menuTitle:"More Options",removeButtonLabel:"Remove",sharingIconLabel:"Sharing",mutedIconLabel:"Muted",displayNamePlaceholder:"Unnamed Participant"};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."};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",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"};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.",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.",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 a number"};var HoldButton$d={onLabel:"Resume",offLabel:"Hold",toolTipOnContent:"Resume call",toolTipOffContent:"Hold call"};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$d};
963
963
 
@@ -1938,9 +1938,9 @@ const DEFAULT_COMPONENT_ICONS = {
1938
1938
  ParticipantItemOptionsHovered: React__default['default'].createElement(reactIcons.MoreHorizontal20Filled, null),
1939
1939
  ParticipantItemScreenShareStart: React__default['default'].createElement(reactIcons.ShareScreenStart20Filled, null),
1940
1940
  /* @conditional-compile-remove(PSTN-calls) */
1941
- HoldCall: React__default['default'].createElement(reactIcons.Pause20Filled, null),
1941
+ HoldCall: React__default['default'].createElement(reactIcons.Pause20Regular, null),
1942
1942
  /* @conditional-compile-remove(PSTN-calls) */
1943
- ResumeCall: React__default['default'].createElement(reactIcons.Play20Filled, null),
1943
+ ResumeCall: React__default['default'].createElement(reactIcons.Play20Regular, null),
1944
1944
  SendBoxSend: React__default['default'].createElement(reactIcons.Send20Regular, null),
1945
1945
  SendBoxSendHovered: React__default['default'].createElement(reactIcons.Send20Filled, null),
1946
1946
  VideoTileMicOff: React__default['default'].createElement(reactIcons.MicOff16Filled, null),
@@ -2271,6 +2271,12 @@ const useLocaleFileCardStringsTrampoline = () => {
2271
2271
  /* @conditional-compile-remove(file-sharing) */
2272
2272
  return useLocale$1().strings.sendBox;
2273
2273
  };
2274
+ /**
2275
+ * Identify if a participant state if part of the Calling states or Hold states.
2276
+ */
2277
+ const _isParticipantStateCallingOrHold = (participantState) => {
2278
+ return !!participantState && ['Idle', 'Connecting', 'EarlyMedia', 'Ringing', 'Hold'].includes(participantState);
2279
+ };
2274
2280
 
2275
2281
  // Copyright (c) Microsoft Corporation.
2276
2282
  /**
@@ -4348,7 +4354,7 @@ const participantStateMaxWidth = '5rem';
4348
4354
  /**
4349
4355
  * @private
4350
4356
  */
4351
- const participantStateStringStyles = {
4357
+ const participantStateStringStyles$1 = {
4352
4358
  maxWidth: participantStateMaxWidth,
4353
4359
  overflow: 'hidden',
4354
4360
  textOverflow: 'ellipsis',
@@ -4421,7 +4427,7 @@ const ParticipantItem = (props) => {
4421
4427
  setItemHovered(false);
4422
4428
  setMenuHidden(true);
4423
4429
  };
4424
- const participantStateString = participantStateStringTrampoline(props, strings);
4430
+ const participantStateString = participantStateStringTrampoline$1(props, strings);
4425
4431
  return (React__default['default'].createElement("div", { ref: containerRef, role: 'menuitem', "data-is-focusable": true, className: react.mergeStyles(participantItemContainerStyle({ localparticipant: me, clickable: !!menuItems }), styles === null || styles === void 0 ? void 0 : styles.root), onMouseEnter: () => setItemHovered(true), onMouseLeave: () => setItemHovered(false), onClick: () => {
4426
4432
  if (!participantStateString) {
4427
4433
  setItemHovered(true);
@@ -4436,13 +4442,13 @@ const ParticipantItem = (props) => {
4436
4442
  avatar,
4437
4443
  me && React__default['default'].createElement(react.Text, { className: meTextStyle }, strings.isMeText),
4438
4444
  React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(infoContainerStyle) }, onRenderIcon && onRenderIcon(props))),
4439
- !me && participantStateString ? (React__default['default'].createElement(react.Text, { "data-ui-id": "participant-item-state-string", className: react.mergeStyles(participantStateStringStyles) }, participantStateString)) : (React__default['default'].createElement("div", null, menuItems && menuItems.length > 0 && (React__default['default'].createElement(React__default['default'].Fragment, null,
4445
+ !me && participantStateString ? (React__default['default'].createElement(react.Text, { "data-ui-id": "participant-item-state-string", className: react.mergeStyles(participantStateStringStyles$1) }, participantStateString)) : (React__default['default'].createElement("div", null, menuItems && menuItems.length > 0 && (React__default['default'].createElement(React__default['default'].Fragment, null,
4440
4446
  menuButton,
4441
4447
  React__default['default'].createElement(react.ContextualMenu, { items: menuItems, hidden: menuHidden, target: containerRef, onItemClick: onDismissMenu, onDismiss: onDismissMenu, directionalHint: react.DirectionalHint.bottomRightEdge, className: contextualMenuStyle, calloutProps: {
4442
4448
  preventDismissOnEvent: _preventDismissOnEvent
4443
4449
  } })))))));
4444
4450
  };
4445
- const participantStateStringTrampoline = (props, strings) => {
4451
+ const participantStateStringTrampoline$1 = (props, strings) => {
4446
4452
  /* @conditional-compile-remove(one-to-n-calling) */
4447
4453
  /* @conditional-compile-remove(PSTN-calls) */
4448
4454
  return props.participantState === 'Idle' || props.participantState === 'Connecting'
@@ -4454,6 +4460,65 @@ const participantStateStringTrampoline = (props, strings) => {
4454
4460
  : undefined;
4455
4461
  };
4456
4462
 
4463
+ // Copyright (c) Microsoft Corporation.
4464
+ /**
4465
+ * @internal
4466
+ */
4467
+ const presenterPermissions = {
4468
+ cameraButton: true,
4469
+ microphoneButton: true,
4470
+ screenShare: true,
4471
+ removeParticipantButton: true
4472
+ };
4473
+ /**
4474
+ * @internal
4475
+ */
4476
+ const consumerPermissions = {
4477
+ cameraButton: false,
4478
+ microphoneButton: false,
4479
+ screenShare: false,
4480
+ removeParticipantButton: false
4481
+ };
4482
+ /**
4483
+ * @internal
4484
+ */
4485
+ const attendeePermissions = {
4486
+ cameraButton: true,
4487
+ microphoneButton: true,
4488
+ screenShare: false,
4489
+ removeParticipantButton: false
4490
+ };
4491
+ /**
4492
+ * @internal
4493
+ */
4494
+ const PermissionsContext = React.createContext(presenterPermissions);
4495
+ /**
4496
+ * @internal
4497
+ */
4498
+ const _PermissionsProvider = (props) => {
4499
+ const { permissions, children } = props;
4500
+ return React__default['default'].createElement(PermissionsContext.Provider, { value: permissions }, children);
4501
+ };
4502
+ /**
4503
+ * @internal
4504
+ * React hook to access permissions
4505
+ */
4506
+ const _usePermissions = () => React.useContext(PermissionsContext);
4507
+ /**
4508
+ * @internal
4509
+ */
4510
+ const _getPermissions = (role) => {
4511
+ if (role === 'Consumer') {
4512
+ return consumerPermissions;
4513
+ }
4514
+ else if (role === 'Attendee') {
4515
+ return attendeePermissions;
4516
+ }
4517
+ else {
4518
+ return presenterPermissions;
4519
+ }
4520
+ };
4521
+
4457
4522
  // Copyright (c) Microsoft Corporation.
4458
4523
  /**
4459
4524
  * @private
@@ -4534,6 +4599,11 @@ const ParticipantList = (props) => {
4534
4599
  const createParticipantMenuItems = (participant) => {
4535
4600
  var _a, _b;
4536
4601
  let menuItems = [];
4602
+ let disabled = !participant.isRemovable;
4603
+ /* @conditional-compile-remove(rooms) */
4604
+ const isRemovable = _usePermissions().removeParticipantButton;
4605
+ /* @conditional-compile-remove(rooms) */
4606
+ disabled = !isRemovable || disabled;
4537
4607
  if (participant.userId !== myUserId && onRemoveParticipant) {
4538
4608
  menuItems.push({
4539
4609
  key: 'remove',
@@ -4542,7 +4612,7 @@ const ParticipantList = (props) => {
4542
4612
  itemProps: {
4543
4613
  styles: (_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles) === null || _b === void 0 ? void 0 : _b.participantSubMenuItemsStyles
4544
4614
  },
4545
- disabled: !participant.isRemovable,
4615
+ disabled: disabled,
4546
4616
  'data-ui-id': ids.participantListRemoveParticipantButton
4547
4617
  });
4548
4618
  }
@@ -4769,15 +4839,6 @@ const displayNameStyle = {
4769
4839
  textOverflow: 'ellipsis',
4770
4840
  maxWidth: '100%'
4771
4841
  };
4772
- /**
4773
- * @private
4774
- */
4775
- const participantStateStyle$1 = {
4776
- textAlign: 'center',
4777
- paddingTop: '0.5rem',
4778
- fontWeight: 600,
4779
- fontSize: '0.75rem'
4780
- };
4781
4842
  /**
4782
4843
  * @private
4783
4844
  */
@@ -4801,6 +4862,25 @@ const isSpeakingBorderDiv = {
4801
4862
  // Ensure the isSpeaking element does not steal any pointer events such as onClick events
4802
4863
  pointerEvents: 'none'
4803
4864
  };
4865
+ /**
4866
+ * @private
4867
+ */
4868
+ const participantStateStringStyles = (showLabel) => {
4869
+ return {
4870
+ textAlign: 'center',
4871
+ minWidth: '3rem',
4872
+ color: 'inherit',
4873
+ width: showLabel ? 'auto' : '100%',
4874
+ marginRight: showLabel ? 0 : 'none',
4875
+ marginLeft: showLabel ? 'auto' : 'none',
4876
+ fontSize: '0.75rem',
4877
+ lineHeight: 'normal',
4878
+ overflow: 'hidden',
4879
+ textOverflow: 'ellipsis',
4880
+ whiteSpace: 'nowrap',
4881
+ padding: '0.25rem'
4882
+ };
4883
+ };
4804
4884
 
4805
4885
  // Copyright (c) Microsoft Corporation.
4806
4886
  /**
@@ -4817,26 +4897,10 @@ const DEFAULT_PERSONA_MAX_SIZE_PX = 100;
4817
4897
  // Coin min size is set PersonaSize.size32
4818
4898
  const DEFAULT_PERSONA_MIN_SIZE_PX = 32;
4819
4899
  const DefaultPlaceholder = (props) => {
4820
- const { text, noVideoAvailableAriaLabel, coinSize, hidePersonaDetails, participantState, strings } = props;
4821
- const participantStateString = React__default['default'].useMemo(() => {
4822
- if (!strings) {
4823
- return;
4824
- }
4825
- if (participantState === 'Idle' || participantState === 'Connecting') {
4826
- return strings === null || strings === void 0 ? void 0 : strings.participantStateConnecting;
4827
- }
4828
- else if (participantState === 'EarlyMedia' || participantState === 'Ringing') {
4829
- return strings === null || strings === void 0 ? void 0 : strings.participantStateRinging;
4830
- }
4831
- else if (participantState === 'Hold') {
4832
- return strings === null || strings === void 0 ? void 0 : strings.participantStateHold;
4833
- }
4834
- return;
4835
- }, [participantState, strings]);
4900
+ const { text, noVideoAvailableAriaLabel, coinSize, hidePersonaDetails } = props;
4836
4901
  return (React__default['default'].createElement(react.Stack, { className: react.mergeStyles({ position: 'absolute', height: '100%', width: '100%' }) },
4837
4902
  React__default['default'].createElement(react.Stack, { styles: defaultPersonaStyles },
4838
- React__default['default'].createElement(react.Persona, { coinSize: coinSize, hidePersonaDetails: hidePersonaDetails, text: text !== null && text !== void 0 ? text : '', initialsTextColor: "white", "aria-label": noVideoAvailableAriaLabel !== null && noVideoAvailableAriaLabel !== void 0 ? noVideoAvailableAriaLabel : '', showOverflowTooltip: false }),
4839
- participantStateString && React__default['default'].createElement(react.Text, { className: react.mergeStyles(participantStateStyle$1) }, participantStateString))));
4903
+ React__default['default'].createElement(react.Persona, { coinSize: coinSize, hidePersonaDetails: hidePersonaDetails, text: text !== null && text !== void 0 ? text : '', initialsTextColor: "white", "aria-label": noVideoAvailableAriaLabel !== null && noVideoAvailableAriaLabel !== void 0 ? noVideoAvailableAriaLabel : '', showOverflowTooltip: false }))));
4840
4904
  };
4841
4905
  const defaultPersonaStyles = { root: { margin: 'auto', maxHeight: '100%' } };
4842
4906
  /**
@@ -4847,15 +4911,10 @@ const defaultPersonaStyles = { root: { margin: 'auto', maxHeight: '100%' } };
4847
4911
  * @public
4848
4912
  */
4849
4913
  const VideoTile = (props) => {
4850
- const { children, displayName, initialsName, isMirrored, isMuted, onRenderPlaceholder, renderElement, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX,
4851
- /* @conditional-compile-remove(one-to-n-calling) */
4852
- /* @conditional-compile-remove(PSTN-calls) */
4853
- participantState } = props;
4854
- /* @conditional-compile-remove(one-to-n-calling) */
4855
- // @conditional-compile-remove(PSTN-calls)
4856
- const strings = Object.assign(Object.assign({}, useLocale$1().strings.videoTile), props.strings);
4914
+ const { children, displayName, initialsName, isMirrored, isMuted, onRenderPlaceholder, renderElement, showLabel = true, showMuteIndicator = true, styles, userId, noVideoAvailableAriaLabel, isSpeaking, personaMinSize = DEFAULT_PERSONA_MIN_SIZE_PX, personaMaxSize = DEFAULT_PERSONA_MAX_SIZE_PX } = props;
4857
4915
  const [personaSize, setPersonaSize] = React.useState(100);
4858
4916
  const videoTileRef = React.useRef(null);
4917
+ const locale = useLocale$1();
4859
4918
  const theme = useTheme();
4860
4919
  const isVideoRendered = !!renderElement;
4861
4920
  const observer = React.useRef(new ResizeObserver((entries) => {
@@ -4876,14 +4935,13 @@ const VideoTile = (props) => {
4876
4935
  noVideoAvailableAriaLabel,
4877
4936
  coinSize: personaSize,
4878
4937
  styles: defaultPersonaStyles,
4879
- hidePersonaDetails: true,
4880
- /* @conditional-compile-remove(one-to-n-calling) */
4881
- /* @conditional-compile-remove(PSTN-calls) */
4882
- participantState: participantState
4938
+ hidePersonaDetails: true
4883
4939
  };
4884
4940
  const videoHintWithBorderRadius = react.mergeStyles(videoHint, { borderRadius: theme.effects.roundedCorner4 });
4885
4941
  const tileInfoStyle = React.useMemo(() => react.mergeStyles(isVideoRendered ? videoHintWithBorderRadius : disabledVideoHint, getVideoTileOverrideColor(isVideoRendered, theme, 'neutralPrimary'), styles === null || styles === void 0 ? void 0 : styles.displayNameContainer), [isVideoRendered, videoHintWithBorderRadius, theme, styles === null || styles === void 0 ? void 0 : styles.displayNameContainer]);
4886
4942
  const ids = useIdentifiers();
4943
+ const canShowLabel = showLabel && (displayName || (showMuteIndicator && isMuted));
4944
+ const participantStateString = participantStateStringTrampoline(props, locale);
4887
4945
  return (React__default['default'].createElement(reactNorthstar.Ref, { innerRef: videoTileRef },
4888
4946
  React__default['default'].createElement(react.Stack, { "data-ui-id": ids.videoTile, className: react.mergeStyles(rootStyles, {
4889
4947
  background: theme.palette.neutralLighter,
@@ -4893,274 +4951,91 @@ const VideoTile = (props) => {
4893
4951
  borderRadius: theme.effects.roundedCorner4,
4894
4952
  border: `0.25rem solid ${isSpeaking ? theme.palette.themePrimary : 'transparent'}`
4895
4953
  }) }),
4896
- isVideoRendered ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles, isMirrored && { transform: 'scaleX(-1)' }, styles === null || styles === void 0 ? void 0 : styles.videoContainer) }, renderElement)) : (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles) }, onRenderPlaceholder ? (onRenderPlaceholder(userId !== null && userId !== void 0 ? userId : '', placeholderOptions, DefaultPlaceholder)) : (React__default['default'].createElement(DefaultPlaceholder, Object.assign({}, placeholderOptions, {
4897
- /* @conditional-compile-remove(one-to-n-calling) */
4898
- // @conditional-compile-remove(PSTN-calls)
4899
- strings: strings }))))),
4900
- showLabel && (displayName || (showMuteIndicator && isMuted)) && (React__default['default'].createElement(react.Stack, { horizontal: true, className: tileInfoContainerStyle },
4901
- React__default['default'].createElement(react.Stack, { horizontal: true, className: tileInfoStyle },
4902
- displayName && (React__default['default'].createElement(react.Text, { className: react.mergeStyles(displayNameStyle), title: displayName }, displayName)),
4954
+ isVideoRendered ? (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles, isMirrored && { transform: 'scaleX(-1)' }, styles === null || styles === void 0 ? void 0 : styles.videoContainer) }, renderElement)) : (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(videoContainerStyles) }, onRenderPlaceholder ? (onRenderPlaceholder(userId !== null && userId !== void 0 ? userId : '', placeholderOptions, DefaultPlaceholder)) : (React__default['default'].createElement(DefaultPlaceholder, Object.assign({}, placeholderOptions))))),
4955
+ (canShowLabel || participantStateString) && (React__default['default'].createElement(react.Stack, { horizontal: true, className: tileInfoContainerStyle, tokens: tileInfoContainerTokens },
4956
+ canShowLabel && (React__default['default'].createElement(react.Stack, { horizontal: true, className: tileInfoStyle },
4957
+ React__default['default'].createElement(react.Text, { className: react.mergeStyles(displayNameStyle), title: displayName }, displayName),
4903
4958
  showMuteIndicator && isMuted && (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(iconContainerStyle) },
4904
- React__default['default'].createElement(react.Icon, { iconName: "VideoTileMicOff" })))))),
4959
+ React__default['default'].createElement(react.Icon, { iconName: "VideoTileMicOff" }))))),
4960
+ participantStateString && (React__default['default'].createElement(react.Text, { className: react.mergeStyles(participantStateStringStyles(showLabel)) }, participantStateString)))),
4905
4961
  children && (React__default['default'].createElement(react.Stack, { className: react.mergeStyles(overlayContainerStyles, styles === null || styles === void 0 ? void 0 : styles.overlayContainer) }, children)))));
4906
4962
  };
4907
-
4908
- // Copyright (c) Microsoft Corporation.
4909
- /**
4910
- * A memoized version of VideoTile for rendering remote participants. React.memo is used for a performance
4911
- * boost by memoizing the same rendered component to avoid rerendering a VideoTile when its position in the
4912
- * array changes causing a rerender in the parent component. https://reactjs.org/docs/react-api.html#reactmemo
4913
- *
4914
- * @internal
4915
- */
4916
- const _RemoteVideoTile = React__default['default'].memo((props) => {
4917
- const { isAvailable, isReceiving = true, // default to true to prevent any breaking change
4918
- isMuted, isSpeaking, isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, displayName, onRenderAvatar, showMuteIndicator,
4963
+ const participantStateStringTrampoline = (props, locale) => {
4919
4964
  /* @conditional-compile-remove(one-to-n-calling) */
4920
4965
  /* @conditional-compile-remove(PSTN-calls) */
4921
- participantState } = props;
4922
- const remoteVideoStreamProps = React.useMemo(() => ({
4923
- isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
4924
- isScreenSharingOn,
4925
- isStreamAvailable: isAvailable,
4926
- isStreamReceiving: isReceiving,
4927
- onCreateRemoteStreamView,
4928
- onDisposeRemoteStreamView,
4929
- remoteParticipantId: userId,
4930
- renderElementExists: !!renderElement,
4931
- scalingMode: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.scalingMode
4932
- }), [
4933
- isAvailable,
4934
- isReceiving,
4935
- isScreenSharingOn,
4936
- onCreateRemoteStreamView,
4937
- onDisposeRemoteStreamView,
4938
- remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
4939
- remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.scalingMode,
4940
- renderElement,
4941
- userId
4942
- ]);
4943
- // Handle creating, destroying and updating the video stream as necessary
4944
- useRemoteVideoStreamLifecycleMaintainer(remoteVideoStreamProps);
4945
- const renderVideoStreamElement = React.useMemo(() => {
4946
- // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which
4947
- // implies that, after their threshold, all streams have no child (blank video)
4948
- if (!renderElement || !renderElement.childElementCount) {
4949
- // Returning `undefined` results in the placeholder with avatar being shown
4950
- return undefined;
4951
- }
4952
- return (React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' }));
4953
- }, [renderElement, isReceiving]);
4954
- return (React__default['default'].createElement(VideoTile, { key: userId, userId: userId, renderElement: renderVideoStreamElement, displayName: displayName, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, isSpeaking: isSpeaking, showMuteIndicator: showMuteIndicator, showLabel: props.showLabel, personaMinSize: props.personaMinSize,
4955
- /* @conditional-compile-remove(one-to-n-calling) */
4956
- /* @conditional-compile-remove(PSTN-calls) */
4957
- participantState: participantState }));
4958
- });
4966
+ const strings = Object.assign(Object.assign({}, locale.strings.videoTile), props.strings);
4967
+ /* @conditional-compile-remove(one-to-n-calling) */
4968
+ /* @conditional-compile-remove(PSTN-calls) */
4969
+ return props.participantState === 'Idle' || props.participantState === 'Connecting'
4970
+ ? strings === null || strings === void 0 ? void 0 : strings.participantStateConnecting
4971
+ : props.participantState === 'EarlyMedia' || props.participantState === 'Ringing'
4972
+ ? strings === null || strings === void 0 ? void 0 : strings.participantStateRinging
4973
+ : props.participantState === 'Hold'
4974
+ ? strings === null || strings === void 0 ? void 0 : strings.participantStateHold
4975
+ : undefined;
4976
+ };
4977
+ const tileInfoContainerTokens = {
4978
+ // A horizontal Stack sets the left margin to 0 for all it's children.
4979
+ // We need to allow the children to set their own margins
4980
+ childrenGap: 'none'
4981
+ };
4959
4982
 
4960
4983
  // Copyright (c) Microsoft Corporation.
4961
- // Licensed under the MIT license.
4962
4984
  /**
4963
- * Horizontal Gallery button width in rem
4985
+ * @private
4964
4986
  */
4965
- const HORIZONTAL_GALLERY_BUTTON_WIDTH = 1.75;
4987
+ const videoGalleryOuterDivStyle = react.mergeStyles({ position: 'relative', width: '100%', height: '100%' });
4966
4988
  /**
4967
4989
  * @private
4968
4990
  */
4969
- const leftRightButtonStyles = (theme) => {
4970
- return {
4971
- background: 'none',
4972
- padding: 0,
4973
- height: 'auto',
4974
- minWidth: `${HORIZONTAL_GALLERY_BUTTON_WIDTH}rem`,
4975
- maxWidth: `${HORIZONTAL_GALLERY_BUTTON_WIDTH}rem`,
4976
- border: `1px solid ${theme.palette.neutralLight}`,
4977
- borderRadius: theme.effects.roundedCorner4
4978
- };
4991
+ const videoGalleryContainerStyle = {
4992
+ root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
4979
4993
  };
4980
4994
  /**
4981
- * Horizontal Gallery gap size in rem between tiles and buttons
4995
+ * Small floating modal width and height in rem for small screen
4982
4996
  */
4983
- const HORIZONTAL_GALLERY_GAP = 0.5;
4997
+ const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
4998
+ /**
4999
+ * Large floating modal width and height in rem for large screen
5000
+ */
5001
+ const LARGE_FLOATING_MODAL_SIZE_PX = { width: 160, height: 120 };
4984
5002
  /**
4985
5003
  * @private
5004
+ * z-index to ensure that the local video tile is above the video gallery.
4986
5005
  */
4987
- const rootStyle = {
4988
- height: '100%',
4989
- width: '100%',
4990
- gap: `${HORIZONTAL_GALLERY_GAP}rem`
4991
- };
5006
+ const LOCAL_VIDEO_TILE_ZINDEX = 2;
4992
5007
  /**
4993
5008
  * @private
4994
5009
  */
4995
- const childrenContainerStyle = {
4996
- height: '100%',
4997
- gap: `${HORIZONTAL_GALLERY_GAP}rem`
5010
+ const floatingLocalVideoModalStyle = (theme, isNarrow) => {
5011
+ return react.concatStyleSets({
5012
+ main: localVideoTileContainerStyle(theme, isNarrow)
5013
+ }, {
5014
+ main: {
5015
+ boxShadow: theme.effects.elevation8,
5016
+ ':focus-within': {
5017
+ boxShadow: theme.effects.elevation16,
5018
+ border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`
5019
+ }
5020
+ }
5021
+ }, localVideoModalStyles);
4998
5022
  };
4999
-
5000
- // Copyright (c) Microsoft Corporation.
5001
5023
  /**
5002
- * {@link HorizontalGallery} default children per page
5024
+ * Padding equal to the amount the modal should stay inside the bounds of the container.
5025
+ * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
5026
+ * @private
5003
5027
  */
5004
- const DEFAULT_CHILDREN_PER_PAGE = 5;
5028
+ const localVideoTileOuterPaddingPX = 8;
5005
5029
  /**
5006
- * Renders a horizontal gallery that parents children horizontally. Handles pagination based on the childrenPerPage prop.
5007
- * @param props - HorizontalGalleryProps {@link @azure/communication-react#HorizontalGalleryProps}
5008
- * @returns
5030
+ * @private
5009
5031
  */
5010
- const HorizontalGallery = (props) => {
5011
- var _a, _b;
5012
- const { children, childrenPerPage = DEFAULT_CHILDREN_PER_PAGE, styles } = props;
5013
- const ids = useIdentifiers();
5014
- const [page, setPage] = React.useState(0);
5015
- const numberOfChildren = React__default['default'].Children.count(children);
5016
- const lastPage = Math.ceil(numberOfChildren / childrenPerPage) - 1;
5017
- const paginatedChildren = React.useMemo(() => {
5018
- return bucketize(React__default['default'].Children.toArray(children), childrenPerPage);
5019
- }, [children, childrenPerPage]);
5020
- // If children per page is 0 or less return empty element
5021
- if (childrenPerPage <= 0) {
5022
- return React__default['default'].createElement(React__default['default'].Fragment, null);
5023
- }
5024
- const firstIndexOfCurrentPage = page * childrenPerPage;
5025
- const clippedPage = firstIndexOfCurrentPage < numberOfChildren - 1 ? page : lastPage;
5026
- const childrenOnCurrentPage = paginatedChildren[clippedPage];
5027
- const showButtons = numberOfChildren > childrenPerPage;
5028
- const disablePreviousButton = page === 0;
5029
- const disableNextButton = page === lastPage;
5030
- return (React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(rootStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root) },
5031
- showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "previous-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryLeftButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.previousButton, onClick: () => setPage(Math.max(0, Math.min(lastPage, page - 1))), disabled: disablePreviousButton, identifier: ids.horizontalGalleryLeftNavButton })),
5032
- React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(childrenContainerStyle, { '> *': (_b = props.styles) === null || _b === void 0 ? void 0 : _b.children }) }, childrenOnCurrentPage),
5033
- showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "next-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryRightButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.nextButton, onClick: () => setPage(Math.min(lastPage, page + 1)), disabled: disableNextButton, identifier: ids.horizontalGalleryRightNavButton }))));
5034
- };
5035
- const HorizontalGalleryNavigationButton = (props) => {
5036
- const theme = useTheme();
5037
- return (React__default['default'].createElement(react.DefaultButton, { className: react.mergeStyles(leftRightButtonStyles(theme), props.styles), onClick: props.onClick, disabled: props.disabled, "data-ui-id": props.identifier }, props.icon));
5032
+ const localVideoTileContainerStyle = (theme, isNarrow) => {
5033
+ return Object.assign({ minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width), minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height), position: 'absolute', bottom: _pxToRem(localVideoTileOuterPaddingPX), borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl
5034
+ ? { left: _pxToRem(localVideoTileOuterPaddingPX) }
5035
+ : { right: _pxToRem(localVideoTileOuterPaddingPX) }));
5038
5036
  };
5039
- function bucketize(arr, bucketSize) {
5040
- const bucketArray = [];
5041
- if (bucketSize <= 0) {
5042
- return bucketArray;
5043
- }
5044
- for (let i = 0; i < arr.length; i += bucketSize) {
5045
- bucketArray.push(arr.slice(i, i + bucketSize));
5046
- }
5047
- return bucketArray;
5048
- }
5049
-
5050
- // Copyright (c) Microsoft Corporation.
5051
5037
  /**
5052
- * Wrapped HorizontalGallery that adjusts the number of items per page based on the
5053
- * available width obtained from a ResizeObserver, width per child, gap width, and button width
5054
- */
5055
- const ResponsiveHorizontalGallery = (props) => {
5056
- const { childWidthRem, gapWidthRem, buttonWidthRem = 0 } = props;
5057
- const containerRef = React.useRef(null);
5058
- const containerWidth = _useContainerWidth(containerRef);
5059
- const leftPadding = containerRef.current ? parseFloat(getComputedStyle(containerRef.current).paddingLeft) : 0;
5060
- const rightPadding = containerRef.current ? parseFloat(getComputedStyle(containerRef.current).paddingRight) : 0;
5061
- const childrenPerPage = calculateChildrenPerPage({
5062
- numberOfChildren: React__default['default'].Children.count(props.children),
5063
- containerWidth: (containerWidth !== null && containerWidth !== void 0 ? containerWidth : 0) - leftPadding - rightPadding,
5064
- childWidthRem,
5065
- gapWidthRem,
5066
- buttonWidthRem
5067
- });
5068
- return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(props.containerStyles) },
5069
- React__default['default'].createElement(HorizontalGallery, { childrenPerPage: childrenPerPage, styles: props.horizontalGalleryStyles }, props.children)));
5070
- };
5071
- /**
5072
- * Helper function to calculate children per page for HorizontalGallery based on width of container, child, buttons, and
5073
- * gaps in between
5074
- */
5075
- const calculateChildrenPerPage = (args) => {
5076
- const { numberOfChildren, containerWidth, buttonWidthRem, childWidthRem, gapWidthRem } = args;
5077
- const childWidth = _convertRemToPx(childWidthRem);
5078
- const gapWidth = _convertRemToPx(gapWidthRem);
5079
- /** First check how many children can fit in containerWidth.
5080
- * __________________________________
5081
- * | || |
5082
- * | || |
5083
- * |________________||________________|
5084
- * <-----------containerWidth--------->
5085
- * containerWidth = n * childWidth + (n - 1) * gapWidth. Isolate n and take the floor.
5086
- */
5087
- const numberOfChildrenInContainer = Math.floor((containerWidth + gapWidth) / (childWidth + gapWidth));
5088
- // If all children fit then return numberOfChildrenInContainer
5089
- if (numberOfChildren <= numberOfChildrenInContainer) {
5090
- return numberOfChildrenInContainer;
5091
- }
5092
- const buttonWidth = _convertRemToPx(buttonWidthRem);
5093
- /** We know we need to paginate. So we need to subtract the buttonWidth twice and gapWidth twice from
5094
- * containerWidth to compute childrenSpace
5095
- * <-----------containerWidth--------->
5096
- * __________________________________
5097
- * | || || || |
5098
- * |<|| || ||>|
5099
- * |_||_____________||_____________||_|
5100
- * <-------childrenSpace------>
5101
- */
5102
- const childrenSpace = containerWidth - 2 * buttonWidth - 2 * gapWidth;
5103
- // Now that we have childrenSpace width we can figure out how many children can fit in childrenSpace.
5104
- // childrenSpace = n * childWidth + (n - 1) * gapWidth. Isolate n and take the floor.
5105
- return Math.floor((childrenSpace + gapWidth) / (childWidth + gapWidth));
5106
- };
5107
-
5108
- // Copyright (c) Microsoft Corporation.
5109
- /**
5110
- * @private
5111
- */
5112
- const videoGalleryOuterDivStyle = react.mergeStyles({ position: 'relative', width: '100%', height: '100%' });
5113
- /**
5114
- * @private
5115
- */
5116
- const videoGalleryContainerStyle = {
5117
- root: { position: 'relative', height: '100%', width: '100%', padding: '0.5rem' }
5118
- };
5119
- /**
5120
- * Small floating modal width and height in rem for small screen
5121
- */
5122
- const SMALL_FLOATING_MODAL_SIZE_PX = { width: 64, height: 88 };
5123
- /**
5124
- * Large floating modal width and height in rem for large screen
5125
- */
5126
- const LARGE_FLOATING_MODAL_SIZE_PX = { width: 160, height: 120 };
5127
- /**
5128
- * @private
5129
- * z-index to ensure that the local video tile is above the video gallery.
5130
- */
5131
- const LOCAL_VIDEO_TILE_ZINDEX = 2;
5132
- /**
5133
- * @private
5134
- */
5135
- const floatingLocalVideoModalStyle = (theme, isNarrow) => {
5136
- return react.concatStyleSets({
5137
- main: localVideoTileContainerStyle(theme, isNarrow)
5138
- }, {
5139
- main: {
5140
- boxShadow: theme.effects.elevation8,
5141
- ':focus-within': {
5142
- boxShadow: theme.effects.elevation16,
5143
- border: `${_pxToRem(2)} solid ${theme.palette.neutralPrimary}`
5144
- }
5145
- }
5146
- }, localVideoModalStyles);
5147
- };
5148
- /**
5149
- * Padding equal to the amount the modal should stay inside the bounds of the container.
5150
- * i.e. if this is 8px, the modal should always be at least 8px inside the container at all times on all sides.
5151
- * @private
5152
- */
5153
- const localVideoTileOuterPaddingPX = 8;
5154
- /**
5155
- * @private
5156
- */
5157
- const localVideoTileContainerStyle = (theme, isNarrow) => {
5158
- return Object.assign({ minWidth: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.width) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.width), minHeight: isNarrow ? _pxToRem(SMALL_FLOATING_MODAL_SIZE_PX.height) : _pxToRem(LARGE_FLOATING_MODAL_SIZE_PX.height), position: 'absolute', bottom: _pxToRem(localVideoTileOuterPaddingPX), borderRadius: theme.effects.roundedCorner4, overflow: 'hidden' }, (theme.rtl
5159
- ? { left: _pxToRem(localVideoTileOuterPaddingPX) }
5160
- : { right: _pxToRem(localVideoTileOuterPaddingPX) }));
5161
- };
5162
- /**
5163
- * @private
5038
+ * @private
5164
5039
  */
5165
5040
  const localVideoTileWithControlsContainerStyle = (theme, isNarrow) => {
5166
5041
  return react.concatStyleSets(localVideoTileContainerStyle(theme, isNarrow), {
@@ -5284,6 +5159,240 @@ const localVideoModalStyles = {
5284
5159
  }
5285
5160
  };
5286
5161
 
5162
+ // Copyright (c) Microsoft Corporation.
5163
+ /**
5164
+ * A memoized version of VideoTile for rendering remote participants. React.memo is used for a performance
5165
+ * boost by memoizing the same rendered component to avoid rerendering a VideoTile when its position in the
5166
+ * array changes causing a rerender in the parent component. https://reactjs.org/docs/react-api.html#reactmemo
5167
+ *
5168
+ * @internal
5169
+ */
5170
+ const _RemoteVideoTile = React__default['default'].memo((props) => {
5171
+ const { isAvailable, isReceiving = true, // default to true to prevent any breaking change
5172
+ isMuted, isSpeaking, isScreenSharingOn, onCreateRemoteStreamView, onDisposeRemoteStreamView, remoteVideoViewOptions, renderElement, userId, displayName, onRenderAvatar, showMuteIndicator } = props;
5173
+ const containerRef = React__default['default'].useRef(null);
5174
+ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
5175
+ const containerWidth = _useContainerWidth(containerRef);
5176
+ const remoteVideoStreamProps = React.useMemo(() => ({
5177
+ isMirrored: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
5178
+ isScreenSharingOn,
5179
+ isStreamAvailable: isAvailable,
5180
+ isStreamReceiving: isReceiving,
5181
+ onCreateRemoteStreamView,
5182
+ onDisposeRemoteStreamView,
5183
+ remoteParticipantId: userId,
5184
+ renderElementExists: !!renderElement,
5185
+ scalingMode: remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.scalingMode
5186
+ }), [
5187
+ isAvailable,
5188
+ isReceiving,
5189
+ isScreenSharingOn,
5190
+ onCreateRemoteStreamView,
5191
+ onDisposeRemoteStreamView,
5192
+ remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.isMirrored,
5193
+ remoteVideoViewOptions === null || remoteVideoViewOptions === void 0 ? void 0 : remoteVideoViewOptions.scalingMode,
5194
+ renderElement,
5195
+ userId
5196
+ ]);
5197
+ // Handle creating, destroying and updating the video stream as necessary
5198
+ useRemoteVideoStreamLifecycleMaintainer(remoteVideoStreamProps);
5199
+ const renderVideoStreamElement = React.useMemo(() => {
5200
+ // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which
5201
+ // implies that, after their threshold, all streams have no child (blank video)
5202
+ if (!renderElement || !renderElement.childElementCount) {
5203
+ // Returning `undefined` results in the placeholder with avatar being shown
5204
+ return undefined;
5205
+ }
5206
+ return (React__default['default'].createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' }));
5207
+ }, [renderElement, isReceiving]);
5208
+ const showLabelTrampoline = React.useMemo(() => {
5209
+ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
5210
+ return canShowLabel(props.participantState, props.showLabel, containerWidth);
5211
+ }, [
5212
+ /* @conditional-compile-remove(one-to-n-calling) */
5213
+ /* @conditional-compile-remove(PSTN-calls) */
5214
+ containerWidth,
5215
+ props
5216
+ ]);
5217
+ return (
5218
+ // IMPORTANT: This div needs to be a flex so that the children take up its full width and height
5219
+ React__default['default'].createElement("div", { ref: containerRef, style: { display: 'flex', flexGrow: 1 } },
5220
+ React__default['default'].createElement(VideoTile, { key: userId, userId: userId, renderElement: renderVideoStreamElement, displayName: displayName, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, isSpeaking: isSpeaking, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize, showLabel: showLabelTrampoline,
5221
+ /* @conditional-compile-remove(one-to-n-calling) */
5222
+ /* @conditional-compile-remove(PSTN-calls) */
5223
+ participantState: props.participantState })));
5224
+ });
5225
+ /* @conditional-compile-remove(one-to-n-calling) */
5226
+ /* @conditional-compile-remove(PSTN-calls) */
5227
+ /**
5228
+ * Determines if a label should be shown for a remote video tile.
5229
+ * When the remote video tile is rendered as a small tile in horizontal gallery,
5230
+ * we hide the participants name if they are in hold/connecting states.
5231
+ */
5232
+ const canShowLabel = (participantState, showLabel, containerWidth) => {
5233
+ // if showLabel has been explicitly set to false, don't show the label
5234
+ if (showLabel === false) {
5235
+ return showLabel;
5236
+ }
5237
+ // If the participant state is in calling or hold and
5238
+ // the container width is less than the small horizontal gallery tile size,
5239
+ // don't show the label (participant name)
5240
+ if (_isParticipantStateCallingOrHold(participantState)) {
5241
+ if (containerWidth && containerWidth / 16 <= SMALL_HORIZONTAL_GALLERY_TILE_SIZE_REM.width) {
5242
+ return false;
5243
+ }
5244
+ }
5245
+ return showLabel;
5246
+ };
5247
+
5248
+ // Copyright (c) Microsoft Corporation.
5249
+ // Licensed under the MIT license.
5250
+ /**
5251
+ * Horizontal Gallery button width in rem
5252
+ */
5253
+ const HORIZONTAL_GALLERY_BUTTON_WIDTH = 1.75;
5254
+ /**
5255
+ * @private
5256
+ */
5257
+ const leftRightButtonStyles = (theme) => {
5258
+ return {
5259
+ background: 'none',
5260
+ padding: 0,
5261
+ height: 'auto',
5262
+ minWidth: `${HORIZONTAL_GALLERY_BUTTON_WIDTH}rem`,
5263
+ maxWidth: `${HORIZONTAL_GALLERY_BUTTON_WIDTH}rem`,
5264
+ border: `1px solid ${theme.palette.neutralLight}`,
5265
+ borderRadius: theme.effects.roundedCorner4
5266
+ };
5267
+ };
5268
+ /**
5269
+ * Horizontal Gallery gap size in rem between tiles and buttons
5270
+ */
5271
+ const HORIZONTAL_GALLERY_GAP = 0.5;
5272
+ /**
5273
+ * @private
5274
+ */
5275
+ const rootStyle = {
5276
+ height: '100%',
5277
+ width: '100%',
5278
+ gap: `${HORIZONTAL_GALLERY_GAP}rem`
5279
+ };
5280
+ /**
5281
+ * @private
5282
+ */
5283
+ const childrenContainerStyle = {
5284
+ height: '100%',
5285
+ gap: `${HORIZONTAL_GALLERY_GAP}rem`
5286
+ };
5287
+
5288
+ // Copyright (c) Microsoft Corporation.
5289
+ /**
5290
+ * {@link HorizontalGallery} default children per page
5291
+ */
5292
+ const DEFAULT_CHILDREN_PER_PAGE = 5;
5293
+ /**
5294
+ * Renders a horizontal gallery that parents children horizontally. Handles pagination based on the childrenPerPage prop.
5295
+ * @param props - HorizontalGalleryProps {@link @azure/communication-react#HorizontalGalleryProps}
5296
+ * @returns
5297
+ */
5298
+ const HorizontalGallery = (props) => {
5299
+ var _a, _b;
5300
+ const { children, childrenPerPage = DEFAULT_CHILDREN_PER_PAGE, styles } = props;
5301
+ const ids = useIdentifiers();
5302
+ const [page, setPage] = React.useState(0);
5303
+ const numberOfChildren = React__default['default'].Children.count(children);
5304
+ const lastPage = Math.ceil(numberOfChildren / childrenPerPage) - 1;
5305
+ const paginatedChildren = React.useMemo(() => {
5306
+ return bucketize(React__default['default'].Children.toArray(children), childrenPerPage);
5307
+ }, [children, childrenPerPage]);
5308
+ // If children per page is 0 or less return empty element
5309
+ if (childrenPerPage <= 0) {
5310
+ return React__default['default'].createElement(React__default['default'].Fragment, null);
5311
+ }
5312
+ const firstIndexOfCurrentPage = page * childrenPerPage;
5313
+ const clippedPage = firstIndexOfCurrentPage < numberOfChildren - 1 ? page : lastPage;
5314
+ const childrenOnCurrentPage = paginatedChildren[clippedPage];
5315
+ const showButtons = numberOfChildren > childrenPerPage;
5316
+ const disablePreviousButton = page === 0;
5317
+ const disableNextButton = page === lastPage;
5318
+ return (React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(rootStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root) },
5319
+ showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "previous-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryLeftButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.previousButton, onClick: () => setPage(Math.max(0, Math.min(lastPage, page - 1))), disabled: disablePreviousButton, identifier: ids.horizontalGalleryLeftNavButton })),
5320
+ React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(childrenContainerStyle, { '> *': (_b = props.styles) === null || _b === void 0 ? void 0 : _b.children }) }, childrenOnCurrentPage),
5321
+ showButtons && (React__default['default'].createElement(HorizontalGalleryNavigationButton, { key: "next-nav-button", icon: React__default['default'].createElement(react.Icon, { iconName: "HorizontalGalleryRightButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.nextButton, onClick: () => setPage(Math.min(lastPage, page + 1)), disabled: disableNextButton, identifier: ids.horizontalGalleryRightNavButton }))));
5322
+ };
5323
+ const HorizontalGalleryNavigationButton = (props) => {
5324
+ const theme = useTheme();
5325
+ return (React__default['default'].createElement(react.DefaultButton, { className: react.mergeStyles(leftRightButtonStyles(theme), props.styles), onClick: props.onClick, disabled: props.disabled, "data-ui-id": props.identifier }, props.icon));
5326
+ };
5327
+ function bucketize(arr, bucketSize) {
5328
+ const bucketArray = [];
5329
+ if (bucketSize <= 0) {
5330
+ return bucketArray;
5331
+ }
5332
+ for (let i = 0; i < arr.length; i += bucketSize) {
5333
+ bucketArray.push(arr.slice(i, i + bucketSize));
5334
+ }
5335
+ return bucketArray;
5336
+ }
5337
+
5338
+ // Copyright (c) Microsoft Corporation.
5339
+ /**
5340
+ * Wrapped HorizontalGallery that adjusts the number of items per page based on the
5341
+ * available width obtained from a ResizeObserver, width per child, gap width, and button width
5342
+ */
5343
+ const ResponsiveHorizontalGallery = (props) => {
5344
+ const { childWidthRem, gapWidthRem, buttonWidthRem = 0 } = props;
5345
+ const containerRef = React.useRef(null);
5346
+ const containerWidth = _useContainerWidth(containerRef);
5347
+ const leftPadding = containerRef.current ? parseFloat(getComputedStyle(containerRef.current).paddingLeft) : 0;
5348
+ const rightPadding = containerRef.current ? parseFloat(getComputedStyle(containerRef.current).paddingRight) : 0;
5349
+ const childrenPerPage = calculateChildrenPerPage({
5350
+ numberOfChildren: React__default['default'].Children.count(props.children),
5351
+ containerWidth: (containerWidth !== null && containerWidth !== void 0 ? containerWidth : 0) - leftPadding - rightPadding,
5352
+ childWidthRem,
5353
+ gapWidthRem,
5354
+ buttonWidthRem
5355
+ });
5356
+ return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(props.containerStyles) },
5357
+ React__default['default'].createElement(HorizontalGallery, { childrenPerPage: childrenPerPage, styles: props.horizontalGalleryStyles }, props.children)));
5358
+ };
5359
+ /**
5360
+ * Helper function to calculate children per page for HorizontalGallery based on width of container, child, buttons, and
5361
+ * gaps in between
5362
+ */
5363
+ const calculateChildrenPerPage = (args) => {
5364
+ const { numberOfChildren, containerWidth, buttonWidthRem, childWidthRem, gapWidthRem } = args;
5365
+ const childWidth = _convertRemToPx(childWidthRem);
5366
+ const gapWidth = _convertRemToPx(gapWidthRem);
5367
+ /** First check how many children can fit in containerWidth.
5368
+ * __________________________________
5369
+ * | || |
5370
+ * | || |
5371
+ * |________________||________________|
5372
+ * <-----------containerWidth--------->
5373
+ * containerWidth = n * childWidth + (n - 1) * gapWidth. Isolate n and take the floor.
5374
+ */
5375
+ const numberOfChildrenInContainer = Math.floor((containerWidth + gapWidth) / (childWidth + gapWidth));
5376
+ // If all children fit then return numberOfChildrenInContainer
5377
+ if (numberOfChildren <= numberOfChildrenInContainer) {
5378
+ return numberOfChildrenInContainer;
5379
+ }
5380
+ const buttonWidth = _convertRemToPx(buttonWidthRem);
5381
+ /** We know we need to paginate. So we need to subtract the buttonWidth twice and gapWidth twice from
5382
+ * containerWidth to compute childrenSpace
5383
+ * <-----------containerWidth--------->
5384
+ * __________________________________
5385
+ * | || || || |
5386
+ * |<|| || ||>|
5387
+ * |_||_____________||_____________||_|
5388
+ * <-------childrenSpace------>
5389
+ */
5390
+ const childrenSpace = containerWidth - 2 * buttonWidth - 2 * gapWidth;
5391
+ // Now that we have childrenSpace width we can figure out how many children can fit in childrenSpace.
5392
+ // childrenSpace = n * childWidth + (n - 1) * gapWidth. Isolate n and take the floor.
5393
+ return Math.floor((childrenSpace + gapWidth) / (childWidth + gapWidth));
5394
+ };
5395
+
5287
5396
  // Copyright (c) Microsoft Corporation.
5288
5397
  /**
5289
5398
  * @private
@@ -6531,74 +6640,15 @@ const HighContrastAwareIcon = (props) => {
6531
6640
  const { iconName, disabled } = props;
6532
6641
  const theme = useTheme();
6533
6642
  // setting colors for the icons using color from theme, so in dark mode or other accessibility modes, they have pre-defined contrast colors
6534
- // the media query is for when in specific window accessibility mode, change the svg colors
6535
- return (React__default['default'].createElement(react.Icon, { iconName: iconName, className: react.mergeStyles({
6536
- svg: {
6537
- fill: disabled ? theme.palette.neutralTertiary : theme.palette.neutralPrimaryAlt,
6538
- '@media (forced-colors: active) and (prefers-color-scheme: dark)': {
6539
- fill: disabled ? theme.palette.neutralPrimaryAlt : theme.palette.neutralTertiary
6540
- }
6541
- }
6542
- }) }));
6543
- };
6544
-
6545
- // Copyright (c) Microsoft Corporation.
6546
- /**
6547
- * @internal
6548
- */
6549
- const presenterPermissions = {
6550
- cameraButton: true,
6551
- microphoneButton: true,
6552
- screenShare: true,
6553
- participantList: true
6554
- };
6555
- /**
6556
- * @internal
6557
- */
6558
- const consumerPermissions = {
6559
- cameraButton: false,
6560
- microphoneButton: false,
6561
- screenShare: false,
6562
- participantList: false
6563
- };
6564
- /**
6565
- * @internal
6566
- */
6567
- const attendeePermissions = {
6568
- cameraButton: true,
6569
- microphoneButton: true,
6570
- screenShare: false,
6571
- participantList: true
6572
- };
6573
- /**
6574
- * @internal
6575
- */
6576
- const PermissionsContext = React.createContext(presenterPermissions);
6577
- /**
6578
- * @internal
6579
- */
6580
- const _PermissionsProvider = (props) => {
6581
- const { permissions, children } = props;
6582
- return React__default['default'].createElement(PermissionsContext.Provider, { value: permissions }, children);
6583
- };
6584
- /**
6585
- * @internal
6586
- * React hook to access permissions
6587
- */
6588
- const _usePermissions = () => React.useContext(PermissionsContext);
6589
- /**
6590
- * @internal
6591
- */
6592
- const _getPermissions = (role) => {
6593
- if (role === 'Consumer') {
6594
- return consumerPermissions;
6595
- }
6596
- else if (role === 'Attendee') {
6597
- return attendeePermissions;
6598
- }
6599
- else {
6600
- return presenterPermissions;
6601
- }
6643
+ // the media query is for when in specific window accessibility mode, change the svg colors
6644
+ return (React__default['default'].createElement(react.Icon, { iconName: iconName, className: react.mergeStyles({
6645
+ svg: {
6646
+ fill: disabled ? theme.palette.neutralTertiary : theme.palette.neutralPrimaryAlt,
6647
+ '@media (forced-colors: active) and (prefers-color-scheme: dark)': {
6648
+ fill: disabled ? theme.palette.neutralPrimaryAlt : theme.palette.neutralTertiary
6649
+ }
6650
+ }
6651
+ }) }));
6602
6652
  };
6603
6653
 
6604
6654
  // Copyright (c) Microsoft Corporation.
@@ -6995,9 +7045,7 @@ const MicrophoneButton = (props) => {
6995
7045
  const ParticipantsButton = (props) => {
6996
7046
  var _a, _b, _c, _d;
6997
7047
  const { callInvitationURL, styles, onMuteAll, onRenderIcon, onRenderParticipantList, participants, myUserId, excludeMe, onRenderParticipant, onRenderAvatar, onRemoveParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip } = props;
6998
- let disabled = props.disabled;
6999
- /* @conditional-compile-remove(rooms) */
7000
- disabled = disabled || !_usePermissions().participantList;
7048
+ const disabled = props.disabled;
7001
7049
  const onRenderPeopleIcon = () => (React__default['default'].createElement(HighContrastAwareIcon, { disabled: disabled, iconName: "ControlButtonParticipants" }));
7002
7050
  const ids = useIdentifiers();
7003
7051
  const onMuteAllCallback = React.useCallback(() => {
@@ -7820,7 +7868,7 @@ const DialpadContainer = (props) => {
7820
7868
  var _a, _b;
7821
7869
  const theme = react.useTheme();
7822
7870
  const [textValue, setTextValue] = React.useState('');
7823
- const { onSendDtmfTone, onClickDialpadButton, onDisplayDialpadInput, onChange, showDeleteButton } = props;
7871
+ const { onSendDtmfTone, onClickDialpadButton, onDisplayDialpadInput, onChange, showDeleteButton = true } = props;
7824
7872
  const sanitizeInput = (input) => {
7825
7873
  // remove non-valid characters from input: letters,special characters excluding +, *,#
7826
7874
  return input.replace(/[^\d*#+]/g, '');
@@ -7898,7 +7946,6 @@ const DialpadContainer = (props) => {
7898
7946
  * @beta
7899
7947
  */
7900
7948
  const Dialpad = (props) => {
7901
- var _a;
7902
7949
  /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
7903
7950
  const localeStrings = useLocale$1().strings.dialpad;
7904
7951
  const dialpadLocaleStringsTrampoline = () => {
@@ -7906,8 +7953,7 @@ const Dialpad = (props) => {
7906
7953
  return localeStrings;
7907
7954
  };
7908
7955
  const strings = Object.assign(Object.assign({}, dialpadLocaleStringsTrampoline()), props.strings);
7909
- const showDeleteButton = (_a = props.showDeleteButton) !== null && _a !== void 0 ? _a : true;
7910
- return React__default['default'].createElement(DialpadContainer, Object.assign({ strings: strings }, props, { showDeleteButton: showDeleteButton }));
7956
+ return React__default['default'].createElement(DialpadContainer, Object.assign({ strings: strings }, props));
7911
7957
  };
7912
7958
 
7913
7959
  // Copyright (c) Microsoft Corporation.
@@ -12665,7 +12711,7 @@ const CallCompositeIcon = (props) => (React__default['default'].createElement(re
12665
12711
  */
12666
12712
  const CallWithChatCompositeIcon = (props) => (React__default['default'].createElement(react.FontIcon, Object.assign({}, props)));
12667
12713
 
12668
- var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",peopleButtonLabel:"People",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",soundLabel:"Sound",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close Dialpad"};var chat$d={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$d={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",openDialpadButtonLabel:"Dial phone number",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close Dialpad"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
12714
+ var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",peopleButtonLabel:"People",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",soundLabel:"Sound",startCallButtonLabel:"Start call",openDialpadButtonLabel:"Dial phone number",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close Dialpad",moreButtonCallingLabel:"More",resumeCallButtonLabel:"Resume",resumeCallButtonAriaLabel:"Resume call",holdScreenLabel:"You're on hold",openDtmfDialpad:"Show Dialpad",dtmfDialpadPlaceHolderText:"Enter number"};var chat$d={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$d={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",openDialpadButtonLabel:"Dial phone number",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",peoplePaneAddPeopleButtonLabel:"Add People",dialpadStartCallButtonLabel:"Call",dialpadModalTitle:"Dial Phone Number",dialpadModalAriaLabel:"Dialpad",dialpadCloseModalButtonAriaLabel:"Close Dialpad",openDtmfDialpad:"Show Dialpad",dtmfDialpadPlaceHolderText:"Enter number"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
12669
12715
 
12670
12716
  var call$c={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",defaultPlaceHolder:"Select an option",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",soundLabel:"Sound",startCallButtonLabel:"Start call",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby."};var chat$c={chatListHeader:"In this chat"};var callWithChat$c={peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",chatButtonLabel:"Chat",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipOpen:"Show chat",chatButtonTooltipClose:"Hide chat",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",chatPaneTitle:"Chat",chatButtonNewMessageNotificationLabel:"New Message",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButton:"Close",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_GB = {call:call$c,chat:chat$c,callWithChat:callWithChat$c};
12671
12717
 
@@ -14398,6 +14444,10 @@ const getCallCompositePage = (call, previousCall) => {
14398
14444
  else if (_isInCall(call === null || call === void 0 ? void 0 : call.state)) {
14399
14445
  return 'call';
14400
14446
  }
14447
+ else if ((call === null || call === void 0 ? void 0 : call.state) === 'LocalHold') {
14448
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
14449
+ return 'hold';
14450
+ }
14401
14451
  else {
14402
14452
  // When the call object has been constructed after clicking , but before 'connecting' has been
14403
14453
  // set on the call object, we continue to show the configuration screen.
@@ -14838,6 +14888,15 @@ const People = (props) => {
14838
14888
  return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { "data-ui-id": "call-composite-participants-button", strings: strings, labelKey: 'peopleButtonLabelKey', onRenderOnIcon: onRenderOnIcon !== null && onRenderOnIcon !== void 0 ? onRenderOnIcon : icon$2, onRenderOffIcon: onRenderOffIcon !== null && onRenderOffIcon !== void 0 ? onRenderOffIcon : icon$2, onClick: onClick, styles: styles })));
14839
14889
  };
14840
14890
 
14891
+ // Copyright (c) Microsoft Corporation.
14892
+ const icon$1 = () => React__default['default'].createElement(reactIcons.MoreHorizontal20Filled, { key: 'chatOnIconKey', primaryFill: "currentColor" });
14893
+ /**
14894
+ * @private
14895
+ */
14896
+ const MoreButton = (props) => {
14897
+ return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { labelKey: 'optionsButtonLabelKey', showLabel: props.showLabel, onRenderOnIcon: icon$1, onRenderOffIcon: icon$1, onClick: props.onClick, "data-ui-id": 'call-with-chat-composite-more-button' })));
14898
+ };
14899
+
14841
14900
  // Copyright (c) Microsoft Corporation.
14842
14901
  // Licensed under the MIT license.
14843
14902
  /**
@@ -14929,20 +14988,17 @@ const SendDtmfDialpad = (props) => {
14929
14988
  };
14930
14989
  const dialpadModalStyle = React.useMemo(() => themeddialpadModalStyle$1(theme), [theme]);
14931
14990
  const dialpadStyle = React.useMemo(() => themedDialpadStyle$1(isMobile, theme), [theme, isMobile]);
14932
- const dialpadStrings = {
14933
- placeholderText: ''
14934
- };
14935
14991
  if (isMobile) {
14936
14992
  return (React__default['default'].createElement(react.Stack, null, showDialpad && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles$1 },
14937
14993
  React__default['default'].createElement(_DrawerSurface, { onLightDismiss: onDismissTriggered },
14938
14994
  React__default['default'].createElement(react.Stack, { style: { padding: '1rem' } },
14939
- React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false }))))))));
14995
+ React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: strings }))))))));
14940
14996
  }
14941
14997
  return (React__default['default'].createElement(React__default['default'].Fragment, null, React__default['default'].createElement(react.Modal, { titleAriaId: strings.dialpadModalAriaLabel, isOpen: showDialpad, onDismiss: onDismissTriggered, isBlocking: true, styles: dialpadModalStyle },
14942
14998
  React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "end", verticalAlign: "center" },
14943
14999
  React__default['default'].createElement(react.IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings.dialpadCloseModalButtonAriaLabel, onClick: onDismissTriggered, style: { color: theme.palette.black } })),
14944
15000
  React__default['default'].createElement(react.Stack, null,
14945
- React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: dialpadStrings }))))));
15001
+ React__default['default'].createElement(Dialpad, Object.assign({ styles: dialpadStyle }, dialpadProps, { showDeleteButton: false, strings: strings }))))));
14946
15002
  };
14947
15003
 
14948
15004
  // Copyright (c) Microsoft Corporation.
@@ -14961,11 +15017,62 @@ const CallControls = (props) => {
14961
15017
  tooltipOffContent: localeStrings.strings.callWithChat.peopleButtonTooltipOpen,
14962
15018
  tooltipOnContent: localeStrings.strings.callWithChat.peopleButtonTooltipClose
14963
15019
  }), [localeStrings]);
15020
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
15021
+ const moreButtonStrings = React.useMemo(() => ({
15022
+ label: localeStrings.strings.call.moreButtonCallingLabel,
15023
+ tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
15024
+ }), [localeStrings]);
14964
15025
  /* @conditional-compile-remove(PSTN-calls) */
14965
15026
  const dialpadStrings = React.useMemo(() => ({
14966
15027
  dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,
14967
- dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel
15028
+ dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,
15029
+ placeholderText: localeStrings.strings.call.dtmfDialpadPlaceHolderText
14968
15030
  }), [localeStrings]);
15031
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
15032
+ const holdButtonProps = usePropsFor$1(HoldButton);
15033
+ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
15034
+ const moreButtonContextualMenuItems = () => {
15035
+ const items = [];
15036
+ if (props.isMobile && props.onPeopleButtonClicked) {
15037
+ items.push({
15038
+ key: 'peopleButtonKey',
15039
+ text: localeStrings.component.strings.participantsButton.label,
15040
+ onClick: () => {
15041
+ if (props.onPeopleButtonClicked) {
15042
+ props.onPeopleButtonClicked();
15043
+ }
15044
+ },
15045
+ iconProps: { iconName: 'ControlButtonParticipants', styles: { root: { lineHeight: 0 } } },
15046
+ itemProps: {
15047
+ styles: buttonFlyoutIncreasedSizeStyles
15048
+ }
15049
+ });
15050
+ }
15051
+ items.push({
15052
+ key: 'holdButtonKey',
15053
+ text: localeStrings.component.strings.holdButton.tooltipOffContent,
15054
+ onClick: () => {
15055
+ holdButtonProps.onToggleHold();
15056
+ },
15057
+ iconProps: { iconName: 'HoldCall', styles: { root: { lineHeight: 0 } } },
15058
+ itemProps: {
15059
+ styles: buttonFlyoutIncreasedSizeStyles
15060
+ }
15061
+ });
15062
+ /* @conditional-compile-remove(PSTN-calls) */
15063
+ items.push({
15064
+ key: 'showDialpadKey',
15065
+ text: localeStrings.strings.call.openDtmfDialpad,
15066
+ onClick: () => {
15067
+ setShowDialpad(true);
15068
+ },
15069
+ iconProps: { iconName: 'Dialpad', styles: { root: { lineHeight: 0 } } },
15070
+ itemProps: {
15071
+ styles: buttonFlyoutIncreasedSizeStyles
15072
+ }
15073
+ });
15074
+ return items;
15075
+ };
14969
15076
  /* @conditional-compile-remove(PSTN-calls) */
14970
15077
  const [showDialpad, setShowDialpad] = React.useState(false);
14971
15078
  const theme = react.useTheme();
@@ -14987,10 +15094,13 @@ const CallControls = (props) => {
14987
15094
  isEnabled$2(options === null || options === void 0 ? void 0 : options.microphoneButton) && React__default['default'].createElement(Microphone, { displayType: options === null || options === void 0 ? void 0 : options.displayType }),
14988
15095
  isEnabled$2(options === null || options === void 0 ? void 0 : options.cameraButton) && React__default['default'].createElement(Camera, { displayType: options === null || options === void 0 ? void 0 : options.displayType }),
14989
15096
  isEnabled$2(options === null || options === void 0 ? void 0 : options.screenShareButton) && (React__default['default'].createElement(ScreenShare, { option: options === null || options === void 0 ? void 0 : options.screenShareButton, displayType: options === null || options === void 0 ? void 0 : options.displayType })),
14990
- isEnabled$2(options === null || options === void 0 ? void 0 : options.participantsButton) && (React__default['default'].createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile })) && (
15097
+ isEnabled$2(options === null || options === void 0 ? void 0 : options.participantsButton) &&
15098
+ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */ !props.isMobile && (React__default['default'].createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile })) && (
14991
15099
  /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */
14992
15100
  React__default['default'].createElement(People, { checked: props.peopleButtonChecked, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-with-chat-composite-people-button", disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton), strings: peopleButtonStrings })),
14993
15101
  isEnabled$2(options === null || options === void 0 ? void 0 : options.devicesButton) && (React__default['default'].createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize })),
15102
+ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */
15103
+ isEnabled$2(options === null || options === void 0 ? void 0 : options.moreButton) && (React__default['default'].createElement(MoreButton, { strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: !props.isMobile })),
14994
15104
  customButtons['primary'],
14995
15105
  isEnabled$2(options === null || options === void 0 ? void 0 : options.endCallButton) && React__default['default'].createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
14996
15106
  };
@@ -16032,7 +16142,7 @@ const CallArrangement = (props) => {
16032
16142
  const isMobileWithActivePane = props.mobileView && activePane !== 'none';
16033
16143
  /* @conditional-compile-remove(one-to-n-calling) */
16034
16144
  const togglePeople = React.useCallback(() => {
16035
- if (activePane === 'people' || !(callStatus === 'Connected')) {
16145
+ if (activePane === 'people' || !_isInCall(callStatus)) {
16036
16146
  setActivePane('none');
16037
16147
  }
16038
16148
  else {
@@ -16041,7 +16151,7 @@ const CallArrangement = (props) => {
16041
16151
  }, [activePane, setActivePane, callStatus]);
16042
16152
  /* @conditional-compile-remove(one-to-n-calling) */
16043
16153
  const selectPeople = React.useCallback(() => {
16044
- if (callStatus === 'Connected') {
16154
+ if (_isInCall(callStatus)) {
16045
16155
  setActivePane('people');
16046
16156
  }
16047
16157
  }, [setActivePane, callStatus]);
@@ -16058,7 +16168,7 @@ const CallArrangement = (props) => {
16058
16168
  /* @conditional-compile-remove(one-to-n-calling) */
16059
16169
  const callPaneContent = () => {
16060
16170
  var _a;
16061
- if (adapter && callStatus === 'Connected') {
16171
+ if (adapter && _isInCall(callStatus)) {
16062
16172
  return (React__default['default'].createElement(CallPane, { callAdapter: adapter, onClose: closePane, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: (_a = props.callControlProps) === null || _a === void 0 ? void 0 : _a.onFetchParticipantMenuItems, onPeopleButtonClicked: showShowPeopleTabHeaderButton$1(props.callControlProps.options) ? selectPeople : undefined, modalLayerHostId: props.modalLayerHostId, activePane: activePane, mobileView: props.mobileView, inviteLink: props.callControlProps.callInvitationURL }));
16063
16173
  }
16064
16174
  return React__default['default'].createElement(React__default['default'].Fragment, null);
@@ -16106,61 +16216,6 @@ const localVideoCameraCycleButtonSelector = reselect.createSelector([getDeviceMa
16106
16216
  };
16107
16217
  });
16108
16218
 
16109
- // Copyright (c) Microsoft Corporation.
16110
- const videoBaseStyle = react.mergeStyles({
16111
- border: 0
16112
- });
16113
- /**
16114
- * @private
16115
- */
16116
- react.mergeStyles(videoBaseStyle, {
16117
- width: '100%',
16118
- height: '100%'
16119
- });
16120
- /**
16121
- * @private
16122
- */
16123
- react.mergeStyles(videoBaseStyle, {
16124
- width: '100%',
16125
- height: 0,
16126
- position: 'relative',
16127
- paddingTop: '56.25%' /* default to 16:9 Aspect Ratio for now*/
16128
- });
16129
- /**
16130
- * @private
16131
- */
16132
- react.mergeStyles({
16133
- position: 'absolute',
16134
- top: 0,
16135
- left: 0,
16136
- width: '100%',
16137
- height: '100%'
16138
- });
16139
- /**
16140
- * @private
16141
- */
16142
- react.mergeStyles({
16143
- height: '100%',
16144
- width: '15%'
16145
- });
16146
- /**
16147
- * @private
16148
- */
16149
- react.mergeStyles({
16150
- height: '100%',
16151
- width: '85%',
16152
- position: 'relative'
16153
- });
16154
- /**
16155
- * @private
16156
- */
16157
- const participantStateStyle = {
16158
- textAlign: 'center',
16159
- paddingTop: '0.5rem',
16160
- fontWeight: 400,
16161
- fontSize: '0.75rem'
16162
- };
16163
-
16164
16219
  // Copyright (c) Microsoft Corporation.
16165
16220
  const VideoGalleryStyles = {
16166
16221
  root: {
@@ -16186,26 +16241,11 @@ const MediaGallery = (props) => {
16186
16241
  const cameraSwitcherProps = React.useMemo(() => {
16187
16242
  return Object.assign(Object.assign({}, cameraSwitcherCallback), cameraSwitcherCameras);
16188
16243
  }, [cameraSwitcherCallback, cameraSwitcherCameras]);
16189
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
16190
- const locale = useLocale().component;
16191
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
16192
- const videoTileStrings = locale.strings.videoTile;
16193
16244
  const onRenderAvatar = React.useCallback((userId, options) => {
16194
16245
  return (React__default['default'].createElement(react.Stack, { className: react.mergeStyles({ position: 'absolute', height: '100%', width: '100%' }) },
16195
16246
  React__default['default'].createElement(react.Stack, { styles: { root: { margin: 'auto', maxHeight: '100%' } } },
16196
- React__default['default'].createElement(AvatarPersona, Object.assign({ userId: userId }, options, { dataProvider: props.onFetchAvatarPersonaData })),
16197
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
16198
- (options === null || options === void 0 ? void 0 : options.participantState) === 'Ringing' && (React__default['default'].createElement(react.Text, { className: react.mergeStyles(participantStateStyle) }, videoTileStrings.participantStateConnecting)),
16199
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
16200
- (options === null || options === void 0 ? void 0 : options.participantState) === 'Connecting' && (React__default['default'].createElement(react.Text, { className: react.mergeStyles(participantStateStyle) }, videoTileStrings.participantStateRinging)),
16201
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
16202
- (options === null || options === void 0 ? void 0 : options.participantState) === 'Hold' && (React__default['default'].createElement(react.Text, { className: react.mergeStyles(participantStateStyle) }, videoTileStrings.participantStateHold)))));
16203
- }, [
16204
- props.onFetchAvatarPersonaData,
16205
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */ videoTileStrings.participantStateConnecting,
16206
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */ videoTileStrings.participantStateRinging,
16207
- /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */ videoTileStrings.participantStateHold
16208
- ]);
16247
+ React__default['default'].createElement(AvatarPersona, Object.assign({ userId: userId }, options, { dataProvider: props.onFetchAvatarPersonaData })))));
16248
+ }, [props.onFetchAvatarPersonaData]);
16209
16249
  useLocalVideoStartTrigger(!!props.isVideoStreamOn);
16210
16250
  const VideoGalleryMemoized = React.useMemo(() => {
16211
16251
  return (React__default['default'].createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions$2, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: "floatingLocalVideo", showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar })));
@@ -16446,7 +16486,7 @@ const CallPage = (props) => {
16446
16486
  /* @conditional-compile-remove(one-to-n-calling) */
16447
16487
  onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView,
16448
16488
  /* @conditional-compile-remove(one-to-n-calling) */
16449
- modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => callStatus === 'Connected' ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React__default['default'].createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData }))) : (React__default['default'].createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React__default['default'].createElement(React__default['default'].Fragment, null)), dataUiId: 'call-page' }));
16489
+ modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React__default['default'].createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData }))) : (React__default['default'].createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React__default['default'].createElement(React__default['default'].Fragment, null)), dataUiId: 'call-page' }));
16450
16490
  };
16451
16491
  /**
16452
16492
  * @private
@@ -17044,6 +17084,154 @@ const overlayPropsWaitingToBeAdmitted = (strings) => ({
17044
17084
  overlayIcon: React__default['default'].createElement(CallCompositeIcon, { iconName: "LobbyScreenWaitingToBeAdmitted" })
17045
17085
  });
17046
17086
 
17087
+ // Copyright (c) Microsoft Corporation.
17088
+ /**
17089
+ * styles for hold pane resume button
17090
+ *
17091
+ * @private
17092
+ */
17093
+ const resumeButtonStyles = {
17094
+ root: {
17095
+ borderRadius: _pxToRem(4),
17096
+ padding: `${_pxToRem(6)} ${_pxToRem(20)} `
17097
+ },
17098
+ label: {
17099
+ fontWeight: 400,
17100
+ display: 'flex',
17101
+ fontSize: _pxToRem(14)
17102
+ }
17103
+ };
17104
+ /**
17105
+ * styles for hold pane main text
17106
+ *
17107
+ * @private
17108
+ */
17109
+ const holdPaneLabelStyles = {
17110
+ root: {
17111
+ color: '#FFFFFF',
17112
+ fontWeight: 600,
17113
+ fontHeight: _pxToRem(22),
17114
+ fontSize: _pxToRem(16),
17115
+ margin: '1rem auto 0.5rem'
17116
+ }
17117
+ };
17118
+ /**
17119
+ * styles for hold pane timer
17120
+ *
17121
+ * @private
17122
+ */
17123
+ const holdPaneTimerStyles = {
17124
+ root: {
17125
+ color: '#FFFFFF',
17126
+ fontWeight: 600,
17127
+ fontSize: _pxToRem(20),
17128
+ lineHeight: _pxToRem(28),
17129
+ margin: 'auto'
17130
+ }
17131
+ };
17132
+ /**
17133
+ * styles for hold pane container
17134
+ *
17135
+ * @private
17136
+ */
17137
+ const paneStyles = {
17138
+ root: {
17139
+ width: '100%',
17140
+ height: '100%',
17141
+ background: 'rgba(0, 0, 0, 0.5)'
17142
+ }
17143
+ };
17144
+ /**
17145
+ * styles for the hold pane content container
17146
+ *
17147
+ * @private
17148
+ */
17149
+ const holdPaneContentStyles = {
17150
+ root: {
17151
+ display: 'flex',
17152
+ margin: 'auto',
17153
+ flexDirection: 'column',
17154
+ justifyContent: 'center'
17155
+ }
17156
+ };
17157
+
17158
+ // Copyright (c) Microsoft Corporation.
17159
+ /**
17160
+ * Hold pane to display when the user places themselves on hold
17161
+ *
17162
+ * @beta
17163
+ */
17164
+ const HoldPane = () => {
17165
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
17166
+ const holdButtonProps = usePropsFor$1(HoldButton);
17167
+ const locale = useLocale();
17168
+ const strings = stringsTrampoline(locale);
17169
+ const [time, setTime] = React.useState(0);
17170
+ const elapsedTime = getReadableTime(time);
17171
+ const startTime = React.useRef(performance.now());
17172
+ React__default['default'].useEffect(() => {
17173
+ const interval = setInterval(() => {
17174
+ setTime(performance.now() - startTime.current);
17175
+ }, 10);
17176
+ return () => {
17177
+ clearInterval(interval);
17178
+ };
17179
+ }, [startTime]);
17180
+ return (React__default['default'].createElement(react.Stack, { styles: paneStyles },
17181
+ React__default['default'].createElement(react.Stack, { horizontal: true, styles: holdPaneContentStyles },
17182
+ React__default['default'].createElement(react.Text, { styles: holdPaneTimerStyles }, elapsedTime),
17183
+ React__default['default'].createElement(react.Text, { styles: holdPaneLabelStyles }, strings.holdScreenLabel),
17184
+ React__default['default'].createElement(react.PrimaryButton, { text: strings.resumeCallButtonLabel, ariaLabel: strings.resumeCallButtonAriaLabel, styles: resumeButtonStyles, onClick: () => {
17185
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
17186
+ holdButtonProps.onToggleHold();
17187
+ } }))));
17188
+ };
17189
+ const getMinutes = (time) => {
17190
+ return Math.floor(getSeconds(time) / 60);
17191
+ };
17192
+ const getSeconds = (time) => {
17193
+ return Math.floor(time / 1000);
17194
+ };
17195
+ const getHours = (time) => {
17196
+ return Math.floor(getMinutes(time) / 60);
17197
+ };
17198
+ /**
17199
+ * @internal
17200
+ */
17201
+ const getReadableTime = (time) => {
17202
+ const hours = getHours(time);
17203
+ const readableMinutes = ('0' + (getMinutes(time) % 60)).slice(-2);
17204
+ const readableSeconds = ('0' + (getSeconds(time) % 60)).slice(-2);
17205
+ return `${hours > 0 ? hours + ':' : ''}${readableMinutes}:${readableSeconds}`;
17206
+ };
17207
+ const stringsTrampoline = (locale) => {
17208
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
17209
+ return {
17210
+ holdScreenLabel: locale.strings.call.holdScreenLabel,
17211
+ resumeCallButtonLabel: locale.strings.call.resumeCallButtonLabel,
17212
+ resumeCallButtonAriaLabel: locale.strings.call.resumeCallButtonAriaLabel
17213
+ };
17214
+ };
17215
+
17216
+ // Copyright (c) Microsoft Corporation.
17217
+ /**
17218
+ * @beta
17219
+ */
17220
+ const HoldPage = (props) => {
17221
+ var _a, _b, _c;
17222
+ const errorBarProps = usePropsFor$1(ErrorBar);
17223
+ const strings = useLocale().strings.call;
17224
+ const callControlOptions = props.mobileView
17225
+ ? reduceCallControlsForMobile((_a = props.options) === null || _a === void 0 ? void 0 : _a.callControls)
17226
+ : (_b = props.options) === null || _b === void 0 ? void 0 : _b.callControls;
17227
+ return (React__default['default'].createElement(CallArrangement, { complianceBannerProps: { strings }, errorBarProps: ((_c = props.options) === null || _c === void 0 ? void 0 : _c.errorBar) !== false && Object.assign({}, errorBarProps), callControlProps: {
17228
+ options: callControlOptions,
17229
+ increaseFlyoutItemSize: props.mobileView
17230
+ }, mobileView: props.mobileView,
17231
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
17232
+ modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => React__default['default'].createElement(HoldPane, null), dataUiId: 'hold-page' }));
17233
+ };
17234
+
17047
17235
  // Copyright (c) Microsoft Corporation.
17048
17236
  // Licensed under the MIT license.
17049
17237
  var __awaiter$5 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -17089,6 +17277,11 @@ const MainScreen = (props) => {
17089
17277
  /* @conditional-compile-remove(one-to-n-calling) */
17090
17278
  modalLayerHostId: props.modalLayerHostId, options: props.options }));
17091
17279
  break;
17280
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
17281
+ case holdPageTrampoline():
17282
+ pageElement = (React__default['default'].createElement(React__default['default'].Fragment, null,
17283
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ React__default['default'].createElement(HoldPage, { mobileView: props.mobileView, modalLayerHostId: props.modalLayerHostId, options: props.options })));
17284
+ break;
17092
17285
  default:
17093
17286
  throw new Error('Invalid call composite page');
17094
17287
  }
@@ -17144,6 +17337,11 @@ const CallComposite = (props) => {
17144
17337
  /* @conditional-compile-remove(one-to-n-calling) */
17145
17338
  mobileView && React__default['default'].createElement(react.LayerHost, { id: modalLayerHostId, className: react.mergeStyles(modalLayerHostStyle) })))));
17146
17339
  };
17340
+ const holdPageTrampoline = () => {
17341
+ /* @conditional-compile-remove(one-to-n-calling) */
17342
+ /* @conditional-compile-remove(PSTN-calls) */
17343
+ return 'hold';
17344
+ };
17147
17345
 
17148
17346
  /**
17149
17347
  * @private
@@ -17885,7 +18083,7 @@ const isOutboundCall = (callLocator) => {
17885
18083
  };
17886
18084
 
17887
18085
  // Copyright (c) Microsoft Corporation.
17888
- const icon$1 = () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: 'ControlBarPeopleButton' });
18086
+ const icon = () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: 'ControlBarPeopleButton' });
17889
18087
  /**
17890
18088
  * @private
17891
18089
  */
@@ -17900,7 +18098,7 @@ const PeopleButton = (props) => {
17900
18098
  }
17901
18099
  }, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
17902
18100
  }, [props.styles, theme.palette.neutralLight]);
17903
- return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { strings: strings, labelKey: 'peopleButtonLabelKey', onRenderOnIcon: onRenderOnIcon !== null && onRenderOnIcon !== void 0 ? onRenderOnIcon : icon$1, onRenderOffIcon: onRenderOffIcon !== null && onRenderOffIcon !== void 0 ? onRenderOffIcon : icon$1, onClick: onClick, styles: styles })));
18101
+ return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { strings: strings, labelKey: 'peopleButtonLabelKey', onRenderOnIcon: onRenderOnIcon !== null && onRenderOnIcon !== void 0 ? onRenderOnIcon : icon, onRenderOffIcon: onRenderOffIcon !== null && onRenderOffIcon !== void 0 ? onRenderOffIcon : icon, onClick: onClick, styles: styles })));
17904
18102
  };
17905
18103
 
17906
18104
  // Copyright (c) Microsoft Corporation.
@@ -18036,15 +18234,6 @@ const chatNotificationContainerStyles = {
18036
18234
  }
18037
18235
  };
18038
18236
 
18039
- // Copyright (c) Microsoft Corporation.
18040
- const icon = () => React__default['default'].createElement(reactIcons.MoreHorizontal20Filled, { key: 'chatOnIconKey', primaryFill: "currentColor" });
18041
- /**
18042
- * @private
18043
- */
18044
- const MoreButton = (props) => {
18045
- return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { labelKey: 'optionsButtonLabelKey', showLabel: false, onRenderOnIcon: icon, onRenderOffIcon: icon, onClick: props.onClick, "data-ui-id": 'call-with-chat-composite-more-button' })));
18046
- };
18047
-
18048
18237
  // Copyright (c) Microsoft Corporation.
18049
18238
  /**
18050
18239
  * Max number of Custom Buttons in primary and secondary ControlBar
@@ -18107,6 +18296,56 @@ const onFetchCustomButtonPropsTrampoline = (options) => {
18107
18296
  return response;
18108
18297
  };
18109
18298
 
18299
+ // Copyright (c) Microsoft Corporation.
18300
+ /**
18301
+ *
18302
+ * @private
18303
+ */
18304
+ const DesktopMoreButton = (props) => {
18305
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18306
+ const localeStrings = useLocale();
18307
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18308
+ const holdButtonProps = usePropsFor$1(HoldButton);
18309
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18310
+ const moreButtonStrings = React.useMemo(() => ({
18311
+ label: localeStrings.strings.call.moreButtonCallingLabel,
18312
+ tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
18313
+ }), [localeStrings]);
18314
+ const moreButtonContextualMenuItems = () => {
18315
+ const items = [];
18316
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18317
+ items.push({
18318
+ key: 'holdButtonKey',
18319
+ text: localeStrings.component.strings.holdButton.tooltipOffContent,
18320
+ onClick: () => {
18321
+ holdButtonProps.onToggleHold();
18322
+ },
18323
+ iconProps: { iconName: 'HoldCall', styles: { root: { lineHeight: 0 } } },
18324
+ itemProps: {
18325
+ styles: buttonFlyoutIncreasedSizeStyles
18326
+ }
18327
+ });
18328
+ /*@conditional-compile-remove(PSTN-calls) */
18329
+ if (props.onClickShowDialpad) {
18330
+ items.push({
18331
+ key: 'showDialpadKey',
18332
+ text: localeStrings.strings.callWithChat.openDtmfDialpad,
18333
+ onClick: () => {
18334
+ props.onClickShowDialpad && props.onClickShowDialpad();
18335
+ },
18336
+ iconProps: { iconName: 'Dialpad', styles: { root: { lineHeight: 0 } } },
18337
+ itemProps: {
18338
+ styles: buttonFlyoutIncreasedSizeStyles
18339
+ }
18340
+ });
18341
+ }
18342
+ return items;
18343
+ };
18344
+ return (React__default['default'].createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "call-with-chat-composite-more-button",
18345
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18346
+ strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() } })));
18347
+ };
18348
+
18110
18349
  // Copyright (c) Microsoft Corporation.
18111
18350
  const inferCallWithChatControlOptions$1 = (mobileView, callWithChatControls) => {
18112
18351
  if (callWithChatControls === false) {
@@ -18128,7 +18367,7 @@ const inferCallWithChatControlOptions$1 = (mobileView, callWithChatControls) =>
18128
18367
  * @private
18129
18368
  */
18130
18369
  const CallWithChatControlBar = (props) => {
18131
- var _a, _b, _c;
18370
+ var _a, _b;
18132
18371
  const theme = react.useTheme();
18133
18372
  const callWithChatStrings = useCallWithChatCompositeStrings();
18134
18373
  const options = inferCallWithChatControlOptions$1(props.mobileView, props.callControls);
@@ -18160,27 +18399,14 @@ const CallWithChatControlBar = (props) => {
18160
18399
  const endCallButtonStyles = React.useMemo(() => (!props.mobileView ? getDesktopEndCallButtonStyles(theme) : undefined), [props.mobileView, theme]);
18161
18400
  /* @conditional-compile-remove(control-bar-button-injection) */
18162
18401
  const customButtons = React.useMemo(() => generateCustomCallWithChatControlBarButton(onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined), options !== false ? options === null || options === void 0 ? void 0 : options.displayType : undefined), [options]);
18163
- /* @conditional-compile-remove(PSTN-calls) */
18164
- const dialpadStrings = React.useMemo(() => ({
18165
- dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,
18166
- dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel
18167
- }), [callWithChatStrings]);
18168
- /* @conditional-compile-remove(PSTN-calls) */
18169
- const [showDialpad, setShowDialpad] = React.useState(false);
18170
18402
  // when options is false then we want to hide the whole control bar.
18171
18403
  if (options === false) {
18172
18404
  return React__default['default'].createElement(React__default['default'].Fragment, null);
18173
18405
  }
18174
18406
  const chatButton = (React__default['default'].createElement(ChatButtonWithUnreadMessagesBadge, { chatAdapter: props.chatAdapter, checked: props.chatButtonChecked, showLabel: options.displayType !== 'compact', isChatPaneVisible: props.chatButtonChecked, onClick: props.onChatButtonClicked, disabled: props.disableButtonsForLobbyPage, strings: chatButtonStrings, styles: commonButtonStyles, newMessageLabel: callWithChatStrings.chatButtonNewMessageNotificationLabel }));
18175
- /* @conditional-compile-remove(PSTN-calls) */
18176
- const onDismissDialpad = () => {
18177
- setShowDialpad(false);
18178
- };
18179
18407
  return (React__default['default'].createElement(react.Stack, { horizontal: true, className: react.mergeStyles(callControlsContainerStyles, controlBarContainerStyles) },
18180
18408
  React__default['default'].createElement(react.Stack.Item, { grow: true },
18181
18409
  React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
18182
- /* @conditional-compile-remove(PSTN-calls) */
18183
- React__default['default'].createElement(SendDtmfDialpad, { isMobile: (_a = props.mobileView) !== null && _a !== void 0 ? _a : false, strings: dialpadStrings, showDialpad: showDialpad, onDismissDialpad: onDismissDialpad }),
18184
18410
  React__default['default'].createElement(react.Stack, { horizontalAlign: "center" },
18185
18411
  React__default['default'].createElement(react.Stack.Item, null,
18186
18412
  React__default['default'].createElement(ControlBar, { layout: "horizontal", styles: centerContainerStyles },
@@ -18189,18 +18415,21 @@ const CallWithChatControlBar = (props) => {
18189
18415
  props.mobileView && isEnabled$1(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton,
18190
18416
  isEnabled$1(options.screenShareButton) && (React__default['default'].createElement(ScreenShare, { option: options.screenShareButton, displayType: options.displayType, styles: screenShareButtonStyles })),
18191
18417
  /* @conditional-compile-remove(control-bar-button-injection) */
18192
- (_b = customButtons['primary']) === null || _b === void 0 ? void 0 :
18193
- _b.props.children.slice(0, props.mobileView
18418
+ (_a = customButtons['primary']) === null || _a === void 0 ? void 0 :
18419
+ _a.props.children.slice(0, props.mobileView
18194
18420
  ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
18195
18421
  : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((element) => {
18196
18422
  return (React__default['default'].createElement(element.type, Object.assign({}, element.props, { key: element.props.strings.label, styles: commonButtonStyles, displayType: options.displayType, showLabel: options.displayType !== 'compact' })));
18197
18423
  }),
18198
18424
  props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
18425
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.moreButton) &&
18426
+ /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled$1(options === null || options === void 0 ? void 0 : options.holdButton) &&
18427
+ !props.mobileView && (React__default['default'].createElement(DesktopMoreButton, { disabled: props.disableButtonsForLobbyPage, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad })),
18199
18428
  React__default['default'].createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles })))))),
18200
18429
  !props.mobileView && (React__default['default'].createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
18201
18430
  /* @conditional-compile-remove(control-bar-button-injection) */
18202
- (_c = customButtons['secondary']) === null || _c === void 0 ? void 0 :
18203
- _c.props.children.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((element) => {
18431
+ (_b = customButtons['secondary']) === null || _b === void 0 ? void 0 :
18432
+ _b.props.children.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((element) => {
18204
18433
  return (React__default['default'].createElement(element.type, Object.assign({}, element.props, { key: element.props.key, styles: commonButtonStyles, displayType: options.displayType, showLabel: options.displayType !== 'compact' })));
18205
18434
  }),
18206
18435
  isEnabled$1(options === null || options === void 0 ? void 0 : options.peopleButton) && (React__default['default'].createElement(PeopleButton, { checked: props.peopleButtonChecked, showLabel: options.displayType !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-with-chat-composite-people-button", disabled: props.disableButtonsForLobbyPage, strings: peopleButtonStrings, styles: commonButtonStyles })),
@@ -18529,6 +18758,10 @@ const MoreDrawer = (props) => {
18529
18758
  var _a, _b, _c, _d, _e;
18530
18759
  const drawerMenuItems = [];
18531
18760
  const { speakers, onSelectSpeaker, onLightDismiss } = props;
18761
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18762
+ const localeStrings = useLocale();
18763
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18764
+ const holdButtonProps = usePropsFor$1(HoldButton);
18532
18765
  const onSpeakerItemClick = React.useCallback((_ev, itemKey) => {
18533
18766
  const selected = speakers === null || speakers === void 0 ? void 0 : speakers.find((speaker) => speaker.id === itemKey);
18534
18767
  if (selected) {
@@ -18599,6 +18832,28 @@ const MoreDrawer = (props) => {
18599
18832
  onItemClick: props.onPeopleButtonClicked
18600
18833
  });
18601
18834
  }
18835
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
18836
+ if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.peopleButton)) {
18837
+ drawerMenuItems.push({
18838
+ itemKey: 'holdButtonKey',
18839
+ text: localeStrings.component.strings.holdButton.tooltipOffContent,
18840
+ onItemClick: () => {
18841
+ holdButtonProps.onToggleHold();
18842
+ },
18843
+ iconProps: { iconName: 'HoldCall', styles: { root: { lineHeight: 0 } } }
18844
+ });
18845
+ }
18846
+ /*@conditional-compile-remove(PSTN-calls) */
18847
+ if (drawerSelectionOptions !== false && isEnabled(drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.peopleButton) && props.onClickShowDialpad) {
18848
+ drawerMenuItems.push({
18849
+ itemKey: 'showDialpadKey',
18850
+ text: localeStrings.strings.callWithChat.openDtmfDialpad,
18851
+ onItemClick: () => {
18852
+ props.onClickShowDialpad && props.onClickShowDialpad();
18853
+ },
18854
+ iconProps: { iconName: 'Dialpad', styles: { root: { lineHeight: 0 } } }
18855
+ });
18856
+ }
18602
18857
  /* @conditional-compile-remove(control-bar-button-injection) */
18603
18858
  const customDrawerButtons = React.useMemo(() => generateCustomCallWithChatDrawerButtons(onFetchCustomButtonPropsTrampoline(drawerSelectionOptions !== false ? drawerSelectionOptions : undefined), drawerSelectionOptions !== false ? drawerSelectionOptions === null || drawerSelectionOptions === void 0 ? void 0 : drawerSelectionOptions.displayType : undefined), [drawerSelectionOptions]);
18604
18859
  /* @conditional-compile-remove(control-bar-button-injection) */
@@ -18810,6 +19065,24 @@ const CallWithChatScreen = (props) => {
18810
19065
  const callCompositeContainerCSS = React.useMemo(() => {
18811
19066
  return { display: isMobileWithActivePane ? 'none' : 'flex' };
18812
19067
  }, [isMobileWithActivePane]);
19068
+ /* @conditional-compile-remove(PSTN-calls) */
19069
+ const [showDtmfDialpad, setShowDtmfDialpad] = React.useState(false);
19070
+ /* @conditional-compile-remove(PSTN-calls) */
19071
+ const onDismissDtmfDialpad = () => {
19072
+ setShowDtmfDialpad(false);
19073
+ };
19074
+ /* @conditional-compile-remove(PSTN-calls) */
19075
+ const onClickShowDialpad = () => {
19076
+ setShowDtmfDialpad(true);
19077
+ };
19078
+ /* @conditional-compile-remove(PSTN-calls) */
19079
+ const callWithChatStrings = useCallWithChatCompositeStrings();
19080
+ /* @conditional-compile-remove(PSTN-calls) */
19081
+ const dialpadStrings = React.useMemo(() => ({
19082
+ dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,
19083
+ dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
19084
+ placeholderText: callWithChatStrings.dtmfDialpadPlaceHolderText
19085
+ }), [callWithChatStrings]);
18813
19086
  return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles) },
18814
19087
  React__default['default'].createElement(react.Stack, { verticalFill: true, grow: true, styles: compositeOuterContainerStyles, id: compositeParentDivId },
18815
19088
  React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },
@@ -18822,11 +19095,20 @@ const CallWithChatScreen = (props) => {
18822
19095
  fileSharing: props.fileSharing, rtl: props.rtl }))),
18823
19096
  showControlBar && !isMobileWithActivePane && (React__default['default'].createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
18824
19097
  React__default['default'].createElement(react.Stack.Item, { styles: controlBarContainerStyles$1 },
18825
- React__default['default'].createElement(CallWithChatControlBar, { callAdapter: callAdapter, chatAdapter: chatProps.adapter, chatButtonChecked: activePane === 'chat', onChatButtonClicked: toggleChat, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeople, onMoreButtonClicked: onMoreButtonClicked, mobileView: mobileView, disableButtonsForLobbyPage: isInLobbyOrConnecting, callControls: props.callControls, containerHeight: containerHeight, containerWidth: containerWidth })))),
19098
+ React__default['default'].createElement(CallWithChatControlBar, { callAdapter: callAdapter, chatAdapter: chatProps.adapter, chatButtonChecked: activePane === 'chat', onChatButtonClicked: toggleChat, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeople, onMoreButtonClicked: onMoreButtonClicked, mobileView: mobileView, disableButtonsForLobbyPage: isInLobbyOrConnecting, callControls: props.callControls, containerHeight: containerHeight, containerWidth: containerWidth,
19099
+ /* @conditional-compile-remove(PSTN-calls) */
19100
+ onClickShowDialpad: onClickShowDialpad })))),
18826
19101
  showControlBar && showDrawer && (React__default['default'].createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
18827
19102
  React__default['default'].createElement(CallAdapterProvider, { adapter: callAdapter },
18828
19103
  React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles$1 },
18829
- React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControls, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked }))))),
19104
+ React__default['default'].createElement(PreparedMoreDrawer, { callControls: props.callControls, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
19105
+ /* @conditional-compile-remove(PSTN-calls) */
19106
+ onClickShowDialpad: onClickShowDialpad }))))),
19107
+ /* @conditional-compile-remove(PSTN-calls) */
19108
+ showControlBar && showDtmfDialpad && (React__default['default'].createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
19109
+ React__default['default'].createElement(CallAdapterProvider, { adapter: callAdapter },
19110
+ React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles$1 },
19111
+ React__default['default'].createElement(SendDtmfDialpad, { isMobile: mobileView, strings: dialpadStrings, showDialpad: showDtmfDialpad, onDismissDialpad: onDismissDtmfDialpad }))))),
18830
19112
  // This layer host is for ModalLocalAndRemotePIP in CallWithChatPane. This LayerHost cannot be inside the CallWithChatPane
18831
19113
  // because when the CallWithChatPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging
18832
19114
  // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.
@@ -18844,7 +19126,10 @@ const CallWithChatComposite = (props) => {
18844
19126
  /* @conditional-compile-remove(file-sharing) */
18845
19127
  fileSharing: options === null || options === void 0 ? void 0 : options.fileSharing }))));
18846
19128
  };
18847
- const hasJoinedCallFn = (page, callStatus) => page === 'call' && callStatus === 'Connected';
19129
+ const hasJoinedCallFn = (page, callStatus) => {
19130
+ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */
19131
+ return (page === 'call' && callStatus === 'Connected') || (page === 'hold' && callStatus === 'LocalHold');
19132
+ };
18848
19133
  const showShowChatTabHeaderButton = (callControls) => {
18849
19134
  if (callControls === undefined || callControls === true) {
18850
19135
  return true;