@azure/communication-react 1.9.0-beta.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) hide show
  1. package/dist/communication-react.d.ts +48 -2285
  2. package/dist/dist-cjs/communication-react/index.js +3869 -10219
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -2
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -8
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -12
  10. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -13
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -4
  13. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -11
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +2 -18
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +0 -10
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -15
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -4
  22. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -19
  23. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -6
  25. package/dist/dist-esm/calling-component-bindings/src/index.js +0 -8
  26. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  28. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +2 -18
  29. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +3 -4
  31. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +2 -14
  33. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -20
  34. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -7
  36. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +0 -12
  37. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +0 -4
  39. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +0 -11
  40. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -2
  42. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +1 -8
  43. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +2 -8
  45. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +5 -6
  47. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
  49. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  50. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -2
  51. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -5
  52. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -60
  54. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  55. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -8
  56. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -62
  57. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +0 -41
  59. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  60. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -1
  61. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -8
  62. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -12
  64. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  65. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +0 -1
  66. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +0 -8
  67. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  68. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +0 -1
  69. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +0 -8
  70. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  71. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -25
  72. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +2 -33
  73. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
  75. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -8
  76. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  77. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -3
  78. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  79. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -4
  80. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  81. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +6 -119
  82. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  83. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  84. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  85. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
  86. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  87. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -3
  88. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  89. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -4
  90. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  91. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +0 -1
  92. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  93. package/dist/dist-esm/communication-react/src/index.d.ts +0 -27
  94. package/dist/dist-esm/communication-react/src/index.js +0 -16
  95. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -22
  97. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -9
  98. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +0 -2
  100. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +1 -6
  101. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  102. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +1 -22
  103. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +6 -43
  104. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -15
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +2 -92
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  108. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +0 -6
  109. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -29
  111. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +2 -24
  112. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  114. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -18
  115. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -51
  117. package/dist/dist-esm/react-components/src/components/MessageThread.js +8 -57
  118. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -13
  120. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -3
  121. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -15
  123. package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -22
  124. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  125. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -3
  126. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  127. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +0 -41
  128. package/dist/dist-esm/react-components/src/components/SendBox.js +3 -31
  129. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  130. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -2
  131. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  132. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -2
  133. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  134. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -24
  135. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -2
  137. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/VerticalGallery.d.ts +5 -5
  139. package/dist/dist-esm/react-components/src/components/VerticalGallery.js +2 -2
  140. package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +4 -4
  142. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  143. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +0 -5
  144. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +7 -12
  145. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  146. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +1 -1
  147. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +4 -4
  149. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
  150. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +0 -5
  151. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +7 -12
  152. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +1 -1
  154. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +2 -2
  155. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  156. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +3 -15
  157. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  158. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +3 -16
  159. package/dist/dist-esm/react-components/src/components/VideoGallery.js +5 -15
  160. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  161. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +0 -7
  162. package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -7
  163. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  164. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -19
  165. package/dist/dist-esm/react-components/src/components/index.js +0 -12
  166. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  167. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
  168. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -4
  169. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  170. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
  171. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  173. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -5
  174. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  175. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  176. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  177. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +1 -64
  178. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  179. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +1 -1
  180. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +1 -1
  181. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +1 -1
  182. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +1 -1
  183. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -1
  184. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +1 -1
  185. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +1 -1
  186. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +1 -1
  187. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +1 -1
  188. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +1 -1
  189. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +1 -1
  190. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +1 -1
  191. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +1 -1
  192. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +1 -1
  193. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +1 -1
  194. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +1 -1
  195. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +1 -1
  196. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +1 -1
  197. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +1 -1
  198. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +1 -1
  199. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +1 -1
  200. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -15
  201. package/dist/dist-esm/react-components/src/theming/icons.js +0 -108
  202. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  203. package/dist/dist-esm/react-components/src/theming/themes.d.ts +2 -21
  204. package/dist/dist-esm/react-components/src/theming/themes.js +0 -16
  205. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  206. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -27
  207. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  208. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +0 -8
  209. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  210. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -6
  211. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
  212. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  213. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +0 -78
  214. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +4 -81
  215. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  216. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -144
  217. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  218. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -75
  219. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +12 -289
  220. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  221. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -130
  222. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  223. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  224. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +1 -2
  225. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +1 -7
  226. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  227. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +0 -6
  228. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +0 -2
  229. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  230. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -3
  231. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +10 -67
  232. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  233. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -1
  234. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +8 -89
  235. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  236. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -2
  237. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -27
  238. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  239. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -20
  240. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  241. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -2
  242. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -27
  243. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  244. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -1
  245. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +6 -33
  246. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  247. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -1
  248. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +9 -22
  249. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  250. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +2 -4
  251. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  252. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +2 -36
  253. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  254. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +2 -4
  255. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  256. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +1 -8
  257. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  258. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +2 -6
  259. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  260. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +6 -23
  261. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  262. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +0 -7
  263. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -2
  264. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  265. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -2
  266. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -5
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -7
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +6 -97
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +0 -2
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +0 -5
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +0 -5
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -9
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -10
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +0 -5
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +0 -5
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +0 -5
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +0 -5
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +0 -5
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +0 -5
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +0 -4
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +0 -5
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +0 -5
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +0 -5
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +0 -5
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +0 -10
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +0 -5
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +0 -5
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +3 -15
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +1 -88
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -68
  297. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -35
  298. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -32
  300. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +5 -30
  302. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +10 -111
  303. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  304. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +0 -64
  305. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  306. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +2 -10
  307. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -40
  308. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  309. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +0 -13
  310. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +1 -37
  311. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +0 -1
  313. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  314. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -24
  315. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -11
  316. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  317. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -20
  318. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +0 -4
  319. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  320. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +5 -133
  321. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  322. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -4
  323. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  324. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +2 -28
  325. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +4 -126
  326. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +0 -28
  328. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -159
  329. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -17
  331. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  332. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +0 -2
  333. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  334. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +1 -8
  335. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -4
  337. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  338. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -5
  339. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -11
  340. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  341. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -5
  342. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +2 -3
  343. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  344. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +15 -3
  345. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  346. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -2
  347. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +6 -14
  348. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  349. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +1 -3
  350. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +1 -70
  351. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +3 -65
  353. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  354. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +0 -1
  355. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  356. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +3 -20
  357. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  358. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
  359. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -17
  361. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  362. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -28
  363. package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -14
  364. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  365. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +4 -21
  366. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  367. package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -2
  368. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  369. package/package.json +13 -13
  370. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +0 -45
  371. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +0 -95
  372. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +0 -1
  373. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +0 -19
  374. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +0 -91
  375. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +0 -1
  376. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +0 -23
  377. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -49
  378. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +0 -1
  379. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  380. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  381. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  382. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  383. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -43
  384. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  385. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  386. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -75
  387. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  388. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  389. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -68
  390. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  391. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  392. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -39
  393. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  394. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
  395. package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
  396. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +0 -1
  397. package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +0 -71
  398. package/dist/dist-esm/react-components/src/components/ImageGallery.js +0 -64
  399. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +0 -1
  400. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  401. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -117
  402. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  403. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -41
  404. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -573
  405. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  406. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  407. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -816
  408. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  409. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  410. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  411. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  412. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +0 -72
  413. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +0 -215
  414. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +0 -1
  415. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  416. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -68
  417. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  418. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  419. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -92
  420. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  421. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  422. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -67
  423. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  424. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  425. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  426. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  427. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  428. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  429. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  430. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -48
  431. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -218
  432. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  433. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
  434. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
  435. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
  436. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
  437. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
  438. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
  439. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +0 -24
  440. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -28
  441. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +0 -1
  442. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +0 -14
  443. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +0 -113
  444. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +0 -1
  445. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  446. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -54
  447. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  448. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
  449. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
  450. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +0 -1
  451. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.d.ts +0 -37
  452. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js +0 -73
  453. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js.map +0 -1
  454. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  455. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  456. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  457. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +0 -15
  458. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +0 -23
  459. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +0 -1
  460. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +0 -6
  461. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +0 -11
  462. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +0 -1
  463. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -12
  464. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -15
  465. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +0 -1
  466. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +0 -34
  467. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +0 -14
  468. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +0 -1
  469. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -22
  470. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -107
  471. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
  472. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
  473. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
  474. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
  475. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
  476. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -74
  477. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
  478. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
  479. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
  480. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
  481. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +0 -17
  482. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +0 -50
  483. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +0 -1
  484. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +0 -11
  485. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +0 -40
  486. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +0 -1
