@azure/communication-react 1.22.0-beta.1 → 1.22.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 (577) hide show
  1. package/dist/communication-react.d.ts +348 -1690
  2. package/dist/dist-cjs/communication-react/index.js +36397 -172
  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 +5 -13
  15. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -11
  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 +18 -18
  18. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +6 -6
  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 +1 -11
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -6
  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 -19
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +3 -2
  28. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +8 -1
  29. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -3
  31. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +5 -34
  34. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  36. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  37. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -2
  40. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  42. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  43. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -79
  44. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  45. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -15
  46. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +2 -95
  47. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -5
  49. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -27
  50. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
  52. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  54. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  55. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  57. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  59. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  60. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  61. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  62. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  63. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  64. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
  65. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  66. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +3 -26
  67. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  68. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js +0 -6
  69. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js.map +1 -1
  70. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  71. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  72. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  73. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  74. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  75. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  76. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  77. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  78. package/dist/dist-esm/communication-react/src/index.d.ts +8 -29
  79. package/dist/dist-esm/communication-react/src/index.js +3 -6
  80. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  82. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  83. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/components/Caption.d.ts +2 -2
  85. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +42 -11
  87. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -3
  88. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +86 -17
  90. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +17 -6
  91. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.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/ControlBarButton.js +1 -1
  119. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
  121. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  123. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  125. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  126. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  128. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  129. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +0 -20
  131. package/dist/dist-esm/react-components/src/components/NotificationStack.js +0 -5
  132. package/dist/dist-esm/react-components/src/components/NotificationStack.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/ParticipantsButton.d.ts +4 -0
  137. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +1 -1
  138. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  140. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  142. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  143. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +10 -10
  145. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +6 -3
  146. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/SystemMessage.js +17 -6
  148. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  150. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  152. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  154. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  155. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  156. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -20
  158. package/dist/dist-esm/react-components/src/components/index.js +0 -7
  159. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  161. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  162. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +4 -4
  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/CaptionsSettingsModal.styles.js +4 -2
  165. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +0 -13
  167. package/dist/dist-esm/react-components/src/components/styles/Common.style.js +0 -13
  168. package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  170. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  171. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  173. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  174. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  176. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  177. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  179. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  180. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  182. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  183. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  184. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  185. package/dist/dist-esm/react-components/src/components/utils.d.ts +2 -2
  186. package/dist/dist-esm/react-components/src/components/utils.js +6 -9
  187. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  188. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  189. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  190. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/index.d.ts +1 -2
  192. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  193. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +16 -55
  194. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  195. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +128 -2
  196. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +128 -2
  197. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +128 -2
  198. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +128 -2
  199. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +128 -2
  200. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +128 -2
  201. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +128 -2
  202. package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +128 -2
  203. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +128 -2
  204. package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +128 -2
  205. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +128 -2
  206. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +128 -2
  207. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +128 -2
  208. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +128 -2
  209. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +128 -2
  210. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +128 -2
  211. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +128 -2
  212. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +128 -2
  213. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +128 -2
  214. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +128 -2
  215. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +128 -2
  216. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +128 -2
  217. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +128 -2
  218. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +128 -2
  219. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -30
  220. package/dist/dist-esm/react-components/src/theming/icons.js +5 -96
  221. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  222. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  223. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  224. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  226. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +4 -4
  228. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -1
  229. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  230. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +8 -73
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +8 -21
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -34
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -47
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +7 -105
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -24
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -11
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +1 -19
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -2
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -3
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -3
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -2
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +7 -5
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -40
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -18
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -16
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +2 -1
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +29 -10
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -59
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  288. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
  289. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -24
  290. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  291. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -8
  292. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  293. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -22
  294. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -136
  295. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -28
  297. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -2
  299. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -9
  300. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  302. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  303. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  304. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -11
  305. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -2
  306. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  307. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -5
  308. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
  309. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  311. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  312. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  313. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  314. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  315. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  320. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  321. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  322. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  324. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  326. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  328. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  329. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +1 -13
  331. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
  332. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +8 -3
  334. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -1
  335. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.d.ts → CallingCaptionsBanner.d.ts} +2 -2
  336. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.js → CallingCaptionsBanner.js} +8 -11
  337. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -0
  338. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.d.ts → CallingCaptionsSettingsModal.d.ts} +2 -2
  339. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.js → CallingCaptionsSettingsModal.js} +6 -9
  340. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsSettingsModal.js.map +1 -0
  341. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +7 -10
  342. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
  343. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +5 -17
  344. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  345. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +5 -9
  346. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  347. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -1
  348. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +5 -0
  349. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +12 -14
  350. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  351. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +2 -0
  352. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  353. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  355. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  357. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  358. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  359. package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  361. package/dist/dist-esm/react-composites/src/composites/common/adapters.d.ts +0 -23
  362. package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
  363. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  364. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  365. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  366. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -32
  367. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
  368. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +0 -4
  370. package/dist/dist-esm/react-composites/src/composites/common/utils.js +0 -22
  371. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  372. package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -1
  373. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  374. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +25 -1
  375. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +25 -1
  376. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +25 -1
  377. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +25 -1
  378. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +25 -1
  379. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +25 -1
  380. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +25 -1
  381. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +25 -1
  382. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +25 -1
  383. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +25 -1
  384. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +25 -1
  385. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +25 -1
  386. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +25 -1
  387. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +25 -1
  388. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +25 -1
  389. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +25 -1
  390. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +25 -1
  391. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +25 -1
  392. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +25 -1
  393. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +25 -1
  394. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +25 -1
  395. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +25 -1
  396. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +25 -1
  397. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +25 -1
  398. package/package.json +5 -5
  399. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js +0 -206
  400. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js.map +0 -1
  401. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js +0 -50
  402. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js.map +0 -1
  403. package/dist/dist-cjs/communication-react/index-D7R-o8dv.js +0 -43117
  404. package/dist/dist-cjs/communication-react/index-D7R-o8dv.js.map +0 -1
  405. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  406. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  407. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  408. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  409. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  410. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  411. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.d.ts +0 -20
  412. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +0 -118
  413. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +0 -1
  414. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  415. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  416. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  417. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  418. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  419. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  420. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  421. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  422. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  423. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  424. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  425. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  426. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  427. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  428. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  429. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  430. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  431. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  432. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  433. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  434. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  435. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  436. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  437. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  438. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  439. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  440. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  441. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  442. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  443. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  444. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  445. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  446. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  447. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -12
  448. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -23
  449. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  450. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  451. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  452. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  453. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  454. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  455. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  456. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  457. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  458. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  459. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  460. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  461. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  462. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -29
  463. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -87
  464. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  465. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -58
  466. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -332
  467. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  468. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  469. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -75
  470. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  471. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  472. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -168
  473. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  474. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  475. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  476. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  477. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  478. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
  479. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  480. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  481. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  482. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  483. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  484. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  485. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  486. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  487. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  488. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  489. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  490. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  491. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  492. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  493. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  494. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  495. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  496. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  497. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  498. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  499. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  500. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  501. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  502. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  503. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  504. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  505. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  506. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  507. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  508. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
  509. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  510. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  511. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  512. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  513. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  514. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  515. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  516. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  517. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  518. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  519. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  520. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  521. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  522. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -72
  523. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -177
  524. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  525. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  526. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  527. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  528. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  529. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  530. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  531. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  532. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  533. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  534. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.d.ts +0 -47
  535. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js +0 -48
  536. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js.map +0 -1
  537. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.d.ts +0 -11
  538. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js +0 -36
  539. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +0 -1
  540. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  541. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
  542. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  543. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.d.ts +0 -7
  544. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js +0 -14
  545. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js.map +0 -1
  546. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  547. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  548. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  549. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  550. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  551. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  552. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  553. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  554. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  555. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  556. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  557. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  558. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  559. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  560. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  561. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  562. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  563. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  564. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  565. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  566. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  567. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  568. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  569. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  570. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +0 -1
  571. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +0 -1
  572. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.d.ts +0 -12
  573. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js +0 -52
  574. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js.map +0 -1
  575. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  576. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  577. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1,7 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo } from './baseSelectors';
