@azure/communication-react 1.5.1-beta.2 → 1.5.1-beta.4

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 (330) hide show
  1. package/CHANGELOG.beta.md +56 -1
  2. package/CHANGELOG.json +494 -0
  3. package/README.md +1 -1
  4. package/dist/communication-react.d.ts +476 -254
  5. package/dist/dist-cjs/communication-react/index.js +5974 -4543
  6. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +13 -0
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +36 -0
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +49 -0
  13. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +53 -0
  14. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -0
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +12 -4
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +22 -32
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +3 -1
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +3 -0
  21. package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
  22. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  23. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +68 -22
  24. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  25. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +8 -3
  26. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +81 -30
  27. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  28. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +57 -0
  29. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  30. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -1
  31. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -21
  32. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  33. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +18 -0
  34. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +38 -0
  35. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -0
  36. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +6 -0
  37. package/dist/dist-esm/calling-stateful-client/src/Converter.js +17 -1
  38. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +0 -9
  40. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +3 -6
  41. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -1
  43. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +2 -25
  44. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  45. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +7 -0
  46. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +10 -0
  47. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  50. package/dist/dist-esm/calling-stateful-client/src/index.d.ts +1 -0
  51. package/dist/dist-esm/calling-stateful-client/src/index.js +2 -0
  52. package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
  53. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +58 -4
  54. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  55. package/dist/dist-esm/chat-component-bindings/src/utils/constants.d.ts +4 -0
  56. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js +4 -0
  57. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
  58. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +32 -26
  59. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  60. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +5 -1
  61. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  62. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +6 -1
  63. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  64. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
  65. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  66. package/dist/dist-esm/communication-react/src/index.d.ts +7 -2
  67. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +0 -4
  69. package/dist/dist-esm/react-components/src/components/CameraButton.js +0 -14
  70. package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/Caption.d.ts +21 -0
  72. package/dist/dist-esm/react-components/src/components/Caption.js +33 -0
  73. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -0
  74. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +1 -0
  75. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +32 -30
  76. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  77. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +37 -0
  78. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +88 -0
  79. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -0
  80. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +16 -1
  81. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +19 -16
  82. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  83. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +1 -1
  84. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +4 -2
  85. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +11 -1
  87. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +38 -20
  88. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +14 -2
  90. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +96 -11
  91. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +2 -0
  93. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -0
  94. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +13 -0
  96. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +5 -1
  97. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/GridLayout.js +1 -1
  99. package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
  100. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +36 -4
  101. package/dist/dist-esm/react-components/src/components/MessageThread.js +88 -42
  102. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  103. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +1 -1
  104. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +10 -2
  106. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +70 -0
  108. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +52 -0
  109. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -0
  110. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +1 -1
  111. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
  112. package/dist/dist-esm/react-components/src/components/index.d.ts +4 -1
  113. package/dist/dist-esm/react-components/src/components/index.js +7 -0
  114. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +33 -0
  116. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +60 -0
  117. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -0
  118. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.d.ts +34 -0
  119. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +86 -0
  120. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -0
  121. package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +14 -0
  122. package/dist/dist-esm/react-components/src/components/styles/Common.style.js +16 -0
  123. package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -0
  124. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +5 -0
  125. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +28 -0
  126. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +1 -0
  128. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +6 -4
  130. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +1 -1
  131. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/utils.d.ts +4 -0
  133. package/dist/dist-esm/react-components/src/components/utils.js +4 -0
  134. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/index.d.ts +2 -0
  136. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +3 -1
  138. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +3 -1
  139. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +5 -2
  140. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +3 -1
  141. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +3 -1
  142. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +3 -1
  143. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +3 -1
  144. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +3 -1
  145. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +3 -1
  146. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +3 -1
  147. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +3 -1
  148. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +3 -1
  149. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +3 -1
  150. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +3 -1
  151. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +1 -1
  152. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/theming/icons.d.ts +5 -1
  154. package/dist/dist-esm/react-components/src/theming/icons.js +18 -4
  155. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +48 -0
  157. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js +4 -0
  158. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -0
  159. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +21 -1
  160. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  161. package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
  162. package/dist/dist-esm/react-components/src/types/index.js +1 -0
  163. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  164. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +2 -9
  165. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  166. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +65 -0
  167. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  168. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +13 -4
  169. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +67 -30
  170. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  171. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +43 -32
  172. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  173. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
  174. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  175. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +95 -19
  176. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  177. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +1 -1
  178. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  179. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +3 -3
  180. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  181. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +5 -6
  182. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +1 -3
  183. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +9 -3
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +3 -1
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +1 -1
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +1 -1
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +1 -1
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +1 -1
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +13 -9
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +3 -3
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +17 -0
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +41 -0
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +5 -1
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +20 -0
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +4 -4
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.d.ts +20 -0
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js +21 -1
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +5 -87
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +15 -75
  217. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +11 -15
  218. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  219. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +12 -0
  220. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  221. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +17 -5
  222. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +51 -17
  223. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +24 -14
  225. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +5 -4
  227. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +15 -9
  228. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  229. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -0
  230. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +6 -0
  231. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  232. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js +4 -0
  233. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js.map +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -1
  237. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +19 -2
  239. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +68 -6
  240. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +4 -0
  242. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  243. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -0
  244. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  245. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +6 -0
  246. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +60 -0
  247. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -0
  248. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +12 -0
  249. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +107 -0
  250. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -0
  251. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +7 -0
  252. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +38 -0
  253. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -0
  254. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +30 -0
  255. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +286 -0
  256. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -0
  257. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/CustomButton.d.ts +19 -16
  258. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/CustomButton.js +4 -4
  259. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -0
  260. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/ControlBar}/DesktopMoreButton.d.ts +4 -2
  261. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +193 -0
  262. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -0
  263. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.d.ts +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.js +3 -3
  265. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -0
  266. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.d.ts +15 -2
  267. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.js +109 -5
  268. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -0
  269. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.d.ts +6 -0
  270. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js +24 -0
  271. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js.map +1 -0
  272. package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/Drawer}/PreparedMoreDrawer.d.ts +3 -2
  273. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js +26 -0
  274. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -0
  275. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.d.ts +20 -0
  276. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js +55 -0
  277. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js.map +1 -0
  278. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.d.ts +7 -0
  279. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js +25 -0
  280. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js.map +1 -0
  281. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
  282. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
  283. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +9 -0
  284. package/dist/dist-esm/react-composites/src/composites/common/constants.js +11 -0
  285. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -0
  286. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +7 -2
  287. package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -10
  288. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +165 -0
  290. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js +4 -0
  291. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -0
  292. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +4 -0
  293. package/dist/dist-esm/react-composites/src/composites/common/utils.js +4 -0
  294. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  295. package/dist/dist-esm/react-composites/src/composites/index.d.ts +3 -0
  296. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  297. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +66 -1
  298. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +66 -1
  299. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +66 -1
  300. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +66 -1
  301. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +66 -1
  302. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +66 -1
  303. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +66 -1
  304. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +66 -1
  305. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +66 -1
  306. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +66 -1
  307. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +66 -1
  308. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +66 -1
  309. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +66 -1
  310. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +66 -1
  311. package/package.json +14 -15
  312. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.d.ts +0 -29
  313. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +0 -54
  314. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +0 -1
  315. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +0 -13
  316. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +0 -35
  317. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js.map +0 -1
  318. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +0 -28
  319. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +0 -194
  320. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +0 -1
  321. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +0 -1
  322. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +0 -1
  323. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js +0 -22
  324. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +0 -1
  325. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +0 -86
  326. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +0 -1
  327. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +0 -1
  328. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +0 -11
  329. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +0 -19
  330. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +0 -1
