@azure/communication-react 1.28.0-beta.2 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/dist/communication-react.d.ts +25 -1371
  2. package/dist/dist-cjs/communication-react/index.js +40155 -174
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/common.d.ts +0 -13
  5. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/constants.d.ts +0 -5
  7. package/dist/dist-esm/acs-ui-common/src/constants.js +0 -5
  8. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/index.d.ts +0 -4
  10. package/dist/dist-esm/acs-ui-common/src/index.js +0 -3
  11. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/safeStringify.d.ts +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/safeStringify.js.map +1 -1
  14. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  15. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -2
  17. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  18. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -2
  19. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -2
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +7 -9
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -25
  24. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/hooks/useHandlers.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -1
  28. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  30. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  32. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  33. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -42
  35. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -6
  37. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +7 -39
  38. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -4
  40. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -24
  41. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
  43. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +2 -5
  45. package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  47. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  48. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +0 -10
  50. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +18 -4
  52. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  54. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -1
  56. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  57. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  58. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +4 -38
  59. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  60. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  61. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -4
  62. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  63. package/dist/dist-esm/chat-component-bindings/src/hooks/useSelector.js +1 -1
  64. package/dist/dist-esm/chat-component-bindings/src/hooks/useSelector.js.map +1 -1
  65. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  66. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  67. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  68. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  69. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  70. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  71. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  72. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  73. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  74. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  75. package/dist/dist-esm/communication-react/src/index.d.ts +0 -21
  76. package/dist/dist-esm/communication-react/src/index.js +0 -3
  77. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  79. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +1 -2
  80. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  82. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  83. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  85. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  86. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  87. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  88. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +7 -9
  89. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  90. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  91. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  92. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +8 -10
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +0 -1
  108. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  109. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  110. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  111. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  112. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  113. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  114. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  115. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  116. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  117. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +2 -7
  118. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  120. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  121. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/RaiseHandButton.js +21 -7
  123. package/dist/dist-esm/react-components/src/components/RaiseHandButton.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  125. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  126. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +2 -2
  128. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -21
  130. package/dist/dist-esm/react-components/src/components/index.js +0 -8
  131. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  133. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  134. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  135. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  136. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -38
  138. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  139. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  140. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  141. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  142. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  143. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -47
  144. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -154
  145. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  146. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  147. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  149. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  150. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +4 -4
  151. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  153. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  154. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  155. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  156. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -45
  158. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  159. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -24
  160. package/dist/dist-esm/react-components/src/theming/icons.js +0 -67
  161. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  162. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  163. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  164. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  166. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  168. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  169. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -59
  170. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +15 -19
  171. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  172. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +6 -38
  173. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +3 -14
  174. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  175. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  176. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  177. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  178. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  179. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  180. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  181. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  182. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  183. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +3 -1
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.d.ts +1 -0
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +7 -5
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +1 -0
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.js +1 -1
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.js.map +1 -1
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -3
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -2
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +7 -44
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +0 -8
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -71
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  214. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -52
  215. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -10
  216. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  217. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -10
  218. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -20
  219. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  220. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -18
  221. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  222. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  223. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  224. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  225. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  226. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  227. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  228. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  229. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  230. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  232. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  234. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -37
  235. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  237. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/OnFetchProfileCallback.js +2 -0
  239. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/OnFetchProfileCallback.js.map +1 -1
  240. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -14
  241. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  243. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  245. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  246. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  249. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  250. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  251. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  252. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  253. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  255. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  256. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  257. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -26
  258. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
  259. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  260. package/package.json +4 -4
  261. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DQsJ0ty3.js +0 -215
  262. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DQsJ0ty3.js.map +0 -1
  263. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-K8NQvjwe.js +0 -49
  264. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-K8NQvjwe.js.map +0 -1
  265. package/dist/dist-cjs/communication-react/index-C-rok69c.js +0 -46100
  266. package/dist/dist-cjs/communication-react/index-C-rok69c.js.map +0 -1
  267. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  268. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  269. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  270. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  271. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  272. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  273. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  274. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  275. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  276. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  277. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  278. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  279. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  280. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  281. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  282. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  283. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -206
  284. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  285. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  286. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  287. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  288. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  289. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  290. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  291. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  292. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  293. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  294. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  295. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  296. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  297. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  298. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  299. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  300. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  301. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  302. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  303. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  304. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  305. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  306. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
  307. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
  308. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  309. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  310. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  311. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  312. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  313. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  314. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  315. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  316. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  317. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  318. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  319. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  320. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  321. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
  322. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
  323. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  324. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
  325. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -334
  326. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  327. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  328. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  329. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  330. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  331. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -183
  332. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  333. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  334. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  335. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  336. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.d.ts +0 -9
  337. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js +0 -16
  338. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js.map +0 -1
  339. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  340. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -229
  341. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  342. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  343. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  344. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  345. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  346. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  347. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  348. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  349. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  350. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  351. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  352. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  353. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  354. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  355. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  356. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  357. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  358. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  359. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  360. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  361. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  362. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  363. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  364. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  365. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  366. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  367. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  368. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  369. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  370. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -328
  371. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  372. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  373. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  374. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  375. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  376. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  377. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  378. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  379. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  380. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  381. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
  382. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
  383. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  384. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  385. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  386. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  387. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  388. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  389. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  390. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  391. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  392. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  393. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -46
  394. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -200
  395. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  396. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  397. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  398. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  399. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  400. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  401. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  402. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  403. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  404. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  405. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  406. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  407. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  408. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  409. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  410. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  411. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  412. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  413. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  414. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  415. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  416. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  417. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  418. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  419. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -20,17 +20,6 @@ export interface ParticipantListStyles extends BaseCustomStyles {
20
20
  /** Styles for the {@link ParticipantList} {@link ParticipantItem}. */
21
21
  participantItemStyles?: ParticipantListItemStyles;
22
22
  }
23
- /**
24
- * Strings for the {@link ParticipantList}.
25
- *
26
- * @beta
27
- */
28
- export interface ParticipantListStrings {
29
- /**
30
- * String for rendering the count of participants not contained in the displayed participant list
31
- */
32
- overflowParticipantCount?: string;
33
- }
34
23
  /**
35
24
  * A callback for providing custom menu items for each participant in {@link ParticipantList}.
36
25
  *
@@ -68,10 +57,6 @@ export type ParticipantListProps = {
68
57
  styles?: ParticipantListStyles;
69
58
  /** Optional value to determine if the tooltip should be shown for participants or not */
70
59
  showParticipantOverflowTooltip?: boolean;
71
- /** Total number of people in the call. This number can be larger than the remote participant count. */
72
- totalParticipantCount?: number;
73
- /** Strings for the participant list */
74
- strings?: ParticipantListStrings;
75
60
  /** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */
76
61
  participantAriaLabelledBy?: string;
77
62
  /** List of pinned participants */
@@ -126,12 +126,11 @@ const getParticipantsForDefaultRender = (participants, excludeMe, myUserId) => {
126
126
  * @public
127
127
  */
128
128
  export const ParticipantList = (props) => {
129
- var _a, _b, _c, _d, _e;
130
- const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip, totalParticipantCount, strings, participantAriaLabelledBy, pinnedParticipants } = props;
129
+ var _a, _b, _c, _d;
130
+ const { excludeMe = false, myUserId, participants, onRemoveParticipant, onRenderAvatar, onRenderParticipant, onFetchParticipantMenuItems, showParticipantOverflowTooltip, participantAriaLabelledBy, pinnedParticipants } = props;
131
131
  const theme = useTheme();
132
132
  const ids = useIdentifiers();
133
133
  const participantItemStrings = useLocale().strings.participantItem;
134
- const participantListStrings = useLocale().strings.ParticipantList;
135
134
  const displayedParticipants = useMemo(() => {
136
135
  return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);
137
136
  }, [participants, excludeMe, myUserId, onRenderParticipant]);
@@ -165,14 +164,6 @@ export const ParticipantList = (props) => {
165
164
  return menuItems;
166
165
  }, [ids.participantListRemoveParticipantButton, myUserId, onFetchParticipantMenuItems, onRemoveParticipant, (_b = (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles) === null || _b === void 0 ? void 0 : _b.participantSubMenuItemsStyles, participantItemStrings.removeButtonLabel]);
167
166
  const participantItemStyles = useMemo(() => { var _a; return merge(participantListItemStyle, (_a = props.styles) === null || _a === void 0 ? void 0 : _a.participantItemStyles); }, [(_c = props.styles) === null || _c === void 0 ? void 0 : _c.participantItemStyles]);
168
- const overflowParticipantCountString = (_d = strings === null || strings === void 0 ? void 0 : strings.overflowParticipantCount) !== null && _d !== void 0 ? _d : participantListStrings === null || participantListStrings === void 0 ? void 0 : participantListStrings.overflowParticipantCount;
169
- return React.createElement(Stack, { "data-ui-id": ids.participantList, className: mergeStyles(participantListStyle, (_e = props.styles) === null || _e === void 0 ? void 0 : _e.root), role: 'menu' },
170
- displayedParticipants.map((participant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants)),
171
- overflowParticipantCountString && totalParticipantCount && totalParticipantCount > displayedParticipants.length && React.createElement(Text, { style: {
172
- fontWeight: 400,
173
- margin: '0.5rem'
174
- } }, _formatString(overflowParticipantCountString, {
175
- overflowCount: `${totalParticipantCount - displayedParticipants.length}`
176
- })));
167
+ return React.createElement(Stack, { "data-ui-id": ids.participantList, className: mergeStyles(participantListStyle, (_d = props.styles) === null || _d === void 0 ? void 0 : _d.root), role: 'menu' }, displayedParticipants.map((participant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants)));
177
168
  };