4
- import { getLatestNotifications, getAssignedBreakoutRoom } from './baseSelectors';
5
4
  import { getMeetingConferencePhones } from './baseSelectors';
6
5
  import { createSelector } from 'reselect';
7
6
  import { DiagnosticQuality } from '@azure/communication-calling';
@@ -14,7 +13,7 @@ import { DiagnosticQuality } from '@azure/communication-calling';
14
13
  *
15
14
  * @public
16
15
  */
17
- export const notificationStackSelector = createSelector([getLatestErrors, getLatestNotifications, getDiagnostics, getDeviceManager, getEnvironmentInfo, getMeetingConferencePhones, getAssignedBreakoutRoom], (latestErrors, latestNotifications, diagnostics, deviceManager, environmentInfo, meetingConference, assignedBreakoutRoom) => {
16
+ export const notificationStackSelector = createSelector([getLatestErrors, getDiagnostics, getDeviceManager, getEnvironmentInfo, getMeetingConferencePhones], (latestErrors, diagnostics, deviceManager, environmentInfo, meetingConference) => {
18
17
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
19
18
  // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.
20
19
  // There are several options for the ordering:
@@ -159,7 +158,7 @@ export const notificationStackSelector = createSelector([getLatestErrors, getLat
159
158
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');
160
159
  }
161
160
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');
162
- appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');
161
+ appendMuteByOthersNotificationTrampoline(activeErrorMessages, latestErrors);
163
162
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'VideoEffectsFeature.startEffects', 'unableToStartVideoEffect');
164
163
  if (((_s = latestErrors['CallAgent.join']) === null || _s === void 0 ? void 0 : _s.message) === 'CallAgent.join: Invalid meeting link') {
165
164
  appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallInvalidMeetingLink');
@@ -180,37 +179,6 @@ export const notificationStackSelector = createSelector([getLatestErrors, getLat
180
179
  ariaLive: 'off' // "You're muted" is too noisy, so we don't want to announce it.
181
180
  });
182
181
  }
183
- if (latestNotifications['assignedBreakoutRoomOpened']) {
184
- activeNotifications.push({
185
- type: 'assignedBreakoutRoomOpened',
186
- timestamp: latestNotifications['assignedBreakoutRoomOpened'].timestamp
187
- });
188
- }
189
- if (latestNotifications['assignedBreakoutRoomOpenedPromptJoin'] && assignedBreakoutRoom) {
190
- activeNotifications.push({
191
- type: 'assignedBreakoutRoomOpenedPromptJoin',
192
- timestamp: latestNotifications['assignedBreakoutRoomOpenedPromptJoin'].timestamp,
193
- onClickPrimaryButton: () => assignedBreakoutRoom.join()
194
- });
195
- }
196
- if (latestNotifications['assignedBreakoutRoomChanged']) {
197
- activeNotifications.push({
198
- type: 'assignedBreakoutRoomChanged',
199
- timestamp: latestNotifications['assignedBreakoutRoomChanged'].timestamp
200
- });
201
- }
202
- if (latestNotifications['breakoutRoomJoined']) {
203
- activeNotifications.push({
204
- type: 'breakoutRoomJoined',
205
- timestamp: latestNotifications['breakoutRoomJoined'].timestamp
206
- });
207
- }
208
- if (latestNotifications['breakoutRoomClosingSoon']) {
209
- activeNotifications.push({
210
- type: 'breakoutRoomClosingSoon',
211
- timestamp: latestNotifications['breakoutRoomClosingSoon'].timestamp
212
- });
213
- }
214
182
  return {
215
183
  activeErrorMessages: activeErrorMessages,
216
184
  activeNotifications: activeNotifications
@@ -225,4 +193,7 @@ const appendActiveErrorIfDefined = (activeErrorMessages, latestErrors, target, a
225
193
  timestamp: latestErrors[target].timestamp
226
194
  });
227
195
  };
196
+ const appendMuteByOthersNotificationTrampoline = (activeErrorMessages, latestErrors, latestNotifications) => {
197
+ appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');
198
+ };
228
199
  //# sourceMappingURL=notificationStackSelector.js.map
@@ -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,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAClF,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,E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EAAE,6BAA6B;YACnC,SAAS,EAAE,mBAAmB,CAAC,6BAA6B,CAAC,CAAC,SAAS;SACxE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,mBAAmB,CAAC,oBAAoB,CAAC,EAAE,CAAC;QAC9C,mBAAmB,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,oBAAoB;YAC1B,SAAS,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,SAAS;SAC/D,CAAC,CAAC;IACL,CAAC;IACD,IAAI,mBAAmB,CAAC,yBAAyB,CAAC,EAAE,CAAC;QACnD,mBAAmB,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,yBAAyB;YAC/B,SAAS,EAAE,mBAAmB,CAAC,yBAAyB,CAAC,CAAC,SAAS;SACpE,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,mBAAmB,EAAE,mBAAmB;QACxC,mBAAmB,EAAE,mBAAmB;KACzC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,MAAM,0BAA0B,GAAG,CAAC,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 { getLatestNotifications, getAssignedBreakoutRoom } 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 appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\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 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,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAWjE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA8B,cAAc,CAAC,CAAC,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,0BAA0B,CAAC,EAAE,CAAC,YAAwB,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAG/Q,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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IAAI,CAAC,GAAG,EAAE,CAAC;YAC/B,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,KAAK,CAAC,gEAAgE;SACjF,CAAC,CAAC;IACL,CAAC;IACD,OAAO;QACL,mBAAmB,EAAE,mBAAmB;QACxC,mBAAmB,EAAE,mBAAmB;KACzC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,MAAM,0BAA0B,GAAG,CAAC,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;AACF,MAAM,wCAAwC,GAAG,CAAC,mBAAyC,EAAE,YAAwB,EAAE,mBAA+B,EAAQ,EAAE;IAC9J,0BAA0B,CAAC,mBAAmB,EAAE,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,CAAC,CAAC;AAClH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallingBaseSelectorProps, getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo } 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 * 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, getDiagnostics, getDeviceManager, getEnvironmentInfo, getMeetingConferencePhones], (latestErrors: CallErrors, diagnostics, deviceManager, environmentInfo, meetingConference): {\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 appendMuteByOthersNotificationTrampoline(activeErrorMessages, latestErrors);\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 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};\nconst appendMuteByOthersNotificationTrampoline = (activeErrorMessages: ActiveNotification[], latestErrors: CallErrors, latestNotifications?: undefined): void => {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\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.
@@ -76,11 +76,9 @@ export const participantListSelector = createSelector([getIdentifier, getDisplay
76
76
  reaction: memoizedConvertToVideoTileReaction(localParticipantReactionState),
77
77
  spotlight: memoizedSpotlight(spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants, userId)
78
78
  });
79
- const totalParticipantCount = partitipantCount;
80
79
  return {
81
80
  participants: participants,
82
- myUserId: userId,
83
- totalParticipantCount: totalParticipantCount
81
+ myUserId: userId
84
82
  };
85
83
  });
