@azure/communication-react 1.4.0 → 1.4.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (833) hide show
  1. package/{CHANGELOG.md → CHANGELOG.beta.md} +47 -283
  2. package/CHANGELOG.json +507 -0
  3. package/CHANGELOG.stable.md +287 -0
  4. package/dist/communication-react.d.ts +1781 -58
  5. package/dist/dist-cjs/communication-react/index.js +17182 -13123
  6. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/MessageStatus.js.map +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/areEqual.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/commonProperties.js.map +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/cssUtils.js.map +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/identifier.js +7 -24
  14. package/dist/dist-esm/acs-ui-common/src/identifier.js.map +1 -1
  15. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  16. package/dist/dist-esm/acs-ui-common/src/localizationUtils.js +2 -1
  17. package/dist/dist-esm/acs-ui-common/src/localizationUtils.js.map +1 -1
  18. package/dist/dist-esm/acs-ui-common/src/logEvent.js +2 -0
  19. package/dist/dist-esm/acs-ui-common/src/logEvent.js.map +1 -1
  20. package/dist/dist-esm/acs-ui-common/src/memoizeFnAll.js.map +1 -1
  21. package/dist/dist-esm/acs-ui-common/src/safeStringify.js +2 -1
  22. package/dist/dist-esm/acs-ui-common/src/safeStringify.js.map +1 -1
  23. package/dist/dist-esm/acs-ui-common/src/telemetry.d.ts +10 -0
  24. package/dist/dist-esm/acs-ui-common/src/telemetry.js +10 -0
  25. package/dist/dist-esm/acs-ui-common/src/telemetry.js.map +1 -1
  26. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  27. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +9 -0
  29. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +10 -0
  30. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +13 -0
  32. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +27 -9
  33. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +22 -46
  35. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  36. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +51 -0
  37. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +270 -0
  38. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -0
  39. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.d.ts +20 -0
  40. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +36 -0
  41. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -0
  42. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.d.ts +7 -43
  43. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +26 -266
  44. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  45. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +43 -0
  46. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +81 -0
  47. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
  48. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.d.ts +1 -1
  49. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js +17 -5
  50. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js.map +1 -1
  51. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +7 -3
  52. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +29 -0
  53. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  54. package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js +6 -3
  55. package/dist/dist-esm/calling-component-bindings/src/hooks/useSelector.js.map +1 -1
  56. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +6 -0
  57. package/dist/dist-esm/calling-component-bindings/src/index.js +8 -0
  58. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  59. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +26 -9
  60. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  61. package/dist/dist-esm/calling-component-bindings/src/participantsButtonSelector.js +2 -0
  62. package/dist/dist-esm/calling-component-bindings/src/participantsButtonSelector.js.map +1 -1
  63. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +12 -2
  64. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +27 -1
  65. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  66. package/dist/dist-esm/calling-component-bindings/src/providers/CallClientProvider.js +8 -3
  67. package/dist/dist-esm/calling-component-bindings/src/providers/CallClientProvider.js.map +1 -1
  68. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +16 -2
  69. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +27 -1
  70. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  71. package/dist/dist-esm/calling-component-bindings/src/providers/index.js.map +1 -1
  72. package/dist/dist-esm/calling-component-bindings/src/utils/SelectorUtils.js +2 -0
  73. package/dist/dist-esm/calling-component-bindings/src/utils/SelectorUtils.js.map +1 -1
  74. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +11 -0
  75. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +19 -3
  76. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  77. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +7 -1
  78. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
  79. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  80. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +13 -4
  81. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  82. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +21 -5
  83. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  84. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +26 -0
  85. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js +4 -0
  86. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -0
  87. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +16 -2
  88. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js +42 -187
  89. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  90. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +53 -0
  91. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +204 -0
  92. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -0
  93. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +21 -1
  94. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js +4 -1
  95. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  96. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +4 -0
  97. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +60 -10
  98. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  99. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js +12 -80
  100. package/dist/dist-esm/calling-stateful-client/src/CallDeclarative.js.map +1 -1
  101. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.d.ts +13 -0
  102. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +88 -0
  103. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -0
  104. package/dist/dist-esm/calling-stateful-client/src/CallIdHistory.js +2 -1
  105. package/dist/dist-esm/calling-stateful-client/src/CallIdHistory.js.map +1 -1
  106. package/dist/dist-esm/calling-stateful-client/src/CallIdRef.js.map +1 -1
  107. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +3 -2
  108. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -8
  109. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  110. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +4 -3
  111. package/dist/dist-esm/calling-stateful-client/src/Converter.js +15 -8
  112. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  113. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +58 -55
  114. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  115. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.d.ts +2 -1
  116. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js +16 -16
  117. package/dist/dist-esm/calling-stateful-client/src/IncomingCallDeclarative.js.map +1 -1
  118. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.d.ts +3 -3
  119. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.js +4 -1
  120. package/dist/dist-esm/calling-stateful-client/src/IncomingCallSubscriber.js.map +1 -1
  121. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +11 -18
  122. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  123. package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
  124. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +1 -0
  125. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +12 -1
  126. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  127. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +4 -1
  128. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  129. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +1 -0
  130. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +14 -2
  131. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  132. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +23 -0
  133. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +52 -36
  134. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  135. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +21 -23
  136. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  137. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
  138. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +89 -0
  139. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
  140. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
  141. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +48 -0
  142. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
  143. package/dist/dist-esm/calling-stateful-client/src/TranscriptionSubscriber.js +4 -1
  144. package/dist/dist-esm/calling-stateful-client/src/TranscriptionSubscriber.js.map +1 -1
  145. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +19 -0
  146. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +35 -0
  147. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -0
  148. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +5 -3
  149. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
  150. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +8 -0
  151. package/dist/dist-esm/calling-stateful-client/src/index-public.js +4 -0
  152. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -0
  153. package/dist/dist-esm/calling-stateful-client/src/index.d.ts +3 -5
  154. package/dist/dist-esm/calling-stateful-client/src/index.js +2 -1
  155. package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
  156. package/dist/dist-esm/chat-component-bindings/src/baseSelectors.js +6 -4
  157. package/dist/dist-esm/chat-component-bindings/src/baseSelectors.js.map +1 -1
  158. package/dist/dist-esm/chat-component-bindings/src/chatParticipantListSelector.js +3 -3
  159. package/dist/dist-esm/chat-component-bindings/src/chatParticipantListSelector.js.map +1 -1
  160. package/dist/dist-esm/chat-component-bindings/src/errorBarSelector.js +21 -18
  161. package/dist/dist-esm/chat-component-bindings/src/errorBarSelector.js.map +1 -1
  162. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +4 -1
  163. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +11 -13
  164. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  165. package/dist/dist-esm/chat-component-bindings/src/hooks/useHandlers.js.map +1 -1
  166. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  167. package/dist/dist-esm/chat-component-bindings/src/hooks/useSelector.js +4 -1
  168. package/dist/dist-esm/chat-component-bindings/src/hooks/useSelector.js.map +1 -1
  169. package/dist/dist-esm/chat-component-bindings/src/index.js.map +1 -1
  170. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +48 -13
  171. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  172. package/dist/dist-esm/chat-component-bindings/src/providers/ChatClientProvider.js.map +1 -1
  173. package/dist/dist-esm/chat-component-bindings/src/providers/ChatThreadClientProvider.js +1 -1
  174. package/dist/dist-esm/chat-component-bindings/src/providers/ChatThreadClientProvider.js.map +1 -1
  175. package/dist/dist-esm/chat-component-bindings/src/sendBoxSelector.js +2 -0
  176. package/dist/dist-esm/chat-component-bindings/src/sendBoxSelector.js.map +1 -1
  177. package/dist/dist-esm/chat-component-bindings/src/typingIndicatorSelector.js +5 -8
  178. package/dist/dist-esm/chat-component-bindings/src/typingIndicatorSelector.js.map +1 -1
  179. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js +7 -2
  180. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js.map +1 -1
  181. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
  182. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  183. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js +4 -1
  184. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  185. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +17 -16
  186. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
  187. package/dist/dist-esm/chat-stateful-client/src/Constants.js.map +1 -1
  188. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +16 -15
  189. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  190. package/dist/dist-esm/chat-stateful-client/src/Logger.js.map +1 -1
  191. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +59 -68
  192. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
  193. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js +115 -121
  194. package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js.map +1 -1
  195. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +2 -0
  196. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  197. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  198. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedIterator.js +2 -0
  199. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedIterator.js.map +1 -1
  200. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListMessages.js +2 -0
  201. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListMessages.js.map +1 -1
  202. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListParticipants.js +2 -0
  203. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListParticipants.js.map +1 -1
  204. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListReadReceipts.js +2 -0
  205. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListReadReceipts.js.map +1 -1
  206. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListThreads.js +2 -0
  207. package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListThreads.js.map +1 -1
  208. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js +2 -0
  209. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  210. package/dist/dist-esm/communication-react/src/index.d.ts +20 -2
  211. package/dist/dist-esm/communication-react/src/index.js +13 -1
  212. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  213. package/dist/dist-esm/communication-react/src/mergedHooks.js.map +1 -1
  214. package/dist/dist-esm/react-components/src/components/Announcer.js.map +1 -1
  215. package/dist/dist-esm/react-components/src/components/CameraButton.js +10 -9
  216. package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
  217. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionMenu.js +7 -8
  218. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionMenu.js.map +1 -1
  219. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +38 -17
  220. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +12 -5
  222. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  223. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +26 -31
  224. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +63 -28
  226. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +9 -12
  228. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  229. package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.js +18 -18
  230. package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.js.map +1 -1
  231. package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.js +19 -10
  232. package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.js.map +1 -1
  233. package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.js +4 -3
  234. package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.js.map +1 -1
  235. package/dist/dist-esm/react-components/src/components/ComplianceBanner/Utils.js.map +1 -1
  236. package/dist/dist-esm/react-components/src/components/ComplianceBanner/index.js.map +1 -1
  237. package/dist/dist-esm/react-components/src/components/ComplianceBanner/types.js.map +1 -1
  238. package/dist/dist-esm/react-components/src/components/ControlBar.js +13 -15
  239. package/dist/dist-esm/react-components/src/components/ControlBar.js.map +1 -1
  240. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +14 -4
  241. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  242. package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.js +6 -15
  243. package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.js.map +1 -1
  244. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +69 -0
  245. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +37 -0
  246. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
  247. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +75 -0
  248. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +58 -0
  249. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
  250. package/dist/dist-esm/react-components/src/components/{DevicePermissionDropdown.d.ts → DevicePermissions/DevicePermissionDropdown.d.ts} +4 -0
  251. package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js +27 -0
  252. package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.js.map +1 -0
  253. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.d.ts +101 -0
  254. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js +80 -0
  255. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissions.js.map +1 -0
  256. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.d.ts +86 -0
  257. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js +31 -0
  258. package/dist/dist-esm/react-components/src/components/DevicePermissions/DomainPermissionsScaffolding.js.map +1 -0
  259. package/dist/dist-esm/react-components/src/components/DevicesButton.js +7 -30
  260. package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
  261. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +48 -48
  262. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  263. package/dist/dist-esm/react-components/src/components/Drawer/DrawerContentContainer.js.map +1 -1
  264. package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.js +2 -6
  265. package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.js.map +1 -1
  266. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +12 -9
  267. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  268. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +11 -23
  269. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
  270. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js +4 -3
  271. package/dist/dist-esm/react-components/src/components/Drawer/DrawerSurface.js.map +1 -1
  272. package/dist/dist-esm/react-components/src/components/Drawer/index.js.map +1 -1
  273. package/dist/dist-esm/react-components/src/components/EndCallButton.js +5 -8
  274. package/dist/dist-esm/react-components/src/components/EndCallButton.js.map +1 -1
  275. package/dist/dist-esm/react-components/src/components/ErrorBar.js +4 -6
  276. package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
  277. package/dist/dist-esm/react-components/src/components/FileCard.js +4 -4
  278. package/dist/dist-esm/react-components/src/components/FileCard.js.map +1 -1
  279. package/dist/dist-esm/react-components/src/components/FileCardGroup.js +1 -1
  280. package/dist/dist-esm/react-components/src/components/FileCardGroup.js.map +1 -1
  281. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +14 -10
  282. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  283. package/dist/dist-esm/react-components/src/components/FileUploadCards.js +10 -8
  284. package/dist/dist-esm/react-components/src/components/FileUploadCards.js.map +1 -1
  285. package/dist/dist-esm/react-components/src/components/GridLayout.js +55 -44
  286. package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
  287. package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.js +4 -3
  288. package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.js.map +1 -1
  289. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +49 -0
  290. package/dist/dist-esm/react-components/src/components/HoldButton.js +25 -0
  291. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -0
  292. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +7 -8
  293. package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
  294. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +6 -12
  295. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  296. package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js +3 -5
  297. package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js.map +1 -1
  298. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +28 -9
  299. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  300. package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.js +27 -36
  301. package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.js.map +1 -1
  302. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +23 -1
  303. package/dist/dist-esm/react-components/src/components/MessageThread.js +188 -120
  304. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  305. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +17 -11
  306. package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
  307. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +137 -137
  308. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  309. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +15 -0
  310. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +19 -16
  311. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  312. package/dist/dist-esm/react-components/src/components/ParticipantList.js +25 -9
  313. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  314. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +44 -31
  315. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  316. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.js +3 -3
  317. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.js.map +1 -1
  318. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPictureTile.js +3 -3
  319. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPictureTile.js.map +1 -1
  320. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +18 -5
  321. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  322. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js +6 -4
  323. package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js.map +1 -1
  324. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +6 -12
  325. package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
  326. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +35 -0
  327. package/dist/dist-esm/react-components/src/components/SendBox.js +37 -10
  328. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  329. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +4 -3
  330. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
  331. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +1 -1
  332. package/dist/dist-esm/react-components/src/components/StreamMedia.js +5 -4
  333. package/dist/dist-esm/react-components/src/components/StreamMedia.js.map +1 -1
  334. package/dist/dist-esm/react-components/src/components/SystemMessage.js +2 -4
  335. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  336. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.d.ts +2 -1
  337. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js +29 -17
  338. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.js.map +1 -1
  339. package/dist/dist-esm/react-components/src/components/TypingIndicator.js +15 -9
  340. package/dist/dist-esm/react-components/src/components/TypingIndicator.js.map +1 -1
  341. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +32 -0
  342. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +33 -0
  343. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -0
  344. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js +7 -7
  345. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js.map +1 -1
  346. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +8 -6
  347. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  348. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.js.map +1 -1
  349. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.js.map +1 -1
  350. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +13 -6
  351. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
  352. package/dist/dist-esm/react-components/src/components/VideoGallery.js +97 -44
  353. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  354. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +11 -0
  355. package/dist/dist-esm/react-components/src/components/VideoTile.js +36 -32
  356. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  357. package/dist/dist-esm/react-components/src/components/VoiceOverButton.js +4 -10
  358. package/dist/dist-esm/react-components/src/components/VoiceOverButton.js.map +1 -1
  359. package/dist/dist-esm/react-components/src/components/index.d.ts +16 -2
  360. package/dist/dist-esm/react-components/src/components/index.js +11 -1
  361. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  362. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +58 -0
  363. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +144 -0
  364. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +1 -0
  365. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +3 -12
  366. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  367. package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.js +2 -0
  368. package/dist/dist-esm/react-components/src/components/styles/ControlBar.styles.js.map +1 -1
  369. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +0 -2
  370. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
  371. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.d.ts +38 -0
  372. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js +92 -0
  373. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +1 -0
  374. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
  375. package/dist/dist-esm/react-components/src/components/styles/GridLayout.styles.js.map +1 -1
  376. package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js +2 -0
  377. package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js.map +1 -1
  378. package/dist/dist-esm/react-components/src/components/styles/IconButton.styles.js.map +1 -1
  379. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +1 -4
  380. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  381. package/dist/dist-esm/react-components/src/components/styles/MessageStatusIndicator.styles.js.map +1 -1
  382. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +10 -11
  383. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  384. package/dist/dist-esm/react-components/src/components/styles/ParticipantItem.styles.js +0 -1
  385. package/dist/dist-esm/react-components/src/components/styles/ParticipantItem.styles.js.map +1 -1
  386. package/dist/dist-esm/react-components/src/components/styles/ParticipantList.styles.js.map +1 -1
  387. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +3 -11
  388. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  389. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js +0 -3
  390. package/dist/dist-esm/react-components/src/components/styles/StreamMedia.styles.js.map +1 -1
  391. package/dist/dist-esm/react-components/src/components/styles/SystemMessage.styles.js.map +1 -1
  392. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.d.ts +1 -5
  393. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js +0 -12
  394. package/dist/dist-esm/react-components/src/components/styles/TroubleshootingGuideErrorBar.styles.js.map +1 -1
  395. package/dist/dist-esm/react-components/src/components/styles/TypingIndicator.styles.js.map +1 -1
  396. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.d.ts +22 -0
  397. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js +53 -0
  398. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js.map +1 -0
  399. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +18 -39
  400. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  401. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +4 -0
  402. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +6 -0
  403. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  404. package/dist/dist-esm/react-components/src/components/styles/VoiceOverButton.style.js.map +1 -1
  405. package/dist/dist-esm/react-components/src/components/utils/Datetime.js +10 -4
  406. package/dist/dist-esm/react-components/src/components/utils/Datetime.js.map +1 -1
  407. package/dist/dist-esm/react-components/src/components/utils/common.js +6 -0
  408. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  409. package/dist/dist-esm/react-components/src/components/utils/delay.js.map +1 -1
  410. package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js +10 -5
  411. package/dist/dist-esm/react-components/src/components/utils/formatPhoneNumber.js.map +1 -1
  412. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +7 -7
  413. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  414. package/dist/dist-esm/react-components/src/components/utils/keyboardNavigation.js.map +1 -1
  415. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
  416. package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
  417. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
  418. package/dist/dist-esm/react-components/src/components/utils/responsive.js +2 -2
  419. package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
  420. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  421. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js +1 -3
  422. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +1 -1
  423. package/dist/dist-esm/react-components/src/components/utils.d.ts +4 -0
  424. package/dist/dist-esm/react-components/src/components/utils.js +21 -11
  425. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  426. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +21 -13
  427. package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
  428. package/dist/dist-esm/react-components/src/gallery/index.js.map +1 -1
  429. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  430. package/dist/dist-esm/react-components/src/identifiers/index.js.map +1 -1
  431. package/dist/dist-esm/react-components/src/index.d.ts +2 -0
  432. package/dist/dist-esm/react-components/src/index.js +2 -0
  433. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  434. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +42 -0
  435. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  436. package/dist/dist-esm/react-components/src/localization/index.js.map +1 -1
  437. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +56 -2
  438. package/dist/dist-esm/react-components/src/localization/locales/index.js +16 -42
  439. package/dist/dist-esm/react-components/src/localization/locales/index.js.map +1 -1
  440. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +61 -0
  441. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +74 -0
  442. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -0
  443. package/dist/dist-esm/react-components/src/permissions/index.d.ts +2 -0
  444. package/dist/dist-esm/react-components/src/permissions/index.js +4 -0
  445. package/dist/dist-esm/react-components/src/permissions/index.js.map +1 -0
  446. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js +7 -8
  447. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js.map +1 -1
  448. package/dist/dist-esm/react-components/src/theming/icons.d.ts +15 -0
  449. package/dist/dist-esm/react-components/src/theming/icons.js +113 -12
  450. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  451. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
  452. package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
  453. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
  454. package/dist/dist-esm/react-components/src/theming/index.js.map +1 -1
  455. package/dist/dist-esm/react-components/src/theming/themeUtils.js +4 -1
  456. package/dist/dist-esm/react-components/src/theming/themeUtils.js.map +1 -1
  457. package/dist/dist-esm/react-components/src/theming/themes.js +2 -0
  458. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  459. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +7 -0
  460. package/dist/dist-esm/react-components/src/types/ChatMessage.js +2 -0
  461. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  462. package/dist/dist-esm/react-components/src/types/CommunicationParticipant.js.map +1 -1
  463. package/dist/dist-esm/react-components/src/types/CustomStylesProps.js +2 -0
  464. package/dist/dist-esm/react-components/src/types/CustomStylesProps.js.map +1 -1
  465. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +3 -0
  466. package/dist/dist-esm/react-components/src/types/OnRender.js +2 -0
  467. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  468. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +3 -0
  469. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js +2 -0
  470. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  471. package/dist/dist-esm/react-components/src/types/ReadReceiptsBySenderId.js.map +1 -1
  472. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +6 -0
  473. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  474. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  475. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +76 -0
  476. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +110 -18
  477. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  478. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +120 -0
  479. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  480. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +52 -6
  481. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +167 -47
  482. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  483. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +51 -1
  484. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +11 -1
  485. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  486. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapterProvider.js.map +1 -1
  487. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/DiagnosticsForwarder.js.map +1 -1
  488. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/ParticipantSubcriber.js.map +1 -1
  489. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -0
  490. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  491. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +3 -0
  492. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +76 -10
  493. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  494. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +2 -0
  495. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +136 -13
  496. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  497. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +24 -0
  498. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +80 -0
  499. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -0
  500. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.d.ts +2 -0
  501. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js +23 -0
  502. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageCameraDropdown.js.map +1 -1
  503. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.d.ts +28 -0
  504. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js +32 -0
  505. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageErrorBar.js.map +1 -0
  506. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.d.ts +2 -0
  507. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js +25 -0
  508. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationpageMicDropdown.js.map +1 -1
  509. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js +5 -4
  510. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js.map +1 -1
  511. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +12 -0
  512. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +93 -0
  513. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -0
  514. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.js +3 -3
  515. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.js.map +1 -1
  516. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +35 -23
  517. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  518. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +2 -0
  519. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +73 -20
  520. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  521. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +16 -21
  522. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  523. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +4 -14
  524. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  525. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MutedNotification.js +2 -2
  526. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MutedNotification.js.map +1 -1
  527. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +4 -3
  528. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  529. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.js +1 -1
  530. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.js.map +1 -1
  531. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +1 -1
  532. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  533. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +17 -0
  534. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +63 -0
  535. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -0
  536. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +41 -4
  537. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  538. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +5 -2
  539. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  540. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +12 -8
  541. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  542. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js +5 -2
  543. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
  544. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +8 -0
  545. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +26 -0
  546. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +1 -0
  547. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +3 -1
  548. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  549. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +7 -9
  550. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  551. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +29 -6
  552. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  553. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.js.map +1 -1
  554. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSelector.js +1 -1
  555. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSelector.js.map +1 -1
  556. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.d.ts +16 -0
  557. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js +38 -0
  558. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js.map +1 -0
  559. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +2 -0
  560. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  561. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +1 -0
  562. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +10 -4
  563. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  564. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +8 -0
  565. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +139 -12
  566. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  567. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +15 -0
  568. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +36 -0
  569. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -0
  570. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +1 -0
  571. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +21 -8
  572. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  573. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js +2 -2
  574. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js.map +1 -1
  575. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +13 -0
  576. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +26 -0
  577. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -0
  578. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +2 -2
  579. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.js +1 -1
  580. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.js.map +1 -1
  581. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
  582. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +7 -0
  583. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  584. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +1 -1
  585. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.js.map +1 -1
  586. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +1 -1
  587. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.js.map +1 -1
  588. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +2 -2
  589. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.js +1 -1
  590. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.js.map +1 -1
  591. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +2 -2
  592. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +13 -6
  593. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  594. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +1 -1
  595. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.js +3 -1
  596. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.js.map +1 -1
  597. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +4 -4
  598. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +2 -0
  599. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
  600. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +2 -2
  601. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js +4 -2
  602. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.js.map +1 -1
  603. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +1 -1
  604. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js +1 -1
  605. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js.map +1 -1
  606. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +2 -2
  607. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js +2 -2
  608. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.js.map +1 -1
  609. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +2 -2
  610. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.js +1 -1
  611. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.js.map +1 -1
  612. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +2 -2
  613. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.js.map +1 -1
  614. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js +1 -1
  615. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js.map +1 -1
  616. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +6 -2
  617. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +11 -10
  618. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  619. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +2 -6
  620. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  621. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js +2 -0
  622. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
  623. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js +4 -2
  624. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.js.map +1 -1
  625. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.js +4 -4
  626. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.js.map +1 -1
  627. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +32 -0
  628. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +81 -0
  629. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -0
  630. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +3 -4
  631. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
  632. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalDeviceSettings.styles.js.map +1 -1
  633. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
  634. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NetworkReconnectTile.styles.js.map +1 -1
  635. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NoticePage.styles.js +2 -0
  636. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/NoticePage.styles.js.map +1 -1
  637. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/StartCallButton.styles.js +0 -1
  638. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/StartCallButton.styles.js.map +1 -1
  639. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +23 -3
  640. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js +2 -0
  641. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  642. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +9 -1
  643. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +77 -17
  644. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  645. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/index.js.map +1 -1
  646. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +78 -4
  647. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +77 -18
  648. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  649. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +1 -0
  650. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +43 -16
  651. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -1
  652. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts +2 -0
  653. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +36 -14
  654. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  655. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton.js +1 -1
  656. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton.js.map +1 -1
  657. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.js +11 -7
  658. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.js.map +1 -1
  659. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ConvertContextualMenuItemToDrawerMenuItem.js +2 -0
  660. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ConvertContextualMenuItemToDrawerMenuItem.js.map +1 -1
  661. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +67 -0
  662. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +75 -0
  663. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -0
  664. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/NotificationIcon.js +3 -6
  665. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/NotificationIcon.js.map +1 -1
  666. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js +1 -1
  667. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +1 -1
  668. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.d.ts +1 -0
  669. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +1 -1
  670. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +32 -0
  671. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  672. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +22 -4
  673. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +140 -11
  674. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  675. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +56 -0
  676. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  677. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +9 -2
  678. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +36 -1
  679. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  680. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +9 -0
  681. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +34 -1
  682. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  683. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js +4 -2
  684. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js.map +1 -1
  685. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.d.ts +13 -0
  686. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +65 -0
  687. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -0
  688. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +67 -21
  689. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
  690. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/hooks/useCallWithChatCompositeStrings.js +2 -1
  691. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/hooks/useCallWithChatCompositeStrings.js.map +1 -1
  692. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -0
  693. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  694. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/selectors/moreDrawerSelector.js +3 -1
  695. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/selectors/moreDrawerSelector.js.map +1 -1
  696. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +11 -0
  697. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +10 -2
  698. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  699. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -2
  700. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +2 -13
  701. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  702. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +20 -0
  703. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +8 -2
  704. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  705. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.js +3 -5
  706. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.js.map +1 -1
  707. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +41 -9
  708. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  709. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +18 -0
  710. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +18 -0
  711. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +1 -0
  712. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +15 -0
  713. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +21 -0
  714. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +1 -0
  715. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +4 -0
  716. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  717. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +9 -0
  718. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +111 -36
  719. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  720. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +28 -0
  721. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +156 -1
  722. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  723. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +13 -2
  724. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js +2 -0
  725. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  726. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +7 -0
  727. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  728. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +1 -1
  729. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +18 -6
  730. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  731. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.js +2 -0
  732. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.js.map +1 -1
  733. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
  734. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useAdaptedSelector.js +6 -6
  735. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useAdaptedSelector.js.map +1 -1
  736. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +5 -1
  737. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  738. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/usePropsFor.js.map +1 -1
  739. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +6 -0
  740. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
  741. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
  742. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +3 -0
  743. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  744. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +12 -0
  745. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +13 -0
  746. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
  747. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +23 -0
  748. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +12 -0
  749. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +1 -0
  750. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +2 -6
  751. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
  752. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +5 -1
  753. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +17 -6
  754. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  755. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +22 -0
  756. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +105 -0
  757. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -0
  758. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +17 -0
  759. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +32 -0
  760. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +1 -0
  761. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +10 -4
  762. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  763. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js +15 -14
  764. package/dist/dist-esm/react-composites/src/composites/common/BaseComposite.js.map +1 -1
  765. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +22 -0
  766. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +60 -0
  767. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -0
  768. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +15 -0
  769. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +61 -0
  770. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -0
  771. package/dist/dist-esm/react-composites/src/composites/common/ContainerRectProps.js +3 -5
  772. package/dist/dist-esm/react-composites/src/composites/common/ContainerRectProps.js.map +1 -1
  773. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +22 -6
  774. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  775. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
  776. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
  777. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +7 -9
  778. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  779. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +7 -1
  780. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +26 -7
  781. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  782. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +17 -0
  783. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +42 -0
  784. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -0
  785. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +11 -0
  786. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +40 -0
  787. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -0
  788. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +2 -1
  789. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +6 -18
  790. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  791. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +2 -1
  792. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +10 -8
  793. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  794. package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
  795. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +28 -1
  796. package/dist/dist-esm/react-composites/src/composites/common/icons.js +23 -8
  797. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  798. package/dist/dist-esm/react-composites/src/composites/common/styles/GlobalHostLayer.styles.js +2 -0
  799. package/dist/dist-esm/react-composites/src/composites/common/styles/GlobalHostLayer.styles.js.map +1 -1
  800. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +5 -16
  801. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -1
  802. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js +12 -51
  803. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -1
  804. package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js +5 -22
  805. package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js.map +1 -1
  806. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.js +6 -22
  807. package/dist/dist-esm/react-composites/src/composites/common/styles/PeoplePaneContent.styles.js.map +1 -1
  808. package/dist/dist-esm/react-composites/src/composites/common/utils.js +17 -12
  809. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  810. package/dist/dist-esm/react-composites/src/composites/index.js +2 -0
  811. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  812. package/dist/dist-esm/react-composites/src/composites/localization/LocalizationProvider.js +2 -2
  813. package/dist/dist-esm/react-composites/src/composites/localization/LocalizationProvider.js.map +1 -1
  814. package/dist/dist-esm/react-composites/src/composites/localization/index.js.map +1 -1
  815. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +2 -2
  816. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +2 -2
  817. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +2 -2
  818. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +2 -2
  819. package/dist/dist-esm/react-composites/src/composites/localization/locales/index.js +2 -0
  820. package/dist/dist-esm/react-composites/src/composites/localization/locales/index.js.map +1 -1
  821. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +2 -2
  822. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +2 -2
  823. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +2 -2
  824. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +2 -2
  825. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +2 -2
  826. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +2 -2
  827. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +2 -2
  828. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +2 -2
  829. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +2 -2
  830. package/dist/dist-esm/react-composites/src/index-public.js.map +1 -1
  831. package/package.json +12 -12
  832. package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js +0 -29
  833. package/dist/dist-esm/react-components/src/components/DevicePermissionDropdown.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FileDownloadCards.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/FileDownloadCards.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AA4GjE,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,SAAS;CACrB,CAAC;AACF,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,MAAM;CACf,CAAC;AACF;;GAEG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAe,EAAE;;IAC3E,MAAM,EACJ,MAAM,EACN,YAAY,EACb,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,aAAa,GAAG,0BAA0B,EAAE,CAAC;IACnD,MAAM,wBAAwB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE;;QAClD,OAAO,MAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,YAAY,mCAAI,aAAa,CAAC,YAAY,CAAC,CAAC,4CAA4C;QAE9G,OAAO,MAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,YAAY,mCAAI,EAAE,CAAC;IAC3C,CAAC,EAAE,CAAC,MAAA,KAAK,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OAAO,IAAC,IAAI,EAAE,WAAW,CAAC,MAAM,eAAa,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAI,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,EAAE,wBAAwB,EAAE;gBACrS,oBAAC,sBAAsB,OAAG,CACf,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,GAAI,CAAC,CACrE,CACb,CAAC;AACX,CAAC,CAAC;AACF;;GAEG;AAEH,MAAM,sBAAsB,GAAG,GAAgB,EAAE;IAC/C,+DAA+D;IAC/D,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAC,eAAe,EAAC,KAAK,EAAE,eAAe,GAAI,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,GAA8B,EAAE;IACjE,OAAO;QACL,YAAY,EAAE,EAAE;KACjB,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"FileDownloadCards.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/FileDownloadCards.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,+CAA+C;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAuGjE,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,SAAS;CACrB,CA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AAE,eAAe,GAAI,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,GAA8B,EAAE;IACjE,+CAA+C;IAC/C,OAAO,SAAS,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC;IACzC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;AAC9B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Icon, IconButton, Spinner, SpinnerSize } from '@fluentui/react';\nimport React, { useCallback, useState } from 'react';\nimport { useMemo } from 'react';\n/* @conditional-compile-remove(file-sharing) */\nimport { useLocale } from '../localization';\nimport { _FileCard } from './FileCard';\nimport { _FileCardGroup } from './FileCardGroup';\nimport { iconButtonClassName } from './styles/IconButton.styles';\n\n/**\n * Meta Data containing information about the uploaded file.\n * @beta\n */\nexport interface FileMetadata {\n /**\n * File name to be displayed.\n */\n name: string;\n /**\n * Extension is used for rendering the file icon.\n * An unknown extension will be rendered as a generic icon.\n * Example: `jpeg`\n */\n extension: string;\n /**\n * Download URL for the file.\n */\n url: string;\n}\n\n/**\n * Strings of _FileDownloadCards that can be overridden.\n *\n * @internal\n */\nexport interface _FileDownloadCardsStrings {\n /** Aria label to notify user when focus is on file download button. */\n downloadFile: string;\n}\n\n/**\n * @beta\n * A file download error returned via a {@link FileDownloadHandler}.\n * This error message is used to render an error message in the UI.\n */\nexport interface FileDownloadError {\n /** The error message to display in the UI */\n errorMessage: string;\n}\n\n/**\n * @beta\n *\n * A callback function for handling file downloads.\n * The function needs to return a promise that resolves to a file download URL.\n * If the promise is rejected, the {@link Error.message} will be used to display an error message to the user.\n *\n * @example\n * ```ts\n * const fileDownloadHandler: FileDownloadHandler = async (userId, fileData) => {\n * if (isUnauthorizedUser(userId)) {\n * return { errorMessage: 'You don’t have permission to download this file.' };\n * } else {\n * return new URL(fileData.url);\n * }\n * }\n *\n * const App = () => (\n * <ChatComposite\n * ...\n * fileSharing={{\n * fileDownloadHandler: fileDownloadHandler\n * }}\n * />\n * )\n *\n * ```\n * @param userId - The user ID of the user downloading the file.\n * @param fileMetadata - The {@link FileMetadata} containing file `url`, `extension` and `name`.\n */\nexport type FileDownloadHandler = (userId: string, fileMetadata: FileMetadata) => Promise<URL | FileDownloadError>;\n\n/**\n * @internal\n */\nexport interface _FileDownloadCards {\n /**\n * User id of the local participant\n */\n userId: string;\n /**\n * A chat message metadata that inculdes file metadata\n */\n fileMetadata: FileMetadata[];\n /**\n * A function of type {@link FileDownloadHandler} for handling file downloads.\n * If the function is not specified, the file's `url` will be opened in a new tab to\n * initiate the download.\n */\n downloadHandler?: FileDownloadHandler;\n /**\n * Optional callback that runs if downloadHandler returns {@link FileDownloadError}.\n */\n onDownloadErrorMessage?: (errMsg: string) => void;\n /**\n * Optional arialabel strings for file download cards\n */\n strings?: _FileDownloadCardsStrings;\n}\n\nconst fileDownloadCardsStyle = {\n marginTop: '0.25rem'\n};\n\nconst actionIconStyle = { height: '1rem' };\n\n/**\n * @internal\n */\nexport const _FileDownloadCards = (props: _FileDownloadCards): JSX.Element => {\n const { userId, fileMetadata } = props;\n const [showSpinner, setShowSpinner] = useState(false);\n const localeStrings = useLocaleStringsTrampoline();\n\n const downloadFileButtonString = useMemo(\n () => () => {\n return props.strings?.downloadFile ?? localeStrings.downloadFile;\n // Return download button without aria label\n return props.strings?.downloadFile ?? '';\n },\n [props.strings?.downloadFile, localeStrings.downloadFile]\n );\n\n const fileDownloadHandler = useCallback(\n async (userId, file) => {\n if (!props.downloadHandler) {\n window.open(file.url, '_blank', 'noopener,noreferrer');\n } else {\n setShowSpinner(true);\n try {\n const response = await props.downloadHandler(userId, file);\n setShowSpinner(false);\n if (response instanceof URL) {\n window.open(response.toString(), '_blank', 'noopener,noreferrer');\n } else {\n props.onDownloadErrorMessage && props.onDownloadErrorMessage(response.errorMessage);\n }\n } finally {\n setShowSpinner(false);\n }\n }\n },\n [props]\n );\n\n if (!fileMetadata || fileMetadata.length === 0) {\n return <></>;\n }\n\n return (\n <div style={fileDownloadCardsStyle} data-ui-id=\"file-download-card-group\">\n <_FileCardGroup>\n {fileMetadata &&\n fileMetadata.map((file) => (\n <_FileCard\n fileName={file.name}\n key={file.name}\n fileExtension={file.extension}\n actionIcon={\n showSpinner ? (\n <Spinner size={SpinnerSize.medium} aria-live={'polite'} role={'status'} />\n ) : (\n <IconButton className={iconButtonClassName} ariaLabel={downloadFileButtonString()}>\n <DownloadIconTrampoline />\n </IconButton>\n )\n }\n actionHandler={() => fileDownloadHandler(userId, file)}\n />\n ))}\n </_FileCardGroup>\n </div>\n );\n};\n\n/**\n * @private\n */\nconst DownloadIconTrampoline = (): JSX.Element => {\n // @conditional-compile-remove(file-sharing)\n return <Icon data-ui-id=\"file-download-card-download-icon\" iconName=\"DownloadFile\" style={actionIconStyle} />;\n // Return _some_ available icon, as the real icon is beta-only.\n return <Icon iconName=\"EditBoxCancel\" style={actionIconStyle} />;\n};\n\nconst useLocaleStringsTrampoline = (): _FileDownloadCardsStrings => {\n /* @conditional-compile-remove(file-sharing) */\n return useLocale().strings.messageThread;\n return { downloadFile: '' };\n};\n"]}
