@azure/communication-react 1.5.1-alpha-202211250013.0 → 1.5.1-alpha-202301250013

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 (307) hide show
  1. package/CHANGELOG.beta.md +47 -1
  2. package/CHANGELOG.json +1554 -0
  3. package/CHANGELOG.stable.md +88 -2
  4. package/dist/communication-react.d.ts +469 -297
  5. package/dist/dist-cjs/communication-react/index.js +2975 -1716
  6. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/identifier.js +3 -47
  8. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  13. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +30 -11
  15. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  17. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -7
  18. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +13 -4
  20. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  22. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +9 -0
  23. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +12 -0
  25. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +31 -6
  26. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -13
  28. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  29. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -1
  30. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  31. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
  32. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +14 -0
  33. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +3 -0
  37. package/dist/dist-esm/calling-stateful-client/src/Logger.js +3 -0
  38. package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -1
  40. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +11 -4
  41. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +93 -27
  43. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +2 -2
  45. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.d.ts +19 -0
  47. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js +43 -0
  48. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js.map +1 -0
  49. package/dist/dist-esm/communication-react/src/index.d.ts +7 -5
  50. package/dist/dist-esm/communication-react/src/index.js +5 -3
  51. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  53. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +86 -0
  54. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  55. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.d.ts → SitePermissionsScaffolding.d.ts} +12 -12
  56. package/dist/dist-esm/react-components/src/components/DevicePermissions/{DomainPermissionsScaffolding.js → SitePermissionsScaffolding.js} +4 -4
  57. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  58. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +20 -9
  59. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.d.ts +1 -0
  61. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js +18 -2
  62. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +4 -0
  64. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
  65. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.d.ts +4 -0
  67. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js +1 -1
  68. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +8 -0
  70. package/dist/dist-esm/react-components/src/components/ErrorBar.js +1 -2
  71. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/components/MessageThread.js +6 -4
  73. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -2
  75. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +10 -12
  76. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  77. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
  78. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +26 -4
  79. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +10 -4
  81. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +79 -7
  82. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  83. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +6 -6
  84. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +13 -21
  85. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +37 -0
  87. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +27 -0
  88. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -0
  89. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +41 -0
  90. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +32 -0
  91. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -0
  92. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +32 -0
  93. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +25 -0
  94. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -0
  95. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +16 -0
  96. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +60 -0
  97. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -0
  98. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +12 -0
  99. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +41 -0
  100. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -0
  101. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +25 -0
  102. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +76 -0
  103. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -0
  104. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +38 -0
  105. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js +4 -0
  106. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -0
  107. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +9 -0
  108. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +18 -0
  109. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -0
  110. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +14 -0
  111. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +19 -0
  112. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -0
  113. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.d.ts +6 -0
  114. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js +9 -0
  115. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js.map +1 -0
  116. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +62 -0
  117. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +118 -0
  118. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -0
  119. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.d.ts +14 -0
  120. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js +28 -0
  121. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js.map +1 -0
  122. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.d.ts +6 -0
  123. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js +9 -0
  124. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js.map +1 -0
  125. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.d.ts +9 -0
  126. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js +22 -0
  127. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js.map +1 -0
  128. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.d.ts +10 -0
  129. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +29 -0
  130. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -0
  131. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +45 -0
  132. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +57 -0
  133. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -0
  134. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.d.ts +2 -2
  135. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +7 -2
  136. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +23 -0
  138. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +96 -0
  139. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -0
  140. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +27 -0
  141. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +121 -0
  142. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -0
  143. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +66 -0
  144. package/dist/dist-esm/react-components/src/components/VideoGallery.js +131 -124
  145. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  146. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +12 -17
  147. package/dist/dist-esm/react-components/src/components/VideoTile.js +71 -38
  148. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/index.d.ts +8 -3
  150. package/dist/dist-esm/react-components/src/components/index.js +3 -2
  151. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.d.ts → SitePermissions.styles.d.ts} +1 -1
  153. package/dist/dist-esm/react-components/src/components/styles/{DomainPermissions.styles.js → SitePermissions.styles.js} +1 -1
  154. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  155. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +2 -1
  156. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +26 -0
  158. package/dist/dist-esm/react-components/src/components/styles/{UnsupportedBrowser.styles.js → UnsupportedEnvironment.styles.js} +25 -10
  159. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -0
  160. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +1 -95
  161. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +3 -138
  162. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  163. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +1 -1
  164. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +11 -26
  165. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +13 -10
  167. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +66 -37
  168. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -6
  170. package/dist/dist-esm/react-components/src/components/utils.js +4 -16
  171. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  173. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  174. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +31 -19
  175. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  176. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +1 -1
  177. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +1 -1
  178. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +49 -14
  179. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +1 -1
  180. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +1 -1
  181. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +1 -1
  182. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +1 -1
  183. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +1 -1
  184. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +1 -1
  185. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +1 -1
  186. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +1 -1
  187. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +1 -1
  188. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +1 -1
  189. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +1 -1
  190. package/dist/dist-esm/react-components/src/theming/icons.d.ts +11 -6
  191. package/dist/dist-esm/react-components/src/theming/icons.js +30 -20
  192. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  193. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +1 -1
  194. package/dist/dist-esm/react-components/src/theming/icons.styles.js +1 -1
  195. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -1
  196. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +2 -0
  197. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +24 -11
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +9 -9
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +56 -0
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +16 -10
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +89 -40
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +11 -16
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -2
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -0
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +19 -18
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +5 -4
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +79 -39
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +16 -0
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageCameraDropdown.js → ConfigurationPageCameraDropdown.js} +4 -6
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -0
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.d.ts → ConfigurationPageErrorBar.d.ts} +3 -4
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageErrorBar.js → ConfigurationPageErrorBar.js} +4 -6
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -0
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +16 -0
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/{ConfigurationpageMicDropdown.js → ConfigurationPageMicDropdown.js} +4 -8
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -0
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +1 -0
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +16 -14
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +8 -3
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +3 -0
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +26 -4
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -1
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +11 -3
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +4 -4
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -2
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +3 -3
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +46 -27
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +2 -0
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +28 -7
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -1
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +7 -0
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js +9 -1
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.d.ts +4 -0
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +10 -0
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +29 -0
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +119 -0
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -0
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +20 -4
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +74 -21
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +16 -7
  264. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +22 -10
  265. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  266. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +2 -0
  267. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  268. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -0
  269. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +11 -5
  270. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  271. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +4 -0
  272. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -0
  274. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +7 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +8 -0
  277. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -0
  279. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  280. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +26 -3
  281. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  282. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +8 -0
  283. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js +40 -0
  284. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js.map +1 -0
  285. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
  288. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +11 -6
  290. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +1 -0
  291. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -1
  292. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +2 -1
  293. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -1
  294. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +15 -1
  295. package/package.json +13 -12
  296. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +0 -101
  297. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js +0 -80
  298. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +0 -1
  299. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +0 -1
  300. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +0 -1
  301. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.d.ts +0 -22
  302. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js.map +0 -1
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +0 -17
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +0 -1
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +0 -1
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +0 -17
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +0 -1
@@ -49,7 +49,7 @@ export const useSelectorWithAdaptation = (selector, adaptState, selectorProps) =
49
49
  }, [adaptState, adapter, selector, selectorProps, callConfigProps]);
50
50
  return props;
51
51
  };