86
84
  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,MAAM,iBAAiB,CAAC;AAC5H,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;AACpG,MAAM,sDAAsD,GAAG,CAAC,kBAA4C,EAAE,wBAAiC,EAAE,0BAAoC,EAAE,aAA+B,EAAE,uBAAkD,EAAoC,EAAE;IAC9S,MAAM,kBAAkB,GAAG,CAAC,SAA6D,EAAoC,EAAE;QAC7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AuB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7Q,YAAY,CAAC,IAAI,CAAC;QAChB,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,WAAW;QACxB,eAAe,EAAE,iBAAiB;QAClC,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,WAAW;QAClB,iDAAiD;QACjD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,kCAAkC,CAAC,6BAA6B,CAAC;QAC3E,SAAS,EAAE,iBAAiB,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,uBAAuB,EAAE,MAAM,CAAC;KACpF,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 } 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 return true;\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);\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], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, raisedHand, role, partitipantCount, isHideAttendeeNamesEnabled, localParticipantReactionState, spotlightCallFeature): {\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 });\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,MAAM,iBAAiB,CAAC;AAC5H,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;AACpG,MAAM,sDAAsD,GAAG,CAAC,kBAA4C,EAAE,wBAAiC,EAAE,0BAAoC,EAAE,aAA+B,EAAE,uBAAkD,EAAoC,EAAE;IAC9S,MAAM,kBAAkB,GAAG,CAAC,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uBAApB,oBAAoB,CAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7Q,YAAY,CAAC,IAAI,CAAC;QAChB,MAAM,EAAE,MAAM;QACd,WAAW,EAAE,WAAW;QACxB,eAAe,EAAE,iBAAiB;QAClC,OAAO,EAAE,OAAO;QAChB,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,WAAW;QAClB,iDAAiD;QACjD,WAAW,EAAE,KAAK;QAClB,QAAQ,EAAE,kCAAkC,CAAC,6BAA6B,CAAC;QAC3E,SAAS,EAAE,iBAAiB,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,uBAAuB,EAAE,MAAM,CAAC;KACpF,CAAC,CAAC;IACH,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,MAAM;KACjB,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 } 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 return true;\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);\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], (userId, displayName, remoteParticipants, isScreenSharingOn, isMuted, raisedHand, role, partitipantCount, isHideAttendeeNamesEnabled, localParticipantReactionState, spotlightCallFeature): {\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 });\n return {\n participants: participants,\n myUserId: userId\n };\n});\nconst localUserCanRemoveOthersTrampoline = (role?: string): boolean => {\n return role === 'Presenter' || role === 'Unknown' || role === undefined;\n};"]}