@@ -6,5 +6,6 @@ export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator } from './Az
6
6
  export type { AzureCommunicationCallAdapterOptions } from './AzureCommunicationCallAdapter';
7
7
  export type { CallParticipantsLocator } from './AzureCommunicationCallAdapter';
8
8
  export type { CallAdapter, CommonCallAdapter, CallAdapterCallEndedEvent, CallAdapterCallManagement, CallAdapterCallOperations, CallAdapterClientState, CallAdapterDeviceManagement, CallAdapterState, CallAdapterSubscribers, CallAdapterUiState, CallCompositePage, CallEndedListener, CallIdChangedListener, DiagnosticChangedEventListner, DisplayNameChangedListener, IsLocalScreenSharingActiveChangedListener, IsMutedChangedListener, IsSpeakingChangedListener, MediaDiagnosticChangedEvent, NetworkDiagnosticChangedEvent, ParticipantsJoinedListener, ParticipantsLeftListener } from './CallAdapter';
9
+ export type { CaptionsReceivedListener, IsCaptionsActiveChangedListener } from './CallAdapter';
9
10
  export type { TeamsCallAdapter } from './CallAdapter';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,iCAAiC,CAAC;AAEzC,yDAAyD;AACzD,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,mBAAmB,EACpB,MAAM,iCAAiC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n createTeamsCallAdapter,\n createTeamsCallAdapterFromClient,\n useTeamsCallAdapter\n} from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapterArgs, TeamsAdapterOptions } from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { OnFetchProfileCallback, Profile } from './OnFetchProfileCallback';\nexport type { AzureCommunicationCallAdapterArgs, CallAdapterLocator } from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './AzureCommunicationCallAdapter';\n\nexport type {\n CallAdapter,\n CommonCallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterCallOperations,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener\n} from './CallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter } from './CallAdapter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,iCAAiC,CAAC;AAEzC,yDAAyD;AACzD,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,mBAAmB,EACpB,MAAM,iCAAiC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n createTeamsCallAdapter,\n createTeamsCallAdapterFromClient,\n useTeamsCallAdapter\n} from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapterArgs, TeamsAdapterOptions } from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { OnFetchProfileCallback, Profile } from './OnFetchProfileCallback';\nexport type { AzureCommunicationCallAdapterArgs, CallAdapterLocator } from './AzureCommunicationCallAdapter';\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './AzureCommunicationCallAdapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './AzureCommunicationCallAdapter';\n\nexport type {\n CallAdapter,\n CommonCallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterCallOperations,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener\n} from './CallAdapter';\n\n/* @conditional-compile-remove(close-captions) */\nexport type { CaptionsReceivedListener, IsCaptionsActiveChangedListener } from './CallAdapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter } from './CallAdapter';\n"]}
@@ -1,28 +1,42 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { mergeStyles, Stack } from '@fluentui/react';
4
+ import { _isInLobbyOrConnecting } from "../../../../../calling-component-bindings/src";
4
5
  import { _ComplianceBanner, _useContainerHeight, _useContainerWidth, ErrorBar, useTheme } from "../../../../../react-components/src";
5
6
  /* @conditional-compile-remove(rooms) */
6
7
  import { _usePermissions } from "../../../../../react-components/src";
7
- import React, { useMemo, useRef } from 'react';
8
- /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
8
+ import React, { useMemo, useRef, useState } from 'react';
9
9
  import { useCallback } from 'react';
10
+ /* @conditional-compile-remove(close-captions) */
11
+ import { CaptionsBanner } from '../../common/CaptionsBanner';
10
12
  import { containerDivStyles } from '../../common/ContainerRectProps';
11
13
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
12
14
  import { compositeMinWidthRem } from '../../common/styles/Composite.styles';
13
15
  import { useAdapter } from '../adapter/CallAdapterProvider';
14
16
  import { CallControls } from '../components/CallControls';
15
- /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
17
+ import { CommonCallControlBar } from '../../common/ControlBar/CommonCallControlBar';
16
18
  import { useSidePaneState } from '../hooks/useSidePaneState';
17
19
  import { callArrangementContainerStyles, callControlsContainerStyles, notificationsContainerStyles, containerStyleDesktop, containerStyleMobile, mediaGalleryContainerStyles, galleryParentContainerStyles, bannerNotificationStyles } from '../styles/CallPage.styles';
18
20
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
19
21
  import { CallPane } from './CallPane';
20
22
  import { MutedNotification } from './MutedNotification';
