@azure/communication-react 1.30.0 → 1.31.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/dist/communication-react.d.ts +1373 -24
  2. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DdSFdo_m.js +213 -0
  3. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-DdSFdo_m.js.map +1 -0
  4. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-C2HrwCVY.js +49 -0
  5. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-C2HrwCVY.js.map +1 -0
  6. package/dist/dist-cjs/communication-react/index-CH39vOsT.js +46344 -0
  7. package/dist/dist-cjs/communication-react/index-CH39vOsT.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +174 -40373
  9. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/common.d.ts +13 -0
  11. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/constants.d.ts +5 -0
  13. package/dist/dist-esm/acs-ui-common/src/constants.js +5 -0
  14. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  15. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +6 -0
  16. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +20 -0
  17. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +1 -0
  18. package/dist/dist-esm/acs-ui-common/src/index.d.ts +4 -0
  19. package/dist/dist-esm/acs-ui-common/src/index.js +3 -0
  20. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  21. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +7 -0
  22. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +18 -0
  23. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +1 -0
  24. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  25. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +2 -0
  27. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +2 -0
  29. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +6 -0
  30. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +25 -1
  32. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +1 -0
  34. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -1
  35. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +4 -0
  37. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  38. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +42 -2
  39. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  40. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +6 -0
  41. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +35 -0
  42. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  43. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +4 -0
  44. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +24 -4
  45. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/Converter.js +3 -0
  47. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +17 -0
  49. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +33 -0
  50. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +1 -0
  51. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +1 -0
  52. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +7 -1
  53. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  54. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +17 -0
  55. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
  57. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  58. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +6 -2
  59. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +36 -2
  60. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  61. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +2 -1
  62. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +4 -0
  63. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  64. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +25 -2
  65. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  66. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +6 -0
  67. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +20 -0
  68. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +1 -0
  69. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  70. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  71. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +15 -1
  72. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  73. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +2 -1
  74. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  75. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +1 -0
  76. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  77. package/dist/dist-esm/communication-react/src/index.d.ts +21 -0
  78. package/dist/dist-esm/communication-react/src/index.js +3 -0
  79. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +2 -0
  81. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +1 -0
  82. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  83. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +13 -1
  84. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +9 -3
  85. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +11 -0
  87. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +32 -2
  88. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +10 -0
  90. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +15 -0
  91. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +1 -0
  92. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +8 -1
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +9 -5
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +2 -1
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +4 -1
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +31 -6
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +15 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +9 -0
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +24 -0
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +203 -0
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -0
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +23 -2
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +17 -6
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +8 -1
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +10 -6
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  115. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +69 -0
  116. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +36 -0
  117. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
  118. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +75 -0
  119. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +67 -0
  120. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
  121. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  122. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +51 -0
  123. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  124. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +86 -0
  125. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +40 -0
  126. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  127. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +2 -0
  128. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  129. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +2 -0
  130. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +15 -0
  131. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +121 -0
  133. package/dist/dist-esm/react-components/src/components/MentionPopover.js +119 -0
  134. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +1 -0
  135. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +81 -5
  136. package/dist/dist-esm/react-components/src/components/MessageThread.js +13 -3
  137. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +15 -0
  139. package/dist/dist-esm/react-components/src/components/ParticipantList.js +12 -3
  140. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +9 -0
  142. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +29 -0
  143. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +1 -0
  144. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +30 -0
  145. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +98 -0
  146. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -0
  147. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +19 -0
  148. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +43 -0
  149. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +1 -0
  150. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +15 -0
  151. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +42 -0
  152. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +1 -0
  153. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +24 -0
  154. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +64 -0
  155. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +1 -0
  156. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +20 -0
  157. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +45 -0
  158. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +1 -0
  159. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +14 -0
  160. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +42 -0
  161. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +1 -0
  162. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +30 -0
  163. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +99 -0
  164. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +1 -0
  165. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +59 -0
  166. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +334 -0
  167. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -0
  168. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +37 -0
  169. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +78 -0
  170. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -0
  171. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +215 -0
  172. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +184 -0
  173. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -0
  174. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +16 -0
  175. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +75 -0
  176. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -0
  177. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.d.ts +9 -0
  178. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js +16 -0
  179. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js.map +1 -0
  180. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +19 -0
  181. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +229 -0
  182. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +1 -0
  183. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +7 -0
  184. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +51 -0
  185. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +1 -0
  186. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +15 -0
  187. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +64 -0
  188. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +1 -0
  189. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +6 -0
  190. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +13 -0
  191. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +1 -0
  192. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +51 -1
  193. package/dist/dist-esm/react-components/src/components/SendBox.js +58 -6
  194. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  195. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +56 -0
  196. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +75 -0
  197. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -0
  198. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +14 -0
  199. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +18 -0
  200. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +1 -0
  201. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +24 -0
  202. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +550 -0
  203. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -0
  204. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +152 -0
  205. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +819 -0
  206. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +1 -0
  207. package/dist/dist-esm/react-components/src/components/index.d.ts +21 -0
  208. package/dist/dist-esm/react-components/src/components/index.js +8 -0
  209. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  210. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  211. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  212. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +58 -0
  213. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +144 -0
  214. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +1 -0
  215. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +26 -0
  216. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +69 -0
  217. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +1 -0
  218. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  219. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +8 -0
  220. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +82 -0
  222. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +328 -0
  223. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -0
  224. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +21 -0
  225. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +38 -0
  226. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +1 -0
  227. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +38 -0
  228. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +99 -0
  229. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  230. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +5 -0
  231. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +32 -0
  232. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +1 -0
  233. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +38 -1
  234. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +30 -3
  235. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  236. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +4 -2
  237. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +9 -2
  238. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  239. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +73 -0
  240. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +178 -0
  241. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -0
  242. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +33 -0
  243. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +119 -0
  244. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +1 -0
  245. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +47 -1
  246. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +154 -4
  247. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  248. package/dist/dist-esm/react-components/src/components/utils/common.js +2 -0
  249. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  250. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +2 -1
  251. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  252. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
  253. package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
  254. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
  255. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +4 -0
  256. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +3 -1
  257. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  258. package/dist/dist-esm/react-components/src/index.d.ts +1 -0
  259. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  260. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +45 -0
  261. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  262. package/dist/dist-esm/react-components/src/theming/icons.d.ts +24 -0
  263. package/dist/dist-esm/react-components/src/theming/icons.js +67 -0
  264. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  265. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
  266. package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
  267. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
  268. package/dist/dist-esm/react-components/src/theming/themes.d.ts +6 -0
  269. package/dist/dist-esm/react-components/src/theming/themes.js +9 -0
  270. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  271. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +13 -0
  272. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  273. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +20 -1
  274. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +59 -0
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +15 -10
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +38 -6
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +12 -1
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -0
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +46 -0
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +200 -0
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -0
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +2 -0
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +19 -0
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +10 -2
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +2 -0
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +19 -0
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +5 -3
  296. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  297. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +3 -0
  298. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +3 -0
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -2
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +7 -0
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +43 -5
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  309. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  311. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +8 -0
  313. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +68 -0
  314. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  315. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +52 -0
  316. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +10 -4
  317. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +10 -3
  319. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +20 -2
  320. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  321. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +16 -2
  322. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +10 -4
  324. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +14 -2
  325. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  326. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +15 -0
  327. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +23 -0
  328. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +1 -0
  329. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +27 -0
  330. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +2 -1
  331. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  332. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +2 -0
  333. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +189 -11
  334. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  335. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +18 -0
  336. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +18 -0
  337. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +1 -0
  338. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +49 -0
  339. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +44 -0
  340. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +1 -0
  341. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +39 -0
  342. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +267 -0
  343. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -0
  344. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +20 -0
  345. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  346. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +6 -2
  347. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +36 -0
  348. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  349. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +12 -2
  350. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  351. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +80 -0
  352. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +36 -0
  353. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -0
  354. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +38 -0
  355. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +66 -0
  356. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -0
  357. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +5 -0
  358. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +5 -0
  359. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -0
  360. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +13 -2
  361. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  362. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +2 -0
  363. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  364. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +4 -0
  365. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +4 -0
  366. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  367. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +2 -1
  368. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  369. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +10 -0
  370. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +16 -0
  371. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +1 -0
  372. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +41 -2
  373. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +21 -0
  374. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  375. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +5 -0
  376. package/dist/dist-esm/react-composites/src/composites/common/constants.js +5 -0
  377. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  378. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +26 -1
  379. package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -0
  380. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  381. package/package.json +4 -4
