@azure/communication-react 1.20.0-beta.1 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (634) hide show
  1. package/README.md +2 -2
  2. package/dist/communication-react.d.ts +245 -1703
  3. package/dist/dist-cjs/communication-react/index.js +36159 -165
  4. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/common.d.ts +0 -13
  6. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/constants.d.ts +0 -5
  8. package/dist/dist-esm/acs-ui-common/src/constants.js +0 -5
  9. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/index.d.ts +0 -4
  11. package/dist/dist-esm/acs-ui-common/src/index.js +0 -3
  12. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  14. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  15. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.d.ts +16 -7
  16. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +10 -10
  17. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
  18. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.d.ts +17 -7
  19. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +12 -10
  20. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -1
  21. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.d.ts +13 -7
  22. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +10 -9
  23. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -1
  24. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.d.ts +16 -7
  25. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +10 -9
  26. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +3 -12
  28. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -12
  29. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -2
  33. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js +2 -1
  35. package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js.map +1 -1
  36. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +12 -2
  37. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +26 -6
  38. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +6 -0
  40. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -5
  41. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +2 -0
  43. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +2 -19
  44. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  45. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -2
  46. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -2
  47. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  48. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +1 -35
  49. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  50. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  51. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  52. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  53. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +1 -2
  54. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +3 -3
  55. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  57. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -79
  59. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -15
  61. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +32 -107
  62. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  64. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -5
  65. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -27
  66. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  67. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
  68. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
  69. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  70. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +58 -52
  71. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  72. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  73. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  74. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  75. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +5 -3
  76. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  77. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  78. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  79. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  80. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  81. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  82. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  83. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  84. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  85. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
  86. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  87. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  88. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  89. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  90. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  91. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  92. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  93. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  94. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  95. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  96. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  97. package/dist/dist-esm/communication-react/src/index.d.ts +1 -27
  98. package/dist/dist-esm/communication-react/src/index.js +0 -6
  99. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  100. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js +3 -2
  101. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  103. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -2
  104. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +7 -34
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  119. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  121. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  122. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  123. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  124. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  125. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  126. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  127. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  128. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  130. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  131. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +6 -4
  132. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  133. package/dist/dist-esm/react-components/src/components/GridLayout.js +3 -0
  134. package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +4 -5
  136. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  138. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  140. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  141. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  142. package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js +3 -0
  143. package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -0
  145. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +4 -4
  146. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js +2 -1
  148. package/dist/dist-esm/react-components/src/components/MeetingConferencePhoneInfo.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  150. package/dist/dist-esm/react-components/src/components/MessageThread.js +6 -16
  151. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +24 -0
  153. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +25 -0
  154. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  155. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +2 -1
  156. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/Notification.js +3 -1
  158. package/dist/dist-esm/react-components/src/components/Notification.js.map +1 -1
  159. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +0 -20
  160. package/dist/dist-esm/react-components/src/components/NotificationStack.js +0 -5
  161. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  162. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
  163. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  165. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  166. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/components/ReactionButton.js +31 -41
  168. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  170. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  171. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +7 -3
  173. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
  174. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  175. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  176. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  177. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  179. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  180. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  181. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  182. package/dist/dist-esm/react-components/src/components/VerticalGallery.js +2 -1
  183. package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
  184. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +3 -3
  185. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  186. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +6 -2
  187. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
  188. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +5 -4
  189. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -1
  190. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +1 -1
  191. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  192. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +23 -17
  193. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  194. package/dist/dist-esm/react-components/src/components/VideoGallery.js +3 -3
  195. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  196. package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -0
  197. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  198. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -20
  199. package/dist/dist-esm/react-components/src/components/index.js +0 -7
  200. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  201. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  202. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  203. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  204. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  205. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  206. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.d.ts +13 -6
  207. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +49 -19
  208. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
  209. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.d.ts +0 -6
  210. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js +6 -35
  211. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js.map +1 -1
  212. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js +5 -2
  213. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js.map +1 -1
  214. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +2 -1
  215. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  216. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  217. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  218. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  219. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  220. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  221. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  222. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  223. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  224. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  226. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  228. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  229. package/dist/dist-esm/react-components/src/components/utils/responsive.js +6 -0
  230. package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
  231. package/dist/dist-esm/react-components/src/components/utils.js +1 -6
  232. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  233. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
  234. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  235. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  236. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  237. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  238. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  239. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -54
  240. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  241. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +1 -1
  242. package/dist/dist-esm/react-components/src/theming/generateTheme.js +10 -2
  243. package/dist/dist-esm/react-components/src/theming/generateTheme.js.map +1 -1
  244. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -30
  245. package/dist/dist-esm/react-components/src/theming/icons.js +0 -91
  246. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  247. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  248. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  249. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  250. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  251. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  252. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  253. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -72
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +13 -23
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +4 -34
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +17 -47
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +68 -137
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +26 -24
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.d.ts +2 -2
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js +6 -7
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/OnFetchProfileCallback.js +9 -4
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/OnFetchProfileCallback.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +2 -0
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +21 -24
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -3
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +50 -13
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +41 -25
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +12 -10
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +1 -1
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +1 -0
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
  297. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +1 -0
  298. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +1 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -1
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +7 -4
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +5 -2
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +7 -6
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +4 -4
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
  309. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +7 -23
  310. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  311. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +3 -0
  312. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +6 -7
  313. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  314. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +5 -5
  315. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -2
  317. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +9 -5
  319. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  320. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -3
  321. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  322. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -2
  323. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  324. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  325. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +16 -53
  326. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +7 -9
  328. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
  329. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  330. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  331. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  332. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +5 -2
  334. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  335. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +21 -25
  336. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +16 -16
  337. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  338. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +1 -1
  339. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  340. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js +2 -1
  341. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js.map +1 -1
  342. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +10 -11
  343. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  344. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +2 -14
  345. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +12 -68
  346. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  347. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
  348. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -24
  349. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  350. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -8
  351. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -22
  353. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +14 -139
  354. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  355. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +11 -28
  356. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  357. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +2 -2
  358. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +13 -9
  359. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  361. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  362. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  363. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +11 -11
  364. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -2
  365. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  366. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -5
  367. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
  368. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  370. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  371. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  372. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  373. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +49 -234
  374. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  375. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  376. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  377. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  378. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  379. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  380. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  381. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  382. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  383. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  384. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +6 -0
  385. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
  386. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
  387. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  388. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  389. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +12 -0
  390. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +9 -0
  391. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
  392. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +28 -15
  393. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  394. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js +4 -1
  395. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js.map +1 -1
  396. package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js +1 -1
  397. package/dist/dist-esm/react-composites/src/composites/common/MeetingPhoneInfoPaneContent.js.map +1 -1
  398. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +5 -6
  399. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  400. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  401. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  402. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +3 -0
  403. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +4 -7
  404. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  405. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  406. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  407. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  408. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +2 -0
  409. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -4
  410. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  411. package/dist/dist-esm/react-composites/src/composites/common/adapters.d.ts +0 -23
  412. package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
  413. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  414. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  415. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  416. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +6 -32
  417. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
  418. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  419. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.d.ts +8 -0
  420. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.js +24 -0
  421. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependency.js.map +1 -0
  422. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.d.ts +8 -0
  423. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.js +24 -0
  424. package/dist/dist-esm/react-composites/src/composites/common/resolveDeepNoiseSuppressionDependencyLazy.js.map +1 -0
  425. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  426. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +0 -4
  427. package/dist/dist-esm/react-composites/src/composites/common/utils.js +0 -22
  428. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  429. package/dist/dist-esm/react-composites/src/composites/index.d.ts +2 -1
  430. package/dist/dist-esm/react-composites/src/composites/index.js +2 -0
  431. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  432. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +2 -1
  433. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +2 -1
  434. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +2 -1
  435. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +2 -1
  436. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +2 -1
  437. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +2 -1
  438. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +2 -1
  439. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +2 -1
  440. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +2 -1
  441. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +2 -1
  442. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +2 -1
  443. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +2 -1
  444. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +1 -0
  445. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +2 -1
  446. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +2 -1
  447. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +2 -1
  448. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +2 -1
  449. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +2 -1
  450. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +2 -1
  451. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +2 -1
  452. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +2 -1
  453. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +2 -1
  454. package/package.json +8 -9
  455. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CK3wKmiQ.js +0 -202
  456. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CK3wKmiQ.js.map +0 -1
  457. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Duh89Mej.js +0 -50
  458. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Duh89Mej.js.map +0 -1
  459. package/dist/dist-cjs/communication-react/index-XC7Z08jO.js +0 -42425
  460. package/dist/dist-cjs/communication-react/index-XC7Z08jO.js.map +0 -1
  461. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  462. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -16
  463. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  464. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  465. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  466. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  467. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.d.ts +0 -20
  468. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +0 -118
  469. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +0 -1
  470. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  471. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  472. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  473. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  474. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  475. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  476. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  477. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  478. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  479. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  480. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -192
  481. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  482. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  483. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  484. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  485. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  486. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  487. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  488. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  489. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  490. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  491. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  492. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -39
  493. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  494. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  495. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  496. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  497. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  498. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  499. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  500. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  501. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  502. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  503. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -12
  504. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -23
  505. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  506. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  507. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  508. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  509. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  510. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  511. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  512. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  513. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  514. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  515. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  516. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  517. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  518. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -29
  519. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -87
  520. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  521. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -58
  522. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -314
  523. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  524. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  525. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  526. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  527. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -211
  528. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -168
  529. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  530. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  531. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  532. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  533. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  534. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
  535. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  536. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  537. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  538. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  539. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  540. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  541. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  542. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  543. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  544. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  545. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  546. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  547. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  548. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  549. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  550. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  551. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  552. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  553. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  554. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  555. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -816
  556. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  557. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  558. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  559. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  560. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  561. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  562. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  563. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  564. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
  565. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  566. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  567. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  568. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  569. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  570. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  571. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  572. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  573. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  574. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  575. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  576. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  577. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  578. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -72
  579. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -174
  580. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  581. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  582. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -116
  583. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  584. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  585. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  586. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  587. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  588. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  589. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  590. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.d.ts +0 -47
  591. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js +0 -48
  592. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js.map +0 -1
  593. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.d.ts +0 -11
  594. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js +0 -36
  595. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +0 -1
  596. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  597. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -196
  598. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  599. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.d.ts +0 -7
  600. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js +0 -14
  601. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js.map +0 -1
  602. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  603. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  604. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  605. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.d.ts +0 -8
  606. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js +0 -25
  607. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js.map +0 -1
  608. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  609. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  610. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  611. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  612. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  613. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  614. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  615. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  616. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  617. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  618. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -253
  619. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  620. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  621. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  622. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  623. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  624. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  625. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  626. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  627. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  628. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  629. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.d.ts +0 -12
  630. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js +0 -52
  631. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js.map +0 -1
  632. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  633. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  634. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1,12 +1,10 @@
1
1
  import { ChatClientState, StatefulChatClient } from "../../../../../chat-stateful-client/src";
2
2
  import { ChatThreadClient, SendMessageOptions } from '@azure/communication-chat';
