@azure/communication-react 1.24.0-beta.1 → 1.24.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 (583) hide show
  1. package/dist/communication-react.d.ts +66 -2240
  2. package/dist/dist-cjs/communication-react/index.js +38012 -178
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/common.d.ts +0 -13
  5. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/constants.d.ts +0 -5
  7. package/dist/dist-esm/acs-ui-common/src/constants.js +0 -5
  8. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/index.d.ts +0 -4
  10. package/dist/dist-esm/acs-ui-common/src/index.js +0 -3
  11. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +0 -14
  15. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -18
  16. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +0 -8
  18. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +2 -64
  19. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -28
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +1 -65
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -5
  24. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -30
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +6 -14
  28. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  30. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +0 -5
  33. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -8
  34. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +43 -32
  36. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  38. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +6 -160
  40. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +6 -26
  42. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +23 -251
  43. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -6
  45. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +6 -31
  46. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  47. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +4 -4
  48. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +0 -12
  50. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -32
  51. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  52. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -9
  53. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +1 -45
  54. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  56. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  57. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -3
  59. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +0 -7
  60. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  61. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +0 -8
  62. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  64. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  65. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  66. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  67. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  68. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  69. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  70. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  71. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
  72. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  73. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  74. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  75. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  76. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  77. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  78. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  79. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  80. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  81. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  82. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  83. package/dist/dist-esm/communication-react/src/index.d.ts +0 -35
  84. package/dist/dist-esm/communication-react/src/index.js +0 -9
  85. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  87. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  88. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +0 -101
  90. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -83
  91. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  118. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  119. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  121. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  122. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  123. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +0 -2
  124. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +1 -5
  125. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
  126. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  127. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  128. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +5 -3
  130. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  131. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +7 -4
  132. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  133. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  134. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  135. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/RaiseHandButton.js +2 -2
  137. package/dist/dist-esm/react-components/src/components/RaiseHandButton.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/ReactionButton.js +2 -2
  139. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  140. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  141. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  142. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  143. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  144. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  146. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  148. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  150. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -5
  152. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +1 -34
  154. package/dist/dist-esm/react-components/src/components/VideoGallery.js +2 -13
  155. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -24
  157. package/dist/dist-esm/react-components/src/components/index.js +0 -11
  158. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  159. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  160. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  161. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +0 -21
  162. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +0 -53
  163. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  165. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  166. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  168. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  169. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  170. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  171. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  172. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  174. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  175. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  176. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  177. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  179. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  180. package/dist/dist-esm/react-components/src/components/utils.js +2 -3
  181. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  182. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  183. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  184. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  185. package/dist/dist-esm/react-components/src/index.d.ts +0 -2
  186. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  187. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -63
  188. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  189. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +5 -0
  190. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +5 -0
  191. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +5 -0
  192. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +5 -0
  193. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +5 -0
  194. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +5 -0
  195. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +5 -0
  196. package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +5 -0
  197. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +5 -0
  198. package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +5 -0
  199. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +5 -0
  200. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +5 -0
  201. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +5 -0
  202. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +5 -0
  203. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +5 -0
  204. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +5 -0
  205. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +5 -0
  206. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +5 -0
  207. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +5 -0
  208. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +5 -0
  209. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +5 -0
  210. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +5 -0
  211. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +5 -0
  212. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +5 -0
  213. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js +0 -1
  214. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js.map +1 -1
  215. package/dist/dist-esm/react-components/src/theming/icons.d.ts +1 -29
  216. package/dist/dist-esm/react-components/src/theming/icons.js +2 -91
  217. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  218. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  219. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  220. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  222. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  223. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  224. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/types/index.d.ts +0 -1
  226. package/dist/dist-esm/react-components/src/types/index.js +0 -1
  227. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -72
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +11 -21
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -64
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -48
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +29 -89
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -72
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -3
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js +6 -2
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +1 -1
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -7
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +9 -0
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +1 -19
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -4
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +26 -2
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +24 -46
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -24
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -24
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +3 -3
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -2
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +12 -11
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +4 -60
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
  285. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +7 -13
  286. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -20
  288. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +23 -62
  289. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -73
  291. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  292. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -7
  293. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -12
  294. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  295. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  296. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  297. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -8
  299. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  300. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  301. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  302. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  303. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  304. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  305. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  307. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  309. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  310. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  311. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  312. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  313. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  314. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  315. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  316. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  320. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.d.ts +0 -1
  321. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js +3 -13
  322. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -2
  324. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -13
  325. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  326. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +0 -3
  327. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +2 -85
  328. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  329. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js +0 -1
  330. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -1
  331. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +0 -3
  332. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +9 -70
  333. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  334. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +0 -3
  335. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  337. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  338. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +1 -0
  339. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  340. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  341. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  342. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  343. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  344. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  345. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  346. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -33
  347. package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -5
  348. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  349. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +1 -1
  350. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +1 -1
  351. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +1 -1
  353. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -1
  355. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +1 -1
  357. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +1 -1
  358. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +1 -1
  359. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +1 -1
  361. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +1 -1
  362. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +1 -1
  363. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +1 -1
  364. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +1 -1
  365. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +1 -1
  366. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +1 -1
  367. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +1 -1
  368. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +1 -1
  370. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +1 -1
  371. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +1 -1
  372. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +1 -1
  373. package/package.json +3 -3
  374. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ClQ2m7aI.js +0 -206
  375. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ClQ2m7aI.js.map +0 -1
  376. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Bhftq9li.js +0 -50
  377. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-Bhftq9li.js.map +0 -1
  378. package/dist/dist-cjs/communication-react/index-CcIzeubJ.js +0 -45677
  379. package/dist/dist-cjs/communication-react/index-CcIzeubJ.js.map +0 -1
  380. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  381. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  382. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  383. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  384. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  385. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  386. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.d.ts +0 -14
  387. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js +0 -204
  388. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js.map +0 -1
  389. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  390. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  391. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  392. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.d.ts +0 -16
  393. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +0 -22
  394. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js.map +0 -1
  395. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.d.ts +0 -24
  396. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js +0 -60
  397. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js.map +0 -1
  398. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.d.ts +0 -18
  399. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js +0 -31
  400. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js.map +0 -1
  401. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  402. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  403. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  404. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  405. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  406. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  407. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  408. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  409. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  410. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  411. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  412. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  413. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  414. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  415. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  416. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  417. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  418. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  419. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  420. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  421. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  422. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  423. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  424. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  425. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.d.ts +0 -28
  426. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js +0 -26
  427. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js.map +0 -1
  428. package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +0 -58
  429. package/dist/dist-esm/react-components/src/components/RealTimeText.js +0 -38
  430. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +0 -1
  431. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +0 -42
  432. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js +0 -53
  433. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +0 -1
  434. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  435. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  436. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  437. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  438. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  439. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  440. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
  441. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
  442. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  443. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  444. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  445. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  446. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  447. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  448. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  449. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  450. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  451. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  452. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  453. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  454. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  455. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
  456. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
  457. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  458. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
  459. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -336
  460. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  461. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  462. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  463. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  464. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  465. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -173
  466. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  467. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  468. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  469. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  470. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  471. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
  472. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  473. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  474. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  475. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  476. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  477. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  478. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  479. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  480. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  481. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  482. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  483. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  484. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  485. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  486. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  487. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  488. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +0 -48
  489. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js +0 -25
  490. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +0 -1
  491. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  492. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  493. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  494. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  495. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  496. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  497. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.d.ts +0 -15
  498. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +0 -91
  499. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +0 -1
  500. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.d.ts +0 -10
  501. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js +0 -14
  502. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js.map +0 -1
  503. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.d.ts +0 -23
  504. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +0 -47
  505. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +0 -1
  506. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  507. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  508. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  509. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  510. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  511. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  512. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.d.ts +0 -10
  513. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js +0 -23
  514. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js.map +0 -1
  515. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  516. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
  517. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  518. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  519. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  520. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  521. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  522. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  523. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  524. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  525. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  526. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  527. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.d.ts +0 -98
  528. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js +0 -181
  529. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js.map +0 -1
  530. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  531. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  532. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  533. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
  534. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
  535. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  536. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  537. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  538. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  539. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  540. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  541. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  542. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.d.ts +0 -8
  543. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js +0 -17
  544. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js.map +0 -1
  545. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  546. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  547. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  548. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.d.ts +0 -38
  549. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js +0 -2
  550. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +0 -1
  551. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  552. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
  553. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  554. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  555. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  556. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  557. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  558. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  559. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  560. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  561. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  562. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  563. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  564. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  565. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  566. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  567. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  568. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  569. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  570. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  571. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  572. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  573. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  574. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  575. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  576. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  577. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  578. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.d.ts +0 -12
  579. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js +0 -19
  580. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js.map +0 -1
  581. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  582. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  583. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"notificationStackSelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/notificationStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA4B,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClI,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAA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aseSelectorProps, getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo } from './baseSelectors';\nimport { getAssignedBreakoutRoom } from './baseSelectors';\nimport { getLatestNotifications } from './baseSelectors';\nimport { getMeetingConferencePhones } from './baseSelectors';\nimport { ActiveNotification, NotificationType } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\nimport { DiagnosticQuality } from '@azure/communication-calling';\n\n/**\n * Selector type for {@link Notification} component.\n *\n * @public\n */\nexport type NotificationStackSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n};\n\n/**\n * Select the active errors from the state for the `Notification` component.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const notificationStackSelector: NotificationStackSelector = createSelector([getLatestErrors, getLatestNotifications, getDiagnostics, getDeviceManager, getEnvironmentInfo, getMeetingConferencePhones, getAssignedBreakoutRoom], (latestErrors: CallErrors, latestNotifications, diagnostics, deviceManager, environmentInfo, meetingConference, assignedBreakoutRoom): {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n} => {\n // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveNotification[] = [];\n const isSafari = (): boolean => {\n return environmentInfo?.environment.browser === 'safari';\n };\n const isMacOS = (): boolean => {\n return environmentInfo?.environment.platform === 'mac';\n };\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n let isTeamsMeetingWithPhones = false;\n if (meetingConference && meetingConference.length > 0) {\n isTeamsMeetingWithPhones = true;\n }\n if (diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad || diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor) {\n if (isTeamsMeetingWithPhones) {\n activeErrorMessages.push({\n type: 'teamsMeetingCallNetworkQualityLow'\n });\n } else {\n activeErrorMessages.push({\n type: 'callNetworkQualityLow'\n });\n }\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({\n type: 'callNoSpeakerFound'\n });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({\n type: 'callNoMicrophoneFound'\n });\n }\n if (deviceManager.deviceAccess?.audio === false && isSafari()) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDeniedSafari'\n });\n }\n if (deviceManager.deviceAccess?.audio === false && !isSafari()) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDenied'\n });\n }\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsMicrophoneAccessDenied'\n });\n } else if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDenied'\n });\n }\n const microphoneMuteUnexpectedlyDiagnostic = diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({\n type: 'callMicrophoneMutedBySystem'\n });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({\n type: 'callMicrophoneUnmutedBySystem'\n });\n }\n }\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({\n type: 'callVideoStoppedBySystem'\n });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({\n type: 'callVideoRecoveredBySystem'\n });\n }\n }\n if (deviceManager.deviceAccess?.video === false && isSafari()) {\n activeErrorMessages.push({\n type: 'callCameraAccessDeniedSafari'\n });\n } else if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({\n type: 'callCameraAccessDenied'\n });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({\n type: 'cameraFrozenForRemoteParticipants'\n });\n }\n }\n\n /**\n * show the Mac specific strings if the platform is detected as mac\n */\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsCameraAccessDenied'\n });\n }\n\n /**\n * This UFD only works on mac still so we should only see it fire on mac.\n */\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsScreenShareAccessDenied'\n });\n } else if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({\n type: 'startScreenShareGeneric'\n });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n if (latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure SourceUnavailableError') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');\n } else if (latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure permissionDeniedError') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n }\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n if (latestNotifications && !latestNotifications['capabilityUnmuteMicAbsent'] && !latestNotifications['capabilityUnmuteMicPresent']) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n }\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'VideoEffectsFeature.startEffects', 'unableToStartVideoEffect');\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallInvalidMeetingLink');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n if (latestErrors['Call.feature']?.message.match(/Call\\.feature: startSpotlight failed\\. \\d+ is the max number of participants that can be Spotlighted/g)) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.feature', 'startSpotlightWhileMaxParticipantsAreSpotlighted');\n }\n\n //below is for active notifications\n const activeNotifications: ActiveNotification[] = [];\n if (diagnostics?.media.latest.speakingWhileMicrophoneIsMuted?.value) {\n activeNotifications.push({\n type: 'speakingWhileMuted',\n timestamp: new Date(Date.now()),\n autoDismiss: true,\n ariaLive: 'off' // \"You're muted\" is too noisy, so we don't want to announce it.\n });\n }\n if (latestNotifications['assignedBreakoutRoomOpened']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpened',\n timestamp: latestNotifications['assignedBreakoutRoomOpened'].timestamp\n });\n }\n if (latestNotifications['assignedBreakoutRoomOpenedPromptJoin'] && assignedBreakoutRoom) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpenedPromptJoin',\n timestamp: latestNotifications['assignedBreakoutRoomOpenedPromptJoin'].timestamp,\n onClickPrimaryButton: () => assignedBreakoutRoom.join()\n });\n }\n if (latestNotifications['assignedBreakoutRoomChanged']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomChanged',\n timestamp: latestNotifications['assignedBreakoutRoomChanged'].timestamp\n });\n }\n if (latestNotifications['breakoutRoomJoined']) {\n activeNotifications.push({\n type: 'breakoutRoomJoined',\n timestamp: latestNotifications['breakoutRoomJoined'].timestamp\n });\n }\n if (latestNotifications['breakoutRoomClosingSoon']) {\n activeNotifications.push({\n type: 'breakoutRoomClosingSoon',\n timestamp: latestNotifications['breakoutRoomClosingSoon'].timestamp\n });\n }\n if (latestNotifications['capabilityTurnVideoOnPresent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnPresent',\n timestamp: latestNotifications['capabilityTurnVideoOnPresent'].timestamp\n });\n }\n if (latestNotifications['capabilityTurnVideoOnAbsent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnAbsent',\n timestamp: latestNotifications['capabilityTurnVideoOnAbsent'].timestamp\n });\n }\n if (latestNotifications['capabilityUnmuteMicPresent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicPresent',\n timestamp: latestNotifications['capabilityUnmuteMicPresent'].timestamp\n });\n }\n if (latestNotifications['capabilityUnmuteMicAbsent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicAbsent',\n timestamp: latestNotifications['capabilityUnmuteMicAbsent'].timestamp\n });\n }\n if (latestNotifications['togetherModeStarted']) {\n activeNotifications.push({\n type: 'togetherModeStarted',\n timestamp: latestNotifications['togetherModeStarted'].timestamp,\n autoDismiss: true\n });\n }\n if (latestNotifications['togetherModeEnded']) {\n activeNotifications.push({\n type: 'togetherModeEnded',\n timestamp: latestNotifications['togetherModeEnded'].timestamp,\n autoDismiss: true\n });\n }\n return {\n activeErrorMessages: activeErrorMessages,\n activeNotifications: activeNotifications\n };\n});\nconst appendActiveErrorIfDefined = (activeErrorMessages: ActiveNotification[], latestErrors: CallErrors, target: CallErrorTarget, activeErrorType: NotificationType): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};"]}
