@azure/communication-react 1.25.0-beta.1 → 1.25.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 (541) hide show
  1. package/dist/communication-react.d.ts +101 -2237
  2. package/dist/dist-cjs/communication-react/index.js +38066 -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 -14
  15. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -16
  16. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +0 -8
  18. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +2 -64
  19. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +2 -7
  21. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -28
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +1 -65
  24. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -30
  26. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +2 -21
  30. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  32. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  33. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +0 -5
  35. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -8
  36. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  38. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +12 -159
  40. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js +8 -1
  41. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -23
  43. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -229
  44. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  45. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -6
  46. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -30
  47. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +0 -12
  49. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -32
  50. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -9
  52. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +1 -45
  53. package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
  54. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  55. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  56. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  57. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -3
  58. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +0 -7
  59. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +0 -8
  61. package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
  62. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  63. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  64. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  65. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  66. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  67. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  68. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  69. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +2 -3
  70. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -3
  71. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  72. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  73. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  74. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  75. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  76. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  77. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  78. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  79. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  80. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  81. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  82. package/dist/dist-esm/communication-react/src/index.d.ts +1 -36
  83. package/dist/dist-esm/communication-react/src/index.js +0 -9
  84. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  85. package/dist/dist-esm/communication-react/src/mergedHooks.d.ts +2 -2
  86. package/dist/dist-esm/communication-react/src/mergedHooks.js.map +1 -1
  87. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js +1 -1
  88. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  90. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  91. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +0 -101
  93. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -83
  94. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  120. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  121. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  122. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  123. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  124. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  125. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  126. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +0 -2
  127. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +1 -5
  128. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  130. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  131. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +0 -2
  133. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  134. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  135. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  136. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  138. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  139. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  140. package/dist/dist-esm/react-components/src/components/SystemMessage.js +2 -2
  141. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  142. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -1
  143. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -1
  145. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  146. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -19
  147. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -1
  149. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  150. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +1 -1
  151. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -5
  153. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  154. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +2 -0
  155. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js +16 -2
  156. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +2 -2
  158. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  159. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.d.ts +22 -0
  160. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.js +44 -0
  161. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/LocalScreenShare.styles.js.map +1 -0
  162. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.d.ts +5 -0
  163. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.js +10 -0
  164. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +9 -34
  166. package/dist/dist-esm/react-components/src/components/VideoGallery.js +3 -14
  167. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  168. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -25
  169. package/dist/dist-esm/react-components/src/components/index.js +0 -11
  170. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  171. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  172. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js +0 -3
  173. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js.map +1 -1
  174. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  175. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +0 -25
  176. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +0 -66
  177. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  178. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  179. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +4 -16
  180. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -37
  182. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  183. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  184. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  185. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  186. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  187. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  188. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  189. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  190. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  191. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  192. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  193. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  194. package/dist/dist-esm/react-components/src/components/utils.js +1 -3
  195. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  196. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  197. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  198. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  199. package/dist/dist-esm/react-components/src/index.d.ts +0 -2
  200. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  201. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -63
  202. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  203. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -29
  204. package/dist/dist-esm/react-components/src/theming/icons.js +1 -91
  205. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  206. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  207. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  208. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  209. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js +1 -3
  210. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js.map +1 -1
  211. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  212. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  213. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  214. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  215. package/dist/dist-esm/react-components/src/types/index.d.ts +0 -1
  216. package/dist/dist-esm/react-components/src/types/index.js +0 -1
  217. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +17 -73
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +10 -23
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -64
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -48
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +21 -72
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +3 -72
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -3
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -7
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +3 -5
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +2 -0
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +2 -2
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -1
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +1 -19
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -4
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +4 -4
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +12 -7
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +8 -41
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -24
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -24
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -12
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -55
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +15 -64
  271. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +6 -12
  272. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -20
  274. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +14 -56
  275. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -73
  277. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -7
  279. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -12
  280. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  282. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  283. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -8
  285. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  287. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  288. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  290. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  291. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  292. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  293. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  294. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  295. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  296. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  297. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  298. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  299. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  300. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  302. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  303. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  304. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  305. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.d.ts +0 -1
  307. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js +2 -12
  308. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -1
  309. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -2
  310. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +2 -12
  311. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +0 -3
  313. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +2 -85
  314. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  315. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +0 -3
  316. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +6 -69
  317. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +0 -3
  319. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  320. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  321. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  322. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  323. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  324. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  326. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  327. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  328. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -39
  329. package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -5
  330. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  331. package/package.json +9 -9
  332. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DDbI_4qb.js +0 -205
  333. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DDbI_4qb.js.map +0 -1
  334. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DmoSn5h1.js +0 -49
  335. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-DmoSn5h1.js.map +0 -1
  336. package/dist/dist-cjs/communication-react/index-CYhCyRf_.js +0 -45771
  337. package/dist/dist-cjs/communication-react/index-CYhCyRf_.js.map +0 -1
  338. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  339. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  340. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  341. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  342. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  343. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  344. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.d.ts +0 -14
  345. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js +0 -204
  346. package/dist/dist-esm/calling-stateful-client/src/CallFeatureStreamUtils.js.map +0 -1
  347. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  348. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  349. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  350. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.d.ts +0 -16
  351. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +0 -22
  352. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.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/RTTDisclosureBanner.d.ts +0 -28
  384. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js +0 -26
  385. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js.map +0 -1
  386. package/dist/dist-esm/react-components/src/components/RealTimeText.d.ts +0 -58
  387. package/dist/dist-esm/react-components/src/components/RealTimeText.js +0 -38
  388. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +0 -1
  389. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.d.ts +0 -42
  390. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js +0 -53
  391. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +0 -1
  392. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  393. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  394. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  395. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  396. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  397. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  398. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
  399. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
  400. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  401. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  402. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  403. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  404. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  405. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  406. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  407. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  408. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  409. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  410. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  411. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  412. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  413. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
  414. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
  415. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  416. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
  417. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -332
  418. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  419. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  420. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  421. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  422. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  423. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -173
  424. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  425. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  426. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  427. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  428. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  429. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -229
  430. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  431. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  432. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  433. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  434. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  435. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  436. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  437. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  438. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  439. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  440. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  441. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  442. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  443. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  444. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  445. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  446. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +0 -48
  447. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js +0 -25
  448. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +0 -1
  449. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  450. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  451. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  452. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  453. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  454. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  455. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.d.ts +0 -15
  456. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +0 -91
  457. package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +0 -1
  458. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.d.ts +0 -10
  459. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js +0 -14
  460. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeLayout.js.map +0 -1
  461. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.d.ts +0 -23
  462. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +0 -47
  463. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +0 -1
  464. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  465. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  466. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  467. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  468. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  469. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  470. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.d.ts +0 -10
  471. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js +0 -23
  472. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js.map +0 -1
  473. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  474. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -320
  475. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  476. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  477. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  478. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  479. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  480. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  481. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  482. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  483. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  484. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  485. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.d.ts +0 -98
  486. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js +0 -181
  487. package/dist/dist-esm/react-components/src/components/styles/TogetherMode.styles.js.map +0 -1
  488. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  489. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -69
  490. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  491. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
  492. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
  493. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  494. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  495. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  496. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  497. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  498. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  499. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  500. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.d.ts +0 -8
  501. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js +0 -17
  502. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js.map +0 -1
  503. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  504. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  505. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  506. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.d.ts +0 -38
  507. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js +0 -2
  508. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +0 -1
  509. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -49
  510. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -203
  511. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  512. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  513. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -41
  514. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  515. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  516. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  517. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  518. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  519. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  520. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  521. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  522. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  523. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  524. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  525. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  526. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  527. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  528. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  529. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  530. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  531. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  532. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  533. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  534. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  535. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  536. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.d.ts +0 -12
  537. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js +0 -19
  538. package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js.map +0 -1
  539. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  540. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  541. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1,265 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- // Copyright (c) Microsoft Corporation.