3
3
  import { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';
4
- import type { UploadChatImageResult } from "../../../../../acs-ui-common/src";
5
4
  import { _TelemetryImplementationHint } from "../../../../../acs-ui-common/src";
6
5
  import { ChatAdapter, ChatAdapterState, MessageDeletedListener, MessageEditedListener, MessageReadListener, MessageReceivedListener, ParticipantsAddedListener, ParticipantsRemovedListener, TopicChangedListener } from './ChatAdapter';
7
6
  import { ResourceDetails } from './ChatAdapter';
8
7
  import { AdapterError } from '../../common/adapters';
9
- import { MessageOptions } from "../../../../../acs-ui-common/src";
10
8
  /**
11
9
  * Context of Chat, which is a centralized context for all state updates
12
10
  * @private
@@ -39,15 +37,13 @@ export declare class AzureCommunicationChatAdapter implements ChatAdapter {
39
37
  getState(): ChatAdapterState;
40
38
  onStateChange(handler: (state: ChatAdapterState) => void): void;
41
39
  offStateChange(handler: (state: ChatAdapterState) => void): void;
42
- sendMessage(content: string, options?: SendMessageOptions | MessageOptions): Promise<void>;
43
- uploadImage(image: Blob, imageFilename: string): Promise<UploadChatImageResult>;
44
- deleteImage(imageId: string): Promise<void>;
40
+ sendMessage(content: string, options?: SendMessageOptions): Promise<void>;
45
41
  sendReadReceipt(chatMessageId: string): Promise<void>;
46
42
  sendTypingIndicator(): Promise<void>;
47
43
  removeParticipant(userId: string): Promise<void>;
48
44
  setTopic(topicName: string): Promise<void>;
49
45
  loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
50
- updateMessage(messageId: string, content: string, options?: Record<string, string> | MessageOptions): Promise<void>;
46
+ updateMessage(messageId: string, content: string, options?: Record<string, string>): Promise<void>;
51
47
  deleteMessage(messageId: string): Promise<void>;
52
48
  downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;
53
49
  removeResourceFromCache(resourceDetails: ResourceDetails): void;
@@ -69,7 +69,6 @@ export class ChatContext {
69
69
  thread,
70
70
  latestErrors: clientState.latestErrors
71
71
  };
72
- updatedState = Object.assign({}, updatedState);
73
72
  this.setState(updatedState);
74
73
  }
75
74
  }
@@ -102,8 +101,6 @@ export class AzureCommunicationChatAdapter {
102
101
  this.dispose = this.dispose.bind(this);
103
102
  this.fetchInitialData = this.fetchInitialData.bind(this);
104
103
  this.sendMessage = this.sendMessage.bind(this);
105
- this.uploadImage = this.uploadImage.bind(this);
106
- this.deleteImage = this.deleteImage.bind(this);
107
104
  this.sendReadReceipt = this.sendReadReceipt.bind(this);
108
105
  this.sendTypingIndicator = this.sendTypingIndicator.bind(this);
109
106
  this.updateMessage = this.updateMessage.bind(this);
@@ -165,20 +162,6 @@ export class AzureCommunicationChatAdapter {
165
162
  }));
166
163
  });
167
164
  }
168
- uploadImage(image, imageFilename) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
171
- return yield this.handlers.onUploadImage(image, imageFilename);
172
- }));
173
- });
174
- }
175
- deleteImage(imageId) {
176
- return __awaiter(this, void 0, void 0, function* () {
177
- return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
178
- return yield this.handlers.onDeleteImage(imageId);
179
- }));
180
- });
181
- }
182
165
  sendReadReceipt(chatMessageId) {
183
166
  return __awaiter(this, void 0, void 0, function* () {
184
167
  yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
@@ -217,25 +200,6 @@ export class AzureCommunicationChatAdapter {
217
200
  updateMessage(messageId, content, options) {
218
201
  return __awaiter(this, void 0, void 0, function* () {
219
202
  return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
220
- var _a;
221
- const messageOptions = {};
222
- if (options && (
223
- // if options.attachments is an array or undefined (for removal all attachments),
224
- // then given options is a MessageOptions
225
- Array.isArray(options.attachments) || options.attachments === undefined)) {
226
- messageOptions.attachments = (_a = options.attachments) !== null && _a !== void 0 ? _a : [];
227
- }
228
- if (options &&
229
- // if options.metadata is provided, we need to add it in MessageOptions
230
- options.metadata && typeof options.metadata === 'object') {
231
- messageOptions.metadata = options.metadata;
232
- }
233
- if (options && !('attachments' in options) && !('metadata' in options)) {
234
- // if options don't have attachments or metadata,
235
- // then it is a Record<string, string>
236
- return yield this.handlers.onUpdateMessage(messageId, content, options);
237
- }
238
- return yield this.handlers.onUpdateMessage(messageId, content, messageOptions);
239
203
  // metadata is never used in the current stable
240
204
  return yield this.handlers.onUpdateMessage(messageId, content);
241
205
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"AzureCommunicationChatAdapter.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;;;;;;;;AAElC,OAAO,EAAE,8BAA8B,EAAkD,gDAAuC;AAChI,OAAO,EAAgB,yBAAyB,EAAE,mDAA0C;AAK5F,OAAO,EAAE,6BAA6B,EAAgC,yCAAgC;AACtG,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,yCAAgC;AAC7D,OAAO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AAW,GAAG,CAAC,CAAQ,EAAkB,EAAE;IAC/C,OAAO,QAAQ,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,SAAS,IAAI,YAAY,IAAI,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC;AAC1G,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _createStatefulChatClientInner, ChatClientState, ChatError, StatefulChatClient } from '@internal/chat-stateful-client';\nimport { ChatHandlers, createDefaultChatHandlers } from '@internal/chat-component-bindings';\nimport { ChatMessage, ChatMessageType, ChatThreadClient, SendMessageOptions } from '@azure/communication-chat';\nimport { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport type { ChatMessageDeletedEvent, ChatMessageEditedEvent, ChatMessageReceivedEvent, ChatThreadPropertiesUpdatedEvent, ParticipantsAddedEvent, ParticipantsRemovedEvent, ReadReceiptReceivedEvent } from '@azure/communication-chat';\nimport type { UploadChatImageResult } from '@internal/acs-ui-common';\nimport { toFlatCommunicationIdentifier, _TelemetryImplementationHint } from '@internal/acs-ui-common';\nimport { EventEmitter } from 'events';\nimport { ChatAdapter, ChatAdapterState, MessageDeletedListener, MessageEditedListener, MessageReadListener, MessageReceivedListener, ParticipantsAddedListener, ParticipantsRemovedListener, TopicChangedListener } from './ChatAdapter';\nimport { ResourceDetails } from './ChatAdapter';\nimport { AdapterError } from '../../common/adapters';\nimport { useEffect, useRef, useState } from 'react';\nimport { _isValidIdentifier } from '@internal/acs-ui-common';\nimport { TEAMS_LIMITATION_LEARN_MORE, UNSUPPORTED_CHAT_THREAD_TYPE } from '../../common/constants';\nimport { MessageOptions } from '@internal/acs-ui-common';\n\n/**\n * Context of Chat, which is a centralized context for all state updates\n * @private\n */\nexport class ChatContext {\n private emitter: EventEmitter = new EventEmitter();\n private state: ChatAdapterState;\n private threadId: string;\n constructor(clientState: ChatClientState, threadId: string) {\n const thread = clientState.threads[threadId];\n this.threadId = threadId;\n if (!thread) {\n throw 'Cannot find threadId, please initialize thread before use!';\n }\n this.state = {\n userId: clientState.userId,\n displayName: clientState.displayName,\n thread,\n latestErrors: clientState.latestErrors\n };\n }\n public onStateChange(handler: (_uiState: ChatAdapterState) => void): void {\n this.emitter.on('stateChanged', handler);\n }\n public offStateChange(handler: (_uiState: ChatAdapterState) => void): void {\n this.emitter.off('stateChanged', handler);\n }\n public setState(state: ChatAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', this.state);\n }\n public getState(): ChatAdapterState {\n return this.state;\n }\n public setError(error: Error): void {\n this.setState({\n ...this.state,\n error\n });\n }\n public updateClientState(clientState: ChatClientState): void {\n const thread = clientState.threads[this.threadId];\n if (!thread) {\n throw 'Cannot find threadId, please make sure thread state is still in Stateful ChatClient.';\n }\n let updatedState: ChatAdapterState = {\n userId: clientState.userId,\n displayName: clientState.displayName,\n thread,\n latestErrors: clientState.latestErrors\n };\n updatedState = {\n ...updatedState\n };\n this.setState(updatedState);\n }\n}\n\n/**\n * @private\n */\nexport class AzureCommunicationChatAdapter implements ChatAdapter {\n private chatClient: StatefulChatClient;\n private chatThreadClient: ChatThreadClient;\n private context: ChatContext;\n private handlers: ChatHandlers;\n private emitter: EventEmitter = new EventEmitter();\n constructor(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient) {\n this.bindAllPublicMethods();\n this.chatClient = chatClient;\n this.chatThreadClient = chatThreadClient;\n this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId);\n const onStateChange = (clientState: ChatClientState): void => {\n // unsubscribe when the instance gets disposed\n if (!this) {\n chatClient.offStateChange(onStateChange);\n return;\n }\n this.context.updateClientState(clientState);\n };\n this.handlers = createDefaultChatHandlers(chatClient, chatThreadClient);\n this.chatClient.onStateChange(onStateChange);\n this.subscribeAllEvents();\n }\n private bindAllPublicMethods(): void {\n this.onStateChange = this.onStateChange.bind(this);\n this.offStateChange = this.offStateChange.bind(this);\n this.getState = this.getState.bind(this);\n this.dispose = this.dispose.bind(this);\n this.fetchInitialData = this.fetchInitialData.bind(this);\n this.sendMessage = this.sendMessage.bind(this);\n this.uploadImage = this.uploadImage.bind(this);\n this.deleteImage = this.deleteImage.bind(this);\n this.sendReadReceipt = this.sendReadReceipt.bind(this);\n this.sendTypingIndicator = this.sendTypingIndicator.bind(this);\n this.updateMessage = this.updateMessage.bind(this);\n this.deleteMessage = this.deleteMessage.bind(this);\n this.removeParticipant = this.removeParticipant.bind(this);\n this.setTopic = this.setTopic.bind(this);\n this.loadPreviousChatMessages = this.loadPreviousChatMessages.bind(this);\n this.on = this.on.bind(this);\n this.off = this.off.bind(this);\n this.downloadResourceToCache = this.downloadResourceToCache.bind(this);\n this.removeResourceFromCache = this.removeResourceFromCache.bind(this);\n }\n dispose(): void {\n this.unsubscribeAllEvents();\n this.chatClient.dispose();\n }\n async fetchInitialData(): Promise<void> {\n // If get properties fails we dont want to try to get the participants after.\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.chatThreadClient.getProperties();\n // Fetch all participants who joined before the local user.\n for await (const _page of this.chatThreadClient.listParticipants().byPage({\n // Fetch 100 participants per page by default.\n maxPageSize: 100\n // eslint-disable-next-line curly\n }));\n });\n }\n getState(): ChatAdapterState {\n return this.context.getState();\n }\n onStateChange(handler: (state: ChatAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n offStateChange(handler: (state: ChatAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n async sendMessage(content: string, options?: SendMessageOptions | MessageOptions): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onSendMessage(content, options);\n });\n }\n async uploadImage(image: Blob, imageFilename: string): Promise<UploadChatImageResult> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onUploadImage(image, imageFilename);\n });\n }\n async deleteImage(imageId: string): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onDeleteImage(imageId);\n });\n }\n async sendReadReceipt(chatMessageId: string): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onMessageSeen(chatMessageId);\n });\n }\n async sendTypingIndicator(): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onTyping();\n });\n }\n async removeParticipant(userId: string): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onRemoveParticipant(userId);\n });\n }\n async setTopic(topicName: string): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.updateThreadTopicName(topicName);\n });\n }\n async loadPreviousChatMessages(messagesToLoad: number): Promise<boolean> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onLoadPreviousChatMessages(messagesToLoad);\n });\n }\n async updateMessage(messageId: string, content: string, options?: Record<string, string> | MessageOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n const messageOptions: MessageOptions = {};\n if (options && (\n // if options.attachments is an array or undefined (for removal all attachments),\n // then given options is a MessageOptions\n Array.isArray(options.attachments) || options.attachments === undefined)) {\n messageOptions.attachments = options.attachments ?? [];\n }\n if (options &&\n // if options.metadata is provided, we need to add it in MessageOptions\n options.metadata && typeof options.metadata === 'object') {\n messageOptions.metadata = options.metadata;\n }\n if (options && !('attachments' in options) && !('metadata' in options)) {\n // if options don't have attachments or metadata,\n // then it is a Record<string, string>\n return await this.handlers.onUpdateMessage(messageId, content, options);\n }\n return await this.handlers.onUpdateMessage(messageId, content, messageOptions);\n // metadata is never used in the current stable\n return await this.handlers.onUpdateMessage(messageId, content);\n });\n }\n async deleteMessage(messageId: string): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onDeleteMessage(messageId);\n });\n }\n async downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void> {\n this.chatClient.downloadResourceToCache(resourceDetails.threadId, resourceDetails.messageId, resourceDetails.resourceUrl);\n }\n removeResourceFromCache(resourceDetails: ResourceDetails): void {\n this.chatClient.removeResourceFromCache(resourceDetails.threadId, resourceDetails.messageId, resourceDetails.resourceUrl);\n }\n private messageReceivedListener(event: ChatMessageReceivedEvent): void {\n const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;\n if (!isCurrentChatAdapterThread) {\n return;\n }\n const message = convertEventToChatMessage(event);\n this.emitter.emit('messageReceived', {\n message\n });\n const currentUserId = toFlatCommunicationIdentifier(this.chatClient.getState().userId);\n if (message?.sender && toFlatCommunicationIdentifier(message.sender) === currentUserId) {\n this.emitter.emit('messageSent', {\n message\n });\n }\n }\n private messageEditedListener(event: ChatMessageEditedEvent): void {\n const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;\n if (!isCurrentChatAdapterThread) {\n return;\n }\n const message = convertEventToChatMessage(event);\n this.emitter.emit('messageEdited', {\n message\n });\n }\n private messageDeletedListener(event: ChatMessageDeletedEvent): void {\n const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;\n if (!isCurrentChatAdapterThread) {\n return;\n }\n const message = convertEventToChatMessage(event);\n this.emitter.emit('messageDeleted', {\n message\n });\n }\n private messageReadListener({\n chatMessageId,\n recipient\n }: ReadReceiptReceivedEvent): void {\n const message = this.getState().thread.chatMessages[chatMessageId];\n if (message) {\n this.emitter.emit('messageRead', {\n message,\n readBy: recipient\n });\n }\n }\n private participantsAddedListener({\n addedBy,\n participantsAdded\n }: ParticipantsAddedEvent): void {\n this.emitter.emit('participantsAdded', {\n addedBy,\n participantsAdded\n });\n }\n private participantsRemovedListener({\n removedBy,\n participantsRemoved\n }: ParticipantsRemovedEvent): void {\n this.emitter.emit('participantsRemoved', {\n removedBy,\n participantsRemoved\n });\n }\n private chatThreadPropertiesUpdatedListener(event: ChatThreadPropertiesUpdatedEvent): void {\n this.emitter.emit('topicChanged', {\n topic: event.properties.topic\n });\n }\n private subscribeAllEvents(): void {\n this.chatClient.on('chatThreadPropertiesUpdated', this.chatThreadPropertiesUpdatedListener.bind(this));\n this.chatClient.on('participantsAdded', this.participantsAddedListener.bind(this));\n this.chatClient.on('participantsRemoved', this.participantsRemovedListener.bind(this));\n this.chatClient.on('chatMessageReceived', this.messageReceivedListener.bind(this));\n this.chatClient.on('chatMessageEdited', this.messageEditedListener.bind(this));\n this.chatClient.on('chatMessageDeleted', this.messageDeletedListener.bind(this));\n this.chatClient.on('readReceiptReceived', this.messageReadListener.bind(this));\n this.chatClient.on('participantsRemoved', this.participantsRemovedListener.bind(this));\n }\n private unsubscribeAllEvents(): void {\n this.chatClient.off('chatThreadPropertiesUpdated', this.chatThreadPropertiesUpdatedListener.bind(this));\n this.chatClient.off('participantsAdded', this.participantsAddedListener.bind(this));\n this.chatClient.off('participantsRemoved', this.participantsRemovedListener.bind(this));\n this.chatClient.off('chatMessageReceived', this.messageReceivedListener.bind(this));\n this.chatClient.off('chatMessageEdited', this.messageEditedListener.bind(this));\n this.chatClient.off('chatMessageDeleted', this.messageDeletedListener.bind(this));\n this.chatClient.off('readReceiptReceived', this.messageReadListener.bind(this));\n this.chatClient.off('participantsRemoved', this.participantsRemovedListener.bind(this));\n }\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageReceivedListener): void;\n on(event: 'messageRead', listener: MessageReadListener): void;\n on(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n on(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n on(event: 'topicChanged', listener: TopicChangedListener): void;\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(event: string, listener: (e: any) => void): void {\n this.emitter.on(event, listener);\n }\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n off(event: 'messageSent', listener: MessageReceivedListener): void;\n off(event: 'messageRead', listener: MessageReadListener): void;\n off(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n off(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n off(event: 'topicChanged', listener: TopicChangedListener): void;\n off(event: 'error', listener: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n off(event: string, listener: (e: any) => void): void {\n this.emitter.off(event, listener);\n }\n private async asyncTeeErrorToEventEmitter<T>(f: () => Promise<T>): Promise<T> {\n try {\n return await f();\n } catch (error) {\n if (isChatError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n}\nconst convertEventToChatMessage = (event: ChatMessageReceivedEvent | ChatMessageEditedEvent | ChatMessageDeletedEvent): ChatMessage => {\n return {\n id: event.id,\n version: event.version,\n content: isChatMessageDeletedEvent(event) ? undefined : {\n message: event.message\n },\n type: convertEventType(event.type),\n sender: event.sender,\n senderDisplayName: event.senderDisplayName,\n sequenceId: '',\n createdOn: new Date(event.createdOn),\n editedOn: isChatMessageEditedEvent(event) ? event.editedOn : undefined,\n deletedOn: isChatMessageDeletedEvent(event) ? event.deletedOn : undefined\n };\n};\nconst isChatMessageEditedEvent = (event: ChatMessageReceivedEvent | ChatMessageEditedEvent | ChatMessageDeletedEvent): event is ChatMessageEditedEvent => {\n return 'editedOn' in event;\n};\nconst isChatMessageDeletedEvent = (event: ChatMessageReceivedEvent | ChatMessageEditedEvent | ChatMessageDeletedEvent): event is ChatMessageDeletedEvent => {\n return 'deletedOn' in event;\n};\n\n// only text/html message type will be received from event\nconst convertEventType = (type: string): ChatMessageType => {\n const lowerCaseType = type.toLowerCase();\n if (lowerCaseType === 'richtext/html' || lowerCaseType === 'html') {\n return 'html';\n } else {\n return 'text';\n }\n};\n\n/**\n * Arguments for creating the Azure Communication Services implementation of {@link ChatAdapter}.\n *\n * @public\n */\nexport type AzureCommunicationChatAdapterArgs = {\n endpoint: string;\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n threadId: string;\n};\n\n/**\n * Create a {@link ChatAdapter} backed by Azure Communication Services.\n *\n * This is the default implementation of {@link ChatAdapter} provided by this library.\n *\n * @public\n */\nexport const createAzureCommunicationChatAdapter = async ({\n endpoint: endpointUrl,\n userId,\n displayName,\n credential,\n threadId\n}: AzureCommunicationChatAdapterArgs): Promise<ChatAdapter> => {\n return _createAzureCommunicationChatAdapterInner(endpointUrl, userId, displayName, credential, threadId);\n};\n\n/**\n * This inner function is used to allow injection of TelemetryImplementationHint without changing the public API.\n *\n * @internal\n */\nexport const _createAzureCommunicationChatAdapterInner = async (endpoint: string, userId: CommunicationUserIdentifier, displayName: string, credential: CommunicationTokenCredential, threadId: string, telemetryImplementationHint: _TelemetryImplementationHint = 'Chat'): Promise<ChatAdapter> => {\n if (!_isValidIdentifier(userId)) {\n throw new Error('Provided userId is invalid. Please provide valid identifier object.');\n }\n const chatClient = _createStatefulChatClientInner({\n userId,\n displayName,\n endpoint,\n credential\n }, undefined, telemetryImplementationHint);\n const chatThreadClient = await chatClient.getChatThreadClient(threadId);\n await chatClient.startRealtimeNotifications();\n const adapter = await createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);\n return adapter;\n};\n\n/**\n * This inner function to create ChatAdapterPromise in case when threadID is not avaialble.\n * ThreadId is a promise to allow for lazy initialization of the adapter.\n * @internal\n */\nexport const _createLazyAzureCommunicationChatAdapterInner = async (endpoint: string, userId: CommunicationUserIdentifier, displayName: string, credential: CommunicationTokenCredential, threadId: Promise<string>, telemetryImplementationHint: _TelemetryImplementationHint = 'Chat'): Promise<ChatAdapter> => {\n if (!_isValidIdentifier(userId)) {\n throw new Error('Provided userId is invalid. Please provide valid identifier object.');\n }\n const chatClient = _createStatefulChatClientInner({\n userId,\n displayName,\n endpoint,\n credential\n }, undefined, telemetryImplementationHint);\n return threadId.then(async threadId => {\n if (UNSUPPORTED_CHAT_THREAD_TYPE.some(t => threadId.includes(t))) {\n console.error(`Invalid Chat ThreadId: ${threadId}. Please note with Teams Channel Meetings, only Calling is supported and Chat is not currently supported. Read more: ${TEAMS_LIMITATION_LEARN_MORE}.`);\n }\n const chatThreadClient = await chatClient.getChatThreadClient(threadId);\n await chatClient.startRealtimeNotifications();\n const adapter = await createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);\n return adapter;\n });\n};\n\n/**\n * A custom React hook to simplify the creation of {@link ChatAdapter}.\n *\n * Similar to {@link createAzureCommunicationChatAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationChatAdapter = (args: Partial<AzureCommunicationChatAdapterArgs>, afterCreate?: (adapter: ChatAdapter) => Promise<ChatAdapter>, beforeDispose?: (adapter: ChatAdapter) => Promise<void>): ChatAdapter | undefined => {\n const {\n credential,\n displayName,\n endpoint,\n threadId,\n userId\n } = args;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<ChatAdapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<ChatAdapter | undefined>(undefined);\n const creatingAdapterRef = useRef<boolean>(false);\n const afterCreateRef = useRef<((adapter: ChatAdapter) => Promise<ChatAdapter>) | undefined>(undefined);\n const beforeDisposeRef = useRef<((adapter: ChatAdapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n useEffect(() => {\n if (!credential || !displayName || !endpoint || !threadId || !userId) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n if (creatingAdapterRef.current) {\n console.warn('Adapter is already being created, please see storybook for more information: https://azure.github.io/communication-ui-library/?path=/story/troubleshooting--page');\n return;\n }\n creatingAdapterRef.current = true;\n let newAdapter = await createAzureCommunicationChatAdapter({\n credential,\n displayName,\n endpoint,\n threadId,\n userId\n });\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n creatingAdapterRef.current = false;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [adapterRef, afterCreateRef, beforeDisposeRef, credential, displayName, endpoint, threadId, userId]);\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n return adapter;\n};\n\n/**\n * Create a {@link ChatAdapter} using the provided {@link StatefulChatClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulChatClient}.\n * Consider using {@link createAzureCommunicationChatAdapter} for a simpler API.\n *\n * @public\n */\nexport async function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient): Promise<ChatAdapter> {\n return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);\n}\nconst isChatError = (e: Error): e is ChatError => {\n return 'target' in e && e['target'] !== undefined && 'innerError' in e && e['innerError'] !== undefined;\n};"]}
1
+ {"version":3,"file":"AzureCommunicationChatAdapter.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAu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QACpI,OAAO,IAAI,6BAA6B,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;IACzE,CAAC;CAAA;AACD,MAAM,WAAW,GAAG,CAAC,CAAQ,EAAkB,EAAE;IAC/C,OAAO,QAAQ,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,SAAS,IAAI,YAAY,IAAI,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC;AAC1G,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _createStatefulChatClientInner, ChatClientState, ChatError, StatefulChatClient } from '@internal/chat-stateful-client';\nimport { ChatHandlers, createDefaultChatHandlers } from '@internal/chat-component-bindings';\nimport { ChatMessage, ChatMessageType, ChatThreadClient, SendMessageOptions } from '@azure/communication-chat';\nimport { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';\nimport type { ChatMessageDeletedEvent, ChatMessageEditedEvent, ChatMessageReceivedEvent, ChatThreadPropertiesUpdatedEvent, ParticipantsAddedEvent, ParticipantsRemovedEvent, ReadReceiptReceivedEvent } from '@azure/communication-chat';\nimport { toFlatCommunicationIdentifier, _TelemetryImplementationHint } from '@internal/acs-ui-common';\nimport { EventEmitter } from 'events';\nimport { ChatAdapter, ChatAdapterState, MessageDeletedListener, MessageEditedListener, MessageReadListener, MessageReceivedListener, ParticipantsAddedListener, ParticipantsRemovedListener, TopicChangedListener } from './ChatAdapter';\nimport { ResourceDetails } from './ChatAdapter';\nimport { AdapterError } from '../../common/adapters';\nimport { useEffect, useRef, useState } from 'react';\nimport { _isValidIdentifier } from '@internal/acs-ui-common';\nimport { TEAMS_LIMITATION_LEARN_MORE, UNSUPPORTED_CHAT_THREAD_TYPE } from '../../common/constants';\n/**\n * Context of Chat, which is a centralized context for all state updates\n * @private\n */\nexport class ChatContext {\n private emitter: EventEmitter = new EventEmitter();\n private state: ChatAdapterState;\n private threadId: string;\n constructor(clientState: ChatClientState, threadId: string) {\n const thread = clientState.threads[threadId];\n this.threadId = threadId;\n if (!thread) {\n throw 'Cannot find threadId, please initialize thread before use!';\n }\n this.state = {\n userId: clientState.userId,\n displayName: clientState.displayName,\n thread,\n latestErrors: clientState.latestErrors\n };\n }\n public onStateChange(handler: (_uiState: ChatAdapterState) => void): void {\n this.emitter.on('stateChanged', handler);\n }\n public offStateChange(handler: (_uiState: ChatAdapterState) => void): void {\n this.emitter.off('stateChanged', handler);\n }\n public setState(state: ChatAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', this.state);\n }\n public getState(): ChatAdapterState {\n return this.state;\n }\n public setError(error: Error): void {\n this.setState({\n ...this.state,\n error\n });\n }\n public updateClientState(clientState: ChatClientState): void {\n const thread = clientState.threads[this.threadId];\n if (!thread) {\n throw 'Cannot find threadId, please make sure thread state is still in Stateful ChatClient.';\n }\n let updatedState: ChatAdapterState = {\n userId: clientState.userId,\n displayName: clientState.displayName,\n thread,\n latestErrors: clientState.latestErrors\n };\n this.setState(updatedState);\n }\n}\n\n/**\n * @private\n */\nexport class AzureCommunicationChatAdapter implements ChatAdapter {\n private chatClient: StatefulChatClient;\n private chatThreadClient: ChatThreadClient;\n private context: ChatContext;\n private handlers: ChatHandlers;\n private emitter: EventEmitter = new EventEmitter();\n constructor(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient) {\n this.bindAllPublicMethods();\n this.chatClient = chatClient;\n this.chatThreadClient = chatThreadClient;\n this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId);\n const onStateChange = (clientState: ChatClientState): void => {\n // unsubscribe when the instance gets disposed\n if (!this) {\n chatClient.offStateChange(onStateChange);\n return;\n }\n this.context.updateClientState(clientState);\n };\n this.handlers = createDefaultChatHandlers(chatClient, chatThreadClient);\n this.chatClient.onStateChange(onStateChange);\n this.subscribeAllEvents();\n }\n private bindAllPublicMethods(): void {\n this.onStateChange = this.onStateChange.bind(this);\n this.offStateChange = this.offStateChange.bind(this);\n this.getState = this.getState.bind(this);\n this.dispose = this.dispose.bind(this);\n this.fetchInitialData = this.fetchInitialData.bind(this);\n this.sendMessage = this.sendMessage.bind(this);\n this.sendReadReceipt = this.sendReadReceipt.bind(this);\n this.sendTypingIndicator = this.sendTypingIndicator.bind(this);\n this.updateMessage = this.updateMessage.bind(this);\n this.deleteMessage = this.deleteMessage.bind(this);\n this.removeParticipant = this.removeParticipant.bind(this);\n this.setTopic = this.setTopic.bind(this);\n this.loadPreviousChatMessages = this.loadPreviousChatMessages.bind(this);\n this.on = this.on.bind(this);\n this.off = this.off.bind(this);\n this.downloadResourceToCache = this.downloadResourceToCache.bind(this);\n this.removeResourceFromCache = this.removeResourceFromCache.bind(this);\n }\n dispose(): void {\n this.unsubscribeAllEvents();\n this.chatClient.dispose();\n }\n async fetchInitialData(): Promise<void> {\n // If get properties fails we dont want to try to get the participants after.\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.chatThreadClient.getProperties();\n // Fetch all participants who joined before the local user.\n for await (const _page of this.chatThreadClient.listParticipants().byPage({\n // Fetch 100 participants per page by default.\n maxPageSize: 100\n // eslint-disable-next-line curly\n }));\n });\n }\n getState(): ChatAdapterState {\n return this.context.getState();\n }\n onStateChange(handler: (state: ChatAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n offStateChange(handler: (state: ChatAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n async sendMessage(content: string, options?: SendMessageOptions): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onSendMessage(content, options);\n });\n }\n async sendReadReceipt(chatMessageId: string): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onMessageSeen(chatMessageId);\n });\n }\n async sendTypingIndicator(): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onTyping();\n });\n }\n async removeParticipant(userId: string): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onRemoveParticipant(userId);\n });\n }\n async setTopic(topicName: string): Promise<void> {\n await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.updateThreadTopicName(topicName);\n });\n }\n async loadPreviousChatMessages(messagesToLoad: number): Promise<boolean> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onLoadPreviousChatMessages(messagesToLoad);\n });\n }\n async updateMessage(messageId: string, content: string, options?: Record<string, string>): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n // metadata is never used in the current stable\n return await this.handlers.onUpdateMessage(messageId, content);\n });\n }\n async deleteMessage(messageId: string): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return await this.handlers.onDeleteMessage(messageId);\n });\n }\n async downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void> {\n this.chatClient.downloadResourceToCache(resourceDetails.threadId, resourceDetails.messageId, resourceDetails.resourceUrl);\n }\n removeResourceFromCache(resourceDetails: ResourceDetails): void {\n this.chatClient.removeResourceFromCache(resourceDetails.threadId, resourceDetails.messageId, resourceDetails.resourceUrl);\n }\n private messageReceivedListener(event: ChatMessageReceivedEvent): void {\n const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;\n if (!isCurrentChatAdapterThread) {\n return;\n }\n const message = convertEventToChatMessage(event);\n this.emitter.emit('messageReceived', {\n message\n });\n const currentUserId = toFlatCommunicationIdentifier(this.chatClient.getState().userId);\n if (message?.sender && toFlatCommunicationIdentifier(message.sender) === currentUserId) {\n this.emitter.emit('messageSent', {\n message\n });\n }\n }\n private messageEditedListener(event: ChatMessageEditedEvent): void {\n const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;\n if (!isCurrentChatAdapterThread) {\n return;\n }\n const message = convertEventToChatMessage(event);\n this.emitter.emit('messageEdited', {\n message\n });\n }\n private messageDeletedListener(event: ChatMessageDeletedEvent): void {\n const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;\n if (!isCurrentChatAdapterThread) {\n return;\n }\n const message = convertEventToChatMessage(event);\n this.emitter.emit('messageDeleted', {\n message\n });\n }\n private messageReadListener({\n chatMessageId,\n recipient\n }: ReadReceiptReceivedEvent): void {\n const message = this.getState().thread.chatMessages[chatMessageId];\n if (message) {\n this.emitter.emit('messageRead', {\n message,\n readBy: recipient\n });\n }\n }\n private participantsAddedListener({\n addedBy,\n participantsAdded\n }: ParticipantsAddedEvent): void {\n this.emitter.emit('participantsAdded', {\n addedBy,\n participantsAdded\n });\n }\n private participantsRemovedListener({\n removedBy,\n participantsRemoved\n }: ParticipantsRemovedEvent): void {\n this.emitter.emit('participantsRemoved', {\n removedBy,\n participantsRemoved\n });\n }\n private chatThreadPropertiesUpdatedListener(event: ChatThreadPropertiesUpdatedEvent): void {\n this.emitter.emit('topicChanged', {\n topic: event.properties.topic\n });\n }\n private subscribeAllEvents(): void {\n this.chatClient.on('chatThreadPropertiesUpdated', this.chatThreadPropertiesUpdatedListener.bind(this));\n this.chatClient.on('participantsAdded', this.participantsAddedListener.bind(this));\n this.chatClient.on('participantsRemoved', this.participantsRemovedListener.bind(this));\n this.chatClient.on('chatMessageReceived', this.messageReceivedListener.bind(this));\n this.chatClient.on('chatMessageEdited', this.messageEditedListener.bind(this));\n this.chatClient.on('chatMessageDeleted', this.messageDeletedListener.bind(this));\n this.chatClient.on('readReceiptReceived', this.messageReadListener.bind(this));\n this.chatClient.on('participantsRemoved', this.participantsRemovedListener.bind(this));\n }\n private unsubscribeAllEvents(): void {\n this.chatClient.off('chatThreadPropertiesUpdated', this.chatThreadPropertiesUpdatedListener.bind(this));\n this.chatClient.off('participantsAdded', this.participantsAddedListener.bind(this));\n this.chatClient.off('participantsRemoved', this.participantsRemovedListener.bind(this));\n this.chatClient.off('chatMessageReceived', this.messageReceivedListener.bind(this));\n this.chatClient.off('chatMessageEdited', this.messageEditedListener.bind(this));\n this.chatClient.off('chatMessageDeleted', this.messageDeletedListener.bind(this));\n this.chatClient.off('readReceiptReceived', this.messageReadListener.bind(this));\n this.chatClient.off('participantsRemoved', this.participantsRemovedListener.bind(this));\n }\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n on(event: 'messageSent', listener: MessageReceivedListener): void;\n on(event: 'messageRead', listener: MessageReadListener): void;\n on(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n on(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n on(event: 'topicChanged', listener: TopicChangedListener): void;\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(event: string, listener: (e: any) => void): void {\n this.emitter.on(event, listener);\n }\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n off(event: 'messageSent', listener: MessageReceivedListener): void;\n off(event: 'messageRead', listener: MessageReadListener): void;\n off(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n off(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n off(event: 'topicChanged', listener: TopicChangedListener): void;\n off(event: 'error', listener: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n off(event: string, listener: (e: any) => void): void {\n this.emitter.off(event, listener);\n }\n private async asyncTeeErrorToEventEmitter<T>(f: () => Promise<T>): Promise<T> {\n try {\n return await f();\n } catch (error) {\n if (isChatError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n}\nconst convertEventToChatMessage = (event: ChatMessageReceivedEvent | ChatMessageEditedEvent | ChatMessageDeletedEvent): ChatMessage => {\n return {\n id: event.id,\n version: event.version,\n content: isChatMessageDeletedEvent(event) ? undefined : {\n message: event.message\n },\n type: convertEventType(event.type),\n sender: event.sender,\n senderDisplayName: event.senderDisplayName,\n sequenceId: '',\n createdOn: new Date(event.createdOn),\n editedOn: isChatMessageEditedEvent(event) ? event.editedOn : undefined,\n deletedOn: isChatMessageDeletedEvent(event) ? event.deletedOn : undefined\n };\n};\nconst isChatMessageEditedEvent = (event: ChatMessageReceivedEvent | ChatMessageEditedEvent | ChatMessageDeletedEvent): event is ChatMessageEditedEvent => {\n return 'editedOn' in event;\n};\nconst isChatMessageDeletedEvent = (event: ChatMessageReceivedEvent | ChatMessageEditedEvent | ChatMessageDeletedEvent): event is ChatMessageDeletedEvent => {\n return 'deletedOn' in event;\n};\n\n// only text/html message type will be received from event\nconst convertEventType = (type: string): ChatMessageType => {\n const lowerCaseType = type.toLowerCase();\n if (lowerCaseType === 'richtext/html' || lowerCaseType === 'html') {\n return 'html';\n } else {\n return 'text';\n }\n};\n\n/**\n * Arguments for creating the Azure Communication Services implementation of {@link ChatAdapter}.\n *\n * @public\n */\nexport type AzureCommunicationChatAdapterArgs = {\n endpoint: string;\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n threadId: string;\n};\n\n/**\n * Create a {@link ChatAdapter} backed by Azure Communication Services.\n *\n * This is the default implementation of {@link ChatAdapter} provided by this library.\n *\n * @public\n */\nexport const createAzureCommunicationChatAdapter = async ({\n endpoint: endpointUrl,\n userId,\n displayName,\n credential,\n threadId\n}: AzureCommunicationChatAdapterArgs): Promise<ChatAdapter> => {\n return _createAzureCommunicationChatAdapterInner(endpointUrl, userId, displayName, credential, threadId);\n};\n\n/**\n * This inner function is used to allow injection of TelemetryImplementationHint without changing the public API.\n *\n * @internal\n */\nexport const _createAzureCommunicationChatAdapterInner = async (endpoint: string, userId: CommunicationUserIdentifier, displayName: string, credential: CommunicationTokenCredential, threadId: string, telemetryImplementationHint: _TelemetryImplementationHint = 'Chat'): Promise<ChatAdapter> => {\n if (!_isValidIdentifier(userId)) {\n throw new Error('Provided userId is invalid. Please provide valid identifier object.');\n }\n const chatClient = _createStatefulChatClientInner({\n userId,\n displayName,\n endpoint,\n credential\n }, undefined, telemetryImplementationHint);\n const chatThreadClient = await chatClient.getChatThreadClient(threadId);\n await chatClient.startRealtimeNotifications();\n const adapter = await createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);\n return adapter;\n};\n\n/**\n * This inner function to create ChatAdapterPromise in case when threadID is not avaialble.\n * ThreadId is a promise to allow for lazy initialization of the adapter.\n * @internal\n */\nexport const _createLazyAzureCommunicationChatAdapterInner = async (endpoint: string, userId: CommunicationUserIdentifier, displayName: string, credential: CommunicationTokenCredential, threadId: Promise<string>, telemetryImplementationHint: _TelemetryImplementationHint = 'Chat'): Promise<ChatAdapter> => {\n if (!_isValidIdentifier(userId)) {\n throw new Error('Provided userId is invalid. Please provide valid identifier object.');\n }\n const chatClient = _createStatefulChatClientInner({\n userId,\n displayName,\n endpoint,\n credential\n }, undefined, telemetryImplementationHint);\n return threadId.then(async threadId => {\n if (UNSUPPORTED_CHAT_THREAD_TYPE.some(t => threadId.includes(t))) {\n console.error(`Invalid Chat ThreadId: ${threadId}. Please note with Teams Channel Meetings, only Calling is supported and Chat is not currently supported. Read more: ${TEAMS_LIMITATION_LEARN_MORE}.`);\n }\n const chatThreadClient = await chatClient.getChatThreadClient(threadId);\n await chatClient.startRealtimeNotifications();\n const adapter = await createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);\n return adapter;\n });\n};\n\n/**\n * A custom React hook to simplify the creation of {@link ChatAdapter}.\n *\n * Similar to {@link createAzureCommunicationChatAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationChatAdapter = (args: Partial<AzureCommunicationChatAdapterArgs>, afterCreate?: (adapter: ChatAdapter) => Promise<ChatAdapter>, beforeDispose?: (adapter: ChatAdapter) => Promise<void>): ChatAdapter | undefined => {\n const {\n credential,\n displayName,\n endpoint,\n threadId,\n userId\n } = args;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<ChatAdapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<ChatAdapter | undefined>(undefined);\n const creatingAdapterRef = useRef<boolean>(false);\n const afterCreateRef = useRef<((adapter: ChatAdapter) => Promise<ChatAdapter>) | undefined>(undefined);\n const beforeDisposeRef = useRef<((adapter: ChatAdapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n useEffect(() => {\n if (!credential || !displayName || !endpoint || !threadId || !userId) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n if (creatingAdapterRef.current) {\n console.warn('Adapter is already being created, please see storybook for more information: https://azure.github.io/communication-ui-library/?path=/story/troubleshooting--page');\n return;\n }\n creatingAdapterRef.current = true;\n let newAdapter = await createAzureCommunicationChatAdapter({\n credential,\n displayName,\n endpoint,\n threadId,\n userId\n });\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n creatingAdapterRef.current = false;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [adapterRef, afterCreateRef, beforeDisposeRef, credential, displayName, endpoint, threadId, userId]);\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n return adapter;\n};\n\n/**\n * Create a {@link ChatAdapter} using the provided {@link StatefulChatClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulChatClient}.\n * Consider using {@link createAzureCommunicationChatAdapter} for a simpler API.\n *\n * @public\n */\nexport async function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient): Promise<ChatAdapter> {\n return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);\n}\nconst isChatError = (e: Error): e is ChatError => {\n return 'target' in e && e['target'] !== undefined && 'innerError' in e && e['innerError'] !== undefined;\n};"]}
@@ -1,9 +1,7 @@
1
1
  import type { ChatMessage, ChatParticipant, SendMessageOptions } from '@azure/communication-chat';
2
- import type { UploadChatImageResult } from "../../../../../acs-ui-common/src";
3
2
  import type { CommunicationIdentifierKind, CommunicationUserKind } from '@azure/communication-common';
4
3
  import { ChatThreadClientState } from "../../../../../chat-stateful-client/src";
5
4
  import type { AdapterError, AdapterErrors, AdapterState, Disposable } from '../../common/adapters';
6
- import { MessageOptions } from "../../../../../acs-ui-common/src";
7
5
  /**
8
6
  * {@link ChatAdapter} state for pure UI purposes.
9
7
  *
@@ -48,15 +46,7 @@ export interface ChatAdapterThreadManagement {
48
46
  * Send a message in the thread.
49
47
  * Please note that SendMessageOptions is being deprecated, please use MessageOptions instead.
50
48
  */
51
- sendMessage(content: string, options?: SendMessageOptions | MessageOptions): Promise<void>;
52
- /**
53
- * Upload an inline image for a message.
54
- */
55
- uploadImage(image: Blob, imageFilename: string): Promise<UploadChatImageResult>;
56
- /**
57
- * Delete an inline image for a message.
58
- */
59
- deleteImage(imageId: string): Promise<void>;
49
+ sendMessage(content: string, options?: SendMessageOptions): Promise<void>;
60
50
  /**
61
51
  * Send a read receipt for a message.
62
52
  */
@@ -77,7 +67,7 @@ export interface ChatAdapterThreadManagement {
77
67
  * Update a message content.
78
68
  * Please note that metadata is being deprecated, please use MessageOptions.metadata instead.
79
69
  */
80
- updateMessage(messageId: string, content: string, options?: Record<string, string> | MessageOptions): Promise<void>;
70
+ updateMessage(messageId: string, content: string, options?: Record<string, string>): Promise<void>;
81
71
  /**
82
72
  * Delete a message in the thread.
83
73
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ChatAdapter.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ChatMessage, ChatParticipant, SendMessageOptions } from '@azure/communication-chat';\nimport type { UploadChatImageResult } from '@internal/acs-ui-common';\nimport type { CommunicationIdentifierKind, CommunicationUserKind } from '@azure/communication-common';\nimport { ChatThreadClientState } from '@internal/chat-stateful-client';\nimport type { AdapterError, AdapterErrors, AdapterState, Disposable } from '../../common/adapters';\nimport { MessageOptions } from '@internal/acs-ui-common';\n\n/**\n * {@link ChatAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type ChatAdapterUiState = {\n // FIXME(Delete?)\n // Self-contained state for composite\n error?: Error;\n};\n\n/**\n * {@link ChatAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type ChatCompositeClientState = {\n userId: CommunicationIdentifierKind;\n displayName: string;\n thread: ChatThreadClientState;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n};\n\n/**\n * {@link ChatAdapter} state.\n *\n * @public\n */\nexport type ChatAdapterState = ChatAdapterUiState & ChatCompositeClientState;\n\n/**\n * Functionality for managing the current chat thread.\n *\n * @public\n */\nexport interface ChatAdapterThreadManagement {\n /**\n * Fetch initial state for the Chat adapter.\n *\n * Performs the minimal fetch necessary for ChatComposite and API methods.\n */\n fetchInitialData(): Promise<void>;\n /**\n * Send a message in the thread.\n * Please note that SendMessageOptions is being deprecated, please use MessageOptions instead.\n */\n sendMessage(content: string, options?: SendMessageOptions | MessageOptions): Promise<void>;\n /**\n * Upload an inline image for a message.\n */\n uploadImage(image: Blob, imageFilename: string): Promise<UploadChatImageResult>;\n /**\n * Delete an inline image for a message.\n */\n deleteImage(imageId: string): Promise<void>;\n /**\n * Send a read receipt for a message.\n */\n sendReadReceipt(chatMessageId: string): Promise<void>;\n /**\n * Send typing indicator in the thread.\n */\n sendTypingIndicator(): Promise<void>;\n /**\n * Remove a participant in the thread.\n */\n removeParticipant(userId: string): Promise<void>;\n /**\n * Set the topic for the thread.\n */\n setTopic(topicName: string): Promise<void>;\n /**\n * Update a message content.\n * Please note that metadata is being deprecated, please use MessageOptions.metadata instead.\n */\n updateMessage(messageId: string, content: string, options?: Record<string, string> | MessageOptions): Promise<void>;\n /**\n * Delete a message in the thread.\n */\n deleteMessage(messageId: string): Promise<void>;\n /**\n * Load more previous messages in the chat thread history.\n *\n * @remarks\n * This method is usually used to control incremental fetch/infinite scroll\n *\n */\n loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;\n /**\n * Downloads a resource into the cache for the given message.\n */\n downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;\n /**\n * Removes a resource from the cache for the given message.\n */\n removeResourceFromCache(resourceDetails: ResourceDetails): void;\n}\n/**\n * Details required for download a resource to cache.\n *\n * @public\n */\nexport type ResourceDetails = {\n threadId: string;\n messageId: string;\n resourceUrl: string;\n};\n\n/**\n * Chat composite events that can be subscribed to.\n *\n * @public\n */\nexport interface ChatAdapterSubscribers {\n /**\n * Subscribe function for 'messageReceived' event.\n */\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n /**\n * Subscribe function for 'messageEdited' event.\n */\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n /**\n * Subscribe function for 'messageDeleted' event.\n */\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n /**\n * Subscribe function for 'messageSent' event.\n */\n on(event: 'messageSent', listener: MessageSentListener): void;\n /**\n * Subscribe function for 'messageRead' event.\n */\n on(event: 'messageRead', listener: MessageReadListener): void;\n /**\n * Subscribe function for 'participantsAdded' event.\n */\n on(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n /**\n * Subscribe function for 'participantsRemoved' event.\n */\n on(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n /**\n * Subscribe function for 'topicChanged' event.\n */\n on(event: 'topicChanged', listener: TopicChangedListener): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n /**\n * Unsubscribe function for 'messageReceived' event.\n */\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n /**\n * Unsubscribe function for 'messageEdited' event.\n */\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n /**\n * Unsubscribe function for 'messageDeleted' event.\n */\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n /**\n * Unsubscribe function for 'messageSent' event.\n */\n off(event: 'messageSent', listener: MessageSentListener): void;\n /**\n * Unsubscribe function for 'messageRead' event.\n */\n off(event: 'messageRead', listener: MessageReadListener): void;\n /**\n * Unsubscribe function for 'participantsAdded' event.\n */\n off(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n /**\n * Unsubscribe function for 'participantsRemoved' event.\n */\n off(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n /**\n * Unsubscribe function for 'topicChanged' event.\n */\n off(event: 'topicChanged', listener: TopicChangedListener): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n}\n\n/**\n * {@link ChatComposite} Adapter interface.\n *\n * @public\n */\nexport type ChatAdapter = ChatAdapterThreadManagement & AdapterState<ChatAdapterState> & Disposable & ChatAdapterSubscribers;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageReceived' event.\n *\n * @public\n */\nexport type MessageReceivedListener = (event: {\n message: ChatMessage;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageSent' event.\n *\n * @public\n */\nexport type MessageSentListener = MessageReceivedListener;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageEdited' event.\n *\n * @public\n */\nexport type MessageEditedListener = MessageReceivedListener;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageDeleted' event.\n *\n * @public\n */\nexport type MessageDeletedListener = MessageReceivedListener;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageRead' event.\n *\n * @public\n */\nexport type MessageReadListener = (event: {\n message: ChatMessage;\n readBy: CommunicationUserKind;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'participantsAdded' event.\n *\n * @public\n */\nexport type ParticipantsAddedListener = (event: {\n participantsAdded: ChatParticipant[];\n addedBy: ChatParticipant;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'participantsRemoved' event.\n *\n * @public\n */\nexport type ParticipantsRemovedListener = (event: {\n participantsRemoved: ChatParticipant[];\n removedBy: ChatParticipant;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'topicChanged' event.\n *\n * @public\n */\nexport type TopicChangedListener = (event: {\n topic: string;\n}) => void;"]}
1
+ {"version":3,"file":"ChatAdapter.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ChatMessage, ChatParticipant, SendMessageOptions } from '@azure/communication-chat';\nimport type { CommunicationIdentifierKind, CommunicationUserKind } from '@azure/communication-common';\nimport { ChatThreadClientState } from '@internal/chat-stateful-client';\nimport type { AdapterError, AdapterErrors, AdapterState, Disposable } from '../../common/adapters';\n/**\n * {@link ChatAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type ChatAdapterUiState = {\n // FIXME(Delete?)\n // Self-contained state for composite\n error?: Error;\n};\n\n/**\n * {@link ChatAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type ChatCompositeClientState = {\n userId: CommunicationIdentifierKind;\n displayName: string;\n thread: ChatThreadClientState;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n};\n\n/**\n * {@link ChatAdapter} state.\n *\n * @public\n */\nexport type ChatAdapterState = ChatAdapterUiState & ChatCompositeClientState;\n\n/**\n * Functionality for managing the current chat thread.\n *\n * @public\n */\nexport interface ChatAdapterThreadManagement {\n /**\n * Fetch initial state for the Chat adapter.\n *\n * Performs the minimal fetch necessary for ChatComposite and API methods.\n */\n fetchInitialData(): Promise<void>;\n /**\n * Send a message in the thread.\n * Please note that SendMessageOptions is being deprecated, please use MessageOptions instead.\n */\n sendMessage(content: string, options?: SendMessageOptions): Promise<void>;\n /**\n * Send a read receipt for a message.\n */\n sendReadReceipt(chatMessageId: string): Promise<void>;\n /**\n * Send typing indicator in the thread.\n */\n sendTypingIndicator(): Promise<void>;\n /**\n * Remove a participant in the thread.\n */\n removeParticipant(userId: string): Promise<void>;\n /**\n * Set the topic for the thread.\n */\n setTopic(topicName: string): Promise<void>;\n /**\n * Update a message content.\n * Please note that metadata is being deprecated, please use MessageOptions.metadata instead.\n */\n updateMessage(messageId: string, content: string, options?: Record<string, string>): Promise<void>;\n /**\n * Delete a message in the thread.\n */\n deleteMessage(messageId: string): Promise<void>;\n /**\n * Load more previous messages in the chat thread history.\n *\n * @remarks\n * This method is usually used to control incremental fetch/infinite scroll\n *\n */\n loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;\n /**\n * Downloads a resource into the cache for the given message.\n */\n downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;\n /**\n * Removes a resource from the cache for the given message.\n */\n removeResourceFromCache(resourceDetails: ResourceDetails): void;\n}\n/**\n * Details required for download a resource to cache.\n *\n * @public\n */\nexport type ResourceDetails = {\n threadId: string;\n messageId: string;\n resourceUrl: string;\n};\n\n/**\n * Chat composite events that can be subscribed to.\n *\n * @public\n */\nexport interface ChatAdapterSubscribers {\n /**\n * Subscribe function for 'messageReceived' event.\n */\n on(event: 'messageReceived', listener: MessageReceivedListener): void;\n /**\n * Subscribe function for 'messageEdited' event.\n */\n on(event: 'messageEdited', listener: MessageEditedListener): void;\n /**\n * Subscribe function for 'messageDeleted' event.\n */\n on(event: 'messageDeleted', listener: MessageDeletedListener): void;\n /**\n * Subscribe function for 'messageSent' event.\n */\n on(event: 'messageSent', listener: MessageSentListener): void;\n /**\n * Subscribe function for 'messageRead' event.\n */\n on(event: 'messageRead', listener: MessageReadListener): void;\n /**\n * Subscribe function for 'participantsAdded' event.\n */\n on(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n /**\n * Subscribe function for 'participantsRemoved' event.\n */\n on(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n /**\n * Subscribe function for 'topicChanged' event.\n */\n on(event: 'topicChanged', listener: TopicChangedListener): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n /**\n * Unsubscribe function for 'messageReceived' event.\n */\n off(event: 'messageReceived', listener: MessageReceivedListener): void;\n /**\n * Unsubscribe function for 'messageEdited' event.\n */\n off(event: 'messageEdited', listener: MessageEditedListener): void;\n /**\n * Unsubscribe function for 'messageDeleted' event.\n */\n off(event: 'messageDeleted', listener: MessageDeletedListener): void;\n /**\n * Unsubscribe function for 'messageSent' event.\n */\n off(event: 'messageSent', listener: MessageSentListener): void;\n /**\n * Unsubscribe function for 'messageRead' event.\n */\n off(event: 'messageRead', listener: MessageReadListener): void;\n /**\n * Unsubscribe function for 'participantsAdded' event.\n */\n off(event: 'participantsAdded', listener: ParticipantsAddedListener): void;\n /**\n * Unsubscribe function for 'participantsRemoved' event.\n */\n off(event: 'participantsRemoved', listener: ParticipantsRemovedListener): void;\n /**\n * Unsubscribe function for 'topicChanged' event.\n */\n off(event: 'topicChanged', listener: TopicChangedListener): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n}\n\n/**\n * {@link ChatComposite} Adapter interface.\n *\n * @public\n */\nexport type ChatAdapter = ChatAdapterThreadManagement & AdapterState<ChatAdapterState> & Disposable & ChatAdapterSubscribers;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageReceived' event.\n *\n * @public\n */\nexport type MessageReceivedListener = (event: {\n message: ChatMessage;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageSent' event.\n *\n * @public\n */\nexport type MessageSentListener = MessageReceivedListener;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageEdited' event.\n *\n * @public\n */\nexport type MessageEditedListener = MessageReceivedListener;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageDeleted' event.\n *\n * @public\n */\nexport type MessageDeletedListener = MessageReceivedListener;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'messageRead' event.\n *\n * @public\n */\nexport type MessageReadListener = (event: {\n message: ChatMessage;\n readBy: CommunicationUserKind;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'participantsAdded' event.\n *\n * @public\n */\nexport type ParticipantsAddedListener = (event: {\n participantsAdded: ChatParticipant[];\n addedBy: ChatParticipant;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'participantsRemoved' event.\n *\n * @public\n */\nexport type ParticipantsRemovedListener = (event: {\n participantsRemoved: ChatParticipant[];\n removedBy: ChatParticipant;\n}) => void;\n\n/**\n * Callback for {@link ChatAdapterSubscribers} 'topicChanged' event.\n *\n * @public\n */\nexport type TopicChangedListener = (event: {\n topic: string;\n}) => void;"]}
@@ -13,26 +13,15 @@ const createCompositeHandlers = memoizeOne((adapter) => ({
13
13
  // have to use `any` here so we don't import from Chat SDK
14
14
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
15
  onSendMessage: (content, options) => {
16
- if (options && 'attachments' in options && options.attachments && options.attachments[0] && !('attachmentType' in options.attachments[0])) {
17
- const adapterMessageOption = {
18
- metadata: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.metadata), { fileSharingMetadata: JSON.stringify(options === null || options === void 0 ? void 0 : options.attachments) })
19
- };
20
- return adapter.sendMessage(content, adapterMessageOption);
21
- }
22
16
  return adapter.sendMessage(content, options);
23
17
  },
24
- onUploadImage: adapter.uploadImage,
25
- onDeleteImage: adapter.deleteImage,
26
18
  onLoadPreviousChatMessages: adapter.loadPreviousChatMessages,
27
19
  onMessageSeen: adapter.sendReadReceipt,
28
20
  onTyping: adapter.sendTypingIndicator,
29
21
  onRemoveParticipant: adapter.removeParticipant,
30
22
  updateThreadTopicName: adapter.setTopic,
31
- onUpdateMessage: function (messageId, content, options) {
32
- const adapterMessageOptions = {
33
- attachments: options === null || options === void 0 ? void 0 : options.attachments
34
- };
35
- return adapter.updateMessage(messageId, content, adapterMessageOptions);
23
+ onUpdateMessage: function (messageId, content) {
24
+ return adapter.updateMessage(messageId, content);
36
25
  },
37
26
  onDeleteMessage: adapter.deleteMessage
38
27
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAG5D;;GAEG;AACH,+HAA+H;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAG,CAAU,UAAkD,EAA8D,EAAE;IACrJ,OAAO,uBAAuB,CAAC,UAAU,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AACF,MAAM,uBAAuB,GAAG,UAAU,CAAC,CAAC,OAAoB,EAAgB,EAAE,CAAC,CAAC;IAClF,0DAA0D;IAC1D,8DAA8D;IAC9D,aAAa,EAAE,CAAC,OAAe,EAAE,OAAY,EAAE,EAAE;QAC/C,IAAI,OAAO,IAAI,aAAa,IAAI,OAAO,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,gBAAgB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1I,MAAM,oBAAoB,GAAG;gBAC3B,QAAQ,kCACH,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KACpB,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,CAAC,GAC1D;aACF,CAAC;YACF,OAAO,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IACD,aAAa,EAAE,OAAO,CAAC,WAAW;IAClC,aAAa,EAAE,OAAO,CAAC,WAAW;IAClC,0BAA0B,EAAE,OAAO,CAAC,wBAAwB;IAC5D,aAAa,EAAE,OAAO,CAAC,eAAe;IACtC,QAAQ,EAAE,OAAO,CAAC,mBAAmB;IACrC,mBAAmB,EAAE,OAAO,CAAC,iBAAiB;IAC9C,qBAAqB,EAAE,OAAO,CAAC,QAAQ;IACvC,eAAe,EAAE,UAAU,SAAiB,EAAE,OAAe,EAAE,OAAwB;QACrF,MAAM,qBAAqB,GAAmB;YAC5C,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW;SAClC,CAAC;QACF,OAAO,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC;IAC1E,CAAC;IACD,eAAe,EAAE,OAAO,CAAC,aAAa;CACvC,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonProperties } from '@internal/acs-ui-common';\nimport { ChatHandlers } from '@internal/chat-component-bindings';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { ChatAdapter } from '../adapter/ChatAdapter';\nimport { useAdapter } from '../adapter/ChatAdapterProvider';\nimport { MessageOptions } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT,>(_component: (props: PropsT) => ReactElement | null): Pick<ChatHandlers, CommonProperties<ChatHandlers, PropsT>> => {\n return createCompositeHandlers(useAdapter());\n};\nconst createCompositeHandlers = memoizeOne((adapter: ChatAdapter): ChatHandlers => ({\n // have to use `any` here so we don't import from Chat SDK\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onSendMessage: (content: string, options: any) => {\n if (options && 'attachments' in options && options.attachments && options.attachments[0] && !('attachmentType' in options.attachments[0])) {\n const adapterMessageOption = {\n metadata: {\n ...options?.metadata,\n fileSharingMetadata: JSON.stringify(options?.attachments)\n }\n };\n return adapter.sendMessage(content, adapterMessageOption);\n }\n return adapter.sendMessage(content, options);\n },\n onUploadImage: adapter.uploadImage,\n onDeleteImage: adapter.deleteImage,\n onLoadPreviousChatMessages: adapter.loadPreviousChatMessages,\n onMessageSeen: adapter.sendReadReceipt,\n onTyping: adapter.sendTypingIndicator,\n onRemoveParticipant: adapter.removeParticipant,\n updateThreadTopicName: adapter.setTopic,\n onUpdateMessage: function (messageId: string, content: string, options?: MessageOptions) {\n const adapterMessageOptions: MessageOptions = {\n attachments: options?.attachments\n };\n return adapter.updateMessage(messageId, content, adapterMessageOptions);\n },\n onDeleteMessage: adapter.deleteMessage\n}));"]}
1
+ {"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D;;GAEG;AACH,+HAA+H;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAG,CAAU,UAAkD,EAA8D,EAAE;IACrJ,OAAO,uBAAuB,CAAC,UAAU,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AACF,MAAM,uBAAuB,GAAG,UAAU,CAAC,CAAC,OAAoB,EAAgB,EAAE,CAAC,CAAC;IAClF,0DAA0D;IAC1D,8DAA8D;IAC9D,aAAa,EAAE,CAAC,OAAe,EAAE,OAAY,EAAE,EAAE;QAC/C,OAAO,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IACD,0BAA0B,EAAE,OAAO,CAAC,wBAAwB;IAC5D,aAAa,EAAE,OAAO,CAAC,eAAe;IACtC,QAAQ,EAAE,OAAO,CAAC,mBAAmB;IACrC,mBAAmB,EAAE,OAAO,CAAC,iBAAiB;IAC9C,qBAAqB,EAAE,OAAO,CAAC,QAAQ;IACvC,eAAe,EAAE,UAAU,SAAiB,EAAE,OAAe;QAC3D,OAAO,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;IACD,eAAe,EAAE,OAAO,CAAC,aAAa;CACvC,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonProperties } from '@internal/acs-ui-common';\nimport { ChatHandlers } from '@internal/chat-component-bindings';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { ChatAdapter } from '../adapter/ChatAdapter';\nimport { useAdapter } from '../adapter/ChatAdapterProvider';\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT,>(_component: (props: PropsT) => ReactElement | null): Pick<ChatHandlers, CommonProperties<ChatHandlers, PropsT>> => {\n return createCompositeHandlers(useAdapter());\n};\nconst createCompositeHandlers = memoizeOne((adapter: ChatAdapter): ChatHandlers => ({\n // have to use `any` here so we don't import from Chat SDK\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onSendMessage: (content: string, options: any) => {\n return adapter.sendMessage(content, options);\n },\n onLoadPreviousChatMessages: adapter.loadPreviousChatMessages,\n onMessageSeen: adapter.sendReadReceipt,\n onTyping: adapter.sendTypingIndicator,\n onRemoveParticipant: adapter.removeParticipant,\n updateThreadTopicName: adapter.setTopic,\n onUpdateMessage: function (messageId: string, content: string) {\n return adapter.updateMessage(messageId, content);\n },\n onDeleteMessage: adapter.deleteMessage\n}));"]}
@@ -0,0 +1,6 @@
1
+ import { ChatAdapterState } from '../adapter/ChatAdapter';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare const useSelector: <SelectorT extends (state: ChatAdapterState, props: any) => any>(selector: SelectorT, selectorProps?: Parameters<SelectorT>[1]) => ReturnType<SelectorT>;
6
+ //# sourceMappingURL=useSelector.d.ts.map
@@ -0,0 +1,11 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { useSelectorWithAdaptation } from './useAdaptedSelector';
4
+ /**
5
+ * @private
6
+ */
7
+ export const useSelector = (selector, selectorProps) => {
8
+ // use selector with no adaptation
9
+ return useSelectorWithAdaptation(selector, state => state, selectorProps);
10
+ };
11
+ //# sourceMappingURL=useSelector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelector.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/hooks/useSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEjE;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAkE,QAAmB,EAAE,aAAwC,EAAyB,EAAE;IACnL,kCAAkC;IAClC,OAAO,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAC5E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { ChatAdapterState } from '../adapter/ChatAdapter';\nimport { useSelectorWithAdaptation } from './useAdaptedSelector';\n\n/**\n * @private\n */\nexport const useSelector = <SelectorT extends (state: ChatAdapterState, props: any) => any,>(selector: SelectorT, selectorProps?: Parameters<SelectorT>[1]): ReturnType<SelectorT> => {\n // use selector with no adaptation\n return useSelectorWithAdaptation(selector, state => state, selectorProps);\n};"]}
@@ -5,6 +5,4 @@ export type { ChatCompositeProps, ChatCompositeOptions } from './ChatComposite';
5
5
  export type { ChatAdapter, ChatAdapterSubscribers, ChatAdapterThreadManagement, ChatCompositeClientState, ChatAdapterState, ChatAdapterUiState, MessageReadListener, MessageReceivedListener, MessageSentListener, MessageEditedListener, MessageDeletedListener, ParticipantsAddedListener, ParticipantsRemovedListener, TopicChangedListener } from './adapter/ChatAdapter';
6
6
  export type { ResourceDetails } from './adapter/ChatAdapter';
7
7
  export * from './Strings';
8
- export type { AttachmentOptions, AttachmentMetadata, AttachmentDownloadOptions } from './file-sharing';
9
- export type { AttachmentProgressError, AttachmentUploadOptions, AttachmentSelectionHandler, AttachmentActionHandler, AttachmentRemovalHandler, AttachmentUploadTask } from './file-sharing';
10
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mCAAmC,EAAE,6CAA6C,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE/K,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,cAAc,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { createAzureCommunicationChatAdapter, createAzureCommunicationChatAdapterFromClient, useAzureCommunicationChatAdapter } from './adapter/AzureCommunicationChatAdapter';\nexport type { AzureCommunicationChatAdapterArgs } from './adapter/AzureCommunicationChatAdapter';\nexport { ChatComposite } from './ChatComposite';\nexport type { ChatCompositeProps, ChatCompositeOptions } from './ChatComposite';\nexport type { ChatAdapter, ChatAdapterSubscribers, ChatAdapterThreadManagement, ChatCompositeClientState, ChatAdapterState, ChatAdapterUiState, MessageReadListener, MessageReceivedListener, MessageSentListener, MessageEditedListener, MessageDeletedListener, ParticipantsAddedListener, ParticipantsRemovedListener, TopicChangedListener } from './adapter/ChatAdapter';\nexport type { ResourceDetails } from './adapter/ChatAdapter';\nexport * from './Strings';\nexport type { AttachmentOptions, AttachmentMetadata, AttachmentDownloadOptions } from './file-sharing';\nexport type { AttachmentProgressError, AttachmentUploadOptions, AttachmentSelectionHandler, AttachmentActionHandler, AttachmentRemovalHandler, AttachmentUploadTask } from './file-sharing';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mCAAmC,EAAE,6CAA6C,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE/K,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,cAAc,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { createAzureCommunicationChatAdapter, createAzureCommunicationChatAdapterFromClient, useAzureCommunicationChatAdapter } from './adapter/AzureCommunicationChatAdapter';\nexport type { AzureCommunicationChatAdapterArgs } from './adapter/AzureCommunicationChatAdapter';\nexport { ChatComposite } from './ChatComposite';\nexport type { ChatCompositeProps, ChatCompositeOptions } from './ChatComposite';\nexport type { ChatAdapter, ChatAdapterSubscribers, ChatAdapterThreadManagement, ChatCompositeClientState, ChatAdapterState, ChatAdapterUiState, MessageReadListener, MessageReceivedListener, MessageSentListener, MessageEditedListener, MessageDeletedListener, ParticipantsAddedListener, ParticipantsRemovedListener, TopicChangedListener } from './adapter/ChatAdapter';\nexport type { ResourceDetails } from './adapter/ChatAdapter';\nexport * from './Strings';"]}
@@ -0,0 +1,12 @@
1
+ import { CommunicationIdentifierKind } from '@azure/communication-common';
2
+ import { ChatAdapterState } from '../adapter/ChatAdapter';
3
+ import { ChatMessageWithStatus } from "../../../../../chat-stateful-client/src";
4
+ /** @private */
5
+ export declare const getUserId: (state: ChatAdapterState) => CommunicationIdentifierKind;
6
+ /** @private */
7
+ export declare const getThreadId: (state: ChatAdapterState) => string;
8
+ /** @private */
9
+ export declare const getChatMessages: (state: ChatAdapterState) => {
10
+ [key: string]: ChatMessageWithStatus;
11
+ };
12
+ //# sourceMappingURL=baseSelectors.d.ts.map
@@ -0,0 +1,9 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ /** @private */
4
+ export const getUserId = (state) => state.userId;
5
+ /** @private */
6
+ export const getThreadId = (state) => state.thread.threadId;
7
+ /** @private */
8
+ export const getChatMessages = (state) => state.thread.chatMessages;
9
+ //# sourceMappingURL=baseSelectors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/selectors/baseSelectors.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAMlC,eAAe;AACf,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAuB,EAA+B,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;AAEhG,eAAe;AACf,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAU,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;AAEtF,eAAe;AACf,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAuB,EAErD,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { ChatAdapterState } from '../adapter/ChatAdapter';\nimport { ChatMessageWithStatus } from '@internal/chat-stateful-client';\n\n/** @private */\nexport const getUserId = (state: ChatAdapterState): CommunicationIdentifierKind => state.userId;\n\n/** @private */\nexport const getThreadId = (state: ChatAdapterState): string => state.thread.threadId;\n\n/** @private */\nexport const getChatMessages = (state: ChatAdapterState): {\n [key: string]: ChatMessageWithStatus;\n} => state.thread.chatMessages;"]}
@@ -13,7 +13,6 @@ import React, { useMemo, useRef, useEffect, useState, useCallback } from 'react'
13
13
  import { CallAdapterProvider } from '../../CallComposite/adapter/CallAdapterProvider';
14
14
  import { PeopleButton } from './PeopleButton';
15
15
  import { concatStyleSets, mergeStyles, mergeStyleSets, Stack, useTheme } from '@fluentui/react';
16
- import { PrimaryButton } from '@fluentui/react';
17
16
  import { controlBarContainerStyles } from '../../CallComposite/styles/CallControls.styles';
18
17
  import { callControlsContainerStyles } from '../../CallComposite/styles/CallPage.styles';
19
18
  import { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';
@@ -36,11 +35,11 @@ import { DtmfDialpadButton } from './DtmfDialerButton';
36
35
  import { ExitSpotlightButton } from '../ExitSpotlightButton';
37
36
  import { useLocale } from '../../localization';
38
37
  import { isBoolean } from '../utils';
38
+ import { getEnvironmentInfo } from '../../CallComposite/selectors/baseSelectors';
39
39
  import { getIsTeamsCall } from '../../CallComposite/selectors/baseSelectors';
40
- import { getAssignedBreakoutRoom, getBreakoutRoomSettings } from '../../CallComposite/selectors/baseSelectors';
41
40
  import { callStatusSelector } from '../../CallComposite/selectors/callStatusSelector';
42
41
  import { MeetingConferencePhoneInfoModal } from "../../../../../react-components/src";
43
- import { Timer } from './Timer';
42
+ import { _isSafari } from '../../CallComposite/utils';
44
43
  const inferCommonCallControlOptions = (mobileView, commonCallControlOptions) => {
45
44
  if (commonCallControlOptions === false) {
46
45
  return false;
@@ -74,8 +73,6 @@ export const CommonCallControlBar = (props) => {
74
73
  const [showCaptionsSettingsModal, setShowCaptionsSettingsModal] = useState(false); // If the hangup capability is not present, we default to true
75
74
  const isHangUpForEveryoneAllowed = (_a = useSelector(state => { var _a, _b; return (_b = (_a = state.call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.hangUpForEveryOne.isPresent; })) !== null && _a !== void 0 ? _a : true;
76
75
  const isTeams = useSelector(getIsTeamsCall);
77
- const assignedBreakoutRoom = useSelector(getAssignedBreakoutRoom);
78
- const breakoutRoomSettings = useSelector(getBreakoutRoomSettings);
79
76
  const handleResize = useCallback(() => {
80
77
  setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);
81
78
  setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);
@@ -125,6 +122,29 @@ export const CommonCallControlBar = (props) => {
125
122
  label: callStrings.exitSpotlightButtonLabel,
126
123
  tooltipContent: callStrings.exitSpotlightButtonTooltip
127
124
  }), [callStrings]);
125
+ const [isDeepNoiseSuppressionOn, setDeepNoiseSuppressionOn] = useState(false);
126
+ const startDeepNoiseSuppression = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
127
+ yield props.callAdapter.startNoiseSuppressionEffect();
128
+ }), [props.callAdapter]);
129
+ const environmentInfo = useSelector(getEnvironmentInfo);
130
+ const isSafari = _isSafari(environmentInfo);
131
+ useEffect(() => {
132
+ if (props.callAdapter.getState().onResolveDeepNoiseSuppressionDependency && props.callAdapter.getState().deepNoiseSuppressionOnByDefault) {
133
+ startDeepNoiseSuppression();
134
+ setDeepNoiseSuppressionOn(true);
135
+ }
136
+ }, [props.callAdapter, startDeepNoiseSuppression]);
137
+ const showNoiseSuppressionButton = props.callAdapter.getState().onResolveDeepNoiseSuppressionDependency && !props.callAdapter.getState().hideDeepNoiseSuppressionButton && !isSafari ? true : false;
138
+ const onClickNoiseSuppression = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
139
+ if (isDeepNoiseSuppressionOn) {
140
+ yield props.callAdapter.stopNoiseSuppressionEffect();
141
+ setDeepNoiseSuppressionOn(false);
142
+ }
143
+ else {
144
+ yield props.callAdapter.startNoiseSuppressionEffect();
145
+ setDeepNoiseSuppressionOn(true);
146
+ }
147
+ }), [props.callAdapter, isDeepNoiseSuppressionOn]);
128
148
  const centerContainerStyles = useMemo(() => {
129
149
  const styles = !props.mobileView ? desktopControlBarStyles : {};
130
150
  return mergeStyleSets(styles, {
@@ -153,8 +173,6 @@ export const CommonCallControlBar = (props) => {
153
173
  const capabilitiesSelector = useSelector(capabilitySelector);
154
174
  const callState = useSelector(callStatusSelector);
155
175
  const isReactionAllowed = callState.callStatus !== 'Connected' || !(capabilitiesSelector === null || capabilitiesSelector === void 0 ? void 0 : capabilitiesSelector.capabilities) || capabilitiesSelector.capabilities.useReactions.isPresent;
156
- const canReturnToMainMeeting = breakoutRoomSettings && breakoutRoomSettings.disableReturnToMainMeeting === false;
157
- const returnFromBreakoutRoom = useCallback(() => props.callAdapter.returnFromBreakoutRoom(), [props.callAdapter]);
158
176
  // when options is false then we want to hide the whole control bar.
159
177
  if (options === false) {
160
178
  return React.createElement(React.Fragment, null);
@@ -182,10 +200,7 @@ export const CommonCallControlBar = (props) => {
182
200
  React.createElement(Stack.Item, null,
183
201
  React.createElement("div", { ref: controlBarContainerRef },
184
202
  React.createElement(ControlBar, { layout: props.displayVertical ? 'vertical' : 'horizontal', styles: centerContainerStyles },
185
- !props.mobileView && assignedBreakoutRoom && assignedBreakoutRoom.state === 'open' && assignedBreakoutRoom.call && React.createElement(PrimaryButton, { text: callStrings.joinBreakoutRoomButtonLabel, onClick: () => __awaiter(void 0, void 0, void 0, function* () {
186
- assignedBreakoutRoom.join();
187
- }), styles: commonButtonStyles }),
188
- microphoneButtonIsEnabled && React.createElement(Microphone, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView, disabled: props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton), disableTooltip: props.mobileView }),
203
+ microphoneButtonIsEnabled && React.createElement(Microphone, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView, disabled: props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton), disableTooltip: props.mobileView, onClickNoiseSuppression: onClickNoiseSuppression, isDeepNoiseSuppressionOn: isDeepNoiseSuppressionOn, showNoiseSuppressionButton: showNoiseSuppressionButton }),
189
204
  cameraButtonIsEnabled && React.createElement(Camera, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView, disabled: props.disableButtonsForHoldScreen || isDisabled(options.cameraButton), onClickVideoEffects: props.onClickVideoEffects, componentRef: props.cameraButtonRef, disableTooltip: props.mobileView }),
190
205
  !props.mobileView && isReactionAllowed && isEnabled(options.reactionButton) && reactionResources && React.createElement(Reaction, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen, reactionResource: reactionResources }),
191
206
  !props.mobileView && isEnabled(options.raiseHandButton) && !hideRaiseHandButtonInRoomsCall && React.createElement(RaiseHand, { displayType: options.displayType, styles: commonButtonStyles, disabled: props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton) }),
@@ -206,16 +221,14 @@ export const CommonCallControlBar = (props) => {
206
221
  ((_j = (_h = props.callControls) === null || _h === void 0 ? void 0 : _h.endCallButton) === null || _j === void 0 ? void 0 : _j.hangUpForEveryone) === 'endCallOptions' &&
207
222
  // Only show the end call menu when the call is connected, user should not be able to end the call for everyone
208
223
  // when they are not actively in the call to communicate they will.
209
- callState.callStatus === 'Connected' && !canReturnToMainMeeting, disableEndCallModal: !isBoolean(props.callControls) && !isBoolean((_k = props.callControls) === null || _k === void 0 ? void 0 : _k.endCallButton) && ((_m = (_l = props.callControls) === null || _l === void 0 ? void 0 : _l.endCallButton) === null || _m === void 0 ? void 0 : _m.disableEndCallModal), returnFromBreakoutRoom: canReturnToMainMeeting ? returnFromBreakoutRoom : undefined }))))))),
224
+ callState.callStatus === 'Connected', disableEndCallModal: !isBoolean(props.callControls) && !isBoolean((_k = props.callControls) === null || _k === void 0 ? void 0 : _k.endCallButton) && ((_m = (_l = props.callControls) === null || _l === void 0 ? void 0 : _l.endCallButton) === null || _m === void 0 ? void 0 : _m.disableEndCallModal) }))))))),
210
225
  !props.mobileView && sideButtonsPresent && React.createElement(Stack.Item, null,
211
226
  React.createElement("div", { ref: sidepaneControlsRef },
212
227
  React.createElement(Stack, { horizontal: true, className: !props.mobileView ? mergeStyles(desktopButtonContainerStyle) : undefined },
213
228
  isEnabled(options === null || options === void 0 ? void 0 : options.peopleButton) && React.createElement(PeopleButton, { checked: props.peopleButtonChecked, ariaLabel: props.peopleButtonChecked ? peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.tooltipCloseAriaLabel : peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.tooltipOpenAriaLabel, showLabel: options.displayType !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "common-call-composite-people-button", disabled: props.disableButtonsForLobbyPage || props.disableButtonsForHoldScreen || isDisabled(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles, componentRef: props.peopleButtonRef }), (_o = customButtons['secondary']) === null || _o === void 0 ? void 0 :
214
229
  _o.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
215
230
  return React.createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' });
216
- })))),
217
- (breakoutRoomSettings === null || breakoutRoomSettings === void 0 ? void 0 : breakoutRoomSettings.roomEndTime) && !props.mobileView && !isOutOfSpace && React.createElement(Stack.Item, null,
218
- React.createElement(Timer, { timeStampInfo: breakoutRoomSettings === null || breakoutRoomSettings === void 0 ? void 0 : breakoutRoomSettings.roomEndTime.toString() }))));
231
+ }))))));
219
232
  };
220
233
  const desktopButtonContainerStyle = {
221
234
  padding: '0.75rem',