@azure/communication-react 1.9.0-beta.1 → 1.9.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 (486) hide show
  1. package/dist/communication-react.d.ts +48 -2285
  2. package/dist/dist-cjs/communication-react/index.js +3869 -10219
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -2
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -8
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -12
  10. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -13
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -4
  13. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -11
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +2 -18
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +0 -10
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -15
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -4
  22. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -19
  23. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -6
  25. package/dist/dist-esm/calling-component-bindings/src/index.js +0 -8
  26. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  28. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +2 -18
  29. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +3 -4
  31. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +2 -14
  33. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -20
  34. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -7
  36. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +0 -12
  37. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +0 -4
  39. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +0 -11
  40. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -2
  42. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +1 -8
  43. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -8
  45. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +5 -6
  47. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
  49. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  50. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -2
  51. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -5
  52. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -60
  54. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -8
  56. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -62
  57. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +0 -41
  59. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -1
  61. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -8
  62. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -12
  64. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  65. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +0 -1
  66. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +0 -8
  67. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  68. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +0 -1
  69. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +0 -8
  70. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  71. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -25
  72. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +2 -33
  73. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
  75. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -8
  76. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  77. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  78. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  79. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -4
  80. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  81. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +6 -119
  82. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  83. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  84. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  85. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
  86. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  87. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -3
  88. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  89. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -4
  90. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  91. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +0 -1
  92. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  93. package/dist/dist-esm/communication-react/src/index.d.ts +0 -27
  94. package/dist/dist-esm/communication-react/src/index.js +0 -16
  95. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -22
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -9
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +0 -2
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +1 -6
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +1 -22
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +6 -43
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -15
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -92
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  108. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +0 -6
  109. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -29
  111. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +2 -24
  112. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  114. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -18
  115. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -51
  117. package/dist/dist-esm/react-components/src/components/MessageThread.js +8 -57
  118. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -13
  120. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -3
  121. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  123. package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -22
  124. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  125. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -3
  126. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +0 -41
  128. package/dist/dist-esm/react-components/src/components/SendBox.js +3 -31
  129. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -2
  131. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -2
  133. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  134. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -24
  135. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -2
  137. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/VerticalGallery.d.ts +5 -5
  139. package/dist/dist-esm/react-components/src/components/VerticalGallery.js +2 -2
  140. package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +4 -4
  142. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  143. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +0 -5
  144. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +7 -12
  145. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  146. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +1 -1
  147. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +4 -4
  149. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
  150. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +0 -5
  151. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +7 -12
  152. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +1 -1
  154. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +2 -2
  155. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +3 -15
  157. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  158. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +3 -16
  159. package/dist/dist-esm/react-components/src/components/VideoGallery.js +5 -15
  160. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  161. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +0 -7
  162. package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -7
  163. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -19
  165. package/dist/dist-esm/react-components/src/components/index.js +0 -12
  166. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
  168. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -4
  169. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  170. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  171. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  173. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -5
  174. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  176. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  177. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +1 -64
  178. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  179. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +1 -1
  180. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +1 -1
  181. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +1 -1
  182. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +1 -1
  183. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -1
  184. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +1 -1
  185. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +1 -1
  186. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +1 -1
  187. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +1 -1
  188. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +1 -1
  189. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +1 -1
  190. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +1 -1
  191. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +1 -1
  192. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +1 -1
  193. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +1 -1
  194. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +1 -1
  195. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +1 -1
  196. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +1 -1
  197. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +1 -1
  198. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +1 -1
  199. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +1 -1
  200. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -15
  201. package/dist/dist-esm/react-components/src/theming/icons.js +0 -108
  202. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  203. package/dist/dist-esm/react-components/src/theming/themes.d.ts +2 -21
  204. package/dist/dist-esm/react-components/src/theming/themes.js +0 -16
  205. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  206. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -27
  207. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  208. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +0 -8
  209. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  210. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -6
  211. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
  212. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -78
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +4 -81
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -144
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -75
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +12 -289
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -130
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +1 -2
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +1 -7
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -6
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +0 -2
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -3
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +10 -67
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +8 -89
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -27
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -20
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -27
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +6 -33
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +9 -22
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +2 -4
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +2 -36
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +2 -4
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +1 -8
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +2 -6
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +6 -23
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -7
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -2
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -2
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -5
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +6 -97
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +0 -2
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +0 -5
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +0 -5
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -9
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -10
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +0 -5
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +0 -5
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +0 -5
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +0 -5
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +0 -5
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +0 -5
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +0 -4
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +0 -5
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +0 -5
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +0 -5
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +0 -5
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +0 -10
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +0 -5
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +0 -5
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +3 -15
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +1 -88
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -68
  297. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -35
  298. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -32
  300. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -30
  302. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +10 -111
  303. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  304. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +0 -64
  305. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +2 -10
  307. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -40
  308. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  309. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +0 -13
  310. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +1 -37
  311. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +0 -1
  313. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  314. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -24
  315. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -11
  316. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -20
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +0 -4
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  320. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +5 -133
  321. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  322. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -4
  323. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  324. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -28
  325. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -126
  326. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +0 -28
  328. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -159
  329. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -17
  331. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  332. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +0 -2
  333. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  334. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +1 -8
  335. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -4
  337. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  338. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -5
  339. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -11
  340. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  341. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -5
  342. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +2 -3
  343. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  344. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +15 -3
  345. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  346. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -2
  347. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -14
  348. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  349. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +1 -3
  350. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +1 -70
  351. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +3 -65
  353. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +0 -1
  355. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +3 -20
  357. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  358. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
  359. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -17
  361. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  362. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -28
  363. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -14
  364. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  365. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +4 -21
  366. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  367. package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -2
  368. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  369. package/package.json +13 -13
  370. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +0 -45
  371. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +0 -95
  372. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +0 -1
  373. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +0 -19
  374. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +0 -91
  375. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +0 -1
  376. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +0 -23
  377. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -49
  378. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +0 -1
  379. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  380. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  381. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  382. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  383. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -43
  384. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  385. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  386. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -75
  387. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  388. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  389. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -68
  390. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  391. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  392. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -39
  393. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  394. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
  395. package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
  396. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +0 -1
  397. package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +0 -71
  398. package/dist/dist-esm/react-components/src/components/ImageGallery.js +0 -64
  399. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +0 -1
  400. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  401. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -117
  402. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  403. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -41
  404. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -573
  405. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  406. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  407. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -816
  408. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  409. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  410. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  411. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  412. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +0 -72
  413. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +0 -215
  414. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +0 -1
  415. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  416. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -68
  417. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  418. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  419. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -92
  420. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  421. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  422. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -67
  423. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  424. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  425. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  426. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  427. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  428. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  429. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  430. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -48
  431. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -218
  432. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  433. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
  434. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
  435. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
  436. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
  437. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
  438. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
  439. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +0 -24
  440. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -28
  441. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +0 -1
  442. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +0 -14
  443. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +0 -113
  444. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +0 -1
  445. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  446. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -54
  447. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  448. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
  449. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
  450. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +0 -1
  451. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.d.ts +0 -37
  452. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js +0 -73
  453. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js.map +0 -1
  454. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  455. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  456. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  457. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +0 -15
  458. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +0 -23
  459. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +0 -1
  460. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +0 -6
  461. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +0 -11
  462. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +0 -1
  463. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -12
  464. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -15
  465. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +0 -1
  466. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +0 -34
  467. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +0 -14
  468. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +0 -1
  469. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -22
  470. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -107
  471. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
  472. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
  473. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
  474. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
  475. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
  476. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -74
  477. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
  478. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
  479. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
  480. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
  481. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +0 -17
  482. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +0 -50
  483. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +0 -1
  484. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +0 -11
  485. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +0 -40
  486. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"callUtils.js","sourceRoot":"","sources":["../../../../../preprocess-dist/calling-component-bindings/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GG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,YAAuC,EAA+F,EAAE;IAC5K,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,WAAmC,EAA8B,EAAE;IAC3G,OAAO,uBAAuB,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC;AAC/H,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DeviceManagerState, RemoteParticipantState, StatefulCallClient } from '@internal/calling-stateful-client';\nimport { CallState as CallStatus } from '@azure/communication-calling';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { Features, EnvironmentInfo } from '@azure/communication-calling';\nimport { CommunicationIdentifier, CommunicationUserIdentifier, isCommunicationUserIdentifier, isMicrosoftTeamsUserIdentifier, isPhoneNumberIdentifier, MicrosoftTeamsUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier } from '@azure/communication-common';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\ntype ParticipantConnectionState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';\n\n/**\n * Check if the call state represents being in the call\n *\n * @internal\n */\nexport const _isInCall = (callStatus?: CallStatus): boolean => !!callStatus && !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia', 'Disconnecting'].includes(callStatus);\n\n/**\n * Check if the call state represents being in the lobby or waiting to be admitted.\n *\n * @internal\n */\nexport const _isInLobbyOrConnecting = (callStatus: CallStatus | undefined): boolean => !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);\n\n/**\n * Check if the device manager local video is on when not part of a call\n * i.e. do unparented views exist.\n *\n * @internal\n */\nexport const _isPreviewOn = (deviceManager: DeviceManagerState): boolean => {\n // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also\n // handle cases where 'Preview' view is in progress and not necessary completed.\n return deviceManager.unparentedViews.length > 0 && deviceManager.unparentedViews[0].view !== undefined;\n};\n\n/**\n * Dispose of all preview views\n * We assume all unparented views are local preview views.\n *\n * @private\n */\nexport const disposeAllLocalPreviewViews = async (callClient: StatefulCallClient): Promise<void> => {\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n for (const view of unparentedViews) {\n await callClient.disposeView(undefined, undefined, view);\n }\n};\n\n/**\n * Update the users displayNames based on the type of user they are\n *\n * @internal\n */\nexport const _updateUserDisplayNames = (participants: RemoteParticipantState[]): RemoteParticipantState[] => {\n if (participants) {\n return memoizedUpdateDisplayName(memoizedFn => {\n return Object.values(participants).map(p => {\n const pid = toFlatCommunicationIdentifier(p.identifier);\n return memoizedFn(pid, p);\n });\n });\n } else {\n return [];\n }\n};\nconst memoizedUpdateDisplayName = memoizeFnAll((participantId: string, participant: RemoteParticipantState) => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n ...participant,\n displayName: participant.identifier.phoneNumber\n };\n } else {\n return participant;\n }\n});\n\n/* @conditional-compile-remove(unsupported-browser) */\n/**\n * Check whether the call is in a supported browser\n *\n * @internal\n */\nexport const _getEnvironmentInfo = async (callClient: StatefulCallClient): Promise<EnvironmentInfo> => {\n const environmentInfo = await callClient.feature(Features.DebugInfo).getEnvironmentInfo();\n return environmentInfo;\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for Teams call\n */\nexport const isTeamsCallParticipants = (participants: CommunicationIdentifier[]): participants is (PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[] => {\n return participants.every(p => !isCommunicationUserIdentifier(p));\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for ACS call\n */\nexport const isACSCallParticipants = (participants: CommunicationIdentifier[]): participants is (PhoneNumberIdentifier | CommunicationUserIdentifier | UnknownIdentifier)[] => {\n return participants.every(p => !isMicrosoftTeamsUserIdentifier(p));\n};\n\n/**\n * @private\n * Checks whether the user is a 'Ringing' PSTN user.\n */\nexport const _isRingingPSTNParticipant = (participant: RemoteParticipantState): ParticipantConnectionState => {\n return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting' ? 'Ringing' : participant.state;\n};\"../../../calling-stateful-client/src\"\"../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"callUtils.js","sourceRoot":"","sources":["../../../../../preprocess-dist/calling-component-bindings/src/utils/callUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAIlC,OAAO,EAAwD,6BAA6B,EAAE,8BAA8B,EAAE,uBAAuB,EAA0E,MAAM,6BAA6B,CAAC;AACnQ,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,UAAuB,EAAW,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAEtL;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,UAAkC,EAAW,EAAE,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AAE/K;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,aAAiC,EAAW,EAAE;IACzE,iHAAiH;IACjH,gFAAgF;IAChF,OAAO,aAAa,CAAC,eAAe,CAAC,MAAM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OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,YAAuC,EAA+F,EAAE;IAC5K,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,WAAmC,EAA8B,EAAE;IAC3G,OAAO,uBAAuB,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,WAAW,CAAC,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC;AAC/H,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DeviceManagerState, RemoteParticipantState, StatefulCallClient } from '@internal/calling-stateful-client';\nimport { CallState as CallStatus } from '@azure/communication-calling';\nimport { CommunicationIdentifier, CommunicationUserIdentifier, isCommunicationUserIdentifier, isMicrosoftTeamsUserIdentifier, isPhoneNumberIdentifier, MicrosoftTeamsUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier } from '@azure/communication-common';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\ntype ParticipantConnectionState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';\n\n/**\n * Check if the call state represents being in the call\n *\n * @internal\n */\nexport const _isInCall = (callStatus?: CallStatus): boolean => !!callStatus && !['None', 'Disconnected', 'Connecting', 'Ringing', 'EarlyMedia', 'Disconnecting'].includes(callStatus);\n\n/**\n * Check if the call state represents being in the lobby or waiting to be admitted.\n *\n * @internal\n */\nexport const _isInLobbyOrConnecting = (callStatus: CallStatus | undefined): boolean => !!callStatus && ['Connecting', 'Ringing', 'InLobby', 'EarlyMedia'].includes(callStatus);\n\n/**\n * Check if the device manager local video is on when not part of a call\n * i.e. do unparented views exist.\n *\n * @internal\n */\nexport const _isPreviewOn = (deviceManager: DeviceManagerState): boolean => {\n // TODO: we should take in a LocalVideoStream that developer wants to use as their 'Preview' view. We should also\n // handle cases where 'Preview' view is in progress and not necessary completed.\n return deviceManager.unparentedViews.length > 0 && deviceManager.unparentedViews[0].view !== undefined;\n};\n\n/**\n * Dispose of all preview views\n * We assume all unparented views are local preview views.\n *\n * @private\n */\nexport const disposeAllLocalPreviewViews = async (callClient: StatefulCallClient): Promise<void> => {\n const unparentedViews = callClient.getState().deviceManager.unparentedViews;\n for (const view of unparentedViews) {\n await callClient.disposeView(undefined, undefined, view);\n }\n};\n\n/**\n * Update the users displayNames based on the type of user they are\n *\n * @internal\n */\nexport const _updateUserDisplayNames = (participants: RemoteParticipantState[]): RemoteParticipantState[] => {\n if (participants) {\n return memoizedUpdateDisplayName(memoizedFn => {\n return Object.values(participants).map(p => {\n const pid = toFlatCommunicationIdentifier(p.identifier);\n return memoizedFn(pid, p);\n });\n });\n } else {\n return [];\n }\n};\nconst memoizedUpdateDisplayName = memoizeFnAll((participantId: string, participant: RemoteParticipantState) => {\n if (isPhoneNumberIdentifier(participant.identifier)) {\n return {\n ...participant,\n displayName: participant.identifier.phoneNumber\n };\n } else {\n return participant;\n }\n});\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for Teams call\n */\nexport const isTeamsCallParticipants = (participants: CommunicationIdentifier[]): participants is (PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[] => {\n return participants.every(p => !isCommunicationUserIdentifier(p));\n};\n\n/**\n * @private\n * A type guard to ensure all participants are acceptable type for ACS call\n */\nexport const isACSCallParticipants = (participants: CommunicationIdentifier[]): participants is (PhoneNumberIdentifier | CommunicationUserIdentifier | UnknownIdentifier)[] => {\n return participants.every(p => !isMicrosoftTeamsUserIdentifier(p));\n};\n\n/**\n * @private\n * Checks whether the user is a 'Ringing' PSTN user.\n */\nexport const _isRingingPSTNParticipant = (participant: RemoteParticipantState): ParticipantConnectionState => {\n return isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting' ? 'Ringing' : participant.state;\n};\"../../../calling-stateful-client/src\"\"../../../acs-ui-common/src\""]}
