@azure/communication-react 1.5.1-beta.1 → 1.5.1-beta.2

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 (253) hide show
  1. package/CHANGELOG.beta.md +76 -1
  2. package/CHANGELOG.json +621 -0
  3. package/dist/communication-react.d.ts +217 -7
  4. package/dist/dist-cjs/communication-react/index.js +2207 -1184
  5. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  10. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +4 -0
  11. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +37 -1
  12. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +22 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  15. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +14 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +44 -0
  17. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  18. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  19. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +21 -0
  20. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  21. package/dist/dist-esm/calling-stateful-client/src/Converter.js +1 -0
  22. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  23. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +13 -1
  24. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +8 -1
  25. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  26. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +4 -0
  27. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +28 -0
  28. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  29. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.d.ts +29 -0
  30. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +54 -0
  31. package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +1 -0
  32. package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +16 -29
  33. package/dist/dist-esm/calling-stateful-client/src/Logger.js +16 -29
  34. package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
  35. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +137 -370
  38. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.d.ts +17 -0
  40. package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js +198 -0
  41. package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js.map +1 -0
  42. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
  43. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  44. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +1 -1
  45. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  46. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +10 -2
  47. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  48. package/dist/dist-esm/communication-react/src/index.d.ts +2 -0
  49. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +16 -0
  51. package/dist/dist-esm/react-components/src/components/CameraButton.js +38 -1
  52. package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +30 -0
  54. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +47 -0
  55. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -0
  56. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +6 -1
  57. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
  59. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +1 -1
  61. package/dist/dist-esm/react-components/src/components/DevicesButton.js +79 -55
  62. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +4 -0
  64. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/HorizontalGallery.d.ts +4 -0
  66. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +29 -24
  67. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -2
  69. package/dist/dist-esm/react-components/src/components/MessageThread.js +24 -11
  70. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +12 -0
  72. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +29 -1
  73. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
  75. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
  77. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.d.ts +4 -2
  79. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js +6 -42
  80. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.d.ts +35 -0
  82. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js +32 -0
  83. package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js.map +1 -0
  84. package/dist/dist-esm/react-components/src/components/SendBox.js +5 -2
  85. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/VerticalGallery.d.ts +67 -0
  87. package/dist/dist-esm/react-components/src/components/VerticalGallery.js +113 -0
  88. package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -0
  89. package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +21 -0
  90. package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js +65 -0
  91. package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js.map +1 -0
  92. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +75 -0
  93. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +44 -0
  94. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -0
  95. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +88 -0
  96. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +80 -0
  97. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -0
  98. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +1 -1
  99. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +55 -19
  100. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +10 -3
  102. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +11 -9
  103. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +1 -1
  105. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +81 -24
  106. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +11 -1
  108. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  109. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +21 -0
  110. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +63 -0
  111. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -0
  112. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +2 -1
  113. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +8 -2
  114. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +32 -7
  116. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +28 -12
  117. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  118. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +2 -2
  119. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +4 -1
  121. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +8 -7
  122. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
  123. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +64 -0
  124. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +79 -0
  125. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -0
  126. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.d.ts +25 -0
  127. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js +94 -0
  128. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js.map +1 -0
  129. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -4
  130. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +58 -49
  131. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +25 -0
  133. package/dist/dist-esm/react-components/src/components/VideoGallery.js +32 -4
  134. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -12
  136. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/index.d.ts +8 -0
  138. package/dist/dist-esm/react-components/src/components/index.js +4 -0
  139. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  140. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +13 -0
  141. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +35 -0
  142. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js.map +1 -0
  143. package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js +1 -0
  144. package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +2 -2
  146. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +30 -2
  147. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.d.ts +32 -0
  149. package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js +66 -0
  150. package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js.map +1 -0
  151. package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.d.ts +11 -0
  152. package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js +22 -0
  153. package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js.map +1 -0
  154. package/dist/dist-esm/react-components/src/components/utils/responsive.d.ts +6 -0
  155. package/dist/dist-esm/react-components/src/components/utils/responsive.js +7 -0
  156. package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/utils.d.ts +5 -0
  158. package/dist/dist-esm/react-components/src/components/utils.js +20 -0
  159. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +6 -14
  161. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
  162. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +10 -4
  163. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +7 -2
  164. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +5 -0
  166. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +14 -3
  168. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +14 -3
  169. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +14 -3
  170. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +14 -3
  171. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +14 -3
  172. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +14 -3
  173. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +14 -3
  174. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +14 -3
  175. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +14 -3
  176. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +14 -3
  177. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +14 -3
  178. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +14 -3
  179. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +14 -3
  180. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +14 -3
  181. package/dist/dist-esm/react-components/src/theming/icons.d.ts +7 -0
  182. package/dist/dist-esm/react-components/src/theming/icons.js +19 -7
  183. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -0
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +27 -2
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +42 -0
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +8 -2
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +1 -1
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -3
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +1 -1
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +5 -4
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +3 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -5
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +1 -31
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +12 -0
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +3 -3
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +11 -1
  214. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  215. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +1 -0
  216. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +12 -8
  217. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +16 -3
  219. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +49 -43
  220. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -1
  221. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
  222. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +24 -0
  223. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +19 -0
  225. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +4 -0
  227. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +18 -0
  228. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  229. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +2 -0
  230. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +47 -26
  231. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -1
  232. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +4 -4
  233. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +5 -3
  236. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  237. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +16 -1
  238. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
  240. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +11 -0
  242. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +19 -0
  243. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -0
  244. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +7 -0
  245. package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -4
  246. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.d.ts +7 -0
  248. package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js +9 -0
  249. package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js.map +1 -0
  250. package/package.json +12 -12
  251. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +0 -14
  252. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +0 -19
  253. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +0 -1
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { _VideoEffectsItemProps } from './VideoEffectsItem';
3
+ /**
4
+ * 'None' Video Effects Item.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare const _VideoEffectsItemNoBackground: (props: _VideoEffectsItemProps) => JSX.Element;
9
+ /**
10
+ * 'Blur' Video Effects Item.
11
+ *
12
+ * @internal
13
+ */
14
+ export declare const _VideoEffectsItemBlur: (props: _VideoEffectsItemProps) => JSX.Element;
15
+ /**
16
+ * 'Add Image' Video Effects Item.
17
+ *
18
+ * @internal
19
+ */
20
+ export declare const _VideoEffectsItemAddImage: (props: _VideoEffectsItemProps) => JSX.Element;
21
+ //# sourceMappingURL=PresetVideoEffectsItems.d.ts.map
@@ -0,0 +1,65 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import React from 'react';
4
+ import { _VideoEffectsItem } from './VideoEffectsItem';
5
+ /**
6
+ * 'None' Video Effects Item.
7
+ *
8
+ * @internal
9
+ */
10
+ export const _VideoEffectsItemNoBackground = (props) => {
11
+ const derivedProps = deriveProps(props, {
12
+ iconName: 'VideoEffectsNone',
13
+ title: 'None',
14
+ tooltipContent: 'Remove Background',
15
+ ariaLabel: 'Remove Background'
16
+ });
17
+ return React.createElement(_VideoEffectsItem, Object.assign({}, derivedProps));
18
+ };
19
+ /**
20
+ * 'Blur' Video Effects Item.
21
+ *
22
+ * @internal
23
+ */
24
+ export const _VideoEffectsItemBlur = (props) => {
25
+ const derivedProps = deriveProps(props, {
26
+ iconName: 'VideoEffectsBlur',
27
+ title: 'Blurred',
28
+ tooltipContent: 'Blur Background',
29
+ ariaLabel: 'Blur Background'
30
+ });
31
+ return React.createElement(_VideoEffectsItem, Object.assign({}, derivedProps));
32
+ };
33
+ /**
34
+ * 'Add Image' Video Effects Item.
35
+ *
36
+ * @internal
37
+ */
38
+ export const _VideoEffectsItemAddImage = (props) => {
39
+ const derivedProps = deriveProps(props, {
40
+ iconName: 'VideoEffectsAddImage',
41
+ title: 'Image',
42
+ tooltipContent: 'Upload Background Image',
43
+ ariaLabel: 'Upload Background Image'
44
+ });
45
+ return React.createElement(_VideoEffectsItem, Object.assign({}, derivedProps));
46
+ };
47
+ /** Applies fallbacks if props were not specified */
48
+ const deriveProps = (props, fallbacks) => {
49
+ var _a, _b, _c, _d, _e, _f, _g, _h;
50
+ const iconProps = (_a = props.iconProps) !== null && _a !== void 0 ? _a : {
51
+ iconName: fallbacks.iconName
52
+ };
53
+ const title = (_b = props.title) !== null && _b !== void 0 ? _b : fallbacks.title;
54
+ const tooltipProps = (_c = props.tooltipProps) !== null && _c !== void 0 ? _c : {
55
+ content: (_d = props.title) !== null && _d !== void 0 ? _d : fallbacks.tooltipContent
56
+ };
57
+ const ariaLabel = ((_e = props.ariaLabel) !== null && _e !== void 0 ? _e : typeof ((_f = props.tooltipProps) === null || _f === void 0 ? void 0 : _f.content) === 'string')
58
+ ? typeof ((_g = props.tooltipProps) === null || _g === void 0 ? void 0 : _g.content)
59
+ : (_h = props.title) !== null && _h !== void 0 ? _h : fallbacks.ariaLabel;
60
+ return Object.assign(Object.assign({}, props), { iconProps,
61
+ title,
62
+ tooltipProps,
63
+ ariaLabel });
64
+ };
65
+ //# sourceMappingURL=PresetVideoEffectsItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PresetVideoEffectsItems.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/PresetVide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AC,SAAS,mCAAI;QACnC,QAAQ,EAAE,SAAS,CAAC,QAAQ;KAC7B,CAAC;IACF,MAAM,KAAK,GAAG,MAAA,KAAK,CAAC,KAAK,mCAAI,SAAS,CAAC,KAAK,CAAC;IAC7C,MAAM,YAAY,GAAG,MAAA,KAAK,CAAC,YAAY,mCAAI;QACzC,OAAO,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,SAAS,CAAC,cAAc;KACjD,CAAC;IACF,MAAM,SAAS,GACb,CAAA,MAAA,KAAK,CAAC,SAAS,mCAAI,OAAO,CAAA,MAAA,KAAK,CAAC,YAAY,0CAAE,OAAO,CAAA,KAAK,QAAQ;QAChE,CAAC,CAAC,OAAO,CAAA,MAAA,KAAK,CAAC,YAAY,0CAAE,OAAO,CAAA;QACpC,CAAC,CAAC,MAAA,KAAK,CAAC,KAAK,mCAAI,SAAS,CAAC,SAAS,CAAC;IAEzC,uCACK,KAAK,KACR,SAAS;QACT,KAAK;QACL,YAAY;QACZ,SAAS,IACT;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport { _VideoEffectsItem, _VideoEffectsItemProps } from './VideoEffectsItem';\n\n/**\n * 'None' Video Effects Item.\n *\n * @internal\n */\nexport const _VideoEffectsItemNoBackground = (props: _VideoEffectsItemProps): JSX.Element => {\n const derivedProps = deriveProps(props, {\n iconName: 'VideoEffectsNone',\n title: 'None',\n tooltipContent: 'Remove Background',\n ariaLabel: 'Remove Background'\n });\n\n return <_VideoEffectsItem {...derivedProps} />;\n};\n\n/**\n * 'Blur' Video Effects Item.\n *\n * @internal\n */\nexport const _VideoEffectsItemBlur = (props: _VideoEffectsItemProps): JSX.Element => {\n const derivedProps = deriveProps(props, {\n iconName: 'VideoEffectsBlur',\n title: 'Blurred',\n tooltipContent: 'Blur Background',\n ariaLabel: 'Blur Background'\n });\n\n return <_VideoEffectsItem {...derivedProps} />;\n};\n\n/**\n * 'Add Image' Video Effects Item.\n *\n * @internal\n */\nexport const _VideoEffectsItemAddImage = (props: _VideoEffectsItemProps): JSX.Element => {\n const derivedProps = deriveProps(props, {\n iconName: 'VideoEffectsAddImage',\n title: 'Image',\n tooltipContent: 'Upload Background Image',\n ariaLabel: 'Upload Background Image'\n });\n\n return <_VideoEffectsItem {...derivedProps} />;\n};\n\n/** Applies fallbacks if props were not specified */\nconst deriveProps = (\n props: _VideoEffectsItemProps,\n fallbacks: {\n iconName: string;\n title: string;\n tooltipContent: string;\n ariaLabel: string;\n }\n): _VideoEffectsItemProps => {\n const iconProps = props.iconProps ?? {\n iconName: fallbacks.iconName\n };\n const title = props.title ?? fallbacks.title;\n const tooltipProps = props.tooltipProps ?? {\n content: props.title ?? fallbacks.tooltipContent\n };\n const ariaLabel =\n props.ariaLabel ?? typeof props.tooltipProps?.content === 'string'\n ? typeof props.tooltipProps?.content\n : props.title ?? fallbacks.ariaLabel;\n\n return {\n ...props,\n iconProps,\n title,\n tooltipProps,\n ariaLabel\n };\n};\n"]}
@@ -0,0 +1,75 @@
1
+ /// <reference types="react" />
2
+ import { IStyle } from '@fluentui/react';
3
+ import { _VideoEffectsItemProps } from './VideoEffectsItem';
4
+ /**
5
+ * Props for {@link _VideoBackgroundEffectsPicker}
6
+ * @internal
7
+ */
8
+ export interface _VideoBackgroundEffectsPickerProps {
9
+ /**
10
+ * The options to display in the picker.
11
+ */
12
+ options: _VideoBackgroundEffectChoiceOption[];
13
+ /**
14
+ * The key of the current selected Video Background Effect.
15
+ * If you provide this, you must maintain selection state by observing onChange events and passing a new value in when changed.
16
+ */
17
+ selectedEffectKey?: string;
18
+ /**
19
+ * Callback to invoke when a Video Background Effect is selected.
20
+ * @param effectKey - The key of the Video Background Effect that was selected.
21
+ */
22
+ onChange?: (effectKey: string) => void;
23
+ /**
24
+ * The key of the Video Background Effect that is initially selected.
25
+ * Only provide this if the picker is an uncontrolled component;
26
+ * otherwise, use the `selectedEffectKey` property.
27
+ */
28
+ defaultSelectedEffectKey?: string;
29
+ /**
30
+ * The label to display for the picker.
31
+ */
32
+ label?: string;
33
+ /**
34
+ * The number of items to display per row.
35
+ * @default 3
36
+ */
37
+ itemsPerRow?: 'wrap' | number;
38
+ /**
39
+ * Styles for the picker.
40
+ */
41
+ styles?: _VideoBackgroundEffectsPickerStyles;
42
+ }
43
+ /**
44
+ * Option for the {@link _VideoBackgroundEffectsPicker}.
45
+ * @internal
46
+ */
47
+ export declare type _VideoBackgroundEffectChoiceOption = _VideoEffectsItemProps;
48
+ /**
49
+ * Styles for the {@link _VideoBackgroundEffectsPicker}.
50
+ * @internal
51
+ */
52
+ export interface _VideoBackgroundEffectsPickerStyles {
53
+ /**
54
+ * Styles for the root element.
55
+ */
56
+ root?: IStyle;
57
+ /**
58
+ * Styles for the label.
59
+ */
60
+ label?: IStyle;
61
+ /**
62
+ * Styles for the root of each row element.
63
+ */
64
+ rowRoot?: IStyle;
65
+ }
66
+ /**
67
+ * Picker for choosing a Video Background Effect.
68
+ *
69
+ * @remarks
70
+ * This functions similar to a radio group of buttons, where the user can select one of the options.
71
+ *
72
+ * @internal
73
+ */
74
+ export declare const _VideoBackgroundEffectsPicker: (props: _VideoBackgroundEffectsPickerProps) => JSX.Element;
75
+ //# sourceMappingURL=VideoBackgroundEffectsPicker.d.ts.map
@@ -0,0 +1,44 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { Label, mergeStyles, Stack } from '@fluentui/react';
4
+ import { useWarnings } from '@fluentui/react-hooks';
5
+ import React from 'react';
6
+ import { chunk } from '../utils';
7
+ import { _VideoEffectsItem } from './VideoEffectsItem';
8
+ /**
9
+ * Picker for choosing a Video Background Effect.
10
+ *
11
+ * @remarks
12
+ * This functions similar to a radio group of buttons, where the user can select one of the options.
13
+ *
14
+ * @internal
15
+ */
16
+ export const _VideoBackgroundEffectsPicker = (props) => {
17
+ var _a, _b, _c;
18
+ const [componentControlledSelectedEffectKey, setComponentControlledSelectedEffectKey] = React.useState(props.defaultSelectedEffectKey);
19
+ // Warn the developer if they use the component in an incorrect controlled way.
20
+ useWarnings({
21
+ name: 'VideoBackgroundEffectsPicker',
22
+ props,
23
+ controlledUsage: {
24
+ onChangeProp: 'onChange',
25
+ valueProp: 'selectedEffectKey',
26
+ defaultValueProp: 'defaultSelectedEffectKey'
27
+ }
28
+ });
29
+ const selectedEffect = (_a = props.selectedEffectKey) !== null && _a !== void 0 ? _a : componentControlledSelectedEffectKey;
30
+ const setSelectedEffect = (selectedEffectKey) => {
31
+ var _a;
32
+ setComponentControlledSelectedEffectKey(selectedEffectKey);
33
+ (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, selectedEffectKey);
34
+ };
35
+ const convertedOptions = props.options.map((option) => (Object.assign({ isSelected: option.key === selectedEffect, onSelect: () => setSelectedEffect(option.key) }, option)));
36
+ const optionsByRow = props.itemsPerRow === 'wrap' ? [convertedOptions] : chunk(convertedOptions, (_b = props.itemsPerRow) !== null && _b !== void 0 ? _b : 3);
37
+ return (React.createElement(Stack, { tokens: { childrenGap: '0.5rem' } },
38
+ React.createElement(Label, { className: mergeStyles((_c = props.styles) === null || _c === void 0 ? void 0 : _c.label) }, props.label),
39
+ optionsByRow.map((options, rowIndex) => {
40
+ var _a;
41
+ return (React.createElement(Stack, { className: mergeStyles((_a = props.styles) === null || _a === void 0 ? void 0 : _a.rowRoot), wrap: props.itemsPerRow === 'wrap', horizontal: true, key: rowIndex, tokens: { childrenGap: '0.5rem' } }, options.map((option) => (React.createElement(_VideoEffectsItem, Object.assign({}, option, { key: option.key }))))));
42
+ })));
43
+ };
44
+ //# sourceMappingURL=VideoBackgroundEffectsPicker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoBackgroundEffectsPicker.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,KAAK,EAAE,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,CAAC,CAAC,KAAK,CAAC,gBAAgB,EAAE,MAAA,KAAK,CAAC,WAAW,mCAAI,CAAC,CAAC,CAAC;IAEtG,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE;QACtC,oBAAC,KAAK,IAAC,SAAS,EAAE,WAAW,CAAC,MAAA,KAAK,CAAC,MAAM,0CAAE,KAAK,CAAC,IAAG,KAAK,CAAC,KAAK,CAAS;QACxE,YAAY,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;;YAAC,OAAA,CACvC,oBAAC,KAAK,IACJ,SAAS,EAAE,WAAW,CAAC,MAAA,KAAK,CAAC,MAAM,0CAAE,OAAO,CAAC,EAC7C,IAAI,EAAE,KAAK,CAAC,WAAW,KAAK,MAAM,EAClC,UAAU,QACV,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,IAEhC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,oBAAC,iBAAiB,oBAAK,MAAM,IAAE,GAAG,EAAE,MAAM,CAAC,GAAG,IAAI,CACnD,CAAC,CACI,CACT,CAAA;SAAA,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStyle, Label, mergeStyles, Stack } from '@fluentui/react';\nimport { useWarnings } from '@fluentui/react-hooks';\nimport React from 'react';\nimport { chunk } from '../utils';\nimport { _VideoEffectsItem, _VideoEffectsItemProps } from './VideoEffectsItem';\n\n/**\n * Props for {@link _VideoBackgroundEffectsPicker}\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerProps {\n /**\n * The options to display in the picker.\n */\n options: _VideoBackgroundEffectChoiceOption[];\n\n /**\n * The key of the current selected Video Background Effect.\n * If you provide this, you must maintain selection state by observing onChange events and passing a new value in when changed.\n */\n selectedEffectKey?: string;\n\n /**\n * Callback to invoke when a Video Background Effect is selected.\n * @param effectKey - The key of the Video Background Effect that was selected.\n */\n onChange?: (effectKey: string) => void;\n\n /**\n * The key of the Video Background Effect that is initially selected.\n * Only provide this if the picker is an uncontrolled component;\n * otherwise, use the `selectedEffectKey` property.\n */\n defaultSelectedEffectKey?: string;\n\n /**\n * The label to display for the picker.\n */\n label?: string;\n\n /**\n * The number of items to display per row.\n * @default 3\n */\n itemsPerRow?: 'wrap' | number;\n\n /**\n * Styles for the picker.\n */\n styles?: _VideoBackgroundEffectsPickerStyles;\n}\n\n/**\n * Option for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport type _VideoBackgroundEffectChoiceOption = _VideoEffectsItemProps;\n\n/**\n * Styles for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerStyles {\n /**\n * Styles for the root element.\n */\n root?: IStyle;\n\n /**\n * Styles for the label.\n */\n label?: IStyle;\n\n /**\n * Styles for the root of each row element.\n */\n rowRoot?: IStyle;\n}\n\n/**\n * Picker for choosing a Video Background Effect.\n *\n * @remarks\n * This functions similar to a radio group of buttons, where the user can select one of the options.\n *\n * @internal\n */\nexport const _VideoBackgroundEffectsPicker = (props: _VideoBackgroundEffectsPickerProps): JSX.Element => {\n const [componentControlledSelectedEffectKey, setComponentControlledSelectedEffectKey] = React.useState<\n string | undefined\n >(props.defaultSelectedEffectKey);\n\n // Warn the developer if they use the component in an incorrect controlled way.\n useWarnings({\n name: 'VideoBackgroundEffectsPicker',\n props,\n controlledUsage: {\n onChangeProp: 'onChange',\n valueProp: 'selectedEffectKey',\n defaultValueProp: 'defaultSelectedEffectKey'\n }\n });\n\n const selectedEffect = props.selectedEffectKey ?? componentControlledSelectedEffectKey;\n const setSelectedEffect = (selectedEffectKey: string): void => {\n setComponentControlledSelectedEffectKey(selectedEffectKey);\n props.onChange?.(selectedEffectKey);\n };\n\n const convertedOptions: _VideoEffectsItemProps[] = props.options.map((option) => ({\n isSelected: option.key === selectedEffect,\n onSelect: () => setSelectedEffect(option.key),\n ...option\n }));\n\n const optionsByRow =\n props.itemsPerRow === 'wrap' ? [convertedOptions] : chunk(convertedOptions, props.itemsPerRow ?? 3);\n\n return (\n <Stack tokens={{ childrenGap: '0.5rem' }}>\n <Label className={mergeStyles(props.styles?.label)}>{props.label}</Label>\n {optionsByRow.map((options, rowIndex) => (\n <Stack\n className={mergeStyles(props.styles?.rowRoot)}\n wrap={props.itemsPerRow === 'wrap'}\n horizontal\n key={rowIndex}\n tokens={{ childrenGap: '0.5rem' }}\n >\n {options.map((option) => (\n <_VideoEffectsItem {...option} key={option.key} />\n ))}\n </Stack>\n ))}\n </Stack>\n );\n};\n"]}
@@ -0,0 +1,88 @@
1
+ /// <reference types="react" />
2
+ import { IIconProps, IStyle, ITooltipHostProps } from '@fluentui/react';
3
+ /**
4
+ * Props for {@link _VideoEffectsItem}
5
+ *
6
+ * @internal
7
+ */
8
+ export interface _VideoEffectsItemProps {
9
+ /**
10
+ * The key of the Video Background Effect.
11
+ * This is used to identify the Video Background Effect and is returned in the onChange event.
12
+ * It must be unique within the set of options.
13
+ * @example 'blur'
14
+ */
15
+ key: string;
16
+ /**
17
+ * The text to display for the Video effects item.
18
+ */
19
+ title?: string;
20
+ /**
21
+ * Whether the Video effects item is currently in the selected state.
22
+ * @default false
23
+ */
24
+ isSelected?: boolean;
25
+ /**
26
+ * Callback to invoke when the Video effects item is selected.
27
+ */
28
+ onSelect?: (key: string) => void;
29
+ /**
30
+ * Whether the Video effects item is disabled.
31
+ * @default false
32
+ */
33
+ disabled?: boolean;
34
+ /**
35
+ * The icon to display for the Video effects item.
36
+ * @default undefined (no icon)
37
+ */
38
+ iconProps?: IIconProps;
39
+ /**
40
+ * Properties to have a Tooltip display when hovering over the Video effects item.
41
+ * @default undefined (no tooltip)
42
+ */
43
+ tooltipProps?: ITooltipHostProps;
44
+ /**
45
+ * Aria label for the Video effects item.
46
+ */
47
+ ariaLabel?: string;
48
+ /**
49
+ * Background to display for the Video effects item.
50
+ * @default undefined (no background image)
51
+ */
52
+ backgroundProps?: {
53
+ /**
54
+ * The URL of the background image.
55
+ */
56
+ url: string;
57
+ };
58
+ /**
59
+ * Styles for the Video effects item.
60
+ */
61
+ styles?: _VideoEffectsItemStyles;
62
+ }
63
+ /**
64
+ * Styles for {@link _VideoEffectsItem}
65
+ *
66
+ * @internal
67
+ */
68
+ export interface _VideoEffectsItemStyles {
69
+ /**
70
+ * Styles for the container of the Video effects item.
71
+ */
72
+ root: IStyle;
73
+ /**
74
+ * Styles for the container of the icon of the Video effects item.
75
+ */
76
+ iconContainer: IStyle;
77
+ /**
78
+ * Styles for the text container of the Video effects item.
79
+ */
80
+ textContainer: IStyle;
81
+ }
82
+ /**
83
+ * A component for displaying a Video Background Effect Option.
84
+ *
85
+ * @internal
86
+ */
87
+ export declare const _VideoEffectsItem: (props: _VideoEffectsItemProps) => JSX.Element;
88
+ //# sourceMappingURL=VideoEffectsItem.d.ts.map
@@ -0,0 +1,80 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { Icon, mergeStyles, Stack, Text, TooltipHost, useTheme } from '@fluentui/react';
4
+ import React, { useCallback } from 'react';
5
+ /**
6
+ * A component for displaying a Video Background Effect Option.
7
+ *
8
+ * @internal
9
+ */
10
+ export const _VideoEffectsItem = (props) => {
11
+ var _a, _b, _c, _d, _e, _f;
12
+ const theme = useTheme();
13
+ const isSelected = (_a = props.isSelected) !== null && _a !== void 0 ? _a : false;
14
+ const disabled = (_b = props.disabled) !== null && _b !== void 0 ? _b : false;
15
+ const backgroundImage = (_c = props.backgroundProps) === null || _c === void 0 ? void 0 : _c.url;
16
+ const containerStyles = useCallback(() => videoEffectsItemContainerStyles({
17
+ theme,
18
+ isSelected,
19
+ disabled,
20
+ backgroundImage,
21
+ backgroundPosition,
22
+ backgroundSize
23
+ }), [backgroundImage, disabled, isSelected, theme]);
24
+ return (React.createElement(TooltipHost, Object.assign({}, props.tooltipProps),
25
+ React.createElement(Stack, { key: props.key, className: mergeStyles((_d = props.styles) === null || _d === void 0 ? void 0 : _d.root), verticalAlign: "center", horizontalAlign: "center", styles: containerStyles, onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.key); }, onKeyDown: disabled
26
+ ? undefined
27
+ : (e) => {
28
+ var _a;
29
+ if (e.key === 'Enter' || e.key === ' ') {
30
+ (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.key);
31
+ }
32
+ }, tabIndex: props.disabled ? -1 : 0, "aria-label": props.ariaLabel, "aria-disabled": props.disabled, role: "button" },
33
+ props.iconProps && (React.createElement(Stack.Item, { styles: { root: (_e = props.styles) === null || _e === void 0 ? void 0 : _e.iconContainer } },
34
+ React.createElement(Icon, Object.assign({}, props.iconProps)))),
35
+ props.title && (React.createElement(Stack.Item, { styles: { root: (_f = props.styles) === null || _f === void 0 ? void 0 : _f.textContainer } },
36
+ React.createElement(Text, { variant: "small" }, props.title))))));
37
+ };
38
+ const backgroundPosition = 'center';
39
+ const backgroundSize = 'cover';
40
+ const videoEffectsItemContainerStyles = (args) => {
41
+ const borderDefaultThickness = '1px';
42
+ const borderActiveThickness = '2px';
43
+ return {
44
+ root: {
45
+ background: args.disabled ? args.theme.palette.neutralQuaternaryAlt : undefined,
46
+ backgroundImage: args.backgroundImage ? `url(${args.backgroundImage})` : undefined,
47
+ backgroundPosition: args.backgroundPosition,
48
+ backgroundSize: args.backgroundSize,
49
+ borderRadius: '0.25rem',
50
+ color: args.theme.palette.neutralPrimary,
51
+ cursor: args.disabled ? 'default' : 'pointer',
52
+ height: '3.375rem',
53
+ position: 'relative',
54
+ width: '4.83rem',
55
+ // Use :after to display a border element. This is used to prevent the background image
56
+ // resizing when the border thichkness is changed. We also want the border to be inside
57
+ // the frame of the container, i.e. we want it to expand inwards and not outwards when
58
+ // border thickness changes from hover/selection.
59
+ ':after': {
60
+ content: '""',
61
+ position: 'absolute',
62
+ boxSizing: 'border-box',
63
+ border: args.isSelected
64
+ ? `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`
65
+ : `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`,
66
+ height: '100%',
67
+ width: '100%',
68
+ borderRadius: '0.25rem'
69
+ },
70
+ ':hover': {
71
+ ':after': {
72
+ border: args.disabled && !args.isSelected
73
+ ? `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`
74
+ : `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`
75
+ }
76
+ }
77
+ }
78
+ };
79
+ };
80
+ //# sourceMappingURL=VideoEffectsItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoEffectsItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoEffectsItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,IAAI,EAMJ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AA8F3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,MAAA,KAAK,CAAC,UAAU,mCAAI,KAAK,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK,CAAC;IACzC,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,eAAe,0CAAE,GAAG,CAAC;IAEnD,MAAM,eAAe,GAAG,WAAW,CACjC,GAAG,EAAE,CACH,+BAA+B,CAAC;QAC9B,KAAK;QACL,UAAU;QACV,QAAQ;QACR,eAAe;QACf,kBAAkB;QAClB,cAAc;KACf,CAAC,EACJ,C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AO,CAAC,YAAY,EAAE;oBACrE,CAAC,CAAC,GAAG,sBAAsB,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE;gBAChF,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,MAAM;gBACb,YAAY,EAAE,SAAS;aACxB;YACD,QAAQ,EAAE;gBACR,QAAQ,EAAE;oBACR,MAAM,EACJ,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,UAAU;wBAC/B,CAAC,CAAC,GAAG,sBAAsB,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE;wBAC9E,CAAC,CAAC,GAAG,qBAAqB,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE;iBAC1E;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n Icon,\n IIconProps,\n IStackStyles,\n IStyle,\n ITheme,\n ITooltipHostProps,\n mergeStyles,\n Stack,\n Text,\n TooltipHost,\n useTheme\n} from '@fluentui/react';\nimport React, { useCallback } from 'react';\n\n/**\n * Props for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemProps {\n /**\n * The key of the Video Background Effect.\n * This is used to identify the Video Background Effect and is returned in the onChange event.\n * It must be unique within the set of options.\n * @example 'blur'\n */\n key: string;\n\n /**\n * The text to display for the Video effects item.\n */\n title?: string;\n\n /**\n * Whether the Video effects item is currently in the selected state.\n * @default false\n */\n isSelected?: boolean;\n\n /**\n * Callback to invoke when the Video effects item is selected.\n */\n onSelect?: (key: string) => void;\n\n /**\n * Whether the Video effects item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * The icon to display for the Video effects item.\n * @default undefined (no icon)\n */\n iconProps?: IIconProps;\n\n /**\n * Properties to have a Tooltip display when hovering over the Video effects item.\n * @default undefined (no tooltip)\n */\n tooltipProps?: ITooltipHostProps;\n\n /**\n * Aria label for the Video effects item.\n */\n ariaLabel?: string;\n\n /**\n * Background to display for the Video effects item.\n * @default undefined (no background image)\n */\n backgroundProps?: {\n /**\n * The URL of the background image.\n */\n url: string;\n };\n\n /**\n * Styles for the Video effects item.\n */\n styles?: _VideoEffectsItemStyles;\n}\n\n/**\n * Styles for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemStyles {\n /**\n * Styles for the container of the Video effects item.\n */\n root: IStyle;\n\n /**\n * Styles for the container of the icon of the Video effects item.\n */\n iconContainer: IStyle;\n\n /**\n * Styles for the text container of the Video effects item.\n */\n textContainer: IStyle;\n}\n\n/**\n * A component for displaying a Video Background Effect Option.\n *\n * @internal\n */\nexport const _VideoEffectsItem = (props: _VideoEffectsItemProps): JSX.Element => {\n const theme = useTheme();\n const isSelected = props.isSelected ?? false;\n const disabled = props.disabled ?? false;\n const backgroundImage = props.backgroundProps?.url;\n\n const containerStyles = useCallback(\n () =>\n videoEffectsItemContainerStyles({\n theme,\n isSelected,\n disabled,\n backgroundImage,\n backgroundPosition,\n backgroundSize\n }),\n [backgroundImage, disabled, isSelected, theme]\n );\n\n return (\n <TooltipHost {...props.tooltipProps}>\n <Stack\n key={props.key}\n className={mergeStyles(props.styles?.root)}\n verticalAlign=\"center\"\n horizontalAlign=\"center\"\n styles={containerStyles}\n onClick={disabled ? undefined : () => props.onSelect?.(props.key)}\n onKeyDown={\n disabled\n ? undefined\n : (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n props.onSelect?.(props.key);\n }\n }\n }\n tabIndex={props.disabled ? -1 : 0}\n aria-label={props.ariaLabel}\n aria-disabled={props.disabled}\n role=\"button\"\n >\n {props.iconProps && (\n <Stack.Item styles={{ root: props.styles?.iconContainer }}>\n <Icon {...props.iconProps} />\n </Stack.Item>\n )}\n {props.title && (\n <Stack.Item styles={{ root: props.styles?.textContainer }}>\n <Text variant=\"small\">{props.title}</Text>\n </Stack.Item>\n )}\n </Stack>\n </TooltipHost>\n );\n};\n\nconst backgroundPosition = 'center';\nconst backgroundSize = 'cover';\n\nconst videoEffectsItemContainerStyles = (args: {\n theme: ITheme;\n isSelected: boolean;\n disabled: boolean;\n backgroundImage?: string;\n backgroundPosition?: string;\n backgroundSize?: string;\n}): IStackStyles => {\n const borderDefaultThickness = '1px';\n const borderActiveThickness = '2px';\n return {\n root: {\n background: args.disabled ? args.theme.palette.neutralQuaternaryAlt : undefined,\n backgroundImage: args.backgroundImage ? `url(${args.backgroundImage})` : undefined,\n backgroundPosition: args.backgroundPosition,\n backgroundSize: args.backgroundSize,\n borderRadius: '0.25rem',\n color: args.theme.palette.neutralPrimary,\n cursor: args.disabled ? 'default' : 'pointer',\n height: '3.375rem',\n position: 'relative', // Used for absolute positioning of :after\n width: '4.83rem',\n // Use :after to display a border element. This is used to prevent the background image\n // resizing when the border thichkness is changed. We also want the border to be inside\n // the frame of the container, i.e. we want it to expand inwards and not outwards when\n // border thickness changes from hover/selection.\n ':after': {\n content: '\"\"',\n position: 'absolute',\n boxSizing: 'border-box',\n border: args.isSelected\n ? `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`\n : `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`,\n height: '100%',\n width: '100%',\n borderRadius: '0.25rem'\n },\n ':hover': {\n ':after': {\n border:\n args.disabled && !args.isSelected\n ? `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`\n : `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`\n }\n }\n }\n };\n};\n"]}
@@ -8,7 +8,7 @@ import { LayoutProps } from './Layout';
8
8
  export declare type DefaultLayoutProps = LayoutProps;