23
+ import { useSelector } from '../hooks/useSelector';
24
+ import { callStatusSelector } from '../selectors/callStatusSelector';
25
+ import { PreparedMoreDrawer } from '../../common/Drawer/PreparedMoreDrawer';
26
+ /* @conditional-compile-remove(PSTN-calls) */
27
+ import { SendDtmfDialpad } from '../../common/SendDtmfDialpad';
28
+ /* @conditional-compile-remove(PSTN-calls) */
29
+ import { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';
30
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
31
+ import { getPage } from '../selectors/baseSelectors';
32
+ /* @conditional-compile-remove(close-captions) */
33
+ import { getCallStatus, getIsTeamsCall } from '../selectors/baseSelectors';
34
+ import { drawerContainerStyles } from '../styles/CallComposite.styles';
21
35
  /**
22
36
  * @private
23
37
  */
24
38
  export const CallArrangement = (props) => {
25
- var _a, _b;
39
+ var _a, _b, _c, _d, _e;
26
40
  const containerClassName = useMemo(() => {
27
41
  return props.mobileView ? containerStyleMobile : containerStyleDesktop;
28
42
  }, [props.mobileView]);
@@ -31,10 +45,13 @@ export const CallArrangement = (props) => {
31
45
  const containerRef = useRef(null);
32
46
  const containerWidth = _useContainerWidth(containerRef);
33
47
  const containerHeight = _useContainerHeight(containerRef);
34
- /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
48
+ const isInLobby = _isInLobbyOrConnecting(useSelector(callStatusSelector).callStatus);
49
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
50
+ const isInLocalHold = useSelector(getPage) === 'hold';
35
51
  const adapter = useAdapter();
52
+ const { activePane, closePane,
36
53
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
37
- const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();
54
+ openPeoplePane, togglePeoplePane } = useSidePaneState();
38
55
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
39
56
  const isMobileWithActivePane = props.mobileView && activePane;
40
57
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
@@ -46,6 +63,39 @@ export const CallArrangement = (props) => {
46
63
  height: '100%'
47
64
  };
48
65
  }, [isMobileWithActivePane, props.mobileView]);
66
+ /* @conditional-compile-remove(PSTN-calls) */
67
+ const callWithChatStrings = useCallWithChatCompositeStrings();
68
+ /* @conditional-compile-remove(PSTN-calls) */
69
+ const dialpadStrings = useMemo(() => ({
70
+ dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,
71
+ dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
72
+ placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
73
+ }), [callWithChatStrings]);
74
+ const [showDrawer, setShowDrawer] = useState(false);
75
+ const onMoreButtonClicked = useCallback(() => {
76
+ closePane();
77
+ setShowDrawer(true);
78
+ }, [closePane]);
79
+ const closeDrawer = useCallback(() => {
80
+ setShowDrawer(false);
81
+ }, []);
82
+ const onMoreDrawerPeopleClicked = useCallback(() => {
83
+ setShowDrawer(false);
84
+ togglePeoplePane();
85
+ }, [togglePeoplePane]);
86
+ /* @conditional-compile-remove(PSTN-calls) */
87
+ const alternateCallerId = useAdapter().getState().alternateCallerId;
88
+ /* @conditional-compile-remove(PSTN-calls) */
89
+ const [showDtmfDialpad, setShowDtmfDialpad] = useState(false);
90
+ /* @conditional-compile-remove(PSTN-calls) */
91
+ const onDismissDtmfDialpad = () => {
92
+ setShowDtmfDialpad(false);
93
+ };
94
+ /* @conditional-compile-remove(PSTN-calls) */
95
+ const onClickShowDialpad = () => {
96
+ setShowDtmfDialpad(true);
97
+ };
98
+ const drawerContainerStylesValue = useMemo(() => drawerContainerStyles(10), []);
49
99
  // To be removed once feature is out of beta, replace with callCompositeContainerCSS
50
100
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
51
101
  const callCompositeContainerFlex = () => {
@@ -83,26 +133,47 @@ export const CallArrangement = (props) => {
83
133
  if (!rolePermissions.cameraButton && props.errorBarProps) {
84
134
  errorBarProps = Object.assign(Object.assign({}, props.errorBarProps), { activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari') });
85
135
  }
136
+ /* @conditional-compile-remove(close-captions) */
137
+ const isTeamsCall = useSelector(getIsTeamsCall);
138
+ /* @conditional-compile-remove(close-captions) */
139
+ const hasJoinedCall = useSelector(getCallStatus) === 'Connected';
86
140
  return (React.createElement("div", { ref: containerRef, className: mergeStyles(containerDivStyles), id: props.id },
87
141
  React.createElement(Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
88
142
  React.createElement(Stack, { grow: true, styles: callArrangementContainerStyles },
89
- React.createElement(Stack.Item, { styles: notificationsContainerStyles },
90
- React.createElement(Stack, { styles: bannerNotificationStyles },
91
- React.createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
92
- errorBarProps !== false && (React.createElement(Stack, { styles: bannerNotificationStyles },
93
- React.createElement(ErrorBar, Object.assign({}, errorBarProps)))),
94
- canUnmute && !!props.mutedNotificationProps && React.createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps))),
95
143
  ((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false &&
96
144
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
97
- !isMobileWithActivePane && (React.createElement(Stack.Item, { className: callControlsContainerStyles },
98
- React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
99
- /* @conditional-compile-remove(one-to-n-calling) */
100
- peopleButtonChecked: activePane === 'people',
101
- /* @conditional-compile-remove(one-to-n-calling) */
102
- onPeopleButtonClicked: togglePeoplePane })))),
145
+ !isMobileWithActivePane && (React.createElement(Stack.Item, { className: callControlsContainerStyles }, isLegacyCallControlEnabled((_c = props.callControlProps) === null || _c === void 0 ? void 0 : _c.options) ? (React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
146
+ /* @conditional-compile-remove(one-to-n-calling) */
147
+ peopleButtonChecked: activePane === 'people',
148
+ /* @conditional-compile-remove(one-to-n-calling) */
149
+ onPeopleButtonClicked: togglePeoplePane }))) : (React.createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked,
150
+ /* @conditional-compile-remove(close-captions) */
151
+ isCaptionsSupported: isTeamsCall && hasJoinedCall }))))),
152
+ ((_d = props.callControlProps) === null || _d === void 0 ? void 0 : _d.options) !== false && showDrawer && (React.createElement(Stack, { styles: drawerContainerStylesValue },
153
+ React.createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
154
+ /* @conditional-compile-remove(PSTN-calls) */
155
+ onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
156
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
157
+ disableButtonsForHoldScreen: isInLocalHold,
158
+ /* @conditional-compile-remove(close-captions) */
159
+ isCaptionsSupported: isTeamsCall && hasJoinedCall }))),
160
+ /* @conditional-compile-remove(PSTN-calls) */
161
+ ((_e = props.callControlProps) === null || _e === void 0 ? void 0 : _e.options) !== false && showDtmfDialpad && (React.createElement(Stack, { styles: drawerContainerStylesValue },
162
+ React.createElement(SendDtmfDialpad, { isMobile: props.mobileView, strings: dialpadStrings, showDialpad: showDtmfDialpad, onDismissDialpad: onDismissDtmfDialpad }))),
103
163
  React.createElement(Stack, { horizontal: true, grow: true },
104
164
  React.createElement(Stack.Item, { grow: true, style: callCompositeContainerFlex() },
105
- React.createElement(Stack.Item, { styles: callGalleryStyles, grow: true }, props.onRenderGalleryContent && (React.createElement(Stack, { verticalFill: true, styles: mediaGalleryContainerStyles }, props.onRenderGalleryContent())))),
165
+ React.createElement(Stack.Item, { styles: callGalleryStyles, grow: true },
166
+ React.createElement(Stack, { verticalFill: true, styles: mediaGalleryContainerStyles },
167
+ React.createElement(Stack.Item, { styles: notificationsContainerStyles },
168
+ React.createElement(Stack, { styles: bannerNotificationStyles },
169
+ React.createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
170
+ errorBarProps !== false && (React.createElement(Stack, { styles: bannerNotificationStyles },
171
+ React.createElement(ErrorBar, Object.assign({}, errorBarProps)))),
172
+ canUnmute && !!props.mutedNotificationProps && (React.createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps)))),
173
+ props.onRenderGalleryContent && props.onRenderGalleryContent(),
174
+ /* @conditional-compile-remove(close-captions) */
175
+ true &&
176
+ /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !isInLocalHold && (React.createElement(CaptionsBanner, { isMobile: props.mobileView }))))),
106
177
  /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