52
- const memoizeState = memoizeOne((userId, deviceManager, calls, latestErrors, displayName) => ({
52
+ const memoizeState = memoizeOne((userId, deviceManager, calls, latestErrors, displayName, alternateCallerId, environmentInfo) => ({
53
53
  userId,
54
54
  incomingCalls: {},
55
55
  incomingCallsEnded: {},
@@ -57,7 +57,11 @@ const memoizeState = memoizeOne((userId, deviceManager, calls, latestErrors, dis
57
57
  deviceManager,
58
58
  callAgent: { displayName },
59
59
  calls,
60
- latestErrors
60
+ latestErrors,
61
+ /* @conditional-compile-remove(PSTN-calls) */
62
+ alternateCallerId,
63
+ /* @conditional-compile-remove(unsupported-browser) */
64
+ environmentInfo
61
65
  }));
62
66
  const memoizeCalls = memoizeOne((call) => (call ? { [call.id]: call } : {}));
63
67
  const adaptCompositeState = (compositeState) => {
@@ -75,6 +79,10 @@ const adaptCompositeState = (compositeState) => {
75
79
  // that are unknown to the UI component and data binding libraries. Generic handling of the errors (e.g.,
76
80
  // just displaying them in some UI surface) will continue to work for these operations. Handling of
77
81
  // specific operations (e.g., acting on errors related to permission issues) will ignore these operations.
78
- compositeState.latestErrors, compositeState.displayName);
82
+ compositeState.latestErrors, compositeState.displayName,
83
+ /* @conditional-compile-remove(PSTN-calls) */
84
+ compositeState.alternateCallerId,
85
+ /* @conditional-compile-remove(unsupported-browser) */
86
+ compositeState.environmentInfo);
79
87
  };
80
88
  //# sourceMappingURL=useAdaptedSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAdaptedSelector.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.ts"],"names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AM,mBAAmB,GAAG,CAAC,cAAgC,EAAmB,EAAE;IAChF,OAAO,YAAY,CACjB,cAAc,CAAC,MAAM,EACrB,cAAc,CAAC,OAAO,EACtB,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC;IACjC,oCAAoC;IACpC,uFAAuF;IACvF,EAAE;IACF,oEAAoE;IACpE,6FAA6F;IAC7F,sEAAsE;IACtE,qGAAqG;IACrG,mEAAmE;IACnE,EAAE;IACF,6GAA6G;IAC7G,yGAAyG;IACzG,mGAAmG;IACnG,0GAA0G;IAC1G,cAAc,CAAC,YAA0B,EACzC,cAAc,CAAC,WAAW,CAC3B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { useState, useEffect, useRef, useMemo } from 'react';\n\nimport memoizeOne from 'memoize-one';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallAdapterState } from '../adapter/CallAdapter';\nimport { CallErrors, CallState, CallClientState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\n/**\n * @private\n */\nexport const useAdaptedSelector = <SelectorT extends (state: CallClientState, props: any) => any>(\n selector: SelectorT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n return useSelectorWithAdaptation(selector, adaptCompositeState, selectorProps);\n};\n\n/**\n * @private\n */\nexport const useSelectorWithAdaptation = <\n SelectorT extends (state: ReturnType<AdaptFuncT>, props: any) => any,\n AdaptFuncT extends (state: CallAdapterState) => any\n>(\n selector: SelectorT,\n adaptState: AdaptFuncT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n const adapter = useAdapter();\n\n // Keeps track of whether the current component is mounted or not. If it has unmounted, make sure we do not modify the\n // state or it will cause React warnings in the console. https://skype.visualstudio.com/SPOOL/_workitems/edit/2453212\n const mounted = useRef(false);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n });\n\n const callId = adapter.getState().call?.id;\n const callConfigProps = useMemo(\n () => ({\n callId\n }),\n [callId]\n );\n\n const [props, setProps] = useState(selector(adaptState(adapter.getState()), selectorProps ?? callConfigProps));\n const propRef = useRef(props);\n propRef.current = props;\n\n useEffect(() => {\n const onStateChange = (state: CallAdapterState): void => {\n if (!mounted.current) {\n return;\n }\n const newProps = selector(adaptState(state), selectorProps ?? callConfigProps);\n if (propRef.current !== newProps) {\n setProps(newProps);\n }\n };\n adapter.onStateChange(onStateChange);\n return () => {\n adapter.offStateChange(onStateChange);\n };\n }, [adaptState, adapter, selector, selectorProps, callConfigProps]);\n return props;\n};\n\nconst memoizeState = memoizeOne(\n (\n userId: CommunicationIdentifierKind,\n deviceManager: DeviceManagerState,\n calls: { [key: string]: CallState },\n latestErrors: CallErrors,\n displayName?: string\n ): CallClientState => ({\n userId,\n incomingCalls: {},\n incomingCallsEnded: {},\n callsEnded: {},\n deviceManager,\n callAgent: { displayName },\n calls,\n latestErrors\n })\n);\n\nconst memoizeCalls = memoizeOne((call?: CallState): { [key: string]: CallState } => (call ? { [call.id]: call } : {}));\n\nconst adaptCompositeState = (compositeState: CallAdapterState): CallClientState => {\n return memoizeState(\n compositeState.userId,\n compositeState.devices,\n memoizeCalls(compositeState.call),\n // This is an unsafe type expansion.\n // compositeState.latestErrors can contain properties that are not valid in CallErrors.\n //\n // But there is no way to check for valid property names at runtime:\n // - The set of valid property names is built from types in the @azure/communication-calling.\n // Thus we don't have a literal array of allowed strings at runtime.\n // - Due to minification / uglification, the property names from the objects at runtime can't be used\n // to compare against permissible values inferred from the types.\n //\n // This is not a huge problem -- it simply means that our adapted selector will include some extra operations\n // that are unknown to the UI component and data binding libraries. Generic handling of the errors (e.g.,\n // just displaying them in some UI surface) will continue to work for these operations. Handling of\n // specific operations (e.g., acting on errors related to permission issues) will ignore these operations.\n compositeState.latestErrors as CallErrors,\n compositeState.displayName\n );\n};\n\"../../../../../calling-stateful-client/src\""]}
1
+ {"version":3,"file":"useAdaptedSelector.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,uDAAuD;AAEvD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAM5D;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,QAAmB,EACnB,aAAwC,EACjB,EAAE;IACzB,OAAO,yBAAyB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAIvC,QAAmB,EACnB,UAAsB,EACtB,aAAwC,EACjB,EAAE;;IACzB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,sHAAsH;IACtH,qHAAqH;IACrH,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAE9B,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QACvB,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,MAAA,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,0CAAE,EAAE,CAAC;IAC3C,MAAM,eAAe,GAAG,OAAO,CAC7B,GAAG,EAAE,CAAC,CAAC;QACL,MAAM;KACP,CAAC,EACF,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,UAAU,CA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CAAC;AAEF,MAAM,YAAY,GAAG,UAAU,CAAC,CAAC,IAAgB,EAAgC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEvH,MAAM,mBAAmB,GAAG,CAAC,cAAgC,EAAmB,EAAE;IAChF,OAAO,YAAY,CACjB,cAAc,CAAC,MAAM,EACrB,cAAc,CAAC,OAAO,EACtB,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC;IACjC,oCAAoC;IACpC,uFAAuF;IACvF,EAAE;IACF,oEAAoE;IACpE,6FAA6F;IAC7F,sEAAsE;IACtE,qGAAqG;IACrG,mEAAmE;IACnE,EAAE;IACF,6GAA6G;IAC7G,yGAAyG;IACzG,mGAAmG;IACnG,0GAA0G;IAC1G,cAAc,CAAC,YAA0B,EACzC,cAAc,CAAC,WAAW;IAC1B,6CAA6C;IAC7C,cAAc,CAAC,iBAAiB;IAChC,sDAAsD;IACtD,cAAc,CAAC,eAAe,CAC/B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { useState, useEffect, useRef, useMemo } from 'react';\n\nimport memoizeOne from 'memoize-one';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallAdapterState } from '../adapter/CallAdapter';\nimport { CallErrors, CallState, CallClientState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/**\n * @private\n */\nexport const useAdaptedSelector = <SelectorT extends (state: CallClientState, props: any) => any>(\n selector: SelectorT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n return useSelectorWithAdaptation(selector, adaptCompositeState, selectorProps);\n};\n\n/**\n * @private\n */\nexport const useSelectorWithAdaptation = <\n SelectorT extends (state: ReturnType<AdaptFuncT>, props: any) => any,\n AdaptFuncT extends (state: CallAdapterState) => any\n>(\n selector: SelectorT,\n adaptState: AdaptFuncT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n const adapter = useAdapter();\n\n // Keeps track of whether the current component is mounted or not. If it has unmounted, make sure we do not modify the\n // state or it will cause React warnings in the console. https://skype.visualstudio.com/SPOOL/_workitems/edit/2453212\n const mounted = useRef(false);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n });\n\n const callId = adapter.getState().call?.id;\n const callConfigProps = useMemo(\n () => ({\n callId\n }),\n [callId]\n );\n\n const [props, setProps] = useState(selector(adaptState(adapter.getState()), selectorProps ?? callConfigProps));\n const propRef = useRef(props);\n propRef.current = props;\n\n useEffect(() => {\n const onStateChange = (state: CallAdapterState): void => {\n if (!mounted.current) {\n return;\n }\n const newProps = selector(adaptState(state), selectorProps ?? callConfigProps);\n if (propRef.current !== newProps) {\n setProps(newProps);\n }\n };\n adapter.onStateChange(onStateChange);\n return () => {\n adapter.offStateChange(onStateChange);\n };\n }, [adaptState, adapter, selector, selectorProps, callConfigProps]);\n return props;\n};\n\nconst memoizeState = memoizeOne(\n (\n userId: CommunicationIdentifierKind,\n deviceManager: DeviceManagerState,\n calls: { [key: string]: CallState },\n latestErrors: CallErrors,\n displayName?: string,\n alternateCallerId?: string,\n environmentInfo?: undefined | /* @conditional-compile-remove(unsupported-browser) */ EnvironmentInfo\n ): CallClientState => ({\n userId,\n incomingCalls: {},\n incomingCallsEnded: {},\n callsEnded: {},\n deviceManager,\n callAgent: { displayName },\n calls,\n latestErrors,\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo\n })\n);\n\nconst memoizeCalls = memoizeOne((call?: CallState): { [key: string]: CallState } => (call ? { [call.id]: call } : {}));\n\nconst adaptCompositeState = (compositeState: CallAdapterState): CallClientState => {\n return memoizeState(\n compositeState.userId,\n compositeState.devices,\n memoizeCalls(compositeState.call),\n // This is an unsafe type expansion.\n // compositeState.latestErrors can contain properties that are not valid in CallErrors.\n //\n // But there is no way to check for valid property names at runtime:\n // - The set of valid property names is built from types in the @azure/communication-calling.\n // Thus we don't have a literal array of allowed strings at runtime.\n // - Due to minification / uglification, the property names from the objects at runtime can't be used\n // to compare against permissible values inferred from the types.\n //\n // This is not a huge problem -- it simply means that our adapted selector will include some extra operations\n // that are unknown to the UI component and data binding libraries. Generic handling of the errors (e.g.,\n // just displaying them in some UI surface) will continue to work for these operations. Handling of\n // specific operations (e.g., acting on errors related to permission issues) will ignore these operations.\n compositeState.latestErrors as CallErrors,\n compositeState.displayName,\n /* @conditional-compile-remove(PSTN-calls) */\n compositeState.alternateCallerId,\n /* @conditional-compile-remove(unsupported-browser) */\n compositeState.environmentInfo\n );\n};\n\"../../../../../calling-stateful-client/src\""]}
@@ -1,15 +1,15 @@
1
1
  export { CallComposite } from './CallComposite';
2
2
  export type { CallCompositeOptions, CallCompositeProps } from './CallComposite';
3
- export type { DevicePermissionRestrictions } from './CallComposite';
3
+ export type { DeviceCheckOptions } from './CallComposite';
4
+ export type { RemoteVideoTileMenuOptions } from './CallComposite';
4
5
  export type { CallControlDisplayType, CallControlOptions } from './types/CallControlOptions';
5
6
  export type { CustomCallControlButtonPlacement, CustomCallControlButtonCallback, CustomCallControlButtonCallbackArgs, CustomCallControlButtonProps, CustomControlButtonProps } from './types/CallControlOptions';
6
7
  export * from './Strings';
7
8
  export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
8
- export { createAzureCommunicationTeamsCallAdapter, createAzureCommunicationTeamsCallAdapterFromClient, useAzureCommunicationTeamsCallAdapter } from './adapter';
9
- export type { TeamsCallAdapter } from './adapter';
9
+ export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
10
+ export type { TeamsCallAdapter, TeamsCallAdapterArgs } from './adapter';
10
11
  export type { AzureCommunicationCallAdapterArgs, CallAdapterLocator, CommonCallAdapter, CallAdapterCallOperations } from './adapter';
11
12
  export type { AzureCommunicationCallAdapterOptions } from './adapter';
12
13
  export type { CallParticipantsLocator } from './adapter';
13
- export type { CallAdapterOptionalFeatures } from './adapter';
14
14
  export type { CallAdapter, CallAdapterCallEndedEvent, CallAdapterCallManagement, CallAdapterClientState, CallAdapterDeviceManagement, CallAdapterState, CallAdapterSubscribers, CallAdapterUiState, CallCompositePage, CallEndedListener, CallIdChangedListener, DiagnosticChangedEventListner, DisplayNameChangedListener, IsLocalScreenSharingActiveChangedListener, IsMutedChangedListener, IsSpeakingChangedListener, MediaDiagnosticChangedEvent, NetworkDiagnosticChangedEvent, ParticipantsJoinedListener, ParticipantsLeftListener } from './adapter';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -4,5 +4,5 @@ export { CallComposite } from './CallComposite';
4
4
  export * from './Strings';
5
5
  export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
6
6
  /* @conditional-compile-remove(teams-identity-support) */
7
- export { createAzureCommunicationTeamsCallAdapter, createAzureCommunicationTeamsCallAdapterFromClient, useAzureCommunicationTeamsCallAdapter } from './adapter';
7
+ export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAchD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EACL,wCAAwC,EACxC,kDAAkD,EAClD,qCAAqC,EACtC,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DevicePermissionRestrictions } from './CallComposite';\nexport type { CallControlDisplayType, CallControlOptions } from './types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nexport type {\n CustomCallControlButtonPlacement,\n CustomCallControlButtonCallback,\n CustomCallControlButtonCallbackArgs,\n CustomCallControlButtonProps,\n CustomControlButtonProps\n} from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n createAzureCommunicationTeamsCallAdapter,\n createAzureCommunicationTeamsCallAdapterFromClient,\n useAzureCommunicationTeamsCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter } from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations\n} from './adapter';\n\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { CallAdapterOptionalFeatures } from './adapter';\n\nexport type {\n CallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener\n} from './adapter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAgBhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { RemoteVideoTileMenuOptions } from './CallComposite';\nexport type { CallControlDisplayType, CallControlOptions } from './types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nexport type {\n CustomCallControlButtonPlacement,\n CustomCallControlButtonCallback,\n CustomCallControlButtonCallbackArgs,\n CustomCallControlButtonProps,\n CustomControlButtonProps\n} from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter, TeamsCallAdapterArgs } from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations\n} from './adapter';\n\n/* @conditional-compile-remove(rooms) */\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\nexport type {\n CallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener\n} from './adapter';\n"]}
@@ -1,6 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { DiagnosticQuality } from '@azure/communication-calling';
4
+ import { useId } from '@fluentui/react-hooks';
4
5
  import { _isInCall } from "../../../../../calling-component-bindings/src";
5
6
  import { ErrorBar } from "../../../../../react-components/src";
6
7
  import React from 'react';
@@ -34,7 +35,8 @@ export const CallPage = (props) => {
34
35
  const strings = useLocale().strings.call;
35
36
  // Reduce the controls shown when mobile view is enabled.
36
37
  const callControlOptions = mobileView ? reduceCallControlsForMobile(options === null || options === void 0 ? void 0 : options.callControls) : options === null || options === void 0 ? void 0 : options.callControls;
37
- return (React.createElement(CallArrangement, { complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }),
38
+ const drawerMenuHostId = useId('drawerMenuHost');
39
+ return (React.createElement(CallArrangement, { id: drawerMenuHostId, complianceBannerProps: Object.assign(Object.assign({}, complianceBannerProps), { strings }),
38
40
  // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.
39
41
  errorBarProps: (options === null || options === void 0 ? void 0 : options.errorBar) !== false && Object.assign(Object.assign({}, errorBarProps), { ignorePremountErrors: true }), mutedNotificationProps: mutedNotificationProps, callControlProps: {
40
42
  callInvitationURL: callInvitationURL,
@@ -45,7 +47,9 @@ export const CallPage = (props) => {
45
47
  /* @conditional-compile-remove(one-to-n-calling) */
46
48
  onFetchAvatarPersonaData: onFetchAvatarPersonaData, mobileView: mobileView,
47
49
  /* @conditional-compile-remove(one-to-n-calling) */
48
- modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData }))) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React.createElement(React.Fragment, null)), dataUiId: 'call-page' }));
50
+ modalLayerHostId: props.modalLayerHostId, onRenderGalleryContent: () => _isInCall(callStatus) ? (isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onRenderAvatar: onRenderAvatar, onFetchAvatarPersonaData: onFetchAvatarPersonaData,
51
+ /* @conditional-compile-remove(pinned-participants) */
52
+ remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenu, drawerMenuHostId: drawerMenuHostId }))) : (React.createElement(NetworkReconnectTile, Object.assign({}, networkReconnectTileProps)))) : (React.createElement(React.Fragment, null)), dataUiId: 'call-page' }));
49
53
  };
