@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
@@ -1,103 +1,21 @@
1
1
  import { BaseCustomStyles, ControlBarButtonStyles } from "../../../../../react-components/src";
2
- /**
3
- * Control bar display type for {@link CallComposite}.
4
- *
5
- * @public
6
- */
7
- export declare type CallControlDisplayType = 'default' | 'compact';
2
+ import { CustomCallControlButtonPlacement } from '../../common/ControlBar/CustomButton';
3
+ import { CallControlDisplayType, CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';
8
4
  /**
9
5
  * Customization options for the control bar in calling experience.
10
6
  *
11
7
  * @public
12
8
  */
13
- export declare type CallControlOptions = {
14
- /**
15
- * {@link CallControlDisplayType} to change how the call controls are displayed.
16
- * `'compact'` display type will decreases the size of buttons and hide the labels.
17
- *
18
- * @remarks
19
- * If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.
20
- *
21
- * @defaultValue 'default'
22
- */
23
- displayType?: CallControlDisplayType;
24
- /**
25
- * Show or Hide Camera Button during a call
26
- * @defaultValue true
27
- */
28
- cameraButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
29
- disabled: boolean;
30
- };
31
- /**
32
- * Show or Hide EndCall button during a call.
33
- * @defaultValue true
34
- */
35
- endCallButton?: boolean;
36
- /**
37
- * Show or Hide Microphone button during a call.
38
- * @defaultValue true
39
- */
40
- microphoneButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
41
- disabled: boolean;
42
- };
43
- /**
44
- * Show or Hide Devices button during a call.
45
- * @defaultValue true
46
- */
47
- devicesButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
48
- disabled: boolean;
49
- };
9
+ export declare type CallControlOptions = CommonCallControlOptions & {
50
10
  /**
51
- * Show, Hide or Disable participants button during a call.
11
+ * Show, Hide or Disable participants button during a call. This is the option only work for legacyControl bar.
52
12
  * @defaultValue true
53
13
  */
54
14
  participantsButton?: boolean | {
55
15
  disabled: boolean;
56
16
  };
57
- /**
58
- * Show, Hide or Disable the screen share button during a call.
59
- * @defaultValue true
60
- */
61
- screenShareButton?: boolean | {
62
- disabled: boolean;
63
- };
64
- /**
65
- * Show, Hide or disable the more button during a call.
66
- * @defaultValue true
67
- */
68
- moreButton?: boolean;
69
- /**
70
- * Inject custom buttons in the call controls.
71
- *
72
- * @beta
73
- */
74
- onFetchCustomButtonProps?: CustomCallControlButtonCallback[];
75
- holdButton?: boolean | {
76
- disabled: boolean;
77
- };
17
+ legacyControlBarExperience?: boolean;
78
18
  };
