@azure/communication-react 1.27.0-beta.1 → 1.27.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 (437) hide show
  1. package/dist/communication-react.d.ts +142 -1385
  2. package/dist/dist-cjs/communication-react/index.js +40050 -174
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/common.d.ts +0 -13
  5. package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/constants.d.ts +0 -5
  7. package/dist/dist-esm/acs-ui-common/src/constants.js +0 -5
  8. package/dist/dist-esm/acs-ui-common/src/constants.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/index.d.ts +0 -4
  10. package/dist/dist-esm/acs-ui-common/src/index.js +0 -3
  11. package/dist/dist-esm/acs-ui-common/src/index.js.map +1 -1
  12. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  13. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  14. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.d.ts +27 -3
  15. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js +9 -2
  16. package/dist/dist-esm/acs-ui-javascript-loaders/src/callCompositeLoader.js.map +1 -1
  17. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.d.ts +31 -3
  18. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js +9 -2
  19. package/dist/dist-esm/acs-ui-javascript-loaders/src/callWithChatCompositeLoader.js.map +1 -1
  20. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.d.ts +22 -3
  21. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js +8 -2
  22. package/dist/dist-esm/acs-ui-javascript-loaders/src/chatCompositeLoader.js.map +1 -1
  23. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.d.ts +29 -3
  24. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js +9 -2
  25. package/dist/dist-esm/acs-ui-javascript-loaders/src/outboundCallCompositeLoader.js.map +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +6 -0
  27. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +7 -2
  28. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +13 -16
  30. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -2
  32. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -6
  33. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  34. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +1 -19
  35. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
  36. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -0
  37. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -0
  38. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  40. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +1 -3
  41. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/remoteParticipantsSelector.d.ts +15 -0
  43. package/dist/dist-esm/calling-component-bindings/src/remoteParticipantsSelector.js +13 -0
  44. package/dist/dist-esm/calling-component-bindings/src/remoteParticipantsSelector.js.map +1 -0
  45. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +9 -0
  46. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +16 -0
  47. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -4
  49. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  50. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -42
  51. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  52. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +0 -6
  53. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -35
  54. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -4
  56. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +4 -24
  57. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -3
  59. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +2 -0
  61. package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js.map +1 -1
  62. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.d.ts +0 -1
  63. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js +1 -7
  64. package/dist/dist-esm/calling-stateful-client/src/RecordingSubscriber.js.map +1 -1
  65. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -17
  66. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
  67. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -1
  68. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  69. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +2 -6
  70. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +2 -35
  71. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  72. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +1 -2
  73. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js +0 -4
  74. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  75. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -25
  76. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  77. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  78. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  79. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -15
  80. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  81. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -2
  82. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  83. package/dist/dist-esm/chat-stateful-client/src/index.d.ts +0 -1
  84. package/dist/dist-esm/chat-stateful-client/src/index.js.map +1 -1
  85. package/dist/dist-esm/communication-react/src/index.d.ts +0 -21
  86. package/dist/dist-esm/communication-react/src/index.js +0 -3
  87. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  88. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +0 -2
  89. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +0 -1
  90. package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
  91. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +4 -7
  92. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  93. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -13
  94. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +3 -9
  95. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -11
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -32
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -8
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +5 -9
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.d.ts +1 -2
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +4 -4
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.d.ts +1 -4
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +6 -31
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +1 -15
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +0 -9
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -23
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +6 -17
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -8
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +6 -10
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +5 -5
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ImageOverlay.js +0 -2
  120. package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -1
  121. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  122. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -15
  123. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  124. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -81
  125. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -13
  126. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  128. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -12
  129. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/RTTDisclosureBanner.js.map +1 -1
  131. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/RealTimeTextModal.js.map +1 -1
  133. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +1 -47
  134. package/dist/dist-esm/react-components/src/components/SendBox.js +6 -57
  135. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
  137. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +10 -4
  138. package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +1 -1
  139. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -21
  140. package/dist/dist-esm/react-components/src/components/index.js +0 -8
  141. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  142. package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +1 -1
  143. package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +1 -1
  144. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  145. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +1 -1
  146. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  147. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +3 -3
  148. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -8
  149. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  150. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js +2 -0
  151. package/dist/dist-esm/react-components/src/components/styles/RTTDisclosureBanner.styles.js.map +1 -1
  152. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +3 -37
  153. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +3 -30
  154. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  155. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +2 -4
  156. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +2 -9
  157. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  158. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -38
  159. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -131
  160. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  161. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -2
  162. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  163. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  164. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/components/utils/sortCaptionsAndRealTimeTexts.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  167. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -3
  168. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  170. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  171. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -45
  172. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  173. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -24
  174. package/dist/dist-esm/react-components/src/theming/icons.js +0 -67
  175. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  176. package/dist/dist-esm/react-components/src/theming/themes.d.ts +0 -6
  177. package/dist/dist-esm/react-components/src/theming/themes.js +0 -9
  178. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  179. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +0 -13
  180. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  181. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  182. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  183. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -59
  184. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +10 -15
  185. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  186. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  187. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -37
  188. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +1 -11
  189. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  190. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -4
  191. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  192. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js +1 -2
  193. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
  194. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -2
  195. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  196. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  197. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -19
  198. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  199. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -10
  200. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  201. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  202. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -19
  203. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  204. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  205. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +6 -19
  206. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  207. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +0 -3
  208. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  209. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -3
  210. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  211. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -2
  212. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -40
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +2 -2
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +2 -2
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -1
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +3 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js +11 -1
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +0 -8
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -49
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  230. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +0 -52
  231. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +4 -10
  232. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -10
  234. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -20
  235. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +6 -20
  237. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  238. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -10
  239. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -14
  240. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -27
  242. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  243. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -2
  245. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +11 -189
  246. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -20
  248. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  249. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -6
  250. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -36
  251. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -12
  253. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +2 -13
  255. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -2
  257. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -4
  259. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -4
  260. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  261. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  263. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -1
  264. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -2
  266. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +2 -41
  268. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +0 -21
  269. package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +0 -5
  271. package/dist/dist-esm/react-composites/src/composites/common/constants.js +0 -5
  272. package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -26
  274. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -2
  275. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  276. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +5 -0
  277. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  278. package/package.json +14 -14
  279. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CuMDt6F1.js +0 -205
  280. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CuMDt6F1.js.map +0 -1
  281. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-FltfC9HN.js +0 -49
  282. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-FltfC9HN.js.map +0 -1
  283. package/dist/dist-cjs/communication-react/index-baiJAAbD.js +0 -45914
  284. package/dist/dist-cjs/communication-react/index-baiJAAbD.js.map +0 -1
  285. package/dist/dist-esm/acs-ui-common/src/dataConversion.d.ts +0 -6
  286. package/dist/dist-esm/acs-ui-common/src/dataConversion.js +0 -20
  287. package/dist/dist-esm/acs-ui-common/src/dataConversion.js.map +0 -1
  288. package/dist/dist-esm/acs-ui-common/src/removeImageTags.d.ts +0 -7
  289. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js +0 -18
  290. package/dist/dist-esm/acs-ui-common/src/removeImageTags.js.map +0 -1
  291. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.d.ts +0 -17
  292. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js +0 -33
  293. package/dist/dist-esm/calling-stateful-client/src/LocalRecordingSubscriber.js.map +0 -1
  294. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.d.ts +0 -6
  295. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js +0 -20
  296. package/dist/dist-esm/chat-component-bindings/src/utils/getImageAttachmentsFromHTMLContent.js.map +0 -1
  297. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  298. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  299. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  300. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.d.ts +0 -24
  301. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +0 -196
  302. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +0 -1
  303. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  304. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -36
  305. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  306. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  307. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -67
  308. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  309. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  310. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -51
  311. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  312. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  313. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -40
  314. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  315. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  316. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -119
  317. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  318. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +0 -9
  319. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +0 -29
  320. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +0 -1
  321. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +0 -30
  322. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +0 -98
  323. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +0 -1
  324. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +0 -19
  325. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +0 -43
  326. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +0 -1
  327. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +0 -15
  328. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +0 -42
  329. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +0 -1
  330. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +0 -24
  331. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +0 -64
  332. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +0 -1
  333. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +0 -20
  334. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +0 -45
  335. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +0 -1
  336. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.d.ts +0 -14
  337. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js +0 -42
  338. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UndoRedoPlugin.js.map +0 -1
  339. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +0 -30
  340. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +0 -99
  341. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +0 -1
  342. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +0 -59
  343. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +0 -334
  344. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +0 -1
  345. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -37
  346. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +0 -78
  347. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +0 -1
  348. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +0 -215
  349. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +0 -177
  350. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +0 -1
  351. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +0 -16
  352. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +0 -75
  353. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +0 -1
  354. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.d.ts +0 -9
  355. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js +0 -16
  356. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxUtils.js.map +0 -1
  357. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +0 -19
  358. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +0 -229
  359. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +0 -1
  360. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +0 -7
  361. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +0 -51
  362. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +0 -1
  363. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.d.ts +0 -15
  364. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js +0 -64
  365. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +0 -1
  366. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +0 -6
  367. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +0 -13
  368. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +0 -1
  369. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -56
  370. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +0 -75
  371. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +0 -1
  372. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  373. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  374. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  375. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  376. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  377. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  378. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  379. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -819
  380. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  381. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  382. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  383. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  384. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  385. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  386. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  387. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +0 -82
  388. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +0 -324
  389. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +0 -1
  390. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +0 -21
  391. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +0 -38
  392. package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +0 -1
  393. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  394. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -99
  395. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  396. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  397. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  398. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  399. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +0 -73
  400. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +0 -178
  401. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +0 -1
  402. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +0 -33
  403. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +0 -119
  404. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +0 -1
  405. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  406. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  407. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  408. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  409. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  410. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  411. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -46
  412. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -200
  413. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  414. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.d.ts +0 -15
  415. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js +0 -23
  416. package/dist/dist-esm/react-composites/src/composites/ChatComposite/AttachmentDownloadErrorBar.js.map +0 -1
  417. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  418. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  419. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  420. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.d.ts +0 -49
  421. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js +0 -44
  422. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadReducer.js.map +0 -1
  423. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.d.ts +0 -39
  424. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +0 -265
  425. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +0 -1
  426. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.d.ts +0 -80
  427. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js +0 -36
  428. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +0 -1
  429. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +0 -38
  430. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +0 -67
  431. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +0 -1
  432. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -5
  433. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -5
  434. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +0 -1
  435. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -10
  436. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -16
  437. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