107
178
  callPaneContent())))));
108
179
  };
@@ -116,4 +187,9 @@ const showShowPeopleTabHeaderButton = (callControls) => {
116
187
  }
117
188
  return callControls.participantsButton !== false;
118
189
  };
190
+ const isLegacyCallControlEnabled = (options) => {
191
+ /* @conditional-compile-remove(new-call-control-bar) */
192
+ return !!options && options !== true && !!(options === null || options === void 0 ? void 0 : options.legacyControlBarExperience);
193
+ return true;
194
+ };
119
195
  //# sourceMappingURL=CallArrangement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,2FAA2F;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAqB,MAAM,4BAA4B,CAAC;AAC7E,2FAA2F;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2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AAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { compositeMinWidthRem } from '../../common/styles/Composite.styles';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callArrangementContainerStyles,\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n id?: string;\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return {\n display: isMobileWithActivePane ? 'none' : 'flex',\n minWidth: props.mobileView ? 'unset' : `${compositeMinWidthRem}rem`,\n width: '100%',\n height: '100%'\n };\n }, [isMobileWithActivePane, props.mobileView]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex', width: '100%', height: '100%' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)} id={props.id}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack grow styles={callArrangementContainerStyles}>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n <Stack horizontal grow>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallAr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AO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsBanner } from '../../common/CaptionsBanner';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { compositeMinWidthRem } from '../../common/styles/Composite.styles';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\nimport { CommonCallControlBar } from '../../common/ControlBar/CommonCallControlBar';\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callArrangementContainerStyles,\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\nimport { CallAdapter } from '../adapter';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { PreparedMoreDrawer } from '../../common/Drawer/PreparedMoreDrawer';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { getPage } from '../selectors/baseSelectors';\n/* @conditional-compile-remove(close-captions) */\nimport { getCallStatus, getIsTeamsCall } from '../selectors/baseSelectors';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n id?: string;\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n const isInLobby = _isInLobbyOrConnecting(useSelector(callStatusSelector).callStatus);\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const isInLocalHold = useSelector(getPage) === 'hold';\n\n const adapter = useAdapter();\n\n const {\n activePane,\n closePane,\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n openPeoplePane,\n togglePeoplePane\n } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return {\n display: isMobileWithActivePane ? 'none' : 'flex',\n minWidth: props.mobileView ? 'unset' : `${compositeMinWidthRem}rem`,\n width: '100%',\n height: '100%'\n };\n }, [isMobileWithActivePane, props.mobileView]);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const callWithChatStrings = useCallWithChatCompositeStrings();\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,\n placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText\n }),\n [callWithChatStrings]\n );\n\n const [showDrawer, setShowDrawer] = useState(false);\n const onMoreButtonClicked = useCallback(() => {\n closePane();\n setShowDrawer(true);\n }, [closePane]);\n const closeDrawer = useCallback(() => {\n setShowDrawer(false);\n }, []);\n const onMoreDrawerPeopleClicked = useCallback(() => {\n setShowDrawer(false);\n togglePeoplePane();\n }, [togglePeoplePane]);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDtmfDialpad, setShowDtmfDialpad] = useState(false);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDtmfDialpad = (): void => {\n setShowDtmfDialpad(false);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onClickShowDialpad = (): void => {\n setShowDtmfDialpad(true);\n };\n\n const drawerContainerStylesValue = useMemo(() => drawerContainerStyles(10), []);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex', width: '100%', height: '100%' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n /* @conditional-compile-remove(close-captions) */\n const isTeamsCall = useSelector(getIsTeamsCall);\n /* @conditional-compile-remove(close-captions) */\n const hasJoinedCall = useSelector(getCallStatus) === 'Connected';\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)} id={props.id}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack grow styles={callArrangementContainerStyles}>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n {isLegacyCallControlEnabled(props.callControlProps?.options) ? (\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n ) : (\n <CommonCallControlBar\n {...props.callControlProps}\n callControls={props.callControlProps.options}\n callAdapter={adapter as CallAdapter}\n mobileView={props.mobileView}\n disableButtonsForLobbyPage={isInLobby}\n peopleButtonChecked={activePane === 'people'}\n onPeopleButtonClicked={togglePeoplePane}\n onMoreButtonClicked={onMoreButtonClicked}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={isTeamsCall && hasJoinedCall}\n />\n )}\n </Stack.Item>\n )}\n {props.callControlProps?.options !== false && showDrawer && (\n <Stack styles={drawerContainerStylesValue}>\n <PreparedMoreDrawer\n callControls={props.callControlProps.options}\n onLightDismiss={closeDrawer}\n onPeopleButtonClicked={onMoreDrawerPeopleClicked}\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={alternateCallerId ? onClickShowDialpad : undefined}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disableButtonsForHoldScreen={isInLocalHold}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={isTeamsCall && hasJoinedCall}\n />\n </Stack>\n )}\n\n {\n /* @conditional-compile-remove(PSTN-calls) */\n props.callControlProps?.options !== false && showDtmfDialpad && (\n <Stack styles={drawerContainerStylesValue}>\n <SendDtmfDialpad\n isMobile={props.mobileView}\n strings={dialpadStrings}\n showDialpad={showDtmfDialpad}\n onDismissDialpad={onDismissDtmfDialpad}\n />\n </Stack>\n )\n }\n <Stack horizontal grow>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && (\n <MutedNotification {...props.mutedNotificationProps} />\n )}\n </Stack.Item>\n {props.onRenderGalleryContent && props.onRenderGalleryContent()}\n {\n /* @conditional-compile-remove(close-captions) */\n true &&\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !isInLocalHold && (\n <CaptionsBanner isMobile={props.mobileView} />\n )\n }\n </Stack>\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CommonCallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\nconst isLegacyCallControlEnabled = (options?: boolean | CallControlOptions): boolean => {\n /* @conditional-compile-remove(new-call-control-bar) */\n return !!options && options !== true && !!options?.legacyControlBarExperience;\n return true;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