79
- /**
80
- * Placement for a custom button injected in the {@link CallControls}.
81
- *
82
- * 'primary': Place the button(s) on the right end of the center control bar but before the EndCallButton (left end in rtl mode).
83
- *
84
- * Multiple buttons assigned the same placement are appended in order.
85
- * E.g., if two buttons are placed in 'primary', they'll both appear on the right end (left end in rtl mode)
86
- * before the EndCallButton in the order provided.
87
- *
88
- * @beta
89
- */
90
- export declare type CustomCallControlButtonPlacement = 'primary';
91
- /**
92
- * A callback that returns the props to render a custom {@link ControlBarButton}.
93
- *
94
- * The response indicates where the custom button should be placed.
95
- *
96
- * Performance tip: This callback is only called when either the callback or its arguments change.
97
- *
98
- * @beta
99
- */
100
- export declare type CustomCallControlButtonCallback = (args: CustomCallControlButtonCallbackArgs) => CustomCallControlButtonProps;
101
19
  /**
102
20
  * Arguments for {@link CustomCallControlButtonCallback}.
103
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"CallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/types/CallControlOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\n\n/**\n * Control bar display type for {@link CallComposite}.\n *\n * @public\n */\nexport type CallControlDisplayType = 'default' | 'compact';\n\n/**\n * Customization options for the control bar in calling experience.\n *\n * @public\n */\nexport type CallControlOptions = {\n /**\n * {@link CallControlDisplayType} to change how the call controls are displayed.\n * `'compact'` display type will decreases the size of buttons and hide the labels.\n *\n * @remarks\n * If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.\n *\n * @defaultValue 'default'\n */\n displayType?: CallControlDisplayType;\n /**\n * Show or Hide Camera Button during a call\n * @defaultValue true\n */\n cameraButton?:\n | boolean\n | /* @conditional-compile-remove(PSTN-calls) */ {\n disabled: boolean;\n };\n /**\n * Show or Hide EndCall button during a call.\n * @defaultValue true\n */\n endCallButton?: boolean;\n /**\n * Show or Hide Microphone button during a call.\n * @defaultValue true\n */\n microphoneButton?:\n | boolean\n | /* @conditional-compile-remove(PSTN-calls) */ {\n disabled: boolean;\n };\n /**\n * Show or Hide Devices button during a call.\n * @defaultValue true\n */\n devicesButton?:\n | boolean\n | /* @conditional-compile-remove(PSTN-calls) */ {\n disabled: boolean;\n };\n /**\n * Show, Hide or Disable participants button during a call.\n * @defaultValue true\n */\n participantsButton?: boolean | { disabled: boolean };\n /**\n * Show, Hide or Disable the screen share button during a call.\n * @defaultValue true\n */\n screenShareButton?: boolean | { disabled: boolean };\n /* @conditional-compile-remove(PSTN-calls) */\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Show, Hide or disable the more button during a call.\n * @defaultValue true\n */\n moreButton?: boolean;\n /* @conditional-compile-remove(control-bar-button-injection) */\n /**\n * Inject custom buttons in the call controls.\n *\n * @beta\n */\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[];\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n holdButton?: boolean | { disabled: boolean };\n};\n\n/**\n * Placement for a custom button injected in the {@link CallControls}.\n *\n * 'primary': Place the button(s) on the right end of the center control bar but before the EndCallButton (left end in rtl mode).\n *\n * Multiple buttons assigned the same placement are appended in order.\n * E.g., if two buttons are placed in 'primary', they'll both appear on the right end (left end in rtl mode)\n * before the EndCallButton in the order provided.\n *\n * @beta\n */\nexport type CustomCallControlButtonPlacement = 'primary';\n\n/**\n * A callback that returns the props to render a custom {@link ControlBarButton}.\n *\n * The response indicates where the custom button should be placed.\n *\n * Performance tip: This callback is only called when either the callback or its arguments change.\n *\n * @beta\n */\nexport type CustomCallControlButtonCallback = (\n args: CustomCallControlButtonCallbackArgs\n) => CustomCallControlButtonProps;\n\n/**\n * Arguments for {@link CustomCallControlButtonCallback}.\n *\n * @beta\n */\nexport interface CustomCallControlButtonCallbackArgs {\n /**\n * Buttons should reduce the size to fit a smaller viewport when `displayType` is `'compact'`.\n *\n * @defaultValue `'default'`\n */\n displayType?: CallControlDisplayType;\n}\n\n/**\n * Includes the base props necessary to render a {@link ControlBarButton} or {@link DrawerMenuItem}.\n *\n * @beta\n */\nexport interface CustomControlButtonProps {\n /**\n * Calback for when button is clicked\n */\n onItemClick?: () => void;\n /**\n * Whether the buttons is disabled\n */\n disabled?: boolean;\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n /**\n * Fluent styles, common to all {@link ControlBarButton}s or {@link DrawerMenuItem}s.\n */\n styles?: ControlBarButtonStyles | BaseCustomStyles;\n /**\n * Optional label for the button\n */\n text?: string;\n /**\n * A unique key for the button\n */\n key?: string | number;\n /**\n * The aria label of the button for the benefit of screen readers.\n */\n ariaLabel?: string;\n /**\n * Detailed description of the button for the benefit of screen readers.\n */\n ariaDescription?: string;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n}\n\n/**\n * Response from {@link CustomCallControlButtonCallback}.\n *\n * Includes the placement prop necessary to indicate where to place the\n * {@link ControlBarButton} and a {@link DrawerMenuItem}\n *\n * @beta\n */\nexport interface CustomCallControlButtonProps extends CustomControlButtonProps {\n /**\n * Where to place the custom button relative to other buttons.\n */\n placement: CustomCallControlButtonPlacement;\n /**\n * Icon to render. Icon is a non-default icon name that needs to be registered as a\n * custom icon using registerIcons through fluentui. Examples include icons from the fluentui library\n */\n iconName?: string;\n}\n\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallControlOptions.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/types/CallControlOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\nimport { CustomCallControlButtonPlacement } from '../../common/ControlBar/CustomButton';\nimport { CallControlDisplayType, CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';\n\n/**\n * Customization options for the control bar in calling experience.\n *\n * @public\n */\nexport type CallControlOptions =\n | CommonCallControlOptions & {\n /**\n * Show, Hide or Disable participants button during a call. This is the option only work for legacyControl bar.\n * @defaultValue true\n */\n participantsButton?: boolean | { disabled: boolean };\n /* @conditional-compile-remove(new-call-control-bar) */\n legacyControlBarExperience?: boolean;\n };\n\n/**\n * Arguments for {@link CustomCallControlButtonCallback}.\n *\n * @beta\n */\nexport interface CustomCallControlButtonCallbackArgs {\n /**\n * Buttons should reduce the size to fit a smaller viewport when `displayType` is `'compact'`.\n *\n * @defaultValue `'default'`\n */\n displayType?: CallControlDisplayType;\n}\n\n/**\n * Includes the base props necessary to render a {@link ControlBarButton} or {@link DrawerMenuItem}.\n *\n * @beta\n */\nexport interface CustomControlButtonProps {\n /**\n * Calback for when button is clicked\n */\n onItemClick?: () => void;\n /**\n * Whether the buttons is disabled\n */\n disabled?: boolean;\n /**\n * Whether the label is displayed or not.\n *\n * @defaultValue `false`\n */\n showLabel?: boolean;\n /**\n * Fluent styles, common to all {@link ControlBarButton}s or {@link DrawerMenuItem}s.\n */\n styles?: ControlBarButtonStyles | BaseCustomStyles;\n /**\n * Optional label for the button\n */\n text?: string;\n /**\n * A unique key for the button\n */\n key?: string | number;\n /**\n * The aria label of the button for the benefit of screen readers.\n */\n ariaLabel?: string;\n /**\n * Detailed description of the button for the benefit of screen readers.\n */\n ariaDescription?: string;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n}\n\n/**\n * Response from {@link CustomCallControlButtonCallback}.\n *\n * Includes the placement prop necessary to indicate where to place the\n * {@link ControlBarButton} and a {@link DrawerMenuItem}\n *\n * @beta\n */\nexport interface CustomCallControlButtonProps extends CustomControlButtonProps {\n /**\n * Where to place the custom button relative to other buttons.\n */\n placement: CustomCallControlButtonPlacement;\n /**\n * Icon to render. Icon is a non-default icon name that needs to be registered as a\n * custom icon using registerIcons through fluentui. Examples include icons from the fluentui library\n */\n iconName?: string;\n}\n\"../../../../../react-components/src\""]}
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/utils/Utils.ts"],"names":[],"mappings":"AAAA,uCAAu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AAc,CAAC;aACtE;YAED,wBAAwB,GAAG,MAAA,KAAK,CAAC,IAAI,0CAAE,kBAAkB,CAAC;SAC3D;QACD,uCACK,KAAK,KACR,IAAI,EAAE,KAAK,CAAC,IAAI;gBACd,CAAC,iCACM,KAAK,CAAC,IAAI,KACb,kBAAkB,EAAE,oBAAoB,IAE5C,CAAC,CAAC,SAAS,IACb;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallAdapterState, CallCompositePage, END_CALL_PAGES } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { CallState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier,\n isUnknownIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { AdapterStateModifier } from '../adapter/AzureCommunicationCallAdapter';\n\nconst ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;\nconst REMOTE_PSTN_USER_HUNG_UP = 560000;\nconst REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];\n/* @conditional-compile-remove(rooms) */\nconst ROOM_NOT_FOUND_SUB_CODE = 5751;\n/* @conditional-compile-remove(rooms) */\nconst DENIED_PERMISSION_TO_ROOM_SUB_CODE = 5828;\n\n/**\n * @private\n */\nexport const isCameraOn = (state: CallAdapterState): boolean => {\n if (state.call) {\n const stream = state.call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n return !!stream;\n } else {\n if (state.devices.selectedCamera) {\n const previewOn = _isPreviewOn(state.devices);\n return previewOn;\n }\n }\n return false;\n};\n\n/**\n * Reduce the set of call controls visible on mobile.\n * For example do not show screenshare button.\n *\n * @private\n */\nexport const reduceCallControlsForMobile = (\n callControlOptions: CallControlOptions | boolean | undefined\n): CallControlOptions | false => {\n if (callControlOptions === false) {\n return false;\n }\n\n // Ensure call controls a valid object.\n const reduceCallControlOptions = callControlOptions === true ? {} : callControlOptions || {};\n\n // Set to compressed mode when composite is optimized for mobile\n reduceCallControlOptions.displayType = 'compact';\n\n // Do not show screen share button when composite is optimized for mobile unless the developer\n // has explicitly opted in.\n if (reduceCallControlOptions.screenShareButton !== true) {\n reduceCallControlOptions.screenShareButton = false;\n }\n\n return reduceCallControlOptions;\n};\n\nenum CallEndReasons {\n LEFT_CALL,\n ACCESS_DENIED,\n REMOVED_FROM_CALL,\n ROOM_NOT_FOUND,\n DENIED_PERMISSION_TO_ROOM\n}\n\nconst getCallEndReason = (call: CallState): CallEndReasons => {\n const remoteParticipantsEndedArray = Array.from(Object.values(call.remoteParticipantsEnded));\n /**\n * Handle the special case in a PSTN call where removing the last user kicks the caller out of the call.\n * The code and subcode is the same as when a user is removed from a teams interop call.\n * Hence, we look at the last remote participant removed to determine if the last participant removed was a phone number.\n * If yes, the caller was kicked out of the call, but we need to show them that they left the call.\n * Note: This check will only work for 1:1 PSTN Calls. The subcode is different for 1:N PSTN calls, and we do not need to handle that case.\n */\n if (\n remoteParticipantsEndedArray.length === 1 &&\n isPhoneNumberIdentifier(remoteParticipantsEndedArray[0].identifier) &&\n call.callEndReason?.subCode !== REMOTE_PSTN_USER_HUNG_UP\n ) {\n return CallEndReasons.LEFT_CALL;\n }\n\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ACCESS_DENIED_TEAMS_MEETING_SUB_CODE) {\n return CallEndReasons.ACCESS_DENIED;\n }\n\n if (call.callEndReason?.subCode && REMOVED_FROM_CALL_SUB_CODES.includes(call.callEndReason.subCode)) {\n return CallEndReasons.REMOVED_FROM_CALL;\n }\n\n /* @conditional-compile-remove(rooms) */\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ROOM_NOT_FOUND_SUB_CODE) {\n return CallEndReasons.ROOM_NOT_FOUND;\n }\n\n /* @conditional-compile-remove(rooms) */\n if (call.callEndReason?.subCode && call.callEndReason.subCode === DENIED_PERMISSION_TO_ROOM_SUB_CODE) {\n return CallEndReasons.DENIED_PERMISSION_TO_ROOM;\n }\n\n if (call.callEndReason) {\n // No error codes match, assume the user simply left the call regularly\n return CallEndReasons.LEFT_CALL;\n }\n\n throw new Error('No matching call end reason');\n};\n\n/**\n * type definition for conditional-compilation\n */\ntype GetCallCompositePageFunction = ((\n call: CallState | undefined,\n previousCall: CallState | undefined\n) => CallCompositePage) &\n /* @conditional-compile-remove(unsupported-browser) */ ((\n call: CallState | undefined,\n previousCall: CallState | undefined,\n unsupportedBrowserInfo?: {\n environmentInfo?: EnvironmentInfo;\n unsupportedBrowserVersionOptedIn?: boolean;\n }\n ) => CallCompositePage);\n/**\n * Get the current call composite page based on the current call composite state\n *\n * @param Call - The current call state\n * @param previousCall - The state of the most recent previous call that has ended.\n *\n * @remarks - The previousCall state is needed to determine if the call has ended.\n * When the call ends a new call object is created, and so we must lookback at the\n * previous call state to understand how the call has ended. If there is no previous\n * call we know that this is a fresh call and can display the configuration page.\n *\n * @private\n */\nexport const getCallCompositePage: GetCallCompositePageFunction = (\n call,\n previousCall?,\n unsupportedBrowserInfo?\n): CallCompositePage => {\n /* @conditional-compile-remove(unsupported-browser) */\n if (\n isUnsupportedEnvironment(\n unsupportedBrowserInfo.environmentInfo,\n unsupportedBrowserInfo.unsupportedBrowserVersionOptedIn\n )\n ) {\n return 'unsupportedEnvironment';\n }\n\n if (call) {\n // Must check for ongoing call *before* looking at any previous calls.\n // If the composite completes one call and joins another, the previous calls\n // will be populated, but not relevant for determining the page.\n\n // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.\n if (_isInLobbyOrConnecting(call?.state)) {\n return 'lobby';\n // `LocalHold` needs to be checked before `isInCall` since it is also a state that's considered in call.\n } else if (call?.state === 'LocalHold') {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return 'hold';\n return 'call';\n } else if (_isInCall(call?.state)) {\n return 'call';\n } else {\n // When the call object has been constructed after clicking , but before 'connecting' has been\n // set on the call object, we continue to show the configuration screen.\n // The call object does not correctly reflect local device state until `call.state` moves to `connecting`.\n // Moving to the 'lobby' page too soon leads to components that depend on the `call` object to show incorrect\n // transitional state.\n return 'configuration';\n }\n }\n\n if (previousCall) {\n const reason = getCallEndReason(previousCall);\n /* @conditional-compile-remove(rooms) */\n switch (reason) {\n case CallEndReasons.ROOM_NOT_FOUND:\n return 'roomNotFound';\n case CallEndReasons.DENIED_PERMISSION_TO_ROOM:\n return 'deniedPermissionToRoom';\n }\n switch (reason) {\n case CallEndReasons.ACCESS_DENIED:\n return 'accessDeniedTeamsMeeting';\n case CallEndReasons.REMOVED_FROM_CALL:\n return 'removedFromCall';\n case CallEndReasons.LEFT_CALL:\n if (previousCall.diagnostics.network.latest.noNetwork) {\n return 'joinCallFailedDueToNoNetwork';\n }\n return 'leftCall';\n }\n }\n\n // No call state - show starting page (configuration)\n return 'configuration';\n};\n\n/** @private */\nexport const IsCallEndedPage = (\n /**\n * Explicitly listing the pages of this function intentionally.\n * This protects against adding a new composite page that should be marked as an callEndedPage.\n * EndCallPages are used to trigger onCallEnded events so this could easily be missed.\n * When you add a new composite page this will throw a compiler error. If this new page is an\n * EndCallPage ensure you update the END_CALL_PAGES. Afterwards update the `page` parameter\n * type below to allow your new page, i.e. add `| <your new page>\n */\n page:\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | 'removedFromCall'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | /* @conditional-compile-remove(rooms) */ 'roomNotFound'\n | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n): boolean => END_CALL_PAGES.includes(page);\n\n/**\n * Creates a new call control options object and sets the correct values for disabling\n * the buttons provided in the `disabledControls` array.\n * Returns a new object without changing the original object.\n * @param callControlOptions options for the call control component that need to be modified.\n * @param disabledControls An array of controls to disable.\n * @returns a copy of callControlOptions with disabledControls disabled\n * @private\n */\nexport const disableCallControls = (\n callControlOptions: CallControlOptions | boolean | undefined,\n disabledControls: (keyof CallControlOptions)[]\n): CallControlOptions | boolean | undefined => {\n if (callControlOptions === false) {\n return false;\n }\n // Ensure we clone the prop if it is an object to ensure we do not mutate the original prop.\n let newOptions = (callControlOptions instanceof Object ? { ...callControlOptions } : callControlOptions) ?? {};\n if (newOptions === true || newOptions === undefined) {\n newOptions = disabledControls.reduce((acc, key) => {\n acc[key] = { disabled: true };\n return acc;\n }, {});\n } else {\n disabledControls.forEach((key) => {\n if (newOptions[key] !== false) {\n newOptions[key] = { disabled: true };\n }\n });\n }\n return newOptions;\n};\n\n/**\n * Check if a disabled object is provided for a button and returns if the button is disabled.\n * A button is only disabled if is explicitly set to disabled.\n *\n * @param option\n * @returns whether a button is disabled\n * @private\n */\nexport const isDisabled = (option: boolean | { disabled: boolean } | undefined): boolean => {\n if (option === undefined || typeof option === 'boolean') {\n return false;\n }\n\n return option.disabled;\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the camera.\n */\nconst queryCameraPermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'camera' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the microphone.\n */\nconst queryMicrophonePermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'microphone' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n *\n * This function uses permission API to determine if device permission state is granted, prompt or denied\n * @returns whether device permission state is granted, prompt or denied\n * If permission API is not supported on this browser, permission state is set to unsupported.\n * @private\n */\nexport const getDevicePermissionState = async (\n setVideoState: (state: PermissionState | 'unsupported') => void,\n setAudioState: (state: PermissionState | 'unsupported') => void\n): Promise<void> => {\n const [cameraResult, microphoneResult] = await Promise.all([\n queryCameraPermissionFromPermissionsAPI(),\n queryMicrophonePermissionFromPermissionsAPI()\n ]);\n setVideoState(cameraResult);\n setAudioState(microphoneResult);\n};\n/* @conditional-compile-remove(unsupported-browser) */\nconst isUnsupportedEnvironment = (\n environmentInfo?: EnvironmentInfo,\n unsupportedBrowserVersionOptedIn?: boolean\n): boolean => {\n return !!(\n environmentInfo?.isSupportedBrowser === false ||\n (environmentInfo?.isSupportedBrowserVersion === false && !unsupportedBrowserVersionOptedIn) ||\n environmentInfo?.isSupportedPlatform === false\n );\n};\n\n/**\n * Check if an object is identifier.\n *\n * @param identifier\n * @returns whether an identifier is one of identifier types (for runtime validation)\n * @private\n */\nexport const isValidIdentifier = (identifier: CommunicationIdentifier): boolean => {\n return (\n isCommunicationUserIdentifier(identifier) ||\n isPhoneNumberIdentifier(identifier) ||\n isMicrosoftTeamsUserIdentifier(identifier) ||\n isUnknownIdentifier(identifier)\n );\n};\n\n/**\n * Check if we are using safari browser\n * @private\n */\nexport const _isSafari = (\n environmentInfo: undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo\n): boolean => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo?.environment.browser === 'safari';\n return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);\n};\n\n/**\n * @private\n * This is the util function to create a participant modifier for remote participantList\n * It memoize previous original participant items and only update the changed participant\n * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified\n */\nexport const createParticipantModifier = (\n createModifiedParticipant: (id: string, participant: RemoteParticipantState) => RemoteParticipantState | undefined\n): AdapterStateModifier => {\n let previousParticipantState:\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined = undefined;\n let modifiedParticipants = {};\n const memoizedParticipants: {\n [id: string]: { originalRef: RemoteParticipantState; newParticipant: RemoteParticipantState };\n } = {};\n\n return (state: CallAdapterState) => {\n // if root state is the same, we don't need to update the participants\n if (state.call?.remoteParticipants !== previousParticipantState) {\n modifiedParticipants = {};\n const originalParticipants = state.call?.remoteParticipants;\n for (const key in originalParticipants) {\n const modifiedParticipant = createModifiedParticipant(key, originalParticipants[key]);\n if (modifiedParticipant === undefined) {\n modifiedParticipants[key] = originalParticipants[key];\n continue;\n }\n // Generate the new item if original cached item has been changed\n if (memoizedParticipants[key]?.originalRef !== originalParticipants[key]) {\n memoizedParticipants[key] = {\n newParticipant: modifiedParticipant,\n originalRef: originalParticipants[key]\n };\n }\n\n // the modified participant is always coming from the memoized cache, whether is was refreshed\n // from the previous closure or not\n modifiedParticipants[key] = memoizedParticipants[key].newParticipant;\n }\n\n previousParticipantState = state.call?.remoteParticipants;\n }\n return {\n ...state,\n call: state.call\n ? {\n ...state.call,\n remoteParticipants: modifiedParticipants\n }\n : undefined\n };\n };\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\""]}
1
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/utils/Utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAuC,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,sDAA6C;AAGvG,OAAO,EAEL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACvB,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAKrC,MAAM,oCAAoC,GAAG,IAAI,CAAC;AAClD,MAAM,wBAAwB,GAAG,MAAM,CAAC;AACxC,MAA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\nimport { CallAdapterState, CallCompositePage, END_CALL_PAGES } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { CallState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier,\n isUnknownIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { AdapterStateModifier } from '../adapter/AzureCommunicationCallAdapter';\n\nconst ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;\nconst REMOTE_PSTN_USER_HUNG_UP = 560000;\nconst REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];\n/* @conditional-compile-remove(rooms) */\nconst ROOM_NOT_FOUND_SUB_CODE = 5751;\n/* @conditional-compile-remove(rooms) */\nconst DENIED_PERMISSION_TO_ROOM_SUB_CODE = 5828;\n\n/**\n * @private\n */\nexport const isCameraOn = (state: CallAdapterState): boolean => {\n if (state.call) {\n const stream = state.call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n return !!stream;\n } else {\n if (state.devices.selectedCamera) {\n const previewOn = _isPreviewOn(state.devices);\n return previewOn;\n }\n }\n return false;\n};\n\n/**\n * Reduce the set of call controls visible on mobile.\n * For example do not show screenshare button.\n *\n * @private\n */\nexport const reduceCallControlsForMobile = (\n callControlOptions: CallControlOptions | boolean | undefined\n): CallControlOptions | false => {\n if (callControlOptions === false) {\n return false;\n }\n\n // Ensure call controls a valid object.\n const reduceCallControlOptions = callControlOptions === true ? {} : callControlOptions || {};\n\n // Set to compressed mode when composite is optimized for mobile\n reduceCallControlOptions.displayType = 'compact';\n\n // Do not show screen share button when composite is optimized for mobile unless the developer\n // has explicitly opted in.\n if (reduceCallControlOptions.screenShareButton !== true) {\n reduceCallControlOptions.screenShareButton = false;\n }\n\n return reduceCallControlOptions;\n};\n\nenum CallEndReasons {\n LEFT_CALL,\n ACCESS_DENIED,\n REMOVED_FROM_CALL,\n ROOM_NOT_FOUND,\n DENIED_PERMISSION_TO_ROOM\n}\n\nconst getCallEndReason = (call: CallState): CallEndReasons => {\n const remoteParticipantsEndedArray = Array.from(Object.values(call.remoteParticipantsEnded));\n /**\n * Handle the special case in a PSTN call where removing the last user kicks the caller out of the call.\n * The code and subcode is the same as when a user is removed from a teams interop call.\n * Hence, we look at the last remote participant removed to determine if the last participant removed was a phone number.\n * If yes, the caller was kicked out of the call, but we need to show them that they left the call.\n * Note: This check will only work for 1:1 PSTN Calls. The subcode is different for 1:N PSTN calls, and we do not need to handle that case.\n */\n if (\n remoteParticipantsEndedArray.length === 1 &&\n isPhoneNumberIdentifier(remoteParticipantsEndedArray[0].identifier) &&\n call.callEndReason?.subCode !== REMOTE_PSTN_USER_HUNG_UP\n ) {\n return CallEndReasons.LEFT_CALL;\n }\n\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ACCESS_DENIED_TEAMS_MEETING_SUB_CODE) {\n return CallEndReasons.ACCESS_DENIED;\n }\n\n if (call.callEndReason?.subCode && REMOVED_FROM_CALL_SUB_CODES.includes(call.callEndReason.subCode)) {\n return CallEndReasons.REMOVED_FROM_CALL;\n }\n\n /* @conditional-compile-remove(rooms) */\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ROOM_NOT_FOUND_SUB_CODE) {\n return CallEndReasons.ROOM_NOT_FOUND;\n }\n\n /* @conditional-compile-remove(rooms) */\n if (call.callEndReason?.subCode && call.callEndReason.subCode === DENIED_PERMISSION_TO_ROOM_SUB_CODE) {\n return CallEndReasons.DENIED_PERMISSION_TO_ROOM;\n }\n\n if (call.callEndReason) {\n // No error codes match, assume the user simply left the call regularly\n return CallEndReasons.LEFT_CALL;\n }\n\n throw new Error('No matching call end reason');\n};\n\n/**\n * type definition for conditional-compilation\n */\ntype GetCallCompositePageFunction = ((\n call: CallState | undefined,\n previousCall: CallState | undefined\n) => CallCompositePage) &\n /* @conditional-compile-remove(unsupported-browser) */ ((\n call: CallState | undefined,\n previousCall: CallState | undefined,\n unsupportedBrowserInfo?: {\n environmentInfo?: EnvironmentInfo;\n unsupportedBrowserVersionOptedIn?: boolean;\n }\n ) => CallCompositePage);\n/**\n * Get the current call composite page based on the current call composite state\n *\n * @param Call - The current call state\n * @param previousCall - The state of the most recent previous call that has ended.\n *\n * @remarks - The previousCall state is needed to determine if the call has ended.\n * When the call ends a new call object is created, and so we must lookback at the\n * previous call state to understand how the call has ended. If there is no previous\n * call we know that this is a fresh call and can display the configuration page.\n *\n * @private\n */\nexport const getCallCompositePage: GetCallCompositePageFunction = (\n call,\n previousCall?,\n unsupportedBrowserInfo?\n): CallCompositePage => {\n /* @conditional-compile-remove(unsupported-browser) */\n if (\n isUnsupportedEnvironment(\n unsupportedBrowserInfo.environmentInfo,\n unsupportedBrowserInfo.unsupportedBrowserVersionOptedIn\n )\n ) {\n return 'unsupportedEnvironment';\n }\n\n if (call) {\n // Must check for ongoing call *before* looking at any previous calls.\n // If the composite completes one call and joins another, the previous calls\n // will be populated, but not relevant for determining the page.\n\n // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.\n if (_isInLobbyOrConnecting(call?.state)) {\n return 'lobby';\n // `LocalHold` needs to be checked before `isInCall` since it is also a state that's considered in call.\n } else if (call?.state === 'LocalHold') {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return 'hold';\n return 'call';\n } else if (_isInCall(call?.state)) {\n return 'call';\n } else {\n // When the call object has been constructed after clicking , but before 'connecting' has been\n // set on the call object, we continue to show the configuration screen.\n // The call object does not correctly reflect local device state until `call.state` moves to `connecting`.\n // Moving to the 'lobby' page too soon leads to components that depend on the `call` object to show incorrect\n // transitional state.\n return 'configuration';\n }\n }\n\n if (previousCall) {\n const reason = getCallEndReason(previousCall);\n /* @conditional-compile-remove(rooms) */\n switch (reason) {\n case CallEndReasons.ROOM_NOT_FOUND:\n return 'roomNotFound';\n case CallEndReasons.DENIED_PERMISSION_TO_ROOM:\n return 'deniedPermissionToRoom';\n }\n switch (reason) {\n case CallEndReasons.ACCESS_DENIED:\n return 'accessDeniedTeamsMeeting';\n case CallEndReasons.REMOVED_FROM_CALL:\n return 'removedFromCall';\n case CallEndReasons.LEFT_CALL:\n if (previousCall.diagnostics.network.latest.noNetwork) {\n return 'joinCallFailedDueToNoNetwork';\n }\n return 'leftCall';\n }\n }\n\n // No call state - show starting page (configuration)\n return 'configuration';\n};\n\n/** @private */\nexport const IsCallEndedPage = (\n /**\n * Explicitly listing the pages of this function intentionally.\n * This protects against adding a new composite page that should be marked as an callEndedPage.\n * EndCallPages are used to trigger onCallEnded events so this could easily be missed.\n * When you add a new composite page this will throw a compiler error. If this new page is an\n * EndCallPage ensure you update the END_CALL_PAGES. Afterwards update the `page` parameter\n * type below to allow your new page, i.e. add `| <your new page>\n */\n page:\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | 'removedFromCall'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | /* @conditional-compile-remove(rooms) */ 'roomNotFound'\n | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom'\n | /* @conditional-compile-remove(unsupported-browser) */ 'unsupportedEnvironment'\n): boolean => END_CALL_PAGES.includes(page);\n\n/**\n * Creates a new call control options object and sets the correct values for disabling\n * the buttons provided in the `disabledControls` array.\n * Returns a new object without changing the original object.\n * @param callControlOptions options for the call control component that need to be modified.\n * @param disabledControls An array of controls to disable.\n * @returns a copy of callControlOptions with disabledControls disabled\n * @private\n */\nexport const disableCallControls = (\n callControlOptions: CallControlOptions | boolean | undefined,\n disabledControls: (keyof CallControlOptions)[]\n): CallControlOptions | boolean | undefined => {\n if (callControlOptions === false) {\n return false;\n }\n // Ensure we clone the prop if it is an object to ensure we do not mutate the original prop.\n let newOptions =\n (callControlOptions instanceof Object ? ({ ...callControlOptions } as CallControlOptions) : callControlOptions) ??\n {};\n if (newOptions === true || newOptions === undefined) {\n newOptions = disabledControls.reduce((acc, key) => {\n acc[key] = { disabled: true };\n return acc;\n }, {});\n } else {\n disabledControls.forEach((key) => {\n if (newOptions[key] !== false) {\n newOptions[key] = { disabled: true };\n }\n });\n }\n return newOptions;\n};\n\n/**\n * Check if a disabled object is provided for a button and returns if the button is disabled.\n * A button is only disabled if is explicitly set to disabled.\n *\n * @param option\n * @returns whether a button is disabled\n * @private\n */\nexport const isDisabled = (option: boolean | { disabled: boolean } | undefined): boolean => {\n if (option === undefined || typeof option === 'boolean') {\n return false;\n }\n\n return option.disabled;\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the camera.\n */\nconst queryCameraPermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'camera' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * @returns Permissions state for the microphone.\n */\nconst queryMicrophonePermissionFromPermissionsAPI = async (): Promise<PermissionState | 'unsupported'> => {\n try {\n return (await navigator.permissions.query({ name: 'microphone' as PermissionName })).state;\n } catch (e) {\n console.info('permissions API is not supported by browser', e);\n return 'unsupported';\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n *\n * This function uses permission API to determine if device permission state is granted, prompt or denied\n * @returns whether device permission state is granted, prompt or denied\n * If permission API is not supported on this browser, permission state is set to unsupported.\n * @private\n */\nexport const getDevicePermissionState = async (\n setVideoState: (state: PermissionState | 'unsupported') => void,\n setAudioState: (state: PermissionState | 'unsupported') => void\n): Promise<void> => {\n const [cameraResult, microphoneResult] = await Promise.all([\n queryCameraPermissionFromPermissionsAPI(),\n queryMicrophonePermissionFromPermissionsAPI()\n ]);\n setVideoState(cameraResult);\n setAudioState(microphoneResult);\n};\n/* @conditional-compile-remove(unsupported-browser) */\nconst isUnsupportedEnvironment = (\n environmentInfo?: EnvironmentInfo,\n unsupportedBrowserVersionOptedIn?: boolean\n): boolean => {\n return !!(\n environmentInfo?.isSupportedBrowser === false ||\n (environmentInfo?.isSupportedBrowserVersion === false && !unsupportedBrowserVersionOptedIn) ||\n environmentInfo?.isSupportedPlatform === false\n );\n};\n\n/**\n * Check if an object is identifier.\n *\n * @param identifier\n * @returns whether an identifier is one of identifier types (for runtime validation)\n * @private\n */\nexport const isValidIdentifier = (identifier: CommunicationIdentifier): boolean => {\n return (\n isCommunicationUserIdentifier(identifier) ||\n isPhoneNumberIdentifier(identifier) ||\n isMicrosoftTeamsUserIdentifier(identifier) ||\n isUnknownIdentifier(identifier)\n );\n};\n\n/**\n * Check if we are using safari browser\n * @private\n */\nexport const _isSafari = (\n environmentInfo: undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo\n): boolean => {\n /* @conditional-compile-remove(unsupported-browser) */\n return environmentInfo?.environment.browser === 'safari';\n return /^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);\n};\n\n/**\n * @private\n * This is the util function to create a participant modifier for remote participantList\n * It memoize previous original participant items and only update the changed participant\n * It takes in one modifier function to generate one single participant object, it returns undefined if the object keeps unmodified\n */\nexport const createParticipantModifier = (\n createModifiedParticipant: (id: string, participant: RemoteParticipantState) => RemoteParticipantState | undefined\n): AdapterStateModifier => {\n let previousParticipantState:\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined = undefined;\n let modifiedParticipants = {};\n const memoizedParticipants: {\n [id: string]: { originalRef: RemoteParticipantState; newParticipant: RemoteParticipantState };\n } = {};\n\n return (state: CallAdapterState) => {\n // if root state is the same, we don't need to update the participants\n if (state.call?.remoteParticipants !== previousParticipantState) {\n modifiedParticipants = {};\n const originalParticipants = state.call?.remoteParticipants;\n for (const key in originalParticipants) {\n const modifiedParticipant = createModifiedParticipant(key, originalParticipants[key]);\n if (modifiedParticipant === undefined) {\n modifiedParticipants[key] = originalParticipants[key];\n continue;\n }\n // Generate the new item if original cached item has been changed\n if (memoizedParticipants[key]?.originalRef !== originalParticipants[key]) {\n memoizedParticipants[key] = {\n newParticipant: modifiedParticipant,\n originalRef: originalParticipants[key]\n };\n }\n\n // the modified participant is always coming from the memoized cache, whether is was refreshed\n // from the previous closure or not\n modifiedParticipants[key] = memoizedParticipants[key].newParticipant;\n }\n\n previousParticipantState = state.call?.remoteParticipants;\n }\n return {\n ...state,\n call: state.call\n ? {\n ...state.call,\n remoteParticipants: modifiedParticipants\n }\n : undefined\n };\n };\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\""]}
@@ -1,12 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { PartialTheme, Theme } from '@fluentui/react';
3
- import { CallControlDisplayType } from '../CallComposite';
4
3
  import { CallWithChatAdapter } from './adapter/CallWithChatAdapter';
5
4
  import { BaseCompositeProps } from '../common/BaseComposite';
6
5
  import { CallWithChatCompositeIcons } from '../common/icons';
7
6
  import { FileSharingOptions } from '../ChatComposite';
8
- import { CustomCallWithChatControlButtonCallback } from './CustomButton';
9
7
  import { DeviceCheckOptions } from '../CallComposite/CallComposite';
8
+ import { CommonCallControlOptions } from '../common/types/CommonCallControlOptions';
10
9
  /**
11
10
  * Props required for the {@link CallWithChatComposite}
12
11
  *
@@ -35,6 +34,20 @@ export interface CallWithChatCompositeProps extends BaseCompositeProps<CallWithC
35
34
  */
36
35
  options?: CallWithChatCompositeOptions;
37
36
  }
37
+ /**
38
+ * Customization options for the control bar in calling with chat experience.
39
+ *
40
+ * @public
41
+ */
42
+ export interface CallWithChatControlOptions extends CommonCallControlOptions {
43
+ /**
44
+ * Show or hide the chat button in the call-with-chat composite control bar.
45
+ * @defaultValue true
46
+ */
47
+ chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
48
+ disabled: boolean;
49
+ };
50
+ }
38
51
  /**
39
52
  * Optional features of the {@link CallWithChatComposite}.
40
53
  *
@@ -103,79 +116,6 @@ export declare type CallWithChatCompositeOptions = {
103
116
  */