178
169
  //# sourceMappingURL=ParticipantList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantList.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ParticipantList.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAkD,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAS,MAAM,iBAAiB,CAAC;AAC1I,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iB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,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,wBAAwB,CAAC;IAC7H,OAAO,oBAAC,KAAK,kBAAa,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,WAAW,CAAC,oBAAoB,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM;QACxH,qBAAqB,CAAC,GAAG,CAAC,CAAC,WAAuC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,cAAc,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,KAAK,CAAC,kBAAkB,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC;QAC7X,8BAA8B,IAAI,qBAAqB,IAAI,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,IAAI,oBAAC,IAAI,IAAC,KAAK,EAAE;gBACjI,UAAU,EAAE,GAAG;gBACf,MAAM,EAAE,QAAQ;aACjB,IACU,aAAa,CAAC,8BAA8B,EAAE;YACrD,aAAa,EAAE,GAAG,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,EAAE;SACzE,CAAC,CACW,CACP,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, IContextualMenuItem, IContextualMenuItemStyles, merge, mergeStyles, PersonaPresence, Stack, Theme } from '@fluentui/react';\nimport { Text } from '@fluentui/react';\nimport { useTheme, CallingTheme } from '../theming';\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\nimport React, { useCallback, useMemo } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { BaseCustomStyles, CallParticipantListParticipant, OnRenderAvatarCallback, ParticipantListParticipant } from '../types';\nimport { CustomAvatarOptions } from '../types';\nimport { formatParticipantStateString, ParticipantItem, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\nimport { iconStyles, participantListItemStyle, participantListStyle } from './styles/ParticipantList.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Styles for the {@link ParticipantList} {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantListItemStyles extends ParticipantItemStyles {\n /** Styles applied to the sub-menu of the {@link ParticipantList} {@link ParticipantItem}. */\n participantSubMenuItemsStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Styles for the {@link ParticipantList}.\n *\n * @public\n */\nexport interface ParticipantListStyles extends BaseCustomStyles {\n /** Styles for the {@link ParticipantList} {@link ParticipantItem}. */\n participantItemStyles?: ParticipantListItemStyles;\n}\n/**\n * Strings for the {@link ParticipantList}.\n *\n * @beta\n */\nexport interface ParticipantListStrings {\n /**\n * String for rendering the count of participants not contained in the displayed participant list\n */\n overflowParticipantCount?: string;\n}\n\n/**\n * A callback for providing custom menu items for each participant in {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantMenuItemsCallback = (participantUserId: string, userId?: string, defaultMenuItems?: IContextualMenuItem[]) => IContextualMenuItem[];\n\n/**\n * Props for {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantListProps = {\n /** Participants in user call or chat */\n participants: ParticipantListParticipant[];\n /** User ID of user */\n myUserId?: string;\n /**\n * If set to `true`, excludes the local participant from the participant list with use of `myUserId` props (required in this case).\n *\n * @defaultValue `false`\n */\n excludeMe?: boolean;\n /** Optional callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem` */\n onRenderParticipant?: (participant: ParticipantListParticipant) => JSX.Element | null;\n /** Optional callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional callback to render the context menu for each participant */\n onRemoveParticipant?: (userId: string) => void;\n /** Optional callback to render custom menu items for each participant. */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /** Optional callback when rendered ParticipantItem is clicked */\n onParticipantClick?: (participant?: ParticipantListParticipant) => void;\n /** Optional callback to render a context menu to mute a participant */\n onMuteParticipant?: (userId: string) => Promise<void>;\n styles?: ParticipantListStyles;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /** Total number of people in the call. This number can be larger than the remote participant count. */\n totalParticipantCount?: number;\n /** Strings for the participant list */\n strings?: ParticipantListStrings;\n /** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */\n participantAriaLabelledBy?: string;\n /** List of pinned participants */\n pinnedParticipants?: string[];\n};\nconst onRenderParticipantDefault = (participant: ParticipantListParticipant, strings: ParticipantItemStrings, myUserId?: string, onRenderAvatar?: OnRenderAvatarCallback, createParticipantMenuItems?: (participant: ParticipantListParticipant) => IContextualMenuItem[], styles?: ParticipantListItemStyles, onParticipantClick?: (participant?: ParticipantListParticipant) => void, showParticipantOverflowTooltip?: boolean, participantAriaLabelledBy?: string, theme?: Theme, pinnedParticipants?: string[]): JSX.Element | null => {\n const callingParticipant = participant as CallParticipantListParticipant;\n let presence: PersonaPresence | undefined = undefined;\n if (callingParticipant) {\n presence = PersonaPresence.none;\n }\n const menuItems = createParticipantMenuItems && createParticipantMenuItems(participant);\n const formatDisplayName = (displayName?: string): string | undefined => {\n if (displayName && strings.attendeeRole) {\n return _formatString(displayName, {\n AttendeeRole: strings.attendeeRole\n });\n }\n return displayName;\n };\n const displayName = formatDisplayName(participant.displayName);\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n const isPinned = pinnedParticipants && pinnedParticipants?.includes(participant.userId);\n const isScreenSharing = callingParticipant?.isScreenSharing;\n const isMuted = callingParticipant?.isMuted;\n const hasRaisedHand = callingParticipant?.raisedHand;\n const isAudioPermitted = callingParticipant?.mediaAccess ? callingParticipant.mediaAccess.isAudioPermitted : true;\n const isVideoPermitted = callingParticipant?.mediaAccess ? callingParticipant.mediaAccess.isVideoPermitted : true;\n const shouldRenderParticipantIcon = isScreenSharing || isMuted || hasRaisedHand || isPinned || !isAudioPermitted || !isVideoPermitted;\n const onRenderIcon = shouldRenderParticipantIcon ? () => <Stack horizontal={true} tokens={{\n childrenGap: '0.5rem'\n }}>\n {callingParticipant.raisedHand && <Stack horizontal={true} tokens={{\n childrenGap: '0.2rem'\n }} style={{\n alignItems: 'center',\n padding: '0.1rem 0.2rem',\n backgroundColor: theme?.palette.neutralLighter,\n borderRadius: '0.3rem'\n }}>\n {callingParticipant.raisedHand.raisedHandOrderPosition && <Stack.Item>\n <Text>{callingParticipant.raisedHand?.raisedHandOrderPosition}</Text>\n </Stack.Item>}\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>}\n {callingParticipant.isScreenSharing && <Icon iconName=\"ParticipantItemScreenShareStart\" className={iconStyles} ariaLabel={strings.sharingIconLabel} />}\n {callingParticipant.spotlight && <Icon iconName=\"ParticipantItemSpotlighted\" className={iconStyles} />}\n {isPinned && <Icon iconName=\"ParticipantItemPinned\" className={iconStyles} />}\n {callingParticipant.mediaAccess && !callingParticipant.mediaAccess.isVideoPermitted ? <Icon iconName=\"ControlButtonCameraProhibited\" className={iconStyles} ariaLabel={strings.mutedIconLabel} /> : undefined}\n {callingParticipant.mediaAccess && !callingParticipant.mediaAccess?.isAudioPermitted ? <Icon iconName=\"ControlButtonMicProhibited\" className={iconStyles} ariaLabel={strings.mutedIconLabel} /> : undefined}\n {(callingParticipant.mediaAccess ? callingParticipant.mediaAccess.isAudioPermitted : true) && callingParticipant.isMuted ? <Icon iconName=\"ParticipantItemMicOff\" className={iconStyles} ariaLabel={strings.mutedIconLabel} /> : undefined}\n </Stack> : () => null;\n const onRenderAvatarWithRaiseHand = callingParticipant?.raisedHand && onRenderAvatar ? (userId?: string, options?: CustomAvatarOptions, defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => onRenderAvatar(userId, {\n ...options,\n styles: {\n root: {\n border: callingPalette.raiseHandGold\n }\n }\n }, defaultOnRender) : onRenderAvatar;\n const ariaLabelTemplate = (menuItems && menuItems.length > 0 ? strings?.participantItemWithMoreOptionsAriaLabel : undefined) ?? strings?.participantItemAriaLabel;\n const ariaLabel = _formatString(ariaLabelTemplate ?? '', {\n displayName: displayName ?? '',\n connectionState: formatParticipantStateString(callingParticipant, strings) ?? '',\n mutedState: (callingParticipant.isMuted ? strings?.mutedIconLabel : undefined) ?? '',\n micDisabledState: (callingParticipant.mediaAccess?.isAudioPermitted === false ? strings?.micDisabledIconLabel : undefined) ?? '',\n cameraDisabledState: (callingParticipant.mediaAccess?.isVideoPermitted === false ? strings?.cameraDisabledIconLabel : undefined) ?? '',\n sharingState: (callingParticipant.isScreenSharing ? strings?.sharingIconLabel : undefined) ?? '',\n handRaisedState: (callingParticipant.raisedHand?.raisedHandOrderPosition ? _formatString(strings?.handRaisedIconLabel ?? '', {\n position: callingParticipant.raisedHand?.raisedHandOrderPosition?.toString() ?? ''\n }) : undefined) ?? ''\n });\n return <ParticipantItem styles={styles} key={participant.userId} userId={participant.userId} displayName={displayName} me={myUserId ? participant.userId === myUserId : false} menuItems={menuItems} presence={presence} onRenderIcon={onRenderIcon} onRenderAvatar={onRenderAvatarWithRaiseHand} onClick={onParticipantClick ? () => onParticipantClick?.(participant) : undefined} showParticipantOverflowTooltip={showParticipantOverflowTooltip} participantState={callingParticipant.state} ariaLabelledBy={participantAriaLabelledBy} strings={{\n participantItemAriaLabel: ariaLabel\n }} />;\n};\n\n/**\n * Sort participants by raised hand order position\n */\nconst sortParticipants = (participants: ParticipantListParticipant[]): ParticipantListParticipant[] => {\n const isParticipantListCallParticipant = function (participant: ParticipantListParticipant): boolean {\n return 'raisedHand' in participant;\n };\n participants.sort((a, b) => {\n if (!isParticipantListCallParticipant(a) || !isParticipantListCallParticipant(b)) {\n return 0;\n }\n const callA = a as CallParticipantListParticipant;\n const callB = b as CallParticipantListParticipant;\n if (callA.raisedHand && callB.raisedHand) {\n return callA.raisedHand.raisedHandOrderPosition - callB.raisedHand.raisedHandOrderPosition;\n } else if (callA.raisedHand) {\n return -1;\n } else if (callB.raisedHand) {\n return 1;\n }\n return 0;\n });\n return participants;\n};\nconst getParticipantsForDefaultRender = (participants: ParticipantListParticipant[], excludeMe: boolean, myUserId: string | undefined): ParticipantListParticipant[] => {\n if (!excludeMe || !myUserId) {\n return [...participants];\n }\n const userIndex = participants.map(p => p.userId).indexOf(myUserId);\n if (userIndex === -1) {\n return [...participants];\n }\n const remoteParticipants = [...participants];\n remoteParticipants.splice(userIndex, 1);\n return remoteParticipants;\n};\n\n/**\n * Component to render all calling or chat participants.\n *\n * By default, each participant is rendered with {@link ParticipantItem}. See {@link ParticipantListProps.onRenderParticipant} to override.\n *\n * @public\n */\nexport const ParticipantList = (props: ParticipantListProps): JSX.Element => {\n const {\n excludeMe = false,\n myUserId,\n participants,\n onRemoveParticipant,\n onRenderAvatar,\n onRenderParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip,\n totalParticipantCount,\n strings,\n participantAriaLabelledBy,\n pinnedParticipants\n } = props;\n const theme = useTheme();\n const ids = useIdentifiers();\n const participantItemStrings = useLocale().strings.participantItem;\n const participantListStrings = useLocale().strings.ParticipantList;\n const displayedParticipants: ParticipantListParticipant[] = useMemo(() => {\n return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);\n }, [participants, excludeMe, myUserId, onRenderParticipant]);\n sortParticipants(displayedParticipants);\n const createParticipantMenuItems = useCallback((participant: ParticipantListParticipant): IContextualMenuItem[] => {\n let menuItems: IContextualMenuItem[] = [];\n const participantIsRemovable = participant.isRemovable;\n if (participant.userId !== myUserId && onRemoveParticipant && participantIsRemovable) {\n menuItems.push({\n key: 'remove',\n text: participantItemStrings.removeButtonLabel,\n onClick: () => onRemoveParticipant(participant.userId),\n itemProps: {\n styles: props.styles?.participantItemStyles?.participantSubMenuItemsStyles\n },\n iconProps: {\n iconName: 'ContextMenuRemoveParticipant',\n styles: {\n root: {\n lineHeight: 0\n }\n }\n },\n 'data-ui-id': ids.participantListRemoveParticipantButton\n });\n }\n if (onFetchParticipantMenuItems) {\n menuItems = onFetchParticipantMenuItems(participant.userId, myUserId, menuItems);\n }\n return menuItems;\n }, [ids.participantListRemoveParticipantButton, myUserId, onFetchParticipantMenuItems, onRemoveParticipant, props.styles?.participantItemStyles?.participantSubMenuItemsStyles, participantItemStrings.removeButtonLabel]);\n const participantItemStyles = useMemo(() => merge(participantListItemStyle, props.styles?.participantItemStyles), [props.styles?.participantItemStyles]);\n const overflowParticipantCountString = strings?.overflowParticipantCount ?? participantListStrings?.overflowParticipantCount;\n return <Stack data-ui-id={ids.participantList} className={mergeStyles(participantListStyle, props.styles?.root)} role={'menu'}>\n {displayedParticipants.map((participant: ParticipantListParticipant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants))}\n {overflowParticipantCountString && totalParticipantCount && totalParticipantCount > displayedParticipants.length && <Text style={{\n fontWeight: 400,\n margin: '0.5rem'\n }}>\n {_formatString(overflowParticipantCountString, {\n overflowCount: `${totalParticipantCount - displayedParticipants.length}`\n })}\n </Text>}\n </Stack>;\n};"]}
