@azure/communication-react 1.26.0-beta.1 → 1.26.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 (523) hide show
  1. package/dist/communication-react.d.ts +70 -1840
  2. package/dist/dist-cjs/communication-react/index.js +38777 -177
  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 +0 -5
  15. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -6
  16. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -19
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -59
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -30
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  22. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +1 -16
  23. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  25. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  26. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +0 -5
  28. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -8
  29. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  30. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js +2 -0
  31. package/dist/dist-esm/calling-stateful-client/src/BreakoutRoomsSubscriber.js.map +1 -1
  32. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  33. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +6 -127
  35. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -20
  37. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +4 -136
  38. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +3 -0
  40. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  41. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -5
  42. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +15 -27
  43. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +0 -6
  45. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -22
  46. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  47. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -9
  48. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +1 -45
  49. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  50. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  51. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  52. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -3
  54. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +0 -7
  55. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +0 -8
  57. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  59. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -2
  61. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  62. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  63. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  64. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  65. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  66. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -4
  67. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  68. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  69. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.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 +0 -28
  79. package/dist/dist-esm/communication-react/src/index.js +0 -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/CaptionsBanner.d.ts +1 -1
  85. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +7 -9
  86. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  87. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  88. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  89. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  90. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  91. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  92. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  114. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  116. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  117. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  118. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +0 -2
  119. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +1 -5
  120. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
  121. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  122. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  123. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +4 -4
  125. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  126. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  127. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  128. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +3 -3
  130. package/dist/dist-esm/react-components/src/components/RealTimeText.js +1 -1
  131. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +3 -3
  133. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js +2 -2
  134. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  136. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  137. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +3 -3
  139. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js +1 -1
  140. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  142. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  143. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  144. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  146. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  148. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  149. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +1 -1
  150. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  151. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -5
  152. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +1 -34
  154. package/dist/dist-esm/react-components/src/components/VideoGallery.js +5 -18
  155. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -21
  157. package/dist/dist-esm/react-components/src/components/index.js +0 -8
  158. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  159. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  160. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  161. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  162. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +4 -10
  163. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  165. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  166. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  168. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  169. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  170. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  171. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  172. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  174. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  176. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  177. package/dist/dist-esm/react-components/src/components/utils.js +2 -2
  178. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  179. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  180. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  181. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  182. package/dist/dist-esm/react-components/src/index.d.ts +0 -2
  183. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  184. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -54
  185. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  186. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +10 -0
  187. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +10 -0
  188. package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +10 -0
  189. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +10 -0
  190. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +10 -0
  191. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +10 -0
  192. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +10 -0
  193. package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +10 -0
  194. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +10 -0
  195. package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +10 -0
  196. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +10 -0
  197. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +10 -0
  198. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +10 -0
  199. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +10 -0
  200. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +10 -0
  201. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +10 -0
  202. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +10 -0
  203. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +10 -0
  204. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +10 -0
  205. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +10 -0
  206. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +10 -0
  207. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +10 -0
  208. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +10 -0
  209. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +10 -0
  210. package/dist/dist-esm/react-components/src/theming/icons.d.ts +2 -26
  211. package/dist/dist-esm/react-components/src/theming/icons.js +3 -87
  212. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  213. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  214. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  215. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  216. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  217. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  218. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  219. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  220. package/dist/dist-esm/react-components/src/types/index.d.ts +0 -1
  221. package/dist/dist-esm/react-components/src/types/index.js +0 -1
  222. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +15 -72
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +10 -23
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -43
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +15 -52
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +3 -49
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/BreakoutRoomsBanner.js.map +1 -1
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +3 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +9 -8
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -0
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +5 -7
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +9 -7
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js +2 -0
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useCompositeStringsForNotificationStack.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -15
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -3
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -1
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +16 -6
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -40
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +1 -17
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -14
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -55
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -65
  279. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +6 -12
  280. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -17
  282. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -42
  283. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -63
  285. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -6
  287. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -7
  288. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  290. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  291. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  292. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -8
  293. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  294. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
  295. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  296. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  297. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  299. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  300. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  302. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  303. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  304. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  305. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  307. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  309. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  311. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  313. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  314. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  315. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -2
  316. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  317. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +3 -33
  318. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  319. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +6 -33
  320. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  321. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  322. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  324. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  325. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  326. package/dist/dist-esm/react-composites/src/composites/common/adapters.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  328. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  329. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +3 -36
  331. package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -5
  332. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  334. package/package.json +4 -4
  335. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-_ut2lrbr.js +0 -205
  336. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-_ut2lrbr.js.map +0 -1
  337. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-7nvSQdDx.js +0 -49
  338. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-7nvSQdDx.js.map +0 -1
  339. package/dist/dist-cjs/communication-react/index-BHwWI_Bx.js +0 -45874
  340. package/dist/dist-cjs/communication-react/index-BHwWI_Bx.js.map +0 -1
  341. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  342. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  343. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  344. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  345. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  346. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  347. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.d.ts +0 -14
  348. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js +0 -204
  349. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js.map +0 -1
  350. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  351. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  352. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  353. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.d.ts +0 -24
  354. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js +0 -60
  355. package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js.map +0 -1
  356. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.d.ts +0 -18
  357. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js +0 -31
  358. package/dist/dist-esm/calling-stateful-client/src/TogetherModeVideoStreamSubscriber.js.map +0 -1
  359. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  360. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  361. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  362. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  363. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  364. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  365. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  366. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  367. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  368. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  369. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  370. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  371. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  372. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  373. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  374. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  375. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  376. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  377. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  378. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  379. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  380. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  381. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  382. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  383. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  384. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  385. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  386. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  387. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  388. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  389. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
  390. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
  391. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  392. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  393. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  394. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  395. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  396. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  397. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  398. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  399. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  400. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  401. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  402. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  403. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  404. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
  405. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
  406. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  407. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
  408. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -332
  409. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  410. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  411. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  412. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  413. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  414. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -177
  415. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  416. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  417. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  418. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  419. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.d.ts +0 -9
  420. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js +0 -16
  421. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js.map +0 -1
  422. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  423. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -229
  424. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  425. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  426. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  427. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  428. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  429. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  430. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  431. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  432. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  433. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  434. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  435. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  436. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  437. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  438. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  439. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  440. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  441. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  442. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  443. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  444. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  445. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  446. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.d.ts +0 -15
  447. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +0 -91
  448. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +0 -1
  449. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.d.ts +0 -10
  450. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js +0 -14
  451. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js.map +0 -1
  452. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.d.ts +0 -23
  453. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +0 -47
  454. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +0 -1
  455. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  456. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  457. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  458. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  459. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  460. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  461. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  462. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -324
  463. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  464. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  465. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  466. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  467. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  468. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  469. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  470. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  471. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  472. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  473. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.d.ts +0 -98
  474. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js +0 -181
  475. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js.map +0 -1
  476. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  477. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  478. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  479. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
  480. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
  481. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  482. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  483. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  484. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  485. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  486. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  487. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  488. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  489. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  490. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  491. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.d.ts +0 -59
  492. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js +0 -2
  493. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +0 -1
  494. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  495. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
  496. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  497. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  498. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  499. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  500. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  501. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  502. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  503. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  504. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  505. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  506. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  507. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  508. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  509. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  510. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  511. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  512. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  513. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  514. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  515. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  516. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  517. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  518. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  519. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  520. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  521. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  522. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  523. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1,78 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useCallback, useMemo, useState } from 'react';
