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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/dist/communication-react.d.ts +2403 -189
  2. package/dist/dist-cjs/communication-react/index.js +14191 -7849
  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 +2 -1
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  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 +12 -0
  10. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +13 -1
  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 +4 -0
  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 +13 -3
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +18 -2
  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 +10 -0
  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 +15 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +45 -0
  22. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +91 -0
  23. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
  24. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +4 -1
  25. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +19 -0
  26. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +6 -0
  28. package/dist/dist-esm/calling-component-bindings/src/index.js +8 -0
  29. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +1 -0
  31. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +16 -3
  32. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +4 -3
  34. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  35. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +14 -2
  36. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +20 -1
  37. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  38. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -0
  39. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +12 -0
  40. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  41. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +4 -0
  42. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
  43. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  44. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
  45. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +8 -1
  46. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  47. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +8 -2
  48. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  49. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +6 -5
  50. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +15 -1
  52. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +2 -1
  54. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +5 -0
  55. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +60 -3
  57. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +8 -1
  59. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +62 -1
  60. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  61. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +41 -0
  62. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  64. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +8 -0
  65. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  66. package/dist/dist-esm/calling-stateful-client/src/Converter.js +12 -0
  67. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  68. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +1 -0
  69. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +8 -0
  70. package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
  71. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +1 -0
  72. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +8 -0
  73. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  74. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +25 -1
  75. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +33 -2
  76. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  77. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
  78. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +91 -0
  79. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
  80. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
  81. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +49 -0
  82. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
  83. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
  84. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +8 -0
  85. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  86. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +3 -0
  87. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  88. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +4 -1
  89. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  90. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +119 -6
  91. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  92. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  93. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  94. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
  95. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  96. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +3 -1
  97. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  98. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +4 -1
  99. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  100. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
  101. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  102. package/dist/dist-esm/communication-react/src/index.d.ts +27 -0
  103. package/dist/dist-esm/communication-react/src/index.js +16 -0
  104. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  105. package/dist/dist-esm/react-components/src/components/Caption.js +1 -0
  106. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +22 -1
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +9 -2
  109. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  110. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +2 -0
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +25 -16
  112. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  113. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +22 -1
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +49 -15
  115. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  116. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +15 -0
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +92 -2
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +10 -0
  120. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +15 -0
  121. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +1 -0
  122. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +69 -0
  123. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +43 -0
  124. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
  125. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +75 -0
  126. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +75 -0
  127. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
  128. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
  129. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +68 -0
  130. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
  131. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +86 -0
  132. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +39 -0
  133. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
  134. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +6 -0
  135. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  136. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +2 -2
  137. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
  138. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +4 -0
  139. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +20 -19
  140. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
  141. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +29 -1
  142. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +24 -2
  143. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  144. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +49 -0
  145. package/dist/dist-esm/react-components/src/components/HoldButton.js +25 -0
  146. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -0
  147. package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +71 -0
  148. package/dist/dist-esm/react-components/src/components/ImageGallery.js +56 -0
  149. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -0
  150. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +3 -5
  151. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +22 -5
  152. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -1
  154. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +121 -0
  155. package/dist/dist-esm/react-components/src/components/MentionPopover.js +117 -0
  156. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +1 -0
  157. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +51 -2
  158. package/dist/dist-esm/react-components/src/components/MessageThread.js +57 -8
  159. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +13 -0
  161. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +3 -0
  162. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  163. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +15 -0
  164. package/dist/dist-esm/react-components/src/components/ParticipantList.js +22 -4
  165. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  166. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
  167. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +3 -1
  168. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +41 -0
  170. package/dist/dist-esm/react-components/src/components/SendBox.js +32 -4
  171. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +41 -0
  173. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +573 -0
  174. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -0
  175. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +152 -0
  176. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +816 -0
  177. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +1 -0
  178. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +2 -0
  179. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  180. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +2 -0
  181. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  182. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +24 -0
  183. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  184. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +2 -0
  185. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  186. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +7 -3
  187. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  188. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +4 -0
  189. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +25 -15
  190. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
  191. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.d.ts +2 -2
  192. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js +6 -4
  193. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js.map +1 -1
  194. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +5 -0
  195. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +8 -3
  196. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  197. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +1 -1
  198. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -1
  199. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +5 -0
  200. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +8 -3
  201. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
  202. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +15 -3
  203. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  204. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +13 -0
  205. package/dist/dist-esm/react-components/src/components/VideoGallery.js +15 -5
  206. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  207. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +7 -0
  208. package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -1
  209. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  210. package/dist/dist-esm/react-components/src/components/index.d.ts +19 -0
  211. package/dist/dist-esm/react-components/src/components/index.js +12 -0
  212. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  213. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +58 -0
  214. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +144 -0
  215. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +1 -0
  216. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +12 -0
  217. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +25 -2
  218. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  219. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js +2 -2
  220. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +68 -0
  222. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +205 -0
  223. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -0
  224. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.d.ts +0 -4
  225. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +0 -9
  226. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +26 -0
  228. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +68 -0
  229. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +1 -0
  230. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
  231. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +38 -0
  232. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +92 -0
  233. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
  234. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +26 -0
  235. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +67 -0
  236. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -0
  237. package/dist/dist-esm/react-components/src/components/utils/common.js +4 -0
  238. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  239. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +2 -1
  240. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  241. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
  242. package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
  243. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
  244. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +4 -0
  245. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +5 -1
  246. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  247. package/dist/dist-esm/react-components/src/index.d.ts +1 -0
  248. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  249. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +63 -0
  250. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  251. package/dist/dist-esm/react-components/src/theming/icons.d.ts +87 -72
  252. package/dist/dist-esm/react-components/src/theming/icons.js +108 -0
  253. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  254. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
  255. package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
  256. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
  257. package/dist/dist-esm/react-components/src/theming/themes.d.ts +21 -2
  258. package/dist/dist-esm/react-components/src/theming/themes.js +16 -0
  259. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  260. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +27 -1
  261. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  262. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +8 -0
  263. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  264. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +6 -0
  265. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +2 -0
  266. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  267. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +78 -0
  268. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +87 -7
  269. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  270. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +144 -0
  271. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  272. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +75 -5
  273. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +317 -50
  274. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  275. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +130 -1
  276. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  277. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  278. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +2 -1
  279. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +7 -1
  280. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  281. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +6 -0
  282. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +2 -0
  283. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  284. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +67 -10
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +1 -0
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +121 -12
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +48 -0
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +218 -0
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -0
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +2 -0
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +27 -0
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +20 -2
  297. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  298. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +2 -0
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +27 -0
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +12 -0
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +93 -0
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -0
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +33 -6
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +0 -9
  308. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -37
  309. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  310. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +0 -4
  311. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +4 -2
  313. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  314. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +36 -2
  315. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  316. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +4 -2
  317. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +8 -0
  319. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +26 -0
  320. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +1 -0
  321. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +8 -1
  322. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  323. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +6 -2
  324. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  325. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +23 -6
  326. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  327. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +6 -0
  328. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +2 -0
  329. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  330. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +1 -2
  331. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -3
  332. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  333. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +7 -0
  334. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +97 -6
  335. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  336. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +24 -0
  337. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +28 -0
  338. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -0
  339. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
  340. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  341. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +11 -0
  342. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +113 -0
  343. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -0
  344. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +15 -0
  345. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +54 -0
  346. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -0
  347. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +5 -0
  348. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +5 -0
  349. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +9 -0
  350. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +10 -0
  351. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  352. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +5 -0
  353. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +5 -0
  354. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +5 -0
  355. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +5 -0
  356. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +5 -0
  357. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +5 -0
  358. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +4 -0
  359. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  360. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +5 -0
  361. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +5 -0
  362. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +5 -0
  363. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +5 -0
  364. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +10 -0
  365. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +5 -0
  366. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +5 -0
  367. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +32 -0
  368. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +81 -0
  369. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -0
  370. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.d.ts +37 -0
  371. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js +73 -0
  372. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js.map +1 -0
  373. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +1 -80
  374. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  375. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +15 -3
  376. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +88 -1
  377. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  378. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +68 -1
  379. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +35 -5
  380. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  381. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +32 -0
  382. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  383. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +30 -5
  384. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +111 -4
  385. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  386. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +64 -0
  387. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  388. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +10 -2
  389. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +40 -0
  390. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  391. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +13 -0
  392. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +37 -1
  393. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  394. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -0
  395. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  396. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +24 -0
  397. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +11 -1
  398. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  399. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +20 -0
  400. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -0
  401. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  402. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +133 -5
  403. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  404. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +18 -0
  405. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +18 -0
  406. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +1 -0
  407. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +15 -0
  408. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +23 -0
  409. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +1 -0
  410. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +4 -0
  411. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  412. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +28 -2
  413. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +126 -4
  414. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  415. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +28 -0
  416. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +159 -1
  417. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  418. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +17 -2
  419. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  420. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +2 -0
  421. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  422. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +8 -1
  423. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
  424. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +6 -0
  425. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
  426. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
  427. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +4 -0
  428. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  429. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +12 -0
  430. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +15 -0
  431. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
  432. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +34 -0
  433. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +14 -0
  434. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +1 -0
  435. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +5 -1
  436. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +11 -0
  437. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  438. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +22 -0
  439. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +107 -0
  440. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -0
  441. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +17 -0
  442. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +32 -0
  443. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +1 -0
  444. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +5 -0
  445. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +3 -2
  446. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  447. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +22 -0
  448. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +74 -0
  449. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -0
  450. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +15 -0
  451. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +61 -0
  452. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -0
  453. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +2 -0
  454. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +8 -2
  455. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  456. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -0
  457. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +14 -6
  458. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  459. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +84 -23
  460. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +13 -5
  461. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
  462. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -0
  463. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +70 -1
  464. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  465. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +65 -3
  466. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  467. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -0
  468. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  469. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +20 -3
  470. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  471. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +1 -2
  472. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +3 -1
  473. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  474. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +21 -2
  475. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  476. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +17 -0
  477. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +50 -0
  478. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -0
  479. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +11 -0
  480. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +40 -0
  481. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -0
  482. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +103 -73
  483. package/dist/dist-esm/react-composites/src/composites/common/icons.js +18 -2
  484. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  485. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +21 -83
  486. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  487. package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -0
  488. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  489. package/dist/tsdoc-metadata.json +1 -1
  490. package/package.json +6 -74
  491. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -13
  492. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -32
  493. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +0 -1
@@ -0,0 +1,573 @@
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