1
+ {"version":3,"file":"ParticipantList.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ParticipantList.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,IAAI,EAAkD,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,KAAK,EAAS,MAAM,iBAAiB,CAAC;AAC1I,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,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oBAAoB,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,IACxH,qBAAqB,CAAC,GAAG,CAAC,CAAC,WAAuC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC,WAAW,EAAE,sBAAsB,EAAE,QAAQ,EAAE,cAAc,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,KAAK,CAAC,kBAAkB,EAAE,8BAA8B,EAAE,yBAAyB,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAExX,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, IContextualMenuItem, IContextualMenuItemStyles, merge, mergeStyles, PersonaPresence, Stack, Theme } from '@fluentui/react';\nimport { Text } from '@fluentui/react';\nimport { useTheme, CallingTheme } from '../theming';\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\nimport React, { useCallback, useMemo } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { BaseCustomStyles, CallParticipantListParticipant, OnRenderAvatarCallback, ParticipantListParticipant } from '../types';\nimport { CustomAvatarOptions } from '../types';\nimport { formatParticipantStateString, ParticipantItem, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\nimport { iconStyles, participantListItemStyle, participantListStyle } from './styles/ParticipantList.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Styles for the {@link ParticipantList} {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantListItemStyles extends ParticipantItemStyles {\n /** Styles applied to the sub-menu of the {@link ParticipantList} {@link ParticipantItem}. */\n participantSubMenuItemsStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Styles for the {@link ParticipantList}.\n *\n * @public\n */\nexport interface ParticipantListStyles extends BaseCustomStyles {\n /** Styles for the {@link ParticipantList} {@link ParticipantItem}. */\n participantItemStyles?: ParticipantListItemStyles;\n}\n/**\n * A callback for providing custom menu items for each participant in {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantMenuItemsCallback = (participantUserId: string, userId?: string, defaultMenuItems?: IContextualMenuItem[]) => IContextualMenuItem[];\n\n/**\n * Props for {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantListProps = {\n /** Participants in user call or chat */\n participants: ParticipantListParticipant[];\n /** User ID of user */\n myUserId?: string;\n /**\n * If set to `true`, excludes the local participant from the participant list with use of `myUserId` props (required in this case).\n *\n * @defaultValue `false`\n */\n excludeMe?: boolean;\n /** Optional callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem` */\n onRenderParticipant?: (participant: ParticipantListParticipant) => JSX.Element | null;\n /** Optional callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional callback to render the context menu for each participant */\n onRemoveParticipant?: (userId: string) => void;\n /** Optional callback to render custom menu items for each participant. */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /** Optional callback when rendered ParticipantItem is clicked */\n onParticipantClick?: (participant?: ParticipantListParticipant) => void;\n /** Optional callback to render a context menu to mute a participant */\n onMuteParticipant?: (userId: string) => Promise<void>;\n styles?: ParticipantListStyles;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */\n participantAriaLabelledBy?: string;\n /** List of pinned participants */\n pinnedParticipants?: string[];\n};\nconst onRenderParticipantDefault = (participant: ParticipantListParticipant, strings: ParticipantItemStrings, myUserId?: string, onRenderAvatar?: OnRenderAvatarCallback, createParticipantMenuItems?: (participant: ParticipantListParticipant) => IContextualMenuItem[], styles?: ParticipantListItemStyles, onParticipantClick?: (participant?: ParticipantListParticipant) => void, showParticipantOverflowTooltip?: boolean, participantAriaLabelledBy?: string, theme?: Theme, pinnedParticipants?: string[]): JSX.Element | null => {\n const callingParticipant = participant as CallParticipantListParticipant;\n let presence: PersonaPresence | undefined = undefined;\n if (callingParticipant) {\n presence = PersonaPresence.none;\n }\n const menuItems = createParticipantMenuItems && createParticipantMenuItems(participant);\n const formatDisplayName = (displayName?: string): string | undefined => {\n if (displayName && strings.attendeeRole) {\n return _formatString(displayName, {\n AttendeeRole: strings.attendeeRole\n });\n }\n return displayName;\n };\n const displayName = formatDisplayName(participant.displayName);\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n const isPinned = pinnedParticipants && pinnedParticipants?.includes(participant.userId);\n const isScreenSharing = callingParticipant?.isScreenSharing;\n const isMuted = callingParticipant?.isMuted;\n const hasRaisedHand = callingParticipant?.raisedHand;\n const isAudioPermitted = callingParticipant?.mediaAccess ? callingParticipant.mediaAccess.isAudioPermitted : true;\n const isVideoPermitted = callingParticipant?.mediaAccess ? callingParticipant.mediaAccess.isVideoPermitted : true;\n const shouldRenderParticipantIcon = isScreenSharing || isMuted || hasRaisedHand || isPinned || !isAudioPermitted || !isVideoPermitted;\n const onRenderIcon = shouldRenderParticipantIcon ? () => <Stack horizontal={true} tokens={{\n childrenGap: '0.5rem'\n }}>\n {callingParticipant.raisedHand && <Stack horizontal={true} tokens={{\n childrenGap: '0.2rem'\n }} style={{\n alignItems: 'center',\n padding: '0.1rem 0.2rem',\n backgroundColor: theme?.palette.neutralLighter,\n borderRadius: '0.3rem'\n }}>\n {callingParticipant.raisedHand.raisedHandOrderPosition && <Stack.Item>\n <Text>{callingParticipant.raisedHand?.raisedHandOrderPosition}</Text>\n </Stack.Item>}\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>}\n {callingParticipant.isScreenSharing && <Icon iconName=\"ParticipantItemScreenShareStart\" className={iconStyles} ariaLabel={strings.sharingIconLabel} />}\n {callingParticipant.spotlight && <Icon iconName=\"ParticipantItemSpotlighted\" className={iconStyles} />}\n {isPinned && <Icon iconName=\"ParticipantItemPinned\" className={iconStyles} />}\n {callingParticipant.mediaAccess && !callingParticipant.mediaAccess.isVideoPermitted ? <Icon iconName=\"ControlButtonCameraProhibited\" className={iconStyles} ariaLabel={strings.mutedIconLabel} /> : undefined}\n {callingParticipant.mediaAccess && !callingParticipant.mediaAccess?.isAudioPermitted ? <Icon iconName=\"ControlButtonMicProhibited\" className={iconStyles} ariaLabel={strings.mutedIconLabel} /> : undefined}\n {(callingParticipant.mediaAccess ? callingParticipant.mediaAccess.isAudioPermitted : true) && callingParticipant.isMuted ? <Icon iconName=\"ParticipantItemMicOff\" className={iconStyles} ariaLabel={strings.mutedIconLabel} /> : undefined}\n </Stack> : () => null;\n const onRenderAvatarWithRaiseHand = callingParticipant?.raisedHand && onRenderAvatar ? (userId?: string, options?: CustomAvatarOptions, defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => onRenderAvatar(userId, {\n ...options,\n styles: {\n root: {\n border: callingPalette.raiseHandGold\n }\n }\n }, defaultOnRender) : onRenderAvatar;\n const ariaLabelTemplate = (menuItems && menuItems.length > 0 ? strings?.participantItemWithMoreOptionsAriaLabel : undefined) ?? strings?.participantItemAriaLabel;\n const ariaLabel = _formatString(ariaLabelTemplate ?? '', {\n displayName: displayName ?? '',\n connectionState: formatParticipantStateString(callingParticipant, strings) ?? '',\n mutedState: (callingParticipant.isMuted ? strings?.mutedIconLabel : undefined) ?? '',\n micDisabledState: (callingParticipant.mediaAccess?.isAudioPermitted === false ? strings?.micDisabledIconLabel : undefined) ?? '',\n cameraDisabledState: (callingParticipant.mediaAccess?.isVideoPermitted === false ? strings?.cameraDisabledIconLabel : undefined) ?? '',\n sharingState: (callingParticipant.isScreenSharing ? strings?.sharingIconLabel : undefined) ?? '',\n handRaisedState: (callingParticipant.raisedHand?.raisedHandOrderPosition ? _formatString(strings?.handRaisedIconLabel ?? '', {\n position: callingParticipant.raisedHand?.raisedHandOrderPosition?.toString() ?? ''\n }) : undefined) ?? ''\n });\n return <ParticipantItem styles={styles} key={participant.userId} userId={participant.userId} displayName={displayName} me={myUserId ? participant.userId === myUserId : false} menuItems={menuItems} presence={presence} onRenderIcon={onRenderIcon} onRenderAvatar={onRenderAvatarWithRaiseHand} onClick={onParticipantClick ? () => onParticipantClick?.(participant) : undefined} showParticipantOverflowTooltip={showParticipantOverflowTooltip} participantState={callingParticipant.state} ariaLabelledBy={participantAriaLabelledBy} strings={{\n participantItemAriaLabel: ariaLabel\n }} />;\n};\n\n/**\n * Sort participants by raised hand order position\n */\nconst sortParticipants = (participants: ParticipantListParticipant[]): ParticipantListParticipant[] => {\n const isParticipantListCallParticipant = function (participant: ParticipantListParticipant): boolean {\n return 'raisedHand' in participant;\n };\n participants.sort((a, b) => {\n if (!isParticipantListCallParticipant(a) || !isParticipantListCallParticipant(b)) {\n return 0;\n }\n const callA = a as CallParticipantListParticipant;\n const callB = b as CallParticipantListParticipant;\n if (callA.raisedHand && callB.raisedHand) {\n return callA.raisedHand.raisedHandOrderPosition - callB.raisedHand.raisedHandOrderPosition;\n } else if (callA.raisedHand) {\n return -1;\n } else if (callB.raisedHand) {\n return 1;\n }\n return 0;\n });\n return participants;\n};\nconst getParticipantsForDefaultRender = (participants: ParticipantListParticipant[], excludeMe: boolean, myUserId: string | undefined): ParticipantListParticipant[] => {\n if (!excludeMe || !myUserId) {\n return [...participants];\n }\n const userIndex = participants.map(p => p.userId).indexOf(myUserId);\n if (userIndex === -1) {\n return [...participants];\n }\n const remoteParticipants = [...participants];\n remoteParticipants.splice(userIndex, 1);\n return remoteParticipants;\n};\n\n/**\n * Component to render all calling or chat participants.\n *\n * By default, each participant is rendered with {@link ParticipantItem}. See {@link ParticipantListProps.onRenderParticipant} to override.\n *\n * @public\n */\nexport const ParticipantList = (props: ParticipantListProps): JSX.Element => {\n const {\n excludeMe = false,\n myUserId,\n participants,\n onRemoveParticipant,\n onRenderAvatar,\n onRenderParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip,\n participantAriaLabelledBy,\n pinnedParticipants\n } = props;\n const theme = useTheme();\n const ids = useIdentifiers();\n const participantItemStrings = useLocale().strings.participantItem;\n const displayedParticipants: ParticipantListParticipant[] = useMemo(() => {\n return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);\n }, [participants, excludeMe, myUserId, onRenderParticipant]);\n sortParticipants(displayedParticipants);\n const createParticipantMenuItems = useCallback((participant: ParticipantListParticipant): IContextualMenuItem[] => {\n let menuItems: IContextualMenuItem[] = [];\n const participantIsRemovable = participant.isRemovable;\n if (participant.userId !== myUserId && onRemoveParticipant && participantIsRemovable) {\n menuItems.push({\n key: 'remove',\n text: participantItemStrings.removeButtonLabel,\n onClick: () => onRemoveParticipant(participant.userId),\n itemProps: {\n styles: props.styles?.participantItemStyles?.participantSubMenuItemsStyles\n },\n iconProps: {\n iconName: 'ContextMenuRemoveParticipant',\n styles: {\n root: {\n lineHeight: 0\n }\n }\n },\n 'data-ui-id': ids.participantListRemoveParticipantButton\n });\n }\n if (onFetchParticipantMenuItems) {\n menuItems = onFetchParticipantMenuItems(participant.userId, myUserId, menuItems);\n }\n return menuItems;\n }, [ids.participantListRemoveParticipantButton, myUserId, onFetchParticipantMenuItems, onRemoveParticipant, props.styles?.participantItemStyles?.participantSubMenuItemsStyles, participantItemStrings.removeButtonLabel]);\n const participantItemStyles = useMemo(() => merge(participantListItemStyle, props.styles?.participantItemStyles), [props.styles?.participantItemStyles]);\n return <Stack data-ui-id={ids.participantList} className={mergeStyles(participantListStyle, props.styles?.root)} role={'menu'}>\n {displayedParticipants.map((participant: ParticipantListParticipant) => onRenderParticipant ? onRenderParticipant(participant) : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, pinnedParticipants))}\n {}\n </Stack>;\n};"]}
@@ -24,21 +24,35 @@ export const RaiseHandButton = (props) => {
24
24
  };