50
54
  /**
51
55
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAA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E,cAAc,EAC9B,wBAAwB,EAAE,wBAAwB,IAClD,CACH,CAAC,CAAC,CAAC,CACF,oBAAC,oBAAoB,oBAAK,yBAAyB,EAAI,CACxD,CACF,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,EAEH,QAAQ,EAAE,WAAW,GACrB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ErrorBar, OnRenderAvatarCallback, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport React from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n callInvitationURL?: string;\n onRenderAvatar?: OnRenderAvatarCallback;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: CallCompositeOptions;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onRenderAvatar,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n return (\n <CallArrangement\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.\n errorBarProps={options?.errorBar !== false && { ...errorBarProps, ignorePremountErrors: true }}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n /* @conditional-compile-remove(one-to-n-calling) */\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onRenderAvatar={onRenderAvatar}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n />\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n dataUiId={'call-page'}\n />\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAE,QAAQ,EAAwD,4CAAmC;AAC5G,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,wBAAwB,E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KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ErrorBar, OnRenderAvatarCallback, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport React from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n callInvitationURL?: string;\n onRenderAvatar?: OnRenderAvatarCallback;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: CallCompositeOptions;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onRenderAvatar,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n\n return (\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n // Ignore errors from before current call. This avoids old errors from showing up when a user re-joins a call.\n errorBarProps={options?.errorBar !== false && { ...errorBarProps, ignorePremountErrors: true }}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n /* @conditional-compile-remove(one-to-n-calling) */\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onRenderAvatar={onRenderAvatar}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenu}\n drawerMenuHostId={drawerMenuHostId}\n />\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n dataUiId={'call-page'}\n />\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
@@ -1,18 +1,18 @@
1
1
  /// <reference types="react" />
2
- import { DevicePermissionRestrictions } from '../CallComposite';
2
+ import { DeviceCheckOptions } from '../CallComposite';
3
3
  /**
4
4
  * @private
5
5
  */
6
6
  export interface ConfigurationPageProps {
7
7
  mobileView: boolean;
8
8
  startCallHandler(): void;
9
- devicePermissions?: DevicePermissionRestrictions;
9
+ modalLayerHostId: string;
10
+ deviceChecks?: DeviceCheckOptions;
10
11
  onPermissionsTroubleshootingClick?: (permissionsState: {
11
12
  camera: PermissionState;
12
13
  microphone: PermissionState;
13
14
  }) => void;
14
15
  onNetworkingTroubleShootingClick?: () => void;
15
- callReadinessOptedIn?: boolean;
16
16
  }
17
17
  /**
18
18
  * @private
@@ -20,7 +20,7 @@ import { useLocale } from '../../localization';
20
20
  import { bannerNotificationStyles } from '../styles/CallPage.styles';
21
21
  import { usePropsFor } from '../hooks/usePropsFor';
22
22
  import { useAdapter } from '../adapter/CallAdapterProvider';
23
- import { ConfigurationpageErrorBar } from '../components/ConfigurationpageErrorBar';
23
+ import { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';
24
24
  /* @conditional-compile-remove(call-readiness) */
25
25
  import { getDevicePermissionState } from '../utils';
26
26
  /* @conditional-compile-remove(call-readiness) */
@@ -31,10 +31,10 @@ import { CallReadinessModal, CallReadinessModalFallBack } from '../components/Ca
31
31
  export const ConfigurationPage = (props) => {
32
32
  var _a, _b;
33
33
  const { startCallHandler, mobileView,
34
- /* @conditional-compile-remove(call-readiness) */ devicePermissions,
34
+ /* @conditional-compile-remove(call-readiness) */ modalLayerHostId,
35
+ /* @conditional-compile-remove(call-readiness) */ deviceChecks,
35
36
  /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,
36
- /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick,
37
- /* @conditional-compile-remove(call-readiness) */ callReadinessOptedIn = false } = props;
37
+ /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick } = props;
38
38
  const options = useAdaptedSelector(getCallingSelector(DevicesButton));
39
39
  const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);
