@azure/communication-react 1.3.3-alpha-202210290014.0 → 1.4.1-beta.1

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 (236) hide show
  1. package/{CHANGELOG.md → CHANGELOG.beta.md} +52 -211
  2. package/CHANGELOG.json +2307 -0
  3. package/CHANGELOG.stable.md +287 -0
  4. package/dist/communication-react.d.ts +307 -91
  5. package/dist/dist-cjs/communication-react/index.js +11193 -10508
  6. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetry.d.ts +10 -0
  8. package/dist/dist-esm/acs-ui-common/src/telemetry.js +10 -0
  9. package/dist/dist-esm/acs-ui-common/src/telemetry.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  13. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +5 -0
  14. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +51 -0
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +270 -0
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -0
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.d.ts +20 -0
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +36 -0
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -0
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +6 -51
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +22 -299
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +43 -0
  25. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +81 -0
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
  27. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.d.ts +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js +17 -5
  29. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +2 -2
  31. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js +3 -3
  33. package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +4 -0
  35. package/dist/dist-esm/calling-component-bindings/src/index.js +4 -0
  36. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  37. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +10 -3
  38. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +12 -2
  40. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +25 -1
  41. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +16 -2
  43. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +27 -1
  44. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  45. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +11 -0
  46. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +15 -1
  47. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  48. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +7 -1
  49. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
  50. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +26 -0
  52. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js +4 -0
  53. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -0
  54. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +9 -6
  55. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js +37 -182
  56. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  57. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +53 -0
  58. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +204 -0
  59. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -0
  60. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -1
  61. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  62. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js +4 -65
  63. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js.map +1 -1
  64. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.d.ts +13 -0
  65. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +88 -0
  66. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -0
  67. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -2
  68. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  69. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +4 -3
  70. package/dist/dist-esm/calling-stateful-client/src/Converter.js +4 -0
  71. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  72. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.d.ts +2 -1
  73. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.d.ts +3 -2
  75. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.js.map +1 -1
  76. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +16 -0
  77. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  78. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
  79. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +89 -0
  80. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
  81. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
  82. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +48 -0
  83. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
  84. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +19 -0
  85. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +35 -0
  86. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -0
  87. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +8 -0
  88. package/dist/dist-esm/calling-stateful-client/src/index-public.js +4 -0
  89. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -0
  90. package/dist/dist-esm/calling-stateful-client/src/index.d.ts +3 -7
  91. package/dist/dist-esm/calling-stateful-client/src/index.js +2 -1
  92. package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
  93. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js +5 -0
  94. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js.map +1 -1
  95. package/dist/dist-esm/communication-react/src/index.d.ts +6 -4
  96. package/dist/dist-esm/communication-react/src/index.js +4 -2
  97. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/{BrowserPermissionDenied.d.ts → DevicePermissions/BrowserPermissionDenied.d.ts} +4 -4
  99. package/dist/dist-esm/react-components/src/components/{BrowserPermissionDenied.js → DevicePermissions/BrowserPermissionDenied.js} +8 -6
  100. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
  101. package/dist/dist-esm/react-components/src/components/{BrowserPermissionDeniedIOS.d.ts → DevicePermissions/BrowserPermissionDeniedIOS.d.ts} +1 -1
  102. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +58 -0
  103. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
  104. package/dist/dist-esm/react-components/src/components/{DevicePermissionDropdown.d.ts → DevicePermissions/DevicePermissionDropdown.d.ts} +4 -0
  105. package/dist/dist-esm/react-components/src/components/{DevicePermissionDropdown.js → DevicePermissions/DevicePermissionDropdown.js} +3 -2
  106. package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js.map +1 -0
  107. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +101 -0
  108. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js +80 -0
  109. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +1 -0
  110. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.d.ts +86 -0
  111. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js +31 -0
  112. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +1 -0
  113. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -1
  114. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/MessageThread.js +7 -11
  116. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  117. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +3 -3
  118. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +4 -0
  120. package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -2
  121. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/index.d.ts +9 -8
  123. package/dist/dist-esm/react-components/src/components/index.js +4 -4
  124. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  125. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +0 -2
  126. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.d.ts +4 -0
  128. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js +10 -1
  129. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +1 -1
  131. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.d.ts +1 -5
  133. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +0 -11
  134. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +4 -0
  136. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +6 -0
  137. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
  139. package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
  140. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
  141. package/dist/dist-esm/react-components/src/components/utils.d.ts +4 -0
  142. package/dist/dist-esm/react-components/src/components/utils.js +6 -0
  143. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +21 -5
  145. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  146. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +56 -2
  147. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +2 -1
  148. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/theming/icons.d.ts +4 -1
  150. package/dist/dist-esm/react-components/src/theming/icons.js +30 -18
  151. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
  153. package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
  154. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
  155. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +3 -0
  156. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  157. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -5
  158. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +23 -17
  159. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  160. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  161. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +25 -3
  162. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +24 -11
  163. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  164. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +7 -0
  165. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  166. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
  167. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  168. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +14 -12
  169. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  170. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +4 -4
  171. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  172. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +2 -2
  173. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
  174. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +2 -0
  175. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js +4 -2
  176. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +1 -1
  177. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.d.ts +1 -0
  178. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js +4 -2
  179. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +1 -1
  180. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +2 -0
  181. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js +6 -4
  182. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +1 -1
  183. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +2 -0
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +11 -3
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +1 -0
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +76 -5
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +5 -0
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +6 -2
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +9 -4
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +8 -0
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +26 -0
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  198. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -3
  199. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +3 -3
  201. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  202. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -1
  203. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -2
  205. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
  206. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +3 -1
  208. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
  212. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js +10 -1
  214. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js.map +1 -1
  215. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +2 -2
  216. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  217. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  219. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  220. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +2 -2
  221. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -1
  222. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +1 -1
  225. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -1
  227. package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -2
  228. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  229. package/package.json +12 -12
  230. package/dist/dist-esm/react-components/src/components/BrowserPermissionDenied.js.map +0 -1
  231. package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js +0 -57
  232. package/dist/dist-esm/react-components/src/components/BrowserPermissionDeniedIOS.js.map +0 -1
  233. package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js.map +0 -1
  234. package/dist/dist-esm/react-components/src/components/DomainPermissions.d.ts +0 -53
  235. package/dist/dist-esm/react-components/src/components/DomainPermissions.js +0 -43
  236. package/dist/dist-esm/react-components/src/components/DomainPermissions.js.map +0 -1