25
25
  const raiseHandButtonStyles = (theme) => ({
26
26
  rootChecked: {
27
- background: theme.palette.themePrimary,
28
- color: DefaultPalette.white,
27
+ background: theme.semanticColors.primaryButtonBackground,
28
+ color: theme.semanticColors.primaryButtonText,
29
29
  ':focus::after': {
30
- outlineColor: `${DefaultPalette.white}`
30
+ outlineColor: `${DefaultPalette.white} !important`
31
+ },
32
+ // added !important to avoid override by FluentUI button styles
33
+ '@media (forced-colors: active)': {
34
+ border: '1px solid',
35
+ borderColor: theme.palette.black
31
36
  }
32
37
  },
33
38
  rootCheckedHovered: {
34
- background: theme.palette.themePrimary,
35
- color: DefaultPalette.white,
39
+ background: theme.semanticColors.primaryButtonBackgroundHovered,
40
+ color: theme.semanticColors.primaryButtonTextHovered,
36
41
  ':focus::after': {
37
- outlineColor: `${DefaultPalette.white}`
42
+ outlineColor: `${DefaultPalette.white} !important`
43
+ },
44
+ // added !important to avoid override by FluentUI button styles
45
+ '@media (forced-colors: active)': {
46
+ border: '1px solid',
47
+ borderColor: theme.palette.black
38
48
  }
39
49
  },
50
+ rootCheckedPressed: {
51
+ background: theme.semanticColors.primaryButtonBackgroundPressed,
52
+ color: theme.semanticColors.primaryButtonTextPressed
53
+ },
40
54
  labelChecked: {
41
- color: DefaultPalette.white
55
+ color: theme.semanticColors.primaryButtonText
42
56
  }
43
57
  });
44
58
  //# sourceMappingURL=RaiseHandButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RaiseHandButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/RaiseHandButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,cAAc,EAAwB,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAy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AACngB,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAiB,EAAE,CAAC,CAAC;IAC9D,WAAW,EAAE;QACX,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;QACtC,KAAK,EAAE,cAAc,CAAC,KAAK;QAC3B,eAAe,EAAE;YACf,YAAY,EAAE,GAAG,cAAc,CAAC,KAAK,EAAE;SACxC;KACF;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;QACtC,KAAK,EAAE,cAAc,CAAC,KAAK;QAC3B,eAAe,EAAE;YACf,YAAY,EAAE,GAAG,cAAc,CAAC,KAAK,EAAE;SACxC;KACF;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,cAAc,CAAC,KAAK;KAC5B;CACF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { useLocale } from '../localization';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { concatStyleSets, DefaultPalette, IButtonStyles, Theme, useTheme } from '@fluentui/react';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\n\n/**\n * Strings of {@link RaiseHandButton} that can be overridden.\n *\n * @public\n */\nexport interface RaiseHandButtonStrings {\n /** Label when button is on. */\n onLabel: string;\n /** Label when button is off. */\n offLabel: string;\n /** * Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is on. */\n tooltipOnContent?: string;\n /** Tooltip content when the button is off. */\n tooltipOffContent?: string;\n}\n\n/**\n * Props for {@link RaiseHandButton}.\n *\n * @public\n */\nexport interface RaiseHandButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with `communication react eventHandlers`.\n * Maps directly to the `onClick` property.\n */\n onToggleRaiseHand?: () => Promise<void>;\n\n /**\n * Optional strings to override in component\n */\n strings?: Partial<RaiseHandButtonStrings>;\n}\n\n/**\n * A button to start / stop screen sharing.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const RaiseHandButton = (props: RaiseHandButtonProps): JSX.Element => {\n const localeStrings = useLocale().strings.raiseHandButton;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const theme = useTheme();\n const styles = raiseHandButtonStyles(theme);\n const onRenderRaiseHandIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ControlButtonRaiseHand\" />;\n const onRenderLowerHandIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ControlButtonLowerHand\" />;\n return <ControlBarButton {...props} styles={concatStyleSets(styles, props.styles)} onClick={props.onToggleRaiseHand ?? props.onClick} onRenderOnIcon={props.onRenderOnIcon ?? onRenderLowerHandIcon} onRenderOffIcon={props.onRenderOffIcon ?? onRenderRaiseHandIcon} strings={strings} labelKey={props.labelKey ?? 'raiseHandButtonLabel'} aria-label={props.checked ? strings.onLabel : strings.offLabel} aria-description={props.checked ? strings.tooltipOnContent : strings.tooltipOffContent} disabled={props.disabled} />;\n};\nconst raiseHandButtonStyles = (theme: Theme): IButtonStyles => ({\n rootChecked: {\n background: theme.palette.themePrimary,\n color: DefaultPalette.white,\n ':focus::after': {\n outlineColor: `${DefaultPalette.white}`\n }\n },\n rootCheckedHovered: {\n background: theme.palette.themePrimary,\n color: DefaultPalette.white,\n ':focus::after': {\n outlineColor: `${DefaultPalette.white}`\n }\n },\n labelChecked: {\n color: DefaultPalette.white\n }\n});"]}
1
+ {"version":3,"file":"RaiseHandButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/RaiseHandButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,cAAc,EAA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AAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,CAAC;AACngB,CAAC,CAAC;AACF,MAAM,qBAAqB,GAAG,CAAC,KAAY,EAAiB,EAAE,CAAC,CAAC;IAC9D,WAAW,EAAE;QACX,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,uBAAuB;QACxD,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB;QAC7C,eAAe,EAAE;YACf,YAAY,EAAE,GAAG,cAAc,CAAC,KAAK,aAAa;SACnD;QACD,+DAA+D;QAC/D,gCAAgC,EAAE;YAChC,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;SACjC;KACF;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,8BAA8B;QAC/D,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,wBAAwB;QACpD,eAAe,EAAE;YACf,YAAY,EAAE,GAAG,cAAc,CAAC,KAAK,aAAa;SACnD;QACD,+DAA+D;QAC/D,gCAAgC,EAAE;YAChC,MAAM,EAAE,WAAW;YACnB,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;SACjC;KACF;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,KAAK,CAAC,cAAc,CAAC,8BAA8B;QAC/D,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,wBAAwB;KACrD;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,iBAAiB;KAC9C;CACF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { useLocale } from '../localization';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { concatStyleSets, DefaultPalette, IButtonStyles, Theme, useTheme } from '@fluentui/react';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\n\n/**\n * Strings of {@link RaiseHandButton} that can be overridden.\n *\n * @public\n */\nexport interface RaiseHandButtonStrings {\n /** Label when button is on. */\n onLabel: string;\n /** Label when button is off. */\n offLabel: string;\n /** * Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is on. */\n tooltipOnContent?: string;\n /** Tooltip content when the button is off. */\n tooltipOffContent?: string;\n}\n\n/**\n * Props for {@link RaiseHandButton}.\n *\n * @public\n */\nexport interface RaiseHandButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with `communication react eventHandlers`.\n * Maps directly to the `onClick` property.\n */\n onToggleRaiseHand?: () => Promise<void>;\n\n /**\n * Optional strings to override in component\n */\n strings?: Partial<RaiseHandButtonStrings>;\n}\n\n/**\n * A button to start / stop screen sharing.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const RaiseHandButton = (props: RaiseHandButtonProps): JSX.Element => {\n const localeStrings = useLocale().strings.raiseHandButton;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const theme = useTheme();\n const styles = raiseHandButtonStyles(theme);\n const onRenderRaiseHandIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ControlButtonRaiseHand\" />;\n const onRenderLowerHandIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ControlButtonLowerHand\" />;\n return <ControlBarButton {...props} styles={concatStyleSets(styles, props.styles)} onClick={props.onToggleRaiseHand ?? props.onClick} onRenderOnIcon={props.onRenderOnIcon ?? onRenderLowerHandIcon} onRenderOffIcon={props.onRenderOffIcon ?? onRenderRaiseHandIcon} strings={strings} labelKey={props.labelKey ?? 'raiseHandButtonLabel'} aria-label={props.checked ? strings.onLabel : strings.offLabel} aria-description={props.checked ? strings.tooltipOnContent : strings.tooltipOffContent} disabled={props.disabled} />;\n};\nconst raiseHandButtonStyles = (theme: Theme): IButtonStyles => ({\n rootChecked: {\n background: theme.semanticColors.primaryButtonBackground,\n color: theme.semanticColors.primaryButtonText,\n ':focus::after': {\n outlineColor: `${DefaultPalette.white} !important`\n },\n // added !important to avoid override by FluentUI button styles\n '@media (forced-colors: active)': {\n border: '1px solid',\n borderColor: theme.palette.black\n }\n },\n rootCheckedHovered: {\n background: theme.semanticColors.primaryButtonBackgroundHovered,\n color: theme.semanticColors.primaryButtonTextHovered,\n ':focus::after': {\n outlineColor: `${DefaultPalette.white} !important`\n },\n // added !important to avoid override by FluentUI button styles\n '@media (forced-colors: active)': {\n border: '1px solid',\n borderColor: theme.palette.black\n }\n },\n rootCheckedPressed: {\n background: theme.semanticColors.primaryButtonBackgroundPressed,\n color: theme.semanticColors.primaryButtonTextPressed\n },\n labelChecked: {\n color: theme.semanticColors.primaryButtonText\n }\n});"]}
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import { IStyle } from '@fluentui/react';
3
3
  import { BaseCustomStyles } from '../types';