@@ -8,9 +8,7 @@ import { extension } from './utils';
8
8
  import { iconButtonClassName } from './styles/IconButton.styles';
9
9
  import { useMemo } from 'react';
10
10
  import { useLocaleFileCardStringsTrampoline } from './utils/common';
11
- const actionIconStyle = {
12
- height: '1rem'
13
- };
11
+ const actionIconStyle = { height: '1rem' };
14
12
  /**
15
13
  * @internal
16
14
  */
@@ -20,15 +18,19 @@ export const _FileUploadCards = (props) => {
20
18
  const localeStrings = useLocaleFileCardStringsTrampoline();
21
19
  const removeFileButtonString = useMemo(() => () => {
22
20
  var _a, _b, _c, _d;
23
- return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.removeFile) !== null && _b !== void 0 ? _b : localeStrings.removeFile; // Return download button without aria label
21
+ return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.removeFile) !== null && _b !== void 0 ? _b : localeStrings.removeFile;
22
+ // Return download button without aria label
24
23
  return (_d = (_c = props.strings) === null || _c === void 0 ? void 0 : _c.removeFile) !== null && _d !== void 0 ? _d : '';
25
24
  }, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.removeFile, localeStrings.removeFile]);
26
25
  if (!files || files.length === 0) {
27
26
  return React.createElement(React.Fragment, null);
28
27
  }