1
+ {"version":3,"file":"notificationStackSelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/notificationStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA4B,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClI,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAYjE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA8B,cAAc,CAAC,CAAC,eAAe,EAAE,sBAAsB,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,uBAAuB,CAAC,EAAE,CAAC,YAAwB,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAG3W,EAAE;;IACF,sHAAsH;IACtH,8CAA8C;IAC9C,wEAAwE;IACxE,iCAAiC;IACjC,EAAE;IACF,iHAAiH;IACjH,8BAA8B;IAC9B,MAAM,mBAAmB,GAAyB,EAAE,CAAC;IACrD,MAAM,QAAQ,GAAG,GAAY,EAAE;QAC7B,OAAO,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,CAAC,OAAO,MAAK,QAAQ,CAAC;IAC3D,CAAC,CAAC;IACF,MAAM,OAAO,GAAG,GAAY,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AAC,mBAAyC,EAAE,YAAwB,EAAE,MAAuB,EAAE,eAAiC,EAAQ,EAAE;IAC3K,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO;IACT,CAAC;IACD,mBAAmB,CAAC,IAAI,CAAC;QACvB,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallingBaseSelectorProps, getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo } from './baseSelectors';\nimport { getAssignedBreakoutRoom } from './baseSelectors';\nimport { getLatestNotifications } from './baseSelectors';\nimport { getMeetingConferencePhones } from './baseSelectors';\nimport { ActiveNotification, NotificationType } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\nimport { DiagnosticQuality } from '@azure/communication-calling';\n\n/**\n * Selector type for {@link Notification} component.\n *\n * @public\n */\nexport type NotificationStackSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n};\n\n/**\n * Select the active errors from the state for the `Notification` component.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const notificationStackSelector: NotificationStackSelector = createSelector([getLatestErrors, getLatestNotifications, getDiagnostics, getDeviceManager, getEnvironmentInfo, getMeetingConferencePhones, getAssignedBreakoutRoom], (latestErrors: CallErrors, latestNotifications, diagnostics, deviceManager, environmentInfo, meetingConference, assignedBreakoutRoom): {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n} => {\n // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveNotification[] = [];\n const isSafari = (): boolean => {\n return environmentInfo?.environment.browser === 'safari';\n };\n const isMacOS = (): boolean => {\n return environmentInfo?.environment.platform === 'mac';\n };\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n let isTeamsMeetingWithPhones = false;\n if (meetingConference && meetingConference.length > 0) {\n isTeamsMeetingWithPhones = true;\n }\n if (diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad || diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor) {\n if (isTeamsMeetingWithPhones) {\n activeErrorMessages.push({\n type: 'teamsMeetingCallNetworkQualityLow'\n });\n } else {\n activeErrorMessages.push({\n type: 'callNetworkQualityLow'\n });\n }\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({\n type: 'callNoSpeakerFound'\n });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({\n type: 'callNoMicrophoneFound'\n });\n }\n if (deviceManager.deviceAccess?.audio === false && isSafari()) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDeniedSafari'\n });\n }\n if (deviceManager.deviceAccess?.audio === false && !isSafari()) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDenied'\n });\n }\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsMicrophoneAccessDenied'\n });\n } else if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({\n type: 'callMicrophoneAccessDenied'\n });\n }\n const microphoneMuteUnexpectedlyDiagnostic = diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({\n type: 'callMicrophoneMutedBySystem'\n });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({\n type: 'callMicrophoneUnmutedBySystem'\n });\n }\n }\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({\n type: 'callVideoStoppedBySystem'\n });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({\n type: 'callVideoRecoveredBySystem'\n });\n }\n }\n if (deviceManager.deviceAccess?.video === false && isSafari()) {\n activeErrorMessages.push({\n type: 'callCameraAccessDeniedSafari'\n });\n } else if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({\n type: 'callCameraAccessDenied'\n });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({\n type: 'cameraFrozenForRemoteParticipants'\n });\n }\n }\n\n /**\n * show the Mac specific strings if the platform is detected as mac\n */\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsCameraAccessDenied'\n });\n }\n\n /**\n * This UFD only works on mac still so we should only see it fire on mac.\n */\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true && isMacOS()) {\n activeErrorMessages.push({\n type: 'callMacOsScreenShareAccessDenied'\n });\n } else if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({\n type: 'startScreenShareGeneric'\n });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n if (latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure SourceUnavailableError') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');\n } else if (latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure permissionDeniedError') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n }\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n if (latestNotifications && !latestNotifications['capabilityUnmuteMicAbsent'] && !latestNotifications['capabilityUnmuteMicPresent']) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n }\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'VideoEffectsFeature.startEffects', 'unableToStartVideoEffect');\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallInvalidMeetingLink');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n if (latestErrors['Call.feature']?.message.match(/Call\\.feature: startSpotlight failed\\. \\d+ is the max number of participants that can be Spotlighted/g)) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.feature', 'startSpotlightWhileMaxParticipantsAreSpotlighted');\n }\n\n //below is for active notifications\n const activeNotifications: ActiveNotification[] = [];\n if (diagnostics?.media.latest.speakingWhileMicrophoneIsMuted?.value) {\n activeNotifications.push({\n type: 'speakingWhileMuted',\n timestamp: new Date(Date.now()),\n autoDismiss: true,\n ariaLive: 'off' // \"You're muted\" is too noisy, so we don't want to announce it.\n });\n }\n if (latestNotifications['assignedBreakoutRoomOpened']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpened',\n timestamp: latestNotifications['assignedBreakoutRoomOpened'].timestamp\n });\n }\n if (latestNotifications['assignedBreakoutRoomOpenedPromptJoin'] && assignedBreakoutRoom) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpenedPromptJoin',\n timestamp: latestNotifications['assignedBreakoutRoomOpenedPromptJoin'].timestamp,\n onClickPrimaryButton: () => assignedBreakoutRoom.join()\n });\n }\n if (latestNotifications['assignedBreakoutRoomChanged']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomChanged',\n timestamp: latestNotifications['assignedBreakoutRoomChanged'].timestamp\n });\n }\n if (latestNotifications['assignedBreakoutRoomClosed']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomClosed',\n timestamp: latestNotifications['assignedBreakoutRoomClosed'].timestamp\n });\n }\n if (latestNotifications['breakoutRoomJoined']) {\n activeNotifications.push({\n type: 'breakoutRoomJoined',\n timestamp: latestNotifications['breakoutRoomJoined'].timestamp\n });\n }\n if (latestNotifications['breakoutRoomClosingSoon']) {\n activeNotifications.push({\n type: 'breakoutRoomClosingSoon',\n timestamp: latestNotifications['breakoutRoomClosingSoon'].timestamp\n });\n }\n if (latestNotifications['capabilityTurnVideoOnPresent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnPresent',\n timestamp: latestNotifications['capabilityTurnVideoOnPresent'].timestamp\n });\n }\n if (latestNotifications['capabilityTurnVideoOnAbsent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnAbsent',\n timestamp: latestNotifications['capabilityTurnVideoOnAbsent'].timestamp\n });\n }\n if (latestNotifications['capabilityUnmuteMicPresent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicPresent',\n timestamp: latestNotifications['capabilityUnmuteMicPresent'].timestamp\n });\n }\n if (latestNotifications['capabilityUnmuteMicAbsent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicAbsent',\n timestamp: latestNotifications['capabilityUnmuteMicAbsent'].timestamp\n });\n }\n return {\n activeErrorMessages: activeErrorMessages,\n activeNotifications: activeNotifications\n };\n});\nconst appendActiveErrorIfDefined = (activeErrorMessages: ActiveNotification[], latestErrors: CallErrors, target: CallErrorTarget, activeErrorType: NotificationType): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};"]}
@@ -9,7 +9,6 @@ import { CallParticipantListParticipant } from "../../react-components/src";
9
9
  export type ParticipantListSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
10
10
  participants: CallParticipantListParticipant[];
11
11
  myUserId: string;
12
- totalParticipantCount?: number;
13
12
  };