@@ -15,7 +15,7 @@ export declare const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemotePar
15
15
  /** @private */
16
16
  export declare const convertRemoteParticipantToVideoGalleryRemoteParticipant: (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {
17
17
  [key: number]: RemoteVideoStreamState;
18
- }, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined) => VideoGalleryRemoteParticipant;
18
+ }, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined, role?: undefined) => VideoGalleryRemoteParticipant;
19
19
  /** @private */
20
20
  export declare const memoizeLocalParticipant: (this: any, identifier: any, displayName: any, isMuted: any, isScreenSharingOn: any, localVideoStream: any, localScreenSharingStream: any, role: any, raisedHand: any, reaction: any, localSpotlight: any, capabilities: any) => {
21
21
  userId: any;
@@ -33,11 +33,11 @@ export const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAt
33
33
  });
34
34
  });
35
35
  };
36
- const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight, signalStrength, mediaAccess) => {
36
+ const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight, signalStrength, mediaAccess, role) => {
37
37
  return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight);
38
38
  });
39
39
  /** @private */
40
- export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight, signalStrength, mediaAccess) => {
40
+ export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight, signalStrength, mediaAccess, role) => {
41
41
  const rawVideoStreamsArray = Object.values(videoStreams);
42
42
  let videoStream = undefined;
43
43
  let screenShareStream = undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../preprocess-dist/calling-component-bindings/src/utils/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAA8B,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,OAAO,EAAE,kCAAkC,EAAE,MAAM,gCAAgC,CAAC;AAGpF,gBAAgB;AAChB,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,gBAAuC,EAAwB,EAAE;;IAC3G,OAAO,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,YAAY,0CAAE,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAC5E,CAAC,CAAC;AAKF,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAA0C,CAAC,kBAAwD,EAAE,0BAAoC,EAAE,aAAc,EAAmC,EAAE;IAC5O,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,mCAAmC,CAAC,UAAU,CAAC,EAAE;QACtD,OAAO,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC;YACxC;;;eAGG,EAAC,MAAM,CAAC,CAAC,WAAmC,EAAE,EAAE;YACjD,OAAO,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AAiB;QACpC,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,gBAAgB;YAC/B,UAAU,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,UAAU;YAC9C,aAAa,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,MAAM;SAC9C;QACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,CAAC,CAAC,wBAAwB;YACvC,aAAa,EAAE,MAAA,wBAAwB,aAAxB,wBAAwB,uBAAxB,wBAAwB,CAAE,IAAI,0CAAE,MAAM;SACtD;QACD,IAAI;QACJ,UAAU,EAAE,UAAU;QACtB,QAAQ;QACR,SAAS,EAAE,cAAc;QACzB,YAAY;KACb,CAAC,CAAA;CAAA,CAAC,CAAC;AAEJ,eAAe;AACf,MAAM,CAAC,MAAM,gCAAgC,GAAG,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,GAAG,CAAC,CAAC,CAAyB,EAAE,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DominantSpeakersInfo } from '@azure/communication-calling';\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryStream } from '@internal/react-components';\nimport memoizeOne from 'memoize-one';\nimport { _convertParticipantState, ParticipantConnectionState } from './callUtils';\nimport { maskDisplayNameWithRole } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { Reaction } from '@internal/react-components';\nimport { memoizedConvertToVideoTileReaction } from './participantListSelectorUtils';\nimport { Spotlight } from '@internal/react-components';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport type _VideoGalleryRemoteParticipantsMemoFn = (remoteParticipants: RemoteParticipantState[] | undefined, isHideAttendeeNamesEnabled?: boolean, localUserRole?: ParticipantRole) => VideoGalleryRemoteParticipant[];\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemoteParticipantsMemoFn = (remoteParticipants: RemoteParticipantState[] | undefined, isHideAttendeeNamesEnabled?: boolean, localUserRole?): VideoGalleryRemoteParticipant[] => {\n if (!remoteParticipants) {\n return [];\n }\n return memoizedAllConvertRemoteParticipant(memoizedFn => {\n return Object.values(remoteParticipants)\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: RemoteParticipantState) => {\n return !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) || isPhoneNumberIdentifier(participant.identifier);\n }).map((participant: RemoteParticipantState) => {\n const state = _convertParticipantState(participant);\n const displayName = maskDisplayNameWithRole(participant.displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = participant.spotlight;\n return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName, participant.raisedHand, participant.contentSharingStream, remoteParticipantReaction, spotlight);\n });\n });\n};\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll((userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight);\n});\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n\n /**\n * There is a bug from the calling sdk where if a user leaves and rejoins immediately\n * it adds 2 more potential streams this remote participant can use. The old 2 streams\n * still show as available and that is how we got a frozen stream in this case. The stopgap\n * until streams accurately reflect their availability is to always prioritize the latest streams of a certain type\n * e.g findLast instead of find\n */\n const sdkRemoteVideoStream = Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'Video' && i.isAvailable) || Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'Video');\n const sdkScreenShareStream = Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) || Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'ScreenSharing');\n if (sdkRemoteVideoStream) {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);\n }\n if (sdkScreenShareStream) {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);\n }\n if (contentSharingStream) {\n screenShareStream = convertRemoteContentSharingStreamToVideoGalleryStream(contentSharingStream);\n }\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n state,\n raisedHand,\n reaction,\n spotlight\n };\n};\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n isReceiving: stream.isReceiving,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target,\n scalingMode: stream.view?.scalingMode,\n streamSize: stream.streamSize\n };\n};\nconst convertRemoteContentSharingStreamToVideoGalleryStream = (stream: HTMLElement): VideoGalleryStream => {\n return {\n isAvailable: !!stream,\n isReceiving: true,\n isMirrored: false,\n renderElement: stream\n };\n};\n\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, localScreenSharingStream, role, raisedHand, reaction, localSpotlight, capabilities) => ({\n userId: identifier,\n displayName: displayName ?? '',\n isMuted: isMuted,\n isScreenSharingOn: isScreenSharingOn,\n videoStream: {\n isAvailable: !!localVideoStream,\n isMirrored: localVideoStream?.view?.isMirrored,\n renderElement: localVideoStream?.view?.target\n },\n screenShareStream: {\n isAvailable: !!localScreenSharingStream,\n renderElement: localScreenSharingStream?.view?.target\n },\n role,\n raisedHand: raisedHand,\n reaction,\n spotlight: localSpotlight,\n capabilities\n}));\n\n/** @private */\nexport const memoizeSpotlightedParticipantIds = memoizeOne(spotlightedParticipants => spotlightedParticipants?.map((p: SpotlightedParticipant) => toFlatCommunicationIdentifier(p.identifier)));"]}