@@ -1,550 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
- return new (P || (P = Promise))(function (resolve, reject) {
6
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
- step((generator = generator.apply(thisArg, _arguments || [])).next());
10
- });
11
- };
12
- import React, { useState, useCallback, useRef } from 'react';
13
- import { useEffect, useMemo } from 'react';
14
- import { useLocale } from '../../localization';
15
- import { Announcer } from '../Announcer';
16
- import { TextField } from '@fluentui/react';
17
- import { isEnterKeyEventFromCompositionSession, nullToUndefined } from '../utils';
18
- import { findMentionTagForSelection, findNewSelectionIndexForMention, findStringsDiffIndexes, getDisplayNameForMentionSuggestion, getValidatedIndexInRange, htmlStringForMentionSuggestion, textToTagParser, updateHTML } from './mentionTagUtils';
19
- import { Caret } from 'textarea-caret-ts';
20
- import { _MentionPopover } from '../MentionPopover';
21
- import { useDebouncedCallback } from 'use-debounce';
22
- const DEFAULT_MENTION_TRIGGER = '@';
23
- /**
24
- * @private
25
- */
26
- export const TextFieldWithMention = (props) => {
27
- const { textFieldProps, dataUiId, textValue, onChange, textFieldRef, onKeyDown, onEnterKeyDown, supportNewline, mentionLookupOptions } = props;
28
- const inputBoxRef = useRef(null);
29
- // Current suggestion list, provided by the callback
30
- const [mentionSuggestions, setMentionSuggestions] = useState([]);
31
- // Current suggestion list, provided by the callback
32
- const [activeSuggestionIndex, setActiveSuggestionIndex] = useState(undefined);
33
- // Index of the current trigger character in the text field
34
- const [currentTriggerStartIndex, setCurrentTriggerStartIndex] = useState(-1);
35
- const [inputTextValue, setInputTextValue] = useState('');
36
- // Internal value for text value prop
37
- const [internalTextValue, setInternalTextValue] = useState('');
38
- const [tagsValue, setTagsValue] = useState([]);
39
- // Index of the previous selection start in the text field
40
- const [selectionStartValue, setSelectionStartValue] = useState();
41
- // Index of the previous selection end in the text field
42
- const [selectionEndValue, setSelectionEndValue] = useState();
43
- // Boolean value to check if onMouseDown event should be handled during select as selection range
44
- // for onMouseDown event is not updated yet and the selection range for mouse click/taps will be
45
- // updated in onSelect event if needed.
46
- const [shouldHandleOnMouseDownDuringSelect, setShouldHandleOnMouseDownDuringSelect] = useState(true);
47
- // Boolean flag to check if mouse/touch move event should be handled
48
- const [shouldHandleMoveEvent, setShouldHandleMoveEvent] = useState(false);
49
- // Indexes of start of touch/mouse selection
50
- const [interactionStartSelection, setInteractionStartSelection] = useState();
51
- // Caret position in the text field
52
- const [caretPosition, setCaretPosition] = useState(undefined);
53
- // Index of where the caret is in the text field
54
- const [caretIndex, setCaretIndex] = useState(undefined);
55
- const localeStrings = useLocale().strings;
56
- // Set mention suggestions
57
- const updateMentionSuggestions = useCallback((suggestions) => {
58
- setMentionSuggestions(suggestions);
59
- }, [setMentionSuggestions]);
60
- useEffect(() => {
61
- setInternalTextValue(textValue);
62
- // update mention suggestions before the next render cycle
63
- updateMentionSuggestions([]);
64
- }, [textValue, updateMentionSuggestions]);
65
- // Parse the text and get the plain text version to display in the input box
66
- useEffect(() => {
67
- const trigger = (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger) || DEFAULT_MENTION_TRIGGER;
68
- const parsedHTMLData = textToTagParser(internalTextValue, trigger);
69
- setInputTextValue(parsedHTMLData.plainText);
70
- setTagsValue(parsedHTMLData.tags);
71
- updateMentionSuggestions([]);
72
- }, [internalTextValue, mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger, updateMentionSuggestions]);
73
- useEffect(() => {
74
- var _a;
75
- // effect for caret index update
76
- if (caretIndex === undefined || textFieldRef === undefined || (textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === undefined) {
77
- return;
78
- }
79
- // get validated caret index between 0 and inputTextValue.length otherwise caret will be set to incorrect index
80
- const updatedCaretIndex = getValidatedIndexInRange({
81
- min: 0,
82
- max: inputTextValue.length,
83
- currentValue: caretIndex
84
- });
85
- (_a = textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === null || _a === void 0 ? void 0 : _a.setSelectionRange(updatedCaretIndex, updatedCaretIndex);
86
- setSelectionStartValue(updatedCaretIndex);
87
- setSelectionEndValue(updatedCaretIndex);
88
- }, [caretIndex, inputTextValue, textFieldRef, setSelectionStartValue, setSelectionEndValue]);
89
- const onSuggestionSelected = useCallback((suggestion) => {
90
- var _a, _b, _c;
91
- let selectionEnd = ((_a = textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === null || _a === void 0 ? void 0 : _a.selectionEnd) || -1;
92
- if (selectionEnd < 0) {
93
- selectionEnd = 0;
94
- }
95
- else if (selectionEnd > inputTextValue.length) {
96
- selectionEnd = inputTextValue.length;
97
- }
98
- const oldPlainText = inputTextValue;
99
- const mention = htmlStringForMentionSuggestion(suggestion, localeStrings);
100
- // update plain text with the mention html text
101
- const triggerText = (_b = mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger) !== null && _b !== void 0 ? _b : DEFAULT_MENTION_TRIGGER;
102
- // update html text with updated plain text
103
- const updatedContent = updateHTML({
104
- htmlText: internalTextValue,
105
- oldPlainText,
106
- tags: tagsValue,
107
- startIndex: currentTriggerStartIndex,
108
- oldPlainTextEndIndex: selectionEnd,
109
- change: mention,
110
- mentionTrigger: triggerText
111
- });
112
- setInternalTextValue(updatedContent.updatedHTML);
113
- const displayName = getDisplayNameForMentionSuggestion(suggestion, localeStrings);
114
- const newCaretIndex = currentTriggerStartIndex + displayName.length + triggerText.length;
115
- // move the caret in the text field to the end of the mention plain text
116
- setCaretIndex(newCaretIndex);
117
- setSelectionEndValue(newCaretIndex);
118
- setSelectionStartValue(newCaretIndex);
119
- setCurrentTriggerStartIndex(-1);
120
- updateMentionSuggestions([]);
121
- // set focus back to text field
122
- (_c = textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === null || _c === void 0 ? void 0 : _c.focus();
123
- setActiveSuggestionIndex(undefined);
124
- onChange && onChange(undefined, updatedContent.updatedHTML);
125
- }, [textFieldRef, inputTextValue, currentTriggerStartIndex, mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger, onChange, internalTextValue, tagsValue, updateMentionSuggestions, localeStrings]);
126
- const onTextFieldKeyDown = useCallback((ev) => {
127
- // caretIndex should be set to undefined when the user is typing
128
- setCaretIndex(undefined);
129
- // shouldHandleOnMouseDownDuringSelect should be set to false after the last mouse down event.
130
- // it shouldn't be updated in onMouseUp
131
- // as onMouseUp can be triggered before or after onSelect event
132
- // because its order depends on mouse events not selection.
133
- setShouldHandleOnMouseDownDuringSelect(false);
134
- if (isEnterKeyEventFromCompositionSession(ev.nativeEvent)) {
135
- return;
136
- }
137
- let isActiveSuggestionIndexUpdated = false;
138
- if (mentionSuggestions.length > 0) {
139
- if (ev.key === 'ArrowUp') {
140
- ev.preventDefault();
141
- const newActiveIndex = activeSuggestionIndex === undefined ? mentionSuggestions.length - 1 : Math.max(activeSuggestionIndex - 1, 0);
142
- setActiveSuggestionIndex(newActiveIndex);
143
- isActiveSuggestionIndexUpdated = true;
144
- }
145
- else if (ev.key === 'ArrowDown') {
146
- ev.preventDefault();
147
- const newActiveIndex = activeSuggestionIndex === undefined ? 0 : Math.min(activeSuggestionIndex + 1, mentionSuggestions.length - 1);
148
- setActiveSuggestionIndex(newActiveIndex);
149
- isActiveSuggestionIndexUpdated = true;
150
- }
151
- else if (ev.key === 'Escape') {
152
- updateMentionSuggestions([]);
153
- // reset active suggestion index when suggestions are closed
154
- setActiveSuggestionIndex(undefined);
155
- isActiveSuggestionIndexUpdated = true;
156
- }
157
- }
158
- if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {
159
- ev.preventDefault();
160
- // If we are looking up a mention, select the focused suggestion
161
- if (mentionSuggestions.length > 0 && activeSuggestionIndex !== undefined) {
162
- const selectedMention = mentionSuggestions[activeSuggestionIndex];
163
- if (selectedMention) {
164
- onSuggestionSelected(selectedMention);
165
- return;
166
- }
167
- }
168
- onEnterKeyDown && onEnterKeyDown();
169
- }
170
- else if (!isActiveSuggestionIndexUpdated) {
171
- // Update the active suggestion index if the user is typing,
172
- // otherwise the focus will be lost
173
- setActiveSuggestionIndex(undefined);
174
- }
175
- onKeyDown && onKeyDown(ev);
176
- }, [onEnterKeyDown, onKeyDown, supportNewline, mentionSuggestions, activeSuggestionIndex, onSuggestionSelected, updateMentionSuggestions]);
177
- const debouncedQueryUpdate = useDebouncedCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
178
- var _a;
179
- let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
180
- suggestions = suggestions.filter(suggestion => suggestion.displayText.trim() !== '');
181
- if (suggestions.length === 0) {
182
- setActiveSuggestionIndex(undefined);
183
- }
184
- else if (activeSuggestionIndex === undefined) {
185
- // Set the active to the first, if it's not already set
186
- setActiveSuggestionIndex(0);
187
- }
188
- updateMentionSuggestions(suggestions);
189
- }), 500);
190
- // Update selections index in mention to navigate by words
191
- const updateSelectionIndexesWithMentionIfNeeded = useCallback(({ event, inputTextValue, selectionEndValue, selectionStartValue, tagsValue }) => {
192
- var _a, _b, _c;
193
- let updatedStartIndex = event.currentTarget.selectionStart;
194
- let updatedEndIndex = event.currentTarget.selectionEnd;
195
- if (event.currentTarget.selectionStart === event.currentTarget.selectionEnd && event.currentTarget.selectionStart !== null && event.currentTarget.selectionStart !== -1) {
196
- // just a caret movement/usual typing or deleting
197
- const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);
198
- // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries
199
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined && event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex && event.currentTarget.selectionStart < ((_a = mentionTag.plainTextEndIndex) !== null && _a !== void 0 ? _a : mentionTag.plainTextBeginIndex)) {
200
- // get updated selection index
201
- const newSelectionIndex = findNewSelectionIndexForMention({
202
- tag: mentionTag,
203
- textValue: inputTextValue,
204
- currentSelectionIndex: event.currentTarget.selectionStart,
205
- previousSelectionIndex: selectionStartValue !== null && selectionStartValue !== void 0 ? selectionStartValue : inputTextValue.length
206
- });
207
- updatedStartIndex = newSelectionIndex;
208
- updatedEndIndex = newSelectionIndex;
209
- }
210
- }
211
- else if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd) {
212
- // Both e.currentTarget.selectionStart !== selectionStartValue and e.currentTarget.selectionEnd !== selectionEndValue can be true when a user selects a text by double click
213
- if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionStart !== selectionStartValue) {
214
- // the selection start is changed
215
- const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);
216
- // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries
217
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined && event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex && event.currentTarget.selectionStart < ((_b = mentionTag.plainTextEndIndex) !== null && _b !== void 0 ? _b : mentionTag.plainTextBeginIndex)) {
218
- updatedStartIndex = findNewSelectionIndexForMention({
219
- tag: mentionTag,
220
- textValue: inputTextValue,
221
- currentSelectionIndex: event.currentTarget.selectionStart,
222
- previousSelectionIndex: selectionStartValue !== null && selectionStartValue !== void 0 ? selectionStartValue : inputTextValue.length
223
- });
224
- }
225
- }
226
- if (event.currentTarget.selectionEnd !== null && event.currentTarget.selectionEnd !== selectionEndValue) {
227
- // the selection end is changed
228
- const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionEnd);
229
- // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries
230
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined && event.currentTarget.selectionEnd > mentionTag.plainTextBeginIndex && event.currentTarget.selectionEnd < ((_c = mentionTag.plainTextEndIndex) !== null && _c !== void 0 ? _c : mentionTag.plainTextBeginIndex)) {
231
- updatedEndIndex = findNewSelectionIndexForMention({
232
- tag: mentionTag,
233
- textValue: inputTextValue,
234
- currentSelectionIndex: event.currentTarget.selectionEnd,
235
- previousSelectionIndex: selectionEndValue !== null && selectionEndValue !== void 0 ? selectionEndValue : inputTextValue.length
236
- });
237
- }
238
- }
239
- }
240
- // e.currentTarget.selectionDirection should be set to handle shift + arrow keys
241
- if (event.currentTarget.selectionDirection === null) {
242
- event.currentTarget.setSelectionRange(updatedStartIndex, updatedEndIndex);
243
- }
244
- else {
245
- event.currentTarget.setSelectionRange(updatedStartIndex, updatedEndIndex, event.currentTarget.selectionDirection);
246
- }
247
- setSelectionStartValue(nullToUndefined(updatedStartIndex));
248
- setSelectionEndValue(nullToUndefined(updatedEndIndex));
249
- }, [setSelectionStartValue, setSelectionEndValue]);
250
- const handleOnSelect = useCallback(({ event, inputTextValue, tags, shouldHandleOnMouseDownDuringSelect, selectionStartValue, selectionEndValue, interactionStartSelection }) => {
251
- var _a;
252
- if (event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === inputTextValue.length) {
253
- // entire text is selected, no need to change anything
254
- setSelectionStartValue(event.currentTarget.selectionStart);
255
- setSelectionEndValue(event.currentTarget.selectionEnd);
256
- setInteractionStartSelection(undefined);
257
- setShouldHandleOnMouseDownDuringSelect(false);
258
- }
259
- else if (shouldHandleOnMouseDownDuringSelect) {
260
- if (interactionStartSelection !== undefined && (interactionStartSelection.start !== event.currentTarget.selectionStart || interactionStartSelection.end !== event.currentTarget.selectionEnd)) {
261
- // selection was changed by mouse
262
- // for mouse selection only, it's possible to start selection in the middle of a word in a mention
263
- // because of this when event.currentTarget.selectionStart === mouseMoveStartPoint.start
264
- // selectionStartValue for updateSelectionIndexesWithMentionIfNeeded should be set
265
- // to the end of the input to mimic selection from right to left for the left selection index
266
- const updatedSelectionStartValue = event.currentTarget.selectionStart === interactionStartSelection.start ? inputTextValue.length : interactionStartSelection.start;
267
- // selectionStart is always less than selectionEnd so sometimes selectionEnd is user's start of the selection
268
- // so when event.currentTarget.selectionEnd === mouseMoveStartPoint.end
269
- // selectionEndValue for updateSelectionIndexesWithMentionIfNeeded should be set
270
- // to the beginning of the input to mimic selection from left to right for the right selection index
271
- const updatedSelectionEndValue = event.currentTarget.selectionEnd === interactionStartSelection.end ? 0 : interactionStartSelection.end;
272
- updateSelectionIndexesWithMentionIfNeeded({
273
- event,
274
- inputTextValue,
275
- selectionStartValue: updatedSelectionStartValue,
276
- selectionEndValue: updatedSelectionEndValue,
277
- tagsValue: tags
278
- });
279
- setInteractionStartSelection(undefined);
280
- setShouldHandleOnMouseDownDuringSelect(false);
281
- }
282
- else if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionEnd !== null) {
283
- // on select was triggered by mouse down/up with no movement
284
- const mentionTag = findMentionTagForSelection(tags, event.currentTarget.selectionStart);
285
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {
286
- // handle mention click by selecting the whole mention
287
- // if the selection is not on the bounds of the mention
288
- // disable selection for clicks on mention bounds
289
- const mentionEndIndex = (_a = mentionTag.plainTextEndIndex) !== null && _a !== void 0 ? _a : mentionTag.plainTextBeginIndex;
290
- if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd && event.currentTarget.selectionEnd > mentionEndIndex) {
291
- // handle triple click when the text starts from mention
292
- if (event.currentTarget.selectionDirection === null) {
293
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, event.currentTarget.selectionEnd);
294
- }
295
- else {
296
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, event.currentTarget.selectionEnd, event.currentTarget.selectionDirection);
297
- }
298
- setSelectionStartValue(mentionTag.plainTextBeginIndex);
299
- setSelectionEndValue(event.currentTarget.selectionEnd);
300
- }
301
- else if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd || event.currentTarget.selectionStart !== mentionTag.plainTextBeginIndex && event.currentTarget.selectionStart !== mentionEndIndex) {
302
- if (event.currentTarget.selectionDirection === null) {
303
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, mentionEndIndex);
304
- }
305
- else {
306
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, mentionEndIndex, event.currentTarget.selectionDirection);
307
- }
308
- setSelectionStartValue(mentionTag.plainTextBeginIndex);
309
- setSelectionEndValue(mentionEndIndex);
310
- }
311
- else {
312
- // bounds of the mention were selected
313
- setSelectionStartValue(event.currentTarget.selectionStart);
314
- setSelectionEndValue(event.currentTarget.selectionEnd);
315
- }
316
- }
317
- else {
318
- // not a mention tag
319
- setSelectionStartValue(event.currentTarget.selectionStart);
320
- setSelectionEndValue(nullToUndefined(event.currentTarget.selectionEnd));
321
- }
322
- setInteractionStartSelection(undefined);
323
- }
324
- }
325
- else {
326
- // selection was changed by keyboard
327
- updateSelectionIndexesWithMentionIfNeeded({
328
- event,
329
- inputTextValue,
330
- selectionStartValue,
331
- selectionEndValue,
332
- tagsValue: tags
333
- });
334
- }
335
- }, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
336
- const handleOnChange = useCallback((_b) => __awaiter(void 0, [_b], void 0, function* ({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) {
337
- var _c;
338
- debouncedQueryUpdate.cancel();
339
- if (event.currentTarget === null) {
340
- return;
341
- }
342
- // handle backspace change
343
- // onSelect is not called for backspace as selection is not changed and local caret index is outdated
344
- setCaretIndex(undefined);
345
- const newValue = updatedValue !== null && updatedValue !== void 0 ? updatedValue : '';
346
- const triggerText = (_c = mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger) !== null && _c !== void 0 ? _c : DEFAULT_MENTION_TRIGGER;
347
- const newTextLength = newValue.length;
348
- // updating indexes to set between 0 and text length, otherwise selectionRange won't be set correctly
349
- const currentSelectionEndValue = getValidatedIndexInRange({
350
- min: 0,
351
- max: newTextLength,
352
- currentValue: currentSelectionEnd
353
- });
354
- const currentSelectionStartValue = getValidatedIndexInRange({
355
- min: 0,
356
- max: newTextLength,
357
- currentValue: currentSelectionStart
358
- });
359
- const previousSelectionStartValue = getValidatedIndexInRange({
360
- min: 0,
361
- max: inputTextValue.length,
362
- currentValue: previousSelectionStart
363
- });
364
- const previousSelectionEndValue = getValidatedIndexInRange({
365
- min: 0,
366
- max: inputTextValue.length,
367
- currentValue: previousSelectionEnd
368
- });
369
- // If we are enabled for lookups,
370
- if (mentionLookupOptions !== undefined) {
371
- // Look at the range of the change for a trigger character
372
- const triggerPriorIndex = newValue.lastIndexOf(triggerText, currentSelectionEndValue - 1);
373
- // Update the caret position, used for positioning the suggestions popover
374
- const textField = event.currentTarget;
375
- const relativePosition = Caret.getRelativePosition(textField);
376
- if (textField.scrollHeight > textField.clientHeight) {
377
- relativePosition.top -= textField.scrollTop;
378
- }
379
- setCaretPosition(relativePosition);
380
- if (triggerPriorIndex !== undefined) {
381
- // trigger is found
382
- const symbolBeforeTrigger = newValue.substring(triggerPriorIndex - 1, triggerPriorIndex);
383
- const isSpaceBeforeTrigger = symbolBeforeTrigger === ' ';
384
- // check if \r (Carriage Return), \n (Line Feed) or \r\n (End Of Line) is before the trigger
385
- const isNewLineBeforeTrigger = /\r|\n/.exec(symbolBeforeTrigger);
386
- const wordAtSelection = newValue.substring(triggerPriorIndex, currentSelectionEndValue);
387
- let tagIndex = currentTriggerStartIndex;
388
- if (!isSpaceBeforeTrigger && triggerPriorIndex !== 0 && isNewLineBeforeTrigger === null) {
389
- // no space before the trigger, it's not a beginning of the line and no new line before <- continuation of the previous word
390
- tagIndex = -1;
391
- setCurrentTriggerStartIndex(tagIndex);
392
- }
393
- else if (wordAtSelection === triggerText) {
394
- // start of the mention
395
- tagIndex = currentSelectionEndValue - triggerText.length;
396
- if (tagIndex < 0) {
397
- tagIndex = 0;
398
- }
399
- setCurrentTriggerStartIndex(tagIndex);
400
- }
401
- if (tagIndex === -1) {
402
- updateMentionSuggestions([]);
403
- }
404
- else {
405
- // In the middle of a @mention lookup
406
- if (tagIndex > -1) {
407
- const query = wordAtSelection.substring(triggerText.length, wordAtSelection.length);
408
- if (query !== undefined) {
409
- yield debouncedQueryUpdate(query);
410
- }
411
- }
412
- }
413
- }
414
- }
415
- const { changeStart, oldChangeEnd, newChangeEnd } = findStringsDiffIndexes({
416
- oldText: inputTextValue,
417
- newText: newValue,
418
- previousSelectionStart: previousSelectionStartValue,
419
- previousSelectionEnd: previousSelectionEndValue,
420
- currentSelectionStart: currentSelectionStartValue,
421
- currentSelectionEnd: currentSelectionEndValue
422
- });
423
- const change = newValue.substring(changeStart, newChangeEnd);
424
- const updatedContent = updateHTML({
425
- htmlText: htmlTextValue,
426
- oldPlainText: inputTextValue,
427
- tags: tagsValue,
428
- startIndex: changeStart,
429
- oldPlainTextEndIndex: oldChangeEnd,
430
- change,
431
- mentionTrigger: triggerText
432
- });
433
- setInternalTextValue(updatedContent.updatedHTML);
434
- // update caret index if needed
435
- if (updatedContent.updatedSelectionIndex !== undefined) {
436
- setCaretIndex(updatedContent.updatedSelectionIndex);
437
- setSelectionEndValue(updatedContent.updatedSelectionIndex);
438
- setSelectionStartValue(updatedContent.updatedSelectionIndex);
439
- }
440
- onChange && onChange(event, updatedContent.updatedHTML);
441
- }), [debouncedQueryUpdate, mentionLookupOptions, onChange, updateMentionSuggestions]);
442
- // Adjust the selection range based on a mouse / touch interaction
443
- const handleOnMove = useCallback(({ event, selectionStartValue, selectionEndValue, interactionStartSelection, shouldHandleMoveEvent }) => {
444
- if (shouldHandleMoveEvent && interactionStartSelection === undefined && (event.currentTarget.selectionStart !== selectionStartValue || event.currentTarget.selectionEnd !== selectionEndValue)) {
445
- setInteractionStartSelection({
446
- start: nullToUndefined(event.currentTarget.selectionStart),
447
- end: nullToUndefined(event.currentTarget.selectionEnd)
448
- });
449
- }
450
- }, []);
451
- // Adjust the selection range based on a mouse / touch interaction
452
- const handleOnInteractionStarted = useCallback(() => {
453
- // reset caret index as a new selection is started or cursor position will be changed
454
- setCaretIndex(undefined);
455
- setInteractionStartSelection(undefined);
456
- setShouldHandleMoveEvent(true);
457
- setShouldHandleOnMouseDownDuringSelect(true);
458
- }, []);
459
- // Adjust the selection range based on a mouse / touch interaction
460
- const handleOnInteractionCompleted = useCallback(() => {
461
- setShouldHandleMoveEvent(false);
462
- }, []);
463
- const announcerText = useMemo(() => {
464
- if (activeSuggestionIndex === undefined) {
465
- return undefined;
466
- }
467
- const currentMention = mentionSuggestions[activeSuggestionIndex !== null && activeSuggestionIndex !== void 0 ? activeSuggestionIndex : 0];
468
- return currentMention && (currentMention === null || currentMention === void 0 ? void 0 : currentMention.displayText.length) > 0 ? currentMention === null || currentMention === void 0 ? void 0 : currentMention.displayText : localeStrings.participantItem.displayNamePlaceholder;
469
- }, [activeSuggestionIndex, mentionSuggestions, localeStrings.participantItem.displayNamePlaceholder]);
470
- return React.createElement(React.Fragment, null,
471
- mentionSuggestions.length > 0 && React.createElement(_MentionPopover, { suggestions: mentionSuggestions, activeSuggestionIndex: activeSuggestionIndex, target: inputBoxRef, targetPositionOffset: caretPosition, onRenderSuggestionItem: mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onRenderSuggestionItem, onSuggestionSelected: onSuggestionSelected, onDismiss: () => {
472
- updateMentionSuggestions([]);
473
- } }),
474
- announcerText !== undefined && React.createElement(Announcer, { announcementString: announcerText, ariaLive: 'polite' }),
475
- React.createElement(TextField, Object.assign({}, textFieldProps, { "data-ui-id": dataUiId, value: inputTextValue, onChange: (e, newValue) => {
476
- // Remove when switching to react 17+, currently needed because of https://legacy.reactjs.org/docs/legacy-event-pooling.html
477
- // Prevents React from resetting event's properties
478
- e.persist();
479
- setInputTextValue(newValue !== null && newValue !== void 0 ? newValue : '');
480
- handleOnChange({
481
- event: e,
482
- tagsValue,
483
- htmlTextValue: internalTextValue,
484
- inputTextValue,
485
- currentTriggerStartIndex,
486
- previousSelectionStart: nullToUndefined(selectionStartValue),
487
- previousSelectionEnd: nullToUndefined(selectionEndValue),
488
- currentSelectionStart: nullToUndefined(e.currentTarget.selectionStart),
489
- currentSelectionEnd: nullToUndefined(e.currentTarget.selectionEnd),
490
- updatedValue: newValue
491
- });
492
- }, onSelect: e => {
493
- // update selection if needed
494
- if (caretIndex !== undefined) {
495
- // sometimes setting selectionRage in effect for updating caretIndex doesn't work as expected and
496
- // onSelect still returns outdated value for cursor position
497
- // e.g. when user select some text and a first name in a mention then delete or type something else
498
- if (caretIndex !== e.currentTarget.selectionStart || caretIndex !== e.currentTarget.selectionEnd) {
499
- e.currentTarget.setSelectionRange(caretIndex, caretIndex);
500
- }
501
- // caret index should not be set to undefined here
502
- // as it will cause issues when suggestion is selected by mouse
503
- // caret index will be set to undefined during keyboard/mouse or touch interactions
504
- return;
505
- }
506
- handleOnSelect({
507
- event: e,
508
- inputTextValue,
509
- shouldHandleOnMouseDownDuringSelect,
510
- selectionEndValue,
511
- selectionStartValue,
512
- tags: tagsValue,
513
- interactionStartSelection
514
- });
515
- }, onMouseDown: () => {
516
- // as events order is onMouseDown -> onMouseMove -> onMouseUp -> onSelect -> onClick
517
- // onClick and onMouseDown can't handle clicking on mention event because
518
- // onMouseDown doesn't have correct selectionRange yet and
519
- // onClick already has wrong range as it's called after onSelect that updates the selection range
520
- // so we need to handle onMouseDown to prevent onSelect default behavior
521
- handleOnInteractionStarted();
522
- }, onMouseMove: event => {
523
- handleOnMove({
524
- event,
525
- selectionStartValue,
526
- selectionEndValue,
527
- interactionStartSelection,
528
- shouldHandleMoveEvent
529
- });
530
- }, onMouseUp: () => {
531
- handleOnInteractionCompleted();
532
- }, onTouchStart: () => {
533
- handleOnInteractionStarted();
534
- }, onTouchMove: event => {
535
- handleOnMove({
536
- event,
537
- selectionStartValue,
538
- selectionEndValue,
539
- interactionStartSelection,
540
- shouldHandleMoveEvent
541
- });
542
- }, onTouchEnd: () => {
543
- handleOnInteractionCompleted;
544
- }, onBlur: () => {
545
- // setup shouldHandleOnMouseDownDuringSelect to false when text field loses focus
546
- // as the click should be handled by text field anymore
547
- setShouldHandleOnMouseDownDuringSelect(false);
548
- }, onKeyDown: onTextFieldKeyDown, elementRef: inputBoxRef })));
549
- };
550
- //# sourceMappingURL=TextFieldWithMention.js.map