29
- return React.createElement(_FileCardGroup, null, files && files.filter(file => !file.error).map(file => React.createElement(_FileCard, { fileName: file.filename, progress: file.progress, key: file.id, fileExtension: extension(file.filename), actionIcon: React.createElement(IconButton, { className: iconButtonClassName, ariaLabel: removeFileButtonString() },
30
- React.createElement(Icon, { iconName: "CancelFileUpload", style: actionIconStyle })), actionHandler: () => {
31
- props.onCancelFileUpload && props.onCancelFileUpload(file.id);
32
- }, strings: props.strings })));
28
+ return (React.createElement(_FileCardGroup, null, files &&
29
+ files
30
+ .filter((file) => !file.error)
31
+ .map((file) => (React.createElement(_FileCard, { fileName: file.filename, progress: file.progress, key: file.id, fileExtension: extension(file.filename), actionIcon: React.createElement(IconButton, { className: iconButtonClassName, ariaLabel: removeFileButtonString() },
32
+ React.createElement(Icon, { iconName: "CancelFileUpload", style: actionIconStyle })), actionHandler: () => {
33
+ props.onCancelFileUpload && props.onCancelFileUpload(file.id);
34
+ }, strings: props.strings })))));
33
35
  };
34
36
  //# sourceMappingURL=FileUploadCards.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploadCards.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/FileUploadCards.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC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mBAAmB,EAAE,SAAS,EAAE,sBAAsB,EAAE;YAC3P,oBAAC,IAAI,IAAC,QAAQ,EAAC,kBAAkB,EAAC,KAAK,EAAE,eAAe,GAAI,CACjD,EAAE,aAAa,EAAE,GAAG,EAAE;YAC7C,KAAK,CAAC,kBAAkB,IAAI,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChE,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,GAAI,CAAC,CACb,CAAC;AACtB,CAAC,CAAC"}