@@ -5,10 +5,6 @@ import { RaisedHandState } from "../../../calling-stateful-client/src";
5
5
  * @private
6
6
  */
7
7
  export declare const memoizedConvertAllremoteParticipants: (callback: import("../../../acs-ui-common/src").CallbackType<string, [displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean], CallParticipantListParticipant>) => CallParticipantListParticipant[];
8
- /**
9
- * @private
10
- */
11
- export declare const memoizedConvertAllremoteParticipantsBetaRelease: (callback: import("../../../acs-ui-common/src").CallbackType<string, [displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean], CallParticipantListParticipant>) => CallParticipantListParticipant[];
12
8
  /**
13
9
  * @private
14
10
  */
@@ -22,13 +22,6 @@ const convertRemoteParticipantToParticipantListParticipant = (userId, displayNam
22
22
  isRemovable: (getIdentifierKind(identifier).kind === 'communicationUser' || getIdentifierKind(identifier).kind === 'phoneNumber') && localUserCanRemoveOthers
23
23
  };
24
24
  };
25
- /* @conditional-compile-remove(rooms) */
26
- /**
27
- * @private
28
- */
29
- export const memoizedConvertAllremoteParticipantsBetaRelease = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {
30
- return convertRemoteParticipantToParticipantListParticipantBetaRelease(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers);
31
- });
32
25
  /* @conditional-compile-remove(raise-hand) */