4
- import { RichTextEditor } from './RichTextEditor';
5
- import { useTheme } from '../../theming';
6
- import { Icon, Stack } from '@fluentui/react';
7
- import { InputBoxButton } from '../InputBoxButton';
8
- import { isEnterKeyEventFromCompositionSession } from '../utils';
9
- import { richTextActionButtonsDividerStyle, richTextActionButtonsStackStyle, richTextActionButtonsStyle, richTextFormatButtonIconStyle } from '../styles/RichTextEditor.styles';
10
- import { inputBoxContentStackStyle, inputBoxRichTextStackItemStyle, inputBoxRichTextStackStyle, richTextBorderBoxStyle } from '../styles/RichTextInputBoxComponent.styles';
11
- /**
12
- * @private
13
- */
14
- export const RichTextInputBoxComponent = (props) => {
15
- const { placeholderText, initialContent, onChange, onEnterKeyDown, editorComponentRef, disabled, strings, actionComponents, onRenderAttachmentUploads, hasAttachments, richTextEditorStyleProps, isHorizontalLayoutDisabled = false, autoFocus, onTyping, onInsertInlineImage } = props;
16
- const theme = useTheme();
17
- // undefined is used to indicate that the rich text editor toolbar state wasn't changed yet
18
- const [showRichTextEditorFormatting, setShowRichTextEditorFormatting] = useState(undefined);
19
- const [contentModel, setContentModel] = useState(undefined);
20
- const onRenderRichTextEditorIcon = useCallback((isHover) => {
21
- const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;
22
- return React.createElement(Icon, { iconName: isHover || isRichTextEditorToolbarShown ? 'RichTextEditorButtonIconFilled' : 'RichTextEditorButtonIcon', className: richTextFormatButtonIconStyle(theme, !disabled && (isHover || isRichTextEditorToolbarShown)) });
23
- }, [disabled, showRichTextEditorFormatting, theme]);
24
- const actionButtons = useMemo(() => {
25
- return React.createElement(Stack.Item, { align: "end", className: richTextActionButtonsStackStyle },
26
- React.createElement(Stack, { horizontal: true },
27
- React.createElement(InputBoxButton, { onRenderIcon: onRenderRichTextEditorIcon, onClick: e => {
28
- const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;
29
- setShowRichTextEditorFormatting(!isRichTextEditorToolbarShown);
30
- e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.
31
- }, ariaLabel: strings.richTextFormatButtonTooltip, tooltipContent: strings.richTextFormatButtonTooltip, className: richTextActionButtonsStyle, "data-testId": 'rich-text-input-box-format-button', ariaExpanded: showRichTextEditorFormatting }),
32
- React.createElement(Icon, { iconName: "RichTextDividerIcon", className: richTextActionButtonsDividerStyle(theme) }),
33
- actionComponents));
34
- }, [actionComponents, onRenderRichTextEditorIcon, showRichTextEditorFormatting, strings.richTextFormatButtonTooltip, theme]);
35
- const richTextEditorStyle = useMemo(() => {
36
- return richTextEditorStyleProps(showRichTextEditorFormatting === true);
37
- }, [richTextEditorStyleProps, showRichTextEditorFormatting]);
38
- const onKeyDown = useCallback((ev) => {
39
- if (isEnterKeyEventFromCompositionSession(ev)) {
40
- return;
41
- }
42
- const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;
43
- if (ev.key === 'Enter' && ev.shiftKey === false && !isRichTextEditorToolbarShown) {
44
- ev.preventDefault();
45
- onEnterKeyDown && onEnterKeyDown();
46
- }
47
- else {
48
- onTyping === null || onTyping === void 0 ? void 0 : onTyping();
49
- }
50
- }, [onEnterKeyDown, showRichTextEditorFormatting, onTyping]);
51
- const onCompositionUpdate = useCallback(() => {
52
- onTyping === null || onTyping === void 0 ? void 0 : onTyping();
53
- }, [onTyping]);
54
- const useHorizontalLayout = useMemo(() => {
55
- const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;
56
- return !isHorizontalLayoutDisabled && !isRichTextEditorToolbarShown && !hasAttachments;
57
- }, [isHorizontalLayoutDisabled, showRichTextEditorFormatting, hasAttachments]);
58
- const onContentModelUpdate = useCallback((contentModel) => {
59
- setContentModel(contentModel);
60
- }, []);
61
- return React.createElement("div", { className: richTextBorderBoxStyle({
62
- theme: theme,
63
- disabled: !!disabled
64
- }) },
65
- React.createElement("div", { className: inputBoxContentStackStyle, style: {
66
- display: 'flex',
67
- flexGrow: 1,
68
- flexDirection: useHorizontalLayout ? 'row' : 'column',
69
- justifyContent: useHorizontalLayout ? 'flex-end' : 'space-between',
70
- flexWrap: useHorizontalLayout ? 'wrap' : 'nowrap'
71
- } },
72
- React.createElement(Stack, { grow: true, className: inputBoxRichTextStackStyle },
73
- React.createElement(Stack.Item, { className: inputBoxRichTextStackItemStyle },
74
- React.createElement(RichTextEditor, { contentModel: contentModel, initialContent: initialContent, placeholderText: placeholderText, onChange: onChange, onKeyDown: onKeyDown, onCompositionUpdate: onCompositionUpdate, ref: editorComponentRef, strings: strings, showRichTextEditorFormatting: showRichTextEditorFormatting === true, styles: richTextEditorStyle, autoFocus: autoFocus, onContentModelUpdate: onContentModelUpdate, onPaste: props.onPaste, onInsertInlineImage: onInsertInlineImage })),
75
- onRenderAttachmentUploads && onRenderAttachmentUploads()),
76
- actionButtons));
77
- };
78
- //# sourceMappingURL=RichTextInputBoxComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextInputBoxComponent.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,cAAc,EAAwD,MAAM,kBAAkB,CAAC;AAExG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qCAAqC,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAAE,iCAAiC,EAAE,+BAA+B,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChL,OAAO,EAAE,yBA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ACnD,oBAAC,cAAc,IAAC,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,GAAG,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,KAAK,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,SAAS,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,GAAI,CAC1c;gBACZ,yBAAyB,IAAI,yBAAyB,EAAE,CACnD;YACP,aAAa,CACV,CACF,CAAC;AACX,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { ReactNode, useCallback, useMemo, useState } from 'react';\nimport { BaseCustomStyles } from '../../types';\nimport { RichTextEditor, RichTextEditorComponentRef, RichTextEditorStyleProps } from './RichTextEditor';\nimport { RichTextSendBoxStrings } from './RichTextSendBox';\nimport { useTheme } from '../../theming';\nimport { Icon, Stack } from '@fluentui/react';\nimport { InputBoxButton } from '../InputBoxButton';\nimport { isEnterKeyEventFromCompositionSession } from '../utils';\nimport { richTextActionButtonsDividerStyle, richTextActionButtonsStackStyle, richTextActionButtonsStyle, richTextFormatButtonIconStyle } from '../styles/RichTextEditor.styles';\nimport { inputBoxContentStackStyle, inputBoxRichTextStackItemStyle, inputBoxRichTextStackStyle, richTextBorderBoxStyle } from '../styles/RichTextInputBoxComponent.styles';\nimport type { ContentModelDocument } from 'roosterjs-content-model-types';\n\n/**\n * @private\n */\nexport interface RichTextInputBoxComponentStylesProps extends BaseCustomStyles {}\n\n/**\n * @private\n */\nexport interface RichTextInputBoxComponentProps {\n placeholderText?: string;\n // the initial content of editor that is set when editor is created (e.g. when editing a message)\n initialContent?: string;\n onChange: (newValue?: string, removedInlineImages?: Record<string, string>[]) => void;\n onEnterKeyDown?: () => void;\n editorComponentRef: React.RefObject<RichTextEditorComponentRef>;\n // Partial needs to be removed when the rich text editor feature goes to GA\n strings: Partial<RichTextSendBoxStrings>;\n disabled: boolean;\n actionComponents: ReactNode;\n onRenderAttachmentUploads?: () => JSX.Element;\n hasAttachments?: boolean;\n // props for min and max height for the rich text editor\n // otherwise the editor will grow to fit the content\n richTextEditorStyleProps: (isExpanded: boolean) => RichTextEditorStyleProps;\n isHorizontalLayoutDisabled?: boolean;\n autoFocus?: 'sendBoxTextField';\n onTyping?: () => Promise<void>;\n onPaste?: (event: {\n content: DocumentFragment;\n }) => void;\n onInsertInlineImage?: (imageAttributes: Record<string, string>) => void;\n}\n\n/**\n * @private\n */\nexport const RichTextInputBoxComponent = (props: RichTextInputBoxComponentProps): JSX.Element => {\n const {\n placeholderText,\n initialContent,\n onChange,\n onEnterKeyDown,\n editorComponentRef,\n disabled,\n strings,\n actionComponents,\n onRenderAttachmentUploads,\n hasAttachments,\n richTextEditorStyleProps,\n isHorizontalLayoutDisabled = false,\n autoFocus,\n onTyping,\n onInsertInlineImage\n } = props;\n const theme = useTheme();\n // undefined is used to indicate that the rich text editor toolbar state wasn't changed yet\n const [showRichTextEditorFormatting, setShowRichTextEditorFormatting] = useState<boolean | undefined>(undefined);\n const [contentModel, setContentModel] = useState<ContentModelDocument | undefined>(undefined);\n const onRenderRichTextEditorIcon = useCallback((isHover: boolean) => {\n const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;\n return <Icon iconName={isHover || isRichTextEditorToolbarShown ? 'RichTextEditorButtonIconFilled' : 'RichTextEditorButtonIcon'} className={richTextFormatButtonIconStyle(theme, !disabled && (isHover || isRichTextEditorToolbarShown))} />;\n }, [disabled, showRichTextEditorFormatting, theme]);\n const actionButtons = useMemo(() => {\n return <Stack.Item align=\"end\" className={richTextActionButtonsStackStyle}>\n <Stack horizontal>\n <InputBoxButton onRenderIcon={onRenderRichTextEditorIcon} onClick={e => {\n const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;\n setShowRichTextEditorFormatting(!isRichTextEditorToolbarShown);\n e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.\n }} ariaLabel={strings.richTextFormatButtonTooltip} tooltipContent={strings.richTextFormatButtonTooltip} className={richTextActionButtonsStyle} data-testId={'rich-text-input-box-format-button'} ariaExpanded={showRichTextEditorFormatting} />\n <Icon iconName=\"RichTextDividerIcon\" className={richTextActionButtonsDividerStyle(theme)} />\n {actionComponents}\n </Stack>\n </Stack.Item>;\n }, [actionComponents, onRenderRichTextEditorIcon, showRichTextEditorFormatting, strings.richTextFormatButtonTooltip, theme]);\n const richTextEditorStyle = useMemo(() => {\n return richTextEditorStyleProps(showRichTextEditorFormatting === true);\n }, [richTextEditorStyleProps, showRichTextEditorFormatting]);\n const onKeyDown = useCallback((ev: KeyboardEvent) => {\n if (isEnterKeyEventFromCompositionSession(ev)) {\n return;\n }\n const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;\n if (ev.key === 'Enter' && ev.shiftKey === false && !isRichTextEditorToolbarShown) {\n ev.preventDefault();\n onEnterKeyDown && onEnterKeyDown();\n } else {\n onTyping?.();\n }\n }, [onEnterKeyDown, showRichTextEditorFormatting, onTyping]);\n const onCompositionUpdate = useCallback(() => {\n onTyping?.();\n }, [onTyping]);\n const useHorizontalLayout = useMemo(() => {\n const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;\n return !isHorizontalLayoutDisabled && !isRichTextEditorToolbarShown && !hasAttachments;\n }, [isHorizontalLayoutDisabled, showRichTextEditorFormatting, hasAttachments]);\n const onContentModelUpdate = useCallback((contentModel: ContentModelDocument | undefined) => {\n setContentModel(contentModel);\n }, []);\n return <div className={richTextBorderBoxStyle({\n theme: theme,\n disabled: !!disabled\n })}>\n {/* This layout is used for the compact view when formatting options are not shown */}\n {/* We don't use a stack here as there is a bug in Fluent Stack that causes remount of children when using wrap */}\n <div className={inputBoxContentStackStyle} style={{\n display: 'flex',\n flexGrow: 1,\n flexDirection: useHorizontalLayout ? 'row' : 'column',\n justifyContent: useHorizontalLayout ? 'flex-end' : 'space-between',\n flexWrap: useHorizontalLayout ? 'wrap' : 'nowrap'\n }}>\n {/* Fixes the issue when flex box can grow to be bigger than parent */}\n <Stack grow className={inputBoxRichTextStackStyle}>\n <Stack.Item className={inputBoxRichTextStackItemStyle}>\n <RichTextEditor contentModel={contentModel} initialContent={initialContent} placeholderText={placeholderText} onChange={onChange} onKeyDown={onKeyDown} onCompositionUpdate={onCompositionUpdate} ref={editorComponentRef} strings={strings} showRichTextEditorFormatting={showRichTextEditorFormatting === true} styles={richTextEditorStyle} autoFocus={autoFocus} onContentModelUpdate={onContentModelUpdate} onPaste={props.onPaste} onInsertInlineImage={onInsertInlineImage} />\n </Stack.Item>\n {onRenderAttachmentUploads && onRenderAttachmentUploads()}\n </Stack>\n {actionButtons}\n </div>\n </div>;\n};"]}
@@ -1,215 +0,0 @@
1
- /// <reference types="react" />
2
- import { SendBoxStrings } from '../SendBox';
3
- import { AttachmentMetadataInProgress, MessageOptions } from "../../../../acs-ui-common/src";
4
- /**
5
- * Strings of {@link RichTextSendBox} that can be overridden.
6
- *
7
- * @beta
8
- */
9
- export interface RichTextSendBoxStrings extends RichTextStrings, SendBoxStrings {
10
- }
11
- /**
12
- * Options for the rich text editor configuration.
13
- *
14
- * @beta
15
- */
16
- export interface RichTextEditorOptions {
17
- /**
18
- * Optional callback to handle paste event.
19
- */
20
- onPaste?: (event: {
21
- content: DocumentFragment;
22
- }) => void;
23
- }
24
- /**
25
- * Strings of RichText that can be overridden.
26
- *
27
- * @beta
28
- */
29
- export interface RichTextStrings {
30
- /**
31
- * Tooltip text for the bold button.
32
- */
33
- richTextBoldTooltip: string;
34
- /**
35
- * Tooltip text for the italic button.
36
- */
37
- richTextItalicTooltip: string;
38
- /**
39
- * Tooltip text for the underline button.
40
- */
41
- richTextUnderlineTooltip: string;
42
- /**
43
- * Tooltip text for the bullet list button.
44
- */
45
- richTextBulletListTooltip: string;
46
- /**
47
- * Tooltip text for the number list button.
48
- */
49
- richTextNumberListTooltip: string;
50
- /**
51
- * Tooltip text for the increase indent button.
52
- */
53
- richTextIncreaseIndentTooltip: string;
54
- /**
55
- * Tooltip text for the decrease indent button.
56
- */
57
- richTextDecreaseIndentTooltip: string;
58
- /**
59
- * Tooltip text insert table button.
60
- */
61
- richTextInsertTableTooltip: string;
62
- /**
63
- * Tooltip text for the rich text format button button.
64
- */
65
- richTextFormatButtonTooltip: string;
66
- /**
67
- * Text for the insert menu item.
68
- */
69
- richTextInsertRowOrColumnMenu: string;
70
- /**
71
- * Title for the insert table menu.
72
- */
73
- richTextInsertTableMenuTitle: string;
74
- /**
75
- * Text for the insert menu item to insert row above the current selection.
76
- */
77
- richTextInsertRowAboveMenu: string;
78
- /**
79
- * Text for the insert menu item to insert row below the current selection.
80
- */
81
- richTextInsertRowBelowMenu: string;
82
- /**
83
- * Text for the insert menu item to insert column to the left from the current selection.
84
- */
85
- richTextInsertColumnLeftMenu: string;
86
- /**
87
- * Text for the insert menu item to insert column to the right from the current selection.
88
- */
89
- richTextInsertColumnRightMenu: string;
90
- /**
91
- * Text for the delete row or column menu.
92
- */
93
- richTextDeleteRowOrColumnMenu: string;
94
- /**
95
- * Text for the delete column menu.
96
- */
97
- richTextDeleteColumnMenu: string;
98
- /**
99
- * Text for the delete row menu.
100
- */
101
- richTextDeleteRowMenu: string;
102
- /**
103
- * Text for the delete table menu.
104
- */
105
- richTextDeleteTableMenu: string;
106
- /**
107
- * Text for the rich text toolbar.
108
- */
109
- richTextToolbarAriaLabel: string;
110
- /**
111
- * Text for the rich text toolbar more button.
112
- */
113
- richTextToolbarMoreButtonAriaLabel: string;
114
- /**
115
- * Text for announcement when a new bulleted list item is added.
116
- */
117
- richTextNewBulletedListItemAnnouncement: string;
118
- /**
119
- * Text for announcement when a new numbered list item is added.
120
- */
121
- richTextNewNumberedListItemAnnouncement: string;
122
- /**
123
- * Text for announcement when the bulleted list style is applied.
124
- */
125
- richTextBulletedListAppliedAnnouncement: string;
126
- /**
127
- * Text for announcement when the numbered list style is applied.
128
- */
129
- richTextNumberedListAppliedAnnouncement: string;
130
- /**
131
- * Error message indicating image upload is not complete.
132
- */
133
- imageUploadsPendingError: string;
134
- }
135
- /**
136
- * Props for {@link RichTextSendBox}.
137
- *
138
- * @beta
139
- */
140
- export interface RichTextSendBoxProps {
141
- /**
142
- * Optional boolean to disable text box
143
- * @defaultValue false
144
- */
145
- disabled?: boolean;
146
- /**
147
- * Optional callback to handle paste event.
148
- */
149
- onPaste?: (event: {
150
- content: DocumentFragment;
151
- }) => void;
152
- /**
153
- * Optional strings to override in component
154
- */
155
- strings?: Partial<RichTextSendBoxStrings>;
156
- /**
157
- * Optional text for system message above the text box
158
- */
159
- systemMessage?: string;
160
- /**
161
- * Optional array of type {@link AttachmentMetadataInProgress}
162
- * to render attachments being uploaded in the SendBox.
163
- * @beta
164
- */
165
- attachments?: AttachmentMetadataInProgress[];
166
- /**
167
- * enumerable to determine if the input box has focus on render or not.
168
- * When undefined nothing has focus on render
169
- */
170
- autoFocus?: 'sendBoxTextField';
171
- /**
172
- * Optional callback to remove the attachment upload before sending by clicking on
173
- * cancel icon.
174
- */
175
- onCancelAttachmentUpload?: (attachmentId: string) => void;
176
- /**
177
- * Optional callback invoked after inline image is removed from the UI.
178
- * @param imageAttributes - attributes of the image such as id, src, style, etc.
179
- * It also contains the image file name which can be accessed through imageAttributes['data-image-file-name'].
180
- * Note that if the src attribute is a local blob url, it has been revoked at this point.
181
- */
182
- onRemoveInlineImage?: (imageAttributes: Record<string, string>) => void;
183
- /**
184
- * Callback function used when the send button is clicked.
185
- */
186
- onSendMessage: (content: string, options?: MessageOptions) => Promise<void>;
187
- /**
188
- * Optional callback called when user is typing
189
- */
190
- onTyping?: () => Promise<void>;
191
- /**
192
- * Optional callback to handle an inline image that's inserted in the rich text editor.
193
- * When not provided, pasting images into rich text editor will be disabled.
194
- * @param imageAttributes - attributes of the image such as id, src, style, etc.
195
- * It also contains the image file name which can be accessed through imageAttributes['data-image-file-name']
196
- */
197
- onInsertInlineImage?: (imageAttributes: Record<string, string>) => void;
198
- /**
199
- * Optional Array of type {@link AttachmentMetadataInProgress}
200
- * to render the errorBar for inline images inserted in the RichTextSendBox when:
201
- * - there is an error provided in the inlineImagesWithProgress
202
- * - progress is less than 1 when the send button is clicked
203
- * - content html string is longer than the max allowed length.
204
- * (Note that the id and the url prop of the inlineImagesWithProgress will be used as the id and src attribute of the content html
205
- * when calculating the content length, only for the purpose of displaying the content length overflow error.)
206
- */
207
- inlineImagesWithProgress?: AttachmentMetadataInProgress[];
208
- }
209
- /**
210
- * A component to render SendBox with Rich Text Editor support.
211
- *
212
- * @beta
213
- */
214
- export declare const RichTextSendBox: (props: RichTextSendBoxProps) => JSX.Element;
215
- //# sourceMappingURL=RichTextSendBox.d.ts.map
@@ -1,177 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useCallback, useMemo, useRef, useState } from 'react';
4
- import { RichTextInputBoxComponent } from './RichTextInputBoxComponent';
5
- import { Icon, Stack } from '@fluentui/react';
6
- import { useLocale } from '../../localization';
7
- import { sendIconStyle } from '../styles/SendBox.styles';
8
- import { useV9CustomStyles } from '../styles/SendBox.styles';
9
- import { InputBoxButton } from '../InputBoxButton';
10
- import { RichTextSendBoxErrors } from './RichTextSendBoxErrors';
11
- import { isMessageTooLong, isSendBoxButtonDisabled, sanitizeText, modifyInlineImagesInContentString } from '../utils/SendBoxUtils';
12
- import { hasInlineImageContent, getContentWithUpdatedInlineImagesInfo } from '../utils/SendBoxUtils';
13
- import { useTheme } from '../../theming';
14
- import { richTextActionButtonsStyle, sendBoxRichTextEditorStyle } from '../styles/RichTextEditor.styles';
15
- import { _AttachmentUploadCards } from '../Attachment/AttachmentUploadCards';
16
- import { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads, toAttachmentMetadata } from '../utils/SendBoxUtils';
17
- import { SendBoxErrorBarType } from '../SendBoxErrorBar';
18
- import { attachmentUploadCardsStyles } from '../styles/SendBox.styles';
19
- import { FluentV9ThemeProvider } from '../../theming/FluentV9ThemeProvider';
20
- import { richTextSendBoxIdentifier } from './RichTextSendBoxUtils';
21
- /**
22
- * A component to render SendBox with Rich Text Editor support.
23
- *
24
- * @beta
25
- */
26
- export const RichTextSendBox = (props) => {
27
- const { disabled = false, systemMessage, autoFocus, onSendMessage, onTyping, attachments, onCancelAttachmentUpload, onPaste, onInsertInlineImage, inlineImagesWithProgress, onRemoveInlineImage } = props;
28
- const theme = useTheme();
29
- const locale = useLocale();
30
- const localeStrings = useMemo(() => {
31
- return locale.strings.richTextSendBox;
32
- return locale.strings.sendBox;
33
- }, [locale.strings.richTextSendBox, locale.strings.sendBox]);
34
- const strings = useMemo(() => {
35
- return Object.assign(Object.assign({}, localeStrings), props.strings);
36
- }, [localeStrings, props.strings]);
37
- const [contentValue, setContentValue] = useState('');
38
- const [contentValueOverflow, setContentValueOverflow] = useState(false);
39
- const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState(undefined);
40
- const editorComponentRef = useRef(null);
41
- const customV9Styles = useV9CustomStyles();
42
- const contentTooLongMessage = useMemo(() => contentValueOverflow ? strings.textTooLong : undefined, [contentValueOverflow, strings.textTooLong]);
43
- const setContent = useCallback((newValue) => {
44
- if (newValue === undefined) {
45
- return;
46
- }
47
- setContentValueOverflow(isMessageTooLong(newValue.length));
48
- setContentValue(newValue);
49
- }, []);
50
- const onChangeHandler = useCallback((newValue, removedInlineImages) => {
51
- removedInlineImages === null || removedInlineImages === void 0 ? void 0 : removedInlineImages.forEach((removedInlineImage) => onRemoveInlineImage && onRemoveInlineImage(removedInlineImage));
52
- setContent(newValue);
53
- }, [setContent, onRemoveInlineImage]);
54
- const hasContent = useMemo(() => {
55
- var _a;
56
- // get plain text content from the editor to check if the message is empty
57
- // as the content may contain tags even when the content is empty
58
- const plainTextContent = (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent();
59
- const hasPlainText = sanitizeText(contentValue !== null && contentValue !== void 0 ? contentValue : '').length > 0 && sanitizeText(plainTextContent !== null && plainTextContent !== void 0 ? plainTextContent : '').length > 0;
60
- const hasInlineImages = hasInlineImageContent(contentValue);
61
- return hasPlainText || hasInlineImages;
62
- }, [contentValue]);
63
- const sendMessageOnClick = useCallback(() => {
64
- if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {
65
- const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(contentValue, inlineImagesWithProgress);
66
- const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);
67
- // Set contentValueOverflow state to display the error bar
68
- setContentValueOverflow(messageTooLong);
69
- // The change from the setContentValueOverflow in the previous line will not kick in yet.
70
- // We need to relay on the local value of messageTooLong to return early if the message is too long.
71
- if (messageTooLong) {
72
- return;
73
- }
74
- }
75
- if (disabled || contentValueOverflow) {
76
- return;
77
- }
78
- // Don't send message until all attachments have been uploaded successfully
79
- setAttachmentUploadsPendingError(undefined);
80
- const hasIncompleteImageUploads = hasIncompleteAttachmentUploads(inlineImagesWithProgress);
81
- if (hasIncompleteAttachmentUploads(attachments) || hasIncompleteImageUploads) {
82
- let errorMessage = strings.attachmentUploadsPendingError;
83
- if (hasIncompleteImageUploads) {
84
- errorMessage = strings.imageUploadsPendingError || '';
85
- }
86
- setAttachmentUploadsPendingError({
87
- message: errorMessage,
88
- timestamp: Date.now(),
89
- errorBarType: SendBoxErrorBarType.info
90
- });
91
- return;
92
- }
93
- // we don't want to send empty messages including spaces, newlines, tabs
94
- // Message can be empty if there is a valid attachment upload
95
- if (hasContent || isAttachmentUploadCompleted(attachments)) {
96
- const sendMessage = (content) => {
97
- var _a, _b;
98
- onSendMessage(content, {
99
- attachments: toAttachmentMetadata(attachments),
100
- type: 'html'
101
- });
102
- setContentValue('');
103
- (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.setEmptyContent();
104
- (_b = editorComponentRef.current) === null || _b === void 0 ? void 0 : _b.focus();
105
- };
106
- modifyInlineImagesInContentString(contentValue, [], (content) => {
107
- sendMessage(content);
108
- });
109
- }
110
- }, [disabled, contentValueOverflow, attachments, inlineImagesWithProgress, contentValue, hasContent, strings.attachmentUploadsPendingError, strings.imageUploadsPendingError, onSendMessage]);
111
- // ignore attachments error (errored attachment will not be added, shouldn't disable SendButton)
112
- const hasBlockingErrorMessages = useMemo(() => {
113
- var _a;
114
- return !!systemMessage || !!contentTooLongMessage || !!attachmentUploadsPendingError || !!((_a = inlineImagesWithProgress === null || inlineImagesWithProgress === void 0 ? void 0 : inlineImagesWithProgress.filter(image => image.error).pop()) === null || _a === void 0 ? void 0 : _a.error);
115
- }, [contentTooLongMessage, attachmentUploadsPendingError, systemMessage, inlineImagesWithProgress]);
116
- const isSendBoxButtonDisabledValue = useMemo(() => {
117
- return isSendBoxButtonDisabled({
118
- hasContent,
119
- hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),
120
- hasError: hasBlockingErrorMessages,
121
- disabled
122
- });
123
- }, [attachments, disabled, hasContent, hasBlockingErrorMessages]);
124
- const onRenderSendIcon = useCallback((isHover) => {
125
- return React.createElement(Icon, { iconName: isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend', className: sendIconStyle({
126
- theme,
127
- isSendBoxButtonDisabled: isSendBoxButtonDisabledValue,
128
- defaultTextColor: theme.palette.neutralSecondary
129
- }) });
130
- }, [theme, isSendBoxButtonDisabledValue, hasContent]);
131
- const sendBoxErrorsProps = useMemo(() => {
132
- var _a, _b, _c, _d;
133
- const uploadErrorMessage = (_b = (_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter(attachmentUpload => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message;
134
- const imageUploadErrorMessage = (_d = (_c = inlineImagesWithProgress === null || inlineImagesWithProgress === void 0 ? void 0 : inlineImagesWithProgress.filter(image => image.error).pop()) === null || _c === void 0 ? void 0 : _c.error) === null || _d === void 0 ? void 0 : _d.message;
135
- const errorMessage = uploadErrorMessage || imageUploadErrorMessage;
136
- let errorBarType = SendBoxErrorBarType.error;
137
- if (uploadErrorMessage) {
138
- errorBarType = SendBoxErrorBarType.warning;
139
- }
140
- return {
141
- attachmentUploadsPendingError: attachmentUploadsPendingError,
142
- attachmentProgressError: errorMessage ? {
143
- message: errorMessage,
144
- timestamp: Date.now(),
145
- errorBarType: errorBarType
146
- } : undefined,
147
- systemMessage: systemMessage,
148
- textTooLongMessage: contentTooLongMessage
149
- };
150
- }, [attachments, contentTooLongMessage, attachmentUploadsPendingError, inlineImagesWithProgress, systemMessage]);
151
- const onRenderAttachmentUploads = useCallback(() => {
152
- return React.createElement(Stack, { className: attachmentUploadCardsStyles },
153
- React.createElement(FluentV9ThemeProvider, { v8Theme: theme, className: customV9Styles.clearBackground },
154
- React.createElement(_AttachmentUploadCards, { attachments: attachments, onCancelAttachmentUpload: onCancelAttachmentUpload, strings: {
155
- removeAttachment: strings.removeAttachment,
156
- uploading: strings.uploading,
157
- uploadCompleted: strings.uploadCompleted,
158
- attachmentMoreMenu: strings.attachmentMoreMenu
159
- }, disabled: disabled })));
160
- }, [theme, customV9Styles.clearBackground, attachments, onCancelAttachmentUpload, strings.removeAttachment, strings.uploading, strings.uploadCompleted, strings.attachmentMoreMenu, disabled]);
161
- const sendButton = useMemo(() => {
162
- return React.createElement(InputBoxButton, { onRenderIcon: onRenderSendIcon, onClick: e => {
163
- sendMessageOnClick();
164
- e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.
165
- }, className: richTextActionButtonsStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel, disabled: isSendBoxButtonDisabledValue });
166
- }, [isSendBoxButtonDisabledValue, localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);
167
- const hasAttachmentUploads = useMemo(() => {
168
- return isAttachmentUploadCompleted(attachments) || hasIncompleteAttachmentUploads(attachments);
169
- }, [attachments]);
170
- return React.createElement(Stack, null,
171
- React.createElement(RichTextSendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
172
- React.createElement(RichTextInputBoxComponent, { placeholderText: strings.placeholderText, autoFocus: autoFocus, onChange: onChangeHandler, onEnterKeyDown: sendMessageOnClick, onTyping: onTyping, editorComponentRef: editorComponentRef, strings: strings, disabled: disabled, actionComponents: sendButton, richTextEditorStyleProps: sendBoxRichTextEditorStyle, onRenderAttachmentUploads: onRenderAttachmentUploads, hasAttachments: hasAttachmentUploads, onPaste: onPaste, onInsertInlineImage: onInsertInlineImage }));
173
- }; // Add component type check to assist in identification for usePropsFor
174
- // to avoid issue where production build does not have the component name
175
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
176
- RichTextSendBox[richTextSendBoxIdentifier] = true;
177
- //# sourceMappingURL=RichTextSendBox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RichTextSendBox.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/RichTextEditor/RichTextSendBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAA8B,MAAM,yBAAyB,CAAC;AAC5F,OAAO,E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B,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,cAAc,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,GAAI,CACpe,CAAC;AACb,CAAC,CAAC,CAAC,uEAAuE;AAC1E,yEAAyE;AACzE,8DAA8D;AAC7D,eAAuB,CAAC,yBAAyB,CAAC,GAAG,IAAI,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { RichTextInputBoxComponent } from './RichTextInputBoxComponent';\nimport { Icon, Stack } from '@fluentui/react';\nimport { useLocale } from '../../localization';\nimport { SendBoxStrings } from '../SendBox';\nimport { sendIconStyle } from '../styles/SendBox.styles';\nimport { useV9CustomStyles } from '../styles/SendBox.styles';\nimport { InputBoxButton } from '../InputBoxButton';\nimport { RichTextSendBoxErrors, RichTextSendBoxErrorsProps } from './RichTextSendBoxErrors';\nimport { isMessageTooLong, isSendBoxButtonDisabled, sanitizeText, modifyInlineImagesInContentString } from '../utils/SendBoxUtils';\nimport { hasInlineImageContent, getContentWithUpdatedInlineImagesInfo } from '../utils/SendBoxUtils';\nimport { RichTextEditorComponentRef } from './RichTextEditor';\nimport { useTheme } from '../../theming';\nimport { richTextActionButtonsStyle, sendBoxRichTextEditorStyle } from '../styles/RichTextEditor.styles';\nimport { _AttachmentUploadCards } from '../Attachment/AttachmentUploadCards';\nimport { AttachmentMetadataInProgress, MessageOptions } from '@internal/acs-ui-common';\nimport { isAttachmentUploadCompleted, hasIncompleteAttachmentUploads, toAttachmentMetadata } from '../utils/SendBoxUtils';\nimport { SendBoxErrorBarError } from '../SendBoxErrorBar';\nimport { SendBoxErrorBarType } from '../SendBoxErrorBar';\nimport { attachmentUploadCardsStyles } from '../styles/SendBox.styles';\nimport { FluentV9ThemeProvider } from '../../theming/FluentV9ThemeProvider';\nimport { richTextSendBoxIdentifier } from './RichTextSendBoxUtils';\n\n/**\n * Strings of {@link RichTextSendBox} that can be overridden.\n *\n * @beta\n */\nexport interface RichTextSendBoxStrings extends RichTextStrings, SendBoxStrings {}\n/**\n * Options for the rich text editor configuration.\n *\n * @beta\n */\nexport interface RichTextEditorOptions {\n /**\n * Optional callback to handle paste event.\n */\n onPaste?: (event: {\n content: DocumentFragment;\n }) => void;\n}\n\n/**\n * Strings of RichText that can be overridden.\n *\n * @beta\n */\nexport interface RichTextStrings {\n /**\n * Tooltip text for the bold button.\n */\n richTextBoldTooltip: string;\n /**\n * Tooltip text for the italic button.\n */\n richTextItalicTooltip: string;\n /**\n * Tooltip text for the underline button.\n */\n richTextUnderlineTooltip: string;\n /**\n * Tooltip text for the bullet list button.\n */\n richTextBulletListTooltip: string;\n /**\n * Tooltip text for the number list button.\n */\n richTextNumberListTooltip: string;\n /**\n * Tooltip text for the increase indent button.\n */\n richTextIncreaseIndentTooltip: string;\n /**\n * Tooltip text for the decrease indent button.\n */\n richTextDecreaseIndentTooltip: string;\n /**\n * Tooltip text insert table button.\n */\n richTextInsertTableTooltip: string;\n /**\n * Tooltip text for the rich text format button button.\n */\n richTextFormatButtonTooltip: string;\n /**\n * Text for the insert menu item.\n */\n richTextInsertRowOrColumnMenu: string;\n /**\n * Title for the insert table menu.\n */\n richTextInsertTableMenuTitle: string;\n /**\n * Text for the insert menu item to insert row above the current selection.\n */\n richTextInsertRowAboveMenu: string;\n /**\n * Text for the insert menu item to insert row below the current selection.\n */\n richTextInsertRowBelowMenu: string;\n /**\n * Text for the insert menu item to insert column to the left from the current selection.\n */\n richTextInsertColumnLeftMenu: string;\n /**\n * Text for the insert menu item to insert column to the right from the current selection.\n */\n richTextInsertColumnRightMenu: string;\n /**\n * Text for the delete row or column menu.\n */\n richTextDeleteRowOrColumnMenu: string;\n /**\n * Text for the delete column menu.\n */\n richTextDeleteColumnMenu: string;\n /**\n * Text for the delete row menu.\n */\n richTextDeleteRowMenu: string;\n /**\n * Text for the delete table menu.\n */\n richTextDeleteTableMenu: string;\n /**\n * Text for the rich text toolbar.\n */\n richTextToolbarAriaLabel: string;\n /**\n * Text for the rich text toolbar more button.\n */\n richTextToolbarMoreButtonAriaLabel: string;\n /**\n * Text for announcement when a new bulleted list item is added.\n */\n richTextNewBulletedListItemAnnouncement: string;\n /**\n * Text for announcement when a new numbered list item is added.\n */\n richTextNewNumberedListItemAnnouncement: string;\n /**\n * Text for announcement when the bulleted list style is applied.\n */\n richTextBulletedListAppliedAnnouncement: string;\n /**\n * Text for announcement when the numbered list style is applied.\n */\n richTextNumberedListAppliedAnnouncement: string;\n /**\n * Error message indicating image upload is not complete.\n */\n imageUploadsPendingError: string;\n}\n\n/**\n * Props for {@link RichTextSendBox}.\n *\n * @beta\n */\nexport interface RichTextSendBoxProps {\n /**\n * Optional boolean to disable text box\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Optional callback to handle paste event.\n */\n onPaste?: (event: {\n content: DocumentFragment;\n }) => void;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<RichTextSendBoxStrings>;\n /**\n * Optional text for system message above the text box\n */\n systemMessage?: string;\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 * 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 remove the attachment upload before sending by clicking on\n * cancel icon.\n */\n onCancelAttachmentUpload?: (attachmentId: string) => void;\n /**\n * Optional callback invoked after inline image is removed from the UI.\n * @param imageAttributes - attributes of the image such as id, src, style, etc.\n * It also contains the image file name which can be accessed through imageAttributes['data-image-file-name'].\n * Note that if the src attribute is a local blob url, it has been revoked at this point.\n */\n onRemoveInlineImage?: (imageAttributes: Record<string, string>) => void;\n /**\n * Callback function used when the send button is clicked.\n */\n onSendMessage: (content: string, options?: MessageOptions) => Promise<void>;\n /**\n * Optional callback called when user is typing\n */\n onTyping?: () => Promise<void>;\n /**\n * Optional callback to handle an inline image that's inserted in the rich text editor.\n * When not provided, pasting images into rich text editor will be disabled.\n * @param imageAttributes - attributes of the image such as id, src, style, etc.\n * It also contains the image file name which can be accessed through imageAttributes['data-image-file-name']\n */\n onInsertInlineImage?: (imageAttributes: Record<string, string>) => void;\n /**\n * Optional Array of type {@link AttachmentMetadataInProgress}\n * to render the errorBar for inline images inserted in the RichTextSendBox when:\n * - there is an error provided in the inlineImagesWithProgress\n * - progress is less than 1 when the send button is clicked\n * - content html string is longer than the max allowed length.\n * (Note that the id and the url prop of the inlineImagesWithProgress will be used as the id and src attribute of the content html\n * when calculating the content length, only for the purpose of displaying the content length overflow error.)\n */\n inlineImagesWithProgress?: AttachmentMetadataInProgress[];\n}\n\n/**\n * A component to render SendBox with Rich Text Editor support.\n *\n * @beta\n */\nexport const RichTextSendBox = (props: RichTextSendBoxProps): JSX.Element => {\n const {\n disabled = false,\n systemMessage,\n autoFocus,\n onSendMessage,\n onTyping,\n attachments,\n onCancelAttachmentUpload,\n onPaste,\n onInsertInlineImage,\n inlineImagesWithProgress,\n onRemoveInlineImage\n } = props;\n const theme = useTheme();\n const locale = useLocale();\n const localeStrings = useMemo(() => {\n return locale.strings.richTextSendBox;\n return locale.strings.sendBox;\n }, [locale.strings.richTextSendBox, locale.strings.sendBox]);\n const strings = useMemo(() => {\n return {\n ...localeStrings,\n ...props.strings\n };\n }, [localeStrings, props.strings]);\n const [contentValue, setContentValue] = useState('');\n const [contentValueOverflow, setContentValueOverflow] = useState(false);\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(undefined);\n const editorComponentRef = useRef<RichTextEditorComponentRef>(null);\n const customV9Styles = useV9CustomStyles();\n const contentTooLongMessage = useMemo(() => contentValueOverflow ? strings.textTooLong : undefined, [contentValueOverflow, strings.textTooLong]);\n const setContent = useCallback((newValue?: string): void => {\n if (newValue === undefined) {\n return;\n }\n setContentValueOverflow(isMessageTooLong(newValue.length));\n setContentValue(newValue);\n }, []);\n const onChangeHandler = useCallback((newValue?: string, removedInlineImages?: Record<string, string>[]) => {\n removedInlineImages?.forEach((removedInlineImage: Record<string, string>) => onRemoveInlineImage && onRemoveInlineImage(removedInlineImage));\n setContent(newValue);\n }, [setContent, onRemoveInlineImage]);\n const hasContent = useMemo(() => {\n // get plain text content from the editor to check if the message is empty\n // as the content may contain tags even when the content is empty\n const plainTextContent = editorComponentRef.current?.getPlainContent();\n const hasPlainText = sanitizeText(contentValue ?? '').length > 0 && sanitizeText(plainTextContent ?? '').length > 0;\n const hasInlineImages = hasInlineImageContent(contentValue);\n return hasPlainText || hasInlineImages;\n }, [contentValue]);\n const sendMessageOnClick = useCallback((): void => {\n if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {\n const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(contentValue, inlineImagesWithProgress);\n const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);\n // Set contentValueOverflow state to display the error bar\n setContentValueOverflow(messageTooLong);\n // The change from the setContentValueOverflow in the previous line will not kick in yet.\n // We need to relay on the local value of messageTooLong to return early if the message is too long.\n if (messageTooLong) {\n return;\n }\n }\n if (disabled || contentValueOverflow) {\n return;\n }\n // Don't send message until all attachments have been uploaded successfully\n setAttachmentUploadsPendingError(undefined);\n const hasIncompleteImageUploads = hasIncompleteAttachmentUploads(inlineImagesWithProgress);\n if (hasIncompleteAttachmentUploads(attachments) || hasIncompleteImageUploads) {\n let errorMessage = strings.attachmentUploadsPendingError;\n if (hasIncompleteImageUploads) {\n errorMessage = strings.imageUploadsPendingError || '';\n }\n setAttachmentUploadsPendingError({\n message: errorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\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 (hasContent || isAttachmentUploadCompleted(attachments)) {\n const sendMessage = (content: string): void => {\n onSendMessage(content, {\n attachments: toAttachmentMetadata(attachments),\n type: 'html'\n });\n setContentValue('');\n editorComponentRef.current?.setEmptyContent();\n editorComponentRef.current?.focus();\n };\n modifyInlineImagesInContentString(contentValue, [], (content: string) => {\n sendMessage(content);\n });\n }\n }, [disabled, contentValueOverflow, attachments, inlineImagesWithProgress, contentValue, hasContent, strings.attachmentUploadsPendingError, strings.imageUploadsPendingError, onSendMessage]);\n\n // ignore attachments error (errored attachment will not be added, shouldn't disable SendButton)\n const hasBlockingErrorMessages = useMemo(() => {\n return !!systemMessage || !!contentTooLongMessage || !!attachmentUploadsPendingError || !!inlineImagesWithProgress?.filter(image => image.error).pop()?.error;\n }, [contentTooLongMessage, attachmentUploadsPendingError, systemMessage, inlineImagesWithProgress]);\n const isSendBoxButtonDisabledValue = useMemo(() => {\n return isSendBoxButtonDisabled({\n hasContent,\n hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),\n hasError: hasBlockingErrorMessages,\n disabled\n });\n }, [attachments, disabled, hasContent, hasBlockingErrorMessages]);\n const onRenderSendIcon = useCallback((isHover: boolean) => {\n return <Icon iconName={isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend'} className={sendIconStyle({\n theme,\n isSendBoxButtonDisabled: isSendBoxButtonDisabledValue,\n defaultTextColor: theme.palette.neutralSecondary\n })} />;\n }, [theme, isSendBoxButtonDisabledValue, hasContent]);\n const sendBoxErrorsProps: RichTextSendBoxErrorsProps = useMemo(() => {\n const uploadErrorMessage = attachments?.filter(attachmentUpload => attachmentUpload.error).pop()?.error?.message;\n const imageUploadErrorMessage = inlineImagesWithProgress?.filter(image => image.error).pop()?.error?.message;\n const errorMessage = uploadErrorMessage || imageUploadErrorMessage;\n let errorBarType = SendBoxErrorBarType.error;\n if (uploadErrorMessage) {\n errorBarType = SendBoxErrorBarType.warning;\n }\n return {\n attachmentUploadsPendingError: attachmentUploadsPendingError,\n attachmentProgressError: errorMessage ? {\n message: errorMessage,\n timestamp: Date.now(),\n errorBarType: errorBarType\n } : undefined,\n systemMessage: systemMessage,\n textTooLongMessage: contentTooLongMessage\n };\n }, [attachments, contentTooLongMessage, attachmentUploadsPendingError, inlineImagesWithProgress, systemMessage]);\n const onRenderAttachmentUploads = useCallback(() => {\n return <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme} className={customV9Styles.clearBackground}>\n <_AttachmentUploadCards attachments={attachments} onCancelAttachmentUpload={onCancelAttachmentUpload} strings={{\n removeAttachment: strings.removeAttachment,\n uploading: strings.uploading,\n uploadCompleted: strings.uploadCompleted,\n attachmentMoreMenu: strings.attachmentMoreMenu\n }} disabled={disabled} />\n </FluentV9ThemeProvider>\n </Stack>;\n }, [theme, customV9Styles.clearBackground, attachments, onCancelAttachmentUpload, strings.removeAttachment, strings.uploading, strings.uploadCompleted, strings.attachmentMoreMenu, disabled]);\n const sendButton = useMemo(() => {\n return <InputBoxButton onRenderIcon={onRenderSendIcon} onClick={e => {\n sendMessageOnClick();\n e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.\n }} className={richTextActionButtonsStyle} ariaLabel={localeStrings.sendButtonAriaLabel} tooltipContent={localeStrings.sendButtonAriaLabel} disabled={isSendBoxButtonDisabledValue} />;\n }, [isSendBoxButtonDisabledValue, localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);\n const hasAttachmentUploads = useMemo(() => {\n return isAttachmentUploadCompleted(attachments) || hasIncompleteAttachmentUploads(attachments);\n }, [attachments]);\n return <Stack>\n <RichTextSendBoxErrors {...sendBoxErrorsProps} />\n <RichTextInputBoxComponent placeholderText={strings.placeholderText} autoFocus={autoFocus} onChange={onChangeHandler} onEnterKeyDown={sendMessageOnClick} onTyping={onTyping} editorComponentRef={editorComponentRef} strings={strings} disabled={disabled} actionComponents={sendButton} richTextEditorStyleProps={sendBoxRichTextEditorStyle} onRenderAttachmentUploads={onRenderAttachmentUploads} hasAttachments={hasAttachmentUploads} onPaste={onPaste} onInsertInlineImage={onInsertInlineImage} />\n </Stack>;\n}; // Add component type check to assist in identification for usePropsFor\n// to avoid issue where production build does not have the component name\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(RichTextSendBox as any)[richTextSendBoxIdentifier] = true;"]}
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import { SendBoxErrorBarError } from '../SendBoxErrorBar';
3
- /**
4
- * @private
5
- */
6
- export interface RichTextSendBoxErrorsProps {
7
- attachmentUploadsPendingError?: SendBoxErrorBarError;
8
- attachmentProgressError?: SendBoxErrorBarError;
9
- systemMessage?: string;
10
- textTooLongMessage?: string;
11
- }
12
- /**
13
- * @private
14
- */
15
- export declare const RichTextSendBoxErrors: (props: RichTextSendBoxErrorsProps) => JSX.Element;
16
- //# sourceMappingURL=RichTextSendBoxErrors.d.ts.map
@@ -1,75 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
4
- import { SendBoxErrorBar } from '../SendBoxErrorBar';
5
- /**
6
- * @private
7
- */
8
- export const RichTextSendBoxErrors = (props) => {
9
- const { attachmentProgressError, attachmentUploadsPendingError, systemMessage, textTooLongMessage } = props;
10
- const [sendBoxError, setSendBoxError] = useState(undefined);
11
- useEffect(() => {
12
- if (systemMessage && !isMessageEmpty(systemMessage)) {
13
- setSendBoxError({
14
- message: systemMessage,
15
- timestamp: Date.now()
16
- });
17
- }
18
- }, [systemMessage]);
19
- useEffect(() => {
20
- if (textTooLongMessage && !isMessageEmpty(textTooLongMessage)) {
21
- setSendBoxError({
22
- message: textTooLongMessage,
23
- timestamp: Date.now()
24
- });
25
- }
26
- }, [textTooLongMessage]);
27
- useEffect(() => {
28
- if ((textTooLongMessage === undefined || isMessageEmpty(textTooLongMessage)) && (systemMessage === undefined || isMessageEmpty(systemMessage))) {
29
- setSendBoxError(undefined);
30
- }
31
- }, [systemMessage, textTooLongMessage]);
32
- useEffect(() => {
33
- setSendBoxError(prev => {
34
- const errors = [];
35
- if (prev) {
36
- errors.push(prev);
37
- }
38
- if (attachmentUploadsPendingError) {
39
- errors.push(attachmentUploadsPendingError);
40
- }
41
- if (attachmentProgressError) {
42
- errors.push(attachmentProgressError);
43
- }
44
- if (errors.length === 0) {
45
- return undefined;
46
- }
47
- // sort to get the latest error
48
- const sortedErrors = errors.sort((a, b) => b.timestamp - a.timestamp);
49
- return sortedErrors[0];
50
- });
51
- }, [attachmentProgressError, attachmentUploadsPendingError]);
52
- const onDismiss = useCallback(() => {
53
- if (systemMessage && !isMessageEmpty(systemMessage)) {
54
- setSendBoxError({
55
- message: systemMessage,
56
- timestamp: Date.now()
57
- });
58
- return;
59
- }
60
- setSendBoxError(undefined);
61
- }, [systemMessage]);
62
- const dismissAfterMs = useMemo(() => {
63
- const delayInMs = 10 * 1000;
64
- // don't dismiss the system message
65
- if (systemMessage) {
66
- return (sendBoxError === null || sendBoxError === void 0 ? void 0 : sendBoxError.message) !== systemMessage ? delayInMs : undefined;
67
- }
68
- return delayInMs;
69
- }, [sendBoxError === null || sendBoxError === void 0 ? void 0 : sendBoxError.message, systemMessage]);
70
- return React.createElement(SendBoxErrorBar, { error: sendBoxError, dismissAfterMs: dismissAfterMs, onDismiss: onDismiss });
71
- };
72
- const isMessageEmpty = (message) => {
73
- return message.trim().length === 0;
74
- };
75
- //# sourceMappingURL=RichTextSendBoxErrors.js.map