@@ -1,12 +1,7 @@
1
- import { AudioDeviceInfo, Call, CallAgent, LocalVideoStream, StartCallOptions, VideoDeviceInfo } from '@azure/communication-calling';
2
- import { PermissionConstraints } from '@azure/communication-calling';
3
- import { DtmfTone, AddPhoneNumberOptions } from '@azure/communication-calling';
4
- import { CommunicationUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier } from '@azure/communication-common';
1
+ import { Call, CallAgent, StartCallOptions } from '@azure/communication-calling';
5
2
  import { CommunicationIdentifier } from '@azure/communication-common';
6
- import { Common } from "../../../acs-ui-common/src";
7
3
  import { StatefulCallClient, StatefulDeviceManager } from "../../../calling-stateful-client/src";
8
- import { ReactElement } from 'react';
9
- import { CreateVideoStreamViewResult, VideoStreamOptions } from "../../../react-components/src";
4
+ import { CommonCallingHandlers } from './createCommonHandlers';
10
5
  /**
11
6
  * Object containing all the handlers required for calling components.
12
7
  *
@@ -15,36 +10,11 @@ import { CreateVideoStreamViewResult, VideoStreamOptions } from "../../../react-
15
10
  *
16
11
  * @public
17
12
  */
18
- export declare type CallingHandlers = {
19
- onStartLocalVideo: () => Promise<void>;
20
- onToggleCamera: (options?: VideoStreamOptions) => Promise<void>;
21
- onStartCall: (participants: (CommunicationUserIdentifier | PhoneNumberIdentifier | UnknownIdentifier)[], options?: StartCallOptions) => Call | undefined;
22
- onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;
23
- onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;
24
- onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;
25
- onToggleMicrophone: () => Promise<void>;
26
- onStartScreenShare: () => Promise<void>;
27
- onStopScreenShare: () => Promise<void>;
28
- onToggleScreenShare: () => Promise<void>;
29
- onHangUp: (forEveryone?: boolean) => Promise<void>;
30
- onToggleHold: () => Promise<void>;
31
- onAddParticipant(participant: CommunicationUserIdentifier): Promise<void>;
32
- onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;
33
- onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
34
- onCreateRemoteStreamView: (userId: string, options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
35
- onRemoveParticipant(userId: string): Promise<void>;
36
- onRemoveParticipant(participant: CommunicationIdentifier): Promise<void>;
37
- onDisposeRemoteStreamView: (userId: string) => Promise<void>;
38
- onDisposeLocalStreamView: () => Promise<void>;
39
- onSendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;
40
- askDevicePermission: (constrain: PermissionConstraints) => Promise<void>;
41
- };
13
+ export interface CallingHandlers extends CommonCallingHandlers {
14
+ onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined;
15
+ }
42
16
  /**
43
- * @private
44
- */
45
- export declare const areStreamsEqual: (prevStream: LocalVideoStream, newStream: LocalVideoStream) => boolean;
46
- /**
47
- * Create the default implementation of {@link CallingHandlers}.
17
+ * Create the default implementation of {@link CallingHandlers} for teams call.
48
18
  *
49
19
  * Useful when implementing a custom component that utilizes the providers
50
20
  * exported from this library.
@@ -52,19 +22,4 @@ export declare const areStreamsEqual: (prevStream: LocalVideoStream, newStream:
52
22
  * @public
53
23
  */
54
24
  export declare const createDefaultCallingHandlers: (callClient: StatefulCallClient, callAgent: CallAgent | undefined, deviceManager: StatefulDeviceManager | undefined, call: Call | undefined) => CallingHandlers;
55
- /**
56
- * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with
57
- * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and
58
- * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.
59
- *
60
- * @param callClient - StatefulCallClient returned from
61
- * {@link @azure/communication-react#createStatefulCallClient}.
62
- * @param callAgent - Instance of {@link @azure/communication-calling#CallClient}.
63
- * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.
64
- * @param call - Instance of {@link @azure/communication-calling#Call}.
65
- * @param _ - React component that you want to generate handlers for.
66
- *
67
- * @public
68
- */
69
- export declare const createDefaultCallingHandlersForComponent: <Props>(callClient: StatefulCallClient, callAgent: CallAgent | undefined, deviceManager: StatefulDeviceManager | undefined, call: Call | undefined, _Component: (props: Props) => ReactElement | null) => Common<CallingHandlers, Props>;
70
25
  //# sourceMappingURL=createHandlers.d.ts.map
@@ -9,20 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  step((generator = generator.apply(thisArg, _arguments || [])).next());
10
10
  });
11
11
  };
12
- import { LocalVideoStream } from '@azure/communication-calling';
13
12
  /* @conditional-compile-remove(PSTN-calls) */