33
26
  /**
34
27
  * @private
@@ -36,10 +29,6 @@ export const memoizedConvertAllremoteParticipantsBetaRelease = memoizeFnAll((use
36
29
  export const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
37
30
  return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers);
38
31
  });
39
- /* @conditional-compile-remove(rooms) */
40
- const convertRemoteParticipantToParticipantListParticipantBetaRelease = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers) => {
41
- return Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers));
42
- };
43
32
  /* @conditional-compile-remove(raise-hand) */
44
33
  const convertRemoteParticipantToParticipantListParticipantBeta = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
45
34
  return Object.assign(Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers)), { raisedHand });
@@ -1 +1 @@
1
- {"version":3,"file":"participantListSelectorUtils.js","sourceRoot":"","sources":["../../../../../preprocess-dist/calling-component-bindings/src/utils/participantListSelectorUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,YAAY,EAAE,mCAAgC;AAKxF;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,YAAY,CAAC,CAAC,MAAc,EAAE,WAA+B,EAAE,KAA6B,EAAE,OAAgB,EAAE,eAAwB,EAAE,UAAmB,EAAE,wBAAiC,EAAkC,EAAE;IACtR,OAAO,oDAAoD,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,w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AA+D,GAAG,CAAC,MAAc,EAAE,WAA+B,EAAE,KAA6B,EAAE,OAAgB,EAAE,eAAwB,EAAE,UAAmB,EAAE,wBAAiC,EAAkC,EAAE;IAC7R,yBACK,oDAAoD,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAwB,CAAC,EACnJ;AACJ,CAAC,CAAC;AAEF,6CAA6C;AAC7C,MAAM,wDAAwD,GAAG,CAAC,MAAc,EAAE,WAA+B,EAAE,KAA6B,EAAE,OAAgB,EAAE,eAAwB,EAAE,UAAmB,EAAE,UAAuC,EAAE,wBAAiC,EAAkC,EAAE;IAC/T,uCACK,oDAAoD,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAwB,CAAC,KACnJ,UAAU,IACV;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RemoteParticipantState } from '@azure/communication-calling';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier, memoizeFnAll } from '@internal/acs-ui-common';\nimport { CallParticipantListParticipant } from '@internal/react-components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipants = memoizeFnAll((userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers);\n});\nconst convertRemoteParticipantToParticipantListParticipant = (userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n const identifier = fromFlatCommunicationIdentifier(userId);\n return {\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n // ACS users can not remove Teams users.\n // Removing unknown types of users is undefined.\n isRemovable: (getIdentifierKind(identifier).kind === 'communicationUser' || getIdentifierKind(identifier).kind === 'phoneNumber') && localUserCanRemoveOthers\n };\n};\n\n/* @conditional-compile-remove(rooms) */\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipantsBetaRelease = memoizeFnAll((userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipantBetaRelease(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers);\n});\n\n/* @conditional-compile-remove(raise-hand) */\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers);\n});\n\n/* @conditional-compile-remove(rooms) */\nconst convertRemoteParticipantToParticipantListParticipantBetaRelease = (userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return {\n ...convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers)\n };\n};\n\n/* @conditional-compile-remove(raise-hand) */\nconst convertRemoteParticipantToParticipantListParticipantBeta = (userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return {\n ...convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers),\n raisedHand\n };\n};\"../../../acs-ui-common/src\"\"../../../react-components/src\"\"../../../calling-stateful-client/src\""]}
1
+ {"version":3,"file":"participantListSelectorUtils.js","sourceRoot":"","sources":["../../../../../preprocess-dist/calling-component-bindings/src/utils/participantListSelectorUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,YAAY,EAAE,mCAAgC;AAKxF;;GAEG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,YAAY,CAAC,CAAC,MAAc,EAAE,WAA+B,EAAE,KAA6B,EAAE,OAAgB,EAAE,eAAwB,EAAE,UAAmB,EAAE,wBAAiC,EAAkC,EAAE;IACtR,OAAO,oDAAoD,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAwB,CAAC,CAAC;AAC1J,CAAC,CAAC,CAAC;AACH,MAAM,oDAAoD,GAAG,CAAC,MAAc,EAAE,WAA+B,EAAE,KAA6B,EAAE,OAAgB,EAAE,eAAwB,EAAE,UAAmB,EAAE,wBAAiC,EAAkC,EAAE;IAClR,MAAM,UAAU,GAAG,+BAA+B,CAAC,MAAM,CAAC,CAAC;IAC3D,OAAO;QACL,MAAM;QACN,WAAW;QACX,KAAK;QACL,OAAO;QACP,eAAe;QACf,UAAU;QACV,wCAAwC;QACxC,gDAAgD;QAChD,WAAW,EAAE,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,IAAI,KAAK,mBAAmB,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,IAAI,wBAAwB;KAC9J,CAAC;AACJ,CAAC,CAAC;AACF,6CAA6C;AAC7C;;GAEG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,YAAY,CAAC,CAAC,MAAc,EAAE,WAA+B,EAAE,KAA6B,EAAE,OAAgB,EAAE,eAAwB,EAAE,UAAmB,EAAE,UAAuC,EAAE,wBAAiC,EAAkC,EAAE;IACnU,OAAO,wDAAwD,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,wBAAwB,CAAC,CAAC;AAC1K,CAAC,CAAC,CAAC;AACH,6CAA6C;AAC7C,MAAM,wDAAwD,GAAG,CAAC,MAAc,EAAE,WAA+B,EAAE,KAA6B,EAAE,OAAgB,EAAE,eAAwB,EAAE,UAAmB,EAAE,UAAuC,EAAE,wBAAiC,EAAkC,EAAE;IAC/T,uCACK,oDAAoD,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,wBAAwB,CAAC,KACnJ,UAAU,IACV;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RemoteParticipantState } from '@azure/communication-calling';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier, memoizeFnAll } from '@internal/acs-ui-common';\nimport { CallParticipantListParticipant } from '@internal/react-components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipants = memoizeFnAll((userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers);\n});\nconst convertRemoteParticipantToParticipantListParticipant = (userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n const identifier = fromFlatCommunicationIdentifier(userId);\n return {\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n // ACS users can not remove Teams users.\n // Removing unknown types of users is undefined.\n isRemovable: (getIdentifierKind(identifier).kind === 'communicationUser' || getIdentifierKind(identifier).kind === 'phoneNumber') && localUserCanRemoveOthers\n };\n};\n/* @conditional-compile-remove(raise-hand) */\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers);\n});\n/* @conditional-compile-remove(raise-hand) */\nconst convertRemoteParticipantToParticipantListParticipantBeta = (userId: string, displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean): CallParticipantListParticipant => {\n return {\n ...convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, localUserCanRemoveOthers),\n raisedHand\n };\n};\"../../../acs-ui-common/src\"\"../../../react-components/src\"\"../../../calling-stateful-client/src\""]}
@@ -10,7 +10,7 @@ export declare const convertRemoteParticipantToVideoGalleryRemoteParticipant: (u
10
10
  [key: number]: RemoteVideoStreamState;
11
11
  }, state: RemoteParticipantConnectionState, displayName?: string | undefined, raisedHand?: unknown) => VideoGalleryRemoteParticipant;