@@ -1,573 +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 { Stack, TextField, mergeStyles, IconButton, TooltipHost } from '@fluentui/react';
17
- import { isEnterKeyEventFromCompositionSession, nullToUndefined } from '../utils';
18
- import { findMentionTagForSelection, findNewSelectionIndexForMention, findStringsDiffIndexes, getDisplayNameForMentionSuggestion, getValidatedIndexInRange, htmlStringForMentionSuggestion, textToTagParser, updateHTML } from './mentionTagUtils';
19
- import { inputButtonStyle, inputButtonTooltipStyle, iconWrapperStyle } from '../styles/InputBoxComponent.style';
20
- import { Caret } from 'textarea-caret-ts';
21
- import { isDarkThemed } from '../../theming/themeUtils';
22
- import { useTheme } from '../../theming';
23
- import { _MentionPopover } from '../MentionPopover';
24
- import { useDebouncedCallback } from 'use-debounce';
25
- const DEFAULT_MENTION_TRIGGER = '@';
26
- /**
27
- * @private
28
- */
29
- export const TextFieldWithMention = (props) => {
30
- const { textFieldProps, dataUiId, textValue, onChange, textFieldRef, onKeyDown, onEnterKeyDown, supportNewline, mentionLookupOptions } = props;
31
- const inputBoxRef = useRef(null);
32
- // Current suggestion list, provided by the callback
33
- const [mentionSuggestions, setMentionSuggestions] = useState([]);
34
- // Current suggestion list, provided by the callback
35
- const [activeSuggestionIndex, setActiveSuggestionIndex] = useState(undefined);
36
- // Index of the current trigger character in the text field
37
- const [currentTriggerStartIndex, setCurrentTriggerStartIndex] = useState(-1);
38
- const [inputTextValue, setInputTextValue] = useState('');
39
- // Internal value for text value prop
40
- const [internalTextValue, setInternalTextValue] = useState('');
41
- const [tagsValue, setTagsValue] = useState([]);
42
- // Index of the previous selection start in the text field
43
- const [selectionStartValue, setSelectionStartValue] = useState();
44
- // Index of the previous selection end in the text field
45
- const [selectionEndValue, setSelectionEndValue] = useState();
46
- // Boolean value to check if onMouseDown event should be handled during select as selection range
47
- // for onMouseDown event is not updated yet and the selection range for mouse click/taps will be
48
- // updated in onSelect event if needed.
49
- const [shouldHandleOnMouseDownDuringSelect, setShouldHandleOnMouseDownDuringSelect] = useState(true);
50
- // Boolean flag to check if mouse/touch move event should be handled
51
- const [shouldHandleMoveEvent, setShouldHandleMoveEvent] = useState(false);
52
- // Indexes of start of touch/mouse selection
53
- const [interactionStartSelection, setInteractionStartSelection] = useState();
54
- // Caret position in the text field
55
- const [caretPosition, setCaretPosition] = useState(undefined);
56
- // Index of where the caret is in the text field
57
- const [caretIndex, setCaretIndex] = useState(undefined);
58
- const localeStrings = useLocale().strings;
59
- // Set mention suggestions
60
- const updateMentionSuggestions = useCallback((suggestions) => {
61
- setMentionSuggestions(suggestions);
62
- }, [setMentionSuggestions]);
63
- useEffect(() => {
64
- setInternalTextValue(textValue);
65
- // update mention suggestions before the next render cycle
66
- updateMentionSuggestions([]);
67
- }, [textValue, updateMentionSuggestions]);
68
- // Parse the text and get the plain text version to display in the input box
69
- useEffect(() => {
70
- const trigger = (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger) || DEFAULT_MENTION_TRIGGER;
71
- const parsedHTMLData = textToTagParser(internalTextValue, trigger);
72
- setInputTextValue(parsedHTMLData.plainText);
73
- setTagsValue(parsedHTMLData.tags);
74
- updateMentionSuggestions([]);
75
- }, [internalTextValue, mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger, updateMentionSuggestions]);
76
- useEffect(() => {
77
- var _a;
78
- // effect for caret index update
79
- if (caretIndex === undefined || textFieldRef === undefined || (textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === undefined) {
80
- return;
81
- }
82
- // get validated caret index between 0 and inputTextValue.length otherwise caret will be set to incorrect index
83
- const updatedCaretIndex = getValidatedIndexInRange({
84
- min: 0,
85
- max: inputTextValue.length,
86
- currentValue: caretIndex
87
- });
88
- (_a = textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === null || _a === void 0 ? void 0 : _a.setSelectionRange(updatedCaretIndex, updatedCaretIndex);
89
- setSelectionStartValue(updatedCaretIndex);
90
- setSelectionEndValue(updatedCaretIndex);
91
- }, [caretIndex, inputTextValue, textFieldRef, setSelectionStartValue, setSelectionEndValue]);
92
- const onSuggestionSelected = useCallback((suggestion) => {
93
- var _a, _b, _c;
94
- let selectionEnd = ((_a = textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === null || _a === void 0 ? void 0 : _a.selectionEnd) || -1;
95
- if (selectionEnd < 0) {
96
- selectionEnd = 0;
97
- }
98
- else if (selectionEnd > inputTextValue.length) {
99
- selectionEnd = inputTextValue.length;
100
- }
101
- const oldPlainText = inputTextValue;
102
- const mention = htmlStringForMentionSuggestion(suggestion, localeStrings);
103
- // update plain text with the mention html text
104
- const triggerText = (_b = mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger) !== null && _b !== void 0 ? _b : DEFAULT_MENTION_TRIGGER;
105
- // update html text with updated plain text
106
- const updatedContent = updateHTML({
107
- htmlText: internalTextValue,
108
- oldPlainText,
109
- tags: tagsValue,
110
- startIndex: currentTriggerStartIndex,
111
- oldPlainTextEndIndex: selectionEnd,
112
- change: mention,
113
- mentionTrigger: triggerText
114
- });
115
- setInternalTextValue(updatedContent.updatedHTML);
116
- const displayName = getDisplayNameForMentionSuggestion(suggestion, localeStrings);
117
- const newCaretIndex = currentTriggerStartIndex + displayName.length + triggerText.length;
118
- // move the caret in the text field to the end of the mention plain text
119
- setCaretIndex(newCaretIndex);
120
- setSelectionEndValue(newCaretIndex);
121
- setSelectionStartValue(newCaretIndex);
122
- setCurrentTriggerStartIndex(-1);
123
- updateMentionSuggestions([]);
124
- // set focus back to text field
125
- (_c = textFieldRef === null || textFieldRef === void 0 ? void 0 : textFieldRef.current) === null || _c === void 0 ? void 0 : _c.focus();
126
- setActiveSuggestionIndex(undefined);
127
- onChange && onChange(undefined, updatedContent.updatedHTML);
128
- }, [textFieldRef, inputTextValue, currentTriggerStartIndex, mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger, onChange, internalTextValue, tagsValue, updateMentionSuggestions, localeStrings]);
129
- const onTextFieldKeyDown = useCallback((ev) => {
130
- // caretIndex should be set to undefined when the user is typing
131
- setCaretIndex(undefined);
132
- // shouldHandleOnMouseDownDuringSelect should be set to false after the last mouse down event.
133
- // it shouldn't be updated in onMouseUp
134
- // as onMouseUp can be triggered before or after onSelect event
135
- // because its order depends on mouse events not selection.
136
- setShouldHandleOnMouseDownDuringSelect(false);
137
- if (isEnterKeyEventFromCompositionSession(ev)) {
138
- return;
139
- }
140
- if (mentionSuggestions.length > 0) {
141
- if (ev.key === 'ArrowUp') {
142
- ev.preventDefault();
143
- const newActiveIndex = activeSuggestionIndex === undefined ? mentionSuggestions.length - 1 : Math.max(activeSuggestionIndex - 1, 0);
144
- setActiveSuggestionIndex(newActiveIndex);
145
- }
146
- else if (ev.key === 'ArrowDown') {
147
- ev.preventDefault();
148
- const newActiveIndex = activeSuggestionIndex === undefined ? 0 : Math.min(activeSuggestionIndex + 1, mentionSuggestions.length - 1);
149
- setActiveSuggestionIndex(newActiveIndex);
150
- }
151
- else if (ev.key === 'Escape') {
152
- updateMentionSuggestions([]);
153
- }
154
- }
155
- if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {
156
- ev.preventDefault();
157
- // If we are looking up a mention, select the focused suggestion
158
- if (mentionSuggestions.length > 0 && activeSuggestionIndex !== undefined) {
159
- const selectedMention = mentionSuggestions[activeSuggestionIndex];
160
- if (selectedMention) {
161
- onSuggestionSelected(selectedMention);
162
- return;
163
- }
164
- }
165
- onEnterKeyDown && onEnterKeyDown();
166
- }
167
- onKeyDown && onKeyDown(ev);
168
- }, [onEnterKeyDown, onKeyDown, supportNewline, mentionSuggestions, activeSuggestionIndex, onSuggestionSelected, updateMentionSuggestions]);
169
- const debouncedQueryUpdate = useDebouncedCallback((query) => __awaiter(void 0, void 0, void 0, function* () {
170
- var _a;
171
- let suggestions = (_a = (yield (mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.onQueryUpdated(query)))) !== null && _a !== void 0 ? _a : [];
172
- suggestions = suggestions.filter(suggestion => suggestion.displayText.trim() !== '');
173
- if (suggestions.length === 0) {
174
- setActiveSuggestionIndex(undefined);
175
- }
176
- else if (activeSuggestionIndex === undefined) {
177
- // Set the active to the first, if it's not already set
178
- setActiveSuggestionIndex(0);
179
- }
180
- updateMentionSuggestions(suggestions);
181
- }), 500);
182
- // Update selections index in mention to navigate by words
183
- const updateSelectionIndexesWithMentionIfNeeded = useCallback(({ event, inputTextValue, selectionEndValue, selectionStartValue, tagsValue }) => {
184
- var _a, _b, _c;
185
- let updatedStartIndex = event.currentTarget.selectionStart;
186
- let updatedEndIndex = event.currentTarget.selectionEnd;
187
- if (event.currentTarget.selectionStart === event.currentTarget.selectionEnd && event.currentTarget.selectionStart !== null && event.currentTarget.selectionStart !== -1) {
188
- // just a caret movement/usual typing or deleting
189
- const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);
190
- // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries
191
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined && event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex && event.currentTarget.selectionStart < ((_a = mentionTag.plainTextEndIndex) !== null && _a !== void 0 ? _a : mentionTag.plainTextBeginIndex)) {
192
- // get updated selection index
193
- const newSelectionIndex = findNewSelectionIndexForMention({
194
- tag: mentionTag,
195
- textValue: inputTextValue,
196
- currentSelectionIndex: event.currentTarget.selectionStart,
197
- previousSelectionIndex: selectionStartValue !== null && selectionStartValue !== void 0 ? selectionStartValue : inputTextValue.length
198
- });
199
- updatedStartIndex = newSelectionIndex;
200
- updatedEndIndex = newSelectionIndex;
201
- }
202
- }
203
- else if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd) {
204
- // Both e.currentTarget.selectionStart !== selectionStartValue and e.currentTarget.selectionEnd !== selectionEndValue can be true when a user selects a text by double click
205
- if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionStart !== selectionStartValue) {
206
- // the selection start is changed
207
- const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);
208
- // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries
209
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined && event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex && event.currentTarget.selectionStart < ((_b = mentionTag.plainTextEndIndex) !== null && _b !== void 0 ? _b : mentionTag.plainTextBeginIndex)) {
210
- updatedStartIndex = findNewSelectionIndexForMention({
211
- tag: mentionTag,
212
- textValue: inputTextValue,
213
- currentSelectionIndex: event.currentTarget.selectionStart,
214
- previousSelectionIndex: selectionStartValue !== null && selectionStartValue !== void 0 ? selectionStartValue : inputTextValue.length
215
- });
216
- }
217
- }
218
- if (event.currentTarget.selectionEnd !== null && event.currentTarget.selectionEnd !== selectionEndValue) {
219
- // the selection end is changed
220
- const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionEnd);
221
- // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries
222
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined && event.currentTarget.selectionEnd > mentionTag.plainTextBeginIndex && event.currentTarget.selectionEnd < ((_c = mentionTag.plainTextEndIndex) !== null && _c !== void 0 ? _c : mentionTag.plainTextBeginIndex)) {
223
- updatedEndIndex = findNewSelectionIndexForMention({
224
- tag: mentionTag,
225
- textValue: inputTextValue,
226
- currentSelectionIndex: event.currentTarget.selectionEnd,
227
- previousSelectionIndex: selectionEndValue !== null && selectionEndValue !== void 0 ? selectionEndValue : inputTextValue.length
228
- });
229
- }
230
- }
231
- }
232
- // e.currentTarget.selectionDirection should be set to handle shift + arrow keys
233
- if (event.currentTarget.selectionDirection === null) {
234
- event.currentTarget.setSelectionRange(updatedStartIndex, updatedEndIndex);
235
- }
236
- else {
237
- event.currentTarget.setSelectionRange(updatedStartIndex, updatedEndIndex, event.currentTarget.selectionDirection);
238
- }
239
- setSelectionStartValue(nullToUndefined(updatedStartIndex));
240
- setSelectionEndValue(nullToUndefined(updatedEndIndex));
241
- }, [setSelectionStartValue, setSelectionEndValue]);
242
- const handleOnSelect = useCallback(({ event, inputTextValue, tags, shouldHandleOnMouseDownDuringSelect, selectionStartValue, selectionEndValue, interactionStartSelection }) => {
243
- var _a;
244
- if (event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === inputTextValue.length) {
245
- // entire text is selected, no need to change anything
246
- setSelectionStartValue(event.currentTarget.selectionStart);
247
- setSelectionEndValue(event.currentTarget.selectionEnd);
248
- setInteractionStartSelection(undefined);
249
- setShouldHandleOnMouseDownDuringSelect(false);
250
- }
251
- else if (shouldHandleOnMouseDownDuringSelect) {
252
- if (interactionStartSelection !== undefined && (interactionStartSelection.start !== event.currentTarget.selectionStart || interactionStartSelection.end !== event.currentTarget.selectionEnd)) {
253
- // selection was changed by mouse
254
- // for mouse selection only, it's possible to start selection in the middle of a word in a mention
255
- // because of this when event.currentTarget.selectionStart === mouseMoveStartPoint.start
256
- // selectionStartValue for updateSelectionIndexesWithMentionIfNeeded should be set
257
- // to the end of the input to mimic selection from right to left for the left selection index
258
- const updatedSelectionStartValue = event.currentTarget.selectionStart === interactionStartSelection.start ? inputTextValue.length : interactionStartSelection.start;
259
- // selectionStart is always less than selectionEnd so sometimes selectionEnd is user's start of the selection
260
- // so when event.currentTarget.selectionEnd === mouseMoveStartPoint.end
261
- // selectionEndValue for updateSelectionIndexesWithMentionIfNeeded should be set
262
- // to the beginning of the input to mimic selection from left to right for the right selection index
263
- const updatedSelectionEndValue = event.currentTarget.selectionEnd === interactionStartSelection.end ? 0 : interactionStartSelection.end;
264
- updateSelectionIndexesWithMentionIfNeeded({
265
- event,
266
- inputTextValue,
267
- selectionStartValue: updatedSelectionStartValue,
268
- selectionEndValue: updatedSelectionEndValue,
269
- tagsValue: tags
270
- });
271
- setInteractionStartSelection(undefined);
272
- setShouldHandleOnMouseDownDuringSelect(false);
273
- }
274
- else if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionEnd !== null) {
275
- // on select was triggered by mouse down/up with no movement
276
- const mentionTag = findMentionTagForSelection(tags, event.currentTarget.selectionStart);
277
- if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {
278
- // handle mention click by selecting the whole mention
279
- // if the selection is not on the bounds of the mention
280
- // disable selection for clicks on mention bounds
281
- const mentionEndIndex = (_a = mentionTag.plainTextEndIndex) !== null && _a !== void 0 ? _a : mentionTag.plainTextBeginIndex;
282
- if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd && event.currentTarget.selectionEnd > mentionEndIndex) {
283
- // handle triple click when the text starts from mention
284
- if (event.currentTarget.selectionDirection === null) {
285
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, event.currentTarget.selectionEnd);
286
- }
287
- else {
288
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, event.currentTarget.selectionEnd, event.currentTarget.selectionDirection);
289
- }
290
- setSelectionStartValue(mentionTag.plainTextBeginIndex);
291
- setSelectionEndValue(event.currentTarget.selectionEnd);
292
- }
293
- else if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd || event.currentTarget.selectionStart !== mentionTag.plainTextBeginIndex && event.currentTarget.selectionStart !== mentionEndIndex) {
294
- if (event.currentTarget.selectionDirection === null) {
295
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, mentionEndIndex);
296
- }
297
- else {
298
- event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, mentionEndIndex, event.currentTarget.selectionDirection);
299
- }
300
- setSelectionStartValue(mentionTag.plainTextBeginIndex);
301
- setSelectionEndValue(mentionEndIndex);
302
- }
303
- else {
304
- // bounds of the mention were selected
305
- setSelectionStartValue(event.currentTarget.selectionStart);
306
- setSelectionEndValue(event.currentTarget.selectionEnd);
307
- }
308
- }
309
- else {
310
- // not a mention tag
311
- setSelectionStartValue(event.currentTarget.selectionStart);
312
- setSelectionEndValue(nullToUndefined(event.currentTarget.selectionEnd));
313
- }
314
- setInteractionStartSelection(undefined);
315
- }
316
- }
317
- else {
318
- // selection was changed by keyboard
319
- updateSelectionIndexesWithMentionIfNeeded({
320
- event,
321
- inputTextValue,
322
- selectionStartValue,
323
- selectionEndValue,
324
- tagsValue: tags
325
- });
326
- }
327
- }, [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]);
328
- const handleOnChange = useCallback(({ currentSelectionEnd, currentSelectionStart, currentTriggerStartIndex, event, htmlTextValue, inputTextValue, previousSelectionEnd, previousSelectionStart, tagsValue, updatedValue }) => __awaiter(void 0, void 0, void 0, function* () {
329
- var _b;
330
- debouncedQueryUpdate.cancel();
331
- if (event.currentTarget === null) {
332
- return;
333
- }
334
- // handle backspace change
335
- // onSelect is not called for backspace as selection is not changed and local caret index is outdated
336
- setCaretIndex(undefined);
337
- const newValue = updatedValue !== null && updatedValue !== void 0 ? updatedValue : '';
338
- const triggerText = (_b = mentionLookupOptions === null || mentionLookupOptions === void 0 ? void 0 : mentionLookupOptions.trigger) !== null && _b !== void 0 ? _b : DEFAULT_MENTION_TRIGGER;
339
- const newTextLength = newValue.length;
340
- // updating indexes to set between 0 and text length, otherwise selectionRange won't be set correctly
341
- const currentSelectionEndValue = getValidatedIndexInRange({
342
- min: 0,
343
- max: newTextLength,
344
- currentValue: currentSelectionEnd
345
- });
346
- const currentSelectionStartValue = getValidatedIndexInRange({
347
- min: 0,
348
- max: newTextLength,
349
- currentValue: currentSelectionStart
350
- });
351
- const previousSelectionStartValue = getValidatedIndexInRange({
352
- min: 0,
353
- max: inputTextValue.length,
354
- currentValue: previousSelectionStart
355
- });
356
- const previousSelectionEndValue = getValidatedIndexInRange({
357
- min: 0,
358
- max: inputTextValue.length,
359
- currentValue: previousSelectionEnd
360
- });
361
- // If we are enabled for lookups,
362
- if (mentionLookupOptions !== undefined) {
363
- // Look at the range of the change for a trigger character
364
- const triggerPriorIndex = newValue.lastIndexOf(triggerText, currentSelectionEndValue - 1);
365
- // Update the caret position, used for positioning the suggestions popover
366
- const textField = event.currentTarget;
367
- const relativePosition = Caret.getRelativePosition(textField);
368
- if (textField.scrollHeight > textField.clientHeight) {
369
- relativePosition.top -= textField.scrollTop;
370
- }
371
- setCaretPosition(relativePosition);
372
- if (triggerPriorIndex !== undefined) {
373
- // trigger is found
374
- const symbolBeforeTrigger = newValue.substring(triggerPriorIndex - 1, triggerPriorIndex);
375
- const isSpaceBeforeTrigger = symbolBeforeTrigger === ' ';
376
- // check if \r (Carriage Return), \n (Line Feed) or \r\n (End Of Line) is before the trigger
377
- const isNewLineBeforeTrigger = /\r|\n/.exec(symbolBeforeTrigger);
378
- const wordAtSelection = newValue.substring(triggerPriorIndex, currentSelectionEndValue);
379
- let tagIndex = currentTriggerStartIndex;
380
- if (!isSpaceBeforeTrigger && triggerPriorIndex !== 0 && isNewLineBeforeTrigger === null) {
381
- // no space before the trigger, it's not a beginning of the line and no new line before <- continuation of the previous word
382
- tagIndex = -1;
383
- setCurrentTriggerStartIndex(tagIndex);
384
- }
385
- else if (wordAtSelection === triggerText) {
386
- // start of the mention
387
- tagIndex = currentSelectionEndValue - triggerText.length;
388
- if (tagIndex < 0) {
389
- tagIndex = 0;
390
- }
391
- setCurrentTriggerStartIndex(tagIndex);
392
- }
393
- if (tagIndex === -1) {
394
- updateMentionSuggestions([]);
395
- }
396
- else {
397
- // In the middle of a @mention lookup
398
- if (tagIndex > -1) {
399
- const query = wordAtSelection.substring(triggerText.length, wordAtSelection.length);
400
- if (query !== undefined) {
401
- yield debouncedQueryUpdate(query);
402
- }
403
- }
404
- }
405
- }
406
- }
407
- const { changeStart, oldChangeEnd, newChangeEnd } = findStringsDiffIndexes({
408
- oldText: inputTextValue,
409
- newText: newValue,
410
- previousSelectionStart: previousSelectionStartValue,
411
- previousSelectionEnd: previousSelectionEndValue,
412
- currentSelectionStart: currentSelectionStartValue,
413
- currentSelectionEnd: currentSelectionEndValue
414
- });
415
- const change = newValue.substring(changeStart, newChangeEnd);
416
- const updatedContent = updateHTML({
417
- htmlText: htmlTextValue,
418
- oldPlainText: inputTextValue,
419
- tags: tagsValue,
420
- startIndex: changeStart,
421
- oldPlainTextEndIndex: oldChangeEnd,
422
- change,
423
- mentionTrigger: triggerText
424
- });
425
- setInternalTextValue(updatedContent.updatedHTML);
426
- // update caret index if needed
427
- if (updatedContent.updatedSelectionIndex !== undefined) {
428
- setCaretIndex(updatedContent.updatedSelectionIndex);
429
- setSelectionEndValue(updatedContent.updatedSelectionIndex);
430
- setSelectionStartValue(updatedContent.updatedSelectionIndex);
431
- }
432
- onChange && onChange(event, updatedContent.updatedHTML);
433
- }), [debouncedQueryUpdate, mentionLookupOptions, onChange, updateMentionSuggestions]);
434
- // Adjust the selection range based on a mouse / touch interaction
435
- const handleOnMove = useCallback(({ event, selectionStartValue, selectionEndValue, interactionStartSelection, shouldHandleMoveEvent }) => {
436
- if (shouldHandleMoveEvent && interactionStartSelection === undefined && (event.currentTarget.selectionStart !== selectionStartValue || event.currentTarget.selectionEnd !== selectionEndValue)) {
437
- setInteractionStartSelection({
438
- start: nullToUndefined(event.currentTarget.selectionStart),
439
- end: nullToUndefined(event.currentTarget.selectionEnd)
440
- });
441
- }
442
- }, []);
443
- // Adjust the selection range based on a mouse / touch interaction
444
- const handleOnInteractionStarted = useCallback(() => {
445
- // reset caret index as a new selection is started or cursor position will be changed
446
- setCaretIndex(undefined);
447
- setInteractionStartSelection(undefined);
448
- setShouldHandleMoveEvent(true);
449
- setShouldHandleOnMouseDownDuringSelect(true);
450
- }, []);
451
- // Adjust the selection range based on a mouse / touch interaction
452
- const handleOnInteractionCompleted = useCallback(() => {
453
- setShouldHandleMoveEvent(false);
454
- }, []);
455
- const announcerText = useMemo(() => {
456
- if (activeSuggestionIndex === undefined) {
457
- return undefined;
458
- }
459
- const currentMention = mentionSuggestions[activeSuggestionIndex !== null && activeSuggestionIndex !== void 0 ? activeSuggestionIndex : 0];
460
- return (currentMention === null || currentMention === void 0 ? void 0 : currentMention.displayText.length) > 0 ? currentMention === null || currentMention === void 0 ? void 0 : currentMention.displayText : localeStrings.participantItem.displayNamePlaceholder;
461
- }, [activeSuggestionIndex, mentionSuggestions, localeStrings.participantItem.displayNamePlaceholder]);
462
- return React.createElement(React.Fragment, null,
463
- 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: () => {
464
- updateMentionSuggestions([]);
465
- } }),
466
- announcerText !== undefined && React.createElement(Announcer, { announcementString: announcerText, ariaLive: 'polite' }),
467
- React.createElement(TextField, Object.assign({}, textFieldProps, { "data-ui-id": dataUiId, value: inputTextValue, onChange: (e, newValue) => {
468
- // Remove when switching to react 17+, currently needed because of https://legacy.reactjs.org/docs/legacy-event-pooling.html
469
- // Prevents React from resetting event's properties
470
- e.persist();
471
- setInputTextValue(newValue !== null && newValue !== void 0 ? newValue : '');
472
- handleOnChange({
473
- event: e,
474
- tagsValue,
475
- htmlTextValue: internalTextValue,
476
- inputTextValue,
477
- currentTriggerStartIndex,
478
- previousSelectionStart: nullToUndefined(selectionStartValue),
479
- previousSelectionEnd: nullToUndefined(selectionEndValue),
480
- currentSelectionStart: nullToUndefined(e.currentTarget.selectionStart),
481
- currentSelectionEnd: nullToUndefined(e.currentTarget.selectionEnd),
482
- updatedValue: newValue
483
- });
484
- }, onSelect: e => {
485
- // update selection if needed
486
- if (caretIndex !== undefined) {
487
- // sometimes setting selectionRage in effect for updating caretIndex doesn't work as expected and
488
- // onSelect still returns outdated value for cursor position
489
- // e.g. when user select some text and a first name in a mention then delete or type something else
490
- if (caretIndex !== e.currentTarget.selectionStart || caretIndex !== e.currentTarget.selectionEnd) {
491
- e.currentTarget.setSelectionRange(caretIndex, caretIndex);
492
- }
493
- // caret index should not be set to undefined here
494
- // as it will cause issues when suggestion is selected by mouse
495
- // caret index will be set to undefined during keyboard/mouse or touch interactions
496
- return;
497
- }
498
- handleOnSelect({
499
- event: e,
500
- inputTextValue,
501
- shouldHandleOnMouseDownDuringSelect,
502
- selectionEndValue,
503
- selectionStartValue,
504
- tags: tagsValue,
505
- interactionStartSelection
506
- });
507
- }, onMouseDown: () => {
508
- // as events order is onMouseDown -> onMouseMove -> onMouseUp -> onSelect -> onClick
509
- // onClick and onMouseDown can't handle clicking on mention event because
510
- // onMouseDown doesn't have correct selectionRange yet and
511
- // onClick already has wrong range as it's called after onSelect that updates the selection range
512
- // so we need to handle onMouseDown to prevent onSelect default behavior
513
- handleOnInteractionStarted();
514
- }, onMouseMove: event => {
515
- handleOnMove({
516
- event,
517
- selectionStartValue,
518
- selectionEndValue,
519
- interactionStartSelection,
520
- shouldHandleMoveEvent
521
- });
522
- }, onMouseUp: () => {
523
- handleOnInteractionCompleted();
524
- }, onTouchStart: () => {
525
- handleOnInteractionStarted();
526
- }, onTouchMove: event => {
527
- handleOnMove({
528
- event,
529
- selectionStartValue,
530
- selectionEndValue,
531
- interactionStartSelection,
532
- shouldHandleMoveEvent
533
- });
534
- }, onTouchEnd: () => {
535
- handleOnInteractionCompleted;
536
- }, onBlur: () => {
537
- // setup shouldHandleOnMouseDownDuringSelect to false when text field loses focus
538
- // as the click should be handled by text field anymore
539
- setShouldHandleOnMouseDownDuringSelect(false);
540
- }, onKeyDown: onTextFieldKeyDown, elementRef: inputBoxRef })));
541
- };
542
- /**
543
- * @private
544
- */
545
- export const InputBoxButton = (props) => {
546
- const { onRenderIcon, onClick, ariaLabel, className, id, tooltipContent } = props;
547
- const [isHover, setIsHover] = useState(false);
548
- const mergedButtonStyle = mergeStyles(inputButtonStyle, className);
549
- const theme = useTheme();
550
- const calloutStyle = {
551
- root: {
552
- padding: 0
553
- },
554
- calloutMain: {
555
- padding: '0.5rem'
556
- }
557
- };
558
- // Place callout with no gap between it and the button.
559
- const calloutProps = {
560
- gapSpace: 0,
561
- styles: calloutStyle,
562
- backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''
563
- };
564
- return React.createElement(TooltipHost, { hostClassName: inputButtonTooltipStyle, content: tooltipContent, calloutProps: Object.assign({}, calloutProps) },
565
- React.createElement(IconButton, { className: mergedButtonStyle, ariaLabel: ariaLabel, onClick: onClick, id: id, onMouseEnter: () => {
566
- setIsHover(true);
567
- }, onMouseLeave: () => {
568
- setIsHover(false);
569
- },
570
- // VoiceOver fix: Avoid icon from stealing focus when IconButton is double-tapped to send message by wrapping with Stack with pointerEvents style to none
571
- onRenderIcon: () => React.createElement(Stack, { className: iconWrapperStyle }, onRenderIcon(isHover)) }));
572
- };
573
- //# sourceMappingURL=TextFieldWithMention.js.map