4
- import { AttachmentMetadataInProgress, MessageOptions } from "../../../acs-ui-common/src";
5
- import { MentionLookupOptions } from './MentionPopover';
6
4
  /**
7
5
  * Fluent styles for {@link Sendbox}.
8
6
  *
@@ -38,26 +36,6 @@ export interface SendBoxStrings {
38
36
  * Aria label for send message button
39
37
  */
40
38
  sendButtonAriaLabel: string;
41
- /**
42
- * Error message indicating that all attachment uploads are not complete.
43
- */
44
- attachmentUploadsPendingError: string;
45
- /**
46
- * Aria label to notify user when focus is on cancel attachment upload button.
47
- */
48
- removeAttachment: string;
49
- /**
50
- * Aria label to notify user attachment uploading starts.
51
- */
52
- uploading: string;
53
- /**
54
- * Aria label to notify user attachment is uploaded.
55
- */
56
- uploadCompleted: string;
57
- /**
58
- * Aria label to notify user more attachment action menu.
59
- */
60
- attachmentMoreMenu: string;
61
39
  }
62
40
  /**
63
41
  * Props for {@link SendBox}.
@@ -77,12 +55,7 @@ export interface SendBoxProps {
77
55
  /**
78
56
  * Optional override behavior on send button click
79
57
  */
80
- onSendMessage?: (content: string, options?: MessageOptions) => Promise<void>;
81
- /**
82
- * Optional props needed to lookup suggestions in the mention scenario.
83
- * @beta
84
- */
85
- mentionLookupOptions?: MentionLookupOptions;
58
+ onSendMessage?: (content: string) => Promise<void>;
86
59
  /**
87
60
  * Optional callback called when user is typing
88
61
  */
@@ -119,25 +92,6 @@ export interface SendBoxProps {
119
92
  * When undefined nothing has focus on render
120
93
  */
121
94
  autoFocus?: 'sendBoxTextField';
122
- /**
123
- * Optional callback to render uploaded attachments in the SendBox. The sendBox will expand
124
- * vertically to accommodate the uploaded attachments. Attachment uploads will
125
- * be rendered below the text area in sendBox.
126
- * @beta
127
- */
128
- onRenderAttachmentUploads?: () => JSX.Element;
129
- /**
130
- * Optional array of type {@link AttachmentMetadataInProgress}
131
- * to render attachments being uploaded in the SendBox.
132
- * @beta
133
- */
134
- attachments?: AttachmentMetadataInProgress[];
135
- /**
136
- * Optional callback to remove the attachment upload before sending by clicking on
137
- * cancel icon.
138
- * @beta
139
- */
140
- onCancelAttachmentUpload?: (attachmentId: string) => void;
141
95
  }
142
96
  /**
143
97
  * Component for typing and sending messages.
@@ -3,18 +3,12 @@
3
3
  import React, { useState, useMemo, useCallback } from 'react';
4
4
  import { mergeStyles, concatStyleSets, Icon, Stack } from '@fluentui/react';
5
5
  import { sendButtonStyle, sendIconStyle, sendBoxWrapperStyles, borderAndBoxShadowStyle } from './styles/SendBox.styles';
6
- import { useV9CustomStyles } from './styles/SendBox.styles';
7
6
  import { useTheme } from '../theming';
8
7
  import { useLocale } from '../localization';
9
8
  import { useIdentifiers } from '../identifiers';
10
9
  import { InputBoxComponent } from './InputBoxComponent';
11
10
  import { InputBoxButton } from './InputBoxButton';
12
- import { SendBoxErrors } from './SendBoxErrors';
13
- import { _AttachmentUploadCards } from './Attachment/AttachmentUploadCards';
14
- import { attachmentUploadCardsStyles } from './styles/SendBox.styles';
15
- import { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads, toAttachmentMetadata } from './utils/SendBoxUtils';
16
11
  import { MAXIMUM_LENGTH_OF_MESSAGE, isMessageTooLong, sanitizeText, isSendBoxButtonDisabled } from './utils/SendBoxUtils';
17
- import { FluentV9ThemeProvider } from '../theming/FluentV9ThemeProvider';
18
12
  /**
19
13
  * Component for typing and sending messages.
20
14
  *
@@ -24,7 +18,7 @@ import { FluentV9ThemeProvider } from '../theming/FluentV9ThemeProvider';
24
18
  * @public
25
19
  */
26
20
  export const SendBox = (props) => {
27
- const { disabled, systemMessage, supportNewline, onSendMessage, onTyping, onRenderIcon, onRenderSystemMessage, styles, autoFocus, mentionLookupOptions, attachments } = props;
21
+ const { disabled, systemMessage, supportNewline, onSendMessage, onTyping, onRenderIcon, onRenderSystemMessage, styles, autoFocus } = props;
28
22
  const theme = useTheme();
29
23
  const localeStrings = useLocale().strings.sendBox;
30
24
  const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
@@ -32,8 +26,6 @@ export const SendBox = (props) => {
32
26
  const [textValue, setTextValue] = useState('');
33
27
  const [textValueOverflow, setTextValueOverflow] = useState(false);
34
28
  const sendTextFieldRef = React.useRef(null);
35
- const customV9Styles = useV9CustomStyles();
36
- const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState(undefined);
37
29
  const sendMessageOnClick = () => {
38
30
  var _a;
39
31
  // don't send a message when disabled
@@ -41,22 +33,11 @@ export const SendBox = (props) => {
41
33
  return;
42
34
  }
43
35
  // Don't send message until all attachments have been uploaded successfully
44
- setAttachmentUploadsPendingError(undefined);
45
- if (hasIncompleteAttachmentUploads(attachments)) {
46
- setAttachmentUploadsPendingError({
47
- message: strings.attachmentUploadsPendingError,
48
- timestamp: Date.now()
49
- });
50
- return;
51
- }
52
36
  const message = textValue;
53
37
  // we don't want to send empty messages including spaces, newlines, tabs
54
38
  // Message can be empty if there is a valid attachment upload
55
- if (sanitizeText(message).length > 0 || isAttachmentUploadCompleted(attachments)) {
56
- onSendMessage && onSendMessage(message, {
57
- attachments: toAttachmentMetadata(attachments),
58
- type: 'text'
59
- });
39
+ if (sanitizeText(message).length > 0) {
40
+ onSendMessage && onSendMessage(message);
60
41
  setTextValue('');
61
42
  (_a = sendTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
62
43
  }
@@ -73,11 +54,10 @@ export const SendBox = (props) => {
73
54
  const isSendBoxButtonDisabledValue = useMemo(() => {
74
55
  return isSendBoxButtonDisabled({
75
56
  hasContent: sanitizeText(textValue).length > 0,
76
- hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),
77
57
  hasError: !!errorMessage,
78
58
  disabled: !!disabled
79
59
  });
80
- }, [attachments, disabled, errorMessage, textValue]);
60
+ }, [disabled, errorMessage, textValue]);
81
61
  const mergedSendButtonStyle = useMemo(() => mergeStyles(sendButtonStyle, styles === null || styles === void 0 ? void 0 : styles.sendMessageIconContainer), [styles === null || styles === void 0 ? void 0 : styles.sendMessageIconContainer]);
82
62
  const mergedStyles = useMemo(() => concatStyleSets(styles), [styles]);
83
63
  const mergedSendIconStyle = useMemo(() => sendIconStyle({
@@ -87,40 +67,10 @@ export const SendBox = (props) => {
87
67
  }), [theme, isSendBoxButtonDisabledValue, styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon]);
88
68
  const onRenderSendIcon = useCallback((isHover) => onRenderIcon ? onRenderIcon(isHover) : React.createElement(Icon, { iconName: isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend', className: mergedSendIconStyle }), [mergedSendIconStyle, onRenderIcon, textValue]);
89
69
  // Ensure that errors are cleared when there are no attachments in sendBox
90
- React.useEffect(() => {
91
- if (!(attachments === null || attachments === void 0 ? void 0 : attachments.filter(upload => !upload.error).length)) {
92
- setAttachmentUploadsPendingError(undefined);
93
- }
94
- }, [attachments]);
95
- const sendBoxErrorsProps = useMemo(() => {
96
- var _a;
97
- return {
98
- attachmentUploadsPendingError: attachmentUploadsPendingError,
99
- attachmentProgressError: (_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter(attachmentUpload => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error
100
- };
101
- }, [attachments, attachmentUploadsPendingError]);
102
- const onRenderAttachmentUploads = useCallback(() => {
103
- var _a, _b, _c, _d, _e, _f, _g, _h;
104
- if (!(attachments === null || attachments === void 0 ? void 0 : attachments.filter(upload => !upload.error).length)) {
105
- return null;
106
- }
107
- return props.onRenderAttachmentUploads ? props.onRenderAttachmentUploads() : React.createElement(Stack, { className: attachmentUploadCardsStyles },
108
- React.createElement(FluentV9ThemeProvider, { v8Theme: theme, className: customV9Styles.clearBackground },
109
- React.createElement(_AttachmentUploadCards, { attachments: attachments, onCancelAttachmentUpload: props.onCancelAttachmentUpload, strings: {
110
- removeAttachment: (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.removeAttachment) !== null && _b !== void 0 ? _b : localeStrings.removeAttachment,
111
- uploading: (_d = (_c = props.strings) === null || _c === void 0 ? void 0 : _c.uploading) !== null && _d !== void 0 ? _d : localeStrings.uploading,
112
- uploadCompleted: (_f = (_e = props.strings) === null || _e === void 0 ? void 0 : _e.uploadCompleted) !== null && _f !== void 0 ? _f : localeStrings.uploadCompleted,
113
- attachmentMoreMenu: (_h = (_g = props.strings) === null || _g === void 0 ? void 0 : _g.attachmentMoreMenu) !== null && _h !== void 0 ? _h : localeStrings.attachmentMoreMenu
114
- }, disabled: disabled })));
115
- }, [attachments, props, theme, customV9Styles.clearBackground, localeStrings.removeAttachment, localeStrings.uploading, localeStrings.uploadCompleted, localeStrings.attachmentMoreMenu, disabled]);
116
70
  return React.createElement(Stack, { className: mergeStyles(sendBoxWrapperStyles, {
117
71
  overflow: 'visible'
118
72
  } // This is needed for the mention popup to be visible
119
73
  ) },
120
- React.createElement(SendBoxErrors, { attachmentProgressError: sendBoxErrorsProps.attachmentProgressError ? {
121
- message: sendBoxErrorsProps.attachmentProgressError.message,
122
- timestamp: Date.now()
123
- } : undefined, attachmentUploadsPendingError: sendBoxErrorsProps.attachmentUploadsPendingError }),
124
74
  React.createElement(Stack, { className: borderAndBoxShadowStyle({
125
75
  theme,
126
76
  hasErrorMessage: !!errorMessage,
@@ -133,13 +83,12 @@ export const SendBox = (props) => {
133
83
  }
134
84
  }, onEnterKeyDown: () => {
135
85
  sendMessageOnClick();
136
- }, styles: mergedStyles, supportNewline: supportNewline, maxLength: MAXIMUM_LENGTH_OF_MESSAGE, mentionLookupOptions: mentionLookupOptions },
86
+ }, styles: mergedStyles, supportNewline: supportNewline, maxLength: MAXIMUM_LENGTH_OF_MESSAGE },
137
87
  React.createElement(InputBoxButton, { onRenderIcon: onRenderSendIcon, onClick: e => {
138
88
  if (!textValueOverflow) {
139
89
  sendMessageOnClick();
140
90
  }
141
91
  e.stopPropagation();
142
- }, id: 'sendIconWrapper', className: mergedSendButtonStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel, disabled: isSendBoxButtonDisabledValue })),
143
- onRenderAttachmentUploads()));
92
+ }, id: 'sendIconWrapper', className: mergedSendButtonStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel, disabled: isSendBoxButtonDisabledValue }))));
144
93
  };