40
40
  const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);
@@ -48,13 +48,15 @@ export const ConfigurationPage = (props) => {
48
48
  let errorBarProps = usePropsFor(ErrorBar);
49
49
  const adapter = useAdapter();
50
50
  const deviceState = adapter.getState().devices;
51
+ /* @conditional-compile-remove(unsupported-browser) */
52
+ const environmentInfo = adapter.getState().environmentInfo;
51
53
  let disableStartCallButton = !microphonePermissionGranted || ((_a = deviceState.microphones) === null || _a === void 0 ? void 0 : _a.length) === 0;
52
54
  /* @conditional-compile-remove(rooms) */
53
55
  const rolePermissions = _usePermissions();
54
56
  /* @conditional-compile-remove(rooms) */
55
57
  // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK
56
58
  if (!rolePermissions.cameraButton) {
57
- errorBarProps = Object.assign(Object.assign({}, errorBarProps), { activeErrorMessages: errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied') });
59
+ errorBarProps = Object.assign(Object.assign({}, errorBarProps), { activeErrorMessages: errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari') });
58
60
  }
59
61
  /* @conditional-compile-remove(rooms) */
60
62
  if (!rolePermissions.microphoneButton) {
@@ -63,13 +65,13 @@ export const ConfigurationPage = (props) => {
63
65
  disableStartCallButton = false;
64
66
  }
65
67
  /* @conditional-compile-remove(call-readiness) */
66
- // Overrides role permissions if CallCompositeOptions devicePermissions are set
67
- if (devicePermissions) {
68
- if (['doNotPrompt', 'optional'].includes(devicePermissions.camera) &&
69
- ['doNotPrompt', 'optional'].includes(devicePermissions.microphone)) {
68
+ // Overrides role permissions if CallCompositeOptions deviceChecks are set
69
+ if (deviceChecks) {
70
+ if (['doNotPrompt', 'optional'].includes(deviceChecks.camera) &&
71
+ ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)) {
70
72
  disableStartCallButton = false;
71
73
  }
72
- else if (devicePermissions.camera === 'required') {
74
+ else if (deviceChecks.camera === 'required') {
73
75
  disableStartCallButton = !cameraPermissionGranted || ((_b = deviceState.cameras) === null || _b === void 0 ? void 0 : _b.length) === 0;
74
76
  }
75
77
  }
@@ -82,8 +84,24 @@ export const ConfigurationPage = (props) => {
82
84
  /* @conditional-compile-remove(call-readiness) */
83
85
  const permissionsState = {
84
86
  // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported
85
- camera: videoState && videoState !== 'unsupported' ? videoState : cameraPermissionGranted ? 'granted' : 'denied',
86
- microphone: audioState && audioState !== 'unsupported' ? audioState : microphonePermissionGranted ? 'granted' : 'denied'
87
+ camera: videoState && videoState !== 'unsupported'
88
+ ? cameraPermissionGranted !== false
89
+ ? videoState
90
+ : 'denied'
91
+ : cameraPermissionGranted !== false
92
+ ? cameraPermissionGranted
93
+ ? 'granted'
94
+ : 'prompt'
95
+ : 'denied',
96
+ microphone: audioState && audioState !== 'unsupported'
97
+ ? microphonePermissionGranted !== false
98
+ ? audioState
99
+ : 'denied'
100
+ : microphonePermissionGranted !== false
101
+ ? microphonePermissionGranted
102
+ ? 'granted'
103
+ : 'prompt'
104
+ : 'denied'
87
105
  };
88
106
  /* @conditional-compile-remove(call-readiness) */
89
107
  const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');
@@ -101,7 +119,7 @@ export const ConfigurationPage = (props) => {
101
119
  const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;
102
120
  return (React.createElement(Stack, { className: mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop },
103
121
  React.createElement(Stack, { styles: bannerNotificationStyles },
104
- React.createElement(ConfigurationpageErrorBar
122
+ React.createElement(ConfigurationPageErrorBar
105
123
  /* @conditional-compile-remove(call-readiness) */
106
124
  // show trouble shooting error bar when encountering network error/ permission error
107
125
  , {
@@ -113,22 +131,25 @@ export const ConfigurationPage = (props) => {
113
131
  /* @conditional-compile-remove(call-readiness) */
114
132
  onNetworkingTroubleShootingClick: onNetworkingTroubleShootingClick,
115
133
  /* @conditional-compile-remove(call-readiness) */
116
- onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, errorBarProps: errorBarProps,
117
- /* @conditional-compile-remove(call-readiness) */
118
- callReadinessOptedIn: callReadinessOptedIn })),
134
+ onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, errorBarProps: errorBarProps })),
119
135
  /* @conditional-compile-remove(call-readiness) */
120
136
  // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values
121
- callReadinessOptedIn &&
122
- videoState &&
123
- videoState !== 'unsupported' &&
124
- audioState &&
125
- audioState !== 'unsupported' && (React.createElement(CallReadinessModal, { mobileView: mobileView, audioState: audioState, videoState: videoState, permissionsState: permissionsState, isPermissionsModalDismissed: isPermissionsModalDismissed, setIsPermissionsModalDismissed: setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick })),
137
+ videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && (React.createElement(CallReadinessModal
138
+ /* @conditional-compile-remove(call-readiness) */
139
+ , {
140
+ /* @conditional-compile-remove(call-readiness) */
141
+ modalLayerHostId: modalLayerHostId, mobileView: mobileView,
142
+ /* @conditional-compile-remove(unsupported-browser) */
143
+ environmentInfo: environmentInfo, permissionsState: permissionsState, isPermissionsModalDismissed: isPermissionsModalDismissed, setIsPermissionsModalDismissed: setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick })),
126
144
  /* @conditional-compile-remove(call-readiness) */
127
145
  // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values
128
- callReadinessOptedIn &&
129
- videoState &&
130
- audioState &&
131
- (videoState === 'unsupported' || audioState === 'unsupported') && (React.createElement(CallReadinessModalFallBack, { mobileView: mobileView, cameraPermissionGranted: cameraPermissionGranted, microphonePermissionGranted: microphonePermissionGranted, checkPermissionModalShowing: forceShowingCheckPermissions, permissionsState: permissionsState, isPermissionsModalDismissed: isPermissionsModalDismissed, setIsPermissionsModalDismissed: setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick })),
146
+ videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && (React.createElement(CallReadinessModalFallBack
147
+ /* @conditional-compile-remove(call-readiness) */
148
+ , {
149
+ /* @conditional-compile-remove(call-readiness) */
150
+ modalLayerHostId: modalLayerHostId, mobileView: mobileView, checkPermissionModalShowing: forceShowingCheckPermissions, permissionsState: permissionsState, isPermissionsModalDismissed: isPermissionsModalDismissed,
151
+ /* @conditional-compile-remove(unsupported-browser) */
152
+ environmentInfo: environmentInfo, setIsPermissionsModalDismissed: setIsPermissionsModalDismissed, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick })),
132
153
  React.createElement(Stack, { grow: true, horizontal: !mobileWithPreview, horizontalAlign: mobileWithPreview ? 'stretch' : 'center', verticalAlign: "center", tokens: mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop },
133
154
  mobileWithPreview && (React.createElement(Stack.Item, null,
134
155
  title,
@@ -144,8 +165,6 @@ export const ConfigurationPage = (props) => {
144
165
  /* @conditional-compile-remove(call-readiness) */ videoState), microphonePermissionGranted: micPermissionGrantedTrampoline(microphonePermissionGranted,
145
166
  /* @conditional-compile-remove(call-readiness) */ audioState),
146
167
  /* @conditional-compile-remove(call-readiness) */
147
- callReadinessOptedIn: callReadinessOptedIn,
148
- /* @conditional-compile-remove(call-readiness) */
149
168
  onClickEnableDevicePermission: () => {
150
169
  setIsPermissionsModalDismissed(true);
151
170
  } })))),
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,4CAAmC;AACrE,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAgB,4CAAmC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,sDAA6C;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EAC9B,kCAAkC,EAClC,iCAAiC,EACjC,uBAAuB,EACvB,oCAAoC,EACpC,mCAAmC,EACnC,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CA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CAAC,CAAC,SAAS,EACrE,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,sBAAsB,GAChC,CACI,CACF,CACF,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,UAAmB,EAAE,SAAmB,EAA2B,EAAE;IACnG,wCAAwC;IACxC,IAAI,SAAS,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,oBAAC,YAAY,IAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,GAAI,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,iCAAiC,GAAG,CACxC,uBAA4C,EAC5C,UAAwD,EACnC,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAEvG,OAAO,uBAAuB,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,8BAA8B,GAAG,CACrC,2BAAgD,EAChD,UAAwD,EACnC,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAE3G,OAAO,2BAA2B,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { DevicesButton, ErrorBar } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions, _Permissions } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Stack } from '@fluentui/react';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyleDesktop,\n configurationContainerStyleMobile,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile,\n callDetailsContainerStylesDesktop\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DevicePermissionRestrictions } from '../CallComposite';\nimport { ConfigurationpageErrorBar } from '../components/ConfigurationpageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n /* @conditional-compile-remove(call-readiness) */\n devicePermissions?: DevicePermissionRestrictions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(call-readiness) */\n callReadinessOptedIn?: boolean;\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n /* @conditional-compile-remove(call-readiness) */ devicePermissions,\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */ callReadinessOptedIn = false\n } = props;\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n\n let errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton) {\n errorBarProps = {\n ...errorBarProps,\n activeErrorMessages: errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied')\n };\n }\n /* @conditional-compile-remove(rooms) */\n if (!rolePermissions.microphoneButton) {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions devicePermissions are set\n if (devicePermissions) {\n if (\n ['doNotPrompt', 'optional'].includes(devicePermissions.camera) &&\n ['doNotPrompt', 'optional'].includes(devicePermissions.microphone)\n ) {\n disableStartCallButton = false;\n } else if (devicePermissions.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n\n const locale = useLocale();\n const title = (\n <Stack.Item className={mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop}>\n {locale.strings.call.configurationPageTitle}\n </Stack.Item>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n let mobileWithPreview = mobileView;\n /* @conditional-compile-remove(rooms) */\n mobileWithPreview = mobileWithPreview && rolePermissions.cameraButton;\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera: videoState && videoState !== 'unsupported' ? videoState : cameraPermissionGranted ? 'granted' : 'denied',\n microphone:\n audioState && audioState !== 'unsupported' ? audioState : microphonePermissionGranted ? 'granted' : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n return (\n <Stack className={mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationpageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={\n !cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0\n }\n /* @conditional-compile-remove(call-readiness) */\n permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n errorBarProps={errorBarProps}\n /* @conditional-compile-remove(call-readiness) */\n callReadinessOptedIn={callReadinessOptedIn}\n />\n </Stack>\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n callReadinessOptedIn &&\n videoState &&\n videoState !== 'unsupported' &&\n audioState &&\n audioState !== 'unsupported' && (\n <CallReadinessModal\n mobileView={mobileView}\n audioState={audioState}\n videoState={videoState}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n callReadinessOptedIn &&\n videoState &&\n audioState &&\n (videoState === 'unsupported' || audioState === 'unsupported') && (\n <CallReadinessModalFallBack\n mobileView={mobileView}\n cameraPermissionGranted={cameraPermissionGranted}\n microphonePermissionGranted={microphonePermissionGranted}\n checkPermissionModalShowing={forceShowingCheckPermissions}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n <Stack\n grow\n horizontal={!mobileWithPreview}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'center'}\n verticalAlign=\"center\"\n tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n {mobileWithPreview && (\n <Stack.Item>\n {title}\n {callDescription}\n </Stack.Item>\n )}\n {localPreviewTrampoline(\n mobileWithPreview,\n /* @conditional-compile-remove(rooms) */ !rolePermissions.cameraButton\n )}\n <Stack className={mobileView ? undefined : selectionContainerStyle}>\n {!mobileWithPreview && (\n <>\n <Stack.Item styles={callDetailsContainerStylesDesktop}>\n {title}\n {callDescription}\n </Stack.Item>\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGrantedTrampoline(\n cameraPermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ videoState\n )}\n microphonePermissionGranted={micPermissionGrantedTrampoline(\n microphonePermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ audioState\n )}\n /* @conditional-compile-remove(call-readiness) */\n callReadinessOptedIn={callReadinessOptedIn}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n />\n </>\n )}\n <Stack\n styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}\n >\n <StartCallButton\n className={mobileWithPreview ? startCallButtonStyleMobile : undefined}\n onClick={startCallHandler}\n disabled={disableStartCallButton}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n );\n};\n\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n /* @conditional-compile-remove(rooms) */\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\n\nconst cameraPermissionGrantedTrampoline = (\n cameraPermissionGranted: boolean | undefined,\n videoState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n\n return cameraPermissionGranted;\n};\n\nconst micPermissionGrantedTrampoline = (\n microphonePermissionGranted: boolean | undefined,\n audioState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n\n return microphonePermissionGranted;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
1
+ {"version":3,"file":"ConfigurationPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/ConfigurationPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,4CAAmC;AACrE,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAgB,4CAAmC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,sDAA6C;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,+BAA+B,EAC/B,8BAA8B,EAC9B,kCAAkC,EAClC,iCAAiC,EACjC,uBAAuB,EACvB,oCAAoC,EACpC,mCAAmC,EACnC,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EA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D,CAAC,UAAU,CAC7D;wBACD,iDAAiD;wBACjD,6BAA6B,EAAE,GAAG,EAAE;4BAClC,8BAA8B,CAAC,IAAI,CAAC,CAAC;wBACvC,CAAC,IACD,CACD,CACJ;gBACD,oBAAC,KAAK,IACJ,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,mCAAmC,CAAC,CAAC,CAAC,oCAAoC;oBAEtG,oBAAC,eAAe,IACd,SAAS,EAAE,iBAAiB,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,SAAS,EACrE,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,sBAAsB,GAChC,CACI,CACF,CACF,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAAC,UAAmB,EAAE,SAAmB,EAA2B,EAAE;IACnG,wCAAwC;IACxC,IAAI,SAAS,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,oBAAC,YAAY,IAAC,UAAU,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,GAAI,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,iCAAiC,GAAG,CACxC,uBAA4C,EAC5C,UAAwD,EACnC,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAEvG,OAAO,uBAAuB,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,8BAA8B,GAAG,CACrC,2BAAgD,EAChD,UAAwD,EACnC,EAAE;IACvB,iDAAiD;IACjD,OAAO,UAAU,IAAI,UAAU,KAAK,aAAa,CAAC,CAAC,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,2BAA2B,CAAC;IAE3G,OAAO,2BAA2B,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useState } from 'react';\nimport { useAdaptedSelector } from '../hooks/useAdaptedSelector';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { LocalDeviceSettings } from '../components/LocalDeviceSettings';\nimport { StartCallButton } from '../components/StartCallButton';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { useSelector } from '../hooks/useSelector';\nimport { DevicesButton, ErrorBar } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions, _Permissions } from '@internal/react-components';\nimport { getCallingSelector } from '@internal/calling-component-bindings';\nimport { Stack } from '@fluentui/react';\nimport { LocalPreview } from '../components/LocalPreview';\nimport {\n callDetailsStyleDesktop,\n callDetailsStyleMobile,\n configurationStackTokensDesktop,\n configurationStackTokensMobile,\n configurationContainerStyleDesktop,\n configurationContainerStyleMobile,\n selectionContainerStyle,\n startCallButtonContainerStyleDesktop,\n startCallButtonContainerStyleMobile,\n startCallButtonStyleMobile,\n titleContainerStyleDesktop,\n titleContainerStyleMobile,\n callDetailsContainerStylesDesktop\n} from '../styles/CallConfiguration.styles';\nimport { useLocale } from '../../localization';\nimport { bannerNotificationStyles } from '../styles/CallPage.styles';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite';\nimport { ConfigurationPageErrorBar } from '../components/ConfigurationPageErrorBar';\n/* @conditional-compile-remove(call-readiness) */\nimport { getDevicePermissionState } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nimport { CallReadinessModal, CallReadinessModalFallBack } from '../components/CallReadinessModal';\n\n/**\n * @private\n */\nexport interface ConfigurationPageProps {\n mobileView: boolean;\n startCallHandler(): void;\n /* @conditional-compile-remove(call-readiness) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n}\n\n/**\n * @private\n */\nexport const ConfigurationPage = (props: ConfigurationPageProps): JSX.Element => {\n const {\n startCallHandler,\n mobileView,\n /* @conditional-compile-remove(call-readiness) */ modalLayerHostId,\n /* @conditional-compile-remove(call-readiness) */ deviceChecks,\n /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick\n } = props;\n\n const options = useAdaptedSelector(getCallingSelector(DevicesButton));\n const localDeviceSettingsHandlers = useHandlers(LocalDeviceSettings);\n const { video: cameraPermissionGranted, audio: microphonePermissionGranted } = useSelector(devicePermissionSelector);\n /* @conditional-compile-remove(call-readiness) */\n // use permission API to get video and audio permission state\n const [videoState, setVideoState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n const [audioState, setAudioState] = useState<PermissionState | 'unsupported' | undefined>(undefined);\n /* @conditional-compile-remove(call-readiness) */\n getDevicePermissionState(setVideoState, setAudioState);\n\n let errorBarProps = usePropsFor(ErrorBar);\n const adapter = useAdapter();\n const deviceState = adapter.getState().devices;\n /* @conditional-compile-remove(unsupported-browser) */\n const environmentInfo = adapter.getState().environmentInfo;\n\n let disableStartCallButton = !microphonePermissionGranted || deviceState.microphones?.length === 0;\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton) {\n errorBarProps = {\n ...errorBarProps,\n activeErrorMessages: errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n /* @conditional-compile-remove(rooms) */\n if (!rolePermissions.microphoneButton) {\n // If user's role permissions do not allow access to the microphone button then DO NOT disable the start call button\n // because microphone device permission is not needed for the user's role\n disableStartCallButton = false;\n }\n\n /* @conditional-compile-remove(call-readiness) */\n // Overrides role permissions if CallCompositeOptions deviceChecks are set\n if (deviceChecks) {\n if (\n ['doNotPrompt', 'optional'].includes(deviceChecks.camera) &&\n ['doNotPrompt', 'optional'].includes(deviceChecks.microphone)\n ) {\n disableStartCallButton = false;\n } else if (deviceChecks.camera === 'required') {\n disableStartCallButton = !cameraPermissionGranted || deviceState.cameras?.length === 0;\n }\n }\n\n const locale = useLocale();\n const title = (\n <Stack.Item className={mobileView ? titleContainerStyleMobile : titleContainerStyleDesktop}>\n {locale.strings.call.configurationPageTitle}\n </Stack.Item>\n );\n\n const callDescription = locale.strings.call.configurationPageCallDetails && (\n <Stack.Item className={mobileView ? callDetailsStyleMobile : callDetailsStyleDesktop}>\n {locale.strings.call.configurationPageCallDetails}\n </Stack.Item>\n );\n\n let mobileWithPreview = mobileView;\n /* @conditional-compile-remove(rooms) */\n mobileWithPreview = mobileWithPreview && rolePermissions.cameraButton;\n\n /* @conditional-compile-remove(call-readiness) */\n const permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n } = {\n // fall back to using cameraPermissionGranted and microphonePermissionGranted if permission API is not supported\n camera:\n videoState && videoState !== 'unsupported'\n ? cameraPermissionGranted !== false\n ? videoState\n : 'denied'\n : cameraPermissionGranted !== false\n ? cameraPermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied',\n microphone:\n audioState && audioState !== 'unsupported'\n ? microphonePermissionGranted !== false\n ? audioState\n : 'denied'\n : microphonePermissionGranted !== false\n ? microphonePermissionGranted\n ? 'granted'\n : 'prompt'\n : 'denied'\n };\n /* @conditional-compile-remove(call-readiness) */\n const networkErrors = errorBarProps.activeErrorMessages.filter((message) => message.type === 'callNetworkQualityLow');\n\n /* @conditional-compile-remove(call-readiness) */\n const [isPermissionsModalDismissed, setIsPermissionsModalDismissed] = useState(true);\n\n // When permission API is not available, we want to show screen saying checking for access (disappears on its own)\n // then based on permission setting, we show permission denied or nothing\n /* @conditional-compile-remove(call-readiness) */\n const [minimumFallbackTimerElapsed, setMinimumFallbackTimerElapsed] = useState(false);\n /* @conditional-compile-remove(call-readiness) */\n setTimeout(() => {\n setMinimumFallbackTimerElapsed(true);\n }, 2000);\n /* @conditional-compile-remove(call-readiness) */\n const forceShowingCheckPermissions = !minimumFallbackTimerElapsed;\n\n return (\n <Stack className={mobileView ? configurationContainerStyleMobile : configurationContainerStyleDesktop}>\n <Stack styles={bannerNotificationStyles}>\n <ConfigurationPageErrorBar\n /* @conditional-compile-remove(call-readiness) */\n // show trouble shooting error bar when encountering network error/ permission error\n showTroubleShootingErrorBar={\n !cameraPermissionGranted || !microphonePermissionGranted || networkErrors.length > 0\n }\n /* @conditional-compile-remove(call-readiness) */\n permissionsState={permissionsState}\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick={onNetworkingTroubleShootingClick}\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n errorBarProps={errorBarProps}\n />\n </Stack>\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is availible (not unsupported) and videoState, audioState is assigned values\n videoState && videoState !== 'unsupported' && audioState && audioState !== 'unsupported' && (\n <CallReadinessModal\n /* @conditional-compile-remove(call-readiness) */\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n {\n /* @conditional-compile-remove(call-readiness) */\n // show the following screen if permission API is not availible (unsupported) and videoState, audioState is assigned values\n videoState && audioState && (videoState === 'unsupported' || audioState === 'unsupported') && (\n <CallReadinessModalFallBack\n /* @conditional-compile-remove(call-readiness) */\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n checkPermissionModalShowing={forceShowingCheckPermissions}\n permissionsState={permissionsState}\n isPermissionsModalDismissed={isPermissionsModalDismissed}\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo={environmentInfo}\n setIsPermissionsModalDismissed={setIsPermissionsModalDismissed}\n onPermissionsTroubleshootingClick={onPermissionsTroubleshootingClick}\n />\n )\n }\n\n <Stack\n grow\n horizontal={!mobileWithPreview}\n horizontalAlign={mobileWithPreview ? 'stretch' : 'center'}\n verticalAlign=\"center\"\n tokens={mobileWithPreview ? configurationStackTokensMobile : configurationStackTokensDesktop}\n >\n {mobileWithPreview && (\n <Stack.Item>\n {title}\n {callDescription}\n </Stack.Item>\n )}\n {localPreviewTrampoline(\n mobileWithPreview,\n /* @conditional-compile-remove(rooms) */ !rolePermissions.cameraButton\n )}\n <Stack className={mobileView ? undefined : selectionContainerStyle}>\n {!mobileWithPreview && (\n <>\n <Stack.Item styles={callDetailsContainerStylesDesktop}>\n {title}\n {callDescription}\n </Stack.Item>\n <LocalDeviceSettings\n {...options}\n {...localDeviceSettingsHandlers}\n cameraPermissionGranted={cameraPermissionGrantedTrampoline(\n cameraPermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ videoState\n )}\n microphonePermissionGranted={micPermissionGrantedTrampoline(\n microphonePermissionGranted,\n /* @conditional-compile-remove(call-readiness) */ audioState\n )}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={() => {\n setIsPermissionsModalDismissed(true);\n }}\n />\n </>\n )}\n <Stack\n styles={mobileWithPreview ? startCallButtonContainerStyleMobile : startCallButtonContainerStyleDesktop}\n >\n <StartCallButton\n className={mobileWithPreview ? startCallButtonStyleMobile : undefined}\n onClick={startCallHandler}\n disabled={disableStartCallButton}\n />\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n );\n};\n\nconst localPreviewTrampoline = (mobileView: boolean, doNotShow?: boolean): JSX.Element | undefined => {\n /* @conditional-compile-remove(rooms) */\n if (doNotShow) {\n return undefined;\n }\n return <LocalPreview mobileView={mobileView} showDevicesButton={mobileView} />;\n};\n\nconst cameraPermissionGrantedTrampoline = (\n cameraPermissionGranted: boolean | undefined,\n videoState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return videoState && videoState !== 'unsupported' ? videoState === 'granted' : cameraPermissionGranted;\n\n return cameraPermissionGranted;\n};\n\nconst micPermissionGrantedTrampoline = (\n microphonePermissionGranted: boolean | undefined,\n audioState?: PermissionState | 'unsupported' | undefined\n): boolean | undefined => {\n /* @conditional-compile-remove(call-readiness) */\n return audioState && audioState !== 'unsupported' ? audioState === 'granted' : microphonePermissionGranted;\n\n return microphonePermissionGranted;\n};\n\"../../../../../react-components/src\"\"../../../../../calling-component-bindings/src\""]}
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
+ import { EnvironmentInfo } from '@azure/communication-calling';
2
3
  /**
3
4
  * @internal
4
5
  */
5
6
  export declare type UnsupportedBrowserPageProps = {
6
7
  onTroubleshootingClick?: () => void;
8
+ environmentInfo?: EnvironmentInfo;
7
9
  };
8
10
  /**
9
11
  *
@@ -1,29 +1,50 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
- /* @conditional-compile-remove(unsupported-browser) */
4
3
  import { Stack } from '@fluentui/react';
5
4
  /* @conditional-compile-remove(unsupported-browser) */
6
- import { UnsupportedBrowser } from "../../../../../react-components/src";
5
+ import { UnsupportedBrowser, UnsupportedBrowserVersion, UnsupportedOperatingSystem } from "../../../../../react-components/src";
7
6
  import React from 'react';
8
7
  /* @conditional-compile-remove(unsupported-browser) */
9
8
  import { useLocale } from '../../localization';
9
+ /* @conditional-compile-remove(unsupported-browser) */
10
+ import { useAdapter } from '../adapter/CallAdapterProvider';
10
11
  /**
11
12
  *
12
13
  * @internal
13
14
  */
14
15
  export const UnsupportedBrowserPage = (props) => {
15
16
  /* @conditional-compile-remove(unsupported-browser) */
16
- const { onTroubleshootingClick } = props;
17
+ const { onTroubleshootingClick, environmentInfo } = props;
18
+ /* @conditional-compile-remove(unsupported-browser) */
19
+ const adapter = useAdapter();
20
+ /* @conditional-compile-remove(unsupported-browser) */
21
+ const onContinueClick = () => {
22
+ adapter.allowUnsupportedBrowserVersion();
23
+ };
17
24
  /* @conditional-compile-remove(unsupported-browser) */
18
25
  const locale = useLocale();
19
26
  /* @conditional-compile-remove(unsupported-browser) */
20
27
  const unsupportedBrowserStrings = locale.component.strings.UnsupportedBrowser;
21
28
  /* @conditional-compile-remove(unsupported-browser) */
22
- return (React.createElement(Stack, { styles: containerStyles },
23
- React.createElement(UnsupportedBrowser, { onTroubleshootingClick: onTroubleshootingClick, strings: unsupportedBrowserStrings })));
24
- return React.createElement(React.Fragment, null);
29
+ const unsupportedBrowserVersionStrings = locale.component.strings.UnsupportedBrowserVersion;
30
+ /* @conditional-compile-remove(unsupported-browser) */
31
+ const unsupportedOperatingSystemStrings = locale.component.strings.UnsupportedOperatingSystem;
32
+ let pageElement = React.createElement(React.Fragment, null);
33
+ /* @conditional-compile-remove(unsupported-browser) */
34
+ if (!(environmentInfo === null || environmentInfo === void 0 ? void 0 : environmentInfo.isSupportedPlatform)) {
35
+ pageElement = (React.createElement(UnsupportedOperatingSystem, { onTroubleshootingClick: onTroubleshootingClick, strings: unsupportedOperatingSystemStrings }));
36
+ }
37
+ else if (!(environmentInfo === null || environmentInfo === void 0 ? void 0 : environmentInfo.isSupportedBrowser)) {
38
+ pageElement = (React.createElement(UnsupportedBrowser, { onTroubleshootingClick: onTroubleshootingClick, strings: unsupportedBrowserStrings }));
39
+ }
40
+ else if (!(environmentInfo === null || environmentInfo === void 0 ? void 0 : environmentInfo.isSupportedBrowserVersion)) {
41
+ pageElement = (React.createElement(UnsupportedBrowserVersion, { onTroubleshootingClick: onTroubleshootingClick, strings: unsupportedBrowserVersionStrings, onContinueAnywayClick: onContinueClick }));
42
+ }
43
+ else {
44
+ throw new Error('There was a problem with your environment info');
45
+ }
46
+ return React.createElement(Stack, { styles: containerStyles }, pageElement);
25
47
  };
26
- /* @conditional-compile-remove(unsupported-browser) */
27
48
  const containerStyles = {
28
49
  root: {
29
50
  margin: 'auto',
@@ -1 +1 @@
1
- {"version":3,"file":"UnsupportedBrowser.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,sDAAsD;AACtD,OAAO,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtD,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,4CAAmC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAS/C;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;IACxF,sDAAsD;IACtD,MAAM,EAAE,sBAAsB,EAAE,GAAG,KAAK,CAAC;IACzC,sDAAsD;IACtD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,sDAAsD;IACtD,MAAM,yBAAyB,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,kBAAkB,CAAC;IAE9E,sDAAsD;IACtD,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,eAAe;QAC5B,oBAAC,kBAAkB,IAAC,sBAAsB,EAAE,sBAAsB,EAAE,OAAO,EAAE,yBAAyB,GAAI,CACpG,CACT,CAAC;IACF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC;AAEF,sDAAsD;AACtD,MAAM,eAAe,GAAiB;IACpC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,MAAM;KACnB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/* @conditional-compile-remove(unsupported-browser) */\nimport { IStackStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowser } from '@internal/react-components';\nimport React from 'react';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { useLocale } from '../../localization';\n\n/**\n * @internal\n */\nexport type UnsupportedBrowserPageProps = {\n onTroubleshootingClick?: () => void;\n};\n\n/**\n *\n * @internal\n */\nexport const UnsupportedBrowserPage = (props: UnsupportedBrowserPageProps): JSX.Element => {\n /* @conditional-compile-remove(unsupported-browser) */\n const { onTroubleshootingClick } = props;\n /* @conditional-compile-remove(unsupported-browser) */\n const locale = useLocale();\n /* @conditional-compile-remove(unsupported-browser) */\n const unsupportedBrowserStrings = locale.component.strings.UnsupportedBrowser;\n\n /* @conditional-compile-remove(unsupported-browser) */\n return (\n <Stack styles={containerStyles}>\n <UnsupportedBrowser onTroubleshootingClick={onTroubleshootingClick} strings={unsupportedBrowserStrings} />\n </Stack>\n );\n return <></>;\n};\n\n/* @conditional-compile-remove(unsupported-browser) */\nconst containerStyles: IStackStyles = {\n root: {\n margin: 'auto',\n paddingTop: '3rem'\n }\n};\n\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"UnsupportedBrowser.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtD,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,4CAAmC;AACvH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,sDAAsD;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,sDAAsD;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAW5D;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,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,EACzC,qBAAqB,EAAE,eAAe,GACtC,CACH,CAAC;KACH;SAAM;QACL,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;KACnE;IAED,OAAO,oBAAC,KAAK,IAAC,MAAM,EAAE,eAAe,IAAG,WAAW,CAAS,CAAC;AAC/D,CAAC,CAAC;AAEF,MAAM,eAAe,GAAiB;IACpC,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,MAAM;KACnB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { IStackStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowser, UnsupportedBrowserVersion, UnsupportedOperatingSystem } from '@internal/react-components';\nimport React from 'react';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n\n/**\n * @internal\n */\nexport type UnsupportedBrowserPageProps = {\n onTroubleshootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n};\n\n/**\n *\n * @internal\n */\nexport const UnsupportedBrowserPage = (props: UnsupportedBrowserPageProps): JSX.Element => {\n /* @conditional-compile-remove(unsupported-browser) */\n const { onTroubleshootingClick, environmentInfo } = props;\n /* @conditional-compile-remove(unsupported-browser) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(unsupported-browser) */\n const onContinueClick = (): void => {\n adapter.allowUnsupportedBrowserVersion();\n };\n\n /* @conditional-compile-remove(unsupported-browser) */\n const locale = useLocale();\n /* @conditional-compile-remove(unsupported-browser) */\n const unsupportedBrowserStrings = locale.component.strings.UnsupportedBrowser;\n /* @conditional-compile-remove(unsupported-browser) */\n const unsupportedBrowserVersionStrings = locale.component.strings.UnsupportedBrowserVersion;\n /* @conditional-compile-remove(unsupported-browser) */\n const unsupportedOperatingSystemStrings = locale.component.strings.UnsupportedOperatingSystem;\n\n let pageElement: JSX.Element | undefined = <></>;\n /* @conditional-compile-remove(unsupported-browser) */\n if (!environmentInfo?.isSupportedPlatform) {\n pageElement = (\n <UnsupportedOperatingSystem\n onTroubleshootingClick={onTroubleshootingClick}\n strings={unsupportedOperatingSystemStrings}\n />\n );\n } else if (!environmentInfo?.isSupportedBrowser) {\n pageElement = (\n <UnsupportedBrowser onTroubleshootingClick={onTroubleshootingClick} strings={unsupportedBrowserStrings} />\n );\n } else if (!environmentInfo?.isSupportedBrowserVersion) {\n pageElement = (\n <UnsupportedBrowserVersion\n onTroubleshootingClick={onTroubleshootingClick}\n strings={unsupportedBrowserVersionStrings}\n onContinueAnywayClick={onContinueClick}\n />\n );\n } else {\n throw new Error('There was a problem with your environment info');\n }\n\n return <Stack styles={containerStyles}>{pageElement}</Stack>;\n};\n\nconst containerStyles: IStackStyles = {\n root: {\n margin: 'auto',\n paddingTop: '3rem'\n }\n};\n\"../../../../../react-components/src\""]}
@@ -7,4 +7,11 @@ export declare const mediaGallerySelector: reselect.OutputSelector<import("../..
7
7
  }, (res: import("../../../../../communication-react/src/index").LocalVideoStreamState[] | undefined) => {
8
8
  isVideoStreamOn: boolean;
9
9
  }>;
10
+ /**
11
+ * Custom selector for this hook to retrieve all the participants that are currently
12
+ * connected to the call.
13
+ */
14
+ export declare const getRemoteParticipantsConnectedSelector: reselect.OutputSelector<import("../../../../../communication-react/src/index").CallAdapterState, import("../../../../../communication-react/src/index").RemoteParticipantState[], (res: {
15
+ [keys: string]: import("../../../../../communication-react/src/index").RemoteParticipantState;
16
+ } | undefined) => import("../../../../../communication-react/src/index").RemoteParticipantState[]>;
10
17
  //# sourceMappingURL=mediaGallerySelector.d.ts.map