12
12
  /** @private */
13
- export declare const memoizeLocalParticipant: (this: any, identifier: any, displayName: any, isMuted: any, isScreenSharingOn: any, localVideoStream: any, role: any, raisedHand: any) => {
13
+ export declare const memoizeLocalParticipant: (this: any, identifier: any, displayName: any, isMuted: any, isScreenSharingOn: any, localVideoStream: any, raisedHand: any) => {
14
14
  userId: any;
15
15
  displayName: any;
16
16
  isMuted: any;
@@ -20,7 +20,6 @@ export declare const memoizeLocalParticipant: (this: any, identifier: any, displ
20
20
  isMirrored: any;
21
21
  renderElement: any;
22
22
  };
23
- role: any;
24
23
  raisedHand: any;
25
24
  };
26
25
  //# sourceMappingURL=videoGalleryUtils.d.ts.map
@@ -52,9 +52,6 @@ export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId,
52
52
  videoStream,
53
53
  screenShareStream,
54
54
  isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,
55
- /* @conditional-compile-remove(one-to-n-calling) */
56
- /* @conditional-compile-remove(PSTN-calls) */
57
- state,
58
55
  /* @conditional-compile-remove(raise-hand) */
59
56
  raisedHand: raisedHand
60
57
  };
@@ -64,8 +61,6 @@ const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
64
61
  return {
65
62
  id: stream.id,
66
63
  isAvailable: stream.isAvailable,
67
- /* @conditional-compile-remove(video-stream-is-receiving-flag) */
68
- isReceiving: stream.isReceiving,
69
64
  isMirrored: (_a = stream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
70
65
  renderElement: (_b = stream.view) === null || _b === void 0 ? void 0 : _b.target,
71
66
  /* @conditional-compile-remove(pinned-participants) */
@@ -75,7 +70,7 @@ const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
75
70
  };
76
71
  };
77
72
  /** @private */
78
- export const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(rooms) */ role, /* @conditional-compile-remove(raise-hand) */ raisedHand) => {
73
+ export const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(raise-hand) */ raisedHand) => {
79
74
  var _a, _b;
80
75
  return ({
81
76
  userId: identifier,
@@ -87,8 +82,6 @@ export const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMu
87
82
  isMirrored: (_a = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _a === void 0 ? void 0 : _a.isMirrored,
88
83
  renderElement: (_b = localVideoStream === null || localVideoStream === void 0 ? void 0 : localVideoStream.view) === null || _b === void 0 ? void 0 : _b.target
89
84
  },
90
- /* @conditional-compile-remove(rooms) */
91
- role,
92
85
  /* @conditional-compile-remove(raise-hand) */
93
86
  raisedHand: raisedHand
94
87
  });
@@ -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;AAGlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAItE,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;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,kBAAwD,EAAmC,EAAE;IAC/I,IAAI,CAAC,kBAAkB,EAAE;QACvB,OAAO,EAAE,CAAC;KACX;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,OA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AI,0CAAE,MAAM;QAClC,sDAAsD;QACtD,WAAW,EAAE,MAAA,MAAM,CAAC,IAAI,0CAAE,WAAW;QACrC,sDAAsD;QACtD,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,wCAAwC,CAAA,IAAI,EAAE,6CAA6C,CAAA,UAAU,EAAE,EAAE;;IAAC,OAAA,CAAC;QACnO,MAAM,EAAE,UAAU;QAClB,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE;QAC9B,OAAO,EAAE,OAAO;QAChB,iBAAiB,EAAE,iBAAiB;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,wCAAwC;QACxC,IAAI;QACJ,6CAA6C;QAC7C,UAAU,EAAE,UAAU;KACvB,CAAC,CAAA;CAAA,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DominantSpeakersInfo, RemoteParticipantState as RemoteParticipantConnectionState } 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 { _isRingingPSTNParticipant } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo = (remoteParticipants: RemoteParticipantState[] | undefined): 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 = _isRingingPSTNParticipant(participant);\n return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, participant.displayName, /* @conditional-compile-remove(raise-hand) */\n participant.raisedHand);\n });\n });\n};\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll((userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: RemoteParticipantConnectionState, displayName?: string, raisedHand?: unknown): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, ( /* @conditional-compile-remove(raise-hand) */\n raisedHand as RaisedHandState));\n});\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: RemoteParticipantConnectionState, displayName?: string, raisedHand?: unknown): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n const sdkRemoteVideoStream = Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'Video' && i.isAvailable) || Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'Video');\n const sdkScreenShareStream = Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) || Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'ScreenSharing');\n if (sdkRemoteVideoStream) {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);\n }\n if (sdkScreenShareStream) {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);\n }\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n state,\n /* @conditional-compile-remove(raise-hand) */\n raisedHand: (raisedHand as RaisedHandState)\n };\n};\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\n isReceiving: stream.isReceiving,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target,\n /* @conditional-compile-remove(pinned-participants) */\n scalingMode: stream.view?.scalingMode,\n /* @conditional-compile-remove(pinned-participants) */\n streamSize: stream.streamSize\n };\n};\n\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(rooms) */role, /* @conditional-compile-remove(raise-hand) */raisedHand) => ({\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 /* @conditional-compile-remove(rooms) */\n role,\n /* @conditional-compile-remove(raise-hand) */\n raisedHand: raisedHand\n}));\"../../../acs-ui-common/src\"\"../../../calling-stateful-client/src\"\"../../../react-components/src\""]}
1
+ {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../preprocess-dist/calling-component-bindings/src/utils/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAItE,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;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,kBAAwD,EAAmC,EAAE;IAC/I,IAAI,CAAC,kBAAkB,EAAE;QACvB,OAAO,EAAE,CAAC;KACX;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,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,uBAAuB,CAAC,WAAW,CAAC,UA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,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,6CAA6C,CAAA,UAAU,EAAE,EAAE;;IAAC,OAAA,CAAC;QACrL,MAAM,EAAE,UAAU;QAClB,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE;QAC9B,OAAO,EAAE,OAAO;QAChB,iBAAiB,EAAE,iBAAiB;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,6CAA6C;QAC7C,UAAU,EAAE,UAAU;KACvB,CAAC,CAAA;CAAA,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DominantSpeakersInfo, RemoteParticipantState as RemoteParticipantConnectionState } 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 { _isRingingPSTNParticipant } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo = (remoteParticipants: RemoteParticipantState[] | undefined): 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 = _isRingingPSTNParticipant(participant);\n return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, participant.displayName, /* @conditional-compile-remove(raise-hand) */\n participant.raisedHand);\n });\n });\n};\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll((userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: RemoteParticipantConnectionState, displayName?: string, raisedHand?: unknown): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, ( /* @conditional-compile-remove(raise-hand) */\n raisedHand as RaisedHandState));\n});\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {\n [key: number]: RemoteVideoStreamState;\n}, state: RemoteParticipantConnectionState, displayName?: string, raisedHand?: unknown): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n const sdkRemoteVideoStream = Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'Video' && i.isAvailable) || Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'Video');\n const sdkScreenShareStream = Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) || Object.values(rawVideoStreamsArray).find(i => i.mediaStreamType === 'ScreenSharing');\n if (sdkRemoteVideoStream) {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);\n }\n if (sdkScreenShareStream) {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);\n }\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n /* @conditional-compile-remove(raise-hand) */\n raisedHand: (raisedHand as RaisedHandState)\n };\n};\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target,\n /* @conditional-compile-remove(pinned-participants) */\n scalingMode: stream.view?.scalingMode,\n /* @conditional-compile-remove(pinned-participants) */\n streamSize: stream.streamSize\n };\n};\n\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(raise-hand) */raisedHand) => ({\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 /* @conditional-compile-remove(raise-hand) */\n raisedHand: raisedHand\n}));\"../../../acs-ui-common/src\"\"../../../calling-stateful-client/src\"\"../../../react-components/src\""]}
@@ -3,11 +3,8 @@
3
3
  import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
4
4
  import { createSelector } from 'reselect';
5
5
  import { getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRemoteParticipants, getScreenShareRemoteParticipant } from './baseSelectors';