@@ -153,7 +153,7 @@ export const CallControls = (props) => {
153
153
  React.createElement(People, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })),
154
154
  isEnabled(options === null || options === void 0 ? void 0 : options.devicesButton) && (React.createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.devicesButton) })),
155
155
  /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
156
- isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonContextualMenuItems().length > 0 && (React.createElement(MoreButton, { strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
156
+ isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonContextualMenuItems().length > 0 && (React.createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
157
157
  customButtons['primary'],
158
158
  isEnabled(options === null || options === void 0 ? void 0 : options.endCallButton) && React.createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
159
159
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uC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xF,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,oBAAC,OAAO,IAAC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,GAAI,CACzE,CACF,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,EAAE;IACjD,wCAAwC;IACxC,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;IAC1C,wCAAwC;IACxC,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;IAE9B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n if (!isRoomsCallTrampoline()) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAgC,4CAAmC;AACtF,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,+DAA+D;AAC/D,OAAO,EAAE,+BAA+B,EA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AAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n if (!isRoomsCallTrampoline()) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
@@ -21,7 +21,7 @@ import { getLocalMicrophoneEnabled } from '../selectors/baseSelectors';
21
21
  import { devicePermissionSelector } from '../selectors/devicePermissionSelector';
22
22
  import { localPreviewSelector } from '../selectors/localPreviewSelector';
23
23
  import { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';
24
- import { cameraOffLabelStyle, localPreviewContainerStyleDesktop, localPreviewContainerStyleMobile, localPreviewTileStyle } from '../styles/LocalPreview.styles';
24
+ import { cameraOffLabelStyle, localPreviewButtonStyle, localPreviewContainerStyleDesktop, localPreviewContainerStyleMobile, localPreviewTileStyle } from '../styles/LocalPreview.styles';
25
25
  /**
26
26
  * @private
27
27
  */
@@ -59,8 +59,8 @@ export const LocalPreview = (props) => {
59
59
  return (React.createElement(Stack, { "data-ui-id": "call-composite-local-preview", className: props.mobileView ? localPreviewContainerStyleMobile : localPreviewContainerStyleDesktop },
60
60
  React.createElement(VideoTile, { styles: localPreviewTileStyle, renderElement: (localPreviewProps === null || localPreviewProps === void 0 ? void 0 : localPreviewProps.videoStreamElement) ? (React.createElement(StreamMedia, { videoStreamElement: localPreviewProps.videoStreamElement })) : undefined, onRenderPlaceholder: onRenderPlaceholder },
61
61
  React.createElement(ControlBar, { layout: "floatingBottom" },
62
- React.createElement(MicrophoneButton, { "data-ui-id": "call-composite-local-device-settings-microphone-button", checked: isLocalMicrophoneEnabled, onToggleMicrophone: onToggleMic, disabled: !microphonePermissionGranted || !hasMicrophones, showLabel: true }),
63
- React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-local-device-settings-camera-button" }, cameraButtonProps, { showLabel: true, disabled: !cameraPermissionGranted || !hasCameras })),
62
+ React.createElement(MicrophoneButton, { "data-ui-id": "call-composite-local-device-settings-microphone-button", checked: isLocalMicrophoneEnabled, onToggleMicrophone: onToggleMic, disabled: !microphonePermissionGranted || !hasMicrophones, showLabel: true, styles: localPreviewButtonStyle }),
63
+ React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-local-device-settings-camera-button" }, cameraButtonProps, { showLabel: true, disabled: !cameraPermissionGranted || !hasCameras, styles: localPreviewButtonStyle })),
64
64
  props.showDevicesButton && (React.createElement(DevicesButton, Object.assign({ "data-ui-id": "call-composite-local-device-settings-options-button" }, devicesButtonProps, {
65
65
  // disable button whilst all other buttons are disabled
66
66
  disabled: !microphonePermissionGranted || !cameraPermissionGranted || hasNoDevices, showLabel: true, styles: devicesButtonStyles })))))));
@@ -1 +1 @@
1
- {"version":3,"file":"LocalPreview.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/LocalPreview.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAAS,EACV,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,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AAa,EACX,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,kBAAkB,EAAC,CAAC,CAAC,CACtC,oBAAC,WAAW,IAAC,kBAAkB,EAAE,iBAAiB,CAAC,kBAAkB,GAAI,CAC1E,CAAC,CAAC,CAAC,SAAS,EAEf,mBAAmB,EAAE,mBAAmB;YAExC,oBAAC,UAAU,IAAC,MAAM,EAAC,gBAAgB;gBACjC,oBAAC,gBAAgB,kBACJ,wDAAwD,EACnE,OAAO,EAAE,wBAAwB,EACjC,kBAAkB,EAAE,WAAW,EAC/B,QAAQ,EAAE,CAAC,2BAA2B,IAAI,CAAC,cAAc,EACzD,SAAS,EAAE,IAAI,GACf;gBACF,oBAAC,YAAY,gCACA,oDAAoD,IAC3D,iBAAiB,IACrB,SAAS,EAAE,IAAI,EACf,QAAQ,EAAE,CAAC,uBAAuB,IAAI,CAAC,UAAU,IACjD;gBACD,KAAK,CAAC,iBAAiB,IAAI,CAC1B,oBAAC,aAAa,gCACD,qDAAqD,IAC5D,kBAAkB;oBACtB,uDAAuD;oBACvD,QAAQ,EAAE,CAAC,2BAA2B,IAAI,CAAC,uBAAuB,IAAI,YAAY,EAClF,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,mBAAmB,IAC3B,CACH,CACU,CACH,CACN,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack, Text } from '@fluentui/react';\nimport {\n CameraButton,\n ControlBar,\n MicrophoneButton,\n DevicesButton,\n StreamMedia,\n useTheme,\n VideoTile\n} from '@internal/react-components';\nimport React, { useCallback } from 'react';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { getLocalMicrophoneEnabled } from '../selectors/baseSelectors';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { localPreviewSelector } from '../selectors/localPreviewSelector';\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\nimport {\n cameraOffLabelStyle,\n localPreviewContainerStyleDesktop,\n localPreviewContainerStyleMobile,\n localPreviewTileStyle\n} from '../styles/LocalPreview.styles';\n\n/**\n * @private\n */\nexport interface LocalPreviewProps {\n mobileView: boolean;\n showDevicesButton: boolean;\n}\n\n/**\n * @private\n */\nexport const LocalPreview = (props: LocalPreviewProps): JSX.Element => {\n const locale = useLocale();\n const cameraButtonProps = usePropsFor(CameraButton);\n const localPreviewProps = useSelector(localPreviewSelector);\n const devicesButtonProps = usePropsFor(DevicesButton);\n const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector(devicePermissionSelector);\n\n const isLocalMicrophoneEnabled = useSelector(getLocalMicrophoneEnabled);\n const adapter = useAdapter();\n\n const onToggleMic = useCallback(async () => {\n isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();\n }, [adapter, isLocalMicrophoneEnabled]);\n\n const hasNoDevices =\n devicesButtonProps.cameras.length === 0 &&\n devicesButtonProps.microphones.length === 0 &&\n devicesButtonProps.speakers.length === 0;\n\n const hasCameras = devicesButtonProps.cameras.length > 0;\n const hasMicrophones = devicesButtonProps.microphones.length > 0;\n\n const theme = useTheme();\n const onRenderPlaceholder = useCallback((): JSX.Element => {\n return (\n <Stack\n className={mergeStyles({ width: '100%', height: '100%' })}\n verticalAlign=\"center\"\n tokens={{ childrenGap: '0.25rem' }}\n >\n <Stack.Item align=\"center\">\n <CallCompositeIcon\n iconName=\"LocalPreviewPlaceholder\"\n className={mergeStyles(cameraOffLabelStyle, { color: theme.palette.neutralTertiary })}\n />\n </Stack.Item>\n <Stack.Item align=\"center\">\n <Text className={mergeStyles(cameraOffLabelStyle, { color: theme.palette.neutralSecondary })}>\n {locale.strings.call.cameraTurnedOff}\n </Text>\n </Stack.Item>\n </Stack>\n );\n }, [theme, locale.strings.call.cameraTurnedOff]);\n\n const devicesButtonStyles = props.mobileView\n ? {\n menuStyles: {\n menuItemStyles: buttonFlyoutIncreasedSizeStyles\n }\n }\n : undefined;\n\n return (\n <Stack\n data-ui-id=\"call-composite-local-preview\"\n className={props.mobileView ? localPreviewContainerStyleMobile : localPreviewContainerStyleDesktop}\n >\n <VideoTile\n styles={localPreviewTileStyle}\n renderElement={\n localPreviewProps?.videoStreamElement ? (\n <StreamMedia videoStreamElement={localPreviewProps.videoStreamElement} />\n ) : undefined\n }\n onRenderPlaceholder={onRenderPlaceholder}\n >\n <ControlBar layout=\"floatingBottom\">\n <MicrophoneButton\n data-ui-id=\"call-composite-local-device-settings-microphone-button\"\n checked={isLocalMicrophoneEnabled}\n onToggleMicrophone={onToggleMic}\n disabled={!microphonePermissionGranted || !hasMicrophones}\n showLabel={true}\n />\n <CameraButton\n data-ui-id=\"call-composite-local-device-settings-camera-button\"\n {...cameraButtonProps}\n showLabel={true}\n disabled={!cameraPermissionGranted || !hasCameras}\n />\n {props.showDevicesButton && (\n <DevicesButton\n data-ui-id=\"call-composite-local-device-settings-options-button\"\n {...devicesButtonProps}\n // disable button whilst all other buttons are disabled\n disabled={!microphonePermissionGranted || !cameraPermissionGranted || hasNoDevices}\n showLabel={true}\n styles={devicesButtonStyles}\n />\n )}\n </ControlBar>\n </VideoTile>\n </Stack>\n );\n};\n\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"LocalPreview.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/LocalPreview.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,QAAQ,EACR,SAAS,EACV,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,WAAW,E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,IAC3B,CACH,CACU,CACH,CACN,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack, Text } from '@fluentui/react';\nimport {\n CameraButton,\n ControlBar,\n MicrophoneButton,\n DevicesButton,\n StreamMedia,\n useTheme,\n VideoTile\n} from '@internal/react-components';\nimport React, { useCallback } from 'react';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { getLocalMicrophoneEnabled } from '../selectors/baseSelectors';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { localPreviewSelector } from '../selectors/localPreviewSelector';\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\nimport {\n cameraOffLabelStyle,\n localPreviewButtonStyle,\n localPreviewContainerStyleDesktop,\n localPreviewContainerStyleMobile,\n localPreviewTileStyle\n} from '../styles/LocalPreview.styles';\n\n/**\n * @private\n */\nexport interface LocalPreviewProps {\n mobileView: boolean;\n showDevicesButton: boolean;\n}\n\n/**\n * @private\n */\nexport const LocalPreview = (props: LocalPreviewProps): JSX.Element => {\n const locale = useLocale();\n const cameraButtonProps = usePropsFor(CameraButton);\n const localPreviewProps = useSelector(localPreviewSelector);\n const devicesButtonProps = usePropsFor(DevicesButton);\n const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector(devicePermissionSelector);\n\n const isLocalMicrophoneEnabled = useSelector(getLocalMicrophoneEnabled);\n const adapter = useAdapter();\n\n const onToggleMic = useCallback(async () => {\n isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();\n }, [adapter, isLocalMicrophoneEnabled]);\n\n const hasNoDevices =\n devicesButtonProps.cameras.length === 0 &&\n devicesButtonProps.microphones.length === 0 &&\n devicesButtonProps.speakers.length === 0;\n\n const hasCameras = devicesButtonProps.cameras.length > 0;\n const hasMicrophones = devicesButtonProps.microphones.length > 0;\n\n const theme = useTheme();\n const onRenderPlaceholder = useCallback((): JSX.Element => {\n return (\n <Stack\n className={mergeStyles({ width: '100%', height: '100%' })}\n verticalAlign=\"center\"\n tokens={{ childrenGap: '0.25rem' }}\n >\n <Stack.Item align=\"center\">\n <CallCompositeIcon\n iconName=\"LocalPreviewPlaceholder\"\n className={mergeStyles(cameraOffLabelStyle, { color: theme.palette.neutralTertiary })}\n />\n </Stack.Item>\n <Stack.Item align=\"center\">\n <Text className={mergeStyles(cameraOffLabelStyle, { color: theme.palette.neutralSecondary })}>\n {locale.strings.call.cameraTurnedOff}\n </Text>\n </Stack.Item>\n </Stack>\n );\n }, [theme, locale.strings.call.cameraTurnedOff]);\n\n const devicesButtonStyles = props.mobileView\n ? {\n menuStyles: {\n menuItemStyles: buttonFlyoutIncreasedSizeStyles\n }\n }\n : undefined;\n\n return (\n <Stack\n data-ui-id=\"call-composite-local-preview\"\n className={props.mobileView ? localPreviewContainerStyleMobile : localPreviewContainerStyleDesktop}\n >\n <VideoTile\n styles={localPreviewTileStyle}\n renderElement={\n localPreviewProps?.videoStreamElement ? (\n <StreamMedia videoStreamElement={localPreviewProps.videoStreamElement} />\n ) : undefined\n }\n onRenderPlaceholder={onRenderPlaceholder}\n >\n <ControlBar layout=\"floatingBottom\">\n <MicrophoneButton\n data-ui-id=\"call-composite-local-device-settings-microphone-button\"\n checked={isLocalMicrophoneEnabled}\n onToggleMicrophone={onToggleMic}\n disabled={!microphonePermissionGranted || !hasMicrophones}\n showLabel={true}\n styles={localPreviewButtonStyle}\n />\n <CameraButton\n data-ui-id=\"call-composite-local-device-settings-camera-button\"\n {...cameraButtonProps}\n showLabel={true}\n disabled={!cameraPermissionGranted || !hasCameras}\n styles={localPreviewButtonStyle}\n />\n {props.showDevicesButton && (\n <DevicesButton\n data-ui-id=\"call-composite-local-device-settings-options-button\"\n {...devicesButtonProps}\n // disable button whilst all other buttons are disabled\n disabled={!microphonePermissionGranted || !cameraPermissionGranted || hasNoDevices}\n showLabel={true}\n styles={devicesButtonStyles}\n />\n )}\n </ControlBar>\n </VideoTile>\n </Stack>\n );\n};\n\"../../../../../react-components/src\""]}
@@ -1,14 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { ControlBarButtonStyles } from "../../../../../../react-components/src";
3
- import { CallControlDisplayType } from '../../types/CallControlOptions';
3
+ import { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';
4
4
  /**
5
5
  * @private
6
6
  */
7
7
  export declare const Camera: (props: {
8
- displayType?: CallControlDisplayType | undefined;
9
- styles?: import("@fluentui/react").IButtonStyles | undefined;
10
- splitButtonsForDeviceSelection?: boolean | undefined;
11
- disabled?: boolean | undefined;
12
- onShowVideoEffectsPicker?: ((showVideoEffectsOptions: boolean) => void) | undefined;
8
+ displayType?: CallControlDisplayType;
9
+ styles?: ControlBarButtonStyles;
10
+ splitButtonsForDeviceSelection?: boolean;
11
+ disabled?: boolean;
13
12
  }) => JSX.Element;
14
13
  //# sourceMappingURL=Camera.d.ts.map
@@ -10,8 +10,6 @@ import { concatButtonBaseStyles } from '../../styles/Buttons.styles';
10
10
  export const Camera = (props) => {
11
11
  const cameraButtonProps = usePropsFor(CameraButton);
12
12
  const styles = useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
13
- return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: cameraButtonProps.disabled || props.disabled,
14
- /* @conditional-compile-remove(video-background-effects) */
15
- onShowVideoEffectsPicker: props.onShowVideoEffectsPicker })));
13
+ return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: cameraButtonProps.disabled || props.disabled })));
16
14
  };
17
15
  //# sourceMappingURL=Camera.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Camera.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAA0B,+CAAmC;AAClF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAOtB,EAAe,EAAE;IAChB,MAAM,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,sBAAsB,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAA,EAAA,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,OAAO,CACL,oBAAC,YAAY,gCACA,8BAA8B,IACrC,iBAAiB,IACrB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,EACd,yBAAyB,EAAE,KAAK,CAAC,8BAA8B,EAC/D,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ;QACtD,2DAA2D;QAC3D,wBAAwB,EAAE,KAAK,CAAC,wBAAwB,IACxD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CameraButton, ControlBarButtonStyles } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { CallControlDisplayType } from '../../types/CallControlOptions';\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\n\n/**\n * @private\n */\nexport const Camera = (props: {\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n splitButtonsForDeviceSelection?: boolean;\n disabled?: boolean;\n /* @conditional-compile-remove(video-background-effects) */\n onShowVideoEffectsPicker?: (showVideoEffectsOptions: boolean) => void;\n}): JSX.Element => {\n const cameraButtonProps = usePropsFor(CameraButton);\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n return (\n <CameraButton\n data-ui-id=\"call-composite-camera-button\"\n {...cameraButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n enableDeviceSelectionMenu={props.splitButtonsForDeviceSelection}\n disabled={cameraButtonProps.disabled || props.disabled}\n /* @conditional-compile-remove(video-background-effects) */\n onShowVideoEffectsPicker={props.onShowVideoEffectsPicker}\n />\n );\n};\n\"../../../../../../react-components/src\""]}
1
+ {"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Camera.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAA0B,+CAAmC;AAClF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAKtB,EAAe,EAAE;IAChB,MAAM,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,sBAAsB,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAA,EAAA,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,OAAO,CACL,oBAAC,YAAY,gCACA,8BAA8B,IACrC,iBAAiB,IACrB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,EACd,yBAAyB,EAAE,KAAK,CAAC,8BAA8B,EAC/D,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,IACtD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CameraButton, ControlBarButtonStyles } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\n\n/**\n * @private\n */\nexport const Camera = (props: {\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n splitButtonsForDeviceSelection?: boolean;\n disabled?: boolean;\n}): JSX.Element => {\n const cameraButtonProps = usePropsFor(CameraButton);\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n return (\n <CameraButton\n data-ui-id=\"call-composite-camera-button\"\n {...cameraButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n enableDeviceSelectionMenu={props.splitButtonsForDeviceSelection}\n disabled={cameraButtonProps.disabled || props.disabled}\n />\n );\n};\n\"../../../../../../react-components/src\""]}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { CallControlDisplayType, CustomCallControlButtonCallback, CustomCallControlButtonPlacement } from '../../types/CallControlOptions';
3
- import { CallControlOptions } from '../../types/CallControlOptions';
2
+ import { CustomCallControlButtonCallback, CustomCallControlButtonPlacement } from '../../../common/ControlBar/CustomButton';
3
+ import { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';
4
4
  /** @private */
5
5
  export declare type CustomButtons = {
6
6
  [key in CustomCallControlButtonPlacement]: JSX.Element | undefined;
@@ -8,5 +8,11 @@ export declare type CustomButtons = {
8
8
  /** @private */
9
9
  export declare const generateCustomControlBarButtons: (onFetchCustomButtonProps?: CustomCallControlButtonCallback[] | undefined, displayType?: CallControlDisplayType | undefined) => CustomButtons;
10
10
  /** @private */
11
- export declare const onFetchCustomButtonPropsTrampoline: (options?: CallControlOptions | undefined) => CustomCallControlButtonCallback[] | undefined;
11
+ export declare const onFetchCustomButtonPropsTrampoline: (options?: (import("../../../common/types/CommonCallControlOptions").CommonCallControlOptions & {
12
+ participantsButton?: boolean | {
13
+ disabled: boolean;
14
+ } | undefined;
15
+ /** @private */
16
+ legacyControlBarExperience?: boolean | undefined;
17
+ }) | undefined) => CustomCallControlButtonCallback[] | undefined;
12
18
  //# sourceMappingURL=Custom.d.ts.map
@@ -7,7 +7,9 @@ import React from 'react';
7
7
  /** @private */
8
8
  export const generateCustomControlBarButtons = (onFetchCustomButtonProps, displayType) => {
9
9
  const response = {
10
- primary: undefined
10
+ primary: undefined,
11
+ overflow: undefined,
12
+ secondary: undefined
11
13
  };
12
14
  if (!onFetchCustomButtonProps) {
13
15
  return response;
@@ -1 +1 @@
1
- {"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Custom.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAwB,+CAAmC;AACpF,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAe;AACf,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC7C,wBAA4D,EAC5D,WAAoC,EACrB,EAAE;IACjB,MAAM,QAAQ,GAAG;QACf,OAAO,EAAE,SAAS;KACnB,CAAC;IAEF,IAAI,CAAC,wBAAwB,EAAE;QAC7B,OAAO,QAAQ,CAAC;KACjB;IAED,MAAM,cAAc,GAAG,wBAAwB,CAAC,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yright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line no-restricted-imports\nimport { Icon } from '@fluentui/react';\nimport { ControlBarButton, _DrawerMenuItemProps } from '@internal/react-components';\nimport React from 'react';\nimport {\n CallControlDisplayType,\n CustomCallControlButtonCallback,\n CustomCallControlButtonPlacement\n} from '../../types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CallControlOptions } from '../../types/CallControlOptions';\n\n/** @private */\nexport type CustomButtons = { [key in CustomCallControlButtonPlacement]: JSX.Element | undefined };\n\n/** @private */\nexport const generateCustomControlBarButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const response = {\n primary: undefined\n };\n\n if (!onFetchCustomButtonProps) {\n return response;\n }\n\n const allButtonProps = onFetchCustomButtonProps.map((f) => f({ displayType }));\n\n for (const key in response) {\n response[key] = (\n <>\n {allButtonProps\n .filter((buttonProps) => buttonProps.placement === key)\n .map((buttonProps, i) => (\n <ControlBarButton\n ariaDescription={buttonProps.ariaDescription}\n ariaLabel={buttonProps.ariaLabel}\n disabled={buttonProps.disabled}\n id={buttonProps.id}\n key={buttonProps.key ?? `${buttonProps.placement}_${i}`}\n onClick={buttonProps.onItemClick}\n onRenderIcon={() => <Icon iconName={buttonProps.iconName ?? 'ControlButtonOptions'} />}\n showLabel={buttonProps.showLabel}\n text={buttonProps.text}\n styles={buttonProps.styles}\n />\n ))}\n </>\n );\n }\n return response;\n};\n\n/* @conditional-compile-remove(control-bar-button-injection) */\n/** @private */\nexport const onFetchCustomButtonPropsTrampoline = (\n options?: CallControlOptions\n): CustomCallControlButtonCallback[] | undefined => {\n let response: CustomCallControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n\"../../../../../../react-components/src\""]}
1
+ {"version":3,"file":"Custom.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Custom.tsx"],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AI,sBAAsB,GAAI,CAAA,EAAA,EACtF,SAAS,EAAE,WAAW,CAAC,SAAS,EAChC,IAAI,EAAE,WAAW,CAAC,IAAI,EACtB,MAAM,EAAE,WAAW,CAAC,MAAM,GAC1B,CACH,CAAA;SAAA,CAAC,CACH,CACJ,CAAC;KACH;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,+DAA+D;AAC/D,eAAe;AACf,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,OAA4B,EACmB,EAAE;IACjD,IAAI,QAAQ,GAAkD,SAAS,CAAC;IACxE,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,wBAAwB,CAAC;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line no-restricted-imports\nimport { Icon } from '@fluentui/react';\nimport { ControlBarButton, _DrawerMenuItemProps } from '@internal/react-components';\nimport React from 'react';\nimport {\n CustomCallControlButtonCallback,\n CustomCallControlButtonPlacement\n} from '../../../common/ControlBar/CustomButton';\nimport { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CallControlOptions } from '../../types/CallControlOptions';\n\n/** @private */\nexport type CustomButtons = { [key in CustomCallControlButtonPlacement]: JSX.Element | undefined };\n\n/** @private */\nexport const generateCustomControlBarButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const response = {\n primary: undefined,\n overflow: undefined,\n secondary: undefined\n };\n\n if (!onFetchCustomButtonProps) {\n return response;\n }\n\n const allButtonProps = onFetchCustomButtonProps.map((f) => f({ displayType }));\n\n for (const key in response) {\n response[key] = (\n <>\n {allButtonProps\n .filter((buttonProps) => buttonProps.placement === key)\n .map((buttonProps, i) => (\n <ControlBarButton\n ariaDescription={buttonProps.ariaDescription}\n ariaLabel={buttonProps.ariaLabel}\n disabled={buttonProps.disabled}\n id={buttonProps.id}\n key={buttonProps.key ?? `${buttonProps.placement}_${i}`}\n onClick={buttonProps.onItemClick}\n onRenderIcon={() => <Icon iconName={buttonProps.iconName ?? 'ControlButtonOptions'} />}\n showLabel={buttonProps.showLabel}\n text={buttonProps.text}\n styles={buttonProps.styles}\n />\n ))}\n </>\n );\n }\n return response;\n};\n\n/* @conditional-compile-remove(control-bar-button-injection) */\n/** @private */\nexport const onFetchCustomButtonPropsTrampoline = (\n options?: CallControlOptions\n): CustomCallControlButtonCallback[] | undefined => {\n let response: CustomCallControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n\"../../../../../../react-components/src\""]}