104
117
  onEnvironmentInfoTroubleshootingClick?: () => void;
105
118
  };
106
- /**
107
- * {@link CallWithChatComposite} Call controls to show or hide buttons on the calling control bar.
108
- *
109
- * @public
110
- */
111
- export interface CallWithChatControlOptions {
112
- /**
113
- * {@link CallControlDisplayType} to change how the call controls are displayed.
114
- * `'compact'` display type will decreases the size of buttons and hide the labels.
115
- *
116
- * @remarks
117
- * If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.
118
- *
119
- * @defaultValue 'default'
120
- */
121
- displayType?: CallControlDisplayType;
122
- /**
123
- * Show or Hide Microphone button during a call.
124
- * @defaultValue true
125
- */
126
- microphoneButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
127
- disabled: boolean;
128
- };
129
- /**
130
- * Show or Hide Camera Button during a call
131
- * @defaultValue true
132
- */
133
- cameraButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
134
- disabled: boolean;
135
- };
136
- /**
137
- * Show, Hide or Disable the screen share button during a call.
138
- * @defaultValue true
139
- */
140
- screenShareButton?: boolean | {
141
- disabled: boolean;
142
- };
143
- /**
144
- * Show or Hide EndCall button during a call.
145
- * @defaultValue true
146
- */
147
- endCallButton?: boolean;
148
- /**
149
- * Show or hide the chat button in the call-with-chat composite control bar.
150
- * @defaultValue true
151
- */
152
- chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
153
- disabled: boolean;
154
- };
155
- /**
156
- * Show or hide the people button in the call-with-chat composite control bar.
157
- * @defaultValue true
158
- */
159
- peopleButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
160
- disabled: boolean;
161
- };
162
- /**
163
- * Inject custom buttons in the call controls.
164
- *
165
- * @beta
166
- */
167
- onFetchCustomButtonProps?: CustomCallWithChatControlButtonCallback[];
168
- /**
169
- * Show or hide the more button in the call-with-chat control bar.
170
- */
171
- moreButton?: boolean;
172
- /**
173
- * Show or hide the hold button in the bottom sheet drawer
174
- */
175
- holdButton?: boolean | {
176
- disabled: boolean;
177
- };
178
- }
179
119
  /**
180
120
  * CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.
181
121
  *
@@ -4,13 +4,13 @@ import React, { useCallback, useState, useMemo, useEffect, useRef } from 'react'
4
4
  import { LayerHost, mergeStyles, Stack } from '@fluentui/react';
5
5
  import { CallComposite } from '../CallComposite';
6
6
  import { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';
7
- import { CallWithChatControlBar } from './CallWithChatControlBar';
7
+ import { CommonCallControlBar } from '../common/ControlBar/CommonCallControlBar';
8
8
  import { callCompositeContainerStyles, compositeOuterContainerStyles, controlBarContainerStyles } from './styles/CallWithChatCompositeStyles';
9
9
  import { CallWithChatBackedCallAdapter } from './adapter/CallWithChatBackedCallAdapter';
10
10
  import { CallWithChatBackedChatAdapter } from './adapter/CallWithChatBackedChatAdapter';
11
11
  import { BaseProvider } from '../common/BaseComposite';
12
12
  import { ChatAdapterProvider } from '../ChatComposite/adapter/ChatAdapterProvider';
13
- import { PreparedMoreDrawer } from './PreparedMoreDrawer';
13
+ import { PreparedMoreDrawer } from '../common/Drawer/PreparedMoreDrawer';
14
14
  import { _useContainerHeight, _useContainerWidth } from "../../../../react-components/src";
15
15
  import { useId } from '@fluentui/react-hooks';
16
16
  import { CallWithChatPane } from './CallWithChatPane';
@@ -21,17 +21,9 @@ import { SendDtmfDialpad } from '../common/SendDtmfDialpad';
21
21
  /* @conditional-compile-remove(PSTN-calls) */