6
- /* @conditional-compile-remove(rooms) */
7
- import { getRole } from './baseSelectors';
8
6
  /* @conditional-compile-remove(optimal-video-count) */
9
7
  import { getOptimalVideoCount } from './baseSelectors';
10
- import { _updateUserDisplayNames } from './utils/callUtils';
11
8
  import { checkIsSpeaking } from './utils/SelectorUtils';
12
9
  import { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant } from './utils/videoGalleryUtils';
13
10
  /* @conditional-compile-remove(raise-hand) */
@@ -18,8 +15,7 @@ import { getLocalParticipantRaisedHand } from './baseSelectors';
18
15
  */
19
16
  export const videoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipants, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers,
20
17
  getOptimalVideoCount,
21
- getRole,
22
- getLocalParticipantRaisedHand], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, /* @conditional-compile-remove(optimal-video-count) */ optimalVideoCount, /* @conditional-compile-remove(rooms) */ role, /* @conditional-compile-remove(raise-hand) */ raisedHand) => {
18
+ getLocalParticipantRaisedHand], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, /* @conditional-compile-remove(optimal-video-count) */ optimalVideoCount, /* @conditional-compile-remove(raise-hand) */ raisedHand) => {
23
19
  const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants ? remoteParticipants[screenShareRemoteParticipantId] : undefined;
24
20
  const localVideoStream = localVideoStreams === null || localVideoStreams === void 0 ? void 0 : localVideoStreams.find(i => i.mediaStreamType === 'Video');
25
21
  const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);
@@ -28,7 +24,7 @@ export const videoGallerySelector = createSelector([getScreenShareRemoteParticip
28
24
  const noRemoteParticipants = [];
29
25
  return {
30
26
  screenShareParticipant: screenShareRemoteParticipant ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, /* @conditional-compile-remove(raise-hand) */ screenShareRemoteParticipant.raisedHand) : undefined,
31
- localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(rooms) */ role, /* @conditional-compile-remove(raise-hand) */ raisedHand),
27
+ localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(raise-hand) */ raisedHand),
32
28
  remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)),
33
29
  dominantSpeakers: dominantSpeakerIds,
34
30
  /* @conditional-compile-remove(optimal-video-count) */
@@ -36,8 +32,6 @@ export const videoGallerySelector = createSelector([getScreenShareRemoteParticip
36
32
  };
37
33
  });
38
34
  const updateUserDisplayNamesTrampoline = (remoteParticipants) => {
39
- /* @conditional-compile-remove(PSTN-calls) */
40
- return _updateUserDisplayNames(remoteParticipants);
41
35
  return remoteParticipants;
42
36
  };
43
37
  //# sourceMappingURL=videoGallerySelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAA4B,cAAc,EAAE,mBAAmB,EAAE,aAAa,EAAE,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AAC/N,wCAAwC;AACxC,OAAO,E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BAAkB,CAAE,OAAO,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;IAClF,MAAM,oBAAoB,GAAG,EAAE,CAAC;IAChC,OAAO;QACL,sBAAsB,EAAE,4BAA4B,CAAC,CAAC,CAAC,uDAAuD,CAAC,6BAA6B,CAAC,4BAA4B,CAAC,UAAU,CAAC,EAAE,4BAA4B,CAAC,OAAO,EAAE,eAAe,CAAC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC,YAAY,EAAE,4BAA4B,CAAC,KAAK,EAAE,4BAA4B,CAAC,WAAW,EAAE,6CAA6C,CAClb,4BAA4B,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;QACpD,gBAAgB,EAAE,uBAAuB,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,wCAAwC,CACzJ,IAAI,EAAE,6CAA6C,CACnD,UAAU,CAAC;QACX,kBAAkB,EAAE,mCAAmC,CAAC,gCAAgC,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;QACxK,gBAAgB,EAAE,kBAAkB;QACpC,sDAAsD;QACtD,qBAAqB,EAAE,iBAAiB;KACzC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallingBaseSelectorProps, getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRemoteParticipants, getScreenShareRemoteParticipant } from './baseSelectors';\n/* @conditional-compile-remove(rooms) */\nimport { getRole } from './baseSelectors';\n/* @conditional-compile-remove(optimal-video-count) */\nimport { getOptimalVideoCount } from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant } from './utils/videoGalleryUtils';\n/* @conditional-compile-remove(raise-hand) */\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n screenShareParticipant: VideoGalleryRemoteParticipant | undefined;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n /* @conditional-compile-remove(optimal-video-count) */\n optimalVideoCount?: number;\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipants, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers, /* @conditional-compile-remove(optimal-video-count) */\ngetOptimalVideoCount, /* @conditional-compile-remove(rooms) */\ngetRole, /* @conditional-compile-remove(raise-hand) */\ngetLocalParticipantRaisedHand], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName: string | undefined, identifier: string, dominantSpeakers, /* @conditional-compile-remove(optimal-video-count) */\noptimalVideoCount, /* @conditional-compile-remove(rooms) */\nrole, /* @conditional-compile-remove(raise-hand) */\nraisedHand) => {\n const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants ? remoteParticipants[screenShareRemoteParticipantId] : undefined;\n const localVideoStream = localVideoStreams?.find(i => i.mediaStreamType === 'Video');\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => dominantSpeakersMap[speaker] = idx);\n const noRemoteParticipants = [];\n return {\n screenShareParticipant: screenShareRemoteParticipant ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, /* @conditional-compile-remove(raise-hand) */\n screenShareRemoteParticipant.raisedHand) : undefined,\n localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(rooms) */\n role, /* @conditional-compile-remove(raise-hand) */\n raisedHand),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)),\n dominantSpeakers: dominantSpeakerIds,\n /* @conditional-compile-remove(optimal-video-count) */\n maxRemoteVideoStreams: optimalVideoCount\n };\n});\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\n};\"../../acs-ui-common/src\"\"../../calling-stateful-client/src\"\"../../react-components/src\""]}
1
+ {"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAg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AAM,mBAAmB,GAA2B,EAAE,CAAC;IACvD,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;IAClF,MAAM,oBAAoB,GAAG,EAAE,CAAC;IAChC,OAAO;QACL,sBAAsB,EAAE,4BAA4B,CAAC,CAAC,CAAC,uDAAuD,CAAC,6BAA6B,CAAC,4BAA4B,CAAC,UAAU,CAAC,EAAE,4BAA4B,CAAC,OAAO,EAAE,eAAe,CAAC,4BAA4B,CAAC,EAAE,4BAA4B,CAAC,YAAY,EAAE,4BAA4B,CAAC,KAAK,EAAE,4BAA4B,CAAC,WAAW,EAAE,6CAA6C,CAClb,4BAA4B,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;QACpD,gBAAgB,EAAE,uBAAuB,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,6CAA6C,CAC9J,UAAU,CAAC;QACX,kBAAkB,EAAE,mCAAmC,CAAC,gCAAgC,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;QACxK,gBAAgB,EAAE,kBAAkB;QACpC,sDAAsD;QACtD,qBAAqB,EAAE,iBAAiB;KACzC,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport { CallingBaseSelectorProps, getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRemoteParticipants, getScreenShareRemoteParticipant } from './baseSelectors';\n/* @conditional-compile-remove(optimal-video-count) */\nimport { getOptimalVideoCount } from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant } from './utils/videoGalleryUtils';\n/* @conditional-compile-remove(raise-hand) */\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (state: CallClientState, props: CallingBaseSelectorProps) => {\n screenShareParticipant: VideoGalleryRemoteParticipant | undefined;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n /* @conditional-compile-remove(optimal-video-count) */\n optimalVideoCount?: number;\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector([getScreenShareRemoteParticipant, getRemoteParticipants, getLocalVideoStreams, getIsMuted, getIsScreenSharingOn, getDisplayName, getIdentifier, getDominantSpeakers, /* @conditional-compile-remove(optimal-video-count) */\ngetOptimalVideoCount, /* @conditional-compile-remove(raise-hand) */\ngetLocalParticipantRaisedHand], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName: string | undefined, identifier: string, dominantSpeakers, /* @conditional-compile-remove(optimal-video-count) */\noptimalVideoCount, /* @conditional-compile-remove(raise-hand) */\nraisedHand) => {\n const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants ? remoteParticipants[screenShareRemoteParticipantId] : undefined;\n const localVideoStream = localVideoStreams?.find(i => i.mediaStreamType === 'Video');\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => dominantSpeakersMap[speaker] = idx);\n const noRemoteParticipants = [];\n return {\n screenShareParticipant: screenShareRemoteParticipant ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, /* @conditional-compile-remove(raise-hand) */\n screenShareRemoteParticipant.raisedHand) : undefined,\n localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, /* @conditional-compile-remove(raise-hand) */\n raisedHand),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants)),\n dominantSpeakers: dominantSpeakerIds,\n /* @conditional-compile-remove(optimal-video-count) */\n maxRemoteVideoStreams: optimalVideoCount\n };\n});\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n return remoteParticipants;\n};\"../../acs-ui-common/src\"\"../../calling-stateful-client/src\"\"../../react-components/src\""]}
@@ -1,26 +1,25 @@
1
1
  import { Call, CallAgent, IncomingCall } from '@azure/communication-calling';