1
+ {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../preprocess-dist/calling-component-bindings/src/utils/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAA8B,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;QACJ,UAAU,EAAE,UAAU;QACtB,QAAQ;QACR,SAAS,EAAE,cAAc;QACzB,YAAY;KACb,CAAC,CAAA;CAAA,CAAC,CAAC;AAEJ,eAAe;AACf,MAAM,CAAC,MAAM,gCAAgC,GAAG,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,GAAG,CAAC,CAAC,CAAyB,EAAE,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DominantSpeakersInfo } from '@azure/communication-calling';\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryStream } from '@internal/react-components';\nimport memoizeOne from 'memoize-one';\nimport { _convertParticipantState, ParticipantConnectionState } from './callUtils';\nimport { maskDisplayNameWithRole } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { Reaction } from '@internal/react-components';\nimport { memoizedConvertToVideoTileReaction } from './participantListSelectorUtils';\nimport { Spotlight } from '@internal/react-components';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport type _VideoGalleryRemoteParticipantsMemoFn = (remoteParticipants: RemoteParticipantState[] | undefined, isHideAttendeeNamesEnabled?: boolean, localUserRole?: ParticipantRole) => VideoGalleryRemoteParticipant[];\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemoteParticipantsMemoFn = (remoteParticipants: RemoteParticipantState[] | undefined, isHideAttendeeNamesEnabled?: boolean, localUserRole?): VideoGalleryRemoteParticipant[] => {\n if (!remoteParticipants) {\n return [];\n }\n return memoizedAllConvertRemoteParticipant(memoizedFn => {\n return Object.values(remoteParticipants)\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: RemoteParticipantState) => {\n return !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) || isPhoneNumberIdentifier(participant.identifier);\n }).map((participant: RemoteParticipantState) => {\n const state = _convertParticipantState(participant);\n const displayName = maskDisplayNameWithRole(participant.displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = participant.spotlight;\n return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName, participant.raisedHand, participant.contentSharingStream, remoteParticipantReaction, spotlight);\n });\n });\n};\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll((userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined, role?: undefined): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight);\n});\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined, role?: undefined): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n\n /**\n * There is a bug from the calling sdk where if a user leaves and rejoins immediately\n * it adds 2 more potential streams this remote participant can use. The old 2 streams\n * still show as available and that is how we got a frozen stream in this case. The stopgap\n * until streams accurately reflect their availability is to always prioritize the latest streams of a certain type\n * e.g findLast instead of find\n */\n const sdkRemoteVideoStream = Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'Video' && i.isAvailable) || Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'Video');\n const sdkScreenShareStream = Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) || Object.values(rawVideoStreamsArray).findLast(i => i.mediaStreamType === 'ScreenSharing');\n if (sdkRemoteVideoStream) {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);\n }\n if (sdkScreenShareStream) {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);\n }\n if (contentSharingStream) {\n screenShareStream = convertRemoteContentSharingStreamToVideoGalleryStream(contentSharingStream);\n }\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n state,\n raisedHand,\n reaction,\n spotlight\n };\n};\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n isReceiving: stream.isReceiving,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target,\n scalingMode: stream.view?.scalingMode,\n streamSize: stream.streamSize\n };\n};\nconst convertRemoteContentSharingStreamToVideoGalleryStream = (stream: HTMLElement): VideoGalleryStream => {\n return {\n isAvailable: !!stream,\n isReceiving: true,\n isMirrored: false,\n renderElement: stream\n };\n};\n\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, localScreenSharingStream, role, raisedHand, reaction, localSpotlight, capabilities) => ({\n userId: identifier,\n displayName: displayName ?? '',\n isMuted: isMuted,\n isScreenSharingOn: isScreenSharingOn,\n videoStream: {\n isAvailable: !!localVideoStream,\n isMirrored: localVideoStream?.view?.isMirrored,\n renderElement: localVideoStream?.view?.target\n },\n screenShareStream: {\n isAvailable: !!localScreenSharingStream,\n renderElement: localScreenSharingStream?.view?.target\n },\n role,\n raisedHand: raisedHand,\n reaction,\n spotlight: localSpotlight,\n capabilities\n}));\n\n/** @private */\nexport const memoizeSpotlightedParticipantIds = memoizeOne(spotlightedParticipants => spotlightedParticipants?.map((p: SpotlightedParticipant) => toFlatCommunicationIdentifier(p.identifier)));"]}
@@ -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;;;;;;;;;;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,uBAAu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AAO,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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AAE,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};"]}
@@ -1,7 +1,5 @@
1
1
  import { AudioDeviceInfo, CallDirection, CallEndReason, CallerInfo, CallState as CallStatus, DeviceAccess, DominantSpeakersInfo, IncomingCallKind, LatestMediaDiagnostics, LatestNetworkDiagnostics, MediaStreamType, ParticipantRole, RemoteParticipantState as RemoteParticipantStatus, ScalingMode, VideoDeviceInfo } from '@azure/communication-calling';