14
13
  import { isCommunicationUserIdentifier, isMicrosoftTeamsUserIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';
15
- import { toFlatCommunicationIdentifier, _toCommunicationIdentifier } from "../../../acs-ui-common/src";
14
+ import { _toCommunicationIdentifier } from "../../../acs-ui-common/src";
16
15
  import memoizeOne from 'memoize-one';
17
- import { disposeAllLocalPreviewViews, _isInCall, _isInLobbyOrConnecting, _isPreviewOn } from '../utils/callUtils';
16
+ import { isACSCallParticipants } from '../utils/callUtils';
17
+ import { createDefaultCommonCallingHandlers } from './createCommonHandlers';
18
18
  /**
19
- * @private
20
- */
21
- export const areStreamsEqual = (prevStream, newStream) => {
22
- return !!prevStream && !!newStream && prevStream.source.id === newStream.source.id;
23
- };
24
- /**
25
- * Create the default implementation of {@link CallingHandlers}.
19
+ * Create the default implementation of {@link CallingHandlers} for teams call.
26
20
  *
27
21
  * Useful when implementing a custom component that utilizes the providers
28
22
  * exported from this library.
@@ -30,297 +24,26 @@ export const areStreamsEqual = (prevStream, newStream) => {
30
24
  * @public
31
25
  */
32
26
  export const createDefaultCallingHandlers = memoizeOne((callClient, callAgent, deviceManager, call) => {
33
- const onStartLocalVideo = () => __awaiter(void 0, void 0, void 0, function* () {
34
- // Before the call object creates a stream, dispose of any local preview streams.
35
- // @TODO: is there any way to parent the unparented view to the call object instead
36
- // of disposing and creating a new stream?
37
- yield disposeAllLocalPreviewViews(callClient);
38
- const callId = call === null || call === void 0 ? void 0 : call.id;
39
- let videoDeviceInfo = callClient.getState().deviceManager.selectedCamera;
40
- if (!videoDeviceInfo) {
41
- const cameras = yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.getCameras());
42
- videoDeviceInfo = cameras && cameras.length > 0 ? cameras[0] : undefined;
43
- videoDeviceInfo && (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.selectCamera(videoDeviceInfo));
44
- }
45
- if (!callId || !videoDeviceInfo) {
46
- return;
47
- }
48
- const stream = new LocalVideoStream(videoDeviceInfo);
49
- if (call && !call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {
50
- yield call.startVideo(stream);
51
- }
52
- });
53
- const onStopLocalVideo = (stream) => __awaiter(void 0, void 0, void 0, function* () {
54
- const callId = call === null || call === void 0 ? void 0 : call.id;
55
- if (!callId) {
56
- return;
57
- }
58
- if (call && call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {
59
- yield call.stopVideo(stream);
60
- yield callClient.disposeView(callId, undefined, {
61
- source: stream.source,
62
- mediaStreamType: stream.mediaStreamType
63
- });
64
- }
65
- });
66
- const onToggleCamera = (options) => __awaiter(void 0, void 0, void 0, function* () {
67
- const previewOn = _isPreviewOn(callClient.getState().deviceManager);
68
- if (previewOn && call && call.state === 'Connecting') {
69
- // This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.
70
- // The root cause of the issue is caused by never transitioning the unparented view to the
71
- // call object when going from configuration page (disconnected call state) to connecting.
72
- //
73
- // Currently the only time the local video stream is moved from unparented view to the call
74
- // object is when we transition from connecting -> call state. If the camera was on,
75
- // inside the MediaGallery we trigger toggleCamera. This triggers onStartLocalVideo which
76
- // destroys the unparentedView and creates a new stream in the call - so all looks well.
77
- //
78
- // However, if someone turns off their camera during the lobbyOrConnecting screen, the
79
- // call.localVideoStreams will be empty (as the stream is currently stored in the unparented
80
- // views and was never transitioned to the call object) and thus we incorrectly try to create
81
- // a new video stream for the call object, instead of only stopping the unparented view.
82
- //
83
- // The correct fix for this is to ensure that callAgent.onStartCall is called with the
84
- // localvideostream as a videoOption. That will mean call.onLocalVideoStreamsUpdated will
85
- // be triggered when the call is in connecting state, which we can then transition the
86
- // local video stream to the stateful call client and get into a clean state.
87
- yield onDisposeLocalStreamView();
88
- return;
89
- }
90
- if (call && (_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {
91
- const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
92
- if (stream) {
93
- yield onStopLocalVideo(stream);
94
- }
95
- else {
96
- yield onStartLocalVideo();
27
+ return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call)), {
28
+ // FIXME: onStartCall API should use string, not the underlying SDK types.
29
+ onStartCall: (participants, options) => {
30
+ if (!isACSCallParticipants(participants)) {
31
+ throw new Error('TeamsUserIdentifier in Teams call is not supported!');
97
32
  }
98
- }
99
- else {
100
- const selectedCamera = callClient.getState().deviceManager.selectedCamera;
101
- if (selectedCamera) {
102
- if (previewOn) {
103
- yield onDisposeLocalStreamView();
104
- }
105
- else {
106
- yield callClient.createView(undefined, undefined, {
107
- source: selectedCamera,
108
- mediaStreamType: 'Video'
109
- }, options);
110
- }
33
+ return callAgent ? callAgent.startCall(participants, options) : undefined;
34
+ },
35
+ /* @conditional-compile-remove(PSTN-calls) */
36
+ onAddParticipant: (userId, options) => __awaiter(void 0, void 0, void 0, function* () {
37
+ const participant = _toCommunicationIdentifier(userId);
38
+ if (isPhoneNumberIdentifier(participant)) {
39
+ call === null || call === void 0 ? void 0 : call.addParticipant(participant, options);
111
40
  }
112
- }
113
- });
114
- const onStartCall = (participants, options) => {
115
- return callAgent ? callAgent.startCall(participants, options) : undefined;
116
- };
117
- const onSelectMicrophone = (device) => __awaiter(void 0, void 0, void 0, function* () {
118
- if (!deviceManager) {
119
- return;
120
- }
121
- return deviceManager.selectMicrophone(device);
122
- });
123
- const onSelectSpeaker = (device) => __awaiter(void 0, void 0, void 0, function* () {
124
- if (!deviceManager) {
125
- return;
126
- }
127
- return deviceManager.selectSpeaker(device);
128
- });
129
- const onSelectCamera = (device, options) => __awaiter(void 0, void 0, void 0, function* () {
130
- if (!deviceManager) {
131
- return;
132
- }
133
- if (call && _isInCall(call.state)) {
134
- deviceManager.selectCamera(device);
135
- const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');
136
- return stream === null || stream === void 0 ? void 0 : stream.switchSource(device);
137
- }
138
- else {
139
- const previewOn = _isPreviewOn(callClient.getState().deviceManager);
140
- if (!previewOn) {
141
- deviceManager.selectCamera(device);
142
- return;
41
+ else if (isCommunicationUserIdentifier(participant) || isMicrosoftTeamsUserIdentifier(participant)) {
42
+ call === null || call === void 0 ? void 0 : call.addParticipant(participant);
143
43
  }
144
- yield onDisposeLocalStreamView();
145
- deviceManager.selectCamera(device);
146
- yield callClient.createView(undefined, undefined, {
147
- source: device,
148
- mediaStreamType: 'Video'
149
- }, options);
150
- }
151
- });
152
- const onToggleMicrophone = () => __awaiter(void 0, void 0, void 0, function* () {
153
- if (!call || !_isInCall(call.state)) {
154
- throw new Error(`Please invoke onToggleMicrophone after call is started`);
155
- }
156
- return call.isMuted ? yield call.unmute() : yield call.mute();
157
- });
158
- const onStartScreenShare = () => __awaiter(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.startScreenSharing()); });
159
- const onStopScreenShare = () => __awaiter(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.stopScreenSharing()); });
160
- const onToggleScreenShare = () => __awaiter(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.isScreenSharingOn) ? yield onStopScreenShare() : yield onStartScreenShare(); });
161
- const onHangUp = (forEveryone) => __awaiter(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.hangUp({ forEveryone: forEveryone === true ? true : false })); });
162
- /* @conditional-compile-remove(PSTN-calls) */
163
- const onToggleHold = () => __awaiter(void 0, void 0, void 0, function* () { return (call === null || call === void 0 ? void 0 : call.state) === 'LocalHold' ? yield (call === null || call === void 0 ? void 0 : call.resume()) : yield (call === null || call === void 0 ? void 0 : call.hold()); });
164
- const onCreateLocalStreamView = (options = { scalingMode: 'Crop', isMirrored: true }) => __awaiter(void 0, void 0, void 0, function* () {
165
- var _a;
166
- if (!call || call.localVideoStreams.length === 0) {
167
- return;
168
- }
169
- const callState = callClient.getState().calls[call.id];
170
- if (!callState) {
171
- return;
172
- }
173
- const localStream = callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
174
- if (!localStream) {
175
- return;
176
- }
177
- const { view } = (_a = (yield callClient.createView(call.id, undefined, localStream, options))) !== null && _a !== void 0 ? _a : {};
178
- return view ? { view } : undefined;
179
- });
180
- const onCreateRemoteStreamView = (userId, options = { scalingMode: 'Crop' }) => __awaiter(void 0, void 0, void 0, function* () {
181
- if (!call) {
182
- return;
183
- }
184
- const callState = callClient.getState().calls[call.id];
185
- if (!callState) {
186
- throw new Error(`Call Not Found: ${call.id}`);
187
- }
188
- const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
189
- if (!participant || !participant.videoStreams) {
190
- return;
191
- }
192
- const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');
193
- const screenShareStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'ScreenSharing');
194
- let createViewResult = undefined;
195
- if (remoteVideoStream && remoteVideoStream.isAvailable && !remoteVideoStream.view) {
196
- createViewResult = yield callClient.createView(call.id, participant.identifier, remoteVideoStream, options);
197
- }
198
- if (screenShareStream && screenShareStream.isAvailable && !screenShareStream.view) {
199
- // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.
200
- // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.
201
- // `Fit` is the only mode that maintains the integrity of the screen being shared.
202
- createViewResult = yield callClient.createView(call.id, participant.identifier, screenShareStream, {
203
- scalingMode: 'Fit'
204
- });
205
- }
206
- return (createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view) ? { view: createViewResult === null || createViewResult === void 0 ? void 0 : createViewResult.view } : undefined;
207
- });
208
- const onDisposeRemoteStreamView = (userId) => __awaiter(void 0, void 0, void 0, function* () {
209
- if (!call) {
210
- return;
211
- }
212
- const callState = callClient.getState().calls[call.id];
213
- if (!callState) {
214
- throw new Error(`Call Not Found: ${call.id}`);
215
- }
216
- const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
217
- if (!participant || !participant.videoStreams) {
218
- return;
219
- }
220
- const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');
221
- const screenShareStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'ScreenSharing');
222
- if (remoteVideoStream && remoteVideoStream.view) {
223
- callClient.disposeView(call.id, participant.identifier, remoteVideoStream);
224
- }
225
- if (screenShareStream && screenShareStream.view) {
226
- callClient.disposeView(call.id, participant.identifier, screenShareStream);
227
- }
228
- });
229
- const onDisposeLocalStreamView = () => __awaiter(void 0, void 0, void 0, function* () {
230
- // If the user is currently in a call, dispose of the local stream view attached to that call.
231
- const callState = call && callClient.getState().calls[call.id];
232
- const localStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');
233
- if (call && callState && localStream) {
234
- callClient.disposeView(call.id, undefined, localStream);
235
- }
236
- // If the user is not in a call we currently assume any unparented view is a LocalPreview and stop all
237
- // since those are only used for LocalPreview currently.
238
- // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.
239
- yield disposeAllLocalPreviewViews(callClient);
240
- });
241
- const onRemoveParticipant = (userId) => __awaiter(void 0, void 0, void 0, function* () {
242
- const participant = _toCommunicationIdentifier(userId);
243
- yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
244
- });
245
- /* @conditional-compile-remove(PSTN-calls) */
246
- const onAddParticipant = (participant, options) => __awaiter(void 0, void 0, void 0, function* () {
247
- const participantType = participantTypeHelper(participant);
248
- switch (participantType) {
249
- case 'PSTN':
250
- yield (call === null || call === void 0 ? void 0 : call.addParticipant(participant, options));
251
- break;
252
- case 'ACS':
253
- yield (call === null || call === void 0 ? void 0 : call.addParticipant(participant));
254
- break;
255
- }
256
- });
257
- /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
258
- const onSendDtmfTone = (dtmfTone) => __awaiter(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.sendDtmf(dtmfTone)); });
259
- /* @conditional-compile-remove(call-readiness) */
260
- const askDevicePermission = (constrain) => __awaiter(void 0, void 0, void 0, function* () {
261
- if (deviceManager) {
262
- yield (deviceManager === null || deviceManager === void 0 ? void 0 : deviceManager.askDevicePermission(constrain));
263
- }
264
- });
265
- return {
266
- onHangUp,
267
- /* @conditional-compile-remove(PSTN-calls) */
268
- onToggleHold,
269
- onSelectCamera,
270
- onSelectMicrophone,
271
- onSelectSpeaker,
272
- onStartCall,
273
- onStartScreenShare,
274
- onStopScreenShare,
275
- onToggleCamera,
276
- onToggleMicrophone,
277
- onToggleScreenShare,
278
- onCreateLocalStreamView,
279
- onCreateRemoteStreamView,
280
- onRemoveParticipant,
281
- /* @conditional-compile-remove(PSTN-calls) */
282
- onAddParticipant,
283
- onStartLocalVideo,
284
- onDisposeRemoteStreamView,
285
- onDisposeLocalStreamView,
286
- /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */ onSendDtmfTone,
287
- /* @conditional-compile-remove(call-readiness) */
288
- askDevicePermission
289
- };
44
+ }), onRemoveParticipant: (userId) => __awaiter(void 0, void 0, void 0, function* () {
45
+ const participant = _toCommunicationIdentifier(userId);
46
+ yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
47
+ }) });
290
48
  });