1
+ {"version":3,"file":"FileUploadCards.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/FileUploadCards.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,kCAAkC,EAAE,MAAM,gBAAgB,CAAC;AAoCpE,MAAM,eAAe,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA2B,EAAe,EAAE;;IAC3E,MAAM,KAAK,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAEtC,MAAM,aAAa,GAAG,kCAAkC,EAAE,CAAC;IAE3D,MAAM,sBAAsB,GAAG,OAAO,CACpC,GAAG,EAAE,CAAC,GAAG,EAAE;;QACT,OAAO,MAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,UAAU,mCAAI,aAAa,CAAC,UAAU,CAAC;QAC7D,4CAA4C;QAC5C,OAAO,MAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,UAAU,mCAAI,EAAE,CAAC;IACzC,CAAC,EACD,CAAC,MAAA,KAAK,CAAC,OAAO,0CAAE,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,CACtD,CAAC;IAEF,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,OAAO,yCAAK,CAAC;KACd;IAED,OAAO,CACL,oBAAC,cAAc,QACZ,KAAK;QACJ,KAAK;aACF,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;aAC7B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACb,oBAAC,SAAS,IACR,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EACvC,UAAU,EACR,oBAAC,UAAU,IAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,EAAE,sBAAsB,EAAE;gBAC7E,oBAAC,IAAI,IAAC,QAAQ,EAAC,kBAAkB,EAAC,KAAK,EAAE,eAAe,GAAI,CACjD,EAEf,aAAa,EAAE,GAAG,EAAE;gBAClB,KAAK,CAAC,kBAAkB,IAAI,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAChE,CAAC,EACD,OAAO,EAAE,KAAK,CAAC,OAAO,GACtB,CACH,CAAC,CACS,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Icon, IconButton } from '@fluentui/react';\nimport React from 'react';\nimport { ActiveFileUpload } from './SendBox';\nimport { _FileCard } from './FileCard';\nimport { _FileCardGroup } from './FileCardGroup';\nimport { extension } from './utils';\nimport { iconButtonClassName } from './styles/IconButton.styles';\nimport { useMemo } from 'react';\nimport { useLocaleFileCardStringsTrampoline } from './utils/common';\n\n/**\n * Strings of _FileUploadCards that can be overridden.\n *\n * @internal\n */\nexport interface _FileUploadCardsStrings {\n /** Aria label to notify user when focus is on cancel file upload button. */\n removeFile: string;\n /** Aria label to notify user file uploading starts. */\n uploading: string;\n /** Aria label to notify user file is uploaded. */\n uploadCompleted: string;\n}\n\n/**\n * @internal\n */\nexport interface FileUploadCardsProps {\n /**\n * Optional array of active file uploads where each object has attibutes\n * of a file upload like name, progress, errormessage etc.\n */\n activeFileUploads?: ActiveFileUpload[];\n /**\n * Optional callback to remove the file upload before sending by clicking on\n * cancel icon.\n */\n onCancelFileUpload?: (fileId: string) => void;\n /**\n * Optional arialabel strings for file upload cards\n */\n strings?: _FileUploadCardsStrings;\n}\n\nconst actionIconStyle = { height: '1rem' };\n\n/**\n * @internal\n */\nexport const _FileUploadCards = (props: FileUploadCardsProps): JSX.Element => {\n const files = props.activeFileUploads;\n\n const localeStrings = useLocaleFileCardStringsTrampoline();\n\n const removeFileButtonString = useMemo(\n () => () => {\n return props.strings?.removeFile ?? localeStrings.removeFile;\n // Return download button without aria label\n return props.strings?.removeFile ?? '';\n },\n [props.strings?.removeFile, localeStrings.removeFile]\n );\n\n if (!files || files.length === 0) {\n return <></>;\n }\n\n return (\n <_FileCardGroup>\n {files &&\n files\n .filter((file) => !file.error)\n .map((file) => (\n <_FileCard\n fileName={file.filename}\n progress={file.progress}\n key={file.id}\n fileExtension={extension(file.filename)}\n actionIcon={\n <IconButton className={iconButtonClassName} ariaLabel={removeFileButtonString()}>\n <Icon iconName=\"CancelFileUpload\" style={actionIconStyle} />\n </IconButton>\n }\n actionHandler={() => {\n props.onCancelFileUpload && props.onCancelFileUpload(file.id);\n }}\n strings={props.strings}\n />\n ))}\n </_FileCardGroup>\n );\n};\n"]}
@@ -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,12 +52,9 @@ const isCloserThan = (a, b, target) => {
52
52
  */
53
53
  export const calculateGridProps = (numberOfItems, width, height) => {
54
54
  if (numberOfItems <= 0) {
55
- return {
56
- fillDirection: 'horizontal',
57
- rows: 0,
58
- columns: 0
59
- };
60
- } // If width or height are 0 then we return rows and column evenly
55
+ return { fillDirection: 'horizontal', rows: 0, columns: 0 };
56
+ }
57
+ // If width or height are 0 then we return rows and column evenly
61
58
  if (width <= 0 || height <= 0) {
62
59
  return {
63
60
  fillDirection: 'horizontal',
@@ -65,14 +62,18 @@ export const calculateGridProps = (numberOfItems, width, height) => {
65
62
  columns: Math.ceil(Math.sqrt(numberOfItems))
66
63
  };
67
64
  }
68
- const aspectRatio = width / height; // Approximate how many rows to divide the grid to achieve cells close to the TARGET_CELL_ASPECT_RATIO
69
- let rows = Math.floor(Math.sqrt(TARGET_CELL_ASPECT_RATIO / aspectRatio * numberOfItems)) || 1; // Make sure rows do not exceed numberOfItems
70
- rows = Math.min(rows, numberOfItems); // Given the rows, get the minimum columns needed to create enough cells for the number of items
71
- let columns = Math.ceil(numberOfItems / rows); // Default fill direction to horizontal
65
+ const aspectRatio = width / height;
66
+ // 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;
68
+ // Make sure rows do not exceed numberOfItems
69
+ rows = Math.min(rows, numberOfItems);
70
+ // Given the rows, get the minimum columns needed to create enough cells for the number of items
71
+ let columns = Math.ceil(numberOfItems / rows);
72
+ // Default fill direction to horizontal
72
73
  let fillDirection = 'horizontal';
73
74
  while (rows < numberOfItems) {
74
75
  // If cell aspect ratio is less than MINIMUM_CELL_ASPECT_RATIO_ALLOWED then try more rows
75
- if (rows / columns * aspectRatio < MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {
76
+ if ((rows / columns) * aspectRatio < MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {
76
77
  rows += 1;
77
78
  columns = Math.ceil(numberOfItems / rows);
78
79
  continue;
@@ -100,7 +101,8 @@ export const calculateGridProps = (numberOfItems, width, height) => {
100
101
  else if (!canStretchHorizontally) {
101
102
  fillDirection = 'vertical';
102
103
  break;
103
- } // We need to figure out whether the big cells should stretch horizontally or vertically
104
+ }
105
+ // We need to figure out whether the big cells should stretch horizontally or vertically
104
106
  // to fill in the empty spaces
105
107
  // e.g. For 2 rows, 3 columns, but only 5 items, we need to choose whether to stretch cells
106
108
  // horizontally or vertically
@@ -110,8 +112,10 @@ export const calculateGridProps = (numberOfItems, width, height) => {
110
112
  // | | | | | | |
111
113
  // |___________|__________| |_______|_______|_______|
112
114
  // Calculate the aspect ratio of big cells stretched horizontally
113
- const horizontallyStretchedCellRatio = rows / (columns - 1) * aspectRatio; // Calculate the aspect ratio of big cells stretched vertically
114
- const verticallyStretchedCellRatio = (rows - 1) / columns * aspectRatio; // We know the horizontally stretched cells aspect ratio is higher than MINIMUM_CELL_ASPECT_RATIO_ALLOWED. If vertically stretched cells
115
+ const horizontallyStretchedCellRatio = (rows / (columns - 1)) * aspectRatio;
116
+ // Calculate the aspect ratio of big cells stretched vertically
117
+ const verticallyStretchedCellRatio = ((rows - 1) / columns) * aspectRatio;
118
+ // We know the horizontally stretched cells aspect ratio is higher than MINIMUM_CELL_ASPECT_RATIO_ALLOWED. If vertically stretched cells
115
119
  // is also higher than the MINIMUM_CELL_ASPECT_RATIO_ALLOWED, then choose which aspect ratio is better.
116
120
  if (verticallyStretchedCellRatio >= MINIMUM_CELL_ASPECT_RATIO_ALLOWED) {
117
121
  // If vertically stetched cell has an aspect ratio closer to TARGET_CELL_ASPECT_RATIO then change the fill direction to vertical
@@ -122,11 +126,7 @@ export const calculateGridProps = (numberOfItems, width, height) => {
122
126
  }
123
127
  break;
124
128
  }
125
- return {
126
- fillDirection,
127
- rows,
128
- columns
129
- };
129
+ return { fillDirection, rows, columns };
130
130
  };
131
131
  /**
132
132
  * Creates a styles classname with CSS Grid related styles given GridProps and the number of items to distribute as evenly as possible.
@@ -135,39 +135,50 @@ export const calculateGridProps = (numberOfItems, width, height) => {
135
135
  * @returns - classname
136
136
  */
137
137
  export const createGridStyles = (numberOfItems, gridProps) => {
138
- const isHorizontal = gridProps.fillDirection === 'horizontal'; // Blocks are either rows or columns depending on whether we fill horizontally or vertically. Each block may differ in the number of cells.
138
+ const isHorizontal = gridProps.fillDirection === 'horizontal';
139
+ // Blocks are either rows or columns depending on whether we fill horizontally or vertically. Each block may differ in the number of cells.
139
140
  const blocks = isHorizontal ? gridProps.rows : gridProps.columns;
140
141
  const smallCellsPerBlock = Math.ceil(numberOfItems / blocks);
141
142
  const bigCellsPerBlock = Math.floor(numberOfItems / blocks);
142
- const numBigCells = (gridProps.rows * gridProps.columns - numberOfItems) * bigCellsPerBlock; // Get grid units
143
+ const numBigCells = (gridProps.rows * gridProps.columns - numberOfItems) * bigCellsPerBlock;
144
+ // Get grid units
143
145
  // e.g. If some blocks have 2 big cells while others have 3 small cells, we need to work with 6 units per block
144
146
  const units = smallCellsPerBlock * bigCellsPerBlock;
145
- const gridStyles = isHorizontal ? {
146
- gridTemplateColumns: `repeat(${units}, minmax(0, 1fr))`,
147
- gridTemplateRows: `repeat(${blocks}, minmax(0, 1fr))`,
148
- gridAutoFlow: 'row'
149
- } : {
150
- gridTemplateColumns: `repeat(${blocks}, minmax(0, 1fr))`,
151
- gridTemplateRows: `repeat(${units}, minmax(0, 1fr))`,
152
- gridAutoFlow: 'column'
153
- };
154
- const smallCellStyle = isHorizontal ? {
155
- '> *': {
156
- gridColumn: `auto / span ${units / smallCellsPerBlock}`
147
+ const gridStyles = isHorizontal
148
+ ? {
149
+ gridTemplateColumns: `repeat(${units}, minmax(0, 1fr))`,
150
+ gridTemplateRows: `repeat(${blocks}, minmax(0, 1fr))`,
151
+ gridAutoFlow: 'row'
157
152
  }
158
- } : {
159
- '> *': {
160
- gridRow: `auto / span ${units / smallCellsPerBlock}`
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
+ }
161
163
  }
162
- }; // If there are big cells, we are choosing to place the latest children into the big cells.
164
+ : {
165
+ '> *': {
166
+ gridRow: `auto / span ${units / smallCellsPerBlock}`
167
+ }
168
+ };
169
+ // If there are big cells, we are choosing to place the latest children into the big cells.
163
170
  // That is why we use the '> *:nth-last-child(-n + ${numBigCells})' CSS selector below
164
- const bigCellStyle = numBigCells ? {
165
- [`> *:nth-last-child(-n + ${numBigCells})`]: isHorizontal ? {
166
- gridColumn: `auto / span ${units / bigCellsPerBlock}`
167
- } : {
168
- gridRow: `auto / span ${units / bigCellsPerBlock}`
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
+ }
169
180
  }
170
- } : {};
181
+ : {};
171
182
  return mergeStyles(gridStyles, smallCellStyle, bigCellStyle);
172
183
  };
173
184
  //# sourceMappingURL=GridLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridLayout.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/GridLayout.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,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;AAEH,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;QAED,MAAM,eAAe,GAAG,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K,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"]}
@@ -10,15 +10,16 @@ import { useTheme } from '../theming';
10
10
  */
11
11
  export const _HighContrastAwareIcon = (props) => {
12
12
  const { iconName, disabled } = props;
13
- const theme = useTheme(); // setting colors for the icons using color from theme, so in dark mode or other accessibility modes, they have pre-defined contrast colors
13
+ const theme = useTheme();
14
+ // setting colors for the icons using color from theme, so in dark mode or other accessibility modes, they have pre-defined contrast colors
14
15
  // the media query is for when in specific window accessibility mode, change the svg colors
15
- return React.createElement(Icon, { iconName: iconName, className: mergeStyles({
16
+ return (React.createElement(Icon, { iconName: iconName, className: mergeStyles({
16
17
  svg: {
17
18
  fill: disabled ? theme.palette.neutralTertiary : theme.palette.neutralPrimaryAlt,
18
19
  '@media (forced-colors: active) and (prefers-color-scheme: dark)': {
19
20
  fill: disabled ? theme.palette.neutralPrimaryAlt : theme.palette.neutralTertiary
20
21
  }
21
22
  }
22
- }) });
23
+ }) }));
23
24
  };
24
25
  //# sourceMappingURL=HighContrastAwareIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HighContrastAwareIcon.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/HighContrastAwareIcon.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,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;AAEH,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,CAAC,2IAA2I;IACrK,2FAA2F;IAE3F,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"}
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"]}
@@ -0,0 +1,49 @@
1
+ /// <reference types="react" />
2
+ import { ControlBarButtonProps } from './ControlBarButton';
3
+ /**
4
+ *@beta
5
+ */
6
+ export interface HoldButtonProps extends ControlBarButtonProps {
7
+ /**
8
+ * Utility property for using this component with communication react handlers
9
+ * Holds the call or resumes it based on call state.
10
+ */
11
+ onToggleHold: () => Promise<void>;
12
+ /**
13
+ * Optional strings to override in component
14
+ */
15
+ strings?: HoldButtonStrings;
16
+ }
17
+ /**
18
+ * Strings for the hold button labels
19
+ * @beta
20
+ */
21
+ export interface HoldButtonStrings {
22
+ /**
23
+ * Label for when action is to resume call.
24
+ */
25
+ onLabel: string;
26
+ /**
27
+ * Label for when action is to hold call.
28
+ */
29
+ offLabel: string;
30
+ /**
31
+ * Content for when button is checked
32
+ */
33
+ tooltipOnContent: string;
34
+ /**
35
+ * Content for when button is unchecked
36
+ */
37
+ tooltipOffContent: string;
38
+ }
39
+ /**
40
+ * a button to hold or resume a ongoing call.
41
+ *
42
+ * Can be used with {@link ControlBar}
43
+ *
44
+ * @param props - properties for the hold button.
45
+ * @returns
46
+ * @beta
47
+ */
48
+ export declare const HoldButton: (props: HoldButtonProps) => JSX.Element;
49
+ //# sourceMappingURL=HoldButton.d.ts.map
@@ -0,0 +1,25 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { ControlBarButton } from './ControlBarButton';
4
+ import React from 'react';
5
+ import { _HighContrastAwareIcon } from './HighContrastAwareIcon';
6
+ /**
7
+ * a button to hold or resume a ongoing call.
8
+ *
9
+ * Can be used with {@link ControlBar}
10
+ *
11
+ * @param props - properties for the hold button.
12
+ * @returns
13
+ * @beta
14
+ */
15
+ export const HoldButton = (props) => {
16
+ const { onToggleHold, strings } = props;
17
+ const onRenderHoldIcon = () => {
18
+ return React.createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "HoldCallButton" });
19
+ };
20
+ const onRenderResumeIcon = () => {
21
+ return React.createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "ResumeCall" });
22
+ };
23
+ return (React.createElement(ControlBarButton, Object.assign({}, props, { strings: strings, onClick: onToggleHold !== null && onToggleHold !== void 0 ? onToggleHold : props.onClick, onRenderOnIcon: onRenderResumeIcon, onRenderOffIcon: onRenderHoldIcon })));
24
+ };
25
+ //# sourceMappingURL=HoldButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoldButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/HoldButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAwCjE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAe,EAAE;IAChE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,gBAAgB,GAAG,GAAgB,EAAE;QACzC,OAAO,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,gBAAgB,GAAG,CAAC;IACxF,CAAC,CAAC;IACF,MAAM,kBAAkB,GAAG,GAAgB,EAAE;QAC3C,OAAO,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,YAAY,GAAG,CAAC;IACpF,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,gBAAgB,oBACX,KAAK,IACT,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,KAAK,CAAC,OAAO,EACtC,cAAc,EAAE,kBAAkB,EAClC,eAAe,EAAE,gBAAgB,IACjC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport React from 'react';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\n\n/**\n *@beta\n */\nexport interface HoldButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with communication react handlers\n * Holds the call or resumes it based on call state.\n */\n onToggleHold: () => Promise<void>;\n /**\n * Optional strings to override in component\n */\n strings?: HoldButtonStrings;\n}\n\n/**\n * Strings for the hold button labels\n * @beta\n */\nexport interface HoldButtonStrings {\n /**\n * Label for when action is to resume call.\n */\n onLabel: string;\n /**\n * Label for when action is to hold call.\n */\n offLabel: string;\n /**\n * Content for when button is checked\n */\n tooltipOnContent: string;\n /**\n * Content for when button is unchecked\n */\n tooltipOffContent: string;\n}\n\n/**\n * a button to hold or resume a ongoing call.\n *\n * Can be used with {@link ControlBar}\n *\n * @param props - properties for the hold button.\n * @returns\n * @beta\n */\nexport const HoldButton = (props: HoldButtonProps): JSX.Element => {\n const { onToggleHold, strings } = props;\n\n const onRenderHoldIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"HoldCallButton\" />;\n };\n const onRenderResumeIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ResumeCall\" />;\n };\n\n return (\n <ControlBarButton\n {...props}\n strings={strings}\n onClick={onToggleHold ?? props.onClick}\n onRenderOnIcon={onRenderResumeIcon}\n onRenderOffIcon={onRenderHoldIcon}\n />\n );\n};\n"]}
@@ -23,7 +23,8 @@ export const HorizontalGallery = (props) => {
23
23
  const lastPage = Math.ceil(numberOfChildren / childrenPerPage) - 1;
24
24
  const paginatedChildren = useMemo(() => {
25
25
  return bucketize(React.Children.toArray(children), childrenPerPage);
26
- }, [children, childrenPerPage]); // If children per page is 0 or less return empty element
26
+ }, [children, childrenPerPage]);
27
+ // If children per page is 0 or less return empty element
27
28
  if (childrenPerPage <= 0) {
28
29
  return React.createElement(React.Fragment, null);
29
30
  }
@@ -33,16 +34,14 @@ export const HorizontalGallery = (props) => {
33
34
  const showButtons = numberOfChildren > childrenPerPage;
34
35
  const disablePreviousButton = page === 0;
35
36
  const disableNextButton = page === lastPage;
36
- return React.createElement(Stack, { horizontal: true, className: mergeStyles(rootStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root) },
37
- 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 }),
38
- React.createElement(Stack, { horizontal: true, className: mergeStyles(childrenContainerStyle, {
39
- '> *': (_b = props.styles) === null || _b === void 0 ? void 0 : _b.children
40
- }) }, childrenOnCurrentPage),
41
- 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, { '> *': (_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 }))));
42
41
  };