2
- import { BreakoutRoom, BreakoutRoomsSettings } from '@azure/communication-calling';
3
2
  import { TeamsCallInfo } from '@azure/communication-calling';
4
- import { CallInfo } from '@azure/communication-calling';
5
3
  import { CapabilitiesChangeInfo, ParticipantCapabilities } from '@azure/communication-calling';
6
4
  import { CaptionsResultType } from '@azure/communication-calling';
7
5
  import { CaptionsKind } from '@azure/communication-calling';
@@ -11,7 +9,6 @@ import { EnvironmentInfo } from '@azure/communication-calling';
11
9
  import { CommunicationIdentifierKind } from '@azure/communication-common';
12
10
  import { ReactionMessage } from '@azure/communication-calling';
13
11
  import { SpotlightedParticipant } from '@azure/communication-calling';
14
- import { LocalRecordingInfo, RecordingInfo } from '@azure/communication-calling';
15
12
  /**
16
13
  * State only version of {@link @azure/communication-calling#CallAgent} except calls is moved to be a child directly of
17
14
  * {@link CallClientState} and not included here. The reason to have CallAgent's state proxied is to provide access to
@@ -154,17 +151,6 @@ export interface SpotlightState {
154
151
  */
155
152
  spotlightedOrderPosition?: number;