145
94
  //# sourceMappingURL=SendBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SendBox.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/SendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAsB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACxH,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM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AAqB,EAAE,SAAS,EAAE,aAAa,CAAC,mBAAmB,EAAE,cAAc,EAAE,aAAa,CAAC,mBAAmB,EAAE,QAAQ,EAAE,4BAA4B,GAAI,CACnL;YACnB,yBAAyB,EAAE,CACtB,CACF,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, useMemo, useCallback } from 'react';\nimport { IStyle, ITextField, mergeStyles, concatStyleSets, Icon, Stack } from '@fluentui/react';\nimport { sendButtonStyle, sendIconStyle, sendBoxWrapperStyles, borderAndBoxShadowStyle } from './styles/SendBox.styles';\nimport { useV9CustomStyles } from './styles/SendBox.styles';\nimport { BaseCustomStyles } from '../types';\nimport { useTheme } from '../theming';\nimport { useLocale } from '../localization';\nimport { useIdentifiers } from '../identifiers';\nimport { InputBoxComponent } from './InputBoxComponent';\nimport { InputBoxButton } from './InputBoxButton';\nimport { SendBoxErrors } from './SendBoxErrors';\nimport { _AttachmentUploadCards } from './Attachment/AttachmentUploadCards';\nimport { AttachmentMetadataInProgress, MessageOptions } from '@internal/acs-ui-common';\nimport { attachmentUploadCardsStyles } from './styles/SendBox.styles';\nimport { SendBoxErrorBarError } from './SendBoxErrorBar';\nimport { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads, toAttachmentMetadata } from './utils/SendBoxUtils';\nimport { MAXIMUM_LENGTH_OF_MESSAGE, isMessageTooLong, sanitizeText, isSendBoxButtonDisabled } from './utils/SendBoxUtils';\nimport { MentionLookupOptions } from './MentionPopover';\nimport { FluentV9ThemeProvider } from '../theming/FluentV9ThemeProvider';\n\n/**\n * Fluent styles for {@link Sendbox}.\n *\n * @public\n */\nexport interface SendBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n /** styles for the text field container */\n textFieldContainer?: IStyle;\n /** Styles for the container of the send message icon. */\n sendMessageIconContainer?: IStyle;\n /** Styles for the send message icon; These styles will be ignored when a custom send message icon is provided. */\n sendMessageIcon?: IStyle;\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n}\n\n/**\n * Strings of {@link SendBox} that can be overridden.\n *\n * @public\n */\nexport interface SendBoxStrings {\n /**\n * Placeholder text in SendBox when there is no user input\n */\n placeholderText: string;\n /**\n * The warning message when send box text length is more than max limit\n */\n textTooLong: string;\n /**\n * Aria label for send message button\n */\n sendButtonAriaLabel: string;\n /**\n * Error message indicating that all attachment uploads are not complete.\n */\n attachmentUploadsPendingError: string;\n /**\n * Aria label to notify user when focus is on cancel attachment upload button.\n */\n removeAttachment: string;\n /**\n * Aria label to notify user attachment uploading starts.\n */\n uploading: string;\n /**\n * Aria label to notify user attachment is uploaded.\n */\n uploadCompleted: string;\n /**\n * Aria label to notify user more attachment action menu.\n */\n attachmentMoreMenu: string;\n}\n\n/**\n * Props for {@link SendBox}.\n *\n * @public\n */\nexport interface SendBoxProps {\n /**\n * Optional boolean to disable text box\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Optional text for system message below text box\n */\n systemMessage?: string;\n /**\n * Optional override behavior on send button click\n */\n onSendMessage?: (content: string, options?: MessageOptions) => Promise<void>;\n /**\n * Optional props needed to lookup suggestions in the mention scenario.\n * @beta\n */\n mentionLookupOptions?: MentionLookupOptions;\n\n /**\n * Optional callback called when user is typing\n */\n onTyping?: () => Promise<void>;\n /**\n * Optional callback to render system message below the SendBox.\n * @defaultValue MessageBar\n */\n onRenderSystemMessage?: (systemMessage: string | undefined) => React.ReactElement;\n /**\n * Optional boolean to support new line in SendBox.\n * @defaultValue false\n */\n supportNewline?: boolean;\n /**\n * Optional callback to render send button icon to the right of the SendBox.\n * @defaultValue SendBoxSendHovered icon when mouse over icon and SendBoxSend icon otherwise\n */\n onRenderIcon?: (isHover: boolean) => JSX.Element;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <SendBox styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: SendBoxStylesProps;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<SendBoxStrings>;\n /**\n * enumerable to determine if the input box has focus on render or not.\n * When undefined nothing has focus on render\n */\n autoFocus?: 'sendBoxTextField';\n /**\n * Optional callback to render uploaded attachments in the SendBox. The sendBox will expand\n * vertically to accommodate the uploaded attachments. Attachment uploads will\n * be rendered below the text area in sendBox.\n * @beta\n */\n onRenderAttachmentUploads?: () => JSX.Element;\n /**\n * Optional array of type {@link AttachmentMetadataInProgress}\n * to render attachments being uploaded in the SendBox.\n * @beta\n */\n attachments?: AttachmentMetadataInProgress[];\n /**\n * Optional callback to remove the attachment upload before sending by clicking on\n * cancel icon.\n * @beta\n */\n onCancelAttachmentUpload?: (attachmentId: string) => void;\n}\n\n/**\n * Component for typing and sending messages.\n *\n * Supports sending typing notification when user starts entering text.\n * Supports an optional message below the text input field.\n *\n * @public\n */\nexport const SendBox = (props: SendBoxProps): JSX.Element => {\n const {\n disabled,\n systemMessage,\n supportNewline,\n onSendMessage,\n onTyping,\n onRenderIcon,\n onRenderSystemMessage,\n styles,\n autoFocus,\n mentionLookupOptions,\n attachments\n } = props;\n const theme = useTheme();\n const localeStrings = useLocale().strings.sendBox;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const ids = useIdentifiers();\n const [textValue, setTextValue] = useState('');\n const [textValueOverflow, setTextValueOverflow] = useState(false);\n const sendTextFieldRef = React.useRef<ITextField>(null);\n const customV9Styles = useV9CustomStyles();\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(undefined);\n const sendMessageOnClick = (): void => {\n // don't send a message when disabled\n if (disabled || textValueOverflow) {\n return;\n }\n\n // Don't send message until all attachments have been uploaded successfully\n setAttachmentUploadsPendingError(undefined);\n if (hasIncompleteAttachmentUploads(attachments)) {\n setAttachmentUploadsPendingError({\n message: strings.attachmentUploadsPendingError,\n timestamp: Date.now()\n });\n return;\n }\n const message = textValue;\n // we don't want to send empty messages including spaces, newlines, tabs\n // Message can be empty if there is a valid attachment upload\n if (sanitizeText(message).length > 0 || isAttachmentUploadCompleted(attachments)) {\n onSendMessage && onSendMessage(message, {\n attachments: toAttachmentMetadata(attachments),\n type: 'text'\n });\n setTextValue('');\n sendTextFieldRef.current?.focus();\n }\n };\n const setText = (newValue?: string | undefined): void => {\n if (newValue === undefined) {\n return;\n }\n setTextValueOverflow(isMessageTooLong(newValue.length));\n setTextValue(newValue);\n };\n const textTooLongMessage = textValueOverflow ? strings.textTooLong : undefined;\n const errorMessage = systemMessage ?? textTooLongMessage;\n const isSendBoxButtonDisabledValue = useMemo(() => {\n return isSendBoxButtonDisabled({\n hasContent: sanitizeText(textValue).length > 0,\n hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),\n hasError: !!errorMessage,\n disabled: !!disabled\n });\n }, [attachments, disabled, errorMessage, textValue]);\n const mergedSendButtonStyle = useMemo(() => mergeStyles(sendButtonStyle, styles?.sendMessageIconContainer), [styles?.sendMessageIconContainer]);\n const mergedStyles = useMemo(() => concatStyleSets(styles), [styles]);\n const mergedSendIconStyle = useMemo(() => sendIconStyle({\n theme,\n isSendBoxButtonDisabled: isSendBoxButtonDisabledValue,\n customSendIconStyle: styles?.sendMessageIcon\n }), [theme, isSendBoxButtonDisabledValue, styles?.sendMessageIcon]);\n const onRenderSendIcon = useCallback((isHover: boolean) => onRenderIcon ? onRenderIcon(isHover) : <Icon iconName={isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend'} className={mergedSendIconStyle} />, [mergedSendIconStyle, onRenderIcon, textValue]);\n\n // Ensure that errors are cleared when there are no attachments in sendBox\n React.useEffect(() => {\n if (!attachments?.filter(upload => !upload.error).length) {\n setAttachmentUploadsPendingError(undefined);\n }\n }, [attachments]);\n const sendBoxErrorsProps = useMemo(() => {\n return {\n attachmentUploadsPendingError: attachmentUploadsPendingError,\n attachmentProgressError: attachments?.filter(attachmentUpload => attachmentUpload.error).pop()?.error\n };\n }, [attachments, attachmentUploadsPendingError]);\n const onRenderAttachmentUploads = useCallback(() => {\n if (!attachments?.filter(upload => !upload.error).length) {\n return null;\n }\n return props.onRenderAttachmentUploads ? props.onRenderAttachmentUploads() : <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme} className={customV9Styles.clearBackground}>\n <_AttachmentUploadCards attachments={attachments} onCancelAttachmentUpload={props.onCancelAttachmentUpload} strings={{\n removeAttachment: props.strings?.removeAttachment ?? localeStrings.removeAttachment,\n uploading: props.strings?.uploading ?? localeStrings.uploading,\n uploadCompleted: props.strings?.uploadCompleted ?? localeStrings.uploadCompleted,\n attachmentMoreMenu: props.strings?.attachmentMoreMenu ?? localeStrings.attachmentMoreMenu\n }} disabled={disabled} />\n </FluentV9ThemeProvider>\n </Stack>;\n }, [attachments, props, theme, customV9Styles.clearBackground, localeStrings.removeAttachment, localeStrings.uploading, localeStrings.uploadCompleted, localeStrings.attachmentMoreMenu, disabled]);\n return <Stack className={mergeStyles(sendBoxWrapperStyles, {\n overflow: 'visible'\n } // This is needed for the mention popup to be visible\n )}>\n {<SendBoxErrors attachmentProgressError={sendBoxErrorsProps.attachmentProgressError ? {\n message: sendBoxErrorsProps.attachmentProgressError.message,\n timestamp: Date.now()\n } : undefined} attachmentUploadsPendingError={sendBoxErrorsProps.attachmentUploadsPendingError} />}\n <Stack className={borderAndBoxShadowStyle({\n theme,\n hasErrorMessage: !!errorMessage,\n disabled: !!disabled\n })}>\n <InputBoxComponent autoFocus={autoFocus} data-ui-id={ids.sendboxTextField} disabled={disabled} errorMessage={onRenderSystemMessage ? onRenderSystemMessage(errorMessage) : errorMessage} textFieldRef={sendTextFieldRef} id=\"sendbox\" placeholderText={strings.placeholderText} textValue={textValue} onChange={(_, newValue) => setText(newValue)} onKeyDown={ev => {\n const keyWasSendingMessage = ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline);\n if (!keyWasSendingMessage) {\n onTyping?.();\n }\n }} onEnterKeyDown={() => {\n sendMessageOnClick();\n }} styles={mergedStyles} supportNewline={supportNewline} maxLength={MAXIMUM_LENGTH_OF_MESSAGE} mentionLookupOptions={mentionLookupOptions}>\n <InputBoxButton onRenderIcon={onRenderSendIcon} onClick={e => {\n if (!textValueOverflow) {\n sendMessageOnClick();\n }\n e.stopPropagation();\n }} id={'sendIconWrapper'} className={mergedSendButtonStyle} ariaLabel={localeStrings.sendButtonAriaLabel} tooltipContent={localeStrings.sendButtonAriaLabel} disabled={isSendBoxButtonDisabledValue} />\n </InputBoxComponent>\n {onRenderAttachmentUploads()}\n </Stack>\n </Stack>;\n};"]}