@@ -0,0 +1,213 @@
1
+ 'use strict';
2
+
3
+ var react = require('@fluentui/react');
4
+ var reactChat = require('@fluentui-contrib/react-chat');
5
+ var reactComponents = require('@fluentui/react-components');
6
+ var index = require('./index-CH39vOsT.js');
7
+ var React = require('react');
8
+ require('@azure/communication-common');
9
+ require('reselect');
10
+ require('@azure/communication-calling');
11
+ require('memoize-one');
12
+ require('@azure/logger');
13
+ require('events');
14
+ require('immer');
15
+ require('@fluentui/react-icons');
16
+ require('textarea-caret-ts');
17
+ require('use-debounce');
18
+ require('@fluentui/react-file-type-icons');
19
+ require('@griffel/react');
20
+ require('uuid');
21
+ require('roosterjs-content-model-core');
22
+ require('roosterjs-content-model-dom');
23
+ require('roosterjs-content-model-plugins');
24
+ require('roosterjs-content-model-api');
25
+ require('html-react-parser');
26
+ require('react-linkify');
27
+ require('dompurify');
28
+ require('@fluentui/react-hooks');
29
+ require('react-use-draggable-scroll');
30
+ require('copy-to-clipboard');
31
+ require('@azure/communication-chat');
32
+ require('nanoid');
33
+ require('@azure/communication-calling-effects');
34
+
35
+ // Copyright (c) Microsoft Corporation.
36
+ // Licensed under the MIT License.
37
+ /**
38
+ * @private
39
+ */
40
+ const ChatMessageComponentAsRichTextEditBox = (props) => {
41
+ var _a;
42
+ const { onCancel, onSubmit, strings, message, onPaste, onInsertInlineImage, inlineImagesWithProgress, onRemoveInlineImage } = props;
43
+ const [initialInlineImages, setInitialInlineImages] = React.useState([]);
44
+ const initialContent = React.useMemo(() => {
45
+ const content = message.content;
46
+ setInitialInlineImages(index.getPreviousInlineImages(content));
47
+ const document = new DOMParser().parseFromString(content !== null && content !== void 0 ? content : '', 'text/html');
48
+ // The broken image element is a div element with all the attributes of the original image element.
49
+ // We need to convert it to a img element so the Rooster knows how to render it.
50
+ // And we need to copy over all the attributes such as id, width, etc.
51
+ // which is needed for sending the message with the images correctly.
52
+ document.querySelectorAll('.broken-image-wrapper').forEach(brokenImage => {
53
+ var _a;
54
+ const imageElement = document.createElement('img');
55
+ const attributes = brokenImage.attributes;
56
+ for (const attribute of attributes) {
57
+ imageElement.setAttribute(attribute.name, attribute.value);
58
+ }
59
+ imageElement.src = index.BROKEN_IMAGE_SVG_DATA;
60
+ imageElement.style.width = '3rem';
61
+ imageElement.style.height = '3rem';
62
+ (_a = brokenImage.parentElement) === null || _a === void 0 ? void 0 : _a.replaceChild(imageElement, brokenImage);
63
+ });
64
+ return document.body.innerHTML;
65
+ }, [message]);
66
+ const [contentValue, setContentValue] = React.useState(initialContent || '');
67
+ const [contentValueWithInlineImagesOverflow, setContentValueWithInlineImagesOverflow] = React.useState(false);
68
+ const [attachmentMetadata, handleAttachmentAction] = React.useReducer(index.attachmentMetadataReducer, (_a = index.getMessageWithAttachmentMetadata(message)) !== null && _a !== void 0 ? _a : []);
69
+ const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = React.useState(undefined);
70
+ const editTextFieldRef = React.useRef(null);
71
+ const theme = index.useTheme();
72
+ const messageState = React.useMemo(() => {
73
+ var _a, _b;
74
+ // get plain text content from the editor to check if the message is empty
75
+ // as the content may contain tags even when the content is empty
76
+ const plainTextContent = (_b = (_a = editTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent()) !== null && _b !== void 0 ? _b : contentValue;
77
+ let messageLengthState = index.getMessageState(plainTextContent, attachmentMetadata !== null && attachmentMetadata !== void 0 ? attachmentMetadata : []);
78
+ const imageIds = index.inlineImageIds(contentValue);
79
+ if (messageLengthState !== 'OK' && imageIds.length > 0) {
80
+ // Check if too long
81
+ if (index.isMessageTooLong(contentValue.length)) {
82
+ messageLengthState = 'too long';
83
+ }
84
+ else {
85
+ messageLengthState = 'OK';
86
+ }
87
+ }
88
+ return messageLengthState;
89
+ }, [attachmentMetadata, contentValue]);
90
+ const imageUploadErrorMessage = React.useMemo(() => {
91
+ var _a, _b;
92
+ return (_b = (_a = inlineImagesWithProgress === null || inlineImagesWithProgress === void 0 ? void 0 : inlineImagesWithProgress.filter(image => image.error).pop()) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message;
93
+ }, [inlineImagesWithProgress]);
94
+ const editContainerStyles = index.useChatMessageRichTextEditContainerStyles();
95
+ const chatMyMessageStyles = index.useChatMyMessageStyles();
96
+ const locale = index.useLocale().strings;
97
+ const setContent = React.useCallback((newValue) => {
98
+ setContentValue(newValue !== null && newValue !== void 0 ? newValue : '');
99
+ }, []);
100
+ React.useEffect(() => {
101
+ var _a;
102
+ (_a = editTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
103
+ }, []);
104
+ const textValidationErrorMessage = React.useMemo(() => {
105
+ return index.getTextValidationErrorMessage(messageState, strings.editBoxTextLimit, strings.editBoxEmptyWarningText, contentValueWithInlineImagesOverflow);
106
+ }, [messageState, strings.editBoxTextLimit, strings.editBoxEmptyWarningText, contentValueWithInlineImagesOverflow]);
107
+ const iconClassName = React.useCallback((isHover) => {
108
+ const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;
109
+ return react.mergeStyles(index.richTextEditBoxActionButtonIcon, {
110
+ color
111
+ });
112
+ }, [theme.palette.accent, theme.palette.neutralSecondary]);
113
+ const onRenderThemedCancelIcon = React.useCallback((isHover) => {
114
+ return index.onRenderCancelIcon(iconClassName(isHover));
115
+ }, [iconClassName]);
116
+ const onRenderThemedSubmitIcon = React.useCallback((isHover) => {
117
+ return index.onRenderSubmitIcon(iconClassName(isHover));
118
+ }, [iconClassName]);
119
+ const hasMultipleAttachments = React.useMemo(() => {
120
+ return index.doesMessageContainMultipleAttachments(message);
121
+ }, [message]);
122
+ const onSubmitHandler = React.useCallback(() => {
123
+ if (messageState !== 'OK') {
124
+ return;
125
+ }
126
+ if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {
127
+ const contentWithUpdatedInlineImagesInfo = index.getContentWithUpdatedInlineImagesInfo(contentValue, inlineImagesWithProgress);
128
+ const messageTooLong = index.isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);
129
+ // Set contentValueWithInlineImagesOverflow state to display the error bar
130
+ setContentValueWithInlineImagesOverflow(messageTooLong);
131
+ // The change from the setContentValueOverflow in the previous line will not kick in yet.
132
+ // We need to rely on the local value of messageTooLong to return early if the message is too long.
133
+ if (messageTooLong) {
134
+ return;
135
+ }
136
+ }
137
+ // Don't send message until all attachments have been uploaded successfully
138
+ setAttachmentUploadsPendingError(undefined);
139
+ if (index.hasIncompleteAttachmentUploads(inlineImagesWithProgress)) {
140
+ setAttachmentUploadsPendingError({
141
+ message: strings.imageUploadsPendingError,
142
+ timestamp: Date.now(),
143
+ errorBarType: index.SendBoxErrorBarType.info
144
+ });
145
+ return;
146
+ }
147
+ let content = contentValue;
148
+ content = index.removeBrokenImageContentAndClearImageSizeStyles(content);
149
+ let initInlineImages = [];
150
+ initInlineImages = initialInlineImages !== null && initialInlineImages !== void 0 ? initialInlineImages : [];
151
+ index.modifyInlineImagesInContentString(content, initInlineImages, (content) => {
152
+ // it's very important to pass an empty attachment here
153
+ // so when user removes all attachments, UI can reflect it instantly
154
+ // if you set it to undefined, the attachments pre-edited would still be there
155
+ // until edit message event is received
156
+ onSubmit(content, attachmentMetadata || []);
157
+ });
158
+ }, [messageState, inlineImagesWithProgress, initialInlineImages, contentValue, strings.imageUploadsPendingError, onSubmit, attachmentMetadata]);
159
+ const actionButtons = React.useMemo(() => {
160
+ return React.createElement(react.Stack, { horizontal: true },
161
+ React.createElement(index.InputBoxButton, { className: index.richTextActionButtonsStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
162
+ onCancel && onCancel(message.messageId);
163
+ }, id: 'dismissIconWrapper', "data-testId": 'chat-message-rich-text-edit-box-cancel-button' }),
164
+ React.createElement(index.InputBoxButton, { className: index.richTextActionButtonsStyle, ariaLabel: strings.editBoxSubmitButton, tooltipContent: strings.editBoxSubmitButton, onRenderIcon: onRenderThemedSubmitIcon, onClick: e => {
165
+ onSubmitHandler();
166
+ e.stopPropagation();
167
+ }, id: 'submitIconWrapper', "data-testId": 'chat-message-rich-text-edit-box-submit-button' }));
168
+ }, [message.messageId, onCancel, onRenderThemedCancelIcon, onRenderThemedSubmitIcon, strings.editBoxCancelButton, strings.editBoxSubmitButton, onSubmitHandler]);
169
+ const richTextLocaleStrings = React.useMemo(() => {
170
+ return Object.assign(Object.assign({}, locale.richTextSendBox), strings);
171
+ }, [locale.richTextSendBox, strings, locale.sendBox]);
172
+ const onCancelAttachmentUpload = React.useCallback((attachmentId) => {
173
+ // edit box only capable of removing attachments
174
+ // we need to expand attachment actions
175
+ // if we want to support more actions e.g. add
176
+ handleAttachmentAction({
177
+ type: 'remove',
178
+ id: attachmentId
179
+ });
180
+ }, []);
181
+ const onRenderAttachmentUploads = React.useCallback(() => {
182
+ return React.createElement(react.Stack, { className: index.attachmentUploadCardsStyles },
183
+ React.createElement(index.FluentV9ThemeProvider, { v8Theme: theme },
184
+ React.createElement(index._AttachmentUploadCards, { attachments: attachmentMetadata, onCancelAttachmentUpload: onCancelAttachmentUpload })));
185
+ }, [attachmentMetadata, onCancelAttachmentUpload, theme]);
186
+ const onChangeHandler = React.useCallback((content, removedInlineImages) => {
187
+ removedInlineImages === null || removedInlineImages === void 0 ? void 0 : removedInlineImages.forEach((removedInlineImage) => {
188
+ onRemoveInlineImage && onRemoveInlineImage(removedInlineImage, message.messageId);
189
+ });
190
+ setContent(content);
191
+ }, [setContent, onRemoveInlineImage, message.messageId]);
192
+ const getContent = () => {
193
+ return React.createElement(react.Stack, { className: react.mergeStyles(index.editBoxWidthStyles) },
194
+ React.createElement(index.RichTextSendBoxErrors, { textValidationErrorMessage: textValidationErrorMessage, systemMessage: message.failureReason, attachmentUploadsPendingError: attachmentUploadsPendingError, attachmentProgressError: imageUploadErrorMessage ? {
195
+ message: imageUploadErrorMessage,
196
+ timestamp: Date.now(),
197
+ errorBarType: index.SendBoxErrorBarType.error
198
+ } : undefined }),
199
+ React.createElement(index.RichTextInputBoxComponent, { placeholderText: strings.editBoxPlaceholderText, onChange: onChangeHandler, onEnterKeyDown: onSubmitHandler, editorComponentRef: editTextFieldRef, initialContent: initialContent, strings: richTextLocaleStrings, disabled: false, actionComponents: actionButtons, richTextEditorStyleProps: index.editBoxRichTextEditorStyle, isHorizontalLayoutDisabled: true, onRenderAttachmentUploads: onRenderAttachmentUploads, onPaste: onPaste, onInsertInlineImage: onInsertInlineImage ? (imageAttributes) => {
200
+ onInsertInlineImage(imageAttributes, message.messageId);
201
+ } : undefined }));
202
+ };
203
+ const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
204
+ return React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
205
+ className: reactComponents.mergeClasses(chatMyMessageStyles.root, hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined)
206
+ }, body: {
207
+ className: reactComponents.mergeClasses(editContainerStyles.body, attached !== 'top' ? editContainerStyles.bodyAttached : undefined)
208
+ } }, getContent());
209
+ };
210
+
211
+ exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
212
+ exports.default = ChatMessageComponentAsRichTextEditBox;
213
+ //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-DdSFdo_m.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-DdSFdo_m.js","sources":["../../../preprocess-dist/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { modifyInlineImagesInContentString } from '../../utils/SendBoxUtils';\nimport { hasIncompleteAttachmentUploads, removeBrokenImageContentAndClearImageSizeStyles, getContentWithUpdatedInlineImagesInfo, isMessageTooLong, inlineImageIds } from '../../utils/SendBoxUtils';\nimport { getMessageState, MessageState, onRenderCancelIcon, onRenderSubmitIcon, getTextValidationErrorMessage } from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { attachmentMetadataReducer, getMessageWithAttachmentMetadata, doesMessageContainMultipleAttachments } from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\nimport { getPreviousInlineImages } from '../../utils/RichTextEditorUtils';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (text: string, attachmentMetadata?: AttachmentMetadata[]) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n onPaste?: (event: {\n content: DocumentFragment;\n }) => void;\n onRemoveInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n onInsertInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n inlineImagesWithProgress?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (props: ChatMessageComponentAsRichTextEditBoxProps): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n onPaste,\n onInsertInlineImage,\n inlineImagesWithProgress,\n onRemoveInlineImage\n } = props;\n const [initialInlineImages, setInitialInlineImages] = useState<Record<string, string>[]>([]);\n const initialContent = useMemo(() => {\n const content = message.content;\n setInitialInlineImages(getPreviousInlineImages(content));\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n document.querySelectorAll('.broken-image-wrapper').forEach(brokenImage => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n const [contentValue, setContentValue] = useState<string>(initialContent || '');\n const [contentValueWithInlineImagesOverflow, setContentValueWithInlineImagesOverflow] = useState(false);\n const [attachmentMetadata, handleAttachmentAction] = useReducer(attachmentMetadataReducer, getMessageWithAttachmentMetadata(message) ?? []);\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(undefined);\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState: MessageState = useMemo(() => {\n // get plain text content from the editor to check if the message is empty\n // as the content may contain tags even when the content is empty\n const plainTextContent = editTextFieldRef.current?.getPlainContent() ?? contentValue;\n let messageLengthState = getMessageState(plainTextContent, attachmentMetadata ?? []);\n const imageIds = inlineImageIds(contentValue);\n if (messageLengthState !== 'OK' && imageIds.length > 0) {\n // Check if too long\n if (isMessageTooLong(contentValue.length)) {\n messageLengthState = 'too long';\n } else {\n messageLengthState = 'OK';\n }\n }\n return messageLengthState;\n }, [attachmentMetadata, contentValue]);\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImagesWithProgress?.filter(image => image.error).pop()?.error?.message;\n }, [inlineImagesWithProgress]);\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n const setContent = useCallback((newValue?: string): void => {\n setContentValue(newValue ?? '');\n }, []);\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n const textValidationErrorMessage = useMemo(() => {\n return getTextValidationErrorMessage(messageState, strings.editBoxTextLimit, strings.editBoxEmptyWarningText, contentValueWithInlineImagesOverflow);\n }, [messageState, strings.editBoxTextLimit, strings.editBoxEmptyWarningText, contentValueWithInlineImagesOverflow]);\n const iconClassName = useCallback((isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, {\n color\n });\n }, [theme.palette.accent, theme.palette.neutralSecondary]);\n const onRenderThemedCancelIcon = useCallback((isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n }, [iconClassName]);\n const onRenderThemedSubmitIcon = useCallback((isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n }, [iconClassName]);\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n const onSubmitHandler = useCallback((): void => {\n if (messageState !== 'OK') {\n return;\n }\n if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {\n const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(contentValue, inlineImagesWithProgress);\n const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);\n // Set contentValueWithInlineImagesOverflow state to display the error bar\n setContentValueWithInlineImagesOverflow(messageTooLong);\n // The change from the setContentValueOverflow in the previous line will not kick in yet.\n // We need to rely on the local value of messageTooLong to return early if the message is too long.\n if (messageTooLong) {\n return;\n }\n }\n\n // Don't send message until all attachments have been uploaded successfully\n setAttachmentUploadsPendingError(undefined);\n if (hasIncompleteAttachmentUploads(inlineImagesWithProgress)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n let content = contentValue;\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n let initInlineImages: Record<string, string>[] = [];\n initInlineImages = initialInlineImages ?? [];\n modifyInlineImagesInContentString(content, initInlineImages, (content: string) => {\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, attachmentMetadata || []);\n });\n }, [messageState, inlineImagesWithProgress, initialInlineImages, contentValue, strings.imageUploadsPendingError, onSubmit, attachmentMetadata]);\n const actionButtons = useMemo(() => {\n return <Stack horizontal>\n <InputBoxButton className={richTextActionButtonsStyle} ariaLabel={strings.editBoxCancelButton} tooltipContent={strings.editBoxCancelButton} onRenderIcon={onRenderThemedCancelIcon} onClick={() => {\n onCancel && onCancel(message.messageId);\n }} id={'dismissIconWrapper'} data-testId={'chat-message-rich-text-edit-box-cancel-button'} />\n <InputBoxButton className={richTextActionButtonsStyle} ariaLabel={strings.editBoxSubmitButton} tooltipContent={strings.editBoxSubmitButton} onRenderIcon={onRenderThemedSubmitIcon} onClick={e => {\n onSubmitHandler();\n e.stopPropagation();\n }} id={'submitIconWrapper'} data-testId={'chat-message-rich-text-edit-box-submit-button'} />\n </Stack>;\n }, [message.messageId, onCancel, onRenderThemedCancelIcon, onRenderThemedSubmitIcon, strings.editBoxCancelButton, strings.editBoxSubmitButton, onSubmitHandler]);\n const richTextLocaleStrings = useMemo(() => {\n return {\n ...locale.richTextSendBox,\n ...strings\n };\n return locale.sendBox;\n }, [locale.richTextSendBox, strings, locale.sendBox]);\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({\n type: 'remove',\n id: attachmentId\n });\n }, []);\n const onRenderAttachmentUploads = useCallback(() => {\n return <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards attachments={attachmentMetadata} onCancelAttachmentUpload={onCancelAttachmentUpload} />\n </FluentV9ThemeProvider>\n </Stack>;\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n const onChangeHandler = useCallback((content: string | undefined, removedInlineImages?: Record<string, string>[]) => {\n removedInlineImages?.forEach((removedInlineImage: Record<string, string>) => {\n onRemoveInlineImage && onRemoveInlineImage(removedInlineImage, message.messageId);\n });\n setContent(content);\n }, [setContent, onRemoveInlineImage, message.messageId]);\n const getContent = (): JSX.Element => {\n return <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors textValidationErrorMessage={textValidationErrorMessage} systemMessage={message.failureReason} attachmentUploadsPendingError={attachmentUploadsPendingError} attachmentProgressError={imageUploadErrorMessage ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n } : undefined} />\n <RichTextInputBoxComponent placeholderText={strings.editBoxPlaceholderText} onChange={onChangeHandler} onEnterKeyDown={onSubmitHandler} editorComponentRef={editTextFieldRef} initialContent={initialContent} strings={richTextLocaleStrings} disabled={false} actionComponents={actionButtons} richTextEditorStyleProps={editBoxRichTextEditorStyle} isHorizontalLayoutDisabled={true} onRenderAttachmentUploads={onRenderAttachmentUploads} onPaste={onPaste} onInsertInlineImage={onInsertInlineImage ? (imageAttributes: Record<string, string>) => {\n onInsertInlineImage(imageAttributes, message.messageId);\n } : undefined} />\n </Stack>;\n };\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return <ChatMyMessage attached={attached} root={{\n className: mergeClasses(chatMyMessageStyles.root, hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined)\n }} body={{\n className: mergeClasses(editContainerStyles.body, attached !== 'top' ? editContainerStyles.bodyAttached : undefined)\n }}>\n {getContent()}\n </ChatMyMessage>;\n};\nexport default ChatMessageComponentAsRichTextEditBox;"],"names":["useState","useMemo","getPreviousInlineImages","BROKEN_IMAGE_SVG_DATA","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","inlineImageIds","isMessageTooLong","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","getTextValidationErrorMessage","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","getContentWithUpdatedInlineImagesInfo","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","modifyInlineImagesInContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA+CA;;AAEG;AACI,MAAM,qCAAqC,GAAG,CAAC,KAAiD,KAAiB;;AACtH,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACpB,GAAG,KAAK;IACT,MAAM,CAAC,mBAAmB,EAAE,sBAAsB,CAAC,GAAGA,cAAQ,CAA2B,EAAE,CAAC;AAC5F,IAAA,MAAM,cAAc,GAAGC,aAAO,CAAC,MAAK;AAClC,QAAA,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO;AAC/B,QAAA,sBAAsB,CAACC,6BAAuB,CAAC,OAAO,CAAC,CAAC;AACxD,QAAA,MAAM,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,OAAO,KAAA,IAAA,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GAAG,SAAS,EAAA,CAAI,CACT;AACZ,IAAA,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK;IACxG,OAAO,KAAA,CAAA,aAAA,CAACC,uBAAa,EAAA,EAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;AAC9C,YAAA,SAAS,EAAEC,4BAAY,CAAC,mBAAmB,CAAC,IAAI,EAAE,sBAAsB,GAAG,mBAAmB,CAAC,4BAA4B,GAAG,SAAS;AACxI,SAAA,EAAE,IAAI,EAAE;YACP,SAAS,EAAEA,4BAAY,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS;SACpH,EAAA,EACI,UAAU,EAAE,CACC;AACpB;;;;;"}
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var index = require('./index-CH39vOsT.js');
5
+ require('@fluentui/react');
6
+ require('@azure/communication-common');
7
+ require('@fluentui/react-components');
8
+ require('@fluentui-contrib/react-chat');
9
+ require('@fluentui/react-hooks');
10
+ require('react-use-draggable-scroll');
11
+ require('copy-to-clipboard');
12
+ require('reselect');
13
+ require('@azure/communication-calling');
14
+ require('memoize-one');
15
+ require('@azure/logger');
16
+ require('events');
17
+ require('immer');
18
+ require('@fluentui/react-icons');
19
+ require('textarea-caret-ts');
20
+ require('use-debounce');
21
+ require('@fluentui/react-file-type-icons');
22
+ require('@griffel/react');
23
+ require('uuid');
24
+ require('roosterjs-content-model-core');
25
+ require('roosterjs-content-model-dom');
26
+ require('roosterjs-content-model-plugins');
27
+ require('roosterjs-content-model-api');
28
+ require('html-react-parser');
29
+ require('react-linkify');
30
+ require('dompurify');
31
+ require('@azure/communication-chat');
32
+ require('nanoid');
33
+ require('@azure/communication-calling-effects');
34
+
35
+ // Copyright (c) Microsoft Corporation.
36
+ // Licensed under the MIT License.
37
+ /**
38
+ * @private
39
+ *
40
+ * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox
41
+ * before lazyLoading is done
42
+ */
43
+ const RichTextSendBoxWrapper = (props) => {
44
+ const richTextSendBoxProps = index.usePropsFor(index.RichTextSendBox);
45
+ return React.createElement(index.RichTextSendBox, Object.assign({}, richTextSendBoxProps, props));
46
+ };
47
+
48
+ exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
49
+ //# sourceMappingURL=RichTextSendBoxWrapper-C2HrwCVY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RichTextSendBoxWrapper-C2HrwCVY.js","sources":["../../../preprocess-dist/react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport React from 'react';\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAIA;;;;;AAKG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC;AACzD,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI;AACjE;;;;"}