156
153
  }
157
- /**
158
- * Breakout rooms state
159
- *
160
- * @public
161
- */
162
- export interface BreakoutRoomsState {
163
- assignedBreakoutRoom?: BreakoutRoom;
164
- breakoutRoomSettings?: BreakoutRoomsSettings;
165
- breakoutRoomOriginCallId?: string;
166
- breakoutRoomDisplayName?: string;
167
- }
168
154
  /**
169
155
  * State only version of {@link @azure/communication-calling#RecordingCallFeature}. {@link StatefulCallClient} will
170
156
  * automatically listen for recording state of the call and update the state exposed by {@link StatefulCallClient} accordingly.
@@ -176,36 +162,6 @@ export interface RecordingCallFeatureState {
176
162
  * Proxy of {@link @azure/communication-calling#RecordingCallFeature.isRecordingActive}.
177
163
  */
178
164
  isRecordingActive: boolean;
179
- /**
180
- * Contains list of information of started recordings
181
- * Proxy of {@link @azure/communication-calling#RecordingCallFeature.recordings}.
182
- */
183
- activeRecordings?: RecordingInfo[];
184
- /**
185
- * Contains list of information of stopped recordings
186
- */
187
- lastStoppedRecording?: RecordingInfo[];
188
- }
189
- /**
190
- * State only version of {@link @azure/communication-calling#LocalRecordingCallFeature}. {@link StatefulCallClient} will
191
- * automatically listen for local recording state of the call and update the state exposed by {@link StatefulCallClient} accordingly.
192
- *
193
- * @beta
194
- */
195
- export interface LocalRecordingCallFeatureState {
196
- /**
197
- * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature.isRecordingActive}.
198
- */
199
- isLocalRecordingActive: boolean;
200
- /**
201
- * Contains list of information of started recordings
202
- * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature.recordings}.
203
- */
204
- activeLocalRecordings?: LocalRecordingInfo[];
205
- /**
206
- * Contains list of information of stopped recordings
207
- */
208
- lastStoppedLocalRecording?: LocalRecordingInfo[];
209
165
  }
210
166
  /**
211
167
  * State only version of {@link @azure/communication-calling#RaiseHandCallFeature}. {@link StatefulCallClient} will
@@ -507,10 +463,6 @@ export interface CallState {
507
463
  * Proxy of {@link @azure/communication-calling#RecordingCallFeature}.
508
464
  */
509
465
  recording: RecordingCallFeatureState;
510
- /**
511
- * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature}.
512
- */
513
- localRecording: LocalRecordingCallFeatureState;
514
466
  /**
515
467
  * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature}.
516
468
  *
@@ -567,10 +519,6 @@ export interface CallState {
567
519
  * Proxy of {@link @azure/communication-calling#Call.role}.
568
520
  */
569
521
  role?: ParticipantRole;
570
- /**
571
- * Proxy of {@link @azure/communication-calling#Call.totalParticipantCount}.
572
- */
573
- totalParticipantCount?: number;
574
522
  /**
575
523
  * Transfer state of call
576
524
  */
@@ -590,17 +538,13 @@ export interface CallState {
590
538
  /**
591
539
  * Proxy of {@link @azure/communication-calling#Call.info}.
592
540
  */
593
- info?: TeamsCallInfo | CallInfo;
541
+ info?: TeamsCallInfo;
594
542
  /**
595
543
  * Proxy of {@link @azure/communication-calling#TeamsMeetingAudioConferencingCallFeature}.
596
544
  */
597
545
  meetingConference?: {
598
546
  conferencePhones: ConferencePhoneInfo[];
599
547
  };
600
- /**
601
- * Proxy of {@link @azure/communication-calling#BreakoutRoomsFeature}.
602
- */
603
- breakoutRooms?: BreakoutRoomsState;
604
548
  }
