@azure/communication-react 1.22.0-beta.1 → 1.22.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 (577) hide show
  1. package/dist/communication-react.d.ts +348 -1690
  2. package/dist/dist-cjs/communication-react/index.js +36397 -172
  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/telemetryVersion.js +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -13
  15. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -11
  16. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +18 -18
  18. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +6 -6
  19. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -11
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -6
  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/createHandlers.js +1 -5
  24. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -19
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +3 -2
  28. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +8 -1
  29. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -3
  31. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +5 -34
  34. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  36. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  37. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -2
  40. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  42. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  43. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -79
  44. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  45. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -15
  46. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +2 -95
  47. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -5
  49. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -27
  50. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
  52. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  54. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  55. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  57. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  59. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  60. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  61. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  62. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  63. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  64. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
  65. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  66. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +3 -26
  67. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  68. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js +0 -6
  69. package/dist/dist-esm/chat-component-bindings/src/utils/compareMessages.js.map +1 -1
  70. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  71. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  72. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  73. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  74. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  75. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  76. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  77. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  78. package/dist/dist-esm/communication-react/src/index.d.ts +8 -29
  79. package/dist/dist-esm/communication-react/src/index.js +3 -6
  80. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  82. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  83. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/components/Caption.d.ts +2 -2
  85. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +42 -11
  87. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -3
  88. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +86 -17
  90. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +17 -6
  91. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  118. package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
  119. package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
  120. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +1 -1
  121. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  123. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  125. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  126. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  128. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  129. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +0 -20
  131. package/dist/dist-esm/react-components/src/components/NotificationStack.js +0 -5
  132. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  133. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  134. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  135. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +4 -0
  137. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js +1 -1
  138. package/dist/dist-esm/react-components/src/components/ParticipantsButton.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  140. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  142. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  143. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +10 -10
  145. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +6 -3
  146. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/SystemMessage.js +17 -6
  148. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  150. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  152. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  154. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  155. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  156. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -20
  158. package/dist/dist-esm/react-components/src/components/index.js +0 -7
  159. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  161. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  162. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +4 -4
  163. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +4 -2
  165. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +0 -13
  167. package/dist/dist-esm/react-components/src/components/styles/Common.style.js +0 -13
  168. package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  170. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  171. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  173. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  174. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  176. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  177. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  179. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  180. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  182. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  183. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  184. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  185. package/dist/dist-esm/react-components/src/components/utils.d.ts +2 -2
  186. package/dist/dist-esm/react-components/src/components/utils.js +6 -9
  187. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  188. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  189. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  190. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/index.d.ts +1 -2
  192. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  193. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +16 -55
  194. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  195. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +128 -2
  196. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +128 -2
  197. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +128 -2
  198. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +128 -2
  199. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +128 -2
  200. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +128 -2
  201. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +128 -2
  202. package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +128 -2
  203. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +128 -2
  204. package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +128 -2
  205. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +128 -2
  206. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +128 -2
  207. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +128 -2
  208. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +128 -2
  209. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +128 -2
  210. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +128 -2
  211. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +128 -2
  212. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +128 -2
  213. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +128 -2
  214. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +128 -2
  215. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +128 -2
  216. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +128 -2
  217. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +128 -2
  218. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +128 -2
  219. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -30
  220. package/dist/dist-esm/react-components/src/theming/icons.js +5 -96
  221. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  222. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  223. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  224. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  225. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  226. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +4 -4
  228. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -1
  229. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  230. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +8 -73
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +8 -21
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -34
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -47
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +7 -105
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -24
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +5 -11
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +1 -19
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -2
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -3
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -3
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -2
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +7 -5
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -40
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -18
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -16
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +2 -1
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +29 -10
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -59
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  288. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
  289. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -24
  290. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  291. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -8
  292. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  293. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -22
  294. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -136
  295. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -28
  297. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -2
  299. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -9
  300. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  302. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  303. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  304. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -11
  305. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -2
  306. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  307. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +0 -5
  308. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +0 -13
  309. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  311. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  312. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  313. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  314. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  315. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  320. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  321. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  322. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  324. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  326. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  328. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  329. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +1 -13
  331. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
  332. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +8 -3
  334. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -1
  335. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.d.ts → CallingCaptionsBanner.d.ts} +2 -2
  336. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.js → CallingCaptionsBanner.js} +8 -11
  337. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -0
  338. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.d.ts → CallingCaptionsSettingsModal.d.ts} +2 -2
  339. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsSettingsModal.js → CallingCaptionsSettingsModal.js} +6 -9
  340. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsSettingsModal.js.map +1 -0
  341. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +7 -10
  342. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -1
  343. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +5 -17
  344. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  345. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +5 -9
  346. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  347. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionLanguageSettingsDrawer.js.map +1 -1
  348. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +5 -0
  349. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +12 -14
  350. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  351. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +2 -0
  352. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  353. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageSettingsDrawer.js.map +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  355. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  357. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  358. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  359. package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  361. package/dist/dist-esm/react-composites/src/composites/common/adapters.d.ts +0 -23
  362. package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
  363. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  364. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  365. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  366. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -32
  367. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
  368. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +0 -4
  370. package/dist/dist-esm/react-composites/src/composites/common/utils.js +0 -22
  371. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  372. package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -1
  373. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  374. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +25 -1
  375. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +25 -1
  376. package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +25 -1
  377. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +25 -1
  378. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +25 -1
  379. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +25 -1
  380. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +25 -1
  381. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +25 -1
  382. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +25 -1
  383. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +25 -1
  384. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +25 -1
  385. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +25 -1
  386. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +25 -1
  387. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +25 -1
  388. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +25 -1
  389. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +25 -1
  390. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +25 -1
  391. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +25 -1
  392. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +25 -1
  393. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +25 -1
  394. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +25 -1
  395. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +25 -1
  396. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +25 -1
  397. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +25 -1
  398. package/package.json +5 -5
  399. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js +0 -206
  400. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CwxvsFHy.js.map +0 -1
  401. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js +0 -50
  402. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DMdQIGV5.js.map +0 -1
  403. package/dist/dist-cjs/communication-react/index-D7R-o8dv.js +0 -43117
  404. package/dist/dist-cjs/communication-react/index-D7R-o8dv.js.map +0 -1
  405. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  406. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  407. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  408. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  409. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  410. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  411. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.d.ts +0 -20
  412. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +0 -118
  413. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +0 -1
  414. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  415. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  416. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  417. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  418. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  419. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  420. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  421. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  422. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  423. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  424. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  425. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  426. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  427. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  428. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  429. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  430. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  431. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  432. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  433. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  434. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  435. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  436. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  437. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  438. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  439. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  440. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  441. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  442. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  443. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  444. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  445. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  446. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  447. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -12
  448. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -23
  449. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  450. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  451. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  452. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  453. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  454. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  455. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  456. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  457. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  458. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  459. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  460. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  461. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  462. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -29
  463. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -87
  464. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  465. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -58
  466. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -332
  467. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  468. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  469. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -75
  470. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  471. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  472. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -168
  473. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  474. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  475. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  476. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  477. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  478. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -221
  479. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  480. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  481. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  482. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  483. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  484. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  485. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  486. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  487. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  488. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  489. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  490. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  491. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  492. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  493. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  494. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  495. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  496. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  497. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  498. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  499. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  500. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  501. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  502. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  503. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  504. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  505. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  506. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  507. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  508. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
  509. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  510. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  511. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  512. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  513. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  514. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  515. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  516. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  517. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  518. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  519. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  520. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  521. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  522. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -72
  523. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -177
  524. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  525. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  526. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  527. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  528. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  529. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  530. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  531. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  532. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  533. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  534. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.d.ts +0 -47
  535. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js +0 -48
  536. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Banner.js.map +0 -1
  537. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.d.ts +0 -11
  538. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js +0 -36
  539. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +0 -1
  540. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  541. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
  542. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  543. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.d.ts +0 -7
  544. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js +0 -14
  545. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js.map +0 -1
  546. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  547. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  548. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  549. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  550. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  551. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  552. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  553. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  554. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  555. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  556. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  557. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  558. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  559. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  560. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  561. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  562. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  563. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  564. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  565. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  566. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  567. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  568. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  569. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  570. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +0 -1
  571. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +0 -1
  572. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.d.ts +0 -12
  573. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js +0 -52
  574. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/Timer.js.map +0 -1
  575. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  576. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  577. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantsButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ParticipantsButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAA+F,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7J,OAAO,EAAE,aAAa,EAAE,mCAAgC;AACxD,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,eAAe,EAA6E,MAAM,mBAAmB,CAAC;AAC/H,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAiD,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,gBA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gBACD,OAAO,EAAE,GAAG,EAAE;oBACZ,cAAc,EAAE,CAAC;oBACjB,qBAAqB,EAAE,CAAC;gBAC1B,CAAC;aACF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,2BAA2B,EAAE,OAAO,CAAC,yBAAyB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,CAAC,+BAA+B,EAAE,uCAAuC,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxS,OAAO;QACH,oBAAC,SAAS,IAAC,kBAAkB,EAAE,8BAA8B,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrF,oBAAC,gBAAgB,oBAAK,KAAK,IAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAA,KAAK,CAAC,SAAS,mCAAI,gBAAgB,EAAE,aAAa,EAAE;gBAChH,MAAM,EAAE,IAAI;aACb,EAAE,YAAY,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,yBAAyB,IAAI,CAC7H,CAAC;AACR,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ContextualMenuItemType, IContextualMenuItem, IContextualMenuProps, IContextualMenuStyles, IContextualMenuItemStyles, merge } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport copy from 'copy-to-clipboard';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { ParticipantList, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback } from './ParticipantList';\nimport { participantsButtonMenuPropsStyle } from './styles/ControlBar.styles';\nimport { useLocale } from '../localization';\nimport { ControlBarButton, ControlBarButtonProps, ControlBarButtonStyles } from './ControlBarButton';\nimport { useIdentifiers } from '../identifiers';\nimport { CommunicationParticipant } from '../types/CommunicationParticipant';\nimport { OnRenderAvatarCallback } from '../types/OnRender';\nimport { ParticipantListParticipant } from '../types';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { Announcer } from './Announcer';\n\n/**\n * Styles for the {@link ParticipantsButton} menu.\n *\n * @public\n */\nexport interface ParticipantsButtonContextualMenuStyles extends IContextualMenuStyles {\n /** Styles for the {@link ParticipantsButton} menu items. */\n menuItemStyles?: IContextualMenuItemStyles;\n /** Styles for the {@link ParticipantList} menu item inside the {@link ParticipantsButton} menu. */\n participantListStyles?: ParticipantListStyles;\n}\n\n/**\n * Styles Props for {@link ParticipantsButton}.\n *\n * @public\n */\nexport interface ParticipantsButtonStyles extends ControlBarButtonStyles {\n /** Styles of the {@link ParticipantsButton} menu flyout */\n menuStyles?: Partial<ParticipantsButtonContextualMenuStyles>;\n}\n\n/**\n * Strings of {@link ParticipantsButton} that can be overridden.\n *\n * @public\n */\nexport interface ParticipantsButtonStrings {\n /**\n * Label of button\n */\n label: string;\n /**\n * Button tooltip content.\n */\n tooltipContent?: string;\n /**\n * Header of menu pop up\n */\n menuHeader: string;\n /**\n * Label of menu button to show list of participants. Placeholders: [numParticipants]\n */\n participantsListButtonLabel: string;\n /**\n * Label of menu button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /**\n * Label of menu button to mute all participants\n */\n muteAllButtonLabel: string;\n /**\n * Narrator announcement for when the invite link has been copied by the user to the clipboard\n */\n copyInviteLinkActionedAriaLabel: string;\n}\n\n/**\n * Props for {@link ParticipantsButton}.\n *\n * @public\n */\nexport interface ParticipantsButtonProps extends ControlBarButtonProps {\n /**\n * Participants in user call or chat\n */\n participants: ParticipantListParticipant[];\n /**\n * User ID of user\n */\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 /**\n * Callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem`\n */\n onRenderParticipant?: (participant: CommunicationParticipant) => JSX.Element | null;\n /**\n * Callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned.\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Callback to render the context menu for each participant\n */\n onRemoveParticipant?: (userId: string) => void;\n /**\n * Callback to render custom menu items for each participant.\n */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /**\n * Optional callback to render a custom participant list.\n */\n onRenderParticipantList?: (props: ParticipantListProps) => JSX.Element | null;\n /**\n * Allows users to pass an object containing custom CSS styles.\n * @Example\n * ```\n * <ParticipantsButton styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: ParticipantsButtonStyles;\n /**\n * URL to invite new participants to the current call\n */\n callInvitationURL?: string;\n /**\n * CallBack to mute all remote participants\n */\n onMuteAll?: () => void;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ParticipantsButtonStrings>;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n}\n\n/**\n * A button to show a menu with calling or chat participants.\n *\n * Can be used with {@link ControlBar}.\n *\n * This button contains dropdown menu items defined through its property `menuProps`. By default, it can display the number of remote participants with the full list\n * as sub-menu and an option to mute all participants, as well as a copy-to-clipboard button to copy the call invitation URL.\n * This `menuProps` can be fully redefined and its property is of type [IContextualMenuProps](https://developer.microsoft.com/fluentui#/controls/web/contextualmenu#IContextualMenuProps).\n *\n * @public\n */\nexport const ParticipantsButton = (props: ParticipantsButtonProps): JSX.Element => {\n const {\n callInvitationURL,\n styles,\n onMuteAll,\n onRenderIcon,\n onRenderParticipantList,\n participants,\n myUserId,\n excludeMe,\n onRenderParticipant,\n onRenderAvatar,\n onRemoveParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip\n } = props;\n const disabled = props.disabled;\n const [copyInviteLinkAnnouncerStrings, setCopyInviteLinkAnnouncerStrings] = useState<string>('');\n const onRenderPeopleIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={disabled} iconName=\"ControlButtonParticipants\" />;\n const ids = useIdentifiers();\n const onMuteAllCallback = useCallback(() => {\n if (onMuteAll) {\n onMuteAll();\n }\n }, [onMuteAll]);\n const defaultParticipantList = useCallback(() => {\n return <ParticipantList participants={participants} myUserId={myUserId} excludeMe={excludeMe} onRenderParticipant={onRenderParticipant} onRenderAvatar={onRenderAvatar} onRemoveParticipant={onRemoveParticipant} onFetchParticipantMenuItems={onFetchParticipantMenuItems} styles={styles?.menuStyles?.participantListStyles} showParticipantOverflowTooltip={showParticipantOverflowTooltip} />;\n }, [excludeMe, myUserId, onRemoveParticipant, onRenderAvatar, onRenderParticipant, participants, styles?.menuStyles?.participantListStyles, onFetchParticipantMenuItems, showParticipantOverflowTooltip]);\n const onCopyCallback = useCallback(() => {\n if (callInvitationURL) {\n return copy(callInvitationURL);\n }\n return false;\n }, [callInvitationURL]);\n const localeStrings = useLocale().strings.participantsButton;\n const strings = useMemo(() => ({\n ...localeStrings,\n ...props.strings\n }), [localeStrings, props.strings]);\n const participantCount = participants.length;\n\n /**\n * sets the announcement string for when the link is copied.\n */\n const toggleAnnouncerString = useCallback(() => {\n setCopyInviteLinkAnnouncerStrings(strings.copyInviteLinkActionedAriaLabel);\n /**\n * Clears the announcer string after the user clicks the\n * copyInviteLink button allowing it to be re-announced.\n */\n setTimeout(() => {\n setCopyInviteLinkAnnouncerStrings('');\n }, 3000);\n }, [strings.copyInviteLinkActionedAriaLabel]);\n const generateDefaultParticipantsSubMenuProps = useCallback((): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n if (participantCount > 0) {\n items.push({\n key: 'participantListMenuItemKey',\n onRender: onRenderParticipantList ?? defaultParticipantList\n });\n items.push({\n key: 'participantsDivider1',\n itemType: ContextualMenuItemType.Divider\n });\n if (onMuteAll) {\n items.push({\n key: 'muteAllKey',\n text: strings.muteAllButtonLabel,\n title: strings.muteAllButtonLabel,\n styles: styles?.menuStyles?.menuItemStyles,\n iconProps: {\n iconName: 'MicOff2'\n },\n onClick: onMuteAllCallback\n });\n }\n }\n return items;\n }, [participantCount, onRenderParticipantList, defaultParticipantList, onMuteAll, strings.muteAllButtonLabel, styles?.menuStyles?.menuItemStyles, onMuteAllCallback]);\n const defaultMenuProps = useMemo((): IContextualMenuProps => {\n const menuProps: IContextualMenuProps = {\n title: strings.menuHeader,\n ariaLabel: strings.menuHeader,\n styles: merge(participantsButtonMenuPropsStyle, styles?.menuStyles),\n items: [],\n calloutProps: {\n preventDismissOnEvent\n }\n };\n if (participantCount > 0) {\n const participantIds = participants.map(p => p.userId);\n let participantCountWithoutMe = participantIds.length;\n if (excludeMe) {\n participantCountWithoutMe -= 1;\n }\n menuProps.items.push({\n key: 'participantCountKey',\n name: _formatString(strings.participantsListButtonLabel, {\n numParticipants: `${participantCountWithoutMe}`\n }),\n itemProps: {\n styles: styles?.menuStyles?.menuItemStyles\n },\n iconProps: {\n iconName: 'People'\n },\n subMenuProps: {\n items: generateDefaultParticipantsSubMenuProps(),\n calloutProps: {\n styles: {\n root: {\n // Confine the menu to the parents bounds.\n // More info: https://github.com/microsoft/fluentui/issues/18835\n maxWidth: '100%'\n }\n },\n style: {\n maxHeight: '20rem'\n },\n // Disable dismiss on resize to work around a couple Fluent UI bugs\n // See reasoning in the props for the parent menu.\n preventDismissOnEvent\n }\n },\n 'data-ui-id': ids.participantButtonPeopleMenuItem\n });\n }\n if (callInvitationURL) {\n menuProps.items.push({\n key: 'InviteLinkKey',\n name: strings.copyInviteLinkButtonLabel,\n title: strings.copyInviteLinkButtonLabel,\n itemProps: {\n styles: styles?.menuStyles?.menuItemStyles\n },\n iconProps: {\n iconName: 'Link'\n },\n onClick: () => {\n onCopyCallback();\n toggleAnnouncerString();\n }\n });\n }\n return menuProps;\n }, [strings.menuHeader, strings.participantsListButtonLabel, strings.copyInviteLinkButtonLabel, styles?.menuStyles, participantCount, callInvitationURL, participants, excludeMe, ids.participantButtonPeopleMenuItem, generateDefaultParticipantsSubMenuProps, onCopyCallback, toggleAnnouncerString]);\n return <>\n <Announcer announcementString={copyInviteLinkAnnouncerStrings} ariaLive={'polite'} />\n <ControlBarButton {...props} disabled={disabled} menuProps={props.menuProps ?? defaultMenuProps} menuIconProps={{\n hidden: true\n }} onRenderIcon={onRenderIcon ?? onRenderPeopleIcon} strings={strings} labelKey={props.labelKey ?? 'participantsButtonLabel'} />\n </>;\n};"]}