2
- import { TeamsCall as TeamsCallBeta, CallCommon as CallCommonBeta, CallAgentCommon as CallAgentCommonBeta, TeamsCallAgent as TeamsCallAgentBeta, IncomingCallCommon as IncomingCallCommonBeta } from '@azure/communication-calling';
3
2
  /**
4
3
  * @public
5
4
  * The common interface for all types of Calls
6
5
  */
7
- export declare type CallCommon = Call | /* @conditional-compile-remove(teams-identity-support) */ CallCommonBeta;
6
+ export declare type CallCommon = Call;
8
7
  /**
9
8
  * @public
10
9
  * The common interface for all types of CallAgents
11
10
  */
12
- export declare type CallAgentCommon = CallAgent | /* @conditional-compile-remove(teams-identity-support) */ CallAgentCommonBeta;
11
+ export declare type CallAgentCommon = CallAgent;
13
12
  /**
14
13
  * @beta
15
14
  */
16
- export declare type TeamsCall = never | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallBeta;
15
+ export declare type TeamsCall = never;
17
16
  /**
18
17
  * @beta
19
18
  */
20
- export declare type TeamsCallAgent = never | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgentBeta;
19
+ export declare type TeamsCallAgent = never;
21
20
  /**
22
21
  * @public
23
22
  * The common interface for all types of IncomingCalls
24
23
  */
25
- export declare type IncomingCallCommon = IncomingCall | /* @conditional-compile-remove(teams-identity-support) */ IncomingCallCommonBeta;
24
+ export declare type IncomingCallCommon = IncomingCall;
26
25
  //# sourceMappingURL=BetaToStableTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BetaToStableTypes.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/BetaToStableTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// This is for mapping new types from beta, which does not exist in stable sdk.\n// These mappings are necessary to bypass type check of conditional compilation\n// Remove these types when the feature get stabilized in stable sdk\n\n// For example, CallCommon doesn't exist in stable call sdk, so it will be still Call type\n// So we remove CallCommonBeta type in stable\n// In beta, Call | CallCommon = CallCommon because Call is just a super set of CallCommon\n\nimport { Call, CallAgent, IncomingCall } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall as TeamsCallBeta, CallCommon as CallCommonBeta, CallAgentCommon as CallAgentCommonBeta, TeamsCallAgent as TeamsCallAgentBeta, IncomingCallCommon as IncomingCallCommonBeta } from '@azure/communication-calling';\n\n/**\n * @public\n * The common interface for all types of Calls\n */\nexport type CallCommon = Call | /* @conditional-compile-remove(teams-identity-support) */CallCommonBeta;\n\n/**\n * @public\n * The common interface for all types of CallAgents\n */\nexport type CallAgentCommon = CallAgent | /* @conditional-compile-remove(teams-identity-support) */CallAgentCommonBeta;\n\n/**\n * @beta\n */\nexport type TeamsCall = never | /* @conditional-compile-remove(teams-identity-support) */TeamsCallBeta;\n\n/**\n * @beta\n */\nexport type TeamsCallAgent = never | /* @conditional-compile-remove(teams-identity-support) */TeamsCallAgentBeta;\n\n/**\n * @public\n * The common interface for all types of IncomingCalls\n */\nexport type IncomingCallCommon = IncomingCall | /* @conditional-compile-remove(teams-identity-support) */IncomingCallCommonBeta;"]}
1
+ {"version":3,"file":"BetaToStableTypes.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/BetaToStableTypes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// This is for mapping new types from beta, which does not exist in stable sdk.\n// These mappings are necessary to bypass type check of conditional compilation\n// Remove these types when the feature get stabilized in stable sdk\n\n// For example, CallCommon doesn't exist in stable call sdk, so it will be still Call type\n// So we remove CallCommonBeta type in stable\n// In beta, Call | CallCommon = CallCommon because Call is just a super set of CallCommon\n\nimport { Call, CallAgent, IncomingCall } from '@azure/communication-calling';\n/**\n * @public\n * The common interface for all types of Calls\n */\nexport type CallCommon = Call;\n\n/**\n * @public\n * The common interface for all types of CallAgents\n */\nexport type CallAgentCommon = CallAgent;\n\n/**\n * @beta\n */\nexport type TeamsCall = never;\n\n/**\n * @beta\n */\nexport type TeamsCallAgent = never;\n\n/**\n * @public\n * The common interface for all types of IncomingCalls\n */\nexport type IncomingCallCommon = IncomingCall;"]}
@@ -1,25 +1,11 @@
1
1
  import { CallAgent } from '@azure/communication-calling';
2
2
  import { CallContext } from './CallContext';
3
- import { DeclarativeIncomingCall } from './IncomingCallDeclarative';
4
3
  import { InternalCallContext } from './InternalCallContext';
5
- /**
6
- * @beta
7
- * This contains a readonly array that returns all the active `incomingCalls`.
8
- * An active incoming call is a call that has not been answered, declined or disconnected.
9
- */
10
- export declare type IncomingCallManagement = {
11
- /**
12
- * @beta
13
- * @Remark This attribute doesn't exist on the {@link @azure/communication-calling#CallAgent} interface.
14
- * @returns readonly array of {@link DeclarativeIncomingCall}
15
- */
16
- incomingCalls: ReadonlyArray<DeclarativeIncomingCall>;
17
- };
18
4
  /**
19
5
  * @beta
20
6
  * `DeclarativeCallAgent` extends and proxies the {@link @azure/communication-calling#CallAgent}
21
7
  */