1
+ {"version":3,"file":"SendBox.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/SendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAsB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAExH,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAgG1H;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAe,EAAE;IAC1D,MAAM,EACJ,QAAQ,EACR,aAAa,EACb,cAAc,EACd,aAAa,EACb,QAAQ,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EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,yBAAyB;gBACzF,oBAAC,cAAc,IAAC,YAAY,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;wBAC7D,IAAI,CAAC,iBAAiB,EAAE,CAAC;4BACvB,kBAAkB,EAAE,CAAC;wBACvB,CAAC;wBACD,CAAC,CAAC,eAAe,EAAE,CAAC;oBACtB,CAAC,EAAE,EAAE,EAAE,iBAAiB,EAAE,SAAS,EAAE,qBAAqB,EAAE,SAAS,EAAE,aAAa,CAAC,mBAAmB,EAAE,cAAc,EAAE,aAAa,CAAC,mBAAmB,EAAE,QAAQ,EAAE,4BAA4B,GAAI,CACnL,CAEd,CACF,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, useMemo, useCallback } from 'react';\nimport { IStyle, ITextField, mergeStyles, concatStyleSets, Icon, Stack } from '@fluentui/react';\nimport { sendButtonStyle, sendIconStyle, sendBoxWrapperStyles, borderAndBoxShadowStyle } from './styles/SendBox.styles';\nimport { BaseCustomStyles } from '../types';\nimport { useTheme } from '../theming';\nimport { useLocale } from '../localization';\nimport { useIdentifiers } from '../identifiers';\nimport { InputBoxComponent } from './InputBoxComponent';\nimport { InputBoxButton } from './InputBoxButton';\nimport { MAXIMUM_LENGTH_OF_MESSAGE, isMessageTooLong, sanitizeText, isSendBoxButtonDisabled } from './utils/SendBoxUtils';\n/**\n * Fluent styles for {@link Sendbox}.\n *\n * @public\n */\nexport interface SendBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n /** styles for the text field container */\n textFieldContainer?: IStyle;\n /** Styles for the container of the send message icon. */\n sendMessageIconContainer?: IStyle;\n /** Styles for the send message icon; These styles will be ignored when a custom send message icon is provided. */\n sendMessageIcon?: IStyle;\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n}\n\n/**\n * Strings of {@link SendBox} that can be overridden.\n *\n * @public\n */\nexport interface SendBoxStrings {\n /**\n * Placeholder text in SendBox when there is no user input\n */\n placeholderText: string;\n /**\n * The warning message when send box text length is more than max limit\n */\n textTooLong: string;\n /**\n * Aria label for send message button\n */\n sendButtonAriaLabel: string;\n}\n\n/**\n * Props for {@link SendBox}.\n *\n * @public\n */\nexport interface SendBoxProps {\n /**\n * Optional boolean to disable text box\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Optional text for system message below text box\n */\n systemMessage?: string;\n /**\n * Optional override behavior on send button click\n */\n onSendMessage?: (content: string) => Promise<void>;\n /**\n * Optional callback called when user is typing\n */\n onTyping?: () => Promise<void>;\n /**\n * Optional callback to render system message below the SendBox.\n * @defaultValue MessageBar\n */\n onRenderSystemMessage?: (systemMessage: string | undefined) => React.ReactElement;\n /**\n * Optional boolean to support new line in SendBox.\n * @defaultValue false\n */\n supportNewline?: boolean;\n /**\n * Optional callback to render send button icon to the right of the SendBox.\n * @defaultValue SendBoxSendHovered icon when mouse over icon and SendBoxSend icon otherwise\n */\n onRenderIcon?: (isHover: boolean) => JSX.Element;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <SendBox styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: SendBoxStylesProps;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<SendBoxStrings>;\n /**\n * enumerable to determine if the input box has focus on render or not.\n * When undefined nothing has focus on render\n */\n autoFocus?: 'sendBoxTextField';\n}\n\n/**\n * Component for typing and sending messages.\n *\n * Supports sending typing notification when user starts entering text.\n * Supports an optional message below the text input field.\n *\n * @public\n */\nexport const SendBox = (props: SendBoxProps): JSX.Element => {\n const {\n disabled,\n systemMessage,\n supportNewline,\n onSendMessage,\n onTyping,\n onRenderIcon,\n onRenderSystemMessage,\n styles,\n autoFocus\n } = props;\n const theme = useTheme();\n const localeStrings = useLocale().strings.sendBox;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const ids = useIdentifiers();\n const [textValue, setTextValue] = useState('');\n const [textValueOverflow, setTextValueOverflow] = useState(false);\n const sendTextFieldRef = React.useRef<ITextField>(null);\n const sendMessageOnClick = (): void => {\n // don't send a message when disabled\n if (disabled || textValueOverflow) {\n return;\n }\n\n // Don't send message until all attachments have been uploaded successfully\n const message = textValue;\n // we don't want to send empty messages including spaces, newlines, tabs\n // Message can be empty if there is a valid attachment upload\n if (sanitizeText(message).length > 0) {\n onSendMessage && onSendMessage(message);\n setTextValue('');\n sendTextFieldRef.current?.focus();\n }\n };\n const setText = (newValue?: string | undefined): void => {\n if (newValue === undefined) {\n return;\n }\n setTextValueOverflow(isMessageTooLong(newValue.length));\n setTextValue(newValue);\n };\n const textTooLongMessage = textValueOverflow ? strings.textTooLong : undefined;\n const errorMessage = systemMessage ?? textTooLongMessage;\n const isSendBoxButtonDisabledValue = useMemo(() => {\n return isSendBoxButtonDisabled({\n hasContent: sanitizeText(textValue).length > 0,\n hasError: !!errorMessage,\n disabled: !!disabled\n });\n }, [disabled, errorMessage, textValue]);\n const mergedSendButtonStyle = useMemo(() => mergeStyles(sendButtonStyle, styles?.sendMessageIconContainer), [styles?.sendMessageIconContainer]);\n const mergedStyles = useMemo(() => concatStyleSets(styles), [styles]);\n const mergedSendIconStyle = useMemo(() => sendIconStyle({\n theme,\n isSendBoxButtonDisabled: isSendBoxButtonDisabledValue,\n customSendIconStyle: styles?.sendMessageIcon\n }), [theme, isSendBoxButtonDisabledValue, styles?.sendMessageIcon]);\n const onRenderSendIcon = useCallback((isHover: boolean) => onRenderIcon ? onRenderIcon(isHover) : <Icon iconName={isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend'} className={mergedSendIconStyle} />, [mergedSendIconStyle, onRenderIcon, textValue]);\n\n // Ensure that errors are cleared when there are no attachments in sendBox\n return <Stack className={mergeStyles(sendBoxWrapperStyles, {\n overflow: 'visible'\n } // This is needed for the mention popup to be visible\n )}>\n {}\n <Stack className={borderAndBoxShadowStyle({\n theme,\n hasErrorMessage: !!errorMessage,\n disabled: !!disabled\n })}>\n <InputBoxComponent autoFocus={autoFocus} data-ui-id={ids.sendboxTextField} disabled={disabled} errorMessage={onRenderSystemMessage ? onRenderSystemMessage(errorMessage) : errorMessage} textFieldRef={sendTextFieldRef} id=\"sendbox\" placeholderText={strings.placeholderText} textValue={textValue} onChange={(_, newValue) => setText(newValue)} onKeyDown={ev => {\n const keyWasSendingMessage = ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline);\n if (!keyWasSendingMessage) {\n onTyping?.();\n }\n }} onEnterKeyDown={() => {\n sendMessageOnClick();\n }} styles={mergedStyles} supportNewline={supportNewline} maxLength={MAXIMUM_LENGTH_OF_MESSAGE}>\n <InputBoxButton onRenderIcon={onRenderSendIcon} onClick={e => {\n if (!textValueOverflow) {\n sendMessageOnClick();\n }\n e.stopPropagation();\n }} id={'sendIconWrapper'} className={mergedSendButtonStyle} ariaLabel={localeStrings.sendButtonAriaLabel} tooltipContent={localeStrings.sendButtonAriaLabel} disabled={isSendBoxButtonDisabledValue} />\n </InputBoxComponent>\n {}\n </Stack>\n </Stack>;\n};"]}
@@ -9,7 +9,7 @@ import { videoEffectsItemContainerStyles } from './VideoEffectsItem.styles';
9
9
  * @internal
10
10
  */
11
11
  export const _VideoEffectsItem = (props) => {
12
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
12
+ var _a, _b, _c, _d, _e, _f, _g, _h;
13
13
  const theme = useTheme();
14
14
  const isSelected = (_a = props.isSelected) !== null && _a !== void 0 ? _a : false;
15
15
  const disabled = (_b = props.disabled) !== null && _b !== void 0 ? _b : false;
@@ -30,7 +30,7 @@ export const _VideoEffectsItem = (props) => {
30
30
  }), [backgroundImage, disabled, isSelected, theme]);