1
+ {"version":3,"file":"ParticipantsButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ParticipantsButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,sBAAsB,EAA+F,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7J,OAAO,EAAE,aAAa,EAAE,mCAAgC;AACxD,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,eAAe,EAA6E,MAAM,mBAAmB,CAAC;AAC/H,OAAO,EAAE,gCAAgC,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAiD,MAAM,oBAAoB,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIhD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,sBAAsB,IAAI,qBAAqB,EAAE,mCAAgC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAgIxC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAA8B,EA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,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,CAAC,+BAA+B,EAAE,uCAAuC,EAAE,cAAc,EAAE,qBAAqB,CAAC,CAAC,CAAC;IACxS,OAAO;QACH,oBAAC,SAAS,IAAC,kBAAkB,EAAE,8BAA8B,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrF,oBAAC,gBAAgB,oBAAK,KAAK,IAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAA,KAAK,CAAC,SAAS,mCAAI,gBAAgB,EAAE,aAAa,EAAE;gBAChH,MAAM,EAAE,IAAI;aACb,EAAE,YAAY,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,kBAAkB,EAAE,OAAO,EAAE,OAAO,gBAAc,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,yBAAyB,IAAI,CAC5J,CAAC;AACR,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ContextualMenuItemType, IContextualMenuItem, IContextualMenuProps, IContextualMenuStyles, IContextualMenuItemStyles, merge } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport copy from 'copy-to-clipboard';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { ParticipantList, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback } from './ParticipantList';\nimport { participantsButtonMenuPropsStyle } from './styles/ControlBar.styles';\nimport { useLocale } from '../localization';\nimport { ControlBarButton, ControlBarButtonProps, ControlBarButtonStyles } from './ControlBarButton';\nimport { useIdentifiers } from '../identifiers';\nimport { CommunicationParticipant } from '../types/CommunicationParticipant';\nimport { OnRenderAvatarCallback } from '../types/OnRender';\nimport { ParticipantListParticipant } from '../types';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { Announcer } from './Announcer';\n\n/**\n * Styles for the {@link ParticipantsButton} menu.\n *\n * @public\n */\nexport interface ParticipantsButtonContextualMenuStyles extends IContextualMenuStyles {\n /** Styles for the {@link ParticipantsButton} menu items. */\n menuItemStyles?: IContextualMenuItemStyles;\n /** Styles for the {@link ParticipantList} menu item inside the {@link ParticipantsButton} menu. */\n participantListStyles?: ParticipantListStyles;\n}\n\n/**\n * Styles Props for {@link ParticipantsButton}.\n *\n * @public\n */\nexport interface ParticipantsButtonStyles extends ControlBarButtonStyles {\n /** Styles of the {@link ParticipantsButton} menu flyout */\n menuStyles?: Partial<ParticipantsButtonContextualMenuStyles>;\n}\n\n/**\n * Strings of {@link ParticipantsButton} that can be overridden.\n *\n * @public\n */\nexport interface ParticipantsButtonStrings {\n /**\n * Label of button\n */\n label: string;\n /**\n * Button tooltip content.\n */\n tooltipContent?: string;\n /**\n * Aria label for button accessibility announcement\n */\n ariaLabel?: string;\n /**\n * Header of menu pop up\n */\n menuHeader: string;\n /**\n * Label of menu button to show list of participants. Placeholders: [numParticipants]\n */\n participantsListButtonLabel: string;\n /**\n * Label of menu button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /**\n * Label of menu button to mute all participants\n */\n muteAllButtonLabel: string;\n /**\n * Narrator announcement for when the invite link has been copied by the user to the clipboard\n */\n copyInviteLinkActionedAriaLabel: string;\n}\n\n/**\n * Props for {@link ParticipantsButton}.\n *\n * @public\n */\nexport interface ParticipantsButtonProps extends ControlBarButtonProps {\n /**\n * Participants in user call or chat\n */\n participants: ParticipantListParticipant[];\n /**\n * User ID of user\n */\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 /**\n * Callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem`\n */\n onRenderParticipant?: (participant: CommunicationParticipant) => JSX.Element | null;\n /**\n * Callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned.\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Callback to render the context menu for each participant\n */\n onRemoveParticipant?: (userId: string) => void;\n /**\n * Callback to render custom menu items for each participant.\n */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /**\n * Optional callback to render a custom participant list.\n */\n onRenderParticipantList?: (props: ParticipantListProps) => JSX.Element | null;\n /**\n * Allows users to pass an object containing custom CSS styles.\n * @Example\n * ```\n * <ParticipantsButton styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: ParticipantsButtonStyles;\n /**\n * URL to invite new participants to the current call\n */\n callInvitationURL?: string;\n /**\n * CallBack to mute all remote participants\n */\n onMuteAll?: () => void;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ParticipantsButtonStrings>;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n}\n\n/**\n * A button to show a menu with calling or chat participants.\n *\n * Can be used with {@link ControlBar}.\n *\n * This button contains dropdown menu items defined through its property `menuProps`. By default, it can display the number of remote participants with the full list\n * as sub-menu and an option to mute all participants, as well as a copy-to-clipboard button to copy the call invitation URL.\n * This `menuProps` can be fully redefined and its property is of type [IContextualMenuProps](https://developer.microsoft.com/fluentui#/controls/web/contextualmenu#IContextualMenuProps).\n *\n * @public\n */\nexport const ParticipantsButton = (props: ParticipantsButtonProps): JSX.Element => {\n const {\n callInvitationURL,\n styles,\n onMuteAll,\n onRenderIcon,\n onRenderParticipantList,\n participants,\n myUserId,\n excludeMe,\n onRenderParticipant,\n onRenderAvatar,\n onRemoveParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip\n } = props;\n const disabled = props.disabled;\n const [copyInviteLinkAnnouncerStrings, setCopyInviteLinkAnnouncerStrings] = useState<string>('');\n const onRenderPeopleIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={disabled} iconName=\"ControlButtonParticipants\" />;\n const ids = useIdentifiers();\n const onMuteAllCallback = useCallback(() => {\n if (onMuteAll) {\n onMuteAll();\n }\n }, [onMuteAll]);\n const defaultParticipantList = useCallback(() => {\n return <ParticipantList participants={participants} myUserId={myUserId} excludeMe={excludeMe} onRenderParticipant={onRenderParticipant} onRenderAvatar={onRenderAvatar} onRemoveParticipant={onRemoveParticipant} onFetchParticipantMenuItems={onFetchParticipantMenuItems} styles={styles?.menuStyles?.participantListStyles} showParticipantOverflowTooltip={showParticipantOverflowTooltip} />;\n }, [excludeMe, myUserId, onRemoveParticipant, onRenderAvatar, onRenderParticipant, participants, styles?.menuStyles?.participantListStyles, onFetchParticipantMenuItems, showParticipantOverflowTooltip]);\n const onCopyCallback = useCallback(() => {\n if (callInvitationURL) {\n return copy(callInvitationURL);\n }\n return false;\n }, [callInvitationURL]);\n const localeStrings = useLocale().strings.participantsButton;\n const strings = useMemo(() => ({\n ...localeStrings,\n ...props.strings\n }), [localeStrings, props.strings]);\n const participantCount = participants.length;\n\n /**\n * sets the announcement string for when the link is copied.\n */\n const toggleAnnouncerString = useCallback(() => {\n setCopyInviteLinkAnnouncerStrings(strings.copyInviteLinkActionedAriaLabel);\n /**\n * Clears the announcer string after the user clicks the\n * copyInviteLink button allowing it to be re-announced.\n */\n setTimeout(() => {\n setCopyInviteLinkAnnouncerStrings('');\n }, 3000);\n }, [strings.copyInviteLinkActionedAriaLabel]);\n const generateDefaultParticipantsSubMenuProps = useCallback((): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n if (participantCount > 0) {\n items.push({\n key: 'participantListMenuItemKey',\n onRender: onRenderParticipantList ?? defaultParticipantList\n });\n items.push({\n key: 'participantsDivider1',\n itemType: ContextualMenuItemType.Divider\n });\n if (onMuteAll) {\n items.push({\n key: 'muteAllKey',\n text: strings.muteAllButtonLabel,\n title: strings.muteAllButtonLabel,\n styles: styles?.menuStyles?.menuItemStyles,\n iconProps: {\n iconName: 'MicOff2'\n },\n onClick: onMuteAllCallback\n });\n }\n }\n return items;\n }, [participantCount, onRenderParticipantList, defaultParticipantList, onMuteAll, strings.muteAllButtonLabel, styles?.menuStyles?.menuItemStyles, onMuteAllCallback]);\n const defaultMenuProps = useMemo((): IContextualMenuProps => {\n const menuProps: IContextualMenuProps = {\n title: strings.menuHeader,\n ariaLabel: strings.menuHeader,\n styles: merge(participantsButtonMenuPropsStyle, styles?.menuStyles),\n items: [],\n calloutProps: {\n preventDismissOnEvent\n }\n };\n if (participantCount > 0) {\n const participantIds = participants.map(p => p.userId);\n let participantCountWithoutMe = participantIds.length;\n if (excludeMe) {\n participantCountWithoutMe -= 1;\n }\n menuProps.items.push({\n key: 'participantCountKey',\n name: _formatString(strings.participantsListButtonLabel, {\n numParticipants: `${participantCountWithoutMe}`\n }),\n itemProps: {\n styles: styles?.menuStyles?.menuItemStyles\n },\n iconProps: {\n iconName: 'People'\n },\n subMenuProps: {\n items: generateDefaultParticipantsSubMenuProps(),\n calloutProps: {\n styles: {\n root: {\n // Confine the menu to the parents bounds.\n // More info: https://github.com/microsoft/fluentui/issues/18835\n maxWidth: '100%'\n }\n },\n style: {\n maxHeight: '20rem'\n },\n // Disable dismiss on resize to work around a couple Fluent UI bugs\n // See reasoning in the props for the parent menu.\n preventDismissOnEvent\n }\n },\n 'data-ui-id': ids.participantButtonPeopleMenuItem\n });\n }\n if (callInvitationURL) {\n menuProps.items.push({\n key: 'InviteLinkKey',\n name: strings.copyInviteLinkButtonLabel,\n title: strings.copyInviteLinkButtonLabel,\n itemProps: {\n styles: styles?.menuStyles?.menuItemStyles\n },\n iconProps: {\n iconName: 'Link'\n },\n onClick: () => {\n onCopyCallback();\n toggleAnnouncerString();\n }\n });\n }\n return menuProps;\n }, [strings.menuHeader, strings.participantsListButtonLabel, strings.copyInviteLinkButtonLabel, styles?.menuStyles, participantCount, callInvitationURL, participants, excludeMe, ids.participantButtonPeopleMenuItem, generateDefaultParticipantsSubMenuProps, onCopyCallback, toggleAnnouncerString]);\n return <>\n <Announcer announcementString={copyInviteLinkAnnouncerStrings} ariaLive={'polite'} />\n <ControlBarButton {...props} disabled={disabled} menuProps={props.menuProps ?? defaultMenuProps} menuIconProps={{\n hidden: true\n }} onRenderIcon={onRenderIcon ?? onRenderPeopleIcon} strings={strings} aria-label={strings.ariaLabel} labelKey={props.labelKey ?? 'participantsButtonLabel'} />\n </>;\n};"]}
@@ -61,7 +61,7 @@ export const ReactionButton = (props) => {
61
61
  props.onReactionClick(emoji);
62
62
  (_a = reactionButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
63
63
  setCalloutIsVisible(false);
64
- }, className: classname, styles: reactionItemButtonStyles, "aria-label": emojiButtonTooltip.get(emoji), "aria-description": strings.tooltipContent }));
64
+ }, className: classname, styles: reactionItemButtonStyles, "aria-label": emojiButtonTooltip.get(emoji) }));
65
65
  })))),