291
- /**
292
- * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with
293
- * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and
294
- * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.
295
- *
296
- * @param callClient - StatefulCallClient returned from
297
- * {@link @azure/communication-react#createStatefulCallClient}.
298
- * @param callAgent - Instance of {@link @azure/communication-calling#CallClient}.
299
- * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.
300
- * @param call - Instance of {@link @azure/communication-calling#Call}.
301
- * @param _ - React component that you want to generate handlers for.
302
- *
303
- * @public
304
- */
305
- export const createDefaultCallingHandlersForComponent = (callClient, callAgent, deviceManager, call, _Component) => {
306
- return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call);
307
- };
308
- /* @conditional-compile-remove(PSTN-calls) */
309
- /**
310
- * Helper function for determining participant type.
311
- */
312
- const participantTypeHelper = (p) => {
313
- if (isPhoneNumberIdentifier(p)) {
314
- return 'PSTN';
315
- }
316
- else if (isCommunicationUserIdentifier(p)) {
317
- return 'ACS';
318
- }
319
- else if (isMicrosoftTeamsUserIdentifier(p)) {
320
- return 'Teams';
321
- }
322
- else {
323
- return 'unknown';
324
- }
325
- };
326
49
  //# sourceMappingURL=createHandlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAIL,gBAAgB,EAGjB,MAAM,8BAA8B,CAAC;AAMtC,6CAA6C;AAC7C,OAAO,EACL,6BAA6B,EAC7B,8BAA8B,EAC9B,uBAAuB,EACxB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAU,6BAA6B,EAAE,0BAA0B,EAAE,mCAAgC;AAE5G,OAAO,UAAU,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,2BAA2B,EAAE,SAAS,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA+ClH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAA4B,EAAE,SAA2B,EAAW,EAAE;IACpG,OAAO,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,SAAS,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;AACrF,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CACpD,CACE,UAA8B,EAC9B,SAAgC,EAChC,aAAgD,EAChD,IAAsB,EACL,EAAE;IACnB,MAAM,iBAAiB,GAAG,GAAwB,EAAE;QAClD,iFAAiF;QACjF,mFAAmF;QACnF,0CAA0C;QAC1C,MAAM,2BAA2B,CAAC,UAAU,CAAC,CAAC;QAE9C,MAAM,MAAM,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAC;QACxB,IAAI,eAAe,GAAG,UAAU,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,cAAc,CAAC;QACzE,IAAI,CAAC,eAAe,EAAE;YACpB,MAA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mB;KACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CACtD,UAA8B,EAC9B,SAAgC,EAChC,aAAgD,EAChD,IAAsB,EACtB,UAAiD,EACjB,EAAE;IAClC,OAAO,4BAA4B,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AAClF,CAAC,CAAC;AAEF,6CAA6C;AAC7C;;GAEG;AACH,MAAM,qBAAqB,GAAG,CAAC,CAA0B,EAAU,EAAE;IACnE,IAAI,uBAAuB,CAAC,CAAC,CAAC,EAAE;QAC9B,OAAO,MAAM,CAAC;KACf;SAAM,IAAI,6BAA6B,CAAC,CAAC,CAAC,EAAE;QAC3C,OAAO,KAAK,CAAC;KACd;SAAM,IAAI,8BAA8B,CAAC,CAAC,CAAC,EAAE;QAC5C,OAAO,OAAO,CAAC;KAChB;SAAM;QACL,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AudioDeviceInfo,\n Call,\n CallAgent,\n LocalVideoStream,\n StartCallOptions,\n VideoDeviceInfo\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(call-readiness) */\nimport { PermissionConstraints } from '@azure/communication-calling';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { DtmfTone, AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { CommunicationUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport {\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport { Common, toFlatCommunicationIdentifier, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CreateViewResult, StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { ReactElement } from 'react';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport { disposeAllLocalPreviewViews, _isInCall, _isInLobbyOrConnecting, _isPreviewOn } from '../utils/callUtils';\n\n/**\n * Object containing all the handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport type CallingHandlers = {\n onStartLocalVideo: () => Promise<void>;\n onToggleCamera: (options?: VideoStreamOptions) => Promise<void>;\n onStartCall: (\n participants: (CommunicationUserIdentifier | PhoneNumberIdentifier | UnknownIdentifier)[],\n options?: StartCallOptions\n ) => Call | undefined;\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;\n onToggleMicrophone: () => Promise<void>;\n onStartScreenShare: () => Promise<void>;\n onStopScreenShare: () => Promise<void>;\n onToggleScreenShare: () => Promise<void>;\n onHangUp: (forEveryone?: boolean) => Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n onToggleHold: () => Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant(participant: CommunicationUserIdentifier): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;\n onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n onCreateRemoteStreamView: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n onRemoveParticipant(userId: string): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n onRemoveParticipant(participant: CommunicationIdentifier): Promise<void>;\n onDisposeRemoteStreamView: (userId: string) => Promise<void>;\n onDisposeLocalStreamView: () => Promise<void>;\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n onSendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>;\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: (constrain: PermissionConstraints) => Promise<void>;\n};\n\n/**\n * @private\n */\nexport const areStreamsEqual = (prevStream: LocalVideoStream, newStream: LocalVideoStream): boolean => {\n return !!prevStream && !!newStream && prevStream.source.id === newStream.source.id;\n};\n\n/**\n * Create the default implementation of {@link CallingHandlers}.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent: CallAgent | undefined,\n deviceManager: StatefulDeviceManager | undefined,\n call: Call | undefined\n ): CallingHandlers => {\n const onStartLocalVideo = async (): Promise<void> => {\n // Before the call object creates a stream, dispose of any local preview streams.\n // @TODO: is there any way to parent the unparented view to the call object instead\n // of disposing and creating a new stream?\n await disposeAllLocalPreviewViews(callClient);\n\n const callId = call?.id;\n let videoDeviceInfo = callClient.getState().deviceManager.selectedCamera;\n if (!videoDeviceInfo) {\n const cameras = await deviceManager?.getCameras();\n videoDeviceInfo = cameras && cameras.length > 0 ? cameras[0] : undefined;\n videoDeviceInfo && deviceManager?.selectCamera(videoDeviceInfo);\n }\n if (!callId || !videoDeviceInfo) {\n return;\n }\n const stream = new LocalVideoStream(videoDeviceInfo);\n if (call && !call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {\n await call.startVideo(stream);\n }\n };\n\n const onStopLocalVideo = async (stream: LocalVideoStream): Promise<void> => {\n const callId = call?.id;\n if (!callId) {\n return;\n }\n if (call && call.localVideoStreams.find((s) => areStreamsEqual(s, stream))) {\n await call.stopVideo(stream);\n await callClient.disposeView(callId, undefined, {\n source: stream.source,\n mediaStreamType: stream.mediaStreamType\n });\n }\n };\n\n const onToggleCamera = async (options?: VideoStreamOptions): Promise<void> => {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n\n if (previewOn && call && call.state === 'Connecting') {\n // This is to workaround: https://skype.visualstudio.com/SPOOL/_workitems/edit/3030558.\n // The root cause of the issue is caused by never transitioning the unparented view to the\n // call object when going from configuration page (disconnected call state) to connecting.\n //\n // Currently the only time the local video stream is moved from unparented view to the call\n // object is when we transition from connecting -> call state. If the camera was on,\n // inside the MediaGallery we trigger toggleCamera. This triggers onStartLocalVideo which\n // destroys the unparentedView and creates a new stream in the call - so all looks well.\n //\n // However, if someone turns off their camera during the lobbyOrConnecting screen, the\n // call.localVideoStreams will be empty (as the stream is currently stored in the unparented\n // views and was never transitioned to the call object) and thus we incorrectly try to create\n // a new video stream for the call object, instead of only stopping the unparented view.\n //\n // The correct fix for this is to ensure that callAgent.onStartCall is called with the\n // localvideostream as a videoOption. That will mean call.onLocalVideoStreamsUpdated will\n // be triggered when the call is in connecting state, which we can then transition the\n // local video stream to the stateful call client and get into a clean state.\n await onDisposeLocalStreamView();\n return;\n }\n\n if (call && (_isInCall(call.state) || _isInLobbyOrConnecting(call.state))) {\n const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n if (stream) {\n await onStopLocalVideo(stream);\n } else {\n await onStartLocalVideo();\n }\n } else {\n const selectedCamera = callClient.getState().deviceManager.selectedCamera;\n if (selectedCamera) {\n if (previewOn) {\n await onDisposeLocalStreamView();\n } else {\n await callClient.createView(\n undefined,\n undefined,\n {\n source: selectedCamera,\n mediaStreamType: 'Video'\n },\n options\n );\n }\n }\n }\n };\n\n const onStartCall = (\n participants: (CommunicationUserIdentifier | PhoneNumberIdentifier | UnknownIdentifier)[],\n options?: StartCallOptions\n ): Call | undefined => {\n return callAgent ? callAgent.startCall(participants, options) : undefined;\n };\n\n const onSelectMicrophone = async (device: AudioDeviceInfo): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectMicrophone(device);\n };\n\n const onSelectSpeaker = async (device: AudioDeviceInfo): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n return deviceManager.selectSpeaker(device);\n };\n\n const onSelectCamera = async (device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> => {\n if (!deviceManager) {\n return;\n }\n if (call && _isInCall(call.state)) {\n deviceManager.selectCamera(device);\n const stream = call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n return stream?.switchSource(device);\n } else {\n const previewOn = _isPreviewOn(callClient.getState().deviceManager);\n\n if (!previewOn) {\n deviceManager.selectCamera(device);\n return;\n }\n\n await onDisposeLocalStreamView();\n\n deviceManager.selectCamera(device);\n await callClient.createView(\n undefined,\n undefined,\n {\n source: device,\n mediaStreamType: 'Video'\n },\n options\n );\n }\n };\n\n const onToggleMicrophone = async (): Promise<void> => {\n if (!call || !_isInCall(call.state)) {\n throw new Error(`Please invoke onToggleMicrophone after call is started`);\n }\n return call.isMuted ? await call.unmute() : await call.mute();\n };\n\n const onStartScreenShare = async (): Promise<void> => await call?.startScreenSharing();\n\n const onStopScreenShare = async (): Promise<void> => await call?.stopScreenSharing();\n\n const onToggleScreenShare = async (): Promise<void> =>\n call?.isScreenSharingOn ? await onStopScreenShare() : await onStartScreenShare();\n\n const onHangUp = async (forEveryone?: boolean): Promise<void> =>\n await call?.hangUp({ forEveryone: forEveryone === true ? true : false });\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onToggleHold = async (): Promise<void> =>\n call?.state === 'LocalHold' ? await call?.resume() : await call?.hold();\n\n const onCreateLocalStreamView = async (\n options = { scalingMode: 'Crop', isMirrored: true } as VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> => {\n if (!call || call.localVideoStreams.length === 0) {\n return;\n }\n\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n return;\n }\n\n const localStream = callState.localVideoStreams.find((item) => item.mediaStreamType === 'Video');\n if (!localStream) {\n return;\n }\n\n const { view } = (await callClient.createView(call.id, undefined, localStream, options)) ?? {};\n return view ? { view } : undefined;\n };\n\n const onCreateRemoteStreamView = async (\n userId: string,\n options = { scalingMode: 'Crop' } as VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');\n const screenShareStream = Object.values(participant.videoStreams).find(\n (i) => i.mediaStreamType === 'ScreenSharing'\n );\n\n let createViewResult: CreateViewResult | undefined = undefined;\n if (remoteVideoStream && remoteVideoStream.isAvailable && !remoteVideoStream.view) {\n createViewResult = await callClient.createView(call.id, participant.identifier, remoteVideoStream, options);\n }\n\n if (screenShareStream && screenShareStream.isAvailable && !screenShareStream.view) {\n // Hardcoded `scalingMode` since it is highly unlikely that CONTOSO would ever want to use a different scaling mode for screenshare.\n // Using `Crop` would crop the contents of screenshare and `Stretch` would warp it.\n // `Fit` is the only mode that maintains the integrity of the screen being shared.\n createViewResult = await callClient.createView(call.id, participant.identifier, screenShareStream, {\n scalingMode: 'Fit'\n });\n }\n\n return createViewResult?.view ? { view: createViewResult?.view } : undefined;\n };\n\n const onDisposeRemoteStreamView = async (userId: string): Promise<void> => {\n if (!call) {\n return;\n }\n const callState = callClient.getState().calls[call.id];\n if (!callState) {\n throw new Error(`Call Not Found: ${call.id}`);\n }\n\n const participant = Object.values(callState.remoteParticipants).find(\n (participant) => toFlatCommunicationIdentifier(participant.identifier) === userId\n );\n\n if (!participant || !participant.videoStreams) {\n return;\n }\n\n const remoteVideoStream = Object.values(participant.videoStreams).find((i) => i.mediaStreamType === 'Video');\n const screenShareStream = Object.values(participant.videoStreams).find(\n (i) => i.mediaStreamType === 'ScreenSharing'\n );\n\n if (remoteVideoStream && remoteVideoStream.view) {\n callClient.disposeView(call.id, participant.identifier, remoteVideoStream);\n }\n\n if (screenShareStream && screenShareStream.view) {\n callClient.disposeView(call.id, participant.identifier, screenShareStream);\n }\n };\n\n const onDisposeLocalStreamView = async (): Promise<void> => {\n // If the user is currently in a call, dispose of the local stream view attached to that call.\n const callState = call && callClient.getState().calls[call.id];\n const localStream = callState?.localVideoStreams.find((item) => item.mediaStreamType === 'Video');\n if (call && callState && localStream) {\n callClient.disposeView(call.id, undefined, localStream);\n }\n\n // If the user is not in a call we currently assume any unparented view is a LocalPreview and stop all\n // since those are only used for LocalPreview currently.\n // TODO: we need to remember which LocalVideoStream was used for LocalPreview and dispose that one.\n await disposeAllLocalPreviewViews(callClient);\n };\n\n const onRemoveParticipant = async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n await call?.removeParticipant(participant);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onAddParticipant = async (participant, options?): Promise<void> => {\n const participantType = participantTypeHelper(participant);\n switch (participantType) {\n case 'PSTN':\n await call?.addParticipant(participant as PhoneNumberIdentifier, options);\n break;\n case 'ACS':\n await call?.addParticipant(participant as CommunicationUserIdentifier);\n break;\n }\n };\n\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n const onSendDtmfTone = async (dtmfTone: DtmfTone): Promise<void> => await call?.sendDtmf(dtmfTone);\n\n /* @conditional-compile-remove(call-readiness) */\n const askDevicePermission = async (constrain: PermissionConstraints): Promise<void> => {\n if (deviceManager) {\n await deviceManager?.askDevicePermission(constrain);\n }\n };\n\n return {\n onHangUp,\n /* @conditional-compile-remove(PSTN-calls) */\n onToggleHold,\n onSelectCamera,\n onSelectMicrophone,\n onSelectSpeaker,\n onStartCall,\n onStartScreenShare,\n onStopScreenShare,\n onToggleCamera,\n onToggleMicrophone,\n onToggleScreenShare,\n onCreateLocalStreamView,\n onCreateRemoteStreamView,\n onRemoveParticipant,\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant,\n onStartLocalVideo,\n onDisposeRemoteStreamView,\n onDisposeLocalStreamView,\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */ onSendDtmfTone,\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission\n };\n }\n);\n\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#CallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#Call}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @public\n */\nexport const createDefaultCallingHandlersForComponent = <Props>(\n callClient: StatefulCallClient,\n callAgent: CallAgent | undefined,\n deviceManager: StatefulDeviceManager | undefined,\n call: Call | undefined,\n _Component: (props: Props) => ReactElement | null\n): Common<CallingHandlers, Props> => {\n return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call);\n};\n\n/* @conditional-compile-remove(PSTN-calls) */\n/**\n * Helper function for determining participant type.\n */\nconst participantTypeHelper = (p: CommunicationIdentifier): string => {\n if (isPhoneNumberIdentifier(p)) {\n return 'PSTN';\n } else if (isCommunicationUserIdentifier(p)) {\n return 'ACS';\n } else if (isMicrosoftTeamsUserIdentifier(p)) {\n return 'Teams';\n } else {\n return 'unknown';\n }\n};\n\"../../../acs-ui-common/src\"\"../../../calling-stateful-client/src\"\"../../../react-components/src\""]}