14
13
  /**
15
14
  * Selects data that drives {@link ParticipantList} component.
@@ -79,11 +79,9 @@ export const participantListSelector = createSelector([getIdentifier, getDisplay
79
79
  isVideoPermitted: (capabilities === null || capabilities === void 0 ? void 0 : capabilities.turnVideoOn) ? capabilities.turnVideoOn.isPresent : true
80
80
  }
81
81
  });
82
- const totalParticipantCount = partitipantCount;
83
82
  return {
84
83
  participants: participants,
85
- myUserId: userId,
86
- totalParticipantCount: totalParticipantCount
84
+ myUserId: userId
87
85
  };
88
86
  });
89
87
  const localUserCanRemoveOthersTrampoline = (role) => {
@@ -1 +1 @@
1
- {"version":3,"file":"participantListSelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/participantListSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAE,UAAU,EAA4B,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7I,OAAO,EAAE,O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B,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,uBAAuB,EAAE,MAAM,CAAC;QACnF,WAAW,EAAE;YACX,gBAAgB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,EAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;YACnF,gBAAgB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,EAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;SACxF;KACF,CAAC,CAAC;IACH,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;IAC/C,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,MAAM;QAChB,qBAAqB,EAAE,qBAAqB;KAC7C,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,MAAM,kCAAkC,GAAG,CAAC,IAAa,EAAW,EAAE;IACpE,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { createSelector } from 'reselect';\nimport { getIdentifier, getDisplayName, getIsScreenSharingOn, getIsMuted, CallingBaseSelectorProps, getCapabilities } from './baseSelectors';\nimport { getRole } from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { CallParticipantListParticipant } from '@internal/react-components';\nimport { _convertParticipantState, _updateUserDisplayNames } from './utils/callUtils';\nimport { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';\nimport { memoizedConvertToVideoTileReaction, memoizedSpotlight } from './utils/participantListSelectorUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { getSpotlightCallFeature } from './baseSelectors';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { getParticipantCount } from './baseSelectors';\nimport { isMicrosoftTeamsAppIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { ParticipantRole, SpotlightedParticipant } from '@azure/communication-calling';\nimport { maskDisplayNameWithRole } from './utils/callUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\nconst convertRemoteParticipantsToParticipantListParticipants = (remoteParticipants: RemoteParticipantState[], localUserCanRemoveOthers: boolean, isHideAttendeeNamesEnabled?: boolean, localUserRole?: ParticipantRole, spotlightedParticipants?: SpotlightedParticipant[]): CallParticipantListParticipant[] => {\n const conversionCallback = (memoizeFn: (...args: any[]) => CallParticipantListParticipant): CallParticipantListParticipant[] => {\n return remoteParticipants\n // Filter out MicrosoftBot participants\n .filter((participant: RemoteParticipantState) => {\n return !isMicrosoftTeamsAppIdentifier(participant.identifier);\n })\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */.filter(participant => {\n return !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) || isPhoneNumberIdentifier(participant.identifier);\n }).map((participant: RemoteParticipantState) => {\n const isScreenSharing = Object.values(participant.videoStreams).some(videoStream => videoStream.mediaStreamType === 'ScreenSharing' && videoStream.isAvailable);\n /**\n * We want to check the participant to see if they are a PSTN participant joining the call\n * and mapping their state to be 'Ringing'\n */\n const state = _convertParticipantState(participant);\n const displayName = maskDisplayNameWithRole(participant.displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));\n return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking, participant.raisedHand, localUserCanRemoveOthers, remoteParticipantReaction, spotlight, participant.mediaAccess);\n }).sort((a, b) => {\n const nameA = a.displayName?.toLowerCase() || '';\n const nameB = b.displayName?.toLowerCase() || '';\n if (nameA < nameB) {\n return -1;\n } else if (nameA > nameB) {\n return 1;\n } else {\n return 0;\n }\n });\n };\n return memoizedConvertAllremoteParticipants(conversionCallback);\n};\n\n/**\n * Selector type for {@link ParticipantList} component.\n *\n * @public\n */\nexport type ParticipantListSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n totalParticipantCount?: number;\n};\n\n/**\n * Selects data that drives {@link ParticipantList} component.\n *\n * @public\n */\nexport const participantListSelector: ParticipantListSelector = createSelector([getIdentifier, getDisplayName, getRemoteParticipantsExcludingConsumers, getIsScreenSharingOn, getIsMuted, getLocalParticipantRaisedHand, getRole, getParticipantCount, isHideAttendeeNamesEnabled, getLocalParticipantReactionState, getSpotlightCallFeature, getCapabilities], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, raisedHand, role, partitipantCount, isHideAttendeeNamesEnabled, localParticipantReactionState, spotlightCallFeature, capabilities): {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n totalParticipantCount?: number;\n} => {\n const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);\n const participants = remoteParticipants ? convertRemoteParticipantsToParticipantListParticipants(_updateUserDisplayNames(Object.values(remoteParticipants)), localUserCanRemoveOthers, isHideAttendeeNamesEnabled, role, spotlightCallFeature?.spotlightedParticipants) : [];\n participants.push({\n userId: userId,\n displayName: displayName,\n isScreenSharing: isScreenSharingOn,\n isMuted: isMuted,\n raisedHand: raisedHand,\n state: 'Connected',\n // Local participant can never remove themselves.\n isRemovable: false,\n reaction: memoizedConvertToVideoTileReaction(localParticipantReactionState),\n spotlight: memoizedSpotlight(spotlightCallFeature?.spotlightedParticipants, userId),\n mediaAccess: {\n isAudioPermitted: capabilities?.unmuteMic ? capabilities.unmuteMic.isPresent : true,\n isVideoPermitted: capabilities?.turnVideoOn ? capabilities.turnVideoOn.isPresent : true\n }\n });\n const totalParticipantCount = partitipantCount;\n return {\n participants: participants,\n myUserId: userId,\n totalParticipantCount: totalParticipantCount\n };\n});\nconst localUserCanRemoveOthersTrampoline = (role?: string): boolean => {\n return role === 'Presenter' || role === 'Unknown' || role === undefined;\n};"]}
1
+ {"version":3,"file":"participantListSelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/participantListSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,oBAAoB,EAAE,UAAU,EAA4B,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7I,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC7G,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAErG,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;A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n\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { createSelector } from 'reselect';\nimport { getIdentifier, getDisplayName, getIsScreenSharingOn, getIsMuted, CallingBaseSelectorProps, getCapabilities } from './baseSelectors';\nimport { getRole } from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { CallParticipantListParticipant } from '@internal/react-components';\nimport { _convertParticipantState, _updateUserDisplayNames } from './utils/callUtils';\nimport { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';\nimport { memoizedConvertToVideoTileReaction, memoizedSpotlight } from './utils/participantListSelectorUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { getSpotlightCallFeature } from './baseSelectors';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { getParticipantCount } from './baseSelectors';\nimport { isMicrosoftTeamsAppIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { ParticipantRole, SpotlightedParticipant } from '@azure/communication-calling';\nimport { maskDisplayNameWithRole } from './utils/callUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\nconst convertRemoteParticipantsToParticipantListParticipants = (remoteParticipants: RemoteParticipantState[], localUserCanRemoveOthers: boolean, isHideAttendeeNamesEnabled?: boolean, localUserRole?: ParticipantRole, spotlightedParticipants?: SpotlightedParticipant[]): CallParticipantListParticipant[] => {\n const conversionCallback = (memoizeFn: (...args: any[]) => CallParticipantListParticipant): CallParticipantListParticipant[] => {\n return remoteParticipants\n // Filter out MicrosoftBot participants\n .filter((participant: RemoteParticipantState) => {\n return !isMicrosoftTeamsAppIdentifier(participant.identifier);\n })\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */.filter(participant => {\n return !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) || isPhoneNumberIdentifier(participant.identifier);\n }).map((participant: RemoteParticipantState) => {\n const isScreenSharing = Object.values(participant.videoStreams).some(videoStream => videoStream.mediaStreamType === 'ScreenSharing' && videoStream.isAvailable);\n /**\n * We want to check the participant to see if they are a PSTN participant joining the call\n * and mapping their state to be 'Ringing'\n */\n const state = _convertParticipantState(participant);\n const displayName = maskDisplayNameWithRole(participant.displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));\n return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking, participant.raisedHand, localUserCanRemoveOthers, remoteParticipantReaction, spotlight, participant.mediaAccess);\n }).sort((a, b) => {\n const nameA = a.displayName?.toLowerCase() || '';\n const nameB = b.displayName?.toLowerCase() || '';\n if (nameA < nameB) {\n return -1;\n } else if (nameA > nameB) {\n return 1;\n } else {\n return 0;\n }\n });\n };\n return memoizedConvertAllremoteParticipants(conversionCallback);\n};\n\n/**\n * Selector type for {@link ParticipantList} component.\n *\n * @public\n */\nexport type ParticipantListSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n};\n\n/**\n * Selects data that drives {@link ParticipantList} component.\n *\n * @public\n */\nexport const participantListSelector: ParticipantListSelector = createSelector([getIdentifier, getDisplayName, getRemoteParticipantsExcludingConsumers, getIsScreenSharingOn, getIsMuted, getLocalParticipantRaisedHand, getRole, getParticipantCount, isHideAttendeeNamesEnabled, getLocalParticipantReactionState, getSpotlightCallFeature, getCapabilities], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, raisedHand, role, partitipantCount, isHideAttendeeNamesEnabled, localParticipantReactionState, spotlightCallFeature, capabilities): {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n totalParticipantCount?: number;\n} => {\n const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);\n const participants = remoteParticipants ? convertRemoteParticipantsToParticipantListParticipants(_updateUserDisplayNames(Object.values(remoteParticipants)), localUserCanRemoveOthers, isHideAttendeeNamesEnabled, role, spotlightCallFeature?.spotlightedParticipants) : [];\n participants.push({\n userId: userId,\n displayName: displayName,\n isScreenSharing: isScreenSharingOn,\n isMuted: isMuted,\n raisedHand: raisedHand,\n state: 'Connected',\n // Local participant can never remove themselves.\n isRemovable: false,\n reaction: memoizedConvertToVideoTileReaction(localParticipantReactionState),\n spotlight: memoizedSpotlight(spotlightCallFeature?.spotlightedParticipants, userId),\n mediaAccess: {\n isAudioPermitted: capabilities?.unmuteMic ? capabilities.unmuteMic.isPresent : true,\n isVideoPermitted: capabilities?.turnVideoOn ? capabilities.turnVideoOn.isPresent : true\n }\n });\n return {\n participants: participants,\n myUserId: userId\n };\n});\nconst localUserCanRemoveOthersTrampoline = (role?: string): boolean => {\n return role === 'Presenter' || role === 'Unknown' || role === undefined;\n};"]}
@@ -1,6 +1,5 @@
1
1
  import { CallClientState } from "../../calling-stateful-client/src";
2
2
  import { VideoGalleryRemoteParticipant, VideoGalleryLocalParticipant } from "../../react-components/src";
3
- import { VideoGalleryTogetherModeStreams, VideoGalleryTogetherModeParticipantPosition } from "../../react-components/src";
4
3
  import { CallingBaseSelectorProps } from './baseSelectors';
5
4
  /**
6
5
  * Selector type for {@link VideoGallery} component.
@@ -15,10 +14,6 @@ export type VideoGallerySelector = (state: CallClientState, props: CallingBaseSe
15
14
  optimalVideoCount?: number;
16
15
  spotlightedParticipants?: string[];
17
16
  maxParticipantsToSpotlight?: number;
18
- isTogetherModeActive?: boolean;
19
- startTogetherModeEnabled?: boolean;
20
- togetherModeStreams?: VideoGalleryTogetherModeStreams;
21
- togetherModeSeatingCoordinates?: VideoGalleryTogetherModeParticipantPosition;
22
17
  };
23
18
  /**
24
19
  * Provides data attributes to {@link VideoGallery} component.
@@ -3,12 +3,11 @@
3
3
  import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
4
4
  import { createSelector } from 'reselect';
5
5
  import { getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRole, getScreenShareRemoteParticipant } from './baseSelectors';
6
- import { getTogetherModeCallFeature } from './baseSelectors';
7
6
  import { isHideAttendeeNamesEnabled } from './baseSelectors';
8
7
  import { getOptimalVideoCount } from './baseSelectors';
9
8
  import { _updateUserDisplayNames } from './utils/callUtils';
10
9
  import { checkIsSpeaking } from './utils/SelectorUtils';
11
- import { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant, memoizeTogetherModeStreams } from './utils/videoGalleryUtils';
10
+ import { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant } from './utils/videoGalleryUtils';
12
11
  import { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';
13
12
  import { getLocalParticipantRaisedHand } from './baseSelectors';
14
13
  import { getLocalParticipantReactionState } from './baseSelectors';
@@ -19,7 +18,7 @@ import { getSpotlightCallFeature, getCapabilities } from './baseSelectors';
19
18
  * Provides data attributes to {@link VideoGallery} component.
20
19
  * @public
21
20
  */
22
- export const videoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipantsExcludingConsumers, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers, getOptimalVideoCount, getRole, getLocalParticipantRaisedHand, isHideAttendeeNamesEnabled, getLocalParticipantReactionState, getSpotlightCallFeature, getCapabilities, getTogetherModeCallFeature], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, optimalVideoCount, role, raisedHand, isHideAttendeeNamesEnabled, localParticipantReaction, spotlightCallFeature, capabilities, togetherModeCallFeature) => {
21
+ export const videoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipantsExcludingConsumers, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers, getOptimalVideoCount, getRole, getLocalParticipantRaisedHand, isHideAttendeeNamesEnabled, getLocalParticipantReactionState, getSpotlightCallFeature, getCapabilities], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, optimalVideoCount, role, raisedHand, isHideAttendeeNamesEnabled, localParticipantReaction, spotlightCallFeature, capabilities) => {
23
22
  const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants ? remoteParticipants[screenShareRemoteParticipantId] : undefined;
24
23
  const localVideoStream = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find(i => i.mediaStreamType === 'Video');
25
24
  const localScreenSharingStream = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find(i => i.mediaStreamType === 'ScreenSharing');
@@ -36,11 +35,7 @@ export const videoGallerySelector = createSelector([getScreenShareRemoteParticip
36
35
  dominantSpeakers: dominantSpeakerIds,
37
36
  maxRemoteVideoStreams: optimalVideoCount,
38
37
  spotlightedParticipants: spotlightedParticipantIds,
39
- maxParticipantsToSpotlight: spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.maxParticipantsToSpotlight,
40
- togetherModeStreams: memoizeTogetherModeStreams(togetherModeCallFeature === null || togetherModeCallFeature === void 0 ? void 0 : togetherModeCallFeature.streams),
41
- togetherModeSeatingCoordinates: togetherModeCallFeature === null || togetherModeCallFeature === void 0 ? void 0 : togetherModeCallFeature.seatingPositions,
42
- isTogetherModeActive: togetherModeCallFeature === null || togetherModeCallFeature === void 0 ? void 0 : togetherModeCallFeature.isActive,
43
- startTogetherModeEnabled: capabilities === null || capabilities === void 0 ? void 0 : capabilities.startTogetherMode.isPresent
38
+ maxParticipantsToSpotlight: spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.maxParticipantsToSpotlight
44
39
  };
45
40
  });