22
- export declare type DeclarativeCallAgent = CallAgent & /* @conditional-compile-remove(one-to-n-calling) */ IncomingCallManagement;
8
+ export declare type DeclarativeCallAgent = CallAgent;
23
9
  /**
24
10
  * Creates a declarative CallAgent by proxying CallAgent with ProxyCallAgent which will track state updates by updating
25
11
  * the given context.
@@ -1 +1 @@
1
- {"version":3,"file":"CallAgentDeclarative.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/CallAgentDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAyB,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAElH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAwB3D;;;;GAIG;AACH,MAAM,cAAe,SAAQ,oBAAoB;IAE/C,YAAY,SAAoB,EAAE,OAAoB,EAAE,eAAoC;QAC1F,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAI1B,cAAS,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YACtD,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAEtD,kHAAkH;YAClH,0EAA0E;YAC1E,KAAK,MAAM,IA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D,MAAM,KAAK,CAAC,6FAA6F,CAAC,CAAC;IAC7G,CAAC;IACS,gBAAgB,CAAC,KAAsB,EAAE,IAAkC;QACnF,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;SAC3B;QACD,MAAM,KAAK,CAAC,+FAA+F,CAAC,CAAC;IAC/G,CAAC;IACM,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,SAAoB,EAAE,OAAoB,EAAE,eAAoC,EAAwB,EAAE;IAC7I,qBAAqB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAChD,OAAQ,IAAI,KAAK,CAAC,SAAS,EAAE,IAAI,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,eAAe,CAAC,CAA0B,CAAC;AACjH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\nimport { clearCallRelatedState, DeclarativeCallCommon, ProxyCallAgentCommon } from './CallAgentDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { callDeclaratify } from './CallDeclarative';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { DeclarativeIncomingCall } from './IncomingCallDeclarative';\nimport { InternalCallContext } from './InternalCallContext';\nimport { _isACSCall, _isACSCallAgent } from './TypeGuards';\nimport { CallAgentCommon, CallCommon } from './BetaToStableTypes';\n\n/* @conditional-compile-remove(one-to-n-calling) */\n/**\n * @beta\n * This contains a readonly array that returns all the active `incomingCalls`.\n * An active incoming call is a call that has not been answered, declined or disconnected.\n */\nexport type IncomingCallManagement = {\n /**\n * @beta\n * @Remark This attribute doesn't exist on the {@link @azure/communication-calling#CallAgent} interface.\n * @returns readonly array of {@link DeclarativeIncomingCall}\n */\n incomingCalls: ReadonlyArray<DeclarativeIncomingCall>;\n};\n\n/**\n * @beta\n * `DeclarativeCallAgent` extends and proxies the {@link @azure/communication-calling#CallAgent}\n */\nexport type DeclarativeCallAgent = CallAgent & /* @conditional-compile-remove(one-to-n-calling) */IncomingCallManagement;\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 */\nclass ProxyCallAgent extends ProxyCallAgentCommon implements ProxyHandler<DeclarativeCallAgent> {\n private _callAgent: CallAgent;\n constructor(callAgent: CallAgent, context: CallContext, internalContext: InternalCallContext) {\n super(context, internalContext);\n this._callAgent = callAgent;\n this.subscribe();\n }\n private subscribe = (): void => {\n this._callAgent.on('callsUpdated', this.callsUpdated);\n this._callAgent.on('incomingCall', this.incomingCall);\n\n // There could be scenario that when ProxyCallAgent is created that the given CallAgent already has Calls. In this\n // case we need to make sure to subscribe to those already existing Calls.\n for (const call of this._callAgent.calls) {\n this.addCall(call);\n }\n };\n protected unsubscribe = (): void => {\n this._callAgent.off('callsUpdated', this.callsUpdated);\n this._callAgent.off('incomingCall', this.incomingCall);\n this.unregisterSubscriber();\n };\n protected callDeclaratify(call: CallCommon, context: CallContext): DeclarativeCallCommon {\n if (_isACSCall(call)) {\n return callDeclaratify(call, context);\n }\n throw new Error('Not reachable code, DeclarativeCallAgent.callDeclaratify must be called with an ACS call.');\n }\n protected startCall(agent: CallAgentCommon, args: Parameters<CallAgent['startCall']>): CallCommon {\n if (_isACSCallAgent(agent)) {\n return agent.startCall(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.startCall must be called with an ACS callAgent.');\n }\n protected joinCall(agent: CallAgentCommon, args: Parameters<CallAgent['join']>): CallCommon {\n if (_isACSCallAgent(agent)) {\n return agent.join(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.joinCall must be called with an ACS callAgent.');\n }\n protected agentSubscribe(agent: CallAgentCommon, args: Parameters<CallAgent['on']>): void {\n if (_isACSCallAgent(agent)) {\n return agent.on(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.agentSubscribe must be called with an ACS callAgent.');\n }\n protected agentUnsubscribe(agent: CallAgentCommon, args: Parameters<CallAgent['off']>): void {\n if (_isACSCallAgent(agent)) {\n return agent.off(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.agentUnsubscribe must be called with an ACS callAgent.');\n }\n public get<P extends keyof CallAgent>(target: CallAgent, prop: P): any {\n return super.getCommon(target, prop);\n }\n}\n\n/**\n * Creates a declarative CallAgent by proxying CallAgent with ProxyCallAgent which will track state updates by updating\n * the given context.\n *\n * @param callAgent - CallAgent from SDK\n * @param context - CallContext from StatefulCallClient\n * @param internalContext- InternalCallContext from StatefulCallClient\n */\nexport const callAgentDeclaratify = (callAgent: CallAgent, context: CallContext, internalContext: InternalCallContext): DeclarativeCallAgent => {\n clearCallRelatedState(context, internalContext);\n return (new Proxy(callAgent, new ProxyCallAgent(callAgent, context, internalContext)) as DeclarativeCallAgent);\n};"]}
1
+ {"version":3,"file":"CallAgentDeclarative.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/CallAgentDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,qBAAqB,EAAyB,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAElH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQ3D;;;;GAIG;AACH,MAAM,cAAe,SAAQ,oBAAoB;IAE/C,YAAY,SAAoB,EAAE,OAAoB,EAAE,eAAoC;QAC1F,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QAI1B,cAAS,GAAG,GAAS,EAAE;YAC7B,IAAI,CAAC,UAAU,C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KAAK,CAAC,uFAAuF,CAAC,CAAC;IACvG,CAAC;IACS,cAAc,CAAC,KAAsB,EAAE,IAAiC;QAChF,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;SAC1B;QACD,MAAM,KAAK,CAAC,6FAA6F,CAAC,CAAC;IAC7G,CAAC;IACS,gBAAgB,CAAC,KAAsB,EAAE,IAAkC;QACnF,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;SAC3B;QACD,MAAM,KAAK,CAAC,+FAA+F,CAAC,CAAC;IAC/G,CAAC;IACM,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,OAAO,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,CAAC;CACF;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,SAAoB,EAAE,OAAoB,EAAE,eAAoC,EAAwB,EAAE;IAC7I,qBAAqB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAChD,OAAQ,IAAI,KAAK,CAAC,SAAS,EAAE,IAAI,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,eAAe,CAAC,CAA0B,CAAC;AACjH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\nimport { clearCallRelatedState, DeclarativeCallCommon, ProxyCallAgentCommon } from './CallAgentDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { callDeclaratify } from './CallDeclarative';\nimport { InternalCallContext } from './InternalCallContext';\nimport { _isACSCall, _isACSCallAgent } from './TypeGuards';\nimport { CallAgentCommon, CallCommon } from './BetaToStableTypes';\n/**\n * @beta\n * `DeclarativeCallAgent` extends and proxies the {@link @azure/communication-calling#CallAgent}\n */\nexport type DeclarativeCallAgent = CallAgent;\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 */\nclass ProxyCallAgent extends ProxyCallAgentCommon implements ProxyHandler<DeclarativeCallAgent> {\n private _callAgent: CallAgent;\n constructor(callAgent: CallAgent, context: CallContext, internalContext: InternalCallContext) {\n super(context, internalContext);\n this._callAgent = callAgent;\n this.subscribe();\n }\n private subscribe = (): void => {\n this._callAgent.on('callsUpdated', this.callsUpdated);\n this._callAgent.on('incomingCall', this.incomingCall);\n\n // There could be scenario that when ProxyCallAgent is created that the given CallAgent already has Calls. In this\n // case we need to make sure to subscribe to those already existing Calls.\n for (const call of this._callAgent.calls) {\n this.addCall(call);\n }\n };\n protected unsubscribe = (): void => {\n this._callAgent.off('callsUpdated', this.callsUpdated);\n this._callAgent.off('incomingCall', this.incomingCall);\n this.unregisterSubscriber();\n };\n protected callDeclaratify(call: CallCommon, context: CallContext): DeclarativeCallCommon {\n if (_isACSCall(call)) {\n return callDeclaratify(call, context);\n }\n throw new Error('Not reachable code, DeclarativeCallAgent.callDeclaratify must be called with an ACS call.');\n }\n protected startCall(agent: CallAgentCommon, args: Parameters<CallAgent['startCall']>): CallCommon {\n if (_isACSCallAgent(agent)) {\n return agent.startCall(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.startCall must be called with an ACS callAgent.');\n }\n protected joinCall(agent: CallAgentCommon, args: Parameters<CallAgent['join']>): CallCommon {\n if (_isACSCallAgent(agent)) {\n return agent.join(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.joinCall must be called with an ACS callAgent.');\n }\n protected agentSubscribe(agent: CallAgentCommon, args: Parameters<CallAgent['on']>): void {\n if (_isACSCallAgent(agent)) {\n return agent.on(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.agentSubscribe must be called with an ACS callAgent.');\n }\n protected agentUnsubscribe(agent: CallAgentCommon, args: Parameters<CallAgent['off']>): void {\n if (_isACSCallAgent(agent)) {\n return agent.off(...args);\n }\n throw Error('Unreachable code, DeclarativeCallAgent.agentUnsubscribe must be called with an ACS callAgent.');\n }\n public get<P extends keyof CallAgent>(target: CallAgent, prop: P): any {\n return super.getCommon(target, prop);\n }\n}\n\n/**\n * Creates a declarative CallAgent by proxying CallAgent with ProxyCallAgent which will track state updates by updating\n * the given context.\n *\n * @param callAgent - CallAgent from SDK\n * @param context - CallContext from StatefulCallClient\n * @param internalContext- InternalCallContext from StatefulCallClient\n */\nexport const callAgentDeclaratify = (callAgent: CallAgent, context: CallContext, internalContext: InternalCallContext): DeclarativeCallAgent => {\n clearCallRelatedState(context, internalContext);\n return (new Proxy(callAgent, new ProxyCallAgent(callAgent, context, internalContext)) as DeclarativeCallAgent);\n};"]}
@@ -1,6 +1,5 @@
1
1
  import { CallAgent } from '@azure/communication-calling';
2
2
  import { IncomingCallCommon, CallAgentCommon, CallCommon } from './BetaToStableTypes';
3
- import { TeamsCallAgent } from '@azure/communication-calling';
4
3
  import { CallContext } from './CallContext';
5
4
  import { InternalCallContext } from './InternalCallContext';
6
5
  /**
@@ -44,7 +43,7 @@ export declare abstract class ProxyCallAgentCommon {
44
43
  protected abstract joinCall(agent: CallAgentCommon, args: unknown[]): CallCommon;
45
44
  protected abstract agentSubscribe(agent: CallAgentCommon, args: unknown[]): void;
46
45
  protected abstract agentUnsubscribe(agent: CallAgentCommon, args: unknown[]): void;
47
- protected getCommon<AgentType extends CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent, P extends keyof CallAgent>(target: AgentType, prop: P): any;
46
+ protected getCommon<AgentType extends CallAgent, P extends keyof CallAgent>(target: AgentType, prop: P): any;
48
47
  }
49
48
  /**
50
49
  * @private
@@ -169,11 +169,6 @@ export class ProxyCallAgentCommon {
169
169
  }
170
170
  case 'dispose':
171
171
  {
172
- /* @conditional-compile-remove(calling-beta-sdk) */
173
- return () => {
174
- target.dispose();
175
- this.unsubscribe();
176
- };
177
172
  // Wrapping CallAgent.dispose in a callback type (): Promise<void> to accomodate the change of CallAgent.dispose
178
173
  // in calling beta version 1.8.0-beta.1 from callback type (): Promise<void> to (): void
179
174
  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;;;;;;;;;;AASlC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,+BAA+B,EAAE,+CAA+C,EAAE,MAAM,aAAa,CAAC;AAC/G,OAAO,EAA2B,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAazE;;;;GAIG;AACH,MAAM,OAAgB,oBAAoB;IAQxC,YAAY,OAAoB,EAAE,eAAoC;QAUtE,oHAAoH;QACpH,6BAA6B;QACnB,yBAAoB,GAAG,GAAS,EAAE;YAC1C,KAAK,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,EAAE;gBACjE,cAAc,CAAC,WAAW,EAAE,CAAC;aAC9B;YACD,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;YAC9B,KAAK,MAAM,CAAC,CAAC,EAAE,sBAAsB,CAAC,IAAI,IAAI,CAAC,wBAAwB,CAAC,OAAO,EAAE,EAAE;gBACjF,sBAAsB,CAAC,WAAW,EAAE,CAAC;aACtC;YACD,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAAC,KAAK,EAAE,C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,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAC,CAAC;iBAC5D;YACH;gBACE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;SACpC;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 } from '@azure/communication-calling';\nimport { IncomingCallCommon, CallAgentCommon, CallCommon } from './BetaToStableTypes';\n\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { CallContext } from './CallContext';\nimport { DeclarativeCall } from './CallDeclarative';\nimport { CallSubscriber } from './CallSubscriber';\nimport { convertSdkCallToDeclarativeCall, convertSdkIncomingCallToDeclarativeIncomingCall } from './Converter';\nimport { DeclarativeIncomingCall, incomingCallDeclaratify } from './IncomingCallDeclarative';\nimport { IncomingCallSubscriber } from './IncomingCallSubscriber';\nimport { InternalCallContext } from './InternalCallContext';\nimport { disposeAllViews, disposeAllViewsFromCall } from './StreamUtils';\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 _declarativeIncomingCalls: Map<string, DeclarativeIncomingCall>;\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._declarativeIncomingCalls = new Map<string, DeclarativeIncomingCall>();\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._declarativeIncomingCalls.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._declarativeIncomingCalls.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 this._declarativeIncomingCalls.set(incomingCall.id, incomingCallDeclaratify(incomingCall, this._context));\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 | /* @conditional-compile-remove(teams-identity-support) */TeamsCallAgent, P extends keyof CallAgent>(target: AgentType, prop: P): 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 /* @conditional-compile-remove(calling-beta-sdk) */\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._declarativeIncomingCalls.values());\n }\n default:\n return Reflect.get(target, prop);\n }\n }\n}\n\n/**\n * @private\n */\nexport const clearCallRelatedState = (context: CallContext, internalContext: InternalCallContext): void => {\n // Make sure there are no existing call data if creating a new CallAgentDeclarative (if creating a new\n // CallAgentDeclarative after disposing of the hold one will mean context have old call state). TODO: should we stop\n // rendering when the previous callAgent is disposed?\n disposeAllViews(context, internalContext);\n context.clearCallRelatedState();\n internalContext.clearCallRelatedState();\n};"]}
1
+ {"version":3,"file":"CallAgentDeclarativeCommon.js","sourceRoot":"","sources":["../../../../preprocess-dist/calling-stateful-client/src/CallAgentDeclarativeCommon.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAMlC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC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I,cAAc,EAAE;4BAClB,MAAM,QAAQ,GAAK,IAAI,CAAC,CAAC,CAAoD,CAAC;4BAC9E,IAAI,CAAC,8BAA8B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;yBACtD;6BAAM;4BACL,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;yBACrC;oBACH,CAAC,CAAC;iBACH;YACH,KAAK,SAAS;gBACZ;oBACE,gHAAgH;oBAChH,wFAAwF;oBACxF,MAAM,oCAAoC,GAAG,GAAwB,EAAE;wBACrE,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;wBACvB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;oBAC3B,CAAC,CAAA,CAAC;oBACF,OAAO,GAAkB,EAAE;wBACzB,OAAO,oCAAoC,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;4BACtD,IAAI,CAAC,WAAW,EAAE,CAAC;wBACrB,CAAC,CAAC,CAAC;oBACL,CAAC,CAAC;iBACH;YACH;;;;;;;;eAQG;YACH,KAAK,eAAe;gBAClB;oBACE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,CAAC,CAAC;iBAC5D;YACH;gBACE,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;SACpC;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 } from '@azure/communication-calling';\nimport { IncomingCallCommon, CallAgentCommon, CallCommon } from './BetaToStableTypes';\nimport { CallContext } from './CallContext';\nimport { DeclarativeCall } from './CallDeclarative';\nimport { CallSubscriber } from './CallSubscriber';\nimport { convertSdkCallToDeclarativeCall, convertSdkIncomingCallToDeclarativeIncomingCall } from './Converter';\nimport { DeclarativeIncomingCall, incomingCallDeclaratify } from './IncomingCallDeclarative';\nimport { IncomingCallSubscriber } from './IncomingCallSubscriber';\nimport { InternalCallContext } from './InternalCallContext';\nimport { disposeAllViews, disposeAllViewsFromCall } from './StreamUtils';\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 _declarativeIncomingCalls: Map<string, DeclarativeIncomingCall>;\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._declarativeIncomingCalls = new Map<string, DeclarativeIncomingCall>();\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._declarativeIncomingCalls.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._declarativeIncomingCalls.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 this._declarativeIncomingCalls.set(incomingCall.id, incomingCallDeclaratify(incomingCall, this._context));\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, P extends keyof CallAgent>(target: AgentType, prop: P): 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._declarativeIncomingCalls.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};"]}