43
42
  const HorizontalGalleryNavigationButton = (props) => {
44
43
  const theme = useTheme();
45
- return React.createElement(DefaultButton, { className: mergeStyles(leftRightButtonStyles(theme), props.styles), onClick: props.onClick, disabled: props.disabled, "data-ui-id": props.identifier }, props.icon);
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
45
  };
47
46
  function bucketize(arr, bucketSize) {
48
47
  const bucketArray = [];
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalGallery.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/HorizontalGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,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;AAChD;;GAEG;AAEH,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAkCpC;;;;GAIG;AAEH,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,M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,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"]}
@@ -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,24 +41,18 @@ 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 = {
45
- root: {
46
- padding: 0
47
- },
48
- calloutMain: {
49
- padding: '0.5rem'
50
- }
51
- }; // Place callout with no gap between it and the button.
44
+ const calloutStyle = { root: { padding: 0 }, calloutMain: { padding: '0.5rem' } };
45
+ // Place callout with no gap between it and the button.
52
46
  const calloutProps = {
53
47
  gapSpace: 0,
54
48
  styles: calloutStyle,
55
49
  backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''
56
50
  };
57
- return React.createElement(TooltipHost, { hostClassName: inputButtonTooltipStyle, content: tooltipContent, calloutProps: Object.assign({}, calloutProps) },
51
+ return (React.createElement(TooltipHost, { hostClassName: inputButtonTooltipStyle, content: tooltipContent, calloutProps: Object.assign({}, calloutProps) },
58
52
  React.createElement(IconButton, { className: mergedButtonStyle, ariaLabel: ariaLabel, onClick: onClick, id: id, onMouseEnter: () => {
59
53
  setIsHover(true);
60
54
  }, onMouseLeave: () => {
61
55
  setIsHover(false);
62
- }, onRenderIcon: () => onRenderIcon(isHover) }));
56
+ }, onRenderIcon: () => onRenderIcon(isHover) })));
63
57
  };