22
22
  import { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';
23
23
  import { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';
24
- /* @conditional-compile-remove(video-background-effects) */
25
- import { VideoEffectsPane } from '../common/VideoEffectsPane';
26
24
  const CallWithChatScreen = (props) => {
27
25
  const { callWithChatAdapter, fluentTheme, formFactor = 'desktop' } = props;
28
26
  const mobileView = formFactor === 'mobile';
29
- /* @conditional-compile-remove(video-background-effects) */
30
- const [showVideoEffectsPane, setVideoEffectsPane] = useState(false);
31
- /* @conditional-compile-remove(video-background-effects) */
32
- const setShowVideoEffectsPane = useCallback((showVideoEffectsOptions) => {
33
- setVideoEffectsPane(showVideoEffectsOptions);
34
- }, [setVideoEffectsPane]);
35
27
  if (!callWithChatAdapter) {
36
28
  throw new Error('CallWithChatAdapter is undefined');
37
29
  }
@@ -149,6 +141,8 @@ const CallWithChatScreen = (props) => {
149
141
  }), [callWithChatStrings]);
150
142
  /* @conditional-compile-remove(PSTN-calls) */
151
143
  const alternateCallerId = callAdapter.getState().alternateCallerId;
144
+ /* @conditional-compile-remove(close-captions) */
145
+ const isTeamsCall = callAdapter.getState().isTeamsCall;
152
146
  const callCompositeOptions = useMemo(() => ({
153
147
  callControls: false,
154
148
  /* @conditional-compile-remove(call-readiness) */
@@ -176,18 +170,18 @@ const CallWithChatScreen = (props) => {
176
170
  // Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.
177
171
  style: callCompositeContainerCSS },
178
172
  React.createElement(CallComposite, Object.assign({}, props, { formFactor: formFactor, options: callCompositeOptions, adapter: callAdapter, fluentTheme: fluentTheme }))),
179
- /* @conditional-compile-remove(video-background-effects) */
180
- React.createElement(VideoEffectsPane, { showVideoEffectsOptions: showVideoEffectsPane, setshowVideoEffectsOptions: setShowVideoEffectsPane }),
181
173
  chatProps.adapter && callAdapter && hasJoinedCall && (React.createElement(CallWithChatPane, { chatCompositeProps: chatProps, inviteLink: props.joinInvitationURL, onClose: closePane, chatAdapter: chatProps.adapter, callAdapter: callAdapter, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, onChatButtonClicked: showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined, onPeopleButtonClicked: showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined, modalLayerHostId: modalLayerHostId, mobileView: mobileView, activePane: activePane,
182
174
  /* @conditional-compile-remove(file-sharing) */
183
175
  fileSharing: props.fileSharing, rtl: props.rtl, callControls: typeof props.callControls !== 'boolean' ? props.callControls : undefined }))),
184
176
  showControlBar && !isMobileWithActivePane && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
185
177
  React.createElement(Stack.Item, { styles: controlBarContainerStyles },
186
- React.createElement(CallWithChatControlBar, { callAdapter: callAdapter, chatAdapter: chatProps.adapter, chatButtonChecked: activePane === 'chat', onChatButtonClicked: toggleChat, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeople, onMoreButtonClicked: onMoreButtonClicked, mobileView: mobileView, disableButtonsForLobbyPage: isInLobbyOrConnecting,
178
+ React.createElement(CommonCallControlBar, { callAdapter: callAdapter, chatAdapter: chatProps.adapter, chatButtonChecked: activePane === 'chat', onChatButtonClicked: toggleChat, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeople, onMoreButtonClicked: onMoreButtonClicked, mobileView: mobileView, disableButtonsForLobbyPage: isInLobbyOrConnecting,
187
179
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
188
180
  disableButtonsForHoldScreen: isInLocalHold, callControls: props.callControls, containerHeight: containerHeight, containerWidth: containerWidth,
189
181
  /* @conditional-compile-remove(PSTN-calls) */
190
- onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined })))),
182
+ onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
183
+ /* @conditional-compile-remove(close-captions) */
184
+ isCaptionsSupported: isTeamsCall && hasJoinedCall, rtl: props.rtl })))),
191
185
  showControlBar && showDrawer && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