31
31
  return React.createElement(TooltipHost, Object.assign({}, props.tooltipProps),
32
32
  React.createElement(Stack, { key: props.itemKey, className: mergeStyles((_f = props.styles) === null || _f === void 0 ? void 0 : _f.root), verticalAlign: "center", horizontalAlign: "center", "data-ui-id": `video-effects-item` },
33
- React.createElement(DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: props.componentRef, ariaLabel: (_j = (_g = props.ariaLabel) !== null && _g !== void 0 ? _g : `${props.title}, ${(_h = props.tooltipProps) === null || _h === void 0 ? void 0 : _h.content}`) !== null && _j !== void 0 ? _j : props.itemKey, "aria-disabled": props.disabled, role: "radio", "aria-checked": isSelected },
33
+ React.createElement(DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: props.componentRef, ariaLabel: (_g = props.ariaLabel) !== null && _g !== void 0 ? _g : `${props.title}, ${(_h = props.tooltipProps) === null || _h === void 0 ? void 0 : _h.content}`, "aria-disabled": props.disabled, role: "radio", "aria-checked": isSelected },
34
34
  React.createElement(Stack, { horizontalAlign: 'center', className: mergeStyles({
35
35
  width: '100%'
36
36
  }) },
@@ -1 +1 @@
1
- {"version":3,"file":"VideoEffectsItem.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/VideoEffects/VideoEffectsItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAW,IAAI,EAAyC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvJ,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAqG5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,MAAA,KAAK,CAAC,UAAU,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AAK,MAAA,KAAK,CAAC,YAAY,0CAAE,OAAiB,EAAE,mCAAI,KAAK,CAAC,OAAO,mBAAiB,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAC,OAAO,kBAAe,UAAU;gBAC5V,oBAAC,KAAK,IAAC,eAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC;wBACzD,KAAK,EAAE,MAAM;qBACd,CAAC;oBACG,KAAK,CAAC,SAAS,IAAI,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB;wBAC1D,oBAAC,IAAI,oBAAK,KAAK,CAAC,SAAS,EAAI,CAClB;oBACd,KAAK,CAAC,KAAK,IAAI,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB;wBACtD,oBAAC,IAAI,IAAC,OAAO,EAAC,OAAO,EAAC,MAAM,EAAE;gCAChC,IAAI,EAAE;oCACJ,UAAU,EAAE,QAAQ;oCACpB,QAAQ,EAAE,QAAQ;oCAClB,YAAY,EAAE,UAAU;iCACzB;6BACF,IACM,KAAK,CAAC,KAAK,CACP,CACI,CACT,CACM,CACV,CACI,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DefaultButton, IButton, Icon, IIconProps, IStyle, ITooltipHostProps, mergeStyles, Stack, Text, TooltipHost, useTheme } from '@fluentui/react';\nimport React, { useCallback } from 'react';\nimport { videoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemProps {\n /**\n * The key of the Video Background Effect.\n * This is used to identify the Video Background Effect and is returned in the onChange event.\n * It must be unique within the set of options.\n * @example 'blur'\n */\n itemKey: string;\n\n /**\n * The text to display for the Video effects item.\n */\n title?: string;\n\n /**\n * Whether the Video effects item is currently in the selected state.\n * @default false\n */\n isSelected?: boolean;\n\n /**\n * Callback to invoke when the Video effects item is selected.\n */\n onSelect?: (key: string) => void;\n\n /**\n * Whether the Video effects item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * The icon to display for the Video effects item.\n * @default undefined (no icon)\n */\n iconProps?: IIconProps;\n\n /**\n * Properties to have a Tooltip display when hovering over the Video effects item.\n * @default undefined (no tooltip)\n */\n tooltipProps?: ITooltipHostProps;\n\n /**\n * Aria label for the Video effects item.\n */\n ariaLabel?: string;\n\n /**\n * Background to display for the Video effects item.\n * @default undefined (no background image)\n */\n backgroundProps?: {\n /**\n * The URL of the background image.\n */\n url: string;\n };\n\n /**\n * Styles for the Video effects item.\n */\n styles?: _VideoEffectsItemStyles;\n\n /**\n * Imperative handle for calling focus()\n */\n componentRef?: React.RefObject<{\n focus: () => void;\n }>;\n}\n\n/**\n * Styles for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemStyles {\n /**\n * Styles for the container of the Video effects item.\n */\n root: IStyle;\n\n /**\n * Styles for the container of the icon of the Video effects item.\n */\n iconContainer: IStyle;\n\n /**\n * Styles for the text container of the Video effects item.\n */\n textContainer: IStyle;\n}\n\n/**\n * A component for displaying a Video Background Effect Option.\n *\n * @internal\n */\nexport const _VideoEffectsItem = (props: _VideoEffectsItemProps): JSX.Element => {\n const theme = useTheme();\n const isSelected = props.isSelected ?? false;\n const disabled = props.disabled ?? false;\n const backgroundImage = props.backgroundProps?.url;\n const iconContainerStyles = mergeStyles({\n height: '1.25rem'\n }, props.styles?.iconContainer);\n const textContainerStyles = mergeStyles({\n height: '1.25rem',\n maxWidth: '4.5rem',\n overflow: 'hidden'\n }, props.styles?.textContainer);\n const containerStyles = useCallback(() => videoEffectsItemContainerStyles({\n theme,\n isSelected,\n disabled,\n backgroundImage\n }), [backgroundImage, disabled, isSelected, theme]);\n return <TooltipHost {...props.tooltipProps}>\n <Stack key={props.itemKey} className={mergeStyles(props.styles?.root)} verticalAlign=\"center\" horizontalAlign=\"center\" data-ui-id={`video-effects-item`}>\n <DefaultButton styles={containerStyles()} onClick={disabled ? undefined : () => props.onSelect?.(props.itemKey)} componentRef={props.componentRef as React.RefObject<IButton>} ariaLabel={props.ariaLabel ?? `${props.title}, ${props.tooltipProps?.content as string}` ?? props.itemKey} aria-disabled={props.disabled} role=\"radio\" aria-checked={isSelected}>\n <Stack horizontalAlign={'center'} className={mergeStyles({\n width: '100%'\n })}>\n {props.iconProps && <Stack.Item className={iconContainerStyles}>\n <Icon {...props.iconProps} />\n </Stack.Item>}\n {props.title && <Stack.Item className={textContainerStyles}>\n <Text variant=\"small\" styles={{\n root: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n }}>\n {props.title}\n </Text>\n </Stack.Item>}\n </Stack>\n </DefaultButton>\n </Stack>\n </TooltipHost>;\n};"]}
1
+ {"version":3,"file":"VideoEffectsItem.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/VideoEffects/VideoEffectsItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAW,IAAI,EAAyC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvJ,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAqG5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,MAAA,KAAK,CAAC,UAAU,mCAAI,KAAK,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK,CAAC;IACzC,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,eAAe,0CAAE,GAAG,CAAC;IACnD,MAAM,mBAAmB,GAA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AC;wBACzD,KAAK,EAAE,MAAM;qBACd,CAAC;oBACG,KAAK,CAAC,SAAS,IAAI,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB;wBAC1D,oBAAC,IAAI,oBAAK,KAAK,CAAC,SAAS,EAAI,CAClB;oBACd,KAAK,CAAC,KAAK,IAAI,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB;wBACtD,oBAAC,IAAI,IAAC,OAAO,EAAC,OAAO,EAAC,MAAM,EAAE;gCAChC,IAAI,EAAE;oCACJ,UAAU,EAAE,QAAQ;oCACpB,QAAQ,EAAE,QAAQ;oCAClB,YAAY,EAAE,UAAU;iCACzB;6BACF,IACM,KAAK,CAAC,KAAK,CACP,CACI,CACT,CACM,CACV,CACI,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DefaultButton, IButton, Icon, IIconProps, IStyle, ITooltipHostProps, mergeStyles, Stack, Text, TooltipHost, useTheme } from '@fluentui/react';\nimport React, { useCallback } from 'react';\nimport { videoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemProps {\n /**\n * The key of the Video Background Effect.\n * This is used to identify the Video Background Effect and is returned in the onChange event.\n * It must be unique within the set of options.\n * @example 'blur'\n */\n itemKey: string;\n\n /**\n * The text to display for the Video effects item.\n */\n title?: string;\n\n /**\n * Whether the Video effects item is currently in the selected state.\n * @default false\n */\n isSelected?: boolean;\n\n /**\n * Callback to invoke when the Video effects item is selected.\n */\n onSelect?: (key: string) => void;\n\n /**\n * Whether the Video effects item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * The icon to display for the Video effects item.\n * @default undefined (no icon)\n */\n iconProps?: IIconProps;\n\n /**\n * Properties to have a Tooltip display when hovering over the Video effects item.\n * @default undefined (no tooltip)\n */\n tooltipProps?: ITooltipHostProps;\n\n /**\n * Aria label for the Video effects item.\n */\n ariaLabel?: string;\n\n /**\n * Background to display for the Video effects item.\n * @default undefined (no background image)\n */\n backgroundProps?: {\n /**\n * The URL of the background image.\n */\n url: string;\n };\n\n /**\n * Styles for the Video effects item.\n */\n styles?: _VideoEffectsItemStyles;\n\n /**\n * Imperative handle for calling focus()\n */\n componentRef?: React.RefObject<{\n focus: () => void;\n }>;\n}\n\n/**\n * Styles for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemStyles {\n /**\n * Styles for the container of the Video effects item.\n */\n root: IStyle;\n\n /**\n * Styles for the container of the icon of the Video effects item.\n */\n iconContainer: IStyle;\n\n /**\n * Styles for the text container of the Video effects item.\n */\n textContainer: IStyle;\n}\n\n/**\n * A component for displaying a Video Background Effect Option.\n *\n * @internal\n */\nexport const _VideoEffectsItem = (props: _VideoEffectsItemProps): JSX.Element => {\n const theme = useTheme();\n const isSelected = props.isSelected ?? false;\n const disabled = props.disabled ?? false;\n const backgroundImage = props.backgroundProps?.url;\n const iconContainerStyles = mergeStyles({\n height: '1.25rem'\n }, props.styles?.iconContainer);\n const textContainerStyles = mergeStyles({\n height: '1.25rem',\n maxWidth: '4.5rem',\n overflow: 'hidden'\n }, props.styles?.textContainer);\n const containerStyles = useCallback(() => videoEffectsItemContainerStyles({\n theme,\n isSelected,\n disabled,\n backgroundImage\n }), [backgroundImage, disabled, isSelected, theme]);\n return <TooltipHost {...props.tooltipProps}>\n <Stack key={props.itemKey} className={mergeStyles(props.styles?.root)} verticalAlign=\"center\" horizontalAlign=\"center\" data-ui-id={`video-effects-item`}>\n <DefaultButton styles={containerStyles()} onClick={disabled ? undefined : () => props.onSelect?.(props.itemKey)} componentRef={props.componentRef as React.RefObject<IButton>} ariaLabel={props.ariaLabel ?? `${props.title}, ${props.tooltipProps?.content as string}`} aria-disabled={props.disabled} role=\"radio\" aria-checked={isSelected}>\n <Stack horizontalAlign={'center'} className={mergeStyles({\n width: '100%'\n })}>\n {props.iconProps && <Stack.Item className={iconContainerStyles}>\n <Icon {...props.iconProps} />\n </Stack.Item>}\n {props.title && <Stack.Item className={textContainerStyles}>\n <Text variant=\"small\" styles={{\n root: {\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n }\n }}>\n {props.title}\n </Text>\n </Stack.Item>}\n </Stack>\n </DefaultButton>\n </Stack>\n </TooltipHost>;\n};"]}