64
58
  //# sourceMappingURL=InputBoxComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputBoxComponent.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/InputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAwB,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAsB,eAAe,EAAE,UAAU,EAAE,WAAW,EAAyB,MAAM,iBAAiB,CAAC;AAErJ,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AACjQ,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAsCtC;;GAEG;AAEH,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;IACV,MAAM,eAAe,GAAG,WAAW,CAAC,oBAAoB,EAAE,MAAM,aAAN,MAAM,uBA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ACF,OAAO,oBAAC,WAAW,IAAC,aAAa,EAAE,uBAAuB,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,oBAAO,YAAY;QAEhH,oBAAC,UAAU,IAAC,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE;gBAC7G,UAAU,CAAC,IAAI,CAAC,CAAC;YACnB,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE;gBACpB,UAAU,CAAC,KAAK,CAAC,CAAC;YACpB,CAAC,EAAE,YAAY,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,GAAI,CAClC,CAAC;AACnB,CAAC,CAAC"}
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,E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vD,MAAM,YAAY,GAAG;QACnB,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,YAAY;QACpB,eAAe,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;KACzE,CAAC;IACF,OAAO,CACL,oBAAC,WAAW,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"]}
@@ -10,16 +10,14 @@ 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: {
14
- iconName: 'LocalCameraSwitch'
15
- }, ariaLabel: label, ariaDescription: ariaDescription, "aria-live": 'polite', onClick: () => {
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: () => {
16
14
  if (cameras && cameras.length > 1 && selectedCamera !== undefined) {
17
- const index = cameras.findIndex(camera => selectedCamera.id === camera.id);
15
+ const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);
18
16
  const newCamera = cameras[(index + 1) % cameras.length];
19
17
  if (onSelectCamera !== undefined) {
20
18
  onSelectCamera(newCamera);
21
19
  }
22
20
  }
23
- } });
21
+ } }));
24
22
  };
25
23
  //# sourceMappingURL=LocalVideoCameraButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LocalVideoCameraButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/LocalVideoCameraButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAqBjF;;;GAGG;AAEH,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;gBAExD,IAAI,cAAc,KAAK,SAAS,EAAE;oBAChC,cAAc,CAAC,SAAS,CAAC,CAAC;iBAC3B;aACF;QACH,CAAC,GAAI,CAAC;AACR,CAAC,CAAC"}
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"]}