1
+ {"version":3,"file":"createHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAMlC,6CAA6C;AAC7C,OAAO,EACL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MAAsF,EACvE,EAAE;YACjB,MAAM,WAAW,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;YACvD,MAAM,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA,CAAC;QAC7C,CAAC,CAAA,IACD;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Call, CallAgent, StartCallOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport {\n isCommunicationUserIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isPhoneNumberIdentifier\n} from '@azure/communication-common';\nimport { CommunicationIdentifier } from '@azure/communication-common';\n\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { isACSCallParticipants } from '../utils/callUtils';\nimport { createDefaultCommonCallingHandlers, CommonCallingHandlers } from './createCommonHandlers';\n\n/**\n * Object containing all the handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface CallingHandlers extends CommonCallingHandlers {\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined;\n}\n\n/**\n * Create the default implementation of {@link CallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent: CallAgent | undefined,\n deviceManager: StatefulDeviceManager | undefined,\n call: Call | undefined\n ): CallingHandlers => {\n return {\n ...createDefaultCommonCallingHandlers(callClient, deviceManager, call),\n // FIXME: onStartCall API should use string, not the underlying SDK types.\n onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined => {\n if (!isACSCallParticipants(participants)) {\n throw new Error('TeamsUserIdentifier in Teams call is not supported!');\n }\n return callAgent ? callAgent.startCall(participants, options) : undefined;\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, options);\n } else if (isCommunicationUserIdentifier(participant) || isMicrosoftTeamsUserIdentifier(participant)) {\n call?.addParticipant(participant);\n }\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n await call?.removeParticipant(participant);\n }\n };\n }\n);\n\"../../../acs-ui-common/src\"\"../../../calling-stateful-client/src\""]}
@@ -0,0 +1,43 @@
1
+ import { StartCallOptions } from '@azure/communication-calling';
2
+ import { TeamsCall, TeamsCallAgent } from '@azure/communication-calling';
3
+ import { CommunicationIdentifier } from '@azure/communication-common';
4
+ import { Common } from "../../../acs-ui-common/src";
5
+ import { StatefulCallClient, StatefulDeviceManager } from "../../../calling-stateful-client/src";
6
+ import { ReactElement } from 'react';
7
+ import { CommonCallingHandlers } from './createCommonHandlers';
8
+ /**
9
+ * Object containing all the teams call handlers required for calling components.
10
+ *
11
+ * Calling related components from this package are able to pick out relevant handlers from this object.
12
+ * See {@link useHandlers} and {@link usePropsFor}.
13
+ *
14
+ * @beta
15
+ */
16
+ export interface TeamsCallingHandlers extends CommonCallingHandlers {
17
+ onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;
18
+ }
19
+ /**
20
+ * Create the default implementation of {@link TeamsCallingHandlers} for teams call.
21
+ *
22
+ * Useful when implementing a custom component that utilizes the providers
23
+ * exported from this library.
24
+ *
25
+ * @beta
26
+ */
27
+ export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent, deviceManager: StatefulDeviceManager | undefined, call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall) => never | TeamsCallingHandlers;
28
+ /**
29
+ * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with
30
+ * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and
31
+ * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.
32
+ *
33
+ * @param callClient - StatefulCallClient returned from
34
+ * {@link @azure/communication-react#createStatefulCallClient}.
35
+ * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.
36
+ * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.
37
+ * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
38
+ * @param _ - React component that you want to generate handlers for.
39
+ *
40
+ * @beta
41
+ */
42
+ export declare const createTeamsCallingHandlersForComponent: <Props>(callClient: StatefulCallClient, callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent, deviceManager: StatefulDeviceManager | undefined, call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall, _Component: (props: Props) => ReactElement | null) => Common<TeamsCallingHandlers, Props>;
43
+ //# sourceMappingURL=createTeamsCallHandlers.d.ts.map
@@ -0,0 +1,81 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
+ return new (P || (P = Promise))(function (resolve, reject) {
6
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10
+ });
11
+ };
12
+ import { isCommunicationUserIdentifier } from '@azure/communication-common';
13
+ /* @conditional-compile-remove(teams-identity-support) */
14
+ import { isPhoneNumberIdentifier } from '@azure/communication-common';
15
+ import { _toCommunicationIdentifier } from "../../../acs-ui-common/src";
16
+ import memoizeOne from 'memoize-one';
17
+ import { isTeamsCallParticipants } from '../utils/callUtils';
18
+ import { createDefaultCommonCallingHandlers } from './createCommonHandlers';
19
+ /**
20
+ * Create the default implementation of {@link TeamsCallingHandlers} for teams call.
21
+ *
22
+ * Useful when implementing a custom component that utilizes the providers
23
+ * exported from this library.
24
+ *
25
+ * @beta
26
+ */
27
+ export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, deviceManager, call) => {
28
+ return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call)), { onStartCall: (participants, options) => {
29
+ /* @conditional-compile-remove(teams-identity-support) */
30
+ const threadId = options === null || options === void 0 ? void 0 : options.threadId;
31
+ if (!isTeamsCallParticipants(participants)) {
32
+ throw new Error('CommunicationIdentifier in Teams call is not supported!');
33
+ }
34
+ /* @conditional-compile-remove(teams-identity-support) */
35
+ if (callAgent) {
36
+ return callAgent.startCall(participants, threadId ? { threadId } : undefined);
37
+ }
38
+ return undefined;
39
+ },
40
+ /* @conditional-compile-remove(teams-identity-support) */
41
+ /* @conditional-compile-remove(PSTN-calls) */
42
+ onAddParticipant: (userId, options) => __awaiter(void 0, void 0, void 0, function* () {
43
+ const participant = _toCommunicationIdentifier(userId);
44
+ /* @conditional-compile-remove(teams-identity-support) */
45
+ const threadId = options === null || options === void 0 ? void 0 : options.threadId;
46
+ if (isCommunicationUserIdentifier(participant)) {
47
+ throw new Error('CommunicationIdentifier in Teams call is not supported!');
48
+ }
49
+ /* @conditional-compile-remove(teams-identity-support) */
50
+ if (isPhoneNumberIdentifier(participant)) {
51
+ call === null || call === void 0 ? void 0 : call.addParticipant(participant, threadId ? { threadId } : undefined);
52
+ }
53
+ /* @conditional-compile-remove(teams-identity-support) */
54
+ call === null || call === void 0 ? void 0 : call.addParticipant(participant);
55
+ }), onRemoveParticipant: (userId) => __awaiter(void 0, void 0, void 0, function* () {
56
+ const participant = _toCommunicationIdentifier(userId);
57
+ if (isCommunicationUserIdentifier(participant)) {
58
+ throw new Error('CommunicationIdentifier in Teams call is not supported!');
59
+ }
60
+ /* @conditional-compile-remove(teams-identity-support) */
61
+ yield (call === null || call === void 0 ? void 0 : call.removeParticipant(participant));
62
+ }) });
63
+ });
64
+ /**
65
+ * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with
66
+ * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and
67
+ * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.
68
+ *
69
+ * @param callClient - StatefulCallClient returned from
70
+ * {@link @azure/communication-react#createStatefulCallClient}.
71
+ * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.
72
+ * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.
73
+ * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
74
+ * @param _ - React component that you want to generate handlers for.
75
+ *
76
+ * @beta
77
+ */
78
+ export const createTeamsCallingHandlersForComponent = (callClient, callAgent, deviceManager, call, _Component) => {
79
+ return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);
80
+ };
81
+ //# sourceMappingURL=createTeamsCallHandlers.js.map