66
66
  React.createElement("div", { ref: reactionButtonCalloutRef },
67
67
  React.createElement(ControlBarButton, Object.assign({}, props, { componentRef: reactionButtonRef, className: mergeStyles(styles, props.styles), onClick: () => setCalloutIsVisible(!calloutIsVisible), onRenderIcon: (_f = props.onRenderIcon) !== null && _f !== void 0 ? _f : onRenderIcon, strings: strings, split: true, labelKey: (_g = props.labelKey) !== null && _g !== void 0 ? _g : 'reactionButtonLabel', onRenderMenuIcon: () => React.createElement("div", null), disabled: props.disabled, ariaLabel: strings.ariaLabel }))));
@@ -1 +1 @@
1
- {"version":3,"file":"ReactionButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ReactionButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAkC,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC/I,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,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,CACJ;QACZ,6BAAK,GAAG,EAAE,wBAAwB;YAChC,oBAAC,gBAAgB,oBAAK,KAAK,IAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,gCAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAC9X,CACA,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Callout, DefaultButton, FocusZone, IButton, ICalloutContentStyles, mergeStyles, Stack, TooltipHost, useTheme } from '@fluentui/react';\nimport React, { useRef, useState } from 'react';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { useLocale } from '../localization';\nimport { emojiStyles, reactionButtonCalloutStyles, reactionButtonStyles, reactionItemButtonStyles, reactionToolTipHostStyle } from './styles/ReactionButton.styles';\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { ReactionResources } from '..';\nimport { getEmojiFrameCount } from './VideoGallery/utils/videoGalleryLayoutUtils';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * Reactions types for the Reaction button\n * @public\n */\nexport type ReactionButtonReaction = 'like' | 'heart' | 'applause' | 'laugh' | 'surprised';\n\n/**\n * Props for {@link ReactionButton}.\n *\n * @public\n */\nexport interface ReactionButtonProps extends ControlBarButtonProps {\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ReactionButtonStrings>;\n /**\n * Click event to send reaction to meeting\n */\n onReactionClick: (reaction: ReactionButtonReaction) => Promise<void>;\n /**\n * Reaction resource locator and parameters\n */\n reactionResources: ReactionResources;\n}\n\n/**\n * Strings of {@link ReactionButton} that can be overridden.\n *\n * @public\n */\nexport interface ReactionButtonStrings {\n /** Label of the button. */\n label: string;\n /** Aria label for reaction button accessibility announcement */\n ariaLabel: string;\n /** Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is enabled. */\n tooltipContent?: string;\n /** Tooltip content of like reaction button. */\n likeReactionTooltipContent?: string;\n /** Tooltip content of heart reaction button. */\n heartReactionTooltipContent?: string;\n /** Tooltip content of clap reaction button. */\n applauseReactionTooltipContent?: string;\n /** Tooltip content of laugh reaction button. */\n laughReactionTooltipContent?: string;\n /** Tooltip content of surprised reaction button. */\n surprisedReactionTooltipContent?: string;\n}\n\n/**\n * A button to send reactions.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const ReactionButton = (props: ReactionButtonProps): JSX.Element => {\n const localeStrings = useLocale().strings.reactionButton;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const theme = useTheme();\n const styles = reactionButtonStyles(theme);\n const onRenderIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ReactionButtonIcon\" />;\n const emojis: ReactionButtonReaction[] = ['like', 'heart', 'applause', 'laugh', 'surprised'];\n const emojiButtonTooltip: Map<string, string | undefined> = new Map([['like', strings.likeReactionTooltipContent], ['heart', strings.heartReactionTooltipContent], ['applause', strings.applauseReactionTooltipContent], ['laugh', strings.laughReactionTooltipContent], ['surprised', strings.surprisedReactionTooltipContent]]);\n const emojiResource: Map<string, string | undefined> = new Map([['like', props.reactionResources.likeReaction?.url], ['heart', props.reactionResources.heartReaction?.url], ['applause', props.reactionResources.applauseReaction?.url], ['laugh', props.reactionResources.laughReaction?.url], ['surprised', props.reactionResources.surprisedReaction?.url]]);\n const calloutStyle: Partial<ICalloutContentStyles> = {\n root: {\n padding: 0\n },\n calloutMain: {\n padding: '0.5rem'\n }\n };\n const calloutProps = {\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n const reactionButtonCalloutRef = useRef<HTMLDivElement>(null);\n const reactionButtonRef = useRef<IButton>(null);\n const [calloutIsVisible, setCalloutIsVisible] = useState(false);\n return <Stack>\n {calloutIsVisible && <Callout data-ui-id=\"reaction-sub-menu\" isBeakVisible={false} styles={reactionButtonCalloutStyles} target={reactionButtonCalloutRef.current} onDismiss={() => {\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }}>\n <FocusZone shouldFocusOnMount style={{\n height: '100%'\n }}>\n <Stack horizontal style={{\n height: 'inherit'\n }}>\n {emojis.map((emoji, index) => {\n const resourceUrl = emojiResource.get(emoji);\n const frameCount: number = props.reactionResources !== undefined ? getEmojiFrameCount(emoji, props.reactionResources) : 0;\n const classname = mergeStyles(emojiStyles(resourceUrl ? resourceUrl : '', frameCount));\n return <TooltipHost key={index} data-ui-id={index} hidden={props.disableTooltip} content={emojiButtonTooltip.get(emoji)} styles={reactionToolTipHostStyle()} calloutProps={{\n ...calloutProps\n }}>\n <DefaultButton role=\"menuitem\" key={index} onClick={() => {\n props.onReactionClick(emoji);\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }} className={classname} styles={reactionItemButtonStyles} aria-label={emojiButtonTooltip.get(emoji)} aria-description={strings.tooltipContent}></DefaultButton>\n </TooltipHost>;\n })}\n </Stack>\n </FocusZone>\n </Callout>}\n <div ref={reactionButtonCalloutRef}>\n <ControlBarButton {...props} componentRef={reactionButtonRef} className={mergeStyles(styles, props.styles)} onClick={() => setCalloutIsVisible(!calloutIsVisible)} onRenderIcon={props.onRenderIcon ?? onRenderIcon} strings={strings} split={true} labelKey={props.labelKey ?? 'reactionButtonLabel'} onRenderMenuIcon={() => <div />} disabled={props.disabled} ariaLabel={strings.ariaLabel} />\n </div>\n </Stack>;\n};"]}
1
+ {"version":3,"file":"ReactionButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/ReactionButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAkC,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC/I,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AACpK,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAuDlF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA0B,EAAe,EAAE;;IACxE,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC;IACzD,MAAM,OAAO,mCACR,aAAa,GACb,KAAK,CAAC,OAAO,CACjB,CAAC;IACF,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,YAAY,GAAG,GAAgB,EAAE,CAAC,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,oBAAoB,GAAG,CAAC;IAC3H,MAAM,MAAM,GAA6B,CAAC,MAAM,EAAE,OAAO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BAAC,aAAa,IAAC,IAAI,EAAC,UAAU,EAAC,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE;;gCAC7D,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;gCAC7B,MAAA,iBAAiB,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAC;gCACnC,mBAAmB,CAAC,KAAK,CAAC,CAAC;4BAC7B,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,wBAAwB,gBAAc,kBAAkB,CAAC,GAAG,CAAC,KAAK,CAAC,GAAkB,CACpG,CAAC;gBACvB,CAAC,CAAC,CACQ,CACE,CACJ;QACZ,6BAAK,GAAG,EAAE,wBAAwB;YAChC,oBAAC,gBAAgB,oBAAK,KAAK,IAAE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,CAAC,gBAAgB,CAAC,EAAE,YAAY,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAAC,gCAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAC9X,CACA,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Callout, DefaultButton, FocusZone, IButton, ICalloutContentStyles, mergeStyles, Stack, TooltipHost, useTheme } from '@fluentui/react';\nimport React, { useRef, useState } from 'react';\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { useLocale } from '../localization';\nimport { emojiStyles, reactionButtonCalloutStyles, reactionButtonStyles, reactionItemButtonStyles, reactionToolTipHostStyle } from './styles/ReactionButton.styles';\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { ReactionResources } from '..';\nimport { getEmojiFrameCount } from './VideoGallery/utils/videoGalleryLayoutUtils';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * Reactions types for the Reaction button\n * @public\n */\nexport type ReactionButtonReaction = 'like' | 'heart' | 'applause' | 'laugh' | 'surprised';\n\n/**\n * Props for {@link ReactionButton}.\n *\n * @public\n */\nexport interface ReactionButtonProps extends ControlBarButtonProps {\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ReactionButtonStrings>;\n /**\n * Click event to send reaction to meeting\n */\n onReactionClick: (reaction: ReactionButtonReaction) => Promise<void>;\n /**\n * Reaction resource locator and parameters\n */\n reactionResources: ReactionResources;\n}\n\n/**\n * Strings of {@link ReactionButton} that can be overridden.\n *\n * @public\n */\nexport interface ReactionButtonStrings {\n /** Label of the button. */\n label: string;\n /** Aria label for reaction button accessibility announcement */\n ariaLabel: string;\n /** Tooltip content when the button is disabled. */\n tooltipDisabledContent?: string;\n /** Tooltip content when the button is enabled. */\n tooltipContent?: string;\n /** Tooltip content of like reaction button. */\n likeReactionTooltipContent?: string;\n /** Tooltip content of heart reaction button. */\n heartReactionTooltipContent?: string;\n /** Tooltip content of clap reaction button. */\n applauseReactionTooltipContent?: string;\n /** Tooltip content of laugh reaction button. */\n laughReactionTooltipContent?: string;\n /** Tooltip content of surprised reaction button. */\n surprisedReactionTooltipContent?: string;\n}\n\n/**\n * A button to send reactions.\n *\n * Can be used with {@link ControlBar}.\n *\n * @public\n */\nexport const ReactionButton = (props: ReactionButtonProps): JSX.Element => {\n const localeStrings = useLocale().strings.reactionButton;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const theme = useTheme();\n const styles = reactionButtonStyles(theme);\n const onRenderIcon = (): JSX.Element => <_HighContrastAwareIcon disabled={props.disabled} iconName=\"ReactionButtonIcon\" />;\n const emojis: ReactionButtonReaction[] = ['like', 'heart', 'applause', 'laugh', 'surprised'];\n const emojiButtonTooltip: Map<string, string | undefined> = new Map([['like', strings.likeReactionTooltipContent], ['heart', strings.heartReactionTooltipContent], ['applause', strings.applauseReactionTooltipContent], ['laugh', strings.laughReactionTooltipContent], ['surprised', strings.surprisedReactionTooltipContent]]);\n const emojiResource: Map<string, string | undefined> = new Map([['like', props.reactionResources.likeReaction?.url], ['heart', props.reactionResources.heartReaction?.url], ['applause', props.reactionResources.applauseReaction?.url], ['laugh', props.reactionResources.laughReaction?.url], ['surprised', props.reactionResources.surprisedReaction?.url]]);\n const calloutStyle: Partial<ICalloutContentStyles> = {\n root: {\n padding: 0\n },\n calloutMain: {\n padding: '0.5rem'\n }\n };\n const calloutProps = {\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n const reactionButtonCalloutRef = useRef<HTMLDivElement>(null);\n const reactionButtonRef = useRef<IButton>(null);\n const [calloutIsVisible, setCalloutIsVisible] = useState(false);\n return <Stack>\n {calloutIsVisible && <Callout data-ui-id=\"reaction-sub-menu\" isBeakVisible={false} styles={reactionButtonCalloutStyles} target={reactionButtonCalloutRef.current} onDismiss={() => {\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }}>\n <FocusZone shouldFocusOnMount style={{\n height: '100%'\n }}>\n <Stack horizontal style={{\n height: 'inherit'\n }}>\n {emojis.map((emoji, index) => {\n const resourceUrl = emojiResource.get(emoji);\n const frameCount: number = props.reactionResources !== undefined ? getEmojiFrameCount(emoji, props.reactionResources) : 0;\n const classname = mergeStyles(emojiStyles(resourceUrl ? resourceUrl : '', frameCount));\n return <TooltipHost key={index} data-ui-id={index} hidden={props.disableTooltip} content={emojiButtonTooltip.get(emoji)} styles={reactionToolTipHostStyle()} calloutProps={{\n ...calloutProps\n }}>\n <DefaultButton role=\"menuitem\" key={index} onClick={() => {\n props.onReactionClick(emoji);\n reactionButtonRef.current?.focus();\n setCalloutIsVisible(false);\n }} className={classname} styles={reactionItemButtonStyles} aria-label={emojiButtonTooltip.get(emoji)}></DefaultButton>\n </TooltipHost>;\n })}\n </Stack>\n </FocusZone>\n </Callout>}\n <div ref={reactionButtonCalloutRef}>\n <ControlBarButton {...props} componentRef={reactionButtonRef} className={mergeStyles(styles, props.styles)} onClick={() => setCalloutIsVisible(!calloutIsVisible)} onRenderIcon={props.onRenderIcon ?? onRenderIcon} strings={strings} split={true} labelKey={props.labelKey ?? 'reactionButtonLabel'} onRenderMenuIcon={() => <div />} disabled={props.disabled} ariaLabel={strings.ariaLabel} />\n </div>\n </Stack>;\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,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,E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B,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,EACR,YAAY,EACZ,qBAAqB,EACrB,MAAM,EACN,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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};"]}
@@ -3,20 +3,20 @@ import { ControlBarButtonProps } from './ControlBarButton';
3
3
  /**
4
4
  * options bag to start captions
5
5
  *
6
- * @internal
6
+ * @public
7
7
  */
