@azure/communication-react 1.4.3-alpha-202301150014.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (842) hide show
  1. package/CHANGELOG.json +1047 -0
  2. package/CHANGELOG.stable.md +79 -2
  3. package/dist/communication-react.d.ts +29 -1976
  4. package/dist/dist-cjs/communication-react/index.js +6443 -10799
  5. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/MessageStatus.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/areEqual.js.map +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/commonProperties.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/cssUtils.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/identifier.js +64 -3
  13. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  14. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  15. package/dist/dist-esm/acs-ui-common/src/localizationUtils.js.map +1 -1
  16. package/dist/dist-esm/acs-ui-common/src/logEvent.js.map +1 -1
  17. package/dist/dist-esm/acs-ui-common/src/memoizeFnAll.js.map +1 -1
  18. package/dist/dist-esm/acs-ui-common/src/safeStringify.js.map +1 -1
  19. package/dist/dist-esm/acs-ui-common/src/telemetry.js.map +1 -1
  20. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  21. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  22. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -11
  23. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -12
  24. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -13
  26. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +5 -20
  27. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +49 -20
  29. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -11
  31. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +31 -35
  32. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +1 -11
  34. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -13
  36. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  37. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.d.ts +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -4
  40. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -22
  41. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js.map +1 -1
  43. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -6
  44. package/dist/dist-esm/calling-component-bindings/src/index.js +0 -8
  45. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  46. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +10 -31
  47. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  48. package/dist/dist-esm/calling-component-bindings/src/participantsButtonSelector.js.map +1 -1
  49. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +3 -4
  50. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  51. package/dist/dist-esm/calling-component-bindings/src/providers/CallClientProvider.js +3 -6
  52. package/dist/dist-esm/calling-component-bindings/src/providers/CallClientProvider.js.map +1 -1
  53. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +2 -14
  54. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -20
  55. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  56. package/dist/dist-esm/calling-component-bindings/src/providers/index.js.map +1 -1
  57. package/dist/dist-esm/calling-component-bindings/src/utils/SelectorUtils.js.map +1 -1
  58. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -14
  59. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +4 -25
  60. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  61. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +0 -5
  62. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +0 -11
  63. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  64. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +9 -25
  65. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  66. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +5 -21
  67. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  68. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +5 -6
  69. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
  70. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
  71. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  72. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -2
  73. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +67 -62
  74. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  75. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -27
  76. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  77. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -7
  78. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +4 -56
  79. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  80. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js +8 -7
  81. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js.map +1 -1
  82. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +64 -56
  83. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  84. package/dist/dist-esm/calling-stateful-client/src/CallIdHistory.js.map +1 -1
  85. package/dist/dist-esm/calling-stateful-client/src/CallIdRef.js.map +1 -1
  86. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -1
  87. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +3 -9
  88. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  89. package/dist/dist-esm/calling-stateful-client/src/Converter.js +8 -13
  90. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  91. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +57 -51
  92. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  93. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js +16 -14
  94. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js.map +1 -1
  95. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.js.map +1 -1
  96. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +15 -3
  97. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  98. package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
  99. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +0 -1
  100. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +0 -8
  101. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  102. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  103. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +0 -1
  104. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +0 -8
  105. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  106. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -25
  107. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +40 -69
  108. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  109. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +13 -3
  110. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  111. package/dist/dist-esm/calling-stateful-client/src/TranscriptionSubscriber.js.map +1 -1
  112. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
  113. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -8
  114. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  115. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +3 -3
  116. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
  117. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js +7 -6
  118. package/dist/dist-esm/calling-stateful-client/src/VideoStreamRendererViewDeclarative.js.map +1 -1
  119. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -2
  120. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  121. package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
  122. package/dist/dist-esm/chat-component-bindings/src/baseSelectors.js +4 -4
  123. package/dist/dist-esm/chat-component-bindings/src/baseSelectors.js.map +1 -1
  124. package/dist/dist-esm/chat-component-bindings/src/chatParticipantListSelector.js +3 -3
  125. package/dist/dist-esm/chat-component-bindings/src/chatParticipantListSelector.js.map +1 -1
  126. package/dist/dist-esm/chat-component-bindings/src/errorBarSelector.js +14 -13
  127. package/dist/dist-esm/chat-component-bindings/src/errorBarSelector.js.map +1 -1
  128. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -4
  129. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +10 -3
  130. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  131. package/dist/dist-esm/chat-component-bindings/src/hooks/useHandlers.js.map +1 -1
  132. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  133. package/dist/dist-esm/chat-component-bindings/src/hooks/useSelector.js.map +1 -1
  134. package/dist/dist-esm/chat-component-bindings/src/index.js.map +1 -1
  135. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +10 -41
  136. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  137. package/dist/dist-esm/chat-component-bindings/src/providers/ChatClientProvider.js.map +1 -1
  138. package/dist/dist-esm/chat-component-bindings/src/providers/ChatThreadClientProvider.js +1 -1
  139. package/dist/dist-esm/chat-component-bindings/src/providers/ChatThreadClientProvider.js.map +1 -1
  140. package/dist/dist-esm/chat-component-bindings/src/sendBoxSelector.js.map +1 -1
  141. package/dist/dist-esm/chat-component-bindings/src/typingIndicatorSelector.js +7 -3
  142. package/dist/dist-esm/chat-component-bindings/src/typingIndicatorSelector.js.map +1 -1
  143. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js +1 -3
  144. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js.map +1 -1
  145. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
  146. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  147. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  148. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +9 -5
  149. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
  150. package/dist/dist-esm/chat-stateful-client/src/Constants.js.map +1 -1
  151. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +12 -7
  152. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  153. package/dist/dist-esm/chat-stateful-client/src/Logger.js.map +1 -1
  154. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +67 -57
  155. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
  156. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js +127 -113
  157. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js.map +1 -1
  158. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  159. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  160. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedIterator.js.map +1 -1
  161. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListMessages.js.map +1 -1
  162. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListParticipants.js.map +1 -1
  163. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListReadReceipts.js.map +1 -1
  164. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListThreads.js.map +1 -1
  165. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  166. package/dist/dist-esm/communication-react/src/index.d.ts +0 -21
  167. package/dist/dist-esm/communication-react/src/index.js +0 -14
  168. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  169. package/dist/dist-esm/communication-react/src/mergedHooks.js.map +1 -1
  170. package/dist/dist-esm/react-components/src/components/Announcer.js.map +1 -1
  171. package/dist/dist-esm/react-components/src/components/CameraButton.js +6 -6
  172. package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionMenu.js +8 -7
  174. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionMenu.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +17 -36
  176. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
  177. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +4 -8
  178. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  179. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +30 -24
  180. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +24 -55
  182. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  183. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +11 -7
  184. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  185. package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.js +18 -18
  186. package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.js.map +1 -1
  187. package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.js +4 -7
  188. package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.js.map +1 -1
  189. package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.js +2 -2
  190. package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/components/ComplianceBanner/Utils.js.map +1 -1
  192. package/dist/dist-esm/react-components/src/components/ComplianceBanner/index.js.map +1 -1
  193. package/dist/dist-esm/react-components/src/components/ComplianceBanner/types.js.map +1 -1
  194. package/dist/dist-esm/react-components/src/components/ControlBar.js +14 -10
  195. package/dist/dist-esm/react-components/src/components/ControlBar.js.map +1 -1
  196. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +4 -14
  197. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  198. package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.js +14 -3
  199. package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.js.map +1 -1
  200. package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js +8 -5
  201. package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js.map +1 -1
  202. package/dist/dist-esm/react-components/src/components/DevicesButton.js +30 -7
  203. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  204. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +44 -42
  205. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  206. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.d.ts +0 -1
  207. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js +2 -18
  208. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js.map +1 -1
  209. package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.js +6 -2
  210. package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.js.map +1 -1
  211. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +0 -4
  212. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +6 -6
  213. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  214. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +23 -11
  215. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
  216. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.d.ts +0 -4
  217. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js +3 -3
  218. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js.map +1 -1
  219. package/dist/dist-esm/react-components/src/components/Drawer/index.js.map +1 -1
  220. package/dist/dist-esm/react-components/src/components/EndCallButton.js +7 -3
  221. package/dist/dist-esm/react-components/src/components/EndCallButton.js.map +1 -1
  222. package/dist/dist-esm/react-components/src/components/ErrorBar.js +5 -2
  223. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  224. package/dist/dist-esm/react-components/src/components/FileCard.js +3 -2
  225. package/dist/dist-esm/react-components/src/components/FileCard.js.map +1 -1
  226. package/dist/dist-esm/react-components/src/components/FileCardGroup.js +1 -1
  227. package/dist/dist-esm/react-components/src/components/FileCardGroup.js.map +1 -1
  228. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +9 -12
  229. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  230. package/dist/dist-esm/react-components/src/components/FileUploadCards.js +7 -8
  231. package/dist/dist-esm/react-components/src/components/FileUploadCards.js.map +1 -1
  232. package/dist/dist-esm/react-components/src/components/GridLayout.js +37 -37
  233. package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
  234. package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.js +2 -2
  235. package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.js.map +1 -1
  236. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +7 -5
  237. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
  238. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +12 -5
  239. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  240. package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js +5 -3
  241. package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js.map +1 -1
  242. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +9 -27
  243. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  244. package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.js +36 -23
  245. package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.js.map +1 -1
  246. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +1 -23
  247. package/dist/dist-esm/react-components/src/components/MessageThread.js +97 -157
  248. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  249. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +6 -9
  250. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  251. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +101 -94
  252. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  253. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -13
  254. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +21 -22
  255. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  256. package/dist/dist-esm/react-components/src/components/ParticipantList.js +9 -25
  257. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  258. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +32 -46
  259. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  260. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.js +3 -3
  261. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.js.map +1 -1
  262. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPictureTile.js +3 -3
  263. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPictureTile.js.map +1 -1
  264. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -2
  265. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +12 -68
  266. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  267. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js +2 -2
  268. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js.map +1 -1
  269. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +12 -6
  270. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
  271. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +0 -35
  272. package/dist/dist-esm/react-components/src/components/SendBox.js +8 -32
  273. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  274. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +2 -2
  275. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
  276. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +1 -1
  277. package/dist/dist-esm/react-components/src/components/StreamMedia.js +3 -3
  278. package/dist/dist-esm/react-components/src/components/StreamMedia.js.map +1 -1
  279. package/dist/dist-esm/react-components/src/components/SystemMessage.js +4 -2
  280. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  281. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +10 -10
  282. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
  283. package/dist/dist-esm/react-components/src/components/TypingIndicator.js +6 -9
  284. package/dist/dist-esm/react-components/src/components/TypingIndicator.js.map +1 -1
  285. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +1 -1
  286. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +1 -12
  287. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  288. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +1 -13
  289. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  290. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -20
  291. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  292. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +1 -1
  293. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +1 -12
  294. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  295. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +8 -25
  296. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  297. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +14 -11
  298. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
  299. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +16 -33
  300. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  301. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  302. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js +7 -7
  303. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js.map +1 -1
  304. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +6 -8
  305. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  306. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +7 -2
  307. package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +1 -1
  308. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js +6 -1
  309. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/DefaultLayout.styles.js.map +1 -1
  310. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +29 -8
  311. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  312. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js +11 -2
  313. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideoLayout.styles.js.map +1 -1
  314. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.js.map +1 -1
  315. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.js.map +1 -1
  316. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteVideoTile.styles.js.map +1 -1
  317. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +10 -10
  318. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
  319. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +5 -10
  320. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
  321. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +0 -2
  322. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +30 -31
  323. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
  324. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +14 -38
  325. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  326. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +0 -66
  327. package/dist/dist-esm/react-components/src/components/VideoGallery.js +19 -147
  328. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  329. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +1 -22
  330. package/dist/dist-esm/react-components/src/components/VideoTile.js +46 -98
  331. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  332. package/dist/dist-esm/react-components/src/components/VoiceOverButton.js +10 -3
  333. package/dist/dist-esm/react-components/src/components/VoiceOverButton.js.map +1 -1
  334. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -13
  335. package/dist/dist-esm/react-components/src/components/index.js +0 -8
  336. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  337. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +12 -3
  338. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  339. package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.js.map +1 -1
  340. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
  341. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
  342. package/dist/dist-esm/react-components/src/components/styles/GridLayout.styles.js.map +1 -1
  343. package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js.map +1 -1
  344. package/dist/dist-esm/react-components/src/components/styles/IconButton.styles.js.map +1 -1
  345. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +4 -1
  346. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  347. package/dist/dist-esm/react-components/src/components/styles/MessageStatusIndicator.styles.js.map +1 -1
  348. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +7 -2
  349. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  350. package/dist/dist-esm/react-components/src/components/styles/ParticipantItem.styles.js +1 -0
  351. package/dist/dist-esm/react-components/src/components/styles/ParticipantItem.styles.js.map +1 -1
  352. package/dist/dist-esm/react-components/src/components/styles/ParticipantList.styles.js.map +1 -1
  353. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +10 -2
  354. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  355. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js +3 -0
  356. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js.map +1 -1
  357. package/dist/dist-esm/react-components/src/components/styles/SystemMessage.styles.js.map +1 -1
  358. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +2 -2
  359. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
  360. package/dist/dist-esm/react-components/src/components/styles/TypingIndicator.styles.js.map +1 -1
  361. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +13 -2
  362. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  363. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  364. package/dist/dist-esm/react-components/src/components/styles/VoiceOverButton.style.js.map +1 -1
  365. package/dist/dist-esm/react-components/src/components/utils/Datetime.js.map +1 -1
  366. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -4
  367. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  368. package/dist/dist-esm/react-components/src/components/utils/delay.js.map +1 -1
  369. package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js.map +1 -1
  370. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +5 -2
  371. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  372. package/dist/dist-esm/react-components/src/components/utils/keyboardNavigation.js.map +1 -1
  373. package/dist/dist-esm/react-components/src/components/utils/responsive.js +2 -2
  374. package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
  375. package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +0 -1
  376. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +2 -15
  377. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  378. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +3 -1
  379. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +1 -1
  380. package/dist/dist-esm/react-components/src/components/utils.js +8 -9
  381. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  382. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +10 -14
  383. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
  384. package/dist/dist-esm/react-components/src/gallery/index.js.map +1 -1
  385. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  386. package/dist/dist-esm/react-components/src/identifiers/index.js.map +1 -1
  387. package/dist/dist-esm/react-components/src/index.d.ts +0 -2
  388. package/dist/dist-esm/react-components/src/index.js +0 -2
  389. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  390. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -54
  391. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  392. package/dist/dist-esm/react-components/src/localization/index.js.map +1 -1
  393. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +96 -6
  394. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +95 -5
  395. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -1
  396. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +95 -5
  397. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +96 -6
  398. package/dist/dist-esm/react-components/src/localization/locales/index.js +42 -14
  399. package/dist/dist-esm/react-components/src/localization/locales/index.js.map +1 -1
  400. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +95 -5
  401. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +95 -5
  402. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +95 -5
  403. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +95 -5
  404. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +96 -6
  405. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +95 -5
  406. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +96 -6
  407. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +95 -5
  408. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +95 -5
  409. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js +6 -3
  410. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js.map +1 -1
  411. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -20
  412. package/dist/dist-esm/react-components/src/theming/icons.js +11 -121
  413. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  414. package/dist/dist-esm/react-components/src/theming/index.js.map +1 -1
  415. package/dist/dist-esm/react-components/src/theming/themeUtils.js.map +1 -1
  416. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  417. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +0 -7
  418. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  419. package/dist/dist-esm/react-components/src/types/CommunicationParticipant.js.map +1 -1
  420. package/dist/dist-esm/react-components/src/types/CustomStylesProps.js.map +1 -1
  421. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +0 -8
  422. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  423. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +0 -3
  424. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js +0 -2
  425. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  426. package/dist/dist-esm/react-components/src/types/ReadReceiptsBySenderId.js.map +1 -1
  427. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -8
  428. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
  429. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  430. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  431. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -89
  432. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +17 -95
  433. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  434. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -120
  435. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  436. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +6 -77
  437. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +31 -248
  438. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  439. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -107
  440. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -9
  441. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  442. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapterProvider.js.map +1 -1
  443. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/DiagnosticsForwarder.js.map +1 -1
  444. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/ParticipantSubcriber.js.map +1 -1
  445. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +2 -3
  446. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +2 -8
  447. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  448. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -5
  449. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +0 -2
  450. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  451. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +0 -3
  452. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +10 -76
  453. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  454. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -2
  455. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +13 -135
  456. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  457. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  458. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -21
  459. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  460. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -20
  461. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  462. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  463. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -21
  464. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  465. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js +4 -5
  466. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js.map +1 -1
  467. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.js +2 -2
  468. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.js.map +1 -1
  469. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +22 -32
  470. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  471. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  472. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +19 -66
  473. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  474. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +21 -16
  475. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  476. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +0 -2
  477. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +17 -25
  478. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  479. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MutedNotification.js +2 -2
  480. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MutedNotification.js.map +1 -1
  481. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +2 -2
  482. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  483. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.js +1 -1
  484. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.js.map +1 -1
  485. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +1 -1
  486. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  487. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +5 -44
  488. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  489. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +2 -5
  490. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  491. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +6 -8
  492. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  493. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js +2 -5
  494. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
  495. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +1 -3
  496. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  497. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +9 -13
  498. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  499. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +6 -27
  500. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  501. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.js.map +1 -1
  502. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSelector.js +1 -1
  503. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSelector.js.map +1 -1
  504. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -7
  505. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -2
  506. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  507. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +0 -1
  508. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -8
  509. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  510. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -8
  511. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +12 -140
  512. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  513. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +0 -1
  514. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +7 -19
  515. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  516. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js +2 -2
  517. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js.map +1 -1
  518. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +2 -2
  519. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.js +1 -1
  520. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.js.map +1 -1
  521. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -10
  522. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -10
  523. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  524. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +1 -1
  525. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.js.map +1 -1
  526. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +1 -1
  527. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.js.map +1 -1
  528. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +2 -2
  529. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.js +1 -1
  530. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.js.map +1 -1
  531. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +2 -2
  532. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +5 -11
  533. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  534. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +1 -1
  535. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.js +1 -1
  536. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.js.map +1 -1
  537. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +4 -4
  538. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
  539. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +2 -2
  540. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js +4 -4
  541. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js.map +1 -1
  542. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +1 -1
  543. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js +1 -1
  544. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js.map +1 -1
  545. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +5 -5
  546. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js +4 -4
  547. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js.map +1 -1
  548. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +2 -2
  549. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.js +1 -1
  550. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.js.map +1 -1
  551. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +2 -2
  552. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.js.map +1 -1
  553. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js +1 -1
  554. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js.map +1 -1
  555. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +6 -2
  556. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  557. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +6 -2
  558. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  559. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
  560. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +0 -2
  561. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  562. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.js +4 -1
  563. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.js.map +1 -1
  564. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +4 -1
  565. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
  566. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalDeviceSettings.styles.js.map +1 -1
  567. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
  568. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NetworkReconnectTile.styles.js.map +1 -1
  569. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NoticePage.styles.js.map +1 -1
  570. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/StartCallButton.styles.js +1 -0
  571. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/StartCallButton.styles.js.map +1 -1
  572. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +3 -23
  573. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  574. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +11 -9
  575. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  576. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +3 -15
  577. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +12 -106
  578. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  579. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/index.js.map +1 -1
  580. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +4 -87
  581. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +14 -78
  582. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  583. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +0 -1
  584. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +15 -41
  585. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  586. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts +0 -2
  587. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +12 -34
  588. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  589. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton.js +1 -1
  590. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton.js.map +1 -1
  591. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.js +7 -9
  592. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.js.map +1 -1
  593. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ConvertContextualMenuItemToDrawerMenuItem.js.map +1 -1
  594. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/NotificationIcon.js +6 -3
  595. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/NotificationIcon.js.map +1 -1
  596. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js +1 -1
  597. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +1 -1
  598. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.d.ts +0 -1
  599. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +1 -1
  600. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -32
  601. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  602. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -25
  603. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +7 -139
  604. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  605. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +0 -60
  606. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  607. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +2 -10
  608. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +1 -39
  609. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  610. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +0 -9
  611. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +1 -31
  612. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  613. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js.map +1 -1
  614. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +21 -67
  615. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
  616. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/hooks/useCallWithChatCompositeStrings.js.map +1 -1
  617. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +0 -1
  618. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  619. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/selectors/moreDrawerSelector.js +1 -1
  620. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/selectors/moreDrawerSelector.js.map +1 -1
  621. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -22
  622. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -10
  623. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  624. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  625. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -20
  626. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +2 -6
  627. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  628. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.js +5 -3
  629. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.js.map +1 -1
  630. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +9 -41
  631. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  632. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -4
  633. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  634. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +0 -9
  635. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +25 -88
  636. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  637. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +0 -28
  638. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -154
  639. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  640. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -13
  641. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  642. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +0 -2
  643. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  644. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +1 -1
  645. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +6 -18
  646. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  647. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.js.map +1 -1
  648. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
  649. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useAdaptedSelector.js +5 -3
  650. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useAdaptedSelector.js.map +1 -1
  651. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +1 -3
  652. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  653. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/usePropsFor.js.map +1 -1
  654. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -3
  655. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  656. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +6 -2
  657. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
  658. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -5
  659. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +6 -17
  660. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  661. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -5
  662. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +4 -10
  663. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  664. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js +14 -5
  665. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js.map +1 -1
  666. package/dist/dist-esm/react-composites/src/composites/common/ContainerRectProps.js +5 -1
  667. package/dist/dist-esm/react-composites/src/composites/common/ContainerRectProps.js.map +1 -1
  668. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js +1 -1
  669. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.js.map +1 -1
  670. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +6 -21
  671. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  672. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
  673. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
  674. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +8 -6
  675. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  676. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +1 -6
  677. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +5 -24
  678. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  679. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +1 -2
  680. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +18 -6
  681. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  682. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +1 -2
  683. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +8 -10
  684. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  685. package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
  686. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -33
  687. package/dist/dist-esm/react-composites/src/composites/common/icons.js +5 -19
  688. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  689. package/dist/dist-esm/react-composites/src/composites/common/styles/GlobalHostLayer.styles.js.map +1 -1
  690. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +16 -6
  691. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -1
  692. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +51 -12
  693. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -1
  694. package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js +22 -5
  695. package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js.map +1 -1
  696. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.js +22 -4
  697. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.js.map +1 -1
  698. package/dist/dist-esm/react-composites/src/composites/common/utils.js +12 -17
  699. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  700. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  701. package/dist/dist-esm/react-composites/src/composites/localization/LocalizationProvider.js +2 -2
  702. package/dist/dist-esm/react-composites/src/composites/localization/LocalizationProvider.js.map +1 -1
  703. package/dist/dist-esm/react-composites/src/composites/localization/index.js.map +1 -1
  704. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +17 -3
  705. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +17 -3
  706. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +17 -3
  707. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +17 -3
  708. package/dist/dist-esm/react-composites/src/composites/localization/locales/index.js.map +1 -1
  709. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +17 -3
  710. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +17 -3
  711. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +17 -3
  712. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +17 -3
  713. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +17 -3
  714. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +17 -3
  715. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +17 -3
  716. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +17 -3
  717. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +17 -3
  718. package/dist/dist-esm/react-composites/src/index-public.js.map +1 -1
  719. package/package.json +14 -15
  720. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +0 -43
  721. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +0 -81
  722. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +0 -1
  723. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +0 -19
  724. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +0 -89
  725. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +0 -1
  726. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +0 -23
  727. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -48
  728. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +0 -1
  729. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  730. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -37
  731. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  732. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  733. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -58
  734. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  735. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  736. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -86
  737. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  738. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  739. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -31
  740. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  741. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
  742. package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
  743. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +0 -1
  744. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.d.ts +0 -25
  745. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js +0 -65
  746. package/dist/dist-esm/react-components/src/components/VideoGallery/PinnedParticipantsLayout.js.map +0 -1
  747. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +0 -9
  748. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +0 -18
  749. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +0 -1
  750. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.d.ts +0 -6
  751. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js +0 -9
  752. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/Layout.styles.js.map +0 -1
  753. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.d.ts +0 -10
  754. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +0 -29
  755. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +0 -1
  756. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  757. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  758. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  759. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  760. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -92
  761. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  762. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  763. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -67
  764. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  765. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  766. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  767. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  768. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +0 -61
  769. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +0 -74
  770. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +0 -1
  771. package/dist/dist-esm/react-components/src/permissions/index.d.ts +0 -2
  772. package/dist/dist-esm/react-components/src/permissions/index.js +0 -4
  773. package/dist/dist-esm/react-components/src/permissions/index.js.map +0 -1
  774. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  775. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  776. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  777. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +0 -24
  778. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +0 -80
  779. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +0 -1
  780. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -48
  781. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -210
  782. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  783. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
  784. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
  785. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
  786. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -17
  787. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -63
  788. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +0 -1
  789. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
  790. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
  791. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
  792. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.d.ts +0 -16
  793. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js +0 -38
  794. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js.map +0 -1
  795. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +0 -15
  796. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -38
  797. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +0 -1
  798. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  799. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -54
  800. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  801. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
  802. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
  803. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +0 -1
  804. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +0 -67
  805. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +0 -75
  806. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +0 -1
  807. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +0 -13
  808. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +0 -65
  809. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +0 -1
  810. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  811. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  812. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  813. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +0 -15
  814. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +0 -21
  815. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +0 -1
  816. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +0 -6
  817. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +0 -11
  818. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +0 -1
  819. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -12
  820. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -13
  821. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +0 -1
  822. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +0 -23
  823. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +0 -12
  824. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +0 -1
  825. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -22
  826. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -105
  827. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
  828. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
  829. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
  830. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
  831. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
  832. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -60
  833. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
  834. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
  835. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
  836. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
  837. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +0 -17
  838. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +0 -42
  839. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +0 -1
  840. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +0 -11
  841. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +0 -40
  842. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +0 -1