605
549
  /**
606
550
  * Transfer feature state
@@ -837,12 +781,6 @@ export interface CallClientState {
837
781
  * See documentation of {@Link CallErrors} for details.
838
782
  */
839
783
  latestErrors: CallErrors;
840
- /**
841
- * Stores the latest notifications.
842
- *
843
- * See documentation of {@Link CallNotifications} for details.
844
- */
845
- latestNotifications: CallNotifications;
846
784
  /**
847
785
  * A phone number in E.164 format that will be used to represent callers identity.
848
786
  * For example, using the alternateCallerId to add a participant using PSTN, this number will
@@ -895,22 +833,7 @@ export declare class CallError extends Error {
895
833
  *
896
834
  * @public
897
835
  */
898
- export type CallErrorTarget = 'Call.addParticipant' | 'Call.dispose' | 'Call.feature' | 'Call.hangUp' | 'Call.hold' | 'Call.mute' | 'Call.muteIncomingAudio' | 'Call.off' | 'Call.on' | 'Call.removeParticipant' | 'Call.resume' | 'Call.sendDtmf' | 'Call.startAudio' | 'Call.startScreenSharing' | 'Call.startVideo' | 'Call.stopScreenSharing' | 'Call.stopAudio' | 'Call.stopVideo' | 'Call.unmute' | 'Call.unmuteIncomingAudio' | 'CallAgent.dispose' | 'CallAgent.feature' | 'CallAgent.join' | 'CallAgent.off' | 'CallAgent.on' | 'CallAgent.startCall' | 'CallClient.createCallAgent' | 'CallClient.createTeamsCallAgent' | 'CallClient.feature' | 'CallClient.getDeviceManager' | 'CallClient.getEnvironmentInfo' | 'DeviceManager.askDevicePermission' | 'DeviceManager.getCameras' | 'DeviceManager.getMicrophones' | 'DeviceManager.getSpeakers' | 'DeviceManager.off' | 'DeviceManager.on' | 'DeviceManager.selectMicrophone' | 'DeviceManager.selectSpeaker' | 'IncomingCall.accept' | 'IncomingCall.reject' | 'TeamsCall.addParticipant' | 'VideoEffectsFeature.startEffects' | 'CallAgent.handlePushNotification' | 'Call.admit' | 'Call.rejectParticipant' | 'Call.admitAll' | 'Call.mutedByOthers' | 'Call.muteAllRemoteParticipants' | 'Call.setConstraints';
899
- /**
900
- * @public
901
- */
902
- export type CallNotifications = {
903
- [target in NotificationTarget]: CallNotification;
904
- };
905
- /**
906
- * @public
907
- */
908
- export interface CallNotification {
909
- target: NotificationTarget;
910
- timestamp: Date;
911
- }
912
- /** @public */
913
- export type NotificationTarget = 'assignedBreakoutRoomOpened' | 'assignedBreakoutRoomOpenedPromptJoin' | 'assignedBreakoutRoomChanged' | 'breakoutRoomJoined' | 'breakoutRoomClosingSoon';
836
+ export type CallErrorTarget = 'Call.addParticipant' | 'Call.dispose' | 'Call.feature' | 'Call.hangUp' | 'Call.hold' | 'Call.mute' | 'Call.muteIncomingAudio' | 'Call.off' | 'Call.on' | 'Call.removeParticipant' | 'Call.resume' | 'Call.sendDtmf' | 'Call.startAudio' | 'Call.startScreenSharing' | 'Call.startVideo' | 'Call.stopScreenSharing' | 'Call.stopAudio' | 'Call.stopVideo' | 'Call.unmute' | 'Call.unmuteIncomingAudio' | 'CallAgent.dispose' | 'CallAgent.feature' | 'CallAgent.join' | 'CallAgent.off' | 'CallAgent.on' | 'CallAgent.startCall' | 'CallClient.createCallAgent' | 'CallClient.createTeamsCallAgent' | 'CallClient.feature' | 'CallClient.getDeviceManager' | 'CallClient.getEnvironmentInfo' | 'DeviceManager.askDevicePermission' | 'DeviceManager.getCameras' | 'DeviceManager.getMicrophones' | 'DeviceManager.getSpeakers' | 'DeviceManager.off' | 'DeviceManager.on' | 'DeviceManager.selectMicrophone' | 'DeviceManager.selectSpeaker' | 'IncomingCall.accept' | 'IncomingCall.reject' | 'TeamsCall.addParticipant' | 'VideoEffectsFeature.startEffects' | 'Call.mutedByOthers' | 'Call.muteAllRemoteParticipants' | 'Call.setConstraints';
914
837
  /**
915
838
  * State only proxy for {@link @azure/communication-calling#DiagnosticsCallFeature}.
916
839
  *