8
- export type _captionsOptions = {
8
+ export type CaptionsOptions = {
9
9
  spokenLanguage: string;
10
10
  };
11
11
  /**
12
- *@internal
12
+ * @public
13
13
  */
14
- export interface _StartCaptionsButtonProps extends ControlBarButtonProps {
14
+ export interface StartCaptionsButtonProps extends ControlBarButtonProps {
15
15
  /**
16
16
  * Utility property for using this component with communication react handlers
17
17
  * Start captions based on captions state
18
18
  */
19
- onStartCaptions: (options?: _captionsOptions) => Promise<void>;
19
+ onStartCaptions: (options?: CaptionsOptions) => Promise<void>;
20
20
  /**
21
21
  * Utility property for using this component with communication react handlers
22
22
  * Stop captions based on captions state
@@ -34,13 +34,13 @@ export interface _StartCaptionsButtonProps extends ControlBarButtonProps {
34
34
  /**
35
35
  * Optional strings to override in component
36
36
  */
37
- strings?: _StartCaptionsButtonStrings;
37
+ strings?: StartCaptionsButtonStrings;
38
38
  }
39
39
  /**
40
40
  * Strings for the hold button labels
41
- * @internal
41
+ * @public
42
42
  */
43
- export interface _StartCaptionsButtonStrings {
43
+ export interface StartCaptionsButtonStrings {
44
44
  /**
45
45
  * Label for when action is to start Captions
46
46
  */
@@ -64,7 +64,7 @@ export interface _StartCaptionsButtonStrings {
64
64
  * Can be used with {@link ControlBar}
65
65
  *
66
66
  * @param props - properties for the start captions button.
67
- * @internal
67
+ * @public
68
68
  */
69
- export declare const _StartCaptionsButton: (props: _StartCaptionsButtonProps) => JSX.Element;
69
+ export declare const StartCaptionsButton: (props: StartCaptionsButtonProps) => JSX.Element;
70
70
  //# sourceMappingURL=StartCaptionsButton.d.ts.map
@@ -13,16 +13,19 @@ import { ControlBarButton } from './ControlBarButton';
13
13
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
14
14
  import { _HighContrastAwareIcon } from './HighContrastAwareIcon';
15
15
  import { defaultSpokenLanguage } from './utils';
16
+ import { useLocale } from '../localization';
16
17
  /**
17
18
  * a button to start or stop captions
18
19
  *
19
20
  * Can be used with {@link ControlBar}
20
21
  *
21
22
  * @param props - properties for the start captions button.
22
- * @internal
23
+ * @public
23
24
  */
24
- export const _StartCaptionsButton = (props) => {
25
- const { onStartCaptions, onStopCaptions, onSetSpokenLanguage, currentSpokenLanguage, strings } = props;
25
+ export const StartCaptionsButton = (props) => {
26
+ const { onStartCaptions, onStopCaptions, onSetSpokenLanguage, currentSpokenLanguage } = props;
27
+ const localeStrings = useLocale().strings.startCaptionsButton;
28
+ const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
26
29
  const onRenderStartIcon = () => {
27
30
  return React.createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "CaptionsIcon" });
28
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"StartCaptionsButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/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C;YAClB,cAAc,EAAE,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,CAAA,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,OAAO,IAAI,CAAC,oBAAoB,EAAE,CAAC;YAC3C,4EAA4E;YAC5E,iIAAiI;YACjI,mBAAmB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAC5C,6EAA6E;YAC7E,uBAAuB,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAAC,CAAC;IACvF,OAAO,oBAAC,gBAAgB,oBAAK,KAAK,IAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,KAAK,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,IAAI,CAAC;AACjL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { defaultSpokenLanguage } from './utils';\n\n/**\n * options bag to start captions\n *\n * @internal\n */\nexport type _captionsOptions = {\n spokenLanguage: string;\n};\n\n/**\n *@internal\n */\nexport interface _StartCaptionsButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with communication react handlers\n * Start captions based on captions state\n */\n onStartCaptions: (options?: _captionsOptions) => Promise<void>;\n /**\n * Utility property for using this component with communication react handlers\n * Stop captions based on captions state\n */\n onStopCaptions: () => Promise<void>;\n /**\n * Utility property for using this component with communication react handlers\n * set captions spoken language\n */\n onSetSpokenLanguage: (language: string) => Promise<void>;\n /**\n * Spoken language set for starting captions\n */\n currentSpokenLanguage: string;\n /**\n * Optional strings to override in component\n */\n strings?: _StartCaptionsButtonStrings;\n}\n\n/**\n * Strings for the hold button labels\n * @internal\n */\nexport interface _StartCaptionsButtonStrings {\n /**\n * Label for when action is to start Captions\n */\n onLabel: string;\n /**\n * Label for when action is to stop Captions\n */\n offLabel: string;\n /**\n * Content for when button is checked, captions is on\n */\n tooltipOnContent: string;\n /**\n * Content for when button is unchecked, captions is off\n */\n tooltipOffContent: string;\n}\n\n/**\n * a button to start or stop captions\n *\n * Can be used with {@link ControlBar}\n *\n * @param props - properties for the start captions button.\n * @internal\n */\nexport const _StartCaptionsButton = (props: _StartCaptionsButtonProps): JSX.Element => {\n const {\n onStartCaptions,\n onStopCaptions,\n onSetSpokenLanguage,\n currentSpokenLanguage,\n strings\n } = props;\n const onRenderStartIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"CaptionsIcon\" />;\n };\n const onRenderOffIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"CaptionsOffIcon\" />;\n };\n const options: _captionsOptions = useMemo(() => {\n return {\n spokenLanguage: currentSpokenLanguage === '' ? defaultSpokenLanguage : currentSpokenLanguage\n };\n }, [currentSpokenLanguage]);\n const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = useState(false);\n const onToggleStartCaptions = useCallback(async (): Promise<void> => {\n if (props.checked) {\n onStopCaptions();\n } else {\n await onStartCaptions(options);\n }\n }, [props.checked, onStartCaptions, onStopCaptions, options]);\n useEffect(() => {\n if (props.checked && !hasSetSpokenLanguage) {\n // set spoken language when start captions with a spoken language specified.\n // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language\n onSetSpokenLanguage(options.spokenLanguage);\n // we only need to call set spoken language once when first starting captions\n setHasSetSpokenLanguage(true);\n }\n }, [props.checked, onSetSpokenLanguage, options.spokenLanguage, hasSetSpokenLanguage]);\n return <ControlBarButton {...props} strings={strings} onClick={onToggleStartCaptions ?? props.onClick} onRenderOnIcon={onRenderStartIcon} onRenderOffIcon={onRenderOffIcon} />;\n};"]}
1
+ {"version":3,"file":"StartCaptionsButton.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/StartCaptionsButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA+D5C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAe,EAAE;IAClF,MAAM,EACJ,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACtB,GAAG,KAAK,CAAC;IACV,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC;IAC9D,MAAM,OAAO,mCACR,aAAa,GACb,KAAK,CAAC,OAAO,CACjB,CAAC;IACF,MAAM,iBAAiB,GAAG,GAAgB,EAAE;QAC1C,OAAO,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,cAAc,GAAG,CAAC;IACtF,CAAC,CAAC;IACF,MAAM,eAAe,GAAG,GAAgB,EAAE;QACxC,OAAO,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,iBAAiB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Corporation.\n// Licensed under the MIT License.\n\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { defaultSpokenLanguage } from './utils';\nimport { useLocale } from '../localization';\n\n/**\n * options bag to start captions\n *\n * @public\n */\nexport type CaptionsOptions = {\n spokenLanguage: string;\n};\n\n/**\n * @public\n */\nexport interface StartCaptionsButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with communication react handlers\n * Start captions based on captions state\n */\n onStartCaptions: (options?: CaptionsOptions) => Promise<void>;\n /**\n * Utility property for using this component with communication react handlers\n * Stop captions based on captions state\n */\n onStopCaptions: () => Promise<void>;\n /**\n * Utility property for using this component with communication react handlers\n * set captions spoken language\n */\n onSetSpokenLanguage: (language: string) => Promise<void>;\n /**\n * Spoken language set for starting captions\n */\n currentSpokenLanguage: string;\n /**\n * Optional strings to override in component\n */\n strings?: StartCaptionsButtonStrings;\n}\n\n/**\n * Strings for the hold button labels\n * @public\n */\nexport interface StartCaptionsButtonStrings {\n /**\n * Label for when action is to start Captions\n */\n onLabel: string;\n /**\n * Label for when action is to stop Captions\n */\n offLabel: string;\n /**\n * Content for when button is checked, captions is on\n */\n tooltipOnContent: string;\n /**\n * Content for when button is unchecked, captions is off\n */\n tooltipOffContent: string;\n}\n\n/**\n * a button to start or stop captions\n *\n * Can be used with {@link ControlBar}\n *\n * @param props - properties for the start captions button.\n * @public\n */\nexport const StartCaptionsButton = (props: StartCaptionsButtonProps): JSX.Element => {\n const {\n onStartCaptions,\n onStopCaptions,\n onSetSpokenLanguage,\n currentSpokenLanguage\n } = props;\n const localeStrings = useLocale().strings.startCaptionsButton;\n const strings = {\n ...localeStrings,\n ...props.strings\n };\n const onRenderStartIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"CaptionsIcon\" />;\n };\n const onRenderOffIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"CaptionsOffIcon\" />;\n };\n const options: CaptionsOptions = useMemo(() => {\n return {\n spokenLanguage: currentSpokenLanguage === '' ? defaultSpokenLanguage : currentSpokenLanguage\n };\n }, [currentSpokenLanguage]);\n const [hasSetSpokenLanguage, setHasSetSpokenLanguage] = useState(false);\n const onToggleStartCaptions = useCallback(async (): Promise<void> => {\n if (props.checked) {\n onStopCaptions();\n } else {\n await onStartCaptions(options);\n }\n }, [props.checked, onStartCaptions, onStopCaptions, options]);\n useEffect(() => {\n if (props.checked && !hasSetSpokenLanguage) {\n // set spoken language when start captions with a spoken language specified.\n // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language\n onSetSpokenLanguage(options.spokenLanguage);\n // we only need to call set spoken language once when first starting captions\n setHasSetSpokenLanguage(true);\n }\n }, [props.checked, onSetSpokenLanguage, options.spokenLanguage, hasSetSpokenLanguage]);\n return <ControlBarButton {...props} strings={strings} onClick={onToggleStartCaptions ?? props.onClick} onRenderOnIcon={onRenderStartIcon} onRenderOffIcon={onRenderOffIcon} />;\n};"]}
@@ -1,18 +1,29 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { FontIcon, mergeStyles, Stack, Text } from '@fluentui/react';
4
- import React from 'react';
4
+ import React, { useEffect, useState } from 'react';
5
5
  import { systemMessageIconStyle } from './styles/SystemMessage.styles';
6
+ import LiveMessage from './Announcer/LiveMessage';
6
7
  /**
7
8
  * @private
8
9
  */
9
10
  export const SystemMessage = (props) => {
10
11
  const { iconName, content } = props;
11
12
  const Icon = React.createElement(FontIcon, { iconName: iconName, className: mergeStyles(systemMessageIconStyle) });
12
- return React.createElement(Stack, { horizontal: true, className: mergeStyles(props === null || props === void 0 ? void 0 : props.containerStyle), tabIndex: 0 },
13
- Icon,
14
- React.createElement(Text, { style: {
15
- wordBreak: 'break-word'
16
- }, role: "status", title: content, variant: 'small' }, content));
13
+ const [liveMessage, setLiveMessage] = useState('');
14
+ useEffect(() => {
15
+ // Timeout is needed to handle situation when the same user joins and leaves a chat a few times in a row, otherwise Narrator won't repeat the system message text.
16
+ // Because delay value is not provided, setMessage function will be executed asynchronously in the next event cycle
17
+ setTimeout(() => {
18
+ setLiveMessage(content);
19
+ });
20
+ }, [content]);
21
+ return React.createElement(React.Fragment, null,
22
+ React.createElement(LiveMessage, { message: liveMessage, ariaLive: "polite", clearOnUnmount: true }),
23
+ React.createElement(Stack, { horizontal: true, className: mergeStyles(props === null || props === void 0 ? void 0 : props.containerStyle), tabIndex: 0 },
24
+ Icon,
25
+ React.createElement(Text, { style: {
26
+ wordBreak: 'break-word'
27
+ }, role: "status", title: content, variant: 'small' }, content)));
17
28
  };
18
29
  //# sourceMappingURL=SystemMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SystemMessage.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/SystemMessage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AA4BvE;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAe,EAAE;IACtE,MAAM,EACJ,QAAQ,EACR,OAAO,EACR,GAAG,KAAK,CAAC;IACV,MAAM,IAAI,GAAgB,oBAAC,QAAQ,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,sBAAsB,CAAC,GAAI,CAAC;IAC3G,OAAO,oBAAC,KAAK,IAAC,UAAU,QAAC,SAAS,EAAE,WAAW,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAwB,CAAC,EAAE,QAAQ,EAAE,CAAC;QACxF,IAAI;QACL,oBAAC,IAAI,IAAC,KAAK,EAAE;gBACb,SAAS,EAAE,YAAY;aACxB,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAC5C,OAAO,CACH,CACD,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, FontIcon, mergeStyles, Stack, Text } from '@fluentui/react';\nimport React from 'react';\nimport { systemMessageIconStyle } from './styles/SystemMessage.styles';\nimport { ComponentSlotStyle } from '../types';\n\n/**\n * Todo: We need to add more types of system messages that we support.\n *\n * @private\n */\nexport type SystemMessageIconTypes = 'PeopleAdd' | 'PeopleBlock' | 'Edit';\n\n/**\n * @private\n */\nexport type SystemMessageProps = {\n /**\n * Icon name for the system message.\n */\n iconName: SystemMessageIconTypes;\n /**\n * Content string for the system message.\n */\n content: string;\n /*\n * Custom CSS Style for the system message container.\n */\n containerStyle?: ComponentSlotStyle;\n};\n\n/**\n * @private\n */\nexport const SystemMessage = (props: SystemMessageProps): JSX.Element => {\n const {\n iconName,\n content\n } = props;\n const Icon: JSX.Element = <FontIcon iconName={iconName} className={mergeStyles(systemMessageIconStyle)} />;\n return <Stack horizontal className={mergeStyles(props?.containerStyle as IStyle)} tabIndex={0}>\n {Icon}\n <Text style={{\n wordBreak: 'break-word'\n }} role=\"status\" title={content} variant={'small'}>\n {content}\n </Text>\n </Stack>;\n};"]}
1
+ {"version":3,"file":"SystemMessage.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/SystemMessage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,WAAW,MAAM,yBAAyB,CAAC;AA2BlD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAe,EAAE;IACtE,MAAM,EACJ,QAAQ,EACR,OAAO,EACR,GAAG,KAAK,CAAC;IACV,MAAM,IAAI,GAAgB,oBAAC,QAAQ,IAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,sBAAsB,CAAC,GAAI,CAAC;IAC3G,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,SAAS,CAAC,GAAG,EAAE;QACb,kKAAkK;QAClK,mHAAmH;QACnH,UAAU,CAAC,GAAG,EAAE;YACd,cAAc,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACd,OAAO;QACH,oBAAC,WAAW,IAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAE,IAAI,GAAI;QAC7E,oBAAC,KAAK,IAAC,UAAU,QAAC,SAAS,EAAE,WAAW,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAwB,CAAC,EAAE,QAAQ,EAAE,CAAC;YACnF,IAAI;YACL,oBAAC,IAAI,IAAC,KAAK,EAAE;oBACb,SAAS,EAAE,YAAY;iBACxB,EAAE,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,IAC5C,OAAO,CACH,CACD,CACP,CAAC;AACR,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, FontIcon, mergeStyles, Stack, Text } from '@fluentui/react';\nimport React, { useEffect, useState } from 'react';\nimport { systemMessageIconStyle } from './styles/SystemMessage.styles';\nimport { ComponentSlotStyle } from '../types';\nimport LiveMessage from './Announcer/LiveMessage';\n\n/**\n * Todo: We need to add more types of system messages that we support.\n *\n * @private\n */\nexport type SystemMessageIconTypes = 'PeopleAdd' | 'PeopleBlock' | 'Edit';\n\n/**\n * @private\n */\nexport type SystemMessageProps = {\n /**\n * Icon name for the system message.\n */\n iconName: SystemMessageIconTypes;\n /**\n * Content string for the system message.\n */\n content: string;\n /*\n * Custom CSS Style for the system message container.\n */\n containerStyle?: ComponentSlotStyle;\n};\n\n/**\n * @private\n */\nexport const SystemMessage = (props: SystemMessageProps): JSX.Element => {\n const {\n iconName,\n content\n } = props;\n const Icon: JSX.Element = <FontIcon iconName={iconName} className={mergeStyles(systemMessageIconStyle)} />;\n const [liveMessage, setLiveMessage] = useState('');\n useEffect(() => {\n // Timeout is needed to handle situation when the same user joins and leaves a chat a few times in a row, otherwise Narrator won't repeat the system message text.\n // Because delay value is not provided, setMessage function will be executed asynchronously in the next event cycle\n setTimeout(() => {\n setLiveMessage(content);\n });\n }, [content]);\n return <>\n <LiveMessage message={liveMessage} ariaLive=\"polite\" clearOnUnmount={true} />\n <Stack horizontal className={mergeStyles(props?.containerStyle as IStyle)} tabIndex={0}>\n {Icon}\n <Text style={{\n wordBreak: 'break-word'\n }} role=\"status\" title={content} variant={'small'}>\n {content}\n </Text>\n </Stack>\n </>;\n};"]}
@@ -14,7 +14,6 @@ export const UnsupportedBrowser = (props) => {
14
14
  return React.createElement(UnsupportedEnvironment, { onTroubleshootingClick: onTroubleshootingClick, strings: Object.assign(Object.assign({}, unsupportedBrowserStringsTrampoline(locale)), strings) });
15
15
  };
16
16
  const unsupportedBrowserStringsTrampoline = (locale) => {
17
- return locale.strings.UnsupportedBrowser;
18
17
  return {
19
18
  primaryText: '',
20
19
  secondaryText: '',