46
41
  //# sourceMappingURL=videoGallerySelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAIxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAA4B,cAAc,EAAE,mBAAmB,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,OAAO,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AACjN,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mCAAmC,EAAE,2BAA2B,EAAE,uDAAuD,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC3N,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAqB3E;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAy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ACjF,8BAA8B,EAAE,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,gBAAgB;QACzE,oBAAoB,EAAE,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,QAAQ;QACvD,wBAAwB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,iBAAiB,CAAC,SAAS;KACpE,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryLocalParticipant } from '@internal/react-components';\nimport { VideoGalleryTogetherModeStreams, VideoGalleryTogetherModeParticipantPosition } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallingBaseSelectorProps, getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRole, getScreenShareRemoteParticipant } from './baseSelectors';\nimport { getTogetherModeCallFeature } from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { getOptimalVideoCount } from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant, memoizeTogetherModeStreams } from './utils/videoGalleryUtils';\nimport { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\nimport { getSpotlightCallFeature, getCapabilities } from './baseSelectors';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n screenShareParticipant?: VideoGalleryRemoteParticipant;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n optimalVideoCount?: number;\n spotlightedParticipants?: string[];\n maxParticipantsToSpotlight?: number;\n isTogetherModeActive?: boolean;\n startTogetherModeEnabled?: boolean;\n togetherModeStreams?: VideoGalleryTogetherModeStreams;\n togetherModeSeatingCoordinates?: VideoGalleryTogetherModeParticipantPosition;\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipantsExcludingConsumers, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers, getOptimalVideoCount, getRole, getLocalParticipantRaisedHand, isHideAttendeeNamesEnabled, getLocalParticipantReactionState, getSpotlightCallFeature, getCapabilities, getTogetherModeCallFeature], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName: string | undefined, identifier: string, dominantSpeakers, optimalVideoCount, role, raisedHand, isHideAttendeeNamesEnabled, localParticipantReaction, spotlightCallFeature, capabilities, togetherModeCallFeature) => {\n const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants ? remoteParticipants[screenShareRemoteParticipantId] : undefined;\n const localVideoStream = localVideoStreams?.find(i => i.mediaStreamType === 'Video');\n const localScreenSharingStream = localVideoStreams?.find(i => i.mediaStreamType === 'ScreenSharing');\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => dominantSpeakersMap[speaker] = idx);\n const noRemoteParticipants: RemoteParticipantState[] = [];\n const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);\n const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature?.spotlightedParticipants);\n return {\n screenShareParticipant: screenShareRemoteParticipant ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand, screenShareRemoteParticipant.contentSharingStream, undefined, screenShareRemoteParticipant.spotlight, undefined, screenShareRemoteParticipant.mediaAccess, role) : undefined,\n localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, localScreenSharingStream, role, raisedHand, localParticipantReactionState, spotlightCallFeature?.localParticipantSpotlight, capabilities),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(_updateUserDisplayNames(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants), isHideAttendeeNamesEnabled, role),\n dominantSpeakers: dominantSpeakerIds,\n maxRemoteVideoStreams: optimalVideoCount,\n spotlightedParticipants: spotlightedParticipantIds,\n maxParticipantsToSpotlight: spotlightCallFeature?.maxParticipantsToSpotlight,\n togetherModeStreams: memoizeTogetherModeStreams(togetherModeCallFeature?.streams),\n togetherModeSeatingCoordinates: togetherModeCallFeature?.seatingPositions,\n isTogetherModeActive: togetherModeCallFeature?.isActive,\n startTogetherModeEnabled: capabilities?.startTogetherMode.isPresent\n };\n});"]}