11
- // Licensed under the MIT License.
12
- import { _IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY } from "../../../../../acs-ui-common/src";
13
- import { AttachmentUploadActionType } from '../file-sharing/AttachmentUpload';
14
- import { _DEFAULT_INLINE_IMAGE_FILE_NAME, SEND_BOX_UPLOADS_KEY_VALUE } from '../../common/constants';
15
- import { nanoid } from 'nanoid';
16
- const MAX_INLINE_IMAGE_UPLOAD_SIZE_MB = 20;
17
- const fetchBlobData = (resource, options) => __awaiter(void 0, void 0, void 0, function* () {
18
- // default timeout is 30 seconds
19
- const { timeout = 30000, abortController } = options;
20
- const id = setTimeout(() => {
21
- abortController.abort();
22
- }, timeout);
23
- const response = yield fetch(resource, Object.assign(Object.assign({}, options), { signal: abortController.signal }));
24
- clearTimeout(id);
25
- return response;
26
- });
27
- /**
28
- * @private
29
- */
30
- export const getInlineImageData = (image) => __awaiter(void 0, void 0, void 0, function* () {
31
- if (image.startsWith('blob') || image.startsWith('http')) {
32
- try {
33
- const res = yield fetchBlobData(image, {
34
- abortController: new AbortController()
35
- });
36
- const blobImage = yield res.blob();
37
- return blobImage;
38
- }
39
- catch (error) {
40
- console.error('Error fetching image data', error);
41
- return;
42
- }
43
- }
44
- return;
45
- });
46
- /**
47
- * @internal
48
- */
49
- export const getEditBoxMessagesInlineImages = (editBoxInlineImageUploads) => {
50
- if (!editBoxInlineImageUploads) {
51
- return;
52
- }
53
- const messagesInlineImagesWithProgress = {};
54
- Object.entries(editBoxInlineImageUploads || {}).map(([messageId, attachmentUploads]) => {
55
- const messageUploads = attachmentUploads.map(upload => {
56
- return upload.metadata;
57
- });
58
- messagesInlineImagesWithProgress[messageId] = messageUploads;
59
- });
60
- return messagesInlineImagesWithProgress;
61
- };
62
- /**
63
- * @internal
64
- */
65
- export const getSendBoxInlineImages = (sendBoxInlineImageUploads) => {
66
- var _a;
67
- if (!sendBoxInlineImageUploads) {
68
- return;
69
- }
70
- return (_a = sendBoxInlineImageUploads[SEND_BOX_UPLOADS_KEY_VALUE]) === null || _a === void 0 ? void 0 : _a.map(upload => upload.metadata);
71
- };
72
- const inlineImageUploadHandler = (uploadTasks, adapter, strings) => __awaiter(void 0, void 0, void 0, function* () {
73
- var _a, _b, _c;
74
- for (const task of uploadTasks) {
75
- const uploadTask = task;
76
- const image = uploadTask.image;
77
- if (!image) {
78
- uploadTask.notifyUploadFailed(strings.uploadImageDataNotProvided);
79
- continue;
80
- }
81
- if (image && image.size > MAX_INLINE_IMAGE_UPLOAD_SIZE_MB * 1024 * 1024) {
82
- uploadTask.notifyUploadFailed(strings.uploadImageIsTooLarge.replace('{maxImageSize}', `${MAX_INLINE_IMAGE_UPLOAD_SIZE_MB}`));
83
- continue;
84
- }
85
- const SUPPORTED_FILES = ['jpg', 'jpeg', 'png', 'gif', 'heic', 'webp'];
86
- const imageExtension = (_b = (_a = task.metadata) === null || _a === void 0 ? void 0 : _a.name.split('.').pop()) !== null && _b !== void 0 ? _b : '';
87
- if (!SUPPORTED_FILES.includes(imageExtension)) {
88
- uploadTask.notifyUploadFailed(strings.uploadImageExtensionIsNotAllowed.replace('{imageExtension}', imageExtension));
89
- continue;
90
- }
91
- try {
92
- const response = yield adapter.uploadImage(image, (_c = task.metadata) === null || _c === void 0 ? void 0 : _c.name);
93
- // Use response id as the image src because we need to keep the original image id as a reference to find the image.
94
- // Also the html content we send to ChatSDK does not need image src,
95
- // it only need the response id to match the uploaded image, url is not needed.
96
- uploadTask.notifyUploadCompleted(task.metadata.id, response.id);
97
- }
98
- catch (error) {
99
- console.error(error);
100
- uploadTask.notifyUploadFailed(strings.uploadImageFailed);
101
- }
102
- }
103
- });
104
- const generateUploadTask = (imageAttributes, fileName, messageId, inlineImageUploadActionHandler) => __awaiter(void 0, void 0, void 0, function* () {
105
- if (!imageAttributes.src) {
106
- console.error('Cannot upload image - Image src is not provided');
107
- return;
108
- }
109
- if (!imageAttributes.id) {
110
- console.error('Cannot upload image - Image id is not provided');
111
- return;
112
- }
113
- const imageData = yield getInlineImageData(imageAttributes.src);
114
- if (!imageData) {
115
- return;
116
- }
117
- const taskId = nanoid();
118
- const uploadTask = {
119
- image: imageData,
120
- taskId,
121
- metadata: {
122
- id: imageAttributes.id,
123
- name: fileName,
124
- url: imageAttributes.src,
125
- progress: 0
126
- },
127
- notifyUploadProgressChanged: (value) => {
128
- inlineImageUploadActionHandler({
129
- type: AttachmentUploadActionType.Progress,
130
- taskId,
131
- progress: value,
132
- messageId
133
- });
134
- },
135
- notifyUploadCompleted: (id, url) => {
136
- inlineImageUploadActionHandler({
137
- type: AttachmentUploadActionType.Completed,
138
- taskId,
139
- id,
140
- url,
141
- messageId
142
- });
143
- },
144
- notifyUploadFailed: (message) => {
145
- inlineImageUploadActionHandler({
146
- type: AttachmentUploadActionType.Failed,
147
- taskId,
148
- message,
149
- messageId
150
- });
151
- // remove the failed upload task when error banner is auto dismissed after 10 seconds
152
- // so the banner won't be shown again on UI re-rendering.
153
- setTimeout(() => {
154
- inlineImageUploadActionHandler({
155
- type: AttachmentUploadActionType.Remove,
156
- id: taskId,
157
- messageId
158
- });
159
- }, 10 * 1000);
160
- }
161
- };
162
- return uploadTask;
163
- });
164
- /**
165
- * @internal
166
- */
167
- export const onInsertInlineImageForEditBox = (imageAttributes, fileName, messageId, adapter, handleEditBoxInlineImageUploadAction, chatCompositeStrings) => __awaiter(void 0, void 0, void 0, function* () {
168
- const uploadTask = yield generateUploadTask(imageAttributes, fileName, messageId, handleEditBoxInlineImageUploadAction);
169
- if (!uploadTask) {
170
- return;
171
- }
172
- handleEditBoxInlineImageUploadAction({
173
- type: AttachmentUploadActionType.Set,
174
- newUploads: [uploadTask],
175
- messageId
176
- });
177
- inlineImageUploadHandler([uploadTask], adapter, chatCompositeStrings);
178
- });
179
- /**
180
- * @internal
181
- */
182
- export const onInsertInlineImageForSendBox = (imageAttributes, fileName, adapter, handleSendBoxInlineImageUploadAction, chatCompositeStrings) => __awaiter(void 0, void 0, void 0, function* () {
183
- const uploadTask = yield generateUploadTask(imageAttributes, fileName, SEND_BOX_UPLOADS_KEY_VALUE, handleSendBoxInlineImageUploadAction);
184
- if (!uploadTask) {
185
- return;
186
- }
187
- handleSendBoxInlineImageUploadAction({
188
- type: AttachmentUploadActionType.Set,
189
- newUploads: [uploadTask],
190
- messageId: SEND_BOX_UPLOADS_KEY_VALUE
191
- });
192
- inlineImageUploadHandler([uploadTask], adapter, chatCompositeStrings);
193
- });
194
- /**
195
- * @internal
196
- */
197
- export const cancelInlineImageUpload = (imageAttributes, imageUploads, messageId, inlineImageUploadActionHandler, adapter) => {
198
- var _a;
199
- if (!imageAttributes.id) {
200
- console.error('Cannot cancel image upload - Image id is not provided');
201
- return;
202
- }
203
- if (!imageUploads || !imageUploads[messageId]) {
204
- deleteExistingInlineImageForEditBox(imageAttributes.id, messageId, adapter);
205
- return;
206
- }
207
- const imageUpload = (_a = imageUploads[messageId]) === null || _a === void 0 ? void 0 : _a.find(upload => upload.metadata.id === imageAttributes.id);
208
- if (!imageUpload || !(imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.id)) {
209
- deleteExistingInlineImageForEditBox(imageAttributes.id, messageId, adapter);
210
- return;
211
- }
212
- inlineImageUploadActionHandler({
213
- type: AttachmentUploadActionType.Remove,
214
- id: imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.id,
215
- messageId
216
- });
217
- if ((imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.progress) === 1 && (imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.url)) {
218
- // The image id that we got back from the ChatSDK response is stored in the image src attribute,
219
- // while the metadata id is the internal image id that we assigned to the image when it was pasted in.
220
- deleteInlineImageFromServer(imageUpload === null || imageUpload === void 0 ? void 0 : imageUpload.metadata.url, adapter);
221
- }
222
- };
223
- const deleteInlineImageFromServer = (imageId, adapter) => {
224
- try {
225
- adapter.deleteImage(imageId);
226
- }
227
- catch (error) {
228
- console.error(error);
229
- }
230
- }; // This function is used to delete the inline image that existed before editing starts
231
- const deleteExistingInlineImageForEditBox = (imageId, messageId, adapter) => {
232
- messageId !== SEND_BOX_UPLOADS_KEY_VALUE && deleteInlineImageFromServer(imageId, adapter);
233
- };
234
- /**
235
- * @internal
236
- */
237
- export const updateContentStringWithUploadedInlineImages = (content, imageUploads, messageId = SEND_BOX_UPLOADS_KEY_VALUE) => {
238
- if (!imageUploads || !imageUploads[messageId]) {
239
- return content;
240
- }
241
- const messageUploads = imageUploads[messageId];
242
- const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
243
- document.querySelectorAll('img').forEach(img => {
244
- var _a;
245
- const uploadInlineImage = messageUploads === null || messageUploads === void 0 ? void 0 : messageUploads.find(upload => !upload.metadata.error && upload.metadata.progress === 1 && upload.metadata.id === img.id);
246
- if (uploadInlineImage) {
247
- // ChatSDK uses the respond id provided by the upload response. We store the response id in the image src attribute previously.
248
- img.id = (_a = uploadInlineImage.metadata.url) !== null && _a !== void 0 ? _a : img.id;
249
- img.src = '';
250
- }
251
- });
252
- content = document.body.innerHTML;
253
- return content;
254
- };
255
- /**
256
- * @internal
257
- */
258
- export const getImageFileNameFromAttributes = (imageAttributes) => {
259
- const fileName = imageAttributes[_IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY];
260
- if (!fileName || fileName === '' || fileName === 'undefined' || fileName === 'null') {
261
- return _DEFAULT_INLINE_IMAGE_FILE_NAME;
262
- }
263
- return fileName;
264
- };
265
- //# sourceMappingURL=ImageUploadUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageUploadUtils.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.tsx"],"names":[],"mappings":";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M,CAAC,QAAQ,CAAC,QAAQ,KAAK,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC;QACpJ,IAAI,iBAAiB,EAAE,CAAC;YACtB,+HAA+H;YAC/H,GAAG,CAAC,EAAE,GAAG,MAAA,iBAAiB,CAAC,QAAQ,CAAC,GAAG,mCAAI,GAAG,CAAC,EAAE,CAAC;YAClD,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC;QACf,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;IAClC,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AACF;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,eAAuC,EAAU,EAAE;IAChG,MAAM,QAAQ,GAAG,eAAe,CAAC,2CAA2C,CAAC,CAAC;IAC9E,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,EAAE,IAAI,QAAQ,KAAK,WAAW,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;QACpF,OAAO,+BAA+B,CAAC;IACzC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { AttachmentMetadataInProgress, _IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY } from '@internal/acs-ui-common';\nimport { AttachmentUpload, AttachmentUploadActionType, AttachmentUploadTask } from '../file-sharing/AttachmentUpload';\nimport { _DEFAULT_INLINE_IMAGE_FILE_NAME, SEND_BOX_UPLOADS_KEY_VALUE } from '../../common/constants';\nimport { ChatAdapter } from '../adapter/ChatAdapter';\nimport { Dispatch } from 'react';\nimport { ImageActions } from './ImageUploadReducer';\nimport { nanoid } from 'nanoid';\nimport { ChatCompositeStrings } from '../Strings';\nconst MAX_INLINE_IMAGE_UPLOAD_SIZE_MB = 20;\nconst fetchBlobData = async (resource: string | URL | Request, options: {\n timeout?: number;\n headers?: Headers;\n abortController: AbortController;\n}): Promise<Response> => {\n // default timeout is 30 seconds\n const {\n timeout = 30000,\n abortController\n } = options;\n const id = setTimeout(() => {\n abortController.abort();\n }, timeout);\n const response = await fetch(resource, {\n ...options,\n signal: abortController.signal\n });\n clearTimeout(id);\n return response;\n};\n/**\n * @private\n */\nexport const getInlineImageData = async (image: string): Promise<Blob | undefined> => {\n if (image.startsWith('blob') || image.startsWith('http')) {\n try {\n const res = await fetchBlobData(image, {\n abortController: new AbortController()\n });\n const blobImage = await res.blob();\n return blobImage;\n } catch (error) {\n console.error('Error fetching image data', error);\n return;\n }\n }\n return;\n};\n/**\n * @internal\n */\nexport const getEditBoxMessagesInlineImages = (editBoxInlineImageUploads: Record<string, AttachmentUpload[]> | undefined): Record<string, AttachmentMetadataInProgress[]> | undefined => {\n if (!editBoxInlineImageUploads) {\n return;\n }\n const messagesInlineImagesWithProgress: Record<string, AttachmentMetadataInProgress[]> = {};\n Object.entries(editBoxInlineImageUploads || {}).map(([messageId, attachmentUploads]) => {\n const messageUploads = attachmentUploads.map(upload => {\n return upload.metadata;\n });\n messagesInlineImagesWithProgress[messageId] = messageUploads;\n });\n return messagesInlineImagesWithProgress;\n};\n/**\n * @internal\n */\nexport const getSendBoxInlineImages = (sendBoxInlineImageUploads: Record<string, AttachmentUpload[]> | undefined): AttachmentMetadataInProgress[] | undefined => {\n if (!sendBoxInlineImageUploads) {\n return;\n }\n return sendBoxInlineImageUploads[SEND_BOX_UPLOADS_KEY_VALUE]?.map(upload => upload.metadata);\n};\nconst inlineImageUploadHandler = async (uploadTasks: AttachmentUpload[], adapter: ChatAdapter, strings: ChatCompositeStrings): Promise<void> => {\n for (const task of uploadTasks) {\n const uploadTask = task as AttachmentUploadTask;\n const image: Blob | undefined = uploadTask.image;\n if (!image) {\n uploadTask.notifyUploadFailed(strings.uploadImageDataNotProvided);\n continue;\n }\n if (image && image.size > MAX_INLINE_IMAGE_UPLOAD_SIZE_MB * 1024 * 1024) {\n uploadTask.notifyUploadFailed(strings.uploadImageIsTooLarge.replace('{maxImageSize}', `${MAX_INLINE_IMAGE_UPLOAD_SIZE_MB}`));\n continue;\n }\n const SUPPORTED_FILES: Array<string> = ['jpg', 'jpeg', 'png', 'gif', 'heic', 'webp'];\n const imageExtension = task.metadata?.name.split('.').pop() ?? '';\n if (!SUPPORTED_FILES.includes(imageExtension)) {\n uploadTask.notifyUploadFailed(strings.uploadImageExtensionIsNotAllowed.replace('{imageExtension}', imageExtension));\n continue;\n }\n try {\n const response = await adapter.uploadImage(image, task.metadata?.name);\n // Use response id as the image src because we need to keep the original image id as a reference to find the image.\n // Also the html content we send to ChatSDK does not need image src,\n // it only need the response id to match the uploaded image, url is not needed.\n uploadTask.notifyUploadCompleted(task.metadata.id, response.id);\n } catch (error) {\n console.error(error);\n uploadTask.notifyUploadFailed(strings.uploadImageFailed);\n }\n }\n};\nconst generateUploadTask = async (imageAttributes: Record<string, string>, fileName: string, messageId: string, inlineImageUploadActionHandler: Dispatch<ImageActions>): Promise<AttachmentUpload | undefined> => {\n if (!imageAttributes.src) {\n console.error('Cannot upload image - Image src is not provided');\n return;\n }\n if (!imageAttributes.id) {\n console.error('Cannot upload image - Image id is not provided');\n return;\n }\n const imageData = await getInlineImageData(imageAttributes.src);\n if (!imageData) {\n return;\n }\n const taskId = nanoid();\n const uploadTask: AttachmentUpload = {\n image: imageData,\n taskId,\n metadata: {\n id: imageAttributes.id,\n name: fileName,\n url: imageAttributes.src,\n progress: 0\n },\n notifyUploadProgressChanged: (value: number) => {\n inlineImageUploadActionHandler({\n type: AttachmentUploadActionType.Progress,\n taskId,\n progress: value,\n messageId\n });\n },\n notifyUploadCompleted: (id: string, url: string) => {\n inlineImageUploadActionHandler({\n type: AttachmentUploadActionType.Completed,\n taskId,\n id,\n url,\n messageId\n });\n },\n notifyUploadFailed: (message: string) => {\n inlineImageUploadActionHandler({\n type: AttachmentUploadActionType.Failed,\n taskId,\n message,\n messageId\n });\n // remove the failed upload task when error banner is auto dismissed after 10 seconds\n // so the banner won't be shown again on UI re-rendering.\n setTimeout(() => {\n inlineImageUploadActionHandler({\n type: AttachmentUploadActionType.Remove,\n id: taskId,\n messageId\n });\n }, 10 * 1000);\n }\n };\n return uploadTask;\n};\n/**\n * @internal\n */\nexport const onInsertInlineImageForEditBox = async (imageAttributes: Record<string, string>, fileName: string, messageId: string, adapter: ChatAdapter, handleEditBoxInlineImageUploadAction: Dispatch<ImageActions>, chatCompositeStrings: ChatCompositeStrings): Promise<void> => {\n const uploadTask: AttachmentUpload | undefined = await generateUploadTask(imageAttributes, fileName, messageId, handleEditBoxInlineImageUploadAction);\n if (!uploadTask) {\n return;\n }\n handleEditBoxInlineImageUploadAction({\n type: AttachmentUploadActionType.Set,\n newUploads: [uploadTask],\n messageId\n });\n inlineImageUploadHandler([uploadTask], adapter, chatCompositeStrings);\n};\n/**\n * @internal\n */\nexport const onInsertInlineImageForSendBox = async (imageAttributes: Record<string, string>, fileName: string, adapter: ChatAdapter, handleSendBoxInlineImageUploadAction: Dispatch<ImageActions>, chatCompositeStrings: ChatCompositeStrings): Promise<void> => {\n const uploadTask: AttachmentUpload | undefined = await generateUploadTask(imageAttributes, fileName, SEND_BOX_UPLOADS_KEY_VALUE, handleSendBoxInlineImageUploadAction);\n if (!uploadTask) {\n return;\n }\n handleSendBoxInlineImageUploadAction({\n type: AttachmentUploadActionType.Set,\n newUploads: [uploadTask],\n messageId: SEND_BOX_UPLOADS_KEY_VALUE\n });\n inlineImageUploadHandler([uploadTask], adapter, chatCompositeStrings);\n};\n/**\n * @internal\n */\nexport const cancelInlineImageUpload = (imageAttributes: Record<string, string>, imageUploads: Record<string, AttachmentUpload[]> | undefined, messageId: string, inlineImageUploadActionHandler: Dispatch<ImageActions>, adapter: ChatAdapter): void => {\n if (!imageAttributes.id) {\n console.error('Cannot cancel image upload - Image id is not provided');\n return;\n }\n if (!imageUploads || !imageUploads[messageId]) {\n deleteExistingInlineImageForEditBox(imageAttributes.id, messageId, adapter);\n return;\n }\n const imageUpload = imageUploads[messageId]?.find(upload => upload.metadata.id === imageAttributes.id);\n if (!imageUpload || !imageUpload?.metadata.id) {\n deleteExistingInlineImageForEditBox(imageAttributes.id, messageId, adapter);\n return;\n }\n inlineImageUploadActionHandler({\n type: AttachmentUploadActionType.Remove,\n id: imageUpload?.metadata.id,\n messageId\n });\n if (imageUpload?.metadata.progress === 1 && imageUpload?.metadata.url) {\n // The image id that we got back from the ChatSDK response is stored in the image src attribute,\n // while the metadata id is the internal image id that we assigned to the image when it was pasted in.\n deleteInlineImageFromServer(imageUpload?.metadata.url, adapter);\n }\n};\nconst deleteInlineImageFromServer = (imageId: string, adapter: ChatAdapter): void => {\n try {\n adapter.deleteImage(imageId);\n } catch (error) {\n console.error(error);\n }\n}; // This function is used to delete the inline image that existed before editing starts\nconst deleteExistingInlineImageForEditBox = (imageId: string, messageId: string, adapter: ChatAdapter): void => {\n messageId !== SEND_BOX_UPLOADS_KEY_VALUE && deleteInlineImageFromServer(imageId, adapter);\n};\n/**\n * @internal\n */\nexport const updateContentStringWithUploadedInlineImages = (content: string, imageUploads: Record<string, AttachmentUpload[]> | undefined, messageId: string = SEND_BOX_UPLOADS_KEY_VALUE): string => {\n if (!imageUploads || !imageUploads[messageId]) {\n return content;\n }\n const messageUploads = imageUploads[messageId];\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n document.querySelectorAll('img').forEach(img => {\n const uploadInlineImage = messageUploads?.find(upload => !upload.metadata.error && upload.metadata.progress === 1 && upload.metadata.id === img.id);\n if (uploadInlineImage) {\n // ChatSDK uses the respond id provided by the upload response. We store the response id in the image src attribute previously.\n img.id = uploadInlineImage.metadata.url ?? img.id;\n img.src = '';\n }\n });\n content = document.body.innerHTML;\n return content;\n};\n/**\n * @internal\n */\nexport const getImageFileNameFromAttributes = (imageAttributes: Record<string, string>): string => {\n const fileName = imageAttributes[_IMAGE_ATTRIBUTE_INLINE_IMAGE_FILE_NAME_KEY];\n if (!fileName || fileName === '' || fileName === 'undefined' || fileName === 'null') {\n return _DEFAULT_INLINE_IMAGE_FILE_NAME;\n }\n return fileName;\n};"]}
@@ -1,80 +0,0 @@
1
- import { AttachmentUploadTask, AttachmentSelectionHandler, AttachmentActionHandler } from "../../../../../react-components/src";
2
- import { AttachmentMetadata, AttachmentMetadataInProgress, AttachmentProgressError } from "../../../../../acs-ui-common/src";
3
- /**
4
- * @internal
5
- */
6
- export interface AttachmentUpload extends AttachmentUploadTask {
7
- metadata: AttachmentMetadataInProgress;
8
- }
9
- /**
10
- * @private
11
- */
12
- export declare enum AttachmentUploadActionType {
13
- Set = "set",
14
- Progress = "progress",
15
- Completed = "completed",
16
- Failed = "failed",
17
- Remove = "remove",
18
- Clear = "clear"
19
- }
20
- /**
21
- * @private
22
- */
23
- export interface Action {
24
- type: AttachmentUploadActionType;
25
- }
26
- /**
27
- * @private
28
- */
29
- interface SetAction extends Action {
30
- type: AttachmentUploadActionType.Set;
31
- newUploads: AttachmentUpload[];
32
- }
33
- /**
34
- * @private
35
- */
36
- export interface ProgressAction extends Action {
37
- type: AttachmentUploadActionType.Progress;
38
- taskId: string;
39
- progress: number;
40
- }
41
- /**
42
- * @private
43
- */
44
- export interface CompleteAction extends Action {
45
- type: AttachmentUploadActionType.Completed;
46
- taskId: string;
47
- id: string;
48
- url: string;
49
- }
50
- /**
51
- * @private
52
- */
53
- export interface FailedAction extends Action {
54
- type: AttachmentUploadActionType.Failed;
55
- taskId: string;
56
- message: string;
57
- }
58
- /**
59
- * @private
60
- */
61
- export interface RemoveAction extends Action {
62
- type: AttachmentUploadActionType.Remove;
63
- id: string;
64
- }
65
- /**
66
- * @private
67
- */
68
- export interface ClearAction extends Action {
69
- type: AttachmentUploadActionType.Clear;
70
- }
71
- /**
72
- * @private
73
- */
74
- type Actions = SetAction | ProgressAction | CompleteAction | FailedAction | RemoveAction | ClearAction;
75
- /**
76
- * @internal
77
- */
78
- export declare const AttachmentUploadReducer: (state: AttachmentUpload[], action: Actions) => AttachmentUpload[];
79
- export type { AttachmentMetadata, AttachmentSelectionHandler, AttachmentActionHandler, AttachmentUploadTask, AttachmentProgressError };
80
- //# sourceMappingURL=AttachmentUpload.d.ts.map
@@ -1,36 +0,0 @@
1
- /**
2
- * @private
3
- */
4
- export var AttachmentUploadActionType;
5
- (function (AttachmentUploadActionType) {
6
- AttachmentUploadActionType["Set"] = "set";
7
- AttachmentUploadActionType["Progress"] = "progress";
8
- AttachmentUploadActionType["Completed"] = "completed";
9
- AttachmentUploadActionType["Failed"] = "failed";
10
- AttachmentUploadActionType["Remove"] = "remove";
11
- AttachmentUploadActionType["Clear"] = "clear";
12
- })(AttachmentUploadActionType || (AttachmentUploadActionType = {}));
13
- /**
14
- * @internal
15
- */
16
- export const AttachmentUploadReducer = (state, action) => {
17
- switch (action.type) {
18
- case AttachmentUploadActionType.Set:
19
- return state.filter(v => !v.metadata.error).concat(action.newUploads);
20
- case AttachmentUploadActionType.Completed:
21
- return state.map(v => v.taskId === action.taskId ? Object.assign(Object.assign({}, v), { metadata: Object.assign(Object.assign({}, v.metadata), { id: action.id, url: action.url, progress: 1 }) }) : v);
22
- case AttachmentUploadActionType.Failed:
23
- return state.map(v => v.taskId === action.taskId ? Object.assign(Object.assign({}, v), { metadata: Object.assign(Object.assign({}, v.metadata), { error: {
24
- message: action.message
25
- } }) }) : v);
26
- case AttachmentUploadActionType.Remove:
27
- return state.filter(v => !v.metadata.error).filter(v => v.metadata.id !== action.id);
28
- case AttachmentUploadActionType.Progress:
29
- return state.map(v => v.taskId === action.taskId ? Object.assign(Object.assign({}, v), { metadata: Object.assign(Object.assign({}, v.metadata), { progress: action.progress }) }) : v);
30
- case AttachmentUploadActionType.Clear:
31
- return [];
32
- default:
33
- return state;
34
- }
35
- };
36
- //# sourceMappingURL=AttachmentUpload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentUpload.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src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K,0BAA0B,CAAC,MAAM;YACpC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;QACvF,KAAK,0BAA0B,CAAC,QAAQ;YACtC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,iCAC7C,CAAC,KACJ,QAAQ,kCACH,CAAC,CAAC,QAAQ,KACb,QAAQ,EAAE,MAAM,CAAC,QAAQ,OAE3B,CAAC,CAAC,CAAC,CAAC,CAAC;QACT,KAAK,0BAA0B,CAAC,KAAK;YACnC,OAAO,EAAE,CAAC;QACZ;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { AttachmentUploadTask, AttachmentSelectionHandler, AttachmentActionHandler } from '@internal/react-components';\nimport { AttachmentMetadata, AttachmentMetadataInProgress, AttachmentProgressError } from '@internal/acs-ui-common';\n/**\n * @internal\n */\nexport interface AttachmentUpload extends AttachmentUploadTask {\n metadata: AttachmentMetadataInProgress;\n}\n\n/**\n * @private\n */\nexport enum AttachmentUploadActionType {\n Set = 'set',\n Progress = 'progress',\n Completed = 'completed',\n Failed = 'failed',\n Remove = 'remove',\n Clear = 'clear',\n}\n/**\n * @private\n */\nexport interface Action {\n type: AttachmentUploadActionType;\n}\n/**\n * @private\n */\ninterface SetAction extends Action {\n type: AttachmentUploadActionType.Set;\n newUploads: AttachmentUpload[];\n}\n/**\n * @private\n */\nexport interface ProgressAction extends Action {\n type: AttachmentUploadActionType.Progress;\n taskId: string;\n progress: number;\n}\n/**\n * @private\n */\nexport interface CompleteAction extends Action {\n type: AttachmentUploadActionType.Completed;\n taskId: string;\n id: string;\n url: string;\n}\n/**\n * @private\n */\nexport interface FailedAction extends Action {\n type: AttachmentUploadActionType.Failed;\n taskId: string;\n message: string;\n}\n/**\n * @private\n */\nexport interface RemoveAction extends Action {\n type: AttachmentUploadActionType.Remove;\n id: string;\n}\n/**\n * @private\n */\nexport interface ClearAction extends Action {\n type: AttachmentUploadActionType.Clear;\n}\n/**\n * @private\n */\ntype Actions = SetAction | ProgressAction | CompleteAction | FailedAction | RemoveAction | ClearAction;\n/**\n * @internal\n */\nexport const AttachmentUploadReducer = (state: AttachmentUpload[], action: Actions): AttachmentUpload[] => {\n switch (action.type) {\n case AttachmentUploadActionType.Set:\n return state.filter(v => !v.metadata.error).concat(action.newUploads);\n case AttachmentUploadActionType.Completed:\n return state.map(v => v.taskId === action.taskId ? {\n ...v,\n metadata: {\n ...v.metadata,\n id: action.id,\n url: action.url,\n progress: 1\n }\n } : v);\n case AttachmentUploadActionType.Failed:\n return state.map(v => v.taskId === action.taskId ? {\n ...v,\n metadata: {\n ...v.metadata,\n error: {\n message: action.message\n }\n }\n } : v);\n case AttachmentUploadActionType.Remove:\n return state.filter(v => !v.metadata.error).filter(v => v.metadata.id !== action.id);\n case AttachmentUploadActionType.Progress:\n return state.map(v => v.taskId === action.taskId ? {\n ...v,\n metadata: {\n ...v.metadata,\n progress: action.progress\n }\n } : v);\n case AttachmentUploadActionType.Clear:\n return [];\n default:\n return state;\n }\n};\nexport type { AttachmentMetadata, AttachmentSelectionHandler, AttachmentActionHandler, AttachmentUploadTask, AttachmentProgressError };"]}
@@ -1,38 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * Props for {@link AttachmentUploadButton} component.
4
- * @internal
5
- */
6
- export interface AttachmentUploadButtonProps {
7
- /**
8
- * A list of strings containing the comma separated list of supported media (aka. mime) types.
9
- * i.e. ['image/*', 'video/*', 'audio/*']
10
- * Default value is `['*']`, meaning all media types are supported.
11
- * Similar to the `accept` attribute of the `<input type="file" />` element.
12
- */
13
- supportedMediaTypes?: string[];
14
- /**
15
- * Disable multiple files to be selected if set to `true`.
16
- * Default value is `false`, meaning multiple files can be selected.
17
- * Similar to the `multiple` attribute of the `<input type="file" />` element.
18
- */
19
- disableMultipleUploads?: boolean;
20
- /**
21
- * onChange handler for the attachment upload button.
22
- * Similar to the `onChange` attribute of the `<input type="file" />` element.
23
- * Called every time files are selected through the attachment upload button with a {@link FileList}
24
- * of selected files.
25
- */
26
- onChange?: (files: FileList | null) => void;
27
- }
28
- /**
29
- * @internal
30
- */
31
- export declare const AttachmentUploadButton: (props: AttachmentUploadButtonProps) => JSX.Element;
32
- /**
33
- * A wrapper to return {@link AttachmentUploadButton} component conditionally.
34
- * It will return `<></>` for stable builds.
35
- * @internal
36
- */
37
- export declare const AttachmentUploadButtonWrapper: (props: Pick<AttachmentUploadButtonProps, 'supportedMediaTypes' | 'disableMultipleUploads' | 'onChange'>) => JSX.Element;
38
- //# sourceMappingURL=AttachmentUploadButton.d.ts.map
@@ -1,67 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import { IconButton, mergeStyles, Stack, TooltipHost, useTheme } from '@fluentui/react';
4
- import React from 'react';
5
- import { ChatCompositeIcon } from '../../common/icons';
6
- import { useLocale } from '../../localization';
7
- /**
8
- * @internal
9
- */
10
- export const AttachmentUploadButton = (props) => {
11
- const inputRef = React.useRef(null);
12
- const theme = useTheme();
13
- // default supportedMediaTypes is ['*'], meaning all media types are supported.
14
- // default disableMultipleUploads is false, meaning multiple files can be selected.
15
- const { supportedMediaTypes = ['*'], disableMultipleUploads = false, onChange } = props;
16
- const attachmentUploadButtonClassName = mergeStyles({
17
- width: '1.5rem',
18
- height: '1.5rem',
19
- cursor: 'pointer',
20
- padding: '0.15rem',
21
- ':hover': {
22
- backgroundColor: theme.palette.neutralLighter
23
- }
24
- });
25
- const iconButtonClassName = mergeStyles({
26
- color: 'unset',
27
- width: '1.5rem',
28
- height: '1.5rem',
29
- ':hover': {
30
- color: 'unset',
31
- background: 'transparent'
32
- }
33
- });
34
- return React.createElement(React.Fragment, null,
35
- React.createElement(Stack, { verticalAlign: "center", horizontalAlign: "center", className: attachmentUploadButtonClassName, onClick: () => {
36
- var _a;
37
- (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.click();
38
- } },
39
- React.createElement(TooltipHost, { content: uploadAttachmentButtonStringTrampoline(), "data-ui-id": "chat-composite-message-tooltip" },
40
- React.createElement(IconButton, { className: iconButtonClassName, ariaLabel: uploadAttachmentButtonStringTrampoline(), autoFocus: false },
41
- React.createElement(SendBoxAttachFileIconTrampoline, null)))),
42
- React.createElement("input", { "data-testid": "attachment-upload-button", ref: inputRef, autoFocus: false, hidden: true, multiple: !disableMultipleUploads, accept: supportedMediaTypes.join(','), type: "file", onClick: e => {
43
- // To ensure that `onChange` is fired even if the same file is picked again.
44
- e.currentTarget.value = '';
45
- }, onChange: e => {
46
- onChange && onChange(e.currentTarget.files);
47
- } }));
48
- };
49
- const SendBoxAttachFileIconTrampoline = () => {
50
- return React.createElement(ChatCompositeIcon, { iconName: "SendBoxAttachFile" });
51
- // Return _some_ available icon, as the real icon is beta-only.
52
- return React.createElement(ChatCompositeIcon, { iconName: "EditBoxCancel" });
53
- };
54
- /**
55
- * A wrapper to return {@link AttachmentUploadButton} component conditionally.
56
- * It will return `<></>` for stable builds.
57
- * @internal
58
- */
59
- export const AttachmentUploadButtonWrapper = (props) => {
60
- return React.createElement(React.Fragment, null, React.createElement(AttachmentUploadButton, Object.assign({}, props)));
61
- };
62
- const uploadAttachmentButtonStringTrampoline = () => {
63
- //eslint-disable-next-line react-hooks/rules-of-hooks
64
- return useLocale().strings.chat.uploadAttachment;
65
- return '';
66
- };
67
- //# sourceMappingURL=AttachmentUploadButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachmentUploadButton.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/file-sharing/Attachm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AC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { IconButton, mergeStyles, Stack, TooltipHost, useTheme } from '@fluentui/react';\nimport React from 'react';\nimport { ChatCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\n/**\n * Props for {@link AttachmentUploadButton} component.\n * @internal\n */\nexport interface AttachmentUploadButtonProps {\n /**\n * A list of strings containing the comma separated list of supported media (aka. mime) types.\n * i.e. ['image/*', 'video/*', 'audio/*']\n * Default value is `['*']`, meaning all media types are supported.\n * Similar to the `accept` attribute of the `<input type=\"file\" />` element.\n */\n supportedMediaTypes?: string[];\n /**\n * Disable multiple files to be selected if set to `true`.\n * Default value is `false`, meaning multiple files can be selected.\n * Similar to the `multiple` attribute of the `<input type=\"file\" />` element.\n */\n disableMultipleUploads?: boolean;\n /**\n * onChange handler for the attachment upload button.\n * Similar to the `onChange` attribute of the `<input type=\"file\" />` element.\n * Called every time files are selected through the attachment upload button with a {@link FileList}\n * of selected files.\n */\n onChange?: (files: FileList | null) => void;\n}\n/**\n * @internal\n */\nexport const AttachmentUploadButton = (props: AttachmentUploadButtonProps): JSX.Element => {\n const inputRef = React.useRef<HTMLInputElement>(null);\n const theme = useTheme();\n // default supportedMediaTypes is ['*'], meaning all media types are supported.\n // default disableMultipleUploads is false, meaning multiple files can be selected.\n const {\n supportedMediaTypes = ['*'],\n disableMultipleUploads = false,\n onChange\n } = props;\n const attachmentUploadButtonClassName = mergeStyles({\n width: '1.5rem',\n height: '1.5rem',\n cursor: 'pointer',\n padding: '0.15rem',\n ':hover': {\n backgroundColor: theme.palette.neutralLighter\n }\n });\n const iconButtonClassName = mergeStyles({\n color: 'unset',\n width: '1.5rem',\n height: '1.5rem',\n ':hover': {\n color: 'unset',\n background: 'transparent'\n }\n });\n return <>\n <Stack verticalAlign=\"center\" horizontalAlign=\"center\" className={attachmentUploadButtonClassName} onClick={() => {\n inputRef.current?.click();\n }}>\n <TooltipHost content={uploadAttachmentButtonStringTrampoline()} data-ui-id=\"chat-composite-message-tooltip\">\n <IconButton className={iconButtonClassName} ariaLabel={uploadAttachmentButtonStringTrampoline()} autoFocus={false}>\n <SendBoxAttachFileIconTrampoline />\n </IconButton>\n </TooltipHost>\n </Stack>\n <input data-testid=\"attachment-upload-button\" ref={inputRef} autoFocus={false} hidden multiple={!disableMultipleUploads} accept={supportedMediaTypes.join(',')} type=\"file\" onClick={e => {\n // To ensure that `onChange` is fired even if the same file is picked again.\n e.currentTarget.value = '';\n }} onChange={e => {\n onChange && onChange(e.currentTarget.files);\n }} />\n </>;\n};\nconst SendBoxAttachFileIconTrampoline = (): JSX.Element => {\n return <ChatCompositeIcon iconName=\"SendBoxAttachFile\" />;\n // Return _some_ available icon, as the real icon is beta-only.\n return <ChatCompositeIcon iconName=\"EditBoxCancel\" />;\n};\n/**\n * A wrapper to return {@link AttachmentUploadButton} component conditionally.\n * It will return `<></>` for stable builds.\n * @internal\n */\nexport const AttachmentUploadButtonWrapper = (props: Pick<AttachmentUploadButtonProps, 'supportedMediaTypes' | 'disableMultipleUploads' | 'onChange'>): JSX.Element => {\n return <>\n {<AttachmentUploadButton {...props} />}\n </>;\n};\nconst uploadAttachmentButtonStringTrampoline = (): string => {\n //eslint-disable-next-line react-hooks/rules-of-hooks\n return useLocale().strings.chat.uploadAttachment;\n return '';\n};"]}
@@ -1,5 +0,0 @@
1
- export * from './AttachmentUpload';
2
- export * from './AttachmentUploadButton';
3
- export type { AttachmentOptions, AttachmentUploadTask, AttachmentUploadOptions, AttachmentRemovalHandler, AttachmentMetadataWrapper, AttachmentSelectionHandler, AttachmentActionHandler } from "../../../../../react-components/src";
4
- export type { AttachmentDownloadOptions } from "../../../../../react-components/src";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export * from './AttachmentUpload';
4
- export * from './AttachmentUploadButton';
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/file-sharing/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from './AttachmentUpload';\nexport * from './AttachmentUploadButton';\nexport type { AttachmentOptions, AttachmentUploadTask, AttachmentUploadOptions, AttachmentRemovalHandler, AttachmentMetadataWrapper, AttachmentSelectionHandler, AttachmentActionHandler } from '@internal/react-components';\nexport type { AttachmentDownloadOptions } from '@internal/react-components';"]}
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- /** @private */
3
- export declare const CallingRealTimeTextModal: (props: {
4
- /** The flag to show the modal */
5
- showModal?: boolean;
6
- /** The function to dismiss the modal */
7
- onDismissModal?: () => void;
8
- /** The function to start RealTimeText */
9
- onStartRealTimeText?: () => void;
10
- }) => JSX.Element;
11
- export {};
12
- //# sourceMappingURL=CallingRealTimeTextModal.d.ts.map
@@ -1,19 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- import React from 'react';
4
- import { RealTimeTextModal } from "../../../../react-components/src";
5
- import { useLocale } from '../localization';
6
- /** @private */
7
- export const CallingRealTimeTextModal = (props) => {
8
- const strings = useLocale().strings.call;
9
- const modalStrings = {
10
- realTimeTextModalTitle: strings.realTimeTextModalTitle,
11
- realTimeTextModalText: strings.realTimeTextModalText,
12
- realTimeTextConfirmButtonLabel: strings.realTimeTextConfirmButtonLabel,
13
- realTimeTextCancelButtonLabel: strings.realTimeTextCancelButtonLabel,
14
- realTimeTextModalAriaLabel: strings.realTimeTextModalAriaLabel,
15
- realTimeTextCloseModalButtonAriaLabel: strings.realTimeTextCloseModalButtonAriaLabel
16
- };
17
- return React.createElement(RealTimeTextModal, { strings: modalStrings, showModal: props.showModal, onDismissModal: props.onDismissModal, onStartRealTimeText: props.onStartRealTimeText });
18
- };
19
- //# sourceMappingURL=CallingRealTimeTextModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallingRealTimeTextModal.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/common/CallingRealTimeTextModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAA4B,yCAAmC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,eAAe;AACf,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAOxC,EAAe,EAAE;IAChB,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,MAAM,YAAY,GAA6B;QAC7C,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;QACtD,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;QACpD,8BAA8B,EAAE,OAAO,CAAC,8BAA8B;QACtE,6BAA6B,EAAE,OAAO,CAAC,6BAA6B;QACpE,0BAA0B,EAAE,OAAO,CAAC,0BAA0B;QAC9D,qCAAqC,EAAE,OAAO,CAAC,qCAAqC;KACrF,CAAC;IACF,OAAO,oBAAC,iBAAiB,IAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc,EAAE,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,GAAI,CAAC;AACxK,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React from 'react';\nimport { RealTimeTextModal, RealTimeTextModalStrings } from '@internal/react-components';\nimport { useLocale } from '../localization';\n/** @private */\nexport const CallingRealTimeTextModal = (props: {\n /** The flag to show the modal */\n showModal?: boolean;\n /** The function to dismiss the modal */\n onDismissModal?: () => void;\n /** The function to start RealTimeText */\n onStartRealTimeText?: () => void;\n}): JSX.Element => {\n const strings = useLocale().strings.call;\n const modalStrings: RealTimeTextModalStrings = {\n realTimeTextModalTitle: strings.realTimeTextModalTitle,\n realTimeTextModalText: strings.realTimeTextModalText,\n realTimeTextConfirmButtonLabel: strings.realTimeTextConfirmButtonLabel,\n realTimeTextCancelButtonLabel: strings.realTimeTextCancelButtonLabel,\n realTimeTextModalAriaLabel: strings.realTimeTextModalAriaLabel,\n realTimeTextCloseModalButtonAriaLabel: strings.realTimeTextCloseModalButtonAriaLabel\n };\n return <RealTimeTextModal strings={modalStrings} showModal={props.showModal} onDismissModal={props.onDismissModal} onStartRealTimeText={props.onStartRealTimeText} />;\n};\nexport {};"]}
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { RichTextSendBoxProps } from "../../../../react-components/src";
3
- /**
4
- * @private
5
- *
6
- * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox
7
- * before lazyLoading is done
8
- */
9
- export declare const RichTextSendBoxWrapper: (props: RichTextSendBoxProps) => JSX.Element;
10
- //# sourceMappingURL=RichTextSendBoxWrapper.d.ts.map