@@ -30,7 +30,7 @@ export const GridLayout = (props) => {
30
30
  return calculateGridProps(numberOfChildren, currentWidth, currentHeight);
31
31
  }, [numberOfChildren, currentWidth, currentHeight]);
32
32
  const cssGridStyles = useMemo(() => createGridStyles(numberOfChildren, gridProps), [numberOfChildren, gridProps]);
33
- return (React.createElement("div", { ref: containerRef, className: mergeStyles(gridLayoutStyle, cssGridStyles, styles === null || styles === void 0 ? void 0 : styles.root) }, children));
33
+ return React.createElement("div", { ref: containerRef, className: mergeStyles(gridLayoutStyle, cssGridStyles, styles === null || styles === void 0 ? void 0 : styles.root) }, children);
34
34
  };
35
35
  /**
36
36
  * The cell aspect ratio we aim for in a grid
@@ -52,7 +52,11 @@ const isCloserThan = (a, b, target) => {
52
52
  */
53
53
  export const calculateGridProps = (numberOfItems, width, height) => {
54
54
  if (numberOfItems <= 0) {
55
- return { fillDirection: 'horizontal', rows: 0, columns: 0 };
55
+ return {
56
+ fillDirection: 'horizontal',
57
+ rows: 0,
58
+ columns: 0
59
+ };
56
60
  }
57
61
  // If width or height are 0 then we return rows and column evenly
58
62
  if (width <= 0 || height <= 0) {
@@ -64,7 +68,7 @@ export const calculateGridProps = (numberOfItems, width, height) => {
64
68
  }
65
69
  const aspectRatio = width / height;
66
70
  // Approximate how many rows to divide the grid to achieve cells close to the TARGET_CELL_ASPECT_RATIO
67
- let rows = Math.floor(Math.sqrt((TARGET_CELL_ASPECT_RATIO / aspectRatio) * numberOfItems)) || 1;
71
+ let rows = Math.floor(Math.sqrt(TARGET_CELL_ASPECT_RATIO / aspectRatio * numberOfItems)) || 1;
68
72
  // Make sure rows do not exceed numberOfItems
69
73
  rows = Math.min(rows, numberOfItems);
70
74
  // Given the rows, get the minimum columns needed to create enough cells for the number of items
@@ -73,7 +77,7 @@ export const calculateGridProps = (numberOfItems, width, height) => {
73
77
  let fillDirection = 'horizontal';
74
78
  while (rows < numberOfItems) {
75
79
  // If cell aspect ratio is less than MINIMUM_CELL_ASPECT_RATIO_ALLOWED then try more rows
76
- if ((rows / columns) * aspectRatio < MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {
80
+ if (rows / columns * aspectRatio < MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {
77
81
  rows += 1;
78
82
  columns = Math.ceil(numberOfItems / rows);
79
83
  continue;
@@ -112,9 +116,9 @@ export const calculateGridProps = (numberOfItems, width, height) => {
112
116
  // | | | | | | |
113
117
  // |___________|__________| |_______|_______|_______|
114
118
  // Calculate the aspect ratio of big cells stretched horizontally
115
- const horizontallyStretchedCellRatio = (rows / (columns - 1)) * aspectRatio;
119
+ const horizontallyStretchedCellRatio = rows / (columns - 1) * aspectRatio;
116
120
  // Calculate the aspect ratio of big cells stretched vertically
117
- const verticallyStretchedCellRatio = ((rows - 1) / columns) * aspectRatio;
121
+ const verticallyStretchedCellRatio = (rows - 1) / columns * aspectRatio;
118
122
  // We know the horizontally stretched cells aspect ratio is higher than MINIMUM_CELL_ASPECT_RATIO_ALLOWED. If vertically stretched cells
119
123
  // is also higher than the MINIMUM_CELL_ASPECT_RATIO_ALLOWED, then choose which aspect ratio is better.
120
124
  if (verticallyStretchedCellRatio >= MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {
@@ -126,7 +130,11 @@ export const calculateGridProps = (numberOfItems, width, height) => {
126
130
  }
127
131
  break;
128
132
  }
129
- return { fillDirection, rows, columns };
133
+ return {
134
+ fillDirection,
135
+ rows,
136
+ columns
137
+ };
130
138
  };
131
139
  /**
132
140
  * Creates a styles classname with CSS Grid related styles given GridProps and the number of items to distribute as evenly as possible.
@@ -144,41 +152,33 @@ export const createGridStyles = (numberOfItems, gridProps) => {
144
152
  // Get grid units
145
153
  // e.g. If some blocks have 2 big cells while others have 3 small cells, we need to work with 6 units per block
146
154
  const units = smallCellsPerBlock * bigCellsPerBlock;
147
- const gridStyles = isHorizontal
148
- ? {
149
- gridTemplateColumns: `repeat(${units}, minmax(0, 1fr))`,
150
- gridTemplateRows: `repeat(${blocks}, minmax(0, 1fr))`,
151
- gridAutoFlow: 'row'
155
+ const gridStyles = isHorizontal ? {
156
+ gridTemplateColumns: `repeat(${units}, minmax(0, 1fr))`,
157
+ gridTemplateRows: `repeat(${blocks}, minmax(0, 1fr))`,
158
+ gridAutoFlow: 'row'
159
+ } : {
160
+ gridTemplateColumns: `repeat(${blocks}, minmax(0, 1fr))`,
161
+ gridTemplateRows: `repeat(${units}, minmax(0, 1fr))`,
162
+ gridAutoFlow: 'column'
163
+ };
164
+ const smallCellStyle = isHorizontal ? {
165
+ '> *': {
166
+ gridColumn: `auto / span ${units / smallCellsPerBlock}`
152
167
  }
153
- : {
154
- gridTemplateColumns: `repeat(${blocks}, minmax(0, 1fr))`,
155
- gridTemplateRows: `repeat(${units}, minmax(0, 1fr))`,
156
- gridAutoFlow: 'column'
157
- };
158
- const smallCellStyle = isHorizontal
159
- ? {
160
- '> *': {
161
- gridColumn: `auto / span ${units / smallCellsPerBlock}`
162
- }
168
+ } : {
169
+ '> *': {
170
+ gridRow: `auto / span ${units / smallCellsPerBlock}`
163
171
  }
164
- : {
165
- '> *': {
166
- gridRow: `auto / span ${units / smallCellsPerBlock}`
167
- }
168
- };
172
+ };
169
173
  // If there are big cells, we are choosing to place the latest children into the big cells.
170
174
  // That is why we use the '> *:nth-last-child(-n + ${numBigCells})' CSS selector below
171
- const bigCellStyle = numBigCells
172
- ? {
173
- [`> *:nth-last-child(-n + ${numBigCells})`]: isHorizontal
174
- ? {
175
- gridColumn: `auto / span ${units / bigCellsPerBlock}`
176
- }
177
- : {
178
- gridRow: `auto / span ${units / bigCellsPerBlock}`
179
- }
175
+ const bigCellStyle = numBigCells ? {
176
+ [`> *:nth-last-child(-n + ${numBigCells})`]: isHorizontal ? {
177
+ gridColumn: `auto / span ${units / bigCellsPerBlock}`
178
+ } : {
179
+ gridRow: `auto / span ${units / bigCellsPerBlock}`
180
180
  }
181
- : {};
181
+ } : {};
182
182
  return mergeStyles(gridStyles, smallCellStyle, bigCellStyle);
183
183
  };
184
184
  //# sourceMappingURL=GridLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridLayout.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/GridLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CA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CAAC,aAAa,GAAG,MAAM,CAAC,CAAC;IAC5D,MAAM,WAAW,GAAG,CAAC,SAAS,CAAC,IAAI,GAAG,SAAS,CAAC,OAAO,GAAG,aAAa,CAAC,GAAG,gBAAgB,CAAC;IAC5F,iBAAiB;IACjB,+GAA+G;IAC/G,MAAM,KAAK,GAAG,kBAAkB,GAAG,gBAAgB,CAAC;IAEpD,MAAM,UAAU,GAAG,YAAY;QAC7B,CAAC,CAAC;YACE,mBAAmB,EAAE,UAAU,KAAK,mBAAmB;YACvD,gBAAgB,EAAE,UAAU,MAAM,mBAAmB;YACrD,YAAY,EAAE,KAAK;SACpB;QACH,CAAC,CAAC;YACE,mBAAmB,EAAE,UAAU,MAAM,mBAAmB;YACxD,gBAAgB,EAAE,UAAU,KAAK,mBAAmB;YACpD,YAAY,EAAE,QAAQ;SACvB,CAAC;IAEN,MAAM,cAAc,GAAG,YAAY;QACjC,CAAC,CAAC;YACE,KAAK,EAAE;gBACL,UAAU,EAAE,eAAe,KAAK,GAAG,kBAAkB,EAAE;aACxD;SACF;QACH,CAAC,CAAC;YACE,KAAK,EAAE;gBACL,OAAO,EAAE,eAAe,KAAK,GAAG,kBAAkB,EAAE;aACrD;SACF,CAAC;IAEN,2FAA2F;IAC3F,sFAAsF;IACtF,MAAM,YAAY,GAAG,WAAW;QAC9B,CAAC,CAAC;YACE,CAAC,2BAA2B,WAAW,GAAG,CAAC,EAAE,YAAY;gBACvD,CAAC,CAAC;oBACE,UAAU,EAAE,eAAe,KAAK,GAAG,gBAAgB,EAAE;iBACtD;gBACH,CAAC,CAAC;oBACE,OAAO,EAAE,eAAe,KAAK,GAAG,gBAAgB,EAAE;iBACnD;SACN;QACH,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,WAAW,CAAC,UAAU,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;AAC/D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStyle, mergeStyles } from '@fluentui/react';\nimport React, { useRef, useEffect, useState, useMemo } from 'react';\nimport { BaseCustomStyles } from '../types';\nimport { gridLayoutStyle } from './styles/GridLayout.styles';\n\n/**\n * Props for {@link GridLayout}.\n *\n * @public\n */\nexport interface GridLayoutProps {\n children: React.ReactNode;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <GridLayout styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: BaseCustomStyles;\n}\n\n/**\n * {@link GridLayout} Component Styles.\n * @public\n */\nexport interface GridLayoutStyles extends BaseCustomStyles {\n /** Styles for each child of {@link GridLayout} */\n children?: IStyle;\n}\n\n/**\n * A component to lay out audio / video participants tiles in a call.\n *\n * @public\n */\nexport const GridLayout = (props: GridLayoutProps): JSX.Element => {\n const { children, styles } = props;\n const numberOfChildren = React.Children.count(children);\n\n const [currentWidth, setCurrentWidth] = useState(0);\n const [currentHeight, setCurrentHeight] = useState(0);\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n const observer = useRef(\n new ResizeObserver((entries): void => {\n const { width, height } = entries[0].contentRect;\n setCurrentWidth(width);\n setCurrentHeight(height);\n })\n );\n\n useEffect(() => {\n if (containerRef.current) {\n observer.current.observe(containerRef.current);\n }\n const currentObserver = observer.current;\n return () => currentObserver.disconnect();\n }, [observer, containerRef]);\n\n const gridProps = useMemo(() => {\n return calculateGridProps(numberOfChildren, currentWidth, currentHeight);\n }, [numberOfChildren, currentWidth, currentHeight]);\n\n const cssGridStyles = useMemo(() => createGridStyles(numberOfChildren, gridProps), [numberOfChildren, gridProps]);\n\n return (\n <div ref={containerRef} className={mergeStyles(gridLayoutStyle, cssGridStyles, styles?.root)}>\n {children}\n </div>\n );\n};\n\n/**\n * The cell aspect ratio we aim for in a grid\n */\nconst TARGET_CELL_ASPECT_RATIO = 16 / 9;\n/**\n * The minimum cell aspect ratio we allow\n */\nconst MINIMUM_CELL_ASPECT_RATIO_ALLOWED = 8 / 9;\n\nconst isCloserThan = (a: number, b: number, target: number): boolean => {\n return Math.abs(target - a) < Math.abs(target - b);\n};\n\n/**\n * Properties to describe a grid. The number of rows, number of columns and whether it fills horizontally or vertically.\n *\n * @Example\n * ```\n * ______________________\n * |_______|_______|______|\n * |___________|__________| This grid has 2 rows, 3 columns and fills horizontally.\n * ______________\n * | | | |\n * |____|____| |\n * | | | |\n * |____|____|____| This grid has 2 rows, 3 columns and fills vertically.\n * _______________\n * | | |\n * |_______|_______|\n * | | | If all cells are equal, we default the fill direction as horizontal.\n * |_______|_______| This grid has 2 rows, 2 columns and fills horizontally.\n * ```\n */\ntype GridProps = {\n fillDirection: FillDirection;\n rows: number;\n columns: number;\n};\n\ntype FillDirection = 'horizontal' | 'vertical';\n\n/**\n * Get the best GridProps to place a number of items in a grid as evenly as possible given the width and height of the grid\n * @param numberOfItems - number of items to place in grid\n * @param width - width of grid\n * @param height - height of grid\n * @returns GridProps\n */\nexport const calculateGridProps = (numberOfItems: number, width: number, height: number): GridProps => {\n if (numberOfItems <= 0) {\n return { fillDirection: 'horizontal', rows: 0, columns: 0 };\n }\n // If width or height are 0 then we return rows and column evenly\n if (width <= 0 || height <= 0) {\n return {\n fillDirection: 'horizontal',\n rows: Math.ceil(Math.sqrt(numberOfItems)),\n columns: Math.ceil(Math.sqrt(numberOfItems))\n };\n }\n const aspectRatio = width / height;\n // Approximate how many rows to divide the grid to achieve cells close to the TARGET_CELL_ASPECT_RATIO\n let rows = Math.floor(Math.sqrt((TARGET_CELL_ASPECT_RATIO / aspectRatio) * numberOfItems)) || 1;\n // Make sure rows do not exceed numberOfItems\n rows = Math.min(rows, numberOfItems);\n // Given the rows, get the minimum columns needed to create enough cells for the number of items\n let columns = Math.ceil(numberOfItems / rows);\n\n // Default fill direction to horizontal\n let fillDirection: 'horizontal' | 'vertical' = 'horizontal';\n\n while (rows < numberOfItems) {\n // If cell aspect ratio is less than MINIMUM_CELL_ASPECT_RATIO_ALLOWED then try more rows\n if ((rows / columns) * aspectRatio < MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {\n rows += 1;\n columns = Math.ceil(numberOfItems / rows);\n continue;\n }\n if (numberOfItems < rows * columns) {\n // We need to check that stretching columns vertically will result in only one less cell in stretched columns.\n // Likewise, we need to check that stretching rows horizonally will result in only one less cell in stretched rows.\n // e.g. For 4 rows, 2 columns, but only 6 items, we cannot stretch vertically because that would result in a\n // column of 2 cells which is less by more than 1 compared to the unstretched column.\n // _________\n // |____| |\n // |____|____|\n // |____| |\n // |____|____|\n\n const canStretchVertically = numberOfItems >= rows + (columns - 1) * (rows - 1);\n const canStretchHorizontally = numberOfItems >= columns + (rows - 1) * (columns - 1);\n if (!canStretchVertically && !canStretchHorizontally) {\n rows += 1;\n columns = Math.ceil(numberOfItems / rows);\n continue;\n } else if (!canStretchVertically) {\n break;\n } else if (!canStretchHorizontally) {\n fillDirection = 'vertical';\n break;\n }\n\n // We need to figure out whether the big cells should stretch horizontally or vertically\n // to fill in the empty spaces\n // e.g. For 2 rows, 3 columns, but only 5 items, we need to choose whether to stretch cells\n // horizontally or vertically\n // ______________________ _______________________\n // | | | | | | | |\n // |_______|_______|______| |_______|_______| |\n // | | | | | | |\n // |___________|__________| |_______|_______|_______|\n\n // Calculate the aspect ratio of big cells stretched horizontally\n const horizontallyStretchedCellRatio = (rows / (columns - 1)) * aspectRatio;\n // Calculate the aspect ratio of big cells stretched vertically\n const verticallyStretchedCellRatio = ((rows - 1) / columns) * aspectRatio;\n // We know the horizontally stretched cells aspect ratio is higher than MINIMUM_CELL_ASPECT_RATIO_ALLOWED. If vertically stretched cells\n // is also higher than the MINIMUM_CELL_ASPECT_RATIO_ALLOWED, then choose which aspect ratio is better.\n if (verticallyStretchedCellRatio >= MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {\n // If vertically stetched cell has an aspect ratio closer to TARGET_CELL_ASPECT_RATIO then change the fill direction to vertical\n if (isCloserThan(verticallyStretchedCellRatio, horizontallyStretchedCellRatio, TARGET_CELL_ASPECT_RATIO)) {\n fillDirection = 'vertical';\n }\n }\n }\n break;\n }\n\n return { fillDirection, rows, columns };\n};\n\n/**\n * Creates a styles classname with CSS Grid related styles given GridProps and the number of items to distribute as evenly as possible.\n * @param numberOfItems - number of items to place in grid\n * @param gridProps - GridProps that define the number of rows, number of columns, and the fill direction\n * @returns - classname\n */\nexport const createGridStyles = (numberOfItems: number, gridProps: GridProps): string => {\n const isHorizontal = gridProps.fillDirection === 'horizontal';\n // Blocks are either rows or columns depending on whether we fill horizontally or vertically. Each block may differ in the number of cells.\n const blocks = isHorizontal ? gridProps.rows : gridProps.columns;\n const smallCellsPerBlock = Math.ceil(numberOfItems / blocks);\n const bigCellsPerBlock = Math.floor(numberOfItems / blocks);\n const numBigCells = (gridProps.rows * gridProps.columns - numberOfItems) * bigCellsPerBlock;\n // Get grid units\n // e.g. If some blocks have 2 big cells while others have 3 small cells, we need to work with 6 units per block\n const units = smallCellsPerBlock * bigCellsPerBlock;\n\n const gridStyles = isHorizontal\n ? {\n gridTemplateColumns: `repeat(${units}, minmax(0, 1fr))`,\n gridTemplateRows: `repeat(${blocks}, minmax(0, 1fr))`,\n gridAutoFlow: 'row'\n }\n : {\n gridTemplateColumns: `repeat(${blocks}, minmax(0, 1fr))`,\n gridTemplateRows: `repeat(${units}, minmax(0, 1fr))`,\n gridAutoFlow: 'column'\n };\n\n const smallCellStyle = isHorizontal\n ? {\n '> *': {\n gridColumn: `auto / span ${units / smallCellsPerBlock}`\n }\n }\n : {\n '> *': {\n gridRow: `auto / span ${units / smallCellsPerBlock}`\n }\n };\n\n // If there are big cells, we are choosing to place the latest children into the big cells.\n // That is why we use the '> *:nth-last-child(-n + ${numBigCells})' CSS selector below\n const bigCellStyle = numBigCells\n ? {\n [`> *:nth-last-child(-n + ${numBigCells})`]: isHorizontal\n ? {\n gridColumn: `auto / span ${units / bigCellsPerBlock}`\n }\n : {\n gridRow: `auto / span ${units / bigCellsPerBlock}`\n }\n }\n : {};\n\n return mergeStyles(gridStyles, smallCellStyle, bigCellStyle);\n};\n"]}
1
+ {"version":3,"file":"GridLayout.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/GridLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AA4B7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAe,EAAE;IAChE,MAAM,EACJ,QAAQ,EACR,MAAM,EACP,GAAG,KAAK,CAAC;IACV,MAAM,gBAAgB,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,cAAc,CAAC,CAAC,OAAO,EAAQ,EAAE;QAC3D,MAAM,EACJ,KAAK,EACL,MAAM,EACP,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAC3B,eAAe,CAAC,KAAK,CAAC,CAAC;QACvB,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC,CAAC;IACJ,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAChD;QACD,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,CA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ACF,OAAO,EAAE,eAAe,KAAK,GAAG,gBAAgB,EAAE;SACnD;KACF,CAAC,CAAC,CAAC,EAAE,CAAC;IACP,OAAO,WAAW,CAAC,UAAU,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;AAC/D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IStyle, mergeStyles } from '@fluentui/react';\nimport React, { useRef, useEffect, useState, useMemo } from 'react';\nimport { BaseCustomStyles } from '../types';\nimport { gridLayoutStyle } from './styles/GridLayout.styles';\n\n/**\n * Props for {@link GridLayout}.\n *\n * @public\n */\nexport interface GridLayoutProps {\n children: React.ReactNode;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <GridLayout styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: BaseCustomStyles;\n}\n\n/**\n * {@link GridLayout} Component Styles.\n * @public\n */\nexport interface GridLayoutStyles extends BaseCustomStyles {\n /** Styles for each child of {@link GridLayout} */\n children?: IStyle;\n}\n\n/**\n * A component to lay out audio / video participants tiles in a call.\n *\n * @public\n */\nexport const GridLayout = (props: GridLayoutProps): JSX.Element => {\n const {\n children,\n styles\n } = props;\n const numberOfChildren = React.Children.count(children);\n const [currentWidth, setCurrentWidth] = useState(0);\n const [currentHeight, setCurrentHeight] = useState(0);\n const containerRef = useRef<HTMLDivElement>(null);\n const observer = useRef(new ResizeObserver((entries): void => {\n const {\n width,\n height\n } = entries[0].contentRect;\n setCurrentWidth(width);\n setCurrentHeight(height);\n }));\n useEffect(() => {\n if (containerRef.current) {\n observer.current.observe(containerRef.current);\n }\n const currentObserver = observer.current;\n return () => currentObserver.disconnect();\n }, [observer, containerRef]);\n const gridProps = useMemo(() => {\n return calculateGridProps(numberOfChildren, currentWidth, currentHeight);\n }, [numberOfChildren, currentWidth, currentHeight]);\n const cssGridStyles = useMemo(() => createGridStyles(numberOfChildren, gridProps), [numberOfChildren, gridProps]);\n return <div ref={containerRef} className={mergeStyles(gridLayoutStyle, cssGridStyles, styles?.root)}>\n {children}\n </div>;\n};\n\n/**\n * The cell aspect ratio we aim for in a grid\n */\nconst TARGET_CELL_ASPECT_RATIO = 16 / 9;\n/**\n * The minimum cell aspect ratio we allow\n */\nconst MINIMUM_CELL_ASPECT_RATIO_ALLOWED = 8 / 9;\nconst isCloserThan = (a: number, b: number, target: number): boolean => {\n return Math.abs(target - a) < Math.abs(target - b);\n};\n\n/**\n * Properties to describe a grid. The number of rows, number of columns and whether it fills horizontally or vertically.\n *\n * @Example\n * ```\n * ______________________\n * |_______|_______|______|\n * |___________|__________| This grid has 2 rows, 3 columns and fills horizontally.\n * ______________\n * | | | |\n * |____|____| |\n * | | | |\n * |____|____|____| This grid has 2 rows, 3 columns and fills vertically.\n * _______________\n * | | |\n * |_______|_______|\n * | | | If all cells are equal, we default the fill direction as horizontal.\n * |_______|_______| This grid has 2 rows, 2 columns and fills horizontally.\n * ```\n */\ntype GridProps = {\n fillDirection: FillDirection;\n rows: number;\n columns: number;\n};\ntype FillDirection = 'horizontal' | 'vertical';\n\n/**\n * Get the best GridProps to place a number of items in a grid as evenly as possible given the width and height of the grid\n * @param numberOfItems - number of items to place in grid\n * @param width - width of grid\n * @param height - height of grid\n * @returns GridProps\n */\nexport const calculateGridProps = (numberOfItems: number, width: number, height: number): GridProps => {\n if (numberOfItems <= 0) {\n return {\n fillDirection: 'horizontal',\n rows: 0,\n columns: 0\n };\n }\n // If width or height are 0 then we return rows and column evenly\n if (width <= 0 || height <= 0) {\n return {\n fillDirection: 'horizontal',\n rows: Math.ceil(Math.sqrt(numberOfItems)),\n columns: Math.ceil(Math.sqrt(numberOfItems))\n };\n }\n const aspectRatio = width / height;\n // Approximate how many rows to divide the grid to achieve cells close to the TARGET_CELL_ASPECT_RATIO\n let rows = Math.floor(Math.sqrt(TARGET_CELL_ASPECT_RATIO / aspectRatio * numberOfItems)) || 1;\n // Make sure rows do not exceed numberOfItems\n rows = Math.min(rows, numberOfItems);\n // Given the rows, get the minimum columns needed to create enough cells for the number of items\n let columns = Math.ceil(numberOfItems / rows);\n\n // Default fill direction to horizontal\n let fillDirection: 'horizontal' | 'vertical' = 'horizontal';\n while (rows < numberOfItems) {\n // If cell aspect ratio is less than MINIMUM_CELL_ASPECT_RATIO_ALLOWED then try more rows\n if (rows / columns * aspectRatio < MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {\n rows += 1;\n columns = Math.ceil(numberOfItems / rows);\n continue;\n }\n if (numberOfItems < rows * columns) {\n // We need to check that stretching columns vertically will result in only one less cell in stretched columns.\n // Likewise, we need to check that stretching rows horizonally will result in only one less cell in stretched rows.\n // e.g. For 4 rows, 2 columns, but only 6 items, we cannot stretch vertically because that would result in a\n // column of 2 cells which is less by more than 1 compared to the unstretched column.\n // _________\n // |____| |\n // |____|____|\n // |____| |\n // |____|____|\n\n const canStretchVertically = numberOfItems >= rows + (columns - 1) * (rows - 1);\n const canStretchHorizontally = numberOfItems >= columns + (rows - 1) * (columns - 1);\n if (!canStretchVertically && !canStretchHorizontally) {\n rows += 1;\n columns = Math.ceil(numberOfItems / rows);\n continue;\n } else if (!canStretchVertically) {\n break;\n } else if (!canStretchHorizontally) {\n fillDirection = 'vertical';\n break;\n }\n\n // We need to figure out whether the big cells should stretch horizontally or vertically\n // to fill in the empty spaces\n // e.g. For 2 rows, 3 columns, but only 5 items, we need to choose whether to stretch cells\n // horizontally or vertically\n // ______________________ _______________________\n // | | | | | | | |\n // |_______|_______|______| |_______|_______| |\n // | | | | | | |\n // |___________|__________| |_______|_______|_______|\n\n // Calculate the aspect ratio of big cells stretched horizontally\n const horizontallyStretchedCellRatio = rows / (columns - 1) * aspectRatio;\n // Calculate the aspect ratio of big cells stretched vertically\n const verticallyStretchedCellRatio = (rows - 1) / columns * aspectRatio;\n // We know the horizontally stretched cells aspect ratio is higher than MINIMUM_CELL_ASPECT_RATIO_ALLOWED. If vertically stretched cells\n // is also higher than the MINIMUM_CELL_ASPECT_RATIO_ALLOWED, then choose which aspect ratio is better.\n if (verticallyStretchedCellRatio >= MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {\n // If vertically stetched cell has an aspect ratio closer to TARGET_CELL_ASPECT_RATIO then change the fill direction to vertical\n if (isCloserThan(verticallyStretchedCellRatio, horizontallyStretchedCellRatio, TARGET_CELL_ASPECT_RATIO)) {\n fillDirection = 'vertical';\n }\n }\n }\n break;\n }\n return {\n fillDirection,\n rows,\n columns\n };\n};\n\n/**\n * Creates a styles classname with CSS Grid related styles given GridProps and the number of items to distribute as evenly as possible.\n * @param numberOfItems - number of items to place in grid\n * @param gridProps - GridProps that define the number of rows, number of columns, and the fill direction\n * @returns - classname\n */\nexport const createGridStyles = (numberOfItems: number, gridProps: GridProps): string => {\n const isHorizontal = gridProps.fillDirection === 'horizontal';\n // Blocks are either rows or columns depending on whether we fill horizontally or vertically. Each block may differ in the number of cells.\n const blocks = isHorizontal ? gridProps.rows : gridProps.columns;\n const smallCellsPerBlock = Math.ceil(numberOfItems / blocks);\n const bigCellsPerBlock = Math.floor(numberOfItems / blocks);\n const numBigCells = (gridProps.rows * gridProps.columns - numberOfItems) * bigCellsPerBlock;\n // Get grid units\n // e.g. If some blocks have 2 big cells while others have 3 small cells, we need to work with 6 units per block\n const units = smallCellsPerBlock * bigCellsPerBlock;\n const gridStyles = isHorizontal ? {\n gridTemplateColumns: `repeat(${units}, minmax(0, 1fr))`,\n gridTemplateRows: `repeat(${blocks}, minmax(0, 1fr))`,\n gridAutoFlow: 'row'\n } : {\n gridTemplateColumns: `repeat(${blocks}, minmax(0, 1fr))`,\n gridTemplateRows: `repeat(${units}, minmax(0, 1fr))`,\n gridAutoFlow: 'column'\n };\n const smallCellStyle = isHorizontal ? {\n '> *': {\n gridColumn: `auto / span ${units / smallCellsPerBlock}`\n }\n } : {\n '> *': {\n gridRow: `auto / span ${units / smallCellsPerBlock}`\n }\n };\n\n // If there are big cells, we are choosing to place the latest children into the big cells.\n // That is why we use the '> *:nth-last-child(-n + ${numBigCells})' CSS selector below\n const bigCellStyle = numBigCells ? {\n [`> *:nth-last-child(-n + ${numBigCells})`]: isHorizontal ? {\n gridColumn: `auto / span ${units / bigCellsPerBlock}`\n } : {\n gridRow: `auto / span ${units / bigCellsPerBlock}`\n }\n } : {};\n return mergeStyles(gridStyles, smallCellStyle, bigCellStyle);\n};"]}
@@ -13,13 +13,13 @@ export const _HighContrastAwareIcon = (props) => {
13
13
  const theme = useTheme();
14
14
  // setting colors for the icons using color from theme, so in dark mode or other accessibility modes, they have pre-defined contrast colors
15
15
  // the media query is for when in specific window accessibility mode, change the svg colors
16
- return (React.createElement(Icon, { iconName: iconName, className: mergeStyles({
16
+ return React.createElement(Icon, { iconName: iconName, className: mergeStyles({
17
17
  svg: {
18
18
  fill: disabled ? theme.palette.neutralTertiary : theme.palette.neutralPrimaryAlt,
19
19
  '@media (forced-colors: active) and (prefers-color-scheme: dark)': {
20
20
  fill: disabled ? theme.palette.neutralPrimaryAlt : theme.palette.neutralTertiary
21
21
  }
22
22
  }
23
- }) }));
23
+ }) });
24
24
  };
25
25
  //# sourceMappingURL=HighContrastAwareIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HighContrastAwareIcon.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/HighContrastAwareIcon.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAYtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;IACxF,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACrC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,2IAA2I;IAC3I,2FAA2F;IAC3F,OAAO,CACL,oBAAC,IAAI,IACH,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,WAAW,CAAC;YACrB,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB;gBAEhF,iEAAiE,EAAE;oBACjE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe;iBACjF;aACF;SACF,CAAC,GACF,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Icon, mergeStyles } from '@fluentui/react';\nimport React from 'react';\nimport { useTheme } from '../theming';\n\n/**\n * @internal\n */\nexport interface _HighContrastAwareIconProps {\n /** Icon name */\n iconName: string;\n /** Whether button is disabled */\n disabled?: boolean | undefined;\n}\n\n/**\n * This is a helper component to define and unify icon colors\n *\n * @internal\n */\nexport const _HighContrastAwareIcon = (props: _HighContrastAwareIconProps): JSX.Element => {\n const { iconName, disabled } = props;\n const theme = useTheme();\n // setting colors for the icons using color from theme, so in dark mode or other accessibility modes, they have pre-defined contrast colors\n // the media query is for when in specific window accessibility mode, change the svg colors\n return (\n <Icon\n iconName={iconName}\n className={mergeStyles({\n svg: {\n fill: disabled ? theme.palette.neutralTertiary : theme.palette.neutralPrimaryAlt,\n\n '@media (forced-colors: active) and (prefers-color-scheme: dark)': {\n fill: disabled ? theme.palette.neutralPrimaryAlt : theme.palette.neutralTertiary\n }\n }\n })}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"HighContrastAwareIcon.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/HighContrastAwareIcon.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAYtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;IACxF,MAAM,EACJ,QAAQ,EACR,QAAQ,EACT,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,2IAA2I;IAC3I,2FAA2F;IAC3F,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC;YACtD,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB;gBAChF,iEAAiE,EAAE;oBACjE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe;iBACjF;aACF;SACF,CAAC,GAAI,CAAC;AACT,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Icon, mergeStyles } from '@fluentui/react';\nimport React from 'react';\nimport { useTheme } from '../theming';\n\n/**\n * @internal\n */\nexport interface _HighContrastAwareIconProps {\n /** Icon name */\n iconName: string;\n /** Whether button is disabled */\n disabled?: boolean | undefined;\n}\n\n/**\n * This is a helper component to define and unify icon colors\n *\n * @internal\n */\nexport const _HighContrastAwareIcon = (props: _HighContrastAwareIconProps): JSX.Element => {\n const {\n iconName,\n disabled\n } = props;\n const theme = useTheme();\n // setting colors for the icons using color from theme, so in dark mode or other accessibility modes, they have pre-defined contrast colors\n // the media query is for when in specific window accessibility mode, change the svg colors\n return <Icon iconName={iconName} className={mergeStyles({\n svg: {\n fill: disabled ? theme.palette.neutralTertiary : theme.palette.neutralPrimaryAlt,\n '@media (forced-colors: active) and (prefers-color-scheme: dark)': {\n fill: disabled ? theme.palette.neutralPrimaryAlt : theme.palette.neutralTertiary\n }\n }\n })} />;\n};"]}
@@ -34,14 +34,16 @@ export const HorizontalGallery = (props) => {
34
34
  const showButtons = numberOfChildren > childrenPerPage;
35
35
  const disablePreviousButton = page === 0;
36
36
  const disableNextButton = page === lastPage;
37
- return (React.createElement(Stack, { horizontal: true, className: mergeStyles(rootStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root) },
38
- showButtons && (React.createElement(HorizontalGalleryNavigationButton, { key: "previous-nav-button", icon: React.createElement(Icon, { iconName: "HorizontalGalleryLeftButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.previousButton, onClick: () => setPage(Math.max(0, Math.min(lastPage, page - 1))), disabled: disablePreviousButton, identifier: ids.horizontalGalleryLeftNavButton })),
39
- React.createElement(Stack, { horizontal: true, className: mergeStyles(childrenContainerStyle, { '> *': (_b = props.styles) === null || _b === void 0 ? void 0 : _b.children }) }, childrenOnCurrentPage),
40
- showButtons && (React.createElement(HorizontalGalleryNavigationButton, { key: "next-nav-button", icon: React.createElement(Icon, { iconName: "HorizontalGalleryRightButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.nextButton, onClick: () => setPage(Math.min(lastPage, page + 1)), disabled: disableNextButton, identifier: ids.horizontalGalleryRightNavButton }))));
37
+ return React.createElement(Stack, { horizontal: true, className: mergeStyles(rootStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root) },
38
+ showButtons && React.createElement(HorizontalGalleryNavigationButton, { key: "previous-nav-button", icon: React.createElement(Icon, { iconName: "HorizontalGalleryLeftButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.previousButton, onClick: () => setPage(Math.max(0, Math.min(lastPage, page - 1))), disabled: disablePreviousButton, identifier: ids.horizontalGalleryLeftNavButton }),
39
+ React.createElement(Stack, { horizontal: true, className: mergeStyles(childrenContainerStyle, {
40
+ '> *': (_b = props.styles) === null || _b === void 0 ? void 0 : _b.children
41
+ }) }, childrenOnCurrentPage),
42
+ showButtons && React.createElement(HorizontalGalleryNavigationButton, { key: "next-nav-button", icon: React.createElement(Icon, { iconName: "HorizontalGalleryRightButton" }), styles: styles === null || styles === void 0 ? void 0 : styles.nextButton, onClick: () => setPage(Math.min(lastPage, page + 1)), disabled: disableNextButton, identifier: ids.horizontalGalleryRightNavButton }));
41
43
  };
42
44
  const HorizontalGalleryNavigationButton = (props) => {
43
45
  const theme = useTheme();
44
- return (React.createElement(DefaultButton, { className: mergeStyles(leftRightButtonStyles(theme), props.styles), onClick: props.onClick, disabled: props.disabled, "data-ui-id": props.identifier }, props.icon));
46
+ return React.createElement(DefaultButton, { className: mergeStyles(leftRightButtonStyles(theme), props.styles), onClick: props.onClick, disabled: props.disabled, "data-ui-id": props.identifier }, props.icon);
45
47
  };
46
48
  function bucketize(arr, bucketSize) {
47
49
  const bucketArray = [];
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalGallery.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/HorizontalGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAU,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,yBAAyB,GAAG,CAAC,CAAC;AA+BpC;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,EAAE,QAAQ,EAAE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Z,KAAK,CAAC,UAAU,IAE3B,KAAK,CAAC,IAAI,CACG,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,SAAS,CAAI,GAAQ,EAAE,UAAkB;IAChD,MAAM,WAAW,GAAU,EAAE,CAAC;IAE9B,IAAI,UAAU,IAAI,CAAC,EAAE;QACnB,OAAO,WAAW,CAAC;KACpB;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,IAAI,UAAU,EAAE;QAC/C,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;KAChD;IAED,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { DefaultButton, Icon, IStyle, Stack, mergeStyles } from '@fluentui/react';\nimport React, { useMemo, useState } from 'react';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles } from '../types';\nimport { rootStyle, childrenContainerStyle, leftRightButtonStyles } from './styles/HorizontalGallery.styles';\nimport { useIdentifiers } from '../identifiers';\n\n/**\n * {@link HorizontalGallery} default children per page\n */\nconst DEFAULT_CHILDREN_PER_PAGE = 5;\n\n/**\n * {@link HorizontalGallery} Component Styles.\n * @public\n */\nexport interface HorizontalGalleryStyles extends BaseCustomStyles {\n /** Styles for each child of {@link HorizontalGallery} */\n children?: IStyle;\n /** Styles for navigation button to go to previous page */\n previousButton?: IStyle;\n /** Styles for navigation button to go to next page */\n nextButton?: IStyle;\n}\n\n/**\n * {@link HorizontalGallery} Component Props.\n */\nexport interface HorizontalGalleryProps {\n children: React.ReactNode;\n /**\n * Styles for HorizontalGallery\n */\n styles?: HorizontalGalleryStyles;\n /**\n * Children shown per page\n * @defaultValue 5\n */\n childrenPerPage?: number;\n}\n\n/**\n * Renders a horizontal gallery that parents children horizontally. Handles pagination based on the childrenPerPage prop.\n * @param props - HorizontalGalleryProps {@link @azure/communication-react#HorizontalGalleryProps}\n * @returns\n */\nexport const HorizontalGallery = (props: HorizontalGalleryProps): JSX.Element => {\n const { children, childrenPerPage = DEFAULT_CHILDREN_PER_PAGE, styles } = props;\n\n const ids = useIdentifiers();\n\n const [page, setPage] = useState(0);\n\n const numberOfChildren = React.Children.count(children);\n const lastPage = Math.ceil(numberOfChildren / childrenPerPage) - 1;\n\n const paginatedChildren: React.ReactNode[][] = useMemo(() => {\n return bucketize(React.Children.toArray(children), childrenPerPage);\n }, [children, childrenPerPage]);\n\n // If children per page is 0 or less return empty element\n if (childrenPerPage <= 0) {\n return <></>;\n }\n\n const firstIndexOfCurrentPage = page * childrenPerPage;\n const clippedPage = firstIndexOfCurrentPage < numberOfChildren - 1 ? page : lastPage;\n const childrenOnCurrentPage = paginatedChildren[clippedPage];\n\n const showButtons = numberOfChildren > childrenPerPage;\n const disablePreviousButton = page === 0;\n const disableNextButton = page === lastPage;\n\n return (\n <Stack horizontal className={mergeStyles(rootStyle, props.styles?.root)}>\n {showButtons && (\n <HorizontalGalleryNavigationButton\n key=\"previous-nav-button\"\n icon={<Icon iconName=\"HorizontalGalleryLeftButton\" />}\n styles={styles?.previousButton}\n onClick={() => setPage(Math.max(0, Math.min(lastPage, page - 1)))}\n disabled={disablePreviousButton}\n identifier={ids.horizontalGalleryLeftNavButton}\n />\n )}\n <Stack horizontal className={mergeStyles(childrenContainerStyle, { '> *': props.styles?.children })}>\n {childrenOnCurrentPage}\n </Stack>\n {showButtons && (\n <HorizontalGalleryNavigationButton\n key=\"next-nav-button\"\n icon={<Icon iconName=\"HorizontalGalleryRightButton\" />}\n styles={styles?.nextButton}\n onClick={() => setPage(Math.min(lastPage, page + 1))}\n disabled={disableNextButton}\n identifier={ids.horizontalGalleryRightNavButton}\n />\n )}\n </Stack>\n );\n};\n\nconst HorizontalGalleryNavigationButton = (props: {\n icon: JSX.Element;\n styles: IStyle;\n onClick?: () => void;\n disabled?: boolean;\n identifier?: string;\n}): JSX.Element => {\n const theme = useTheme();\n return (\n <DefaultButton\n className={mergeStyles(leftRightButtonStyles(theme), props.styles)}\n onClick={props.onClick}\n disabled={props.disabled}\n data-ui-id={props.identifier}\n >\n {props.icon}\n </DefaultButton>\n );\n};\n\nfunction bucketize<T>(arr: T[], bucketSize: number): T[][] {\n const bucketArray: T[][] = [];\n\n if (bucketSize <= 0) {\n return bucketArray;\n }\n\n for (let i = 0; i < arr.length; i += bucketSize) {\n bucketArray.push(arr.slice(i, i + bucketSize));\n }\n\n return bucketArray;\n}\n"]}
1
+ {"version":3,"file":"HorizontalGallery.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/HorizontalGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAU,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC7G,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,yBAAyB,GAAG,CAAC,CAAC;AA+BpC;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,EACJ,QAAQ,EACR,eAAe,GAAG,yBAAyB,EAC3C,MAAM,EACP,GAAG,KAAK,CAAC;IACV,MAAM,GAAG,GAAG,cAAc,EAAE,CAAC;IAC7B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpC,MAAM,gBAAgB,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QA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AAM,EAAE,CAAC,IAAI,UAAU,EAAE;QAC/C,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;KAChD;IACD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { DefaultButton, Icon, IStyle, Stack, mergeStyles } from '@fluentui/react';\nimport React, { useMemo, useState } from 'react';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles } from '../types';\nimport { rootStyle, childrenContainerStyle, leftRightButtonStyles } from './styles/HorizontalGallery.styles';\nimport { useIdentifiers } from '../identifiers';\n\n/**\n * {@link HorizontalGallery} default children per page\n */\nconst DEFAULT_CHILDREN_PER_PAGE = 5;\n\n/**\n * {@link HorizontalGallery} Component Styles.\n * @public\n */\nexport interface HorizontalGalleryStyles extends BaseCustomStyles {\n /** Styles for each child of {@link HorizontalGallery} */\n children?: IStyle;\n /** Styles for navigation button to go to previous page */\n previousButton?: IStyle;\n /** Styles for navigation button to go to next page */\n nextButton?: IStyle;\n}\n\n/**\n * {@link HorizontalGallery} Component Props.\n */\nexport interface HorizontalGalleryProps {\n children: React.ReactNode;\n /**\n * Styles for HorizontalGallery\n */\n styles?: HorizontalGalleryStyles;\n /**\n * Children shown per page\n * @defaultValue 5\n */\n childrenPerPage?: number;\n}\n\n/**\n * Renders a horizontal gallery that parents children horizontally. Handles pagination based on the childrenPerPage prop.\n * @param props - HorizontalGalleryProps {@link @azure/communication-react#HorizontalGalleryProps}\n * @returns\n */\nexport const HorizontalGallery = (props: HorizontalGalleryProps): JSX.Element => {\n const {\n children,\n childrenPerPage = DEFAULT_CHILDREN_PER_PAGE,\n styles\n } = props;\n const ids = useIdentifiers();\n const [page, setPage] = useState(0);\n const numberOfChildren = React.Children.count(children);\n const lastPage = Math.ceil(numberOfChildren / childrenPerPage) - 1;\n const paginatedChildren: React.ReactNode[][] = useMemo(() => {\n return bucketize(React.Children.toArray(children), childrenPerPage);\n }, [children, childrenPerPage]);\n\n // If children per page is 0 or less return empty element\n if (childrenPerPage <= 0) {\n return <></>;\n }\n const firstIndexOfCurrentPage = page * childrenPerPage;\n const clippedPage = firstIndexOfCurrentPage < numberOfChildren - 1 ? page : lastPage;\n const childrenOnCurrentPage = paginatedChildren[clippedPage];\n const showButtons = numberOfChildren > childrenPerPage;\n const disablePreviousButton = page === 0;\n const disableNextButton = page === lastPage;\n return <Stack horizontal className={mergeStyles(rootStyle, props.styles?.root)}>\n {showButtons && <HorizontalGalleryNavigationButton key=\"previous-nav-button\" icon={<Icon iconName=\"HorizontalGalleryLeftButton\" />} styles={styles?.previousButton} onClick={() => setPage(Math.max(0, Math.min(lastPage, page - 1)))} disabled={disablePreviousButton} identifier={ids.horizontalGalleryLeftNavButton} />}\n <Stack horizontal className={mergeStyles(childrenContainerStyle, {\n '> *': props.styles?.children\n })}>\n {childrenOnCurrentPage}\n </Stack>\n {showButtons && <HorizontalGalleryNavigationButton key=\"next-nav-button\" icon={<Icon iconName=\"HorizontalGalleryRightButton\" />} styles={styles?.nextButton} onClick={() => setPage(Math.min(lastPage, page + 1))} disabled={disableNextButton} identifier={ids.horizontalGalleryRightNavButton} />}\n </Stack>;\n};\nconst HorizontalGalleryNavigationButton = (props: {\n icon: JSX.Element;\n styles: IStyle;\n onClick?: () => void;\n disabled?: boolean;\n identifier?: string;\n}): JSX.Element => {\n const theme = useTheme();\n return <DefaultButton className={mergeStyles(leftRightButtonStyles(theme), props.styles)} onClick={props.onClick} disabled={props.disabled} data-ui-id={props.identifier}>\n {props.icon}\n </DefaultButton>;\n};\nfunction bucketize<T>(arr: T[], bucketSize: number): T[][] {\n const bucketArray: T[][] = [];\n if (bucketSize <= 0) {\n return bucketArray;\n }\n for (let i = 0; i < arr.length; i += bucketSize) {\n bucketArray.push(arr.slice(i, i + bucketSize));\n }\n return bucketArray;\n}"]}
@@ -28,10 +28,10 @@ export const InputBoxComponent = (props) => {
28
28
  }
29
29
  onKeyDown && onKeyDown(ev);
30
30
  }, [onEnterKeyDown, onKeyDown, supportNewline]);
31
- return (React.createElement(Stack, { className: mergedRootStyle },
31
+ return React.createElement(Stack, { className: mergedRootStyle },
32
32
  React.createElement("div", { className: mergedTextContainerStyle },
33
33
  React.createElement(TextField, { autoFocus: props.autoFocus === 'sendBoxTextField', "data-ui-id": dataUiId, multiline: true, autoAdjustHeight: true, multiple: false, resizable: false, componentRef: textFieldRef, id: id, inputClassName: mergedTextFiledStyle, placeholder: placeholderText, value: textValue, onChange: onChange, autoComplete: "off", onKeyDown: onTexFieldKeyDown, styles: mergedTextFieldStyle, disabled: disabled, errorMessage: errorMessage }),
34
- React.createElement(Stack, { horizontal: true, className: mergeStyles(props.inlineChildren ? inlineButtonsContainerStyle : newLineButtonsContainerStyle) }, children))));
34
+ React.createElement(Stack, { horizontal: true, className: mergeStyles(props.inlineChildren ? inlineButtonsContainerStyle : newLineButtonsContainerStyle) }, children)));
35
35
  };
36
36
  /**
37
37
  * @private
@@ -41,18 +41,25 @@ export const InputBoxButton = (props) => {
41
41
  const [isHover, setIsHover] = useState(false);
42
42
  const mergedButtonStyle = mergeStyles(inputButtonStyle, className);
43
43
  const theme = useTheme();
44
- const calloutStyle = { root: { padding: 0 }, calloutMain: { padding: '0.5rem' } };
44
+ const calloutStyle = {
45
+ root: {
46
+ padding: 0
47
+ },
48
+ calloutMain: {
49
+ padding: '0.5rem'
50
+ }
51
+ };
45
52
  // Place callout with no gap between it and the button.
46
53
  const calloutProps = {
47
54
  gapSpace: 0,
48
55
  styles: calloutStyle,
49
56
  backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''
50
57
  };
51
- return (React.createElement(TooltipHost, { hostClassName: inputButtonTooltipStyle, content: tooltipContent, calloutProps: Object.assign({}, calloutProps) },
58
+ return React.createElement(TooltipHost, { hostClassName: inputButtonTooltipStyle, content: tooltipContent, calloutProps: Object.assign({}, calloutProps) },
52
59
  React.createElement(IconButton, { className: mergedButtonStyle, ariaLabel: ariaLabel, onClick: onClick, id: id, onMouseEnter: () => {
53
60
  setIsHover(true);
54
61
  }, onMouseLeave: () => {
55
62
  setIsHover(false);
56
- }, onRenderIcon: () => onRenderIcon(isHover) })));
63
+ }, onRenderIcon: () => onRenderIcon(isHover) }));
57
64
  };
58
65
  //# sourceMappingURL=InputBoxComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputBoxComponent.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/InputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAwB,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EACL,KAAK,EACL,SAAS,EACT,WAAW,EAGX,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,2BAA2B,EAC3B,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAuCtC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC9E,MAAM,EACJ,MAAM,EACN,EAAE,EACF,YAAY,EAAE,QAAQ,EACtB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,SAAS,EACT,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,QAAQ,EACT,GAAG,KAAK,CAAC;IAEV,MAAM,eAAe,GAAG,WAAW,CAAC,oBAAoB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,CAAC;IACxE,MAAM,oBA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W,IAAC,aAAa,EAAE,uBAAuB,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,oBAAO,YAAY;QAC3G,oBAAC,UAAU,IACT,SAAS,EAAE,iBAAiB,EAC5B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,EAAE,EAAE,EAAE,EACN,YAAY,EAAE,GAAG,EAAE;gBACjB,UAAU,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;gBACjB,UAAU,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC,EACD,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GACzC,CACU,CACf,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useState, ReactNode, FormEvent, useCallback } from 'react';\nimport {\n Stack,\n TextField,\n mergeStyles,\n IStyle,\n ITextField,\n concatStyleSets,\n IconButton,\n TooltipHost,\n ICalloutContentStyles\n} from '@fluentui/react';\nimport { BaseCustomStyles } from '../types';\nimport {\n inputBoxStyle,\n inputBoxWrapperStyle,\n inputButtonStyle,\n textFieldStyle,\n textContainerStyle,\n inlineButtonsContainerStyle,\n newLineButtonsContainerStyle,\n inputBoxNewLineSpaceAffordance,\n inputButtonTooltipStyle\n} from './styles/InputBoxComponent.style';\n\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { useTheme } from '../theming';\n\n/**\n * @private\n */\nexport interface InputBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n\n /** Styles for customizing the container of the text field */\n textFieldContainer?: IStyle;\n}\n\ntype InputBoxComponentProps = {\n children: ReactNode;\n /**\n * Inline child elements passed in. Setting to false will mean they are on a new line.\n */\n inlineChildren: boolean;\n 'data-ui-id'?: string;\n id?: string;\n textValue: string;\n onChange: (event: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string | undefined) => void;\n textFieldRef?: React.RefObject<ITextField>;\n inputClassName?: string;\n placeholderText?: string;\n supportNewline?: boolean;\n maxLength: number;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n errorMessage?: string | React.ReactElement;\n disabled?: boolean;\n styles?: InputBoxStylesProps;\n autoFocus?: 'sendBoxTextField';\n};\n\n/**\n * @private\n */\nexport const InputBoxComponent = (props: InputBoxComponentProps): JSX.Element => {\n const {\n styles,\n id,\n 'data-ui-id': dataUiId,\n textValue,\n onChange,\n textFieldRef,\n placeholderText,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n inputClassName,\n errorMessage,\n disabled,\n children\n } = props;\n\n const mergedRootStyle = mergeStyles(inputBoxWrapperStyle, styles?.root);\n const mergedTextFiledStyle = mergeStyles(\n inputBoxStyle,\n inputClassName,\n props.inlineChildren ? {} : inputBoxNewLineSpaceAffordance\n );\n\n const mergedTextContainerStyle = mergeStyles(textContainerStyle, styles?.textFieldContainer);\n const mergedTextFieldStyle = concatStyleSets(textFieldStyle, {\n fieldGroup: styles?.textField,\n errorMessage: styles?.systemMessage\n });\n\n const onTexFieldKeyDown = useCallback(\n (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n // Uses KeyCode 229 and which code 229 to determine if the press of the enter key is from a composition session or not (Safari only)\n if (ev.nativeEvent.isComposing || ev.nativeEvent.keyCode === 229 || ev.nativeEvent.which === 229) {\n return;\n }\n if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {\n ev.preventDefault();\n onEnterKeyDown && onEnterKeyDown();\n }\n onKeyDown && onKeyDown(ev);\n },\n [onEnterKeyDown, onKeyDown, supportNewline]\n );\n\n return (\n <Stack className={mergedRootStyle}>\n <div className={mergedTextContainerStyle}>\n <TextField\n autoFocus={props.autoFocus === 'sendBoxTextField'}\n data-ui-id={dataUiId}\n multiline\n autoAdjustHeight\n multiple={false}\n resizable={false}\n componentRef={textFieldRef}\n id={id}\n inputClassName={mergedTextFiledStyle}\n placeholder={placeholderText}\n value={textValue}\n onChange={onChange}\n autoComplete=\"off\"\n onKeyDown={onTexFieldKeyDown}\n styles={mergedTextFieldStyle}\n disabled={disabled}\n errorMessage={errorMessage}\n />\n <Stack\n horizontal\n className={mergeStyles(props.inlineChildren ? inlineButtonsContainerStyle : newLineButtonsContainerStyle)}\n >\n {children}\n </Stack>\n </div>\n </Stack>\n );\n};\n\n/**\n * Props for displaying a send button besides the text input area.\n *\n * @private\n */\nexport type InputBoxButtonProps = {\n onRenderIcon: (isHover: boolean) => JSX.Element;\n onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n className?: string;\n id?: string;\n ariaLabel?: string;\n tooltipContent?: string;\n};\n\n/**\n * @private\n */\nexport const InputBoxButton = (props: InputBoxButtonProps): JSX.Element => {\n const { onRenderIcon, onClick, ariaLabel, className, id, tooltipContent } = props;\n const [isHover, setIsHover] = useState(false);\n const mergedButtonStyle = mergeStyles(inputButtonStyle, className);\n\n const theme = useTheme();\n const calloutStyle: Partial<ICalloutContentStyles> = { root: { padding: 0 }, calloutMain: { padding: '0.5rem' } };\n\n // Place callout with no gap between it and the button.\n const calloutProps = {\n gapSpace: 0,\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n return (\n <TooltipHost hostClassName={inputButtonTooltipStyle} content={tooltipContent} calloutProps={{ ...calloutProps }}>\n <IconButton\n className={mergedButtonStyle}\n ariaLabel={ariaLabel}\n onClick={onClick}\n id={id}\n onMouseEnter={() => {\n setIsHover(true);\n }}\n onMouseLeave={() => {\n setIsHover(false);\n }}\n onRenderIcon={() => onRenderIcon(isHover)}\n />\n </TooltipHost>\n );\n};\n"]}
1
+ {"version":3,"file":"InputBoxComponent.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/InputBoxComponent.tsx"],"names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AE,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAI,CAClC,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useState, ReactNode, FormEvent, useCallback } from 'react';\nimport { Stack, TextField, mergeStyles, IStyle, ITextField, concatStyleSets, IconButton, TooltipHost, ICalloutContentStyles } from '@fluentui/react';\nimport { BaseCustomStyles } from '../types';\nimport { inputBoxStyle, inputBoxWrapperStyle, inputButtonStyle, textFieldStyle, textContainerStyle, inlineButtonsContainerStyle, newLineButtonsContainerStyle, inputBoxNewLineSpaceAffordance, inputButtonTooltipStyle } from './styles/InputBoxComponent.style';\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { useTheme } from '../theming';\n\n/**\n * @private\n */\nexport interface InputBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n\n /** Styles for customizing the container of the text field */\n textFieldContainer?: IStyle;\n}\ntype InputBoxComponentProps = {\n children: ReactNode;\n /**\n * Inline child elements passed in. Setting to false will mean they are on a new line.\n */\n inlineChildren: boolean;\n 'data-ui-id'?: string;\n id?: string;\n textValue: string;\n onChange: (event: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string | undefined) => void;\n textFieldRef?: React.RefObject<ITextField>;\n inputClassName?: string;\n placeholderText?: string;\n supportNewline?: boolean;\n maxLength: number;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n errorMessage?: string | React.ReactElement;\n disabled?: boolean;\n styles?: InputBoxStylesProps;\n autoFocus?: 'sendBoxTextField';\n};\n\n/**\n * @private\n */\nexport const InputBoxComponent = (props: InputBoxComponentProps): JSX.Element => {\n const {\n styles,\n id,\n 'data-ui-id': dataUiId,\n textValue,\n onChange,\n textFieldRef,\n placeholderText,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n inputClassName,\n errorMessage,\n disabled,\n children\n } = props;\n const mergedRootStyle = mergeStyles(inputBoxWrapperStyle, styles?.root);\n const mergedTextFiledStyle = mergeStyles(inputBoxStyle, inputClassName, props.inlineChildren ? {} : inputBoxNewLineSpaceAffordance);\n const mergedTextContainerStyle = mergeStyles(textContainerStyle, styles?.textFieldContainer);\n const mergedTextFieldStyle = concatStyleSets(textFieldStyle, {\n fieldGroup: styles?.textField,\n errorMessage: styles?.systemMessage\n });\n const onTexFieldKeyDown = useCallback((ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n // Uses KeyCode 229 and which code 229 to determine if the press of the enter key is from a composition session or not (Safari only)\n if (ev.nativeEvent.isComposing || ev.nativeEvent.keyCode === 229 || ev.nativeEvent.which === 229) {\n return;\n }\n if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {\n ev.preventDefault();\n onEnterKeyDown && onEnterKeyDown();\n }\n onKeyDown && onKeyDown(ev);\n }, [onEnterKeyDown, onKeyDown, supportNewline]);\n return <Stack className={mergedRootStyle}>\n <div className={mergedTextContainerStyle}>\n <TextField autoFocus={props.autoFocus === 'sendBoxTextField'} data-ui-id={dataUiId} multiline autoAdjustHeight multiple={false} resizable={false} componentRef={textFieldRef} id={id} inputClassName={mergedTextFiledStyle} placeholder={placeholderText} value={textValue} onChange={onChange} autoComplete=\"off\" onKeyDown={onTexFieldKeyDown} styles={mergedTextFieldStyle} disabled={disabled} errorMessage={errorMessage} />\n <Stack horizontal className={mergeStyles(props.inlineChildren ? inlineButtonsContainerStyle : newLineButtonsContainerStyle)}>\n {children}\n </Stack>\n </div>\n </Stack>;\n};\n\n/**\n * Props for displaying a send button besides the text input area.\n *\n * @private\n */\nexport type InputBoxButtonProps = {\n onRenderIcon: (isHover: boolean) => JSX.Element;\n onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n className?: string;\n id?: string;\n ariaLabel?: string;\n tooltipContent?: string;\n};\n\n/**\n * @private\n */\nexport const InputBoxButton = (props: InputBoxButtonProps): JSX.Element => {\n const {\n onRenderIcon,\n onClick,\n ariaLabel,\n className,\n id,\n tooltipContent\n } = props;\n const [isHover, setIsHover] = useState(false);\n const mergedButtonStyle = mergeStyles(inputButtonStyle, className);\n const theme = useTheme();\n const calloutStyle: Partial<ICalloutContentStyles> = {\n root: {\n padding: 0\n },\n calloutMain: {\n padding: '0.5rem'\n }\n };\n\n // Place callout with no gap between it and the button.\n const calloutProps = {\n gapSpace: 0,\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n return <TooltipHost hostClassName={inputButtonTooltipStyle} content={tooltipContent} calloutProps={{\n ...calloutProps\n }}>\n <IconButton className={mergedButtonStyle} ariaLabel={ariaLabel} onClick={onClick} id={id} onMouseEnter={() => {\n setIsHover(true);\n }} onMouseLeave={() => {\n setIsHover(false);\n }} onRenderIcon={() => onRenderIcon(isHover)} />\n </TooltipHost>;\n};"]}
@@ -10,14 +10,16 @@ import { localVideoCameraCycleButtonStyles } from './styles/VideoGallery.styles'
10
10
  export const LocalVideoCameraCycleButton = (props) => {
11
11
  const { cameras, selectedCamera, onSelectCamera, label, ariaDescription } = props;
12
12
  const theme = useTheme();
13
- return (React.createElement(IconButton, { "data-ui-id": 'local-camera-switcher-button', styles: localVideoCameraCycleButtonStyles(theme), iconProps: { iconName: 'LocalCameraSwitch' }, ariaLabel: label, ariaDescription: ariaDescription, "aria-live": 'polite', onClick: () => {
13
+ return React.createElement(IconButton, { "data-ui-id": 'local-camera-switcher-button', styles: localVideoCameraCycleButtonStyles(theme), iconProps: {
14
+ iconName: 'LocalCameraSwitch'
15
+ }, ariaLabel: label, ariaDescription: ariaDescription, "aria-live": 'polite', onClick: () => {
14
16
  if (cameras && cameras.length > 1 && selectedCamera !== undefined) {
15
- const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);
17
+ const index = cameras.findIndex(camera => selectedCamera.id === camera.id);
16
18
  const newCamera = cameras[(index + 1) % cameras.length];
17
19
  if (onSelectCamera !== undefined) {
18
20
  onSelectCamera(newCamera);
19
21
  }
20
22
  }
21
- } }));
23
+ } });
22
24
  };
23
25
  //# sourceMappingURL=LocalVideoCameraButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalVideoCameraButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/LocalVideoCameraButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAkBjF;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAuC,EAAe,EAAE;IAClG,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAClF,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,oBAAC,UAAU,kBACG,8BAA8B,EAC1C,MAAM,EAAE,iCAAiC,CAAC,KAAK,CAAC,EAChD,SAAS,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAC5C,SAAS,EAAE,KAAK,EAChB,eAAe,EAAE,eAAe,eACrB,QAAQ,EACnB,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,cAAc,KAAK,SAAS,EAAE;gBACjE,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;gBAC7E,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;gBACxD,IAAI,cAAc,KAAK,SAAS,EAAE;oBAChC,cAAc,CAAC,SAAS,CAAC,CAAC;iBAC3B;aACF;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IconButton, useTheme } from '@fluentui/react';\nimport React from 'react';\nimport { OptionsDevice } from './DevicesButton';\nimport { localVideoCameraCycleButtonStyles } from './styles/VideoGallery.styles';\n\n/**\n * @public\n */\nexport interface LocalVideoCameraCycleButtonProps {\n /** Array of cameras available to the user. */\n cameras?: OptionsDevice[];\n /** Currently selected camera in the local video stream. */\n selectedCamera?: OptionsDevice;\n /** callback function to change video feed. */\n onSelectCamera?: (device: OptionsDevice) => Promise<void>;\n /** label for local video camera switcher */\n label?: string;\n /** description for local video camera switcher */\n ariaDescription?: string;\n}\n\n/**\n * local video tile camera cycle button - for use on mobile screens only.\n * @internal\n */\nexport const LocalVideoCameraCycleButton = (props: LocalVideoCameraCycleButtonProps): JSX.Element => {\n const { cameras, selectedCamera, onSelectCamera, label, ariaDescription } = props;\n const theme = useTheme();\n\n return (\n <IconButton\n data-ui-id={'local-camera-switcher-button'}\n styles={localVideoCameraCycleButtonStyles(theme)}\n iconProps={{ iconName: 'LocalCameraSwitch' }}\n ariaLabel={label}\n ariaDescription={ariaDescription}\n aria-live={'polite'}\n onClick={() => {\n if (cameras && cameras.length > 1 && selectedCamera !== undefined) {\n const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);\n const newCamera = cameras[(index + 1) % cameras.length];\n if (onSelectCamera !== undefined) {\n onSelectCamera(newCamera);\n }\n }\n }}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"LocalVideoCameraButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/LocalVideoCameraButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAkBjF;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAuC,EAAe,EAAE;IAClG,MAAM,EACJ,OAAO,EACP,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EAChB,GAAG,KAAK,CAAC;IACV,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,oBAAC,UAAU,kBAAa,8BAA8B,EAAE,MAAM,EAAE,iCAAiC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE;YAC1H,QAAQ,EAAE,mBAAmB;SAC9B,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,eAAe,eAAa,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;YACxF,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,cAAc,KAAK,SAAS,EAAE;gBACjE,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;gBAC3E,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;gBACxD,IAAI,cAAc,KAAK,SAAS,EAAE;oBAChC,cAAc,CAAC,SAAS,CAAC,CAAC;iBAC3B;aACF;QACH,CAAC,GAAI,CAAC;AACR,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IconButton, useTheme } from '@fluentui/react';\nimport React from 'react';\nimport { OptionsDevice } from './DevicesButton';\nimport { localVideoCameraCycleButtonStyles } from './styles/VideoGallery.styles';\n\n/**\n * @public\n */\nexport interface LocalVideoCameraCycleButtonProps {\n /** Array of cameras available to the user. */\n cameras?: OptionsDevice[];\n /** Currently selected camera in the local video stream. */\n selectedCamera?: OptionsDevice;\n /** callback function to change video feed. */\n onSelectCamera?: (device: OptionsDevice) => Promise<void>;\n /** label for local video camera switcher */\n label?: string;\n /** description for local video camera switcher */\n ariaDescription?: string;\n}\n\n/**\n * local video tile camera cycle button - for use on mobile screens only.\n * @internal\n */\nexport const LocalVideoCameraCycleButton = (props: LocalVideoCameraCycleButtonProps): JSX.Element => {\n const {\n cameras,\n selectedCamera,\n onSelectCamera,\n label,\n ariaDescription\n } = props;\n const theme = useTheme();\n return <IconButton data-ui-id={'local-camera-switcher-button'} styles={localVideoCameraCycleButtonStyles(theme)} iconProps={{\n iconName: 'LocalCameraSwitch'\n }} ariaLabel={label} ariaDescription={ariaDescription} aria-live={'polite'} onClick={() => {\n if (cameras && cameras.length > 1 && selectedCamera !== undefined) {\n const index = cameras.findIndex(camera => selectedCamera.id === camera.id);\n const newCamera = cameras[(index + 1) % cameras.length];\n if (onSelectCamera !== undefined) {\n onSelectCamera(newCamera);\n }\n }\n }} />;\n};"]}
@@ -21,14 +21,7 @@ export const _LocalVideoTile = React.memo((props) => {
21
21
  onDisposeLocalStreamView,
22
22
  renderElementExists: !!renderElement,
23
23
  scalingMode: localVideoViewOptions === null || localVideoViewOptions === void 0 ? void 0 : localVideoViewOptions.scalingMode
24
- }), [
25
- isAvailable,
26
- localVideoViewOptions === null || localVideoViewOptions === void 0 ? void 0 : localVideoViewOptions.isMirrored,
27
- localVideoViewOptions === null || localVideoViewOptions === void 0 ? void 0 : localVideoViewOptions.scalingMode,
28
- onCreateLocalStreamView,
29
- onDisposeLocalStreamView,
30
- renderElement
31
- ]);
24
+ }), [isAvailable, localVideoViewOptions === null || localVideoViewOptions === void 0 ? void 0 : localVideoViewOptions.isMirrored, localVideoViewOptions === null || localVideoViewOptions === void 0 ? void 0 : localVideoViewOptions.scalingMode, onCreateLocalStreamView, onDisposeLocalStreamView, renderElement]);
32
25
  // Handle creating, destroying and updating the video stream as necessary
33
26
  useLocalVideoStreamLifecycleMaintainer(localVideoStreamProps);
34
27
  const renderVideoStreamElement = useMemo(() => {
@@ -38,28 +31,17 @@ export const _LocalVideoTile = React.memo((props) => {
38
31
  // Returning `undefined` results in the placeholder with avatar being shown
39
32
  return undefined;
40
33
  }
41
- return (React.createElement(React.Fragment, null,
34
+ return React.createElement(React.Fragment, null,
42
35
  React.createElement(FloatingLocalCameraCycleButton, { showCameraSwitcherInLocalPreview: showCameraSwitcherInLocalPreview !== null && showCameraSwitcherInLocalPreview !== void 0 ? showCameraSwitcherInLocalPreview : false, localVideoCameraCycleButtonProps: localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel: localVideoCameraSwitcherLabel, localVideoSelectedDescription: localVideoSelectedDescription }),
43
- React.createElement(StreamMedia, { videoStreamElement: renderElement, isMirrored: true })));
44
- }, [
45
- localVideoCameraCycleButtonProps,
46
- localVideoCameraSwitcherLabel,
47
- localVideoSelectedDescription,
48
- renderElement,
49
- showCameraSwitcherInLocalPreview
50
- ]);
51
- return (React.createElement(VideoTile, { key: userId !== null && userId !== void 0 ? userId : 'local-video-tile', userId: userId, renderElement: renderVideoStreamElement, showLabel: showLabel, displayName: displayName, initialsName: initialsName, styles: styles, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize }));
36
+ React.createElement(StreamMedia, { videoStreamElement: renderElement, isMirrored: true }));
37
+ }, [localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription, renderElement, showCameraSwitcherInLocalPreview]);
38
+ return React.createElement(VideoTile, { key: userId !== null && userId !== void 0 ? userId : 'local-video-tile', userId: userId, renderElement: renderVideoStreamElement, showLabel: showLabel, displayName: displayName, initialsName: initialsName, styles: styles, onRenderPlaceholder: onRenderAvatar, isMuted: isMuted, showMuteIndicator: showMuteIndicator, personaMinSize: props.personaMinSize });
52
39
  });
53
40
  const FloatingLocalCameraCycleButton = (props) => {
54
41
  const { showCameraSwitcherInLocalPreview, localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription } = props;
55
- const ariaDescription = (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) &&
56
- localVideoSelectedDescription &&
57
- _formatString(localVideoSelectedDescription, {
58
- cameraName: localVideoCameraCycleButtonProps.selectedCamera.name
59
- });
60
- return (React.createElement(Stack, { horizontalAlign: "end" }, showCameraSwitcherInLocalPreview &&
61
- (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.cameras) !== undefined &&
62
- (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) !== undefined &&
63
- (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.onSelectCamera) !== undefined && (React.createElement(LocalVideoCameraCycleButton, { cameras: localVideoCameraCycleButtonProps.cameras, selectedCamera: localVideoCameraCycleButtonProps.selectedCamera, onSelectCamera: localVideoCameraCycleButtonProps.onSelectCamera, label: localVideoCameraSwitcherLabel, ariaDescription: ariaDescription }))));
42
+ const ariaDescription = (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) && localVideoSelectedDescription && _formatString(localVideoSelectedDescription, {
43
+ cameraName: localVideoCameraCycleButtonProps.selectedCamera.name
44
+ });
45
+ return React.createElement(Stack, { horizontalAlign: "end" }, showCameraSwitcherInLocalPreview && (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.cameras) !== undefined && (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.selectedCamera) !== undefined && (localVideoCameraCycleButtonProps === null || localVideoCameraCycleButtonProps === void 0 ? void 0 : localVideoCameraCycleButtonProps.onSelectCamera) !== undefined && React.createElement(LocalVideoCameraCycleButton, { cameras: localVideoCameraCycleButtonProps.cameras, selectedCamera: localVideoCameraCycleButtonProps.selectedCamera, onSelectCamera: localVideoCameraCycleButtonProps.onSelectCamera, label: localVideoCameraSwitcherLabel, ariaDescription: ariaDescription }));
64
46
  };
65
47
  //# sourceMappingURL=LocalVideoTile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalVideoTile.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/LocalVideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,mCAAgC;AACxD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,2BAA2B,EAAoC,MAAM,0BAA0B,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,sCAAsC,EAEvC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CACvC,CAAC,KAmBA,EAAE,EAAE;IACH,MAAM,EACJ,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACb,MAAM,EACN,SAAS,EACT,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,MAAM,EACN,gCAAgC,EAChC,gCAAgC,EAChC,6BAA6B,EAC7B,6BAA6B,EAC9B,GAAG,KAAK,CAAC;IAEV,MAAM,qBAAqB,GAA6C,OAAO,CAC7E,GAAG,EAAE,CAAC,CAAC;QACL,UAAU,EAAE,qBAAqB,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AAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,MAAM,EACd,mBAAmB,EAAE,cAAc,EACnC,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,KAAK,CAAC,cAAc,GACpC,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,8BAA8B,GAAG,CAAC,KAKvC,EAAe,EAAE;IAChB,MAAM,EACJ,gCAAgC,EAChC,gCAAgC,EAChC,6BAA6B,EAC7B,6BAA6B,EAC9B,GAAG,KAAK,CAAC;IACV,MAAM,eAAe,GACnB,CAAA,gCAAgC,aAAhC,gCAAgC,uBAAhC,gCAAgC,CAAE,cAAc;QAChD,6BAA6B;QAC7B,aAAa,CAAC,6BAA6B,EAAE;YAC3C,UAAU,EAAE,gCAAgC,CAAC,cAAc,CAAC,IAAI;SACjE,CAAC,CAAC;IACL,OAAO,CACL,oBAAC,KAAK,IAAC,eAAe,EAAC,KAAK,IACzB,gCAAgC;QAC/B,CAAA,gCAAgC,aAAhC,gCAAgC,uBAAhC,gCAAgC,CAAE,OAAO,MAAK,SAAS;QACvD,CAAA,gCAAgC,aAAhC,gCAAgC,uBAAhC,gCAAgC,CAAE,cAAc,MAAK,SAAS;QAC9D,CAAA,gCAAgC,aAAhC,gCAAgC,uBAAhC,gCAAgC,CAAE,cAAc,MAAK,SAAS,IAAI,CAChE,oBAAC,2BAA2B,IAC1B,OAAO,EAAE,gCAAgC,CAAC,OAAO,EACjD,cAAc,EAAE,gCAAgC,CAAC,cAAc,EAC/D,cAAc,EAAE,gCAAgC,CAAC,cAAc,EAC/D,KAAK,EAAE,6BAA6B,EACpC,eAAe,EAAE,eAAe,GAChC,CACH,CACG,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Stack } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport React, { useMemo } from 'react';\nimport { OnRenderAvatarCallback, VideoStreamOptions, CreateVideoStreamViewResult } from '../types';\nimport { LocalVideoCameraCycleButton, LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\nimport { StreamMedia } from './StreamMedia';\nimport {\n useLocalVideoStreamLifecycleMaintainer,\n LocalVideoStreamLifecycleMaintainerProps\n} from './VideoGallery/useVideoStreamLifecycleMaintainer';\nimport { VideoTile, VideoTileStylesProps } from './VideoTile';\n\n/**\n * A memoized version of VideoTile for rendering local participant.\n *\n * @internal\n */\nexport const _LocalVideoTile = React.memo(\n (props: {\n userId?: string;\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n onDisposeLocalStreamView?: () => void;\n isAvailable?: boolean;\n isMuted?: boolean;\n renderElement?: HTMLElement;\n displayName?: string;\n initialsName?: string;\n localVideoViewOptions?: VideoStreamOptions;\n onRenderAvatar?: OnRenderAvatarCallback;\n showLabel: boolean;\n showMuteIndicator?: boolean;\n showCameraSwitcherInLocalPreview?: boolean;\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n localVideoCameraSwitcherLabel?: string;\n localVideoSelectedDescription?: string;\n styles?: VideoTileStylesProps;\n personaMinSize?: number;\n }) => {\n const {\n isAvailable,\n isMuted,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n localVideoViewOptions,\n renderElement,\n userId,\n showLabel,\n displayName,\n initialsName,\n onRenderAvatar,\n showMuteIndicator,\n styles,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n localVideoCameraSwitcherLabel,\n localVideoSelectedDescription\n } = props;\n\n const localVideoStreamProps: LocalVideoStreamLifecycleMaintainerProps = useMemo(\n () => ({\n isMirrored: localVideoViewOptions?.isMirrored,\n isStreamAvailable: isAvailable,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n renderElementExists: !!renderElement,\n scalingMode: localVideoViewOptions?.scalingMode\n }),\n [\n isAvailable,\n localVideoViewOptions?.isMirrored,\n localVideoViewOptions?.scalingMode,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n renderElement\n ]\n );\n\n // Handle creating, destroying and updating the video stream as necessary\n useLocalVideoStreamLifecycleMaintainer(localVideoStreamProps);\n\n const renderVideoStreamElement = useMemo(() => {\n // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which\n // implies that, after their threshold, all streams have no child (blank video)\n if (!renderElement || !renderElement.childElementCount) {\n // Returning `undefined` results in the placeholder with avatar being shown\n return undefined;\n }\n\n return (\n <>\n <FloatingLocalCameraCycleButton\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview ?? false}\n localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}\n localVideoCameraSwitcherLabel={localVideoCameraSwitcherLabel}\n localVideoSelectedDescription={localVideoSelectedDescription}\n />\n <StreamMedia videoStreamElement={renderElement} isMirrored={true} />\n </>\n );\n }, [\n localVideoCameraCycleButtonProps,\n localVideoCameraSwitcherLabel,\n localVideoSelectedDescription,\n renderElement,\n showCameraSwitcherInLocalPreview\n ]);\n\n return (\n <VideoTile\n key={userId ?? 'local-video-tile'}\n userId={userId}\n renderElement={renderVideoStreamElement}\n showLabel={showLabel}\n displayName={displayName}\n initialsName={initialsName}\n styles={styles}\n onRenderPlaceholder={onRenderAvatar}\n isMuted={isMuted}\n showMuteIndicator={showMuteIndicator}\n personaMinSize={props.personaMinSize}\n />\n );\n }\n);\n\nconst FloatingLocalCameraCycleButton = (props: {\n showCameraSwitcherInLocalPreview: boolean;\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n localVideoCameraSwitcherLabel?: string;\n localVideoSelectedDescription?: string;\n}): JSX.Element => {\n const {\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n localVideoCameraSwitcherLabel,\n localVideoSelectedDescription\n } = props;\n const ariaDescription =\n localVideoCameraCycleButtonProps?.selectedCamera &&\n localVideoSelectedDescription &&\n _formatString(localVideoSelectedDescription, {\n cameraName: localVideoCameraCycleButtonProps.selectedCamera.name\n });\n return (\n <Stack horizontalAlign=\"end\">\n {showCameraSwitcherInLocalPreview &&\n localVideoCameraCycleButtonProps?.cameras !== undefined &&\n localVideoCameraCycleButtonProps?.selectedCamera !== undefined &&\n localVideoCameraCycleButtonProps?.onSelectCamera !== undefined && (\n <LocalVideoCameraCycleButton\n cameras={localVideoCameraCycleButtonProps.cameras}\n selectedCamera={localVideoCameraCycleButtonProps.selectedCamera}\n onSelectCamera={localVideoCameraCycleButtonProps.onSelectCamera}\n label={localVideoCameraSwitcherLabel}\n ariaDescription={ariaDescription}\n />\n )}\n </Stack>\n );\n};\n\"../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"LocalVideoTile.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/LocalVideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,mCAAgC;AACxD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,2BAA2B,EAAoC,MAAM,0BAA0B,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,sCAAsC,EAA4C,MAAM,kDAAkD,CAAC;AACpJ,OAAO,EAAE,SAAS,EAAwB,MAAM,aAAa,CAAC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,KAmB1C,EAAE,EAAE;IACH,MAAM,EACJ,WAAW,EACX,OAAO,EACP,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,aAAa,EACb,MAAM,EACN,SAAS,EACT,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,MAAM,EACN,gCAAgC,EAChC,gCAAgC,EAChC,6BAA6B,EAC7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the MIT license.\n\nimport { Stack } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport React, { useMemo } from 'react';\nimport { OnRenderAvatarCallback, VideoStreamOptions, CreateVideoStreamViewResult } from '../types';\nimport { LocalVideoCameraCycleButton, LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\nimport { StreamMedia } from './StreamMedia';\nimport { useLocalVideoStreamLifecycleMaintainer, LocalVideoStreamLifecycleMaintainerProps } from './VideoGallery/useVideoStreamLifecycleMaintainer';\nimport { VideoTile, VideoTileStylesProps } from './VideoTile';\n\n/**\n * A memoized version of VideoTile for rendering local participant.\n *\n * @internal\n */\nexport const _LocalVideoTile = React.memo((props: {\n userId?: string;\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n onDisposeLocalStreamView?: () => void;\n isAvailable?: boolean;\n isMuted?: boolean;\n renderElement?: HTMLElement;\n displayName?: string;\n initialsName?: string;\n localVideoViewOptions?: VideoStreamOptions;\n onRenderAvatar?: OnRenderAvatarCallback;\n showLabel: boolean;\n showMuteIndicator?: boolean;\n showCameraSwitcherInLocalPreview?: boolean;\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n localVideoCameraSwitcherLabel?: string;\n localVideoSelectedDescription?: string;\n styles?: VideoTileStylesProps;\n personaMinSize?: number;\n}) => {\n const {\n isAvailable,\n isMuted,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n localVideoViewOptions,\n renderElement,\n userId,\n showLabel,\n displayName,\n initialsName,\n onRenderAvatar,\n showMuteIndicator,\n styles,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n localVideoCameraSwitcherLabel,\n localVideoSelectedDescription\n } = props;\n const localVideoStreamProps: LocalVideoStreamLifecycleMaintainerProps = useMemo(() => ({\n isMirrored: localVideoViewOptions?.isMirrored,\n isStreamAvailable: isAvailable,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n renderElementExists: !!renderElement,\n scalingMode: localVideoViewOptions?.scalingMode\n }), [isAvailable, localVideoViewOptions?.isMirrored, localVideoViewOptions?.scalingMode, onCreateLocalStreamView, onDisposeLocalStreamView, renderElement]);\n\n // Handle creating, destroying and updating the video stream as necessary\n useLocalVideoStreamLifecycleMaintainer(localVideoStreamProps);\n const renderVideoStreamElement = useMemo(() => {\n // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which\n // implies that, after their threshold, all streams have no child (blank video)\n if (!renderElement || !renderElement.childElementCount) {\n // Returning `undefined` results in the placeholder with avatar being shown\n return undefined;\n }\n return <>\n <FloatingLocalCameraCycleButton showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview ?? false} localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps} localVideoCameraSwitcherLabel={localVideoCameraSwitcherLabel} localVideoSelectedDescription={localVideoSelectedDescription} />\n <StreamMedia videoStreamElement={renderElement} isMirrored={true} />\n </>;\n }, [localVideoCameraCycleButtonProps, localVideoCameraSwitcherLabel, localVideoSelectedDescription, renderElement, showCameraSwitcherInLocalPreview]);\n return <VideoTile key={userId ?? 'local-video-tile'} userId={userId} renderElement={renderVideoStreamElement} showLabel={showLabel} displayName={displayName} initialsName={initialsName} styles={styles} onRenderPlaceholder={onRenderAvatar} isMuted={isMuted} showMuteIndicator={showMuteIndicator} personaMinSize={props.personaMinSize} />;\n});\nconst FloatingLocalCameraCycleButton = (props: {\n showCameraSwitcherInLocalPreview: boolean;\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n localVideoCameraSwitcherLabel?: string;\n localVideoSelectedDescription?: string;\n}): JSX.Element => {\n const {\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n localVideoCameraSwitcherLabel,\n localVideoSelectedDescription\n } = props;\n const ariaDescription = localVideoCameraCycleButtonProps?.selectedCamera && localVideoSelectedDescription && _formatString(localVideoSelectedDescription, {\n cameraName: localVideoCameraCycleButtonProps.selectedCamera.name\n });\n return <Stack horizontalAlign=\"end\">\n {showCameraSwitcherInLocalPreview && localVideoCameraCycleButtonProps?.cameras !== undefined && localVideoCameraCycleButtonProps?.selectedCamera !== undefined && localVideoCameraCycleButtonProps?.onSelectCamera !== undefined && <LocalVideoCameraCycleButton cameras={localVideoCameraCycleButtonProps.cameras} selectedCamera={localVideoCameraCycleButtonProps.selectedCamera} onSelectCamera={localVideoCameraCycleButtonProps.onSelectCamera} label={localVideoCameraSwitcherLabel} ariaDescription={ariaDescription} />}\n </Stack>;\n};\"../../../acs-ui-common/src\""]}