1
+ {"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAA4B,cAAc,EAAE,mBAAmB,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,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,EAAE,4BAA4B,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1lB,gBAAgB,EAAE,uBAAuB,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,IAAI,EAAE,UAAU,EAAE,6BAA6B,EAAE,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,yBAAyB,EAAE,YAAY,CAAC;QAC1P,kBAAkB,EAAE,mCAAmC,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,0BAA0B,EAAE,IAAI,CAAC;QACjM,gBAAgB,EAAE,kBAAkB;QACpC,qBAAqB,EAAE,iBAAiB;QACxC,uBAAuB,EAAE,yBAAyB;QAClD,0BAA0B,EAAE,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,0BAA0B;KAC7E,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryLocalParticipant } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallingBaseSelectorProps, getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRole, getScreenShareRemoteParticipant } from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { getOptimalVideoCount } from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant } from './utils/videoGalleryUtils';\nimport { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\nimport { getSpotlightCallFeature, getCapabilities } from './baseSelectors';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n screenShareParticipant?: VideoGalleryRemoteParticipant;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n optimalVideoCount?: number;\n spotlightedParticipants?: string[];\n maxParticipantsToSpotlight?: number;\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipantsExcludingConsumers, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers, getOptimalVideoCount, getRole, getLocalParticipantRaisedHand, isHideAttendeeNamesEnabled, getLocalParticipantReactionState, getSpotlightCallFeature, getCapabilities], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName: string | undefined, identifier: string, dominantSpeakers, optimalVideoCount, role, raisedHand, isHideAttendeeNamesEnabled, localParticipantReaction, spotlightCallFeature, capabilities) => {\n const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants ? remoteParticipants[screenShareRemoteParticipantId] : undefined;\n const localVideoStream = localVideoStreams?.find(i => i.mediaStreamType === 'Video');\n const localScreenSharingStream = localVideoStreams?.find(i => i.mediaStreamType === 'ScreenSharing');\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => dominantSpeakersMap[speaker] = idx);\n const noRemoteParticipants: RemoteParticipantState[] = [];\n const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);\n const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature?.spotlightedParticipants);\n return {\n screenShareParticipant: screenShareRemoteParticipant ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand, screenShareRemoteParticipant.contentSharingStream, undefined, screenShareRemoteParticipant.spotlight, undefined, screenShareRemoteParticipant.mediaAccess, role) : undefined,\n localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, localScreenSharingStream, role, raisedHand, localParticipantReactionState, spotlightCallFeature?.localParticipantSpotlight, capabilities),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(_updateUserDisplayNames(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants), isHideAttendeeNamesEnabled, role),\n dominantSpeakers: dominantSpeakerIds,\n maxRemoteVideoStreams: optimalVideoCount,\n spotlightedParticipants: spotlightedParticipantIds,\n maxParticipantsToSpotlight: spotlightCallFeature?.maxParticipantsToSpotlight\n };\n});"]}
@@ -7,9 +7,9 @@ export class BreakoutRoomsSubscriber {
7
7
  this.unsubscribe = () => {
8
8
  this._breakoutRoomsFeature.off('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);
9
9
  // Clear breakout room joined notification for this call.
10
- this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomJoined');
10
+ this._context.deleteLatestNotification('breakoutRoomJoined', this._callIdRef.callId);
11
11
  // Clear breakout room closing soon notification for this call.
12
- this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomClosingSoon');
12
+ this._context.deleteLatestNotification('breakoutRoomClosingSoon', this._callIdRef.callId);
13
13
  clearTimeout(this._breakoutRoomClosingSoonTimeoutId);
14
14
  };
15
15
  this.onBreakoutRoomsUpdated = (eventData) => {
@@ -24,7 +24,7 @@ export class BreakoutRoomsSubscriber {
24
24
  }
25
25
  };
26
26
  this.onAssignedBreakoutRoomUpdated = (breakoutRoom) => {
27
- var _a, _b, _c, _d, _e;
27
+ var _a, _b, _c, _d;
28
28
  const callState = this._context.getState().calls[this._callIdRef.callId];
29
29
  const currentAssignedBreakoutRoom = (_a = callState === null || callState === void 0 ? void 0 : callState.breakoutRooms) === null || _a === void 0 ? void 0 : _a.assignedBreakoutRoom;
30
30
  // This call won't exist in the calls array in state if this call is a breakout room that was re-assigned.
@@ -35,55 +35,66 @@ export class BreakoutRoomsSubscriber {
35
35
  if (!breakoutRoom) {
36
36
  // This scenario covers the case where the user is unassigned from a breakout room.
37
37
  if ((_b = currentAssignedBreakoutRoom === null || currentAssignedBreakoutRoom === void 0 ? void 0 : currentAssignedBreakoutRoom.call) === null || _b === void 0 ? void 0 : _b.id) {
38
- this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');
39
- this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');
38
+ this._context.deleteLatestNotification('breakoutRoomJoined', currentAssignedBreakoutRoom.call.id);
39
+ this._context.deleteLatestNotification('breakoutRoomClosingSoon', currentAssignedBreakoutRoom.call.id);
40
40
  clearTimeout(this._breakoutRoomClosingSoonTimeoutId);
41
41
  }
42
42
  this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);
43
43
  return;
44
44
  }
45
- if (breakoutRoom.state === 'open' && (currentAssignedBreakoutRoom === null || currentAssignedBreakoutRoom === void 0 ? void 0 : currentAssignedBreakoutRoom.state) === 'open' && ((_c = currentAssignedBreakoutRoom === null || currentAssignedBreakoutRoom === void 0 ? void 0 : currentAssignedBreakoutRoom.call) === null || _c === void 0 ? void 0 : _c.id) !== ((_d = breakoutRoom.call) === null || _d === void 0 ? void 0 : _d.id)) {
46
- if (!this._context.getState().latestNotifications['assignedBreakoutRoomOpened'] && !this._context.getState().latestNotifications['assignedBreakoutRoomOpenedPromptJoin']) {
47
- this._context.setLatestNotification(this._callIdRef.callId, {
48
- target: 'assignedBreakoutRoomChanged',
49
- timestamp: new Date(Date.now())
50
- });
51
- }
45
+ // TODO: Fix the condition in this if statement to check for different breakout room ID instead of the display name
46
+ // when Calling SDK fixes the breakout room call id to be correct
47
+ if (breakoutRoom.state === 'open' && ((_c = callState.breakoutRooms) === null || _c === void 0 ? void 0 : _c.breakoutRoomDisplayName) && callState.breakoutRooms.breakoutRoomDisplayName !== breakoutRoom.displayName) {
48
+ this._context.setLatestNotification(this._callIdRef.callId, {
49
+ target: 'assignedBreakoutRoomChanged',
50
+ timestamp: new Date(Date.now())
51
+ });
52
52
  }
53
- else if (breakoutRoom.state === 'open') {
54
- if (!this._context.getState().latestNotifications['assignedBreakoutRoomChanged']) {
55
- const target = breakoutRoom.autoMoveParticipantToBreakoutRoom === false ? 'assignedBreakoutRoomOpenedPromptJoin' : 'assignedBreakoutRoomOpened';
56
- this._context.setLatestNotification(this._callIdRef.callId, {
57
- target,
58
- timestamp: new Date(Date.now())
59
- });
60
- }
53
+ else if (breakoutRoom.state === 'open' && !((_d = callState === null || callState === void 0 ? void 0 : callState.breakoutRooms) === null || _d === void 0 ? void 0 : _d.breakoutRoomSettings) && this._context.getOpenBreakoutRoom() === undefined) {
54
+ const target = breakoutRoom.autoMoveParticipantToBreakoutRoom === false ? 'assignedBreakoutRoomOpenedPromptJoin' : 'assignedBreakoutRoomOpened';
55
+ this._context.setLatestNotification(this._callIdRef.callId, {
56
+ target,
57
+ timestamp: new Date(Date.now())
58
+ });
61
59
  }
62
- else if (breakoutRoom.state === 'closed' && (currentAssignedBreakoutRoom === null || currentAssignedBreakoutRoom === void 0 ? void 0 : currentAssignedBreakoutRoom.state) === 'closed') {
60
+ else if (breakoutRoom.state === 'closed' && (currentAssignedBreakoutRoom === null || currentAssignedBreakoutRoom === void 0 ? void 0 : currentAssignedBreakoutRoom.state) === 'open') {
63
61
  // This scenario covers the case where the breakout room is opened but then closed before the user joins.
64
- this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');
65
- this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');
66
- this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');
62
+ this._context.deleteLatestNotification('assignedBreakoutRoomOpened', this._callIdRef.callId);
63
+ this._context.deleteLatestNotification('assignedBreakoutRoomOpenedPromptJoin', this._callIdRef.callId);
64
+ this._context.deleteLatestNotification('assignedBreakoutRoomChanged', this._callIdRef.callId);
65
+ this._context.deleteLatestNotification('breakoutRoomJoined', this._callIdRef.callId);
67
66
  }
68
- else if (breakoutRoom.state === 'closed' && ((_e = currentAssignedBreakoutRoom === null || currentAssignedBreakoutRoom === void 0 ? void 0 : currentAssignedBreakoutRoom.call) === null || _e === void 0 ? void 0 : _e.id)) {
69
- // This scenario covers the case where the breakout room is changed to a closed breakout room.
70
- this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');
71
- this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');
67
+ else if (breakoutRoom.state === 'closed') {
68
+ // This scenario covers the case where the breakout room is closed
69
+ this._context.deleteLatestNotification('assignedBreakoutRoomOpened', this._callIdRef.callId);
70
+ this._context.deleteLatestNotification('assignedBreakoutRoomOpenedPromptJoin', this._callIdRef.callId);
71
+ this._context.deleteLatestNotification('assignedBreakoutRoomChanged', this._callIdRef.callId);
72
+ this._context.deleteLatestNotification('breakoutRoomJoined', this._callIdRef.callId);
73
+ this._context.deleteLatestNotification('breakoutRoomClosingSoon', this._callIdRef.callId);
72
74
  clearTimeout(this._breakoutRoomClosingSoonTimeoutId);
75
+ const openBreakoutRoomId = this._context.getOpenBreakoutRoom();
76
+ if (openBreakoutRoomId && this._context.getState().calls[openBreakoutRoomId]) {
77
+ // Show notification that the assigned breakout room was closed if the user is in that breakout room.
78
+ this._context.setLatestNotification(this._callIdRef.callId, {
79
+ target: 'assignedBreakoutRoomClosed',
80
+ timestamp: new Date(Date.now())
81
+ });
82
+ }
83
+ this._context.deleteOpenBreakoutRoom();
73
84
  }
74
85
  this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);
75
86
  };
76
87
  this.onBreakoutRoomsJoined = (call) => {
77
88
  var _a, _b, _c;
78
- this._context.setBreakoutRoomOriginCallId(this._callIdRef.callId, call.id);
79
- this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');
80
- this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');
81
- this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');
89
+ this._context.deleteLatestNotification('assignedBreakoutRoomOpened', this._callIdRef.callId);
90
+ this._context.deleteLatestNotification('assignedBreakoutRoomOpenedPromptJoin', this._callIdRef.callId);
91
+ this._context.deleteLatestNotification('assignedBreakoutRoomChanged', this._callIdRef.callId);
82
92
  // Send latest notification for breakoutRoomJoined on behalf of the call that was joined.
83
93
  this._context.setLatestNotification(call.id, {
84
94
  target: 'breakoutRoomJoined',
85
95
  timestamp: new Date(Date.now())
86
96
  });
97
+ this._context.setOpenBreakoutRoom(call.id);
87
98
  // If assigned breakout room has a display name, set the display name for its call state.
88
99
  const assignedBreakoutRoomDisplayName = (_c = (_b = (_a = this._context.getState().calls[this._callIdRef.callId]) === null || _a === void 0 ? void 0 : _a.breakoutRooms) === null || _b === void 0 ? void 0 : _b.assignedBreakoutRoom) === null || _c === void 0 ? void 0 : _c.displayName;
89
100
  if (assignedBreakoutRoomDisplayName) {
@@ -1 +1 @@
1
- {"version":3,"file":"BreakoutRoomsSubscriber.js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B,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;QACtF,CAAC,CAAC;QAzGA,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;QAClD,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IASO,SAAS;QACf,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACrF,CAAC;CA2FF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { BreakoutRoom, BreakoutRoomsCallFeature, BreakoutRoomsEventData, BreakoutRoomsSettings, Call, TeamsCall } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { CallIdRef } from './CallIdRef';\nimport { NotificationTarget } from './CallClientState';\nconst MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION = 30000;\n/**\n * @private\n */\nexport class BreakoutRoomsSubscriber {\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _breakoutRoomsFeature: BreakoutRoomsCallFeature;\n private _breakoutRoomClosingSoonTimeoutId: ReturnType<typeof setTimeout> | undefined;\n constructor(callIdRef: CallIdRef, context: CallContext, breakoutRoomsFeature: BreakoutRoomsCallFeature) {\n this._callIdRef = callIdRef;\n this._context = context;\n this._breakoutRoomsFeature = breakoutRoomsFeature;\n this.subscribe();\n }\n public unsubscribe = (): void => {\n this._breakoutRoomsFeature.off('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n // Clear breakout room joined notification for this call.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomJoined');\n // Clear breakout room closing soon notification for this call.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n };\n private subscribe(): void {\n this._breakoutRoomsFeature.on('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n }\n private onBreakoutRoomsUpdated = (eventData: BreakoutRoomsEventData): void => {\n if (eventData.type === 'assignedBreakoutRooms') {\n this.onAssignedBreakoutRoomUpdated(eventData.data);\n } else if (eventData.type === 'join') {\n this.onBreakoutRoomsJoined(eventData.data);\n } else if (eventData.type === 'breakoutRoomsSettings' && eventData.data) {\n this.onBreakoutRoomSettingsUpdated(eventData.data);\n }\n };\n private onAssignedBreakoutRoomUpdated = (breakoutRoom?: BreakoutRoom): void => {\n const callState = this._context.getState().calls[this._callIdRef.callId];\n const currentAssignedBreakoutRoom = callState?.breakoutRooms?.assignedBreakoutRoom;\n\n // This call won't exist in the calls array in state if this call is a breakout room that was re-assigned.\n // If so, do nothing.\n if (callState === undefined) {\n return;\n }\n if (!breakoutRoom) {\n // This scenario covers the case where the user is unassigned from a breakout room.\n if (currentAssignedBreakoutRoom?.call?.id) {\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n return;\n }\n if (breakoutRoom.state === 'open' && currentAssignedBreakoutRoom?.state === 'open' && currentAssignedBreakoutRoom?.call?.id !== breakoutRoom.call?.id) {\n if (!this._context.getState().latestNotifications['assignedBreakoutRoomOpened'] && !this._context.getState().latestNotifications['assignedBreakoutRoomOpenedPromptJoin']) {\n this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'assignedBreakoutRoomChanged',\n timestamp: new Date(Date.now())\n });\n }\n } else if (breakoutRoom.state === 'open') {\n if (!this._context.getState().latestNotifications['assignedBreakoutRoomChanged']) {\n const target: NotificationTarget = breakoutRoom.autoMoveParticipantToBreakoutRoom === false ? 'assignedBreakoutRoomOpenedPromptJoin' : 'assignedBreakoutRoomOpened';\n this._context.setLatestNotification(this._callIdRef.callId, {\n target,\n timestamp: new Date(Date.now())\n });\n }\n } else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.state === 'closed') {\n // This scenario covers the case where the breakout room is opened but then closed before the user joins.\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');\n } else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.call?.id) {\n // This scenario covers the case where the breakout room is changed to a closed breakout room.\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomJoined');\n this._context.deleteLatestNotification(currentAssignedBreakoutRoom.call.id, 'breakoutRoomClosingSoon');\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n };\n private onBreakoutRoomsJoined = (call: Call | TeamsCall): void => {\n this._context.setBreakoutRoomOriginCallId(this._callIdRef.callId, call.id);\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpened');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomOpenedPromptJoin');\n this._context.deleteLatestNotification(this._callIdRef.callId, 'assignedBreakoutRoomChanged');\n\n // Send latest notification for breakoutRoomJoined on behalf of the call that was joined.\n this._context.setLatestNotification(call.id, {\n target: 'breakoutRoomJoined',\n timestamp: new Date(Date.now())\n });\n\n // If assigned breakout room has a display name, set the display name for its call state.\n const assignedBreakoutRoomDisplayName = this._context.getState().calls[this._callIdRef.callId]?.breakoutRooms?.assignedBreakoutRoom?.displayName;\n if (assignedBreakoutRoomDisplayName) {\n this._context.setBreakoutRoomDisplayName(call.id, assignedBreakoutRoomDisplayName);\n }\n };\n private onBreakoutRoomSettingsUpdated = (breakoutRoomSettings: BreakoutRoomsSettings): void => {\n // If the roomEndTime is available, set a timeout to show a notification before the room closes.\n if (typeof breakoutRoomSettings.roomEndTime === 'string' && !Number.isNaN(Date.parse(breakoutRoomSettings.roomEndTime))) {\n const now = new Date(Date.now());\n const roomClosingTime = new Date(breakoutRoomSettings.roomEndTime).getTime();\n const timeBeforeClosing = roomClosingTime - now.getTime();\n const timeBeforeSendingClosingSoonNotification = Math.max(timeBeforeClosing - MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION, 0);\n if (!this._breakoutRoomClosingSoonTimeoutId) {\n this._breakoutRoomClosingSoonTimeoutId = setTimeout(() => this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'breakoutRoomClosingSoon',\n timestamp: now\n }), timeBeforeSendingClosingSoonNotification);\n }\n }\n this._context.setBreakoutRoomSettings(this._callIdRef.callId, breakoutRoomSettings);\n };\n}"]}
1
+ {"version":3,"file":"BreakoutRoomsSubscriber.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/BreakoutRoomsSubscriber.ts"],"names":[],"mappings":"AAMA,MAAM,wDAAwD,GAAG,KAAK,CAAC;AACvE;;GAEG;AACH,MAAM,OAAO,uBAAuB;IAKlC,YAAY,SAAoB,EAAE,OAAoB,EAAE,oBAA8C;QAM/F,gBAAW,GAAG,GAAS,EAAE;YAC9B,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACpF,yDAAyD;YACzD,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,oBAAoB,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACrF,+DAA+D;YAC/D,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,yBAAyB,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YAC1F,YAAY,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QACvD,C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AAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,qBAAqB,GAAG,oBAAoB,CAAC;QAClD,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IASO,SAAS;QACf,IAAI,CAAC,qBAAqB,CAAC,EAAE,CAAC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACrF,CAAC;CAuGF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { BreakoutRoom, BreakoutRoomsCallFeature, BreakoutRoomsEventData, BreakoutRoomsSettings, Call, TeamsCall } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { CallIdRef } from './CallIdRef';\nimport { NotificationTarget } from './CallClientState';\nconst MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION = 30000;\n/**\n * @private\n */\nexport class BreakoutRoomsSubscriber {\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _breakoutRoomsFeature: BreakoutRoomsCallFeature;\n private _breakoutRoomClosingSoonTimeoutId: ReturnType<typeof setTimeout> | undefined;\n constructor(callIdRef: CallIdRef, context: CallContext, breakoutRoomsFeature: BreakoutRoomsCallFeature) {\n this._callIdRef = callIdRef;\n this._context = context;\n this._breakoutRoomsFeature = breakoutRoomsFeature;\n this.subscribe();\n }\n public unsubscribe = (): void => {\n this._breakoutRoomsFeature.off('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n // Clear breakout room joined notification for this call.\n this._context.deleteLatestNotification('breakoutRoomJoined', this._callIdRef.callId);\n // Clear breakout room closing soon notification for this call.\n this._context.deleteLatestNotification('breakoutRoomClosingSoon', this._callIdRef.callId);\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n };\n private subscribe(): void {\n this._breakoutRoomsFeature.on('breakoutRoomsUpdated', this.onBreakoutRoomsUpdated);\n }\n private onBreakoutRoomsUpdated = (eventData: BreakoutRoomsEventData): void => {\n if (eventData.type === 'assignedBreakoutRooms') {\n this.onAssignedBreakoutRoomUpdated(eventData.data);\n } else if (eventData.type === 'join') {\n this.onBreakoutRoomsJoined(eventData.data);\n } else if (eventData.type === 'breakoutRoomsSettings' && eventData.data) {\n this.onBreakoutRoomSettingsUpdated(eventData.data);\n }\n };\n private onAssignedBreakoutRoomUpdated = (breakoutRoom?: BreakoutRoom): void => {\n const callState = this._context.getState().calls[this._callIdRef.callId];\n const currentAssignedBreakoutRoom = callState?.breakoutRooms?.assignedBreakoutRoom;\n\n // This call won't exist in the calls array in state if this call is a breakout room that was re-assigned.\n // If so, do nothing.\n if (callState === undefined) {\n return;\n }\n if (!breakoutRoom) {\n // This scenario covers the case where the user is unassigned from a breakout room.\n if (currentAssignedBreakoutRoom?.call?.id) {\n this._context.deleteLatestNotification('breakoutRoomJoined', currentAssignedBreakoutRoom.call.id);\n this._context.deleteLatestNotification('breakoutRoomClosingSoon', currentAssignedBreakoutRoom.call.id);\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n return;\n }\n\n // TODO: Fix the condition in this if statement to check for different breakout room ID instead of the display name\n // when Calling SDK fixes the breakout room call id to be correct\n if (breakoutRoom.state === 'open' && callState.breakoutRooms?.breakoutRoomDisplayName && callState.breakoutRooms.breakoutRoomDisplayName !== breakoutRoom.displayName) {\n this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'assignedBreakoutRoomChanged',\n timestamp: new Date(Date.now())\n });\n } else if (breakoutRoom.state === 'open' && !callState?.breakoutRooms?.breakoutRoomSettings && this._context.getOpenBreakoutRoom() === undefined) {\n const target: NotificationTarget = breakoutRoom.autoMoveParticipantToBreakoutRoom === false ? 'assignedBreakoutRoomOpenedPromptJoin' : 'assignedBreakoutRoomOpened';\n this._context.setLatestNotification(this._callIdRef.callId, {\n target,\n timestamp: new Date(Date.now())\n });\n } else if (breakoutRoom.state === 'closed' && currentAssignedBreakoutRoom?.state === 'open') {\n // This scenario covers the case where the breakout room is opened but then closed before the user joins.\n this._context.deleteLatestNotification('assignedBreakoutRoomOpened', this._callIdRef.callId);\n this._context.deleteLatestNotification('assignedBreakoutRoomOpenedPromptJoin', this._callIdRef.callId);\n this._context.deleteLatestNotification('assignedBreakoutRoomChanged', this._callIdRef.callId);\n this._context.deleteLatestNotification('breakoutRoomJoined', this._callIdRef.callId);\n } else if (breakoutRoom.state === 'closed') {\n // This scenario covers the case where the breakout room is closed\n this._context.deleteLatestNotification('assignedBreakoutRoomOpened', this._callIdRef.callId);\n this._context.deleteLatestNotification('assignedBreakoutRoomOpenedPromptJoin', this._callIdRef.callId);\n this._context.deleteLatestNotification('assignedBreakoutRoomChanged', this._callIdRef.callId);\n this._context.deleteLatestNotification('breakoutRoomJoined', this._callIdRef.callId);\n this._context.deleteLatestNotification('breakoutRoomClosingSoon', this._callIdRef.callId);\n clearTimeout(this._breakoutRoomClosingSoonTimeoutId);\n const openBreakoutRoomId = this._context.getOpenBreakoutRoom();\n if (openBreakoutRoomId && this._context.getState().calls[openBreakoutRoomId]) {\n // Show notification that the assigned breakout room was closed if the user is in that breakout room.\n this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'assignedBreakoutRoomClosed',\n timestamp: new Date(Date.now())\n });\n }\n this._context.deleteOpenBreakoutRoom();\n }\n this._context.setAssignedBreakoutRoom(this._callIdRef.callId, breakoutRoom);\n };\n private onBreakoutRoomsJoined = (call: Call | TeamsCall): void => {\n this._context.deleteLatestNotification('assignedBreakoutRoomOpened', this._callIdRef.callId);\n this._context.deleteLatestNotification('assignedBreakoutRoomOpenedPromptJoin', this._callIdRef.callId);\n this._context.deleteLatestNotification('assignedBreakoutRoomChanged', this._callIdRef.callId);\n\n // Send latest notification for breakoutRoomJoined on behalf of the call that was joined.\n this._context.setLatestNotification(call.id, {\n target: 'breakoutRoomJoined',\n timestamp: new Date(Date.now())\n });\n this._context.setOpenBreakoutRoom(call.id);\n\n // If assigned breakout room has a display name, set the display name for its call state.\n const assignedBreakoutRoomDisplayName = this._context.getState().calls[this._callIdRef.callId]?.breakoutRooms?.assignedBreakoutRoom?.displayName;\n if (assignedBreakoutRoomDisplayName) {\n this._context.setBreakoutRoomDisplayName(call.id, assignedBreakoutRoomDisplayName);\n }\n };\n private onBreakoutRoomSettingsUpdated = (breakoutRoomSettings: BreakoutRoomsSettings): void => {\n // If the roomEndTime is available, set a timeout to show a notification before the room closes.\n if (typeof breakoutRoomSettings.roomEndTime === 'string' && !Number.isNaN(Date.parse(breakoutRoomSettings.roomEndTime))) {\n const now = new Date(Date.now());\n const roomClosingTime = new Date(breakoutRoomSettings.roomEndTime).getTime();\n const timeBeforeClosing = roomClosingTime - now.getTime();\n const timeBeforeSendingClosingSoonNotification = Math.max(timeBeforeClosing - MILLSECONDS_BEFORE_END_TIME_TO_SHOW_CLOSING_NOTIFICATION, 0);\n if (!this._breakoutRoomClosingSoonTimeoutId) {\n this._breakoutRoomClosingSoonTimeoutId = setTimeout(() => this._context.setLatestNotification(this._callIdRef.callId, {\n target: 'breakoutRoomClosingSoon',\n timestamp: now\n }), timeBeforeSendingClosingSoonNotification);\n }\n }\n this._context.setBreakoutRoomSettings(this._callIdRef.callId, breakoutRoomSettings);\n };\n}"]}
@@ -176,10 +176,6 @@ export class ProxyCallAgentCommon {
176
176
  }
177
177
  case 'dispose':
178
178
  {
179
- return () => {
180
- target.dispose();
181
- this.unsubscribe();
182
- };
183
179
  // Wrapping CallAgent.dispose in a callback type (): Promise<void> to accomodate the change of CallAgent.dispose
184
180
  // in calling beta version 1.8.0-beta.1 from callback type (): Promise<void> to (): void
185
181
  const callAgentDisposeAsyncCallbackWrapper = () => __awaiter(this, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"CallAgentDeclarativeCommon.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/CallAgentDeclarativeCommon.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;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,EAAE;wBACzB,OAAO,oCAAoC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;4BACtD,IAAI,CAAC,WAAW,EAAE,CAAC;wBACrB,CAAC,CAAC,CAAC;oBACL,CAAC,CAAC;gBACJ,CAAC;YACH;;;;;;;;eAQG;YACH,KAAK,eAAe;gBAClB,CAAC;oBACC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClD,CAAC;YACH;gBACE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAoB,EAAE,eAAoC,EAAQ,EAAE;IACxG,sGAAsG;IACtG,oHAAoH;IACpH,qDAAqD;IACrD,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAC1C,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAChC,eAAe,CAAC,qBAAqB,EAAE,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Call, CallAgent, CallEndReason, CollectionUpdatedEvent, IncomingCall, TeamsIncomingCall, IncomingCallCommon } from '@azure/communication-calling';\nimport { CallAgentCommon, CallCommon } from './BetaToStableTypes';\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { DeclarativeCall } from './CallDeclarative';\nimport { CallSubscriber } from './CallSubscriber';\nimport { convertSdkCallToDeclarativeCall, convertSdkIncomingCallToDeclarativeIncomingCall } from './Converter';\nimport { IncomingCallSubscriber } from './IncomingCallSubscriber';\nimport { InternalCallContext } from './InternalCallContext';\nimport { disposeAllViews, disposeAllViewsFromCall } from './StreamUtils';\nimport { _isTeamsIncomingCall } from './TypeGuards';\nimport { incomingCallDeclaratify } from './IncomingCallDeclarative';\nimport { teamsIncomingCallDeclaratify } from './TeamsIncomingCallDeclarative';\n\n/**\n *\n * @private\n */\nexport type DeclarativeCallCommon = CallCommon & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\n/**\n * ProxyCallAgent proxies CallAgent and saves any returned state in the given context. It will subscribe to all state\n * updates in the CallAgent and in the contained Calls and RemoteParticipants. When dispose is called it will\n * unsubscribe from all state updates.\n */\nexport abstract class ProxyCallAgentCommon {\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n private _callSubscribers: Map<CallCommon, CallSubscriber>;\n private _incomingCallSubscribers: Map<string, IncomingCallSubscriber>;\n private _incomingCalls: Map<string, IncomingCallCommon>;\n private _declarativeCalls: Map<CallCommon, DeclarativeCallCommon>;\n private _externalCallsUpdatedListeners: Set<CollectionUpdatedEvent<CallCommon>>;\n constructor(context: CallContext, internalContext: InternalCallContext) {\n this._context = context;\n this._internalContext = internalContext;\n this._callSubscribers = new Map<Call, CallSubscriber>();\n this._incomingCallSubscribers = new Map<string, IncomingCallSubscriber>();\n this._incomingCalls = new Map<string, IncomingCallCommon>();\n this._declarativeCalls = new Map<Call, DeclarativeCall>();\n this._externalCallsUpdatedListeners = new Set<CollectionUpdatedEvent<CallCommon>>();\n }\n\n // Unsubscribe is called when CallAgent is disposed. This should mean no more updating of existing call but we don't\n // remove any existing state.\n protected unregisterSubscriber = (): void => {\n for (const [_, callSubscriber] of this._callSubscribers.entries()) {\n callSubscriber.unsubscribe();\n }\n this._callSubscribers.clear();\n for (const [_, incomingCallSubscriber] of this._incomingCallSubscribers.entries()) {\n incomingCallSubscriber.unsubscribe();\n }\n this._incomingCallSubscribers.clear();\n this._incomingCalls.clear();\n for (const [_, declarativeCall] of this._declarativeCalls.entries()) {\n declarativeCall.unsubscribe();\n }\n this._declarativeCalls.clear();\n };\n protected abstract unsubscribe(): void;\n protected abstract callDeclaratify(call: CallCommon, context: CallContext): DeclarativeCallCommon;\n protected callsUpdated = (event: {\n added: CallCommon[];\n removed: CallCommon[];\n }): void => {\n const addedStatefulCall: DeclarativeCallCommon[] = [];\n for (const call of event.added) {\n const statefulCall = this.addCall(call);\n addedStatefulCall.push(statefulCall);\n }\n const removedStatefulCall: DeclarativeCallCommon[] = [];\n for (const call of event.removed) {\n disposeAllViewsFromCall(this._context, this._internalContext, call.id);\n const callSubscriber = this._callSubscribers.get(call);\n if (callSubscriber) {\n callSubscriber.unsubscribe();\n this._callSubscribers.delete(call);\n }\n this._context.setCallEnded(call.id, call.callEndReason);\n const declarativeCall = this._declarativeCalls.get(call);\n if (declarativeCall) {\n declarativeCall.unsubscribe();\n removedStatefulCall.push(declarativeCall);\n this._declarativeCalls.delete(call);\n } else {\n removedStatefulCall.push(this.callDeclaratify(call, this._context));\n }\n }\n for (const externalCallsUpdatedListener of this._externalCallsUpdatedListeners) {\n externalCallsUpdatedListener({\n added: addedStatefulCall,\n removed: removedStatefulCall\n });\n }\n };\n private setIncomingCallEnded = (incomingCallId: string, callEndReason: CallEndReason): void => {\n const incomingCallSubscriber = this._incomingCallSubscribers.get(incomingCallId);\n if (incomingCallSubscriber) {\n incomingCallSubscriber.unsubscribe();\n this._incomingCallSubscribers.delete(incomingCallId);\n }\n this._incomingCalls.delete(incomingCallId);\n this._context.setIncomingCallEnded(incomingCallId, callEndReason);\n };\n protected incomingCall = ({\n incomingCall\n }: {\n incomingCall: IncomingCallCommon;\n }): void => {\n // Make sure to not subscribe to the incoming call if we are already subscribed to it.\n if (!this._incomingCallSubscribers.has(incomingCall.id)) {\n this._incomingCallSubscribers.set(incomingCall.id, new IncomingCallSubscriber(incomingCall, this.setIncomingCallEnded));\n }\n if (_isTeamsIncomingCall(incomingCall)) {\n this._incomingCalls.set(incomingCall.id, teamsIncomingCallDeclaratify(incomingCall as TeamsIncomingCall, this._context));\n } else {\n this._incomingCalls.set(incomingCall.id, incomingCallDeclaratify(incomingCall as IncomingCall, this._context));\n }\n this._context.setIncomingCall(convertSdkIncomingCallToDeclarativeIncomingCall(incomingCall));\n };\n protected addCall = (call: CallCommon): DeclarativeCallCommon => {\n this._callSubscribers.get(call)?.unsubscribe();\n\n // For API extentions we need to have the call in the state when we are subscribing as we may want to update the\n // state during the subscription process in the subscriber so we add the call to state before subscribing.\n this._context.setCall(convertSdkCallToDeclarativeCall(call));\n this._callSubscribers.set(call, new CallSubscriber(call, this._context, this._internalContext));\n return this.getOrCreateDeclarativeCall(call);\n };\n private getOrCreateDeclarativeCall = (call: CallCommon): DeclarativeCallCommon => {\n const declarativeCall = this._declarativeCalls.get(call);\n if (declarativeCall) {\n return declarativeCall;\n }\n const newDeclarativeCall = this.callDeclaratify(call, this._context);\n this._declarativeCalls.set(call, newDeclarativeCall);\n return newDeclarativeCall;\n };\n\n // args could be either from teamsCall or Call, set it as unknown and cast it in child class later\n protected abstract startCall(agent: CallAgentCommon, args: unknown[]): CallCommon;\n protected abstract joinCall(agent: CallAgentCommon, args: unknown[]): CallCommon;\n protected abstract agentSubscribe(agent: CallAgentCommon, args: unknown[]): void;\n protected abstract agentUnsubscribe(agent: CallAgentCommon, args: unknown[]): void;\n\n // We can't directly override get function because it is proxied,\n // Add a getCommon function and call it in child class\n protected getCommon<AgentType extends CallAgent | TeamsCallAgent, P extends keyof CallAgent>(target: AgentType, prop: P | 'incomingCalls'): any {\n switch (prop) {\n case 'startCall':\n {\n return this._context.withErrorTeedToState((...args: Parameters<AgentType['startCall']>): CallCommon => {\n const call = this.startCall(target, args);\n this.addCall(call);\n return this.getOrCreateDeclarativeCall(call);\n }, 'CallAgent.startCall');\n }\n case 'join':\n {\n return this._context.withErrorTeedToState((...args: Parameters<AgentType['join']>): CallCommon => {\n const call = this.joinCall(target, args);\n this.addCall(call);\n return this.getOrCreateDeclarativeCall(call);\n }, 'CallAgent.join');\n }\n case 'calls':\n {\n return Array.from(this._declarativeCalls.values());\n }\n case 'on':\n {\n return (...args: Parameters<AgentType['on']>): void => {\n // typescript is not smart enough to handle multiple overloads and pull the correct type here so force casting args\n const event = args[0] as 'incomingCall' | 'callsUpdated' | 'connectionStateChanged';\n const isCallsUpdated = event === 'callsUpdated';\n if (isCallsUpdated) {\n const listener = args[1] as unknown as CollectionUpdatedEvent<CallCommon>;\n this._externalCallsUpdatedListeners.add(listener);\n } else {\n this.agentSubscribe(target, args);\n }\n };\n }\n case 'off':\n {\n return (...args: Parameters<AgentType['off']>): void => {\n // typescript is not smart enough to handle multiple overloads and pull the correct type here so force casting args\n const event = args[0] as 'incomingCall' | 'callsUpdated' | 'connectionStateChanged';\n const isCallsUpdated = event === 'callsUpdated';\n if (isCallsUpdated) {\n const listener = args[1] as unknown as CollectionUpdatedEvent<CallCommon>;\n this._externalCallsUpdatedListeners.delete(listener);\n } else {\n this.agentUnsubscribe(target, args);\n }\n };\n }\n case 'dispose':\n {\n return (): void => {\n target.dispose();\n this.unsubscribe();\n };\n // Wrapping CallAgent.dispose in a callback type (): Promise<void> to accomodate the change of CallAgent.dispose\n // in calling beta version 1.8.0-beta.1 from callback type (): Promise<void> to (): void\n const callAgentDisposeAsyncCallbackWrapper = async (): Promise<void> => {\n await target.dispose();\n return Promise.resolve();\n };\n return (): Promise<void> => {\n return callAgentDisposeAsyncCallbackWrapper().then(() => {\n this.unsubscribe();\n });\n };\n }\n /**\n * This attribute is a special case and doesn't exist on the CallAgent interface.\n * We need this to be able to return a declarative incoming call object using the call agent.\n * In a standard headless SDK usage, the right way to get an incoming call is to use the `incomingCall` event.\n * However, using the declarative layer, the ideal usage would be to:\n * 1. subscribe to the `onStateChange` event\n * 2. Get the incoming call from the new state and it's ID\n * 3. Use `callAgent.incomingCalls` and filter an incoming call ID to get a declarative incoming call object\n */\n case 'incomingCalls':\n {\n return Array.from(this._incomingCalls.values());\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * @private\n */\nexport const clearCallRelatedState = (context: CallContext, internalContext: InternalCallContext): void => {\n // Make sure there are no existing call data if creating a new CallAgentDeclarative (if creating a new\n // CallAgentDeclarative after disposing of the hold one will mean context have old call state). TODO: should we stop\n // rendering when the previous callAgent is disposed?\n disposeAllViews(context, internalContext);\n context.clearCallRelatedState();\n internalContext.clearCallRelatedState();\n};"]}
1
+ {"version":3,"file":"CallAgentDeclarativeCommon.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/CallAgentDeclarativeCommon.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAOlC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,+CAA+C,EAAE,MAAM,aAAa,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAa9E;;;;GAIG;AACH,MAAM,OAAgB,oBAAoB;IAQxC,YAAY,OAAoB,EAAE,eAAoC;QAUtE,oHAAoH;QACpH,6BAA6B;QACnB,yBAAoB,GAAG,GAAS,EAAE;YAC1C,KAAK,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE,CAAC;gBAClE,cAAc,CAAC,WAAW,EAAE,CAAC;YAC/B,CAAC;YACD,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;YAC9B,KAAK,MAAM,CAAC,CAAC,EAAE,sBAAsB,CAAC,IAAI,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,EAAE,CAAC;gBAClF,sBAAsB,CAAC,WAAW,EAAE,CAAC;YACvC,CAAC;YACD,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,CAAC;YACtC,IAAI,CAAC,cAAc,CAAC,KAAK,E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MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;wBACvB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;oBAC3B,CAAC,CAAA,CAAC;oBACF,OAAO,GAAkB,EAAE;wBACzB,OAAO,oCAAoC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;4BACtD,IAAI,CAAC,WAAW,EAAE,CAAC;wBACrB,CAAC,CAAC,CAAC;oBACL,CAAC,CAAC;gBACJ,CAAC;YACH;;;;;;;;eAQG;YACH,KAAK,eAAe;gBAClB,CAAC;oBACC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;gBAClD,CAAC;YACH;gBACE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAAoB,EAAE,eAAoC,EAAQ,EAAE;IACxG,sGAAsG;IACtG,oHAAoH;IACpH,qDAAqD;IACrD,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAC1C,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAChC,eAAe,CAAC,qBAAqB,EAAE,CAAC;AAC1C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Call, CallAgent, CallEndReason, CollectionUpdatedEvent, IncomingCall, TeamsIncomingCall, IncomingCallCommon } from '@azure/communication-calling';\nimport { CallAgentCommon, CallCommon } from './BetaToStableTypes';\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { DeclarativeCall } from './CallDeclarative';\nimport { CallSubscriber } from './CallSubscriber';\nimport { convertSdkCallToDeclarativeCall, convertSdkIncomingCallToDeclarativeIncomingCall } from './Converter';\nimport { IncomingCallSubscriber } from './IncomingCallSubscriber';\nimport { InternalCallContext } from './InternalCallContext';\nimport { disposeAllViews, disposeAllViewsFromCall } from './StreamUtils';\nimport { _isTeamsIncomingCall } from './TypeGuards';\nimport { incomingCallDeclaratify } from './IncomingCallDeclarative';\nimport { teamsIncomingCallDeclaratify } from './TeamsIncomingCallDeclarative';\n\n/**\n *\n * @private\n */\nexport type DeclarativeCallCommon = CallCommon & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\n/**\n * ProxyCallAgent proxies CallAgent and saves any returned state in the given context. It will subscribe to all state\n * updates in the CallAgent and in the contained Calls and RemoteParticipants. When dispose is called it will\n * unsubscribe from all state updates.\n */\nexport abstract class ProxyCallAgentCommon {\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n private _callSubscribers: Map<CallCommon, CallSubscriber>;\n private _incomingCallSubscribers: Map<string, IncomingCallSubscriber>;\n private _incomingCalls: Map<string, IncomingCallCommon>;\n private _declarativeCalls: Map<CallCommon, DeclarativeCallCommon>;\n private _externalCallsUpdatedListeners: Set<CollectionUpdatedEvent<CallCommon>>;\n constructor(context: CallContext, internalContext: InternalCallContext) {\n this._context = context;\n this._internalContext = internalContext;\n this._callSubscribers = new Map<Call, CallSubscriber>();\n this._incomingCallSubscribers = new Map<string, IncomingCallSubscriber>();\n this._incomingCalls = new Map<string, IncomingCallCommon>();\n this._declarativeCalls = new Map<Call, DeclarativeCall>();\n this._externalCallsUpdatedListeners = new Set<CollectionUpdatedEvent<CallCommon>>();\n }\n\n // Unsubscribe is called when CallAgent is disposed. This should mean no more updating of existing call but we don't\n // remove any existing state.\n protected unregisterSubscriber = (): void => {\n for (const [_, callSubscriber] of this._callSubscribers.entries()) {\n callSubscriber.unsubscribe();\n }\n this._callSubscribers.clear();\n for (const [_, incomingCallSubscriber] of this._incomingCallSubscribers.entries()) {\n incomingCallSubscriber.unsubscribe();\n }\n this._incomingCallSubscribers.clear();\n this._incomingCalls.clear();\n for (const [_, declarativeCall] of this._declarativeCalls.entries()) {\n declarativeCall.unsubscribe();\n }\n this._declarativeCalls.clear();\n };\n protected abstract unsubscribe(): void;\n protected abstract callDeclaratify(call: CallCommon, context: CallContext): DeclarativeCallCommon;\n protected callsUpdated = (event: {\n added: CallCommon[];\n removed: CallCommon[];\n }): void => {\n const addedStatefulCall: DeclarativeCallCommon[] = [];\n for (const call of event.added) {\n const statefulCall = this.addCall(call);\n addedStatefulCall.push(statefulCall);\n }\n const removedStatefulCall: DeclarativeCallCommon[] = [];\n for (const call of event.removed) {\n disposeAllViewsFromCall(this._context, this._internalContext, call.id);\n const callSubscriber = this._callSubscribers.get(call);\n if (callSubscriber) {\n callSubscriber.unsubscribe();\n this._callSubscribers.delete(call);\n }\n this._context.setCallEnded(call.id, call.callEndReason);\n const declarativeCall = this._declarativeCalls.get(call);\n if (declarativeCall) {\n declarativeCall.unsubscribe();\n removedStatefulCall.push(declarativeCall);\n this._declarativeCalls.delete(call);\n } else {\n removedStatefulCall.push(this.callDeclaratify(call, this._context));\n }\n }\n for (const externalCallsUpdatedListener of this._externalCallsUpdatedListeners) {\n externalCallsUpdatedListener({\n added: addedStatefulCall,\n removed: removedStatefulCall\n });\n }\n };\n private setIncomingCallEnded = (incomingCallId: string, callEndReason: CallEndReason): void => {\n const incomingCallSubscriber = this._incomingCallSubscribers.get(incomingCallId);\n if (incomingCallSubscriber) {\n incomingCallSubscriber.unsubscribe();\n this._incomingCallSubscribers.delete(incomingCallId);\n }\n this._incomingCalls.delete(incomingCallId);\n this._context.setIncomingCallEnded(incomingCallId, callEndReason);\n };\n protected incomingCall = ({\n incomingCall\n }: {\n incomingCall: IncomingCallCommon;\n }): void => {\n // Make sure to not subscribe to the incoming call if we are already subscribed to it.\n if (!this._incomingCallSubscribers.has(incomingCall.id)) {\n this._incomingCallSubscribers.set(incomingCall.id, new IncomingCallSubscriber(incomingCall, this.setIncomingCallEnded));\n }\n if (_isTeamsIncomingCall(incomingCall)) {\n this._incomingCalls.set(incomingCall.id, teamsIncomingCallDeclaratify(incomingCall as TeamsIncomingCall, this._context));\n } else {\n this._incomingCalls.set(incomingCall.id, incomingCallDeclaratify(incomingCall as IncomingCall, this._context));\n }\n this._context.setIncomingCall(convertSdkIncomingCallToDeclarativeIncomingCall(incomingCall));\n };\n protected addCall = (call: CallCommon): DeclarativeCallCommon => {\n this._callSubscribers.get(call)?.unsubscribe();\n\n // For API extentions we need to have the call in the state when we are subscribing as we may want to update the\n // state during the subscription process in the subscriber so we add the call to state before subscribing.\n this._context.setCall(convertSdkCallToDeclarativeCall(call));\n this._callSubscribers.set(call, new CallSubscriber(call, this._context, this._internalContext));\n return this.getOrCreateDeclarativeCall(call);\n };\n private getOrCreateDeclarativeCall = (call: CallCommon): DeclarativeCallCommon => {\n const declarativeCall = this._declarativeCalls.get(call);\n if (declarativeCall) {\n return declarativeCall;\n }\n const newDeclarativeCall = this.callDeclaratify(call, this._context);\n this._declarativeCalls.set(call, newDeclarativeCall);\n return newDeclarativeCall;\n };\n\n // args could be either from teamsCall or Call, set it as unknown and cast it in child class later\n protected abstract startCall(agent: CallAgentCommon, args: unknown[]): CallCommon;\n protected abstract joinCall(agent: CallAgentCommon, args: unknown[]): CallCommon;\n protected abstract agentSubscribe(agent: CallAgentCommon, args: unknown[]): void;\n protected abstract agentUnsubscribe(agent: CallAgentCommon, args: unknown[]): void;\n\n // We can't directly override get function because it is proxied,\n // Add a getCommon function and call it in child class\n protected getCommon<AgentType extends CallAgent | TeamsCallAgent, P extends keyof CallAgent>(target: AgentType, prop: P | 'incomingCalls'): any {\n switch (prop) {\n case 'startCall':\n {\n return this._context.withErrorTeedToState((...args: Parameters<AgentType['startCall']>): CallCommon => {\n const call = this.startCall(target, args);\n this.addCall(call);\n return this.getOrCreateDeclarativeCall(call);\n }, 'CallAgent.startCall');\n }\n case 'join':\n {\n return this._context.withErrorTeedToState((...args: Parameters<AgentType['join']>): CallCommon => {\n const call = this.joinCall(target, args);\n this.addCall(call);\n return this.getOrCreateDeclarativeCall(call);\n }, 'CallAgent.join');\n }\n case 'calls':\n {\n return Array.from(this._declarativeCalls.values());\n }\n case 'on':\n {\n return (...args: Parameters<AgentType['on']>): void => {\n // typescript is not smart enough to handle multiple overloads and pull the correct type here so force casting args\n const event = args[0] as 'incomingCall' | 'callsUpdated' | 'connectionStateChanged';\n const isCallsUpdated = event === 'callsUpdated';\n if (isCallsUpdated) {\n const listener = args[1] as unknown as CollectionUpdatedEvent<CallCommon>;\n this._externalCallsUpdatedListeners.add(listener);\n } else {\n this.agentSubscribe(target, args);\n }\n };\n }\n case 'off':\n {\n return (...args: Parameters<AgentType['off']>): void => {\n // typescript is not smart enough to handle multiple overloads and pull the correct type here so force casting args\n const event = args[0] as 'incomingCall' | 'callsUpdated' | 'connectionStateChanged';\n const isCallsUpdated = event === 'callsUpdated';\n if (isCallsUpdated) {\n const listener = args[1] as unknown as CollectionUpdatedEvent<CallCommon>;\n this._externalCallsUpdatedListeners.delete(listener);\n } else {\n this.agentUnsubscribe(target, args);\n }\n };\n }\n case 'dispose':\n {\n // Wrapping CallAgent.dispose in a callback type (): Promise<void> to accomodate the change of CallAgent.dispose\n // in calling beta version 1.8.0-beta.1 from callback type (): Promise<void> to (): void\n const callAgentDisposeAsyncCallbackWrapper = async (): Promise<void> => {\n await target.dispose();\n return Promise.resolve();\n };\n return (): Promise<void> => {\n return callAgentDisposeAsyncCallbackWrapper().then(() => {\n this.unsubscribe();\n });\n };\n }\n /**\n * This attribute is a special case and doesn't exist on the CallAgent interface.\n * We need this to be able to return a declarative incoming call object using the call agent.\n * In a standard headless SDK usage, the right way to get an incoming call is to use the `incomingCall` event.\n * However, using the declarative layer, the ideal usage would be to:\n * 1. subscribe to the `onStateChange` event\n * 2. Get the incoming call from the new state and it's ID\n * 3. Use `callAgent.incomingCalls` and filter an incoming call ID to get a declarative incoming call object\n */\n case 'incomingCalls':\n {\n return Array.from(this._incomingCalls.values());\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * @private\n */\nexport const clearCallRelatedState = (context: CallContext, internalContext: InternalCallContext): void => {\n // Make sure there are no existing call data if creating a new CallAgentDeclarative (if creating a new\n // CallAgentDeclarative after disposing of the hold one will mean context have old call state). TODO: should we stop\n // rendering when the previous callAgent is disposed?\n disposeAllViews(context, internalContext);\n context.clearCallRelatedState();\n internalContext.clearCallRelatedState();\n};"]}