9
9
  /**
10
10
  * DefaultLayout displays remote participants, local video component, and screen sharing component in
11
- * a grid and horizontal gallery.
11
+ * a grid an overflow gallery.
12
12
  *
13
13
  * @private
14
14
  */
@@ -1,30 +1,40 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT license.
3
3
  import { Stack } from '@fluentui/react';
4
- import React, { useMemo } from 'react';
4
+ import React, { useMemo, useState, useRef } from 'react';
5
5
  import { GridLayout } from '../GridLayout';
6
6
  import { isNarrowWidth } from '../utils/responsive';
7
- /* @conditional-compile-remove(pinned-participants) */
8
- import { ScrollableHorizontalGallery } from './ScrollableHorizontalGallery';
7
+ /* @conditional-compile-remove(vertical-gallery) */
8
+ import { isShortHeight } from '../utils/responsive';
9
9
  import { rootLayoutStyle } from './styles/DefaultLayout.styles';
10
10
  import { videoGalleryLayoutGap } from './styles/Layout.styles';
11
11
  import { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';
12
- import { VideoGalleryResponsiveHorizontalGallery } from './VideoGalleryResponsiveHorizontalGallery';
12
+ import { OverflowGallery } from './OverflowGallery';
13
13
  /**
14
14
  * DefaultLayout displays remote participants, local video component, and screen sharing component in
15
- * a grid and horizontal gallery.
15
+ * a grid an overflow gallery.
16
16
  *
17
17
  * @private
18
18
  */
19
19
  export const DefaultLayout = (props) => {
20
20
  const { remoteParticipants = [], dominantSpeakers, localVideoComponent, screenShareComponent, onRenderRemoteParticipant, styles, maxRemoteVideoStreams, parentWidth,
21
- /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds } = props;
21
+ /* @conditional-compile-remove(vertical-gallery) */
22
+ parentHeight, pinnedParticipantUserIds = [],
23
+ /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition = 'HorizontalBottom' } = props;
22
24
  const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;
23
- const { gridParticipants, horizontalGalleryParticipants } = useOrganizedParticipants({
25
+ /* @conditional-compile-remove(vertical-gallery) */
26
+ const isShort = parentHeight ? isShortHeight(parentHeight) : false;
27
+ // This is for tracking the number of children in the first page of overflow gallery.
28
+ // This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.
29
+ const childrenPerPage = useRef(4);
30
+ const { gridParticipants, overflowGalleryParticipants } = useOrganizedParticipants({
24
31
  remoteParticipants,
25
32
  dominantSpeakers,
26
33
  maxRemoteVideoStreams,
27
34
  isScreenShareActive: !!screenShareComponent,
35
+ maxOverflowGalleryDominantSpeakers: screenShareComponent
36
+ ? childrenPerPage.current - (pinnedParticipantUserIds.length % childrenPerPage.current)
37
+ : childrenPerPage.current,
28
38
  /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds
29
39
  });
30
40
  let activeVideoStreams = 0;
@@ -34,27 +44,53 @@ export const DefaultLayout = (props) => {
34
44
  ? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
35
45
  : (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
36
46
  });
37
- const horizontalGalleryTiles = horizontalGalleryParticipants.map((p) => {
47
+ /**
48
+ * instantiate indexes available to render with indexes available that would be on first page
49
+ *
50
+ * For some components which do not strictly follow the order of the array, we might
51
+ * re-render the initial tiles -> dispose them -> create new tiles, we need to take care of
52
+ * this case when those components are here
53
+ */
54
+ const [indexesToRender, setIndexesToRender] = useState([
55
+ ...Array(maxRemoteVideoStreams - activeVideoStreams).keys()
56
+ ]);
57
+ const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {
38
58
  var _a, _b;
39
59
  return onRenderRemoteParticipant(p, maxRemoteVideoStreams && maxRemoteVideoStreams >= 0
40
- ? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && activeVideoStreams++ < maxRemoteVideoStreams
60
+ ? ((_a = p.videoStream) === null || _a === void 0 ? void 0 : _a.isAvailable) && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams
41
61
  : (_b = p.videoStream) === null || _b === void 0 ? void 0 : _b.isAvailable);
42
62
  });
43
63
  if (localVideoComponent) {
44
64
  gridTiles.push(localVideoComponent);
45
65
  }
46
- const horizontalGallery = useMemo(() => {
47
- if (horizontalGalleryTiles.length === 0) {
66
+ const overflowGallery = useMemo(() => {
67
+ if (overflowGalleryTiles.length === 0) {
48
68
  return null;
49
69
  }
50
- /* @conditional-compile-remove(pinned-participants) */
51
- if (isNarrow) {
52
- return React.createElement(ScrollableHorizontalGallery, { horizontalGalleryElements: horizontalGalleryTiles });
53
- }
54
- return (React.createElement(VideoGalleryResponsiveHorizontalGallery, { isNarrow: isNarrow, shouldFloatLocalVideo: true, horizontalGalleryElements: horizontalGalleryTiles, styles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery }));
55
- }, [isNarrow, horizontalGalleryTiles, styles === null || styles === void 0 ? void 0 : styles.horizontalGallery]);
56
- return (React.createElement(Stack, { horizontal: false, styles: rootLayoutStyle, tokens: videoGalleryLayoutGap },
70
+ return (React.createElement(OverflowGallery, { isNarrow: isNarrow,
71
+ /* @conditional-compile-remove(vertical-gallery) */
72
+ isShort: isShort, shouldFloatLocalVideo: false, overflowGalleryElements: overflowGalleryTiles, horizontalGalleryStyles: styles === null || styles === void 0 ? void 0 : styles.horizontalGallery,
73
+ /* @conditional-compile-remove(vertical-gallery) */
74
+ verticalGalleryStyles: styles === null || styles === void 0 ? void 0 : styles.verticalGallery,
75
+ /* @conditional-compile-remove(pinned-participants) */
76
+ overflowGalleryPosition: overflowGalleryPosition, onFetchTilesToRender: setIndexesToRender, onChildrenPerPageChange: (n) => {
77
+ childrenPerPage.current = n;
78
+ } }));
79
+ }, [
80
+ isNarrow,
81
+ /* @conditional-compile-remove(vertical-gallery) */ isShort,
82
+ overflowGalleryTiles,
83
+ styles === null || styles === void 0 ? void 0 : styles.horizontalGallery,
84
+ /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition,
85
+ setIndexesToRender,
86
+ /* @conditional-compile-remove(vertical-gallery) */ styles === null || styles === void 0 ? void 0 : styles.verticalGallery
87
+ ]);
88
+ return (React.createElement(Stack
89
+ /* @conditional-compile-remove(vertical-gallery) */
90
+ , {
91
+ /* @conditional-compile-remove(vertical-gallery) */
92
+ horizontal: overflowGalleryPosition === 'VerticalRight', styles: rootLayoutStyle, tokens: videoGalleryLayoutGap },
57
93
  screenShareComponent ? (screenShareComponent) : (React.createElement(GridLayout, { key: "grid-layout", styles: styles === null || styles === void 0 ? void 0 : styles.gridLayout }, gridTiles)),
58
- horizontalGallery));
94
+ overflowGallery));
59
95
  };
60
96
  //# sourceMappingURL=DefaultLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultLayout.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/DefaultLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,sDAAsD;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,uCAAuC,EAAE,MAAM,2CAA2C,CAAC;AASpG;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAe,EAAE;IACtE,MAAM,EACJ,kBAAkB,GAAG,EAAE,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,EACN,qBAAqB,EACrB,WAAW;IACX,sDAAsD,CAAC,wBAAwB,EAChF,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAElE,MAAM,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,GAAG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,QAAQ,EAAE,QAAQ,EAClB,qBAAqB,EAAE,IAAI,EAC3B,yBAAyB,EAAE,sBAAsB,EACjD,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,GACjC,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,sBAAsB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,iBAAiB,CAAC,CAAC,CAAC;IAElE,OAAO,CACL,oBAAC,KAAK,IAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,qBAAqB;QAC7E,oBAAoB,CAAC,CAAC,CAAC,CACtB,oBAAoB,CACrB,CAAC,CAAC,CAAC,CACF,oBAAC,UAAU,IAAC,GAAG,EAAC,aAAa,EAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,IACrD,SAAS,CACC,CACd;QACA,iBAAiB,CACZ,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Stack } from '@fluentui/react';\nimport React, { useMemo } from 'react';\nimport { GridLayout } from '../GridLayout';\nimport { isNarrowWidth } from '../utils/responsive';\nimport { LayoutProps } from './Layout';\n/* @conditional-compile-remove(pinned-participants) */\nimport { ScrollableHorizontalGallery } from './ScrollableHorizontalGallery';\nimport { rootLayoutStyle } from './styles/DefaultLayout.styles';\nimport { videoGalleryLayoutGap } from './styles/Layout.styles';\nimport { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';\nimport { VideoGalleryResponsiveHorizontalGallery } from './VideoGalleryResponsiveHorizontalGallery';\n\n/**\n * Props for {@link DefaultLayout}.\n *\n * @private\n */\nexport type DefaultLayoutProps = LayoutProps;\n\n/**\n * DefaultLayout displays remote participants, local video component, and screen sharing component in\n * a grid and horizontal gallery.\n *\n * @private\n */\nexport const DefaultLayout = (props: DefaultLayoutProps): JSX.Element => {\n const {\n remoteParticipants = [],\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n parentWidth,\n /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds\n } = props;\n\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n\n const { gridParticipants, horizontalGalleryParticipants } = useOrganizedParticipants({\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams,\n isScreenShareActive: !!screenShareComponent,\n /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds\n });\n\n let activeVideoStreams = 0;\n\n const gridTiles = gridParticipants.map((p) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n const horizontalGalleryTiles = horizontalGalleryParticipants.map((p) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n if (localVideoComponent) {\n gridTiles.push(localVideoComponent);\n }\n\n const horizontalGallery = useMemo(() => {\n if (horizontalGalleryTiles.length === 0) {\n return null;\n }\n /* @conditional-compile-remove(pinned-participants) */\n if (isNarrow) {\n return <ScrollableHorizontalGallery horizontalGalleryElements={horizontalGalleryTiles} />;\n }\n return (\n <VideoGalleryResponsiveHorizontalGallery\n isNarrow={isNarrow}\n shouldFloatLocalVideo={true}\n horizontalGalleryElements={horizontalGalleryTiles}\n styles={styles?.horizontalGallery}\n />\n );\n }, [isNarrow, horizontalGalleryTiles, styles?.horizontalGallery]);\n\n return (\n <Stack horizontal={false} styles={rootLayoutStyle} tokens={videoGalleryLayoutGap}>\n {screenShareComponent ? (\n screenShareComponent\n ) : (\n <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>\n )}\n {horizontalGallery}\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"DefaultLayout.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/DefaultLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,mDAAmD;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AASpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAe,EAAE;IACtE,MAAM,EACJ,kBAAkB,GAAG,EAAE,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,EACN,qBAAqB,EACrB,WAAW;IACX,mDAAmD;IACnD,YAAY,EACZ,wBAAwB,GAAG,EAAE;IAC7B,mDAAmD,CAAC,uBAAuB,GAAG,kBAAkB,EACjG,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAElE,mDAAmD;IACnD,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAA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MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,qBAAqB;QAE5B,oBAAoB,CAAC,CAAC,CAAC,CACtB,oBAAoB,CACrB,CAAC,CAAC,CAAC,CACF,oBAAC,UAAU,IAAC,GAAG,EAAC,aAAa,EAAC,MAAM,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,IACrD,SAAS,CACC,CACd;QACA,eAAe,CACV,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Stack } from '@fluentui/react';\nimport React, { useMemo, useState, useRef } from 'react';\nimport { GridLayout } from '../GridLayout';\nimport { isNarrowWidth } from '../utils/responsive';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { isShortHeight } from '../utils/responsive';\nimport { LayoutProps } from './Layout';\nimport { rootLayoutStyle } from './styles/DefaultLayout.styles';\nimport { videoGalleryLayoutGap } from './styles/Layout.styles';\nimport { useOrganizedParticipants } from './utils/videoGalleryLayoutUtils';\nimport { OverflowGallery } from './OverflowGallery';\n\n/**\n * Props for {@link DefaultLayout}.\n *\n * @private\n */\nexport type DefaultLayoutProps = LayoutProps;\n\n/**\n * DefaultLayout displays remote participants, local video component, and screen sharing component in\n * a grid an overflow gallery.\n *\n * @private\n */\nexport const DefaultLayout = (props: DefaultLayoutProps): JSX.Element => {\n const {\n remoteParticipants = [],\n dominantSpeakers,\n localVideoComponent,\n screenShareComponent,\n onRenderRemoteParticipant,\n styles,\n maxRemoteVideoStreams,\n parentWidth,\n /* @conditional-compile-remove(vertical-gallery) */\n parentHeight,\n pinnedParticipantUserIds = [],\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition = 'HorizontalBottom'\n } = props;\n\n const isNarrow = parentWidth ? isNarrowWidth(parentWidth) : false;\n\n /* @conditional-compile-remove(vertical-gallery) */\n const isShort = parentHeight ? isShortHeight(parentHeight) : false;\n\n // This is for tracking the number of children in the first page of overflow gallery.\n // This number will be used for the maxOverflowGalleryDominantSpeakers when organizing the remote participants.\n const childrenPerPage = useRef(4);\n const { gridParticipants, overflowGalleryParticipants } = useOrganizedParticipants({\n remoteParticipants,\n dominantSpeakers,\n maxRemoteVideoStreams,\n isScreenShareActive: !!screenShareComponent,\n maxOverflowGalleryDominantSpeakers: screenShareComponent\n ? childrenPerPage.current - (pinnedParticipantUserIds.length % childrenPerPage.current)\n : childrenPerPage.current,\n /* @conditional-compile-remove(pinned-participants) */ pinnedParticipantUserIds\n });\n\n let activeVideoStreams = 0;\n\n const gridTiles = gridParticipants.map((p) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n /**\n * instantiate indexes available to render with indexes available that would be on first page\n *\n * For some components which do not strictly follow the order of the array, we might\n * re-render the initial tiles -> dispose them -> create new tiles, we need to take care of\n * this case when those components are here\n */\n const [indexesToRender, setIndexesToRender] = useState<number[]>([\n ...Array(maxRemoteVideoStreams - activeVideoStreams).keys()\n ]);\n\n const overflowGalleryTiles = overflowGalleryParticipants.map((p, i) => {\n return onRenderRemoteParticipant(\n p,\n maxRemoteVideoStreams && maxRemoteVideoStreams >= 0\n ? p.videoStream?.isAvailable && indexesToRender.includes(i) && activeVideoStreams++ < maxRemoteVideoStreams\n : p.videoStream?.isAvailable\n );\n });\n\n if (localVideoComponent) {\n gridTiles.push(localVideoComponent);\n }\n\n const overflowGallery = useMemo(() => {\n if (overflowGalleryTiles.length === 0) {\n return null;\n }\n return (\n <OverflowGallery\n isNarrow={isNarrow}\n /* @conditional-compile-remove(vertical-gallery) */\n isShort={isShort}\n shouldFloatLocalVideo={false}\n overflowGalleryElements={overflowGalleryTiles}\n horizontalGalleryStyles={styles?.horizontalGallery}\n /* @conditional-compile-remove(vertical-gallery) */\n verticalGalleryStyles={styles?.verticalGallery}\n /* @conditional-compile-remove(pinned-participants) */\n overflowGalleryPosition={overflowGalleryPosition}\n onFetchTilesToRender={setIndexesToRender}\n onChildrenPerPageChange={(n: number) => {\n childrenPerPage.current = n;\n }}\n />\n );\n }, [\n isNarrow,\n /* @conditional-compile-remove(vertical-gallery) */ isShort,\n overflowGalleryTiles,\n styles?.horizontalGallery,\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition,\n setIndexesToRender,\n /* @conditional-compile-remove(vertical-gallery) */ styles?.verticalGallery\n ]);\n\n return (\n <Stack\n /* @conditional-compile-remove(vertical-gallery) */\n horizontal={overflowGalleryPosition === 'VerticalRight'}\n styles={rootLayoutStyle}\n tokens={videoGalleryLayoutGap}\n >\n {screenShareComponent ? (\n screenShareComponent\n ) : (\n <GridLayout key=\"grid-layout\" styles={styles?.gridLayout}>\n {gridTiles}\n </GridLayout>\n )}\n {overflowGallery}\n </Stack>\n );\n};\n"]}
@@ -2,11 +2,18 @@
2
2
  /**
3
3
  * @private
4
4
  */
5
- export declare const FloatingLocalVideo: (props: {
5
+ export interface FloatingLocalVideoProps {
6
6
  localVideoComponent: JSX.Element;
7
7
  layerHostId: string;
8
- isNarrow?: boolean;
9
8
  parentWidth?: number;
10
9
  parentHeight?: number;
11
- }) => JSX.Element;
10
+ localVideoSizeRem: {
11
+ width: number;
12
+ height: number;
13
+ };
14
+ }
15
+ /**
16
+ * @private
17
+ */
18
+ export declare const FloatingLocalVideo: (props: FloatingLocalVideoProps) => JSX.Element;
12
19
  //# sourceMappingURL=FloatingLocalVideo.d.ts.map