192
186
  React.createElement(CallAdapterProvider, { adapter: callAdapter },
193
187
  React.createElement(Stack, { styles: drawerContainerStyles() },
@@ -195,7 +189,9 @@ const CallWithChatScreen = (props) => {
195
189
  /* @conditional-compile-remove(PSTN-calls) */
196
190
  onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
197
191
  /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
198
- disableButtonsForHoldScreen: isInLocalHold }))))),
192
+ disableButtonsForHoldScreen: isInLocalHold,
193
+ /* @conditional-compile-remove(close-captions) */
194
+ isCaptionsSupported: isTeamsCall && hasJoinedCall }))))),
199
195
  /* @conditional-compile-remove(PSTN-calls) */
200
196
  showControlBar && showDtmfDialpad && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
201
197
  React.createElement(CallAdapterProvider, { adapter: callAdapter },
@@ -1 +1 @@
1
- {"version":3,"file":"CallWithChatComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAgB,KAAK,EAAS,MAAM,iBAAiB,CAAC;AACrF,OAAO,EAAE,aAAa,EAA6C,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,EAC7B,yBAAyB,EAC1B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AAGxF,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,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I,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,YAAY,KAAK,KAAK,CAAC;AAC7C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useState, useMemo, useEffect, useRef } from 'react';\nimport { LayerHost, mergeStyles, PartialTheme, Stack, Theme } from '@fluentui/react';\nimport { CallComposite, CallCompositePage, CallControlDisplayType } from '../CallComposite';\nimport { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';\nimport { CallWithChatControlBar } from './CallWithChatControlBar';\nimport { CallState } from '@azure/communication-calling';\nimport {\n callCompositeContainerStyles,\n compositeOuterContainerStyles,\n controlBarContainerStyles\n} from './styles/CallWithChatCompositeStyles';\nimport { CallWithChatAdapter } from './adapter/CallWithChatAdapter';\nimport { CallWithChatBackedCallAdapter } from './adapter/CallWithChatBackedCallAdapter';\nimport { CallWithChatBackedChatAdapter } from './adapter/CallWithChatBackedChatAdapter';\nimport { CallAdapter } from '../CallComposite';\nimport { ChatCompositeProps } from '../ChatComposite';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallWithChatCompositeIcons } from '../common/icons';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ChatAdapterProvider } from '../ChatComposite/adapter/ChatAdapterProvider';\nimport { CallWithChatAdapterState } from './state/CallWithChatAdapterState';\nimport { PreparedMoreDrawer } from './PreparedMoreDrawer';\nimport { ParticipantMenuItemsCallback, _useContainerHeight, _useContainerWidth } from '@internal/react-components';\nimport { useId } from '@fluentui/react-hooks';\nimport { CallWithChatPane, CallWithChatPaneOption } from './CallWithChatPane';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileSharingOptions } from '../ChatComposite';\nimport { containerDivStyles } from '../common/ContainerRectProps';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CustomCallWithChatControlButtonCallback } from './CustomButton';\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';\nimport { CallCompositeOptions } from '../CallComposite/CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite/CallComposite';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoEffectsPane } from '../common/VideoEffectsPane';\n\n/**\n * Props required for the {@link CallWithChatComposite}\n *\n * @public\n */\nexport interface CallWithChatCompositeProps extends BaseCompositeProps<CallWithChatCompositeIcons> {\n adapter: CallWithChatAdapter;\n /**\n * Fluent theme for the composite.\n *\n * Defaults to a light theme if undefined.\n */\n fluentTheme?: PartialTheme | Theme;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL that can be used to copy a call-with-chat invite to the Users clipboard.\n */\n joinInvitationURL?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallWithChatComposite}\n */\n options?: CallWithChatCompositeOptions;\n}\n\n/**\n * Optional features of the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport type CallWithChatCompositeOptions = {\n /**\n * Call control options to change what buttons show on the call-with-chat composite control bar.\n * If using the boolean values, true will cause default behavior across the whole control bar. False hides the whole control bar.\n */\n callControls?: boolean | CallWithChatControlOptions;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Properties for configuring the File Sharing feature.\n * If undefined, file sharing feature will be disabled.\n * @beta\n */\n fileSharing?: FileSharingOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permissions check options for your call.\n * Here you can choose what device permissions you prompt the user for,\n * as well as what device permissions must be accepted before starting a call.\n */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Optional callback to supply users with further troubleshooting steps for network issues\n * experienced when connecting to a call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\n/**\n * {@link CallWithChatComposite} Call controls to show or hide buttons on the calling control bar.\n *\n * @public\n */\nexport interface CallWithChatControlOptions {\n /**\n * {@link CallControlDisplayType} to change how the call controls are displayed.\n * `'compact'` display type will decreases the size of buttons and hide the labels.\n *\n * @remarks\n * If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.\n *\n * @defaultValue 'default'\n */\n displayType?: CallControlDisplayType;\n /**\n * Show or Hide Microphone button during a call.\n * @defaultValue true\n */\n microphoneButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /**\n * Show or Hide Camera Button during a call\n * @defaultValue true\n */\n cameraButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /**\n * Show, Hide or Disable the screen share button during a call.\n * @defaultValue true\n */\n screenShareButton?: boolean | { disabled: boolean };\n /**\n * Show or Hide EndCall button during a call.\n * @defaultValue true\n */\n endCallButton?: boolean;\n /**\n * Show or hide the chat button in the call-with-chat composite control bar.\n * @defaultValue true\n */\n chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /**\n * Show or hide the people button in the call-with-chat composite control bar.\n * @defaultValue true\n */\n peopleButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /* @conditional-compile-remove(control-bar-button-injection) */\n /**\n * Inject custom buttons in the call controls.\n *\n * @beta\n */\n onFetchCustomButtonProps?: CustomCallWithChatControlButtonCallback[];\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Show or hide the more button in the call-with-chat control bar.\n */\n moreButton?: boolean;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Show or hide the hold button in the bottom sheet drawer\n */\n holdButton?: boolean | { disabled: boolean };\n}\n\ntype CallWithChatScreenProps = {\n callWithChatAdapter: CallWithChatAdapter;\n fluentTheme?: PartialTheme | Theme;\n formFactor?: 'desktop' | 'mobile';\n joinInvitationURL?: string;\n callControls?: boolean | CallWithChatControlOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?: FileSharingOptions;\n rtl?: boolean;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\nconst CallWithChatScreen = (props: CallWithChatScreenProps): JSX.Element => {\n const { callWithChatAdapter, fluentTheme, formFactor = 'desktop' } = props;\n const mobileView = formFactor === 'mobile';\n /* @conditional-compile-remove(video-background-effects) */\n const [showVideoEffectsPane, setVideoEffectsPane] = useState(false);\n\n /* @conditional-compile-remove(video-background-effects) */\n const setShowVideoEffectsPane = useCallback(\n (showVideoEffectsOptions: boolean): void => {\n setVideoEffectsPane(showVideoEffectsOptions);\n },\n [setVideoEffectsPane]\n );\n if (!callWithChatAdapter) {\n throw new Error('CallWithChatAdapter is undefined');\n }\n\n const callAdapter: CallAdapter = useMemo(\n () => new CallWithChatBackedCallAdapter(callWithChatAdapter),\n [callWithChatAdapter]\n );\n\n const [currentCallState, setCurrentCallState] = useState<CallState>();\n const [currentPage, setCurrentPage] = useState<CallCompositePage>();\n const [activePane, setActivePane] = useState<CallWithChatPaneOption>('none');\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n useEffect(() => {\n const updateCallWithChatPage = (newState: CallWithChatAdapterState): void => {\n setCurrentPage(newState.page);\n setCurrentCallState(newState.call?.state);\n };\n updateCallWithChatPage(callWithChatAdapter.getState());\n callWithChatAdapter.onStateChange(updateCallWithChatPage);\n return () => {\n callWithChatAdapter.offStateChange(updateCallWithChatPage);\n };\n }, [callWithChatAdapter]);\n\n const closePane = useCallback(() => {\n setActivePane('none');\n }, [setActivePane]);\n\n const chatProps: ChatCompositeProps = useMemo(() => {\n return {\n adapter: new CallWithChatBackedChatAdapter(callWithChatAdapter)\n };\n }, [callWithChatAdapter]);\n\n const modalLayerHostId = useId('modalLayerhost');\n\n const isInLobbyOrConnecting = currentPage === 'lobby';\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const isInLocalHold = currentPage === 'hold';\n const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState ?? 'None'));\n const showControlBar = isInLobbyOrConnecting || hasJoinedCall;\n const isMobileWithActivePane = mobileView && hasJoinedCall && activePane !== 'none';\n\n /** Constant setting of id for the parent stack of the composite */\n const compositeParentDivId = useId('callWithChatCompositeParentDiv-internal');\n\n const toggleChat = useCallback(() => {\n if (activePane === 'chat' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('chat');\n // timeout is required to give the window time to render the sendbox so we have something to send focus to.\n // TODO: Selecting elements in the DOM via attributes is not stable. We should expose an API from ChatComposite to be able to focus on the sendbox.\n const chatFocusTimeout = setInterval(() => {\n const callWithChatCompositeRootDiv = document.querySelector(`[id=\"${compositeParentDivId}\"]`);\n const sendbox = callWithChatCompositeRootDiv?.querySelector(`[id=\"sendbox\"]`) as HTMLTextAreaElement;\n if (sendbox !== null) {\n sendbox.focus();\n clearInterval(chatFocusTimeout);\n }\n }, 3);\n setTimeout(() => {\n clearInterval(chatFocusTimeout);\n }, 300);\n }\n }, [activePane, setActivePane, compositeParentDivId, hasJoinedCall]);\n\n const togglePeople = useCallback(() => {\n if (activePane === 'people' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('people');\n }\n }, [activePane, setActivePane, hasJoinedCall]);\n\n const selectChat = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('chat');\n }\n }, [setActivePane, hasJoinedCall]);\n\n const selectPeople = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('people');\n }\n }, [setActivePane, hasJoinedCall]);\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 togglePeople();\n }, [togglePeople]);\n\n // On mobile, when there is an active call and some side pane is active,\n // we hide the call composite via CSS to show only the pane.\n // We only set `display` to `none` instead of unmounting the call composite component tree\n // to avoid the performance cost of rerendering video streams when we later show the composite again.\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\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 /* @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 /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = callAdapter.getState().alternateCallerId;\n\n const callCompositeOptions: CallCompositeOptions = useMemo(\n () => ({\n callControls: false,\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks: props.deviceChecks,\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick: props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick: props.onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick: props.onEnvironmentInfoTroubleshootingClick\n }),\n [\n /* @conditional-compile-remove(call-readiness) */\n props.deviceChecks,\n /* @conditional-compile-remove(unsupported-browser) */\n props.onEnvironmentInfoTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onPermissionsTroubleshootingClick\n ]\n );\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill grow styles={compositeOuterContainerStyles} id={compositeParentDivId}>\n <Stack horizontal grow>\n <Stack.Item\n grow\n styles={callCompositeContainerStyles(mobileView)}\n // Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.\n style={callCompositeContainerCSS}\n >\n <CallComposite\n {...props}\n formFactor={formFactor}\n options={callCompositeOptions}\n adapter={callAdapter}\n fluentTheme={fluentTheme}\n />\n </Stack.Item>\n {\n /* @conditional-compile-remove(video-background-effects) */\n <VideoEffectsPane\n showVideoEffectsOptions={showVideoEffectsPane}\n setshowVideoEffectsOptions={setShowVideoEffectsPane}\n />\n }\n {chatProps.adapter && callAdapter && hasJoinedCall && (\n <CallWithChatPane\n chatCompositeProps={chatProps}\n inviteLink={props.joinInvitationURL}\n onClose={closePane}\n chatAdapter={chatProps.adapter}\n callAdapter={callAdapter}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n onChatButtonClicked={showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined}\n onPeopleButtonClicked={showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined}\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n activePane={activePane}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={props.fileSharing}\n rtl={props.rtl}\n callControls={typeof props.callControls !== 'boolean' ? props.callControls : undefined}\n />\n )}\n </Stack>\n {showControlBar && !isMobileWithActivePane && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <Stack.Item styles={controlBarContainerStyles}>\n <CallWithChatControlBar\n callAdapter={callAdapter}\n chatAdapter={chatProps.adapter}\n chatButtonChecked={activePane === 'chat'}\n onChatButtonClicked={toggleChat}\n peopleButtonChecked={activePane === 'people'}\n onPeopleButtonClicked={togglePeople}\n onMoreButtonClicked={onMoreButtonClicked}\n mobileView={mobileView}\n disableButtonsForLobbyPage={isInLobbyOrConnecting}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disableButtonsForHoldScreen={isInLocalHold}\n callControls={props.callControls}\n containerHeight={containerHeight}\n containerWidth={containerWidth}\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={alternateCallerId ? onClickShowDialpad : undefined}\n />\n </Stack.Item>\n </ChatAdapterProvider>\n )}\n {showControlBar && showDrawer && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <PreparedMoreDrawer\n callControls={props.callControls}\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 />\n </Stack>\n </CallAdapterProvider>\n </ChatAdapterProvider>\n )}\n\n {\n /* @conditional-compile-remove(PSTN-calls) */\n showControlBar && showDtmfDialpad && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <SendDtmfDialpad\n isMobile={mobileView}\n strings={dialpadStrings}\n showDialpad={showDtmfDialpad}\n onDismissDialpad={onDismissDtmfDialpad}\n />\n </Stack>\n </CallAdapterProvider>\n </ChatAdapterProvider>\n )\n }\n {\n // This layer host is for ModalLocalAndRemotePIP in CallWithChatPane. This LayerHost cannot be inside the CallWithChatPane\n // because when the CallWithChatPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n mobileView && <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />\n }\n </Stack>\n </div>\n );\n};\n\n/**\n * CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.\n *\n * @public\n */\nexport const CallWithChatComposite = (props: CallWithChatCompositeProps): JSX.Element => {\n const { adapter, fluentTheme, rtl, formFactor, joinInvitationURL, options } = props;\n return (\n <BaseProvider fluentTheme={fluentTheme} rtl={rtl} locale={props.locale} icons={props.icons}>\n <CallWithChatScreen\n {...props}\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks={options?.deviceChecks}\n callWithChatAdapter={adapter}\n formFactor={formFactor}\n callControls={options?.callControls}\n joinInvitationURL={joinInvitationURL}\n fluentTheme={fluentTheme}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={options?.fileSharing}\n />\n </BaseProvider>\n );\n};\n\nconst hasJoinedCallFn = (page: CallCompositePage, callStatus: CallState): boolean => {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */\n return (\n (page === 'call' &&\n (callStatus === 'Connected' || callStatus === 'RemoteHold' || callStatus === 'Disconnecting')) ||\n (page === 'hold' && (callStatus === 'LocalHold' || callStatus === 'Disconnecting'))\n );\n return page === 'call' && (callStatus === 'Connected' || callStatus === 'Disconnecting');\n};\n\nconst showShowChatTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.chatButton !== false;\n};\n\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.peopleButton !== false;\n};\n\"../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallWithChatComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAk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AAC,CACpF,CAAC;IACF,OAAO,IAAI,KAAK,MAAM,IAAI,CAAC,UAAU,KAAK,WAAW,IAAI,UAAU,KAAK,eAAe,CAAC,CAAC;AAC3F,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,CAAC,YAAmD,EAAW,EAAE;IACnG,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,UAAU,KAAK,KAAK,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,YAAmD,EAAW,EAAE;IACrG,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,YAAY,KAAK,KAAK,CAAC;AAC7C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useState, useMemo, useEffect, useRef } from 'react';\nimport { LayerHost, mergeStyles, PartialTheme, Stack, Theme } from '@fluentui/react';\nimport { CallComposite, CallCompositePage } from '../CallComposite';\nimport { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';\nimport { CommonCallControlBar } from '../common/ControlBar/CommonCallControlBar';\nimport { CallState } from '@azure/communication-calling';\nimport {\n callCompositeContainerStyles,\n compositeOuterContainerStyles,\n controlBarContainerStyles\n} from './styles/CallWithChatCompositeStyles';\nimport { CallWithChatAdapter } from './adapter/CallWithChatAdapter';\nimport { CallWithChatBackedCallAdapter } from './adapter/CallWithChatBackedCallAdapter';\nimport { CallWithChatBackedChatAdapter } from './adapter/CallWithChatBackedChatAdapter';\nimport { CallAdapter } from '../CallComposite';\nimport { ChatCompositeProps } from '../ChatComposite';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallWithChatCompositeIcons } from '../common/icons';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ChatAdapterProvider } from '../ChatComposite/adapter/ChatAdapterProvider';\nimport { CallWithChatAdapterState } from './state/CallWithChatAdapterState';\nimport { PreparedMoreDrawer } from '../common/Drawer/PreparedMoreDrawer';\nimport { ParticipantMenuItemsCallback, _useContainerHeight, _useContainerWidth } from '@internal/react-components';\nimport { useId } from '@fluentui/react-hooks';\nimport { CallWithChatPane, CallWithChatPaneOption } from './CallWithChatPane';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileSharingOptions } from '../ChatComposite';\nimport { containerDivStyles } from '../common/ContainerRectProps';\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';\nimport { CallCompositeOptions } from '../CallComposite/CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite/CallComposite';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\nimport { CommonCallControlOptions } from '../common/types/CommonCallControlOptions';\n\n/**\n * Props required for the {@link CallWithChatComposite}\n *\n * @public\n */\nexport interface CallWithChatCompositeProps extends BaseCompositeProps<CallWithChatCompositeIcons> {\n adapter: CallWithChatAdapter;\n /**\n * Fluent theme for the composite.\n *\n * Defaults to a light theme if undefined.\n */\n fluentTheme?: PartialTheme | Theme;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL that can be used to copy a call-with-chat invite to the Users clipboard.\n */\n joinInvitationURL?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallWithChatComposite}\n */\n options?: CallWithChatCompositeOptions;\n}\n\n/**\n * Customization options for the control bar in calling with chat experience.\n *\n * @public\n */\nexport interface CallWithChatControlOptions extends CommonCallControlOptions {\n /**\n * Show or hide the chat button in the call-with-chat composite control bar.\n * @defaultValue true\n */\n chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n}\n\n/**\n * Optional features of the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport type CallWithChatCompositeOptions = {\n /**\n * Call control options to change what buttons show on the call-with-chat composite control bar.\n * If using the boolean values, true will cause default behavior across the whole control bar. False hides the whole control bar.\n */\n callControls?: boolean | CallWithChatControlOptions;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Properties for configuring the File Sharing feature.\n * If undefined, file sharing feature will be disabled.\n * @beta\n */\n fileSharing?: FileSharingOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permissions check options for your call.\n * Here you can choose what device permissions you prompt the user for,\n * as well as what device permissions must be accepted before starting a call.\n */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Optional callback to supply users with further troubleshooting steps for network issues\n * experienced when connecting to a call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\ntype CallWithChatScreenProps = {\n callWithChatAdapter: CallWithChatAdapter;\n fluentTheme?: PartialTheme | Theme;\n formFactor?: 'desktop' | 'mobile';\n joinInvitationURL?: string;\n callControls?: boolean | CallWithChatControlOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?: FileSharingOptions;\n rtl?: boolean;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\nconst CallWithChatScreen = (props: CallWithChatScreenProps): JSX.Element => {\n const { callWithChatAdapter, fluentTheme, formFactor = 'desktop' } = props;\n const mobileView = formFactor === 'mobile';\n\n if (!callWithChatAdapter) {\n throw new Error('CallWithChatAdapter is undefined');\n }\n\n const callAdapter: CallAdapter = useMemo(\n () => new CallWithChatBackedCallAdapter(callWithChatAdapter),\n [callWithChatAdapter]\n );\n\n const [currentCallState, setCurrentCallState] = useState<CallState>();\n const [currentPage, setCurrentPage] = useState<CallCompositePage>();\n const [activePane, setActivePane] = useState<CallWithChatPaneOption>('none');\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n useEffect(() => {\n const updateCallWithChatPage = (newState: CallWithChatAdapterState): void => {\n setCurrentPage(newState.page);\n setCurrentCallState(newState.call?.state);\n };\n updateCallWithChatPage(callWithChatAdapter.getState());\n callWithChatAdapter.onStateChange(updateCallWithChatPage);\n return () => {\n callWithChatAdapter.offStateChange(updateCallWithChatPage);\n };\n }, [callWithChatAdapter]);\n\n const closePane = useCallback(() => {\n setActivePane('none');\n }, [setActivePane]);\n\n const chatProps: ChatCompositeProps = useMemo(() => {\n return {\n adapter: new CallWithChatBackedChatAdapter(callWithChatAdapter)\n };\n }, [callWithChatAdapter]);\n\n const modalLayerHostId = useId('modalLayerhost');\n\n const isInLobbyOrConnecting = currentPage === 'lobby';\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const isInLocalHold = currentPage === 'hold';\n const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState ?? 'None'));\n const showControlBar = isInLobbyOrConnecting || hasJoinedCall;\n const isMobileWithActivePane = mobileView && hasJoinedCall && activePane !== 'none';\n\n /** Constant setting of id for the parent stack of the composite */\n const compositeParentDivId = useId('callWithChatCompositeParentDiv-internal');\n\n const toggleChat = useCallback(() => {\n if (activePane === 'chat' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('chat');\n // timeout is required to give the window time to render the sendbox so we have something to send focus to.\n // TODO: Selecting elements in the DOM via attributes is not stable. We should expose an API from ChatComposite to be able to focus on the sendbox.\n const chatFocusTimeout = setInterval(() => {\n const callWithChatCompositeRootDiv = document.querySelector(`[id=\"${compositeParentDivId}\"]`);\n const sendbox = callWithChatCompositeRootDiv?.querySelector(`[id=\"sendbox\"]`) as HTMLTextAreaElement;\n if (sendbox !== null) {\n sendbox.focus();\n clearInterval(chatFocusTimeout);\n }\n }, 3);\n setTimeout(() => {\n clearInterval(chatFocusTimeout);\n }, 300);\n }\n }, [activePane, setActivePane, compositeParentDivId, hasJoinedCall]);\n\n const togglePeople = useCallback(() => {\n if (activePane === 'people' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('people');\n }\n }, [activePane, setActivePane, hasJoinedCall]);\n\n const selectChat = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('chat');\n }\n }, [setActivePane, hasJoinedCall]);\n\n const selectPeople = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('people');\n }\n }, [setActivePane, hasJoinedCall]);\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 togglePeople();\n }, [togglePeople]);\n\n // On mobile, when there is an active call and some side pane is active,\n // we hide the call composite via CSS to show only the pane.\n // We only set `display` to `none` instead of unmounting the call composite component tree\n // to avoid the performance cost of rerendering video streams when we later show the composite again.\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\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 /* @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 /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = callAdapter.getState().alternateCallerId;\n /* @conditional-compile-remove(close-captions) */\n const isTeamsCall = callAdapter.getState().isTeamsCall;\n\n const callCompositeOptions: CallCompositeOptions = useMemo(\n () => ({\n callControls: false,\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks: props.deviceChecks,\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick: props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick: props.onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick: props.onEnvironmentInfoTroubleshootingClick\n }),\n [\n /* @conditional-compile-remove(call-readiness) */\n props.deviceChecks,\n /* @conditional-compile-remove(unsupported-browser) */\n props.onEnvironmentInfoTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onPermissionsTroubleshootingClick\n ]\n );\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill grow styles={compositeOuterContainerStyles} id={compositeParentDivId}>\n <Stack horizontal grow>\n <Stack.Item\n grow\n styles={callCompositeContainerStyles(mobileView)}\n // Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.\n style={callCompositeContainerCSS}\n >\n <CallComposite\n {...props}\n formFactor={formFactor}\n options={callCompositeOptions}\n adapter={callAdapter}\n fluentTheme={fluentTheme}\n />\n </Stack.Item>\n {chatProps.adapter && callAdapter && hasJoinedCall && (\n <CallWithChatPane\n chatCompositeProps={chatProps}\n inviteLink={props.joinInvitationURL}\n onClose={closePane}\n chatAdapter={chatProps.adapter}\n callAdapter={callAdapter}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n onChatButtonClicked={showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined}\n onPeopleButtonClicked={showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined}\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n activePane={activePane}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={props.fileSharing}\n rtl={props.rtl}\n callControls={typeof props.callControls !== 'boolean' ? props.callControls : undefined}\n />\n )}\n </Stack>\n {showControlBar && !isMobileWithActivePane && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <Stack.Item styles={controlBarContainerStyles}>\n <CommonCallControlBar\n callAdapter={callAdapter}\n chatAdapter={chatProps.adapter}\n chatButtonChecked={activePane === 'chat'}\n onChatButtonClicked={toggleChat}\n peopleButtonChecked={activePane === 'people'}\n onPeopleButtonClicked={togglePeople}\n onMoreButtonClicked={onMoreButtonClicked}\n mobileView={mobileView}\n disableButtonsForLobbyPage={isInLobbyOrConnecting}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disableButtonsForHoldScreen={isInLocalHold}\n callControls={props.callControls}\n containerHeight={containerHeight}\n containerWidth={containerWidth}\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={alternateCallerId ? onClickShowDialpad : undefined}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={isTeamsCall && hasJoinedCall}\n rtl={props.rtl}\n />\n </Stack.Item>\n </ChatAdapterProvider>\n )}\n {showControlBar && showDrawer && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <PreparedMoreDrawer\n callControls={props.callControls}\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 </CallAdapterProvider>\n </ChatAdapterProvider>\n )}\n\n {\n /* @conditional-compile-remove(PSTN-calls) */\n showControlBar && showDtmfDialpad && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <SendDtmfDialpad\n isMobile={mobileView}\n strings={dialpadStrings}\n showDialpad={showDtmfDialpad}\n onDismissDialpad={onDismissDtmfDialpad}\n />\n </Stack>\n </CallAdapterProvider>\n </ChatAdapterProvider>\n )\n }\n {\n // This layer host is for ModalLocalAndRemotePIP in CallWithChatPane. This LayerHost cannot be inside the CallWithChatPane\n // because when the CallWithChatPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n mobileView && <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />\n }\n </Stack>\n </div>\n );\n};\n\n/**\n * CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.\n *\n * @public\n */\nexport const CallWithChatComposite = (props: CallWithChatCompositeProps): JSX.Element => {\n const { adapter, fluentTheme, rtl, formFactor, joinInvitationURL, options } = props;\n return (\n <BaseProvider fluentTheme={fluentTheme} rtl={rtl} locale={props.locale} icons={props.icons}>\n <CallWithChatScreen\n {...props}\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks={options?.deviceChecks}\n callWithChatAdapter={adapter}\n formFactor={formFactor}\n callControls={options?.callControls}\n joinInvitationURL={joinInvitationURL}\n fluentTheme={fluentTheme}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={options?.fileSharing}\n />\n </BaseProvider>\n );\n};\n\nconst hasJoinedCallFn = (page: CallCompositePage, callStatus: CallState): boolean => {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */\n return (\n (page === 'call' &&\n (callStatus === 'Connected' || callStatus === 'RemoteHold' || callStatus === 'Disconnecting')) ||\n (page === 'hold' && (callStatus === 'LocalHold' || callStatus === 'Disconnecting'))\n );\n return page === 'call' && (callStatus === 'Connected' || callStatus === 'Disconnecting');\n};\n\nconst showShowChatTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.chatButton !== false;\n};\n\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.peopleButton !== false;\n};\n\"../../../../react-components/src\""]}