@azure/communication-react 1.13.0-beta.1 → 1.13.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 (606) hide show
  1. package/dist/communication-react.d.ts +157 -1968
  2. package/dist/dist-cjs/communication-react/index.js +2068 -7634
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/areEqual.d.ts +0 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +1 -2
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -5
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  10. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -12
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -13
  12. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -4
  14. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +2 -10
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -14
  17. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +0 -10
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -15
  21. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  22. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -4
  23. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -12
  24. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  25. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -6
  26. package/dist/dist-esm/calling-component-bindings/src/index.js +0 -8
  27. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  28. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
  29. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +2 -8
  30. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  31. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +3 -4
  32. package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
  33. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +2 -14
  34. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -20
  35. package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
  36. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -7
  37. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +0 -12
  38. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  39. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
  40. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -9
  41. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  42. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +0 -3
  43. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  44. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +5 -6
  45. package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
  46. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
  47. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
  48. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -2
  49. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -5
  50. package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
  51. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +3 -24
  52. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  53. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -5
  54. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -40
  55. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  56. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +8 -12
  57. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  58. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -1
  59. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -8
  60. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  61. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -7
  62. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  63. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +0 -1
  64. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +0 -11
  65. package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
  66. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -25
  67. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +2 -33
  68. package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
  69. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
  70. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -8
  71. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  72. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +0 -2
  73. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  74. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -5
  75. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  76. package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +0 -1
  77. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +5 -173
  78. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  79. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
  80. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  81. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
  82. package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
  83. package/dist/dist-esm/chat-stateful-client/src/ChatContext.d.ts +2 -5
  84. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +2 -24
  85. package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
  86. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -3
  87. package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
  88. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +1 -1
  89. package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
  90. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -4
  91. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  92. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +0 -2
  93. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  94. package/dist/dist-esm/communication-react/src/index.d.ts +1 -28
  95. package/dist/dist-esm/communication-react/src/index.js +0 -14
  96. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  97. package/dist/dist-esm/communication-react/src/mergedHooks.d.ts +0 -1
  98. package/dist/dist-esm/react-components/src/components/Announcer/Announcer.d.ts +0 -1
  99. package/dist/dist-esm/react-components/src/components/Announcer/LiveMessage.d.ts +0 -1
  100. package/dist/dist-esm/react-components/src/components/Announcer/MessageBlock.d.ts +0 -1
  101. package/dist/dist-esm/react-components/src/components/Announcer.d.ts +0 -1
  102. package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +0 -1
  103. package/dist/dist-esm/react-components/src/components/Caption.d.ts +0 -1
  104. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +0 -1
  105. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +0 -1
  106. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.d.ts +0 -1
  107. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -20
  108. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -7
  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 +1 -7
  111. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +12 -43
  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 +1 -23
  114. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +8 -37
  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/ChatMessageComponentWrapper.d.ts +1 -11
  117. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +2 -10
  118. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  119. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -35
  120. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +1 -56
  121. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  122. package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.d.ts +1 -3
  123. package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +5 -27
  124. package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
  125. package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.d.ts +0 -1
  126. package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.d.ts +0 -1
  127. package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.d.ts +0 -1
  128. package/dist/dist-esm/react-components/src/components/ControlBarButton.d.ts +0 -1
  129. package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.d.ts +0 -1
  130. package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.d.ts +0 -1
  131. package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +0 -1
  132. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +7 -8
  133. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +2 -2
  134. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  135. package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.d.ts +0 -1
  136. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +0 -1
  137. package/dist/dist-esm/react-components/src/components/EndCallButton.d.ts +0 -1
  138. package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +0 -1
  139. package/dist/dist-esm/react-components/src/components/FileCard.d.ts +0 -1
  140. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -41
  141. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +4 -25
  142. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  143. package/dist/dist-esm/react-components/src/components/FileUploadCards.d.ts +0 -1
  144. package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.d.ts +0 -1
  145. package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
  146. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -18
  147. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  148. package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.d.ts +0 -1
  149. package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.d.ts +0 -1
  150. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -47
  151. package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -16
  152. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  153. package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +0 -1
  154. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -14
  155. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -3
  156. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  157. package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -21
  158. package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -22
  159. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  160. package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +0 -1
  161. package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.d.ts +0 -1
  162. package/dist/dist-esm/react-components/src/components/RaiseHandButton.d.ts +0 -1
  163. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +6 -25
  164. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  165. package/dist/dist-esm/react-components/src/components/ScreenShareButton.d.ts +0 -1
  166. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +0 -42
  167. package/dist/dist-esm/react-components/src/components/SendBox.js +9 -81
  168. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  169. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -1
  170. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +1 -1
  171. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
  172. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +0 -1
  173. package/dist/dist-esm/react-components/src/components/StreamMedia.d.ts +0 -1
  174. package/dist/dist-esm/react-components/src/components/SystemMessage.d.ts +0 -1
  175. package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.d.ts +0 -1
  176. package/dist/dist-esm/react-components/src/components/TypingIndicator.d.ts +0 -1
  177. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +0 -1
  178. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -2
  179. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
  180. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +0 -1
  181. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -2
  182. package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
  183. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +0 -1
  184. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -24
  185. package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
  186. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +0 -1
  187. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -2
  188. package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
  189. package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +0 -1
  190. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +0 -1
  191. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +0 -1
  192. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +0 -1
  193. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +1 -1
  194. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  195. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +0 -1
  196. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +0 -1
  197. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +1 -1
  198. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  199. package/dist/dist-esm/react-components/src/components/VideoGallery/FocusContentLayout.d.ts +0 -1
  200. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -1
  201. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +0 -1
  202. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +0 -1
  203. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
  204. package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +0 -1
  205. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +0 -1
  206. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +1 -1
  207. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
  208. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +1 -5
  209. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
  210. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +3 -18
  211. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  212. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +0 -9
  213. package/dist/dist-esm/react-components/src/components/VideoGallery.js +6 -42
  214. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  215. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +1 -9
  216. package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -41
  217. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  218. package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.d.ts +0 -1
  219. package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js +56 -56
  220. package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js.map +1 -1
  221. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -21
  222. package/dist/dist-esm/react-components/src/components/index.js +0 -12
  223. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  224. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +1 -1
  225. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +12 -5
  226. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  227. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +1 -1
  228. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +5 -3
  229. package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
  230. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +2 -2
  231. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +0 -1
  232. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -3
  233. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  234. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +6 -3
  235. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +14 -6
  236. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  237. package/dist/dist-esm/react-components/src/components/utils/common.js +0 -4
  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 +1 -2
  240. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  241. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
  242. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -5
  243. package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
  244. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  245. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  246. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -60
  247. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  248. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +9 -3
  249. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +9 -3
  250. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +9 -3
  251. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +9 -3
  252. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +4 -2
  253. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +9 -3
  254. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +9 -3
  255. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +9 -3
  256. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +9 -3
  257. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +9 -3
  258. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +9 -3
  259. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +9 -3
  260. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +9 -3
  261. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +9 -3
  262. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +9 -3
  263. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +9 -3
  264. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +9 -3
  265. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +9 -3
  266. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +9 -3
  267. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +9 -3
  268. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +9 -3
  269. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -13
  270. package/dist/dist-esm/react-components/src/theming/icons.js +3 -111
  271. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  272. package/dist/dist-esm/react-components/src/theming/themes.d.ts +2 -21
  273. package/dist/dist-esm/react-components/src/theming/themes.js +0 -16
  274. package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
  275. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -34
  276. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  277. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +0 -9
  278. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  279. package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +1 -44
  280. package/dist/dist-esm/react-components/src/types/ReactionTypes.js +1 -2
  281. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
  282. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -6
  283. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
  284. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  285. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +1 -74
  286. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +15 -28
  287. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  288. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +29 -105
  289. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  290. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +50 -75
  291. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +101 -289
  292. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  293. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +17 -99
  294. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
  295. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  296. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +1 -2
  297. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +1 -7
  298. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
  299. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +3 -8
  300. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +0 -2
  301. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  302. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -1
  303. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +11 -25
  304. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  305. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.d.ts +0 -2
  306. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -38
  307. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  308. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.d.ts +0 -1
  309. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -3
  310. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -27
  311. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
  312. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.d.ts +0 -1
  313. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -20
  314. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
  315. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -3
  316. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -27
  317. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
  318. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.d.ts +0 -1
  319. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.d.ts +0 -1
  320. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.d.ts +0 -1
  321. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -2
  322. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +5 -31
  323. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
  324. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.d.ts +0 -1
  325. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +0 -1
  326. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +2 -5
  327. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  328. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MutedNotification.d.ts +0 -1
  329. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.d.ts +0 -1
  330. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +0 -1
  331. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.d.ts +0 -1
  332. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.d.ts +0 -1
  333. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +0 -1
  334. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
  335. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +0 -1
  336. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +0 -1
  337. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.d.ts +0 -1
  338. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +0 -1
  339. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +2 -6
  340. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  341. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +7 -20
  342. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  343. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +0 -1
  344. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +4 -9
  345. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -2
  346. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  347. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +0 -1
  348. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +44 -13
  349. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  350. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -8
  351. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +6 -80
  352. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  353. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/{HoldPage.d.ts → DtmfDialpadPage.d.ts} +8 -7
  354. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +80 -0
  355. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -0
  356. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +0 -1
  357. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +3 -7
  358. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  359. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.d.ts +0 -1
  360. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js +11 -1
  361. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js.map +1 -1
  362. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +0 -1
  363. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -5
  364. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -5
  365. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  366. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +0 -4
  367. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
  368. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.d.ts +8 -0
  369. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js +18 -0
  370. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js.map +1 -0
  371. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +9 -0
  372. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +26 -0
  373. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
  374. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +15 -16
  375. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +24 -97
  376. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  377. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.d.ts +17 -0
  378. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js +30 -0
  379. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js.map +1 -0
  380. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -62
  381. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -31
  382. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  383. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButton.d.ts +0 -1
  384. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts +0 -1
  385. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/NotificationIcon.d.ts +0 -1
  386. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -32
  387. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  388. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +10 -33
  389. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +16 -108
  390. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  391. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +5 -55
  392. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  393. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +4 -10
  394. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +7 -37
  395. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  396. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +0 -13
  397. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +1 -37
  398. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  399. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -22
  400. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -9
  401. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  402. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -21
  403. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
  404. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  405. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.d.ts +0 -1
  406. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -1
  407. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +6 -133
  408. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  409. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -4
  410. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  411. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +3 -32
  412. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +5 -129
  413. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  414. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +0 -28
  415. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -159
  416. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  417. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -17
  418. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  419. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +0 -2
  420. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  421. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.d.ts +0 -1
  422. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +1 -8
  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/useHandlers.js +1 -3
  425. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  426. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/usePropsFor.d.ts +0 -1
  427. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -4
  428. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  429. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -6
  430. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -15
  431. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  432. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -6
  433. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +2 -3
  434. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  435. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +0 -1
  436. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +0 -1
  437. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +0 -1
  438. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -1
  439. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +25 -14
  440. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  441. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -1
  442. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +40 -27
  443. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  444. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.d.ts +17 -0
  445. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js +41 -0
  446. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js.map +1 -0
  447. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.d.ts +0 -1
  448. package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.d.ts +0 -1
  449. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +8 -1
  450. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +43 -28
  451. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  452. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +2 -2
  453. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  454. package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +0 -1
  455. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts +0 -1
  456. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.d.ts +0 -1
  457. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +0 -1
  458. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
  459. package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
  460. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +0 -1
  461. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -14
  462. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  463. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +0 -1
  464. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +0 -1
  465. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +0 -1
  466. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -24
  467. package/dist/dist-esm/react-composites/src/composites/common/icons.js +5 -13
  468. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  469. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +8 -13
  470. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  471. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +29 -2
  472. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +29 -2
  473. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +29 -2
  474. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +29 -2
  475. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +20 -2
  476. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +29 -2
  477. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +29 -2
  478. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +29 -2
  479. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +29 -2
  480. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +29 -2
  481. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +29 -2
  482. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +29 -2
  483. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +29 -2
  484. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +29 -2
  485. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +29 -2
  486. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +29 -2
  487. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +29 -2
  488. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +29 -2
  489. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +29 -2
  490. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +29 -2
  491. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +29 -2
  492. package/dist/tsdoc-metadata.json +1 -1
  493. package/package.json +4 -4
  494. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +0 -45
  495. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +0 -91
  496. package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +0 -1
  497. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +0 -19
  498. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +0 -91
  499. package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +0 -1
  500. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +0 -23
  501. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -49
  502. package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +0 -1
  503. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.d.ts +0 -32
  504. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +0 -129
  505. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +0 -1
  506. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
  507. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
  508. package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
  509. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
  510. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -43
  511. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
  512. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
  513. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -75
  514. package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
  515. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
  516. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -68
  517. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
  518. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
  519. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -39
  520. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
  521. package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
  522. package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
  523. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +0 -1
  524. package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +0 -71
  525. package/dist/dist-esm/react-components/src/components/ImageGallery.js +0 -56
  526. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +0 -1
  527. package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
  528. package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -123
  529. package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
  530. package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
  531. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
  532. package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
  533. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
  534. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
  535. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
  536. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
  537. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -816
  538. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
  539. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
  540. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
  541. package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
  542. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +0 -68
  543. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +0 -205
  544. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +0 -1
  545. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
  546. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
  547. package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
  548. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
  549. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -92
  550. package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
  551. package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
  552. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
  553. package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
  554. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
  555. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -67
  556. package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
  557. package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
  558. package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
  559. package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
  560. package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
  561. package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
  562. package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
  563. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -48
  564. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -218
  565. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
  566. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
  567. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
  568. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
  569. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
  570. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
  571. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
  572. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -28
  573. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +0 -1
  574. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
  575. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -54
  576. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
  577. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
  578. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
  579. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +0 -1
  580. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
  581. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
  582. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
  583. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +0 -15
  584. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +0 -23
  585. package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +0 -1
  586. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +0 -6
  587. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +0 -11
  588. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +0 -1
  589. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -12
  590. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -15
  591. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +0 -1
  592. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +0 -27
  593. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +0 -14
  594. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +0 -1
  595. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -22
  596. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -107
  597. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
  598. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
  599. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
  600. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
  601. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
  602. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -74
  603. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
  604. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
  605. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
  606. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
@@ -1,9 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';
3
2
  /**
4
3
  * Strings of {@link Dialpad} that can be overridden.
5
4
  *
6
- * @beta
5
+ * @public
7
6
  */
8
7
  export interface DialpadStrings {
9
8
  placeholderText: string;
@@ -12,7 +11,7 @@ export interface DialpadStrings {
12
11
  /**
13
12
  * Styles for {@link Dialpad} component.
14
13
  *
15
- * @beta
14
+ * @public
16
15
  */
17
16
  export interface DialpadStyles {
18
17
  root?: IStyle;
@@ -25,23 +24,23 @@ export interface DialpadStyles {
25
24
  /**
26
25
  * DTMF tone for PSTN calls.
27
26
  *
28
- * @beta
27
+ * @public
29
28
  */
30
29
  export type DtmfTone = 'A' | 'B' | 'C' | 'D' | 'Flash' | 'Num0' | 'Num1' | 'Num2' | 'Num3' | 'Num4' | 'Num5' | 'Num6' | 'Num7' | 'Num8' | 'Num9' | 'Pound' | 'Star';
31
30
  /**
32
31
  * Modes of the dialpad component.
33
- * @beta
32
+ * @public
34
33
  */
35
34
  export type DialpadMode = 'dtmf' | 'dialer';
36
35
  /**
37
36
  * Modes of how the longpress handlers can be tiggered.
38
- * @beta
37
+ * @public
39
38
  */
40
39
  export type LongPressTrigger = 'mouseAndTouch' | 'touch';
41
40
  /**
42
41
  * Props for {@link Dialpad} component.
43
42
  *
44
- * @beta
43
+ * @public
45
44
  */
46
45
  export interface DialpadProps {
47
46
  strings?: DialpadStrings;
@@ -90,7 +89,7 @@ export interface DialpadProps {
90
89
  * A component to allow users to enter phone number through clicking on dialpad/using keyboard
91
90
  * It will return empty component for stable builds
92
91
  *
93
- * @beta
92
+ * @public
94
93
  */
95
94
  export declare const Dialpad: (props: DialpadProps) => JSX.Element;
96
95
  //# sourceMappingURL=Dialpad.d.ts.map
@@ -163,7 +163,7 @@ const DialpadContainer = (props) => {
163
163
  setText(modifiedInput);
164
164
  };
165
165
  return React.createElement(Stack, { className: mergeStyles(containerStyles(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer", "data-ui-id": "dialpadContainer", horizontalAlign: 'center' },
166
- dialpadMode === 'dialer' && React.createElement(TextField, { styles: concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue),
166
+ dialpadMode === 'dialer' && React.createElement(TextField, { styles: concatStyleSets(textFieldStyles(theme, plainTextValue !== ''), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue),
167
167
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
168
168
  onChange: (e) => {
169
169
  setText(e.target.value);
@@ -202,7 +202,7 @@ const DialpadContainer = (props) => {
202
202
  * A component to allow users to enter phone number through clicking on dialpad/using keyboard
203
203
  * It will return empty component for stable builds
204
204
  *
205
- * @beta
205
+ * @public
206
206
  */
207
207
  export const Dialpad = (props) => {
208
208
  /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
@@ -1 +1 @@
1
- {"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,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C,CAAC,CACU,CACN,CAAC;AACb,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAe,EAAE;IAC1D,0CAA0C,CAAC,6CAA6C;IACxF,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IAClD,MAAM,8BAA8B,GAAG,GAAmB,EAAE;QAC1D,0CAA0C,CAAC,6CAA6C;QACxF,OAAO,aAAa,CAAC;QACrB,wFAAwF;QACxF,4DAA4D;QAC5D,OAAS,EAAiC,CAAC;IAC7C,CAAC,CAAC;IACF,MAAM,OAAO,mCACR,8BAA8B,EAAE,GAChC,KAAK,CAAC,OAAO,CACjB,CAAC;IACF,OAAO,oBAAC,gBAAgB,kBAAC,OAAO,EAAE,OAAO,IAAM,KAAK,EAAI,CAAC;AAC3D,CAAC,CAAC;AACF,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,sFAAsF;IACtF,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef } from 'react';\nimport { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';\nimport { IconButton } from '@fluentui/react';\nimport { concatStyleSets, DefaultButton, FocusZone, mergeStyles, Stack, Text, TextField, useTheme } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\n/* @conditional-compile-remove(dialpad) */\nimport { useLocale } from '../../localization';\nimport { buttonStyles, containerStyles, iconButtonStyles, digitStyles, letterStyles, textFieldStyles } from '../styles/Dialpad.styles';\nimport { formatPhoneNumber } from '../utils/formatPhoneNumber';\nimport useLongPress from '../utils/useLongPress';\nimport { dtmfFrequencies, Tone } from './DTMFToneGenerator';\n\n/**\n * Strings of {@link Dialpad} that can be overridden.\n *\n * @beta\n */\nexport interface DialpadStrings {\n placeholderText: string;\n deleteButtonAriaLabel?: string;\n}\n\n/**\n * Styles for {@link Dialpad} component.\n *\n * @beta\n */\nexport interface DialpadStyles {\n root?: IStyle;\n button?: IButtonStyles;\n textField?: Partial<ITextFieldStyles>;\n digit?: IStyle;\n letter?: IStyle;\n deleteIcon?: IButtonStyles;\n}\n\n/**\n * DTMF tone for PSTN calls.\n *\n * @beta\n */\nexport type DtmfTone = 'A' | 'B' | 'C' | 'D' | 'Flash' | 'Num0' | 'Num1' | 'Num2' | 'Num3' | 'Num4' | 'Num5' | 'Num6' | 'Num7' | 'Num8' | 'Num9' | 'Pound' | 'Star';\n\n/**\n * Modes of the dialpad component.\n * @beta\n */\nexport type DialpadMode = 'dtmf' | 'dialer';\n\n/**\n * Modes of how the longpress handlers can be tiggered.\n * @beta\n */\nexport type LongPressTrigger = 'mouseAndTouch' | 'touch';\n\n/**\n * Props for {@link Dialpad} component.\n *\n * @beta\n */\nexport interface DialpadProps {\n strings?: DialpadStrings;\n /**\n * function to send dtmf tones on button click\n */\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /**\n * Callback for dialpad button behavior\n */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /**\n * set dialpad textfield content\n */\n textFieldValue?: string;\n /**\n * on change function for text field, provides an unformatted plain text\n */\n onChange?: (input: string) => void;\n /**\n * flag to determine when to show/hide delete button, default true\n */\n showDeleteButton?: boolean;\n /**\n * Determines what kind of device that the user is on and should respect that based on interaction\n * interfaces available to the user\n */\n longPressTrigger?: LongPressTrigger;\n /**\n * Styles for customizing the dialpad component\n */\n styles?: DialpadStyles;\n /**\n * Disables DTMF sounds when dialpad buttons are pressed. the actual\n * tones are still sent to the call.\n */\n disableDtmfPlayback?: boolean;\n /**\n * Dialer mode for the dialpad. The dtmf mode is for sending dtmf tones and the appearence of\n * the dialpad is changed like hiding the input box. When using dialer mode the input box is there\n * and can be edited to change the number being dialed.\n */\n dialpadMode?: DialpadMode;\n}\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: string;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [[{\n digit: '1'\n}, {\n digit: '2',\n letter: 'ABC'\n}, {\n digit: '3',\n letter: 'DEF'\n}], [{\n digit: '4',\n letter: 'GHI'\n}, {\n digit: '5',\n letter: 'JKL'\n}, {\n digit: '6',\n letter: 'MNO'\n}], [{\n digit: '7',\n letter: 'PQRS'\n}, {\n digit: '8',\n letter: 'TUV'\n}, {\n digit: '9',\n letter: 'WXYZ'\n}], [{\n digit: '*'\n}, {\n digit: '0',\n letter: '+'\n}, {\n digit: '#'\n}]];\nconst DtmfTones: DtmfTone[] = ['Num1', 'Num2', 'Num3', 'Num4', 'Num5', 'Num6', 'Num7', 'Num8', 'Num9', 'Star', 'Num0', 'Pound'];\nconst DialpadButton = (props: {\n digit: string;\n letter?: string;\n styles?: DialpadStyles;\n index: number;\n onClick: (input: string, index: number) => void;\n onLongPress: (input: string, index: number) => void;\n longPressTrigger: LongPressTrigger;\n dtmfToneAudioContext: AudioContext;\n disableDtmfPlayback?: boolean;\n}): JSX.Element => {\n const theme = useTheme();\n const {\n digit,\n index,\n onClick,\n onLongPress,\n longPressTrigger,\n dtmfToneAudioContext,\n disableDtmfPlayback\n } = props;\n const [buttonPressed, setButtonPressed] = useState(false);\n const dtmfToneSound = useRef<Tone>(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));\n const useLongPressProps = React.useMemo(() => ({\n onClick: async () => {\n onClick(digit, index);\n },\n onLongPress: async () => {\n onLongPress(digit, index);\n },\n touchEventsOnly: longPressTrigger === 'touch'\n }), [digit, index, longPressTrigger, onClick, onLongPress]);\n const longPressHandlers = useLongPress(useLongPressProps);\n return <DefaultButton data-test-id={`dialpad-button-${props.index}`} styles={concatStyleSets(buttonStyles(theme), props.styles?.button)} {...longPressHandlers} onKeyDown={e => {\n if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onKeyDown();\n setButtonPressed(true);\n return;\n }\n if (e.key === 'Tab' || e.key === 'ArrowLeft' || e.key === 'ArrowRight' || e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n dtmfToneSound.current.stop();\n }\n longPressHandlers.onKeyDown();\n }} onKeyUp={e => {\n if ((e.key === 'Enter' || e.key === ' ') && buttonPressed) {\n dtmfToneSound.current.stop();\n longPressHandlers.onKeyUp();\n setButtonPressed(false);\n }\n longPressHandlers.onKeyUp();\n }} onMouseDown={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onMouseDown();\n }} onMouseUp={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onMouseUp();\n }} onMouseLeave={() => {\n dtmfToneSound.current.stop();\n }} onTouchStart={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onTouchStart();\n }} onTouchEnd={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onTouchEnd();\n }}>\n <Stack>\n <Text className={mergeStyles(digitStyles(theme), props.styles?.digit)}>{props.digit}</Text>\n\n <Text className={mergeStyles(letterStyles(theme), props.styles?.letter)}>{props.letter ?? ' '}</Text>\n </Stack>\n </DefaultButton>;\n};\nconst DialpadContainer = (props: {\n strings: DialpadStrings;\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** Pass in custom content to dialpad textfield */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text */\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n longPressTrigger?: LongPressTrigger;\n styles?: DialpadStyles;\n disableDtmfPlayback?: boolean;\n dialpadMode?: DialpadMode;\n}): JSX.Element => {\n const theme = useTheme();\n const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n longPressTrigger = 'mouseAndTouch',\n disableDtmfPlayback,\n dialpadMode = 'dialer'\n } = props;\n const dtmfToneAudioContext = useRef(new AudioContext());\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n const plainTextValuePreviousRenderValue = useRef(plainTextValue);\n useEffect(() => {\n if (plainTextValuePreviousRenderValue.current !== plainTextValue) {\n onChange?.(plainTextValue);\n }\n plainTextValuePreviousRenderValue.current = plainTextValue;\n }, [plainTextValuePreviousRenderValue, plainTextValue, onChange]);\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\n const onClickDialpad = (input: string, index: number): void => {\n setText(plainTextValue + input);\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n const onLongPressDialpad = (input: string, index: number): void => {\n if (input === '0' && index === 10) {\n setText(plainTextValue + '+');\n } else {\n setText(plainTextValue + input);\n }\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setText = (input: string): void => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n const plainInput = sanitizeInput(input);\n setPlainTextValue(plainInput);\n };\n const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n return <Stack className={mergeStyles(containerStyles(theme), props.styles?.root)} data-test-id=\"dialpadContainer\" data-ui-id=\"dialpadContainer\" horizontalAlign={'center'}>\n {dialpadMode === 'dialer' && <TextField styles={concatStyleSets(textFieldStyles(theme), props.styles?.textField)} value={textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue)}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange={(e: any) => {\n setText(e.target.value);\n }} onClick={e => {\n e.preventDefault();\n }} placeholder={props.strings.placeholderText} data-test-id=\"dialpad-input\" onRenderSuffix={(): JSX.Element => <>\n {showDeleteButton && plainTextValue.length !== 0 && <IconButton ariaLabel={props.strings.deleteButtonAriaLabel} onClick={deleteNumbers} styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)} iconProps={{\n iconName: 'DialpadBackspace'\n }} />}\n </>} />}\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\" tokens={{\n childrenGap: '1rem'\n }}>\n {rows.map((button, columnIndex) => <DialpadButton key={`button_${columnIndex}`}\n /* row index = 0\n columnIndex: (0,1,2) => (0,1,2)\n row index = 1\n columnIndex: (0,1,2)=> (3,4,5)\n row index = 2\n columnIndex: (0,1,2)=> (6,7,8)\n row index = 3\n columnIndex: (0,1,2)=> (9,10,11)\n columnIndex + rowIndex*rows.length calculates the corresponding index for each button\n dialpad index:\n 0 1 2\n 3 4 5\n 6 7 8\n 9 10 11\n then use this index to locate the corresponding dtmf tones\n DtmfTones[index]\n */ index={columnIndex + rowIndex * rows.length} digit={button.digit} letter={button.letter} styles={props.styles} onClick={onClickDialpad} onLongPress={onLongPressDialpad} longPressTrigger={longPressTrigger} dtmfToneAudioContext={dtmfToneAudioContext.current} disableDtmfPlayback={disableDtmfPlayback} />)}\n </Stack>;\n })}\n </FocusZone>\n </Stack>;\n};\n\n/**\n * A component to allow users to enter phone number through clicking on dialpad/using keyboard\n * It will return empty component for stable builds\n *\n * @beta\n */\nexport const Dialpad = (props: DialpadProps): JSX.Element => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale().strings.dialpad;\n const dialpadLocaleStringsTrampoline = (): DialpadStrings => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n return localeStrings;\n // Even though the component strings type doesn't have `DialpadStrings` in stable build,\n // the string values exist. So unsafe cast for stable build.\n return (('' as unknown) as DialpadStrings);\n };\n const strings = {\n ...dialpadLocaleStringsTrampoline(),\n ...props.strings\n };\n return <DialpadContainer strings={strings} {...props} />;\n};\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};"]}
1
+ {"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3H,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,0CAA0C;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACvI,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAmG5D,MAAM,qBAAqB,GAA6B,CAAC,CAAC;YACxD,KAAK,EAAE,GAAG;SACX,EAAE;YACD,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,KAAK;SACd,EAAE;YACD,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,KA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oft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef } from 'react';\nimport { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';\nimport { IconButton } from '@fluentui/react';\nimport { concatStyleSets, DefaultButton, FocusZone, mergeStyles, Stack, Text, TextField, useTheme } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\n/* @conditional-compile-remove(dialpad) */\nimport { useLocale } from '../../localization';\nimport { buttonStyles, containerStyles, iconButtonStyles, digitStyles, letterStyles, textFieldStyles } from '../styles/Dialpad.styles';\nimport { formatPhoneNumber } from '../utils/formatPhoneNumber';\nimport useLongPress from '../utils/useLongPress';\nimport { dtmfFrequencies, Tone } from './DTMFToneGenerator';\n\n/**\n * Strings of {@link Dialpad} that can be overridden.\n *\n * @public\n */\nexport interface DialpadStrings {\n placeholderText: string;\n deleteButtonAriaLabel?: string;\n}\n\n/**\n * Styles for {@link Dialpad} component.\n *\n * @public\n */\nexport interface DialpadStyles {\n root?: IStyle;\n button?: IButtonStyles;\n textField?: Partial<ITextFieldStyles>;\n digit?: IStyle;\n letter?: IStyle;\n deleteIcon?: IButtonStyles;\n}\n\n/**\n * DTMF tone for PSTN calls.\n *\n * @public\n */\nexport type DtmfTone = 'A' | 'B' | 'C' | 'D' | 'Flash' | 'Num0' | 'Num1' | 'Num2' | 'Num3' | 'Num4' | 'Num5' | 'Num6' | 'Num7' | 'Num8' | 'Num9' | 'Pound' | 'Star';\n\n/**\n * Modes of the dialpad component.\n * @public\n */\nexport type DialpadMode = 'dtmf' | 'dialer';\n\n/**\n * Modes of how the longpress handlers can be tiggered.\n * @public\n */\nexport type LongPressTrigger = 'mouseAndTouch' | 'touch';\n\n/**\n * Props for {@link Dialpad} component.\n *\n * @public\n */\nexport interface DialpadProps {\n strings?: DialpadStrings;\n /**\n * function to send dtmf tones on button click\n */\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /**\n * Callback for dialpad button behavior\n */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /**\n * set dialpad textfield content\n */\n textFieldValue?: string;\n /**\n * on change function for text field, provides an unformatted plain text\n */\n onChange?: (input: string) => void;\n /**\n * flag to determine when to show/hide delete button, default true\n */\n showDeleteButton?: boolean;\n /**\n * Determines what kind of device that the user is on and should respect that based on interaction\n * interfaces available to the user\n */\n longPressTrigger?: LongPressTrigger;\n /**\n * Styles for customizing the dialpad component\n */\n styles?: DialpadStyles;\n /**\n * Disables DTMF sounds when dialpad buttons are pressed. the actual\n * tones are still sent to the call.\n */\n disableDtmfPlayback?: boolean;\n /**\n * Dialer mode for the dialpad. The dtmf mode is for sending dtmf tones and the appearence of\n * the dialpad is changed like hiding the input box. When using dialer mode the input box is there\n * and can be edited to change the number being dialed.\n */\n dialpadMode?: DialpadMode;\n}\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: string;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [[{\n digit: '1'\n}, {\n digit: '2',\n letter: 'ABC'\n}, {\n digit: '3',\n letter: 'DEF'\n}], [{\n digit: '4',\n letter: 'GHI'\n}, {\n digit: '5',\n letter: 'JKL'\n}, {\n digit: '6',\n letter: 'MNO'\n}], [{\n digit: '7',\n letter: 'PQRS'\n}, {\n digit: '8',\n letter: 'TUV'\n}, {\n digit: '9',\n letter: 'WXYZ'\n}], [{\n digit: '*'\n}, {\n digit: '0',\n letter: '+'\n}, {\n digit: '#'\n}]];\nconst DtmfTones: DtmfTone[] = ['Num1', 'Num2', 'Num3', 'Num4', 'Num5', 'Num6', 'Num7', 'Num8', 'Num9', 'Star', 'Num0', 'Pound'];\nconst DialpadButton = (props: {\n digit: string;\n letter?: string;\n styles?: DialpadStyles;\n index: number;\n onClick: (input: string, index: number) => void;\n onLongPress: (input: string, index: number) => void;\n longPressTrigger: LongPressTrigger;\n dtmfToneAudioContext: AudioContext;\n disableDtmfPlayback?: boolean;\n}): JSX.Element => {\n const theme = useTheme();\n const {\n digit,\n index,\n onClick,\n onLongPress,\n longPressTrigger,\n dtmfToneAudioContext,\n disableDtmfPlayback\n } = props;\n const [buttonPressed, setButtonPressed] = useState(false);\n const dtmfToneSound = useRef<Tone>(new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2));\n const useLongPressProps = React.useMemo(() => ({\n onClick: async () => {\n onClick(digit, index);\n },\n onLongPress: async () => {\n onLongPress(digit, index);\n },\n touchEventsOnly: longPressTrigger === 'touch'\n }), [digit, index, longPressTrigger, onClick, onLongPress]);\n const longPressHandlers = useLongPress(useLongPressProps);\n return <DefaultButton data-test-id={`dialpad-button-${props.index}`} styles={concatStyleSets(buttonStyles(theme), props.styles?.button)} {...longPressHandlers} onKeyDown={e => {\n if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onKeyDown();\n setButtonPressed(true);\n return;\n }\n if (e.key === 'Tab' || e.key === 'ArrowLeft' || e.key === 'ArrowRight' || e.key === 'ArrowUp' || e.key === 'ArrowDown') {\n dtmfToneSound.current.stop();\n }\n longPressHandlers.onKeyDown();\n }} onKeyUp={e => {\n if ((e.key === 'Enter' || e.key === ' ') && buttonPressed) {\n dtmfToneSound.current.stop();\n longPressHandlers.onKeyUp();\n setButtonPressed(false);\n }\n longPressHandlers.onKeyUp();\n }} onMouseDown={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onMouseDown();\n }} onMouseUp={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onMouseUp();\n }} onMouseLeave={() => {\n dtmfToneSound.current.stop();\n }} onTouchStart={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onTouchStart();\n }} onTouchEnd={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onTouchEnd();\n }}>\n <Stack>\n <Text className={mergeStyles(digitStyles(theme), props.styles?.digit)}>{props.digit}</Text>\n\n <Text className={mergeStyles(letterStyles(theme), props.styles?.letter)}>{props.letter ?? ' '}</Text>\n </Stack>\n </DefaultButton>;\n};\nconst DialpadContainer = (props: {\n strings: DialpadStrings;\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** Pass in custom content to dialpad textfield */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text */\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n longPressTrigger?: LongPressTrigger;\n styles?: DialpadStyles;\n disableDtmfPlayback?: boolean;\n dialpadMode?: DialpadMode;\n}): JSX.Element => {\n const theme = useTheme();\n const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n longPressTrigger = 'mouseAndTouch',\n disableDtmfPlayback,\n dialpadMode = 'dialer'\n } = props;\n const dtmfToneAudioContext = useRef(new AudioContext());\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n const plainTextValuePreviousRenderValue = useRef(plainTextValue);\n useEffect(() => {\n if (plainTextValuePreviousRenderValue.current !== plainTextValue) {\n onChange?.(plainTextValue);\n }\n plainTextValuePreviousRenderValue.current = plainTextValue;\n }, [plainTextValuePreviousRenderValue, plainTextValue, onChange]);\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\n const onClickDialpad = (input: string, index: number): void => {\n setText(plainTextValue + input);\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n const onLongPressDialpad = (input: string, index: number): void => {\n if (input === '0' && index === 10) {\n setText(plainTextValue + '+');\n } else {\n setText(plainTextValue + input);\n }\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setText = (input: string): void => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n const plainInput = sanitizeInput(input);\n setPlainTextValue(plainInput);\n };\n const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n return <Stack className={mergeStyles(containerStyles(theme), props.styles?.root)} data-test-id=\"dialpadContainer\" data-ui-id=\"dialpadContainer\" horizontalAlign={'center'}>\n {dialpadMode === 'dialer' && <TextField styles={concatStyleSets(textFieldStyles(theme, plainTextValue !== ''), props.styles?.textField)} value={textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue)}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange={(e: any) => {\n setText(e.target.value);\n }} onClick={e => {\n e.preventDefault();\n }} placeholder={props.strings.placeholderText} data-test-id=\"dialpad-input\" onRenderSuffix={(): JSX.Element => <>\n {showDeleteButton && plainTextValue.length !== 0 && <IconButton ariaLabel={props.strings.deleteButtonAriaLabel} onClick={deleteNumbers} styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)} iconProps={{\n iconName: 'DialpadBackspace'\n }} />}\n </>} />}\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\" tokens={{\n childrenGap: '1rem'\n }}>\n {rows.map((button, columnIndex) => <DialpadButton key={`button_${columnIndex}`}\n /* row index = 0\n columnIndex: (0,1,2) => (0,1,2)\n row index = 1\n columnIndex: (0,1,2)=> (3,4,5)\n row index = 2\n columnIndex: (0,1,2)=> (6,7,8)\n row index = 3\n columnIndex: (0,1,2)=> (9,10,11)\n columnIndex + rowIndex*rows.length calculates the corresponding index for each button\n dialpad index:\n 0 1 2\n 3 4 5\n 6 7 8\n 9 10 11\n then use this index to locate the corresponding dtmf tones\n DtmfTones[index]\n */ index={columnIndex + rowIndex * rows.length} digit={button.digit} letter={button.letter} styles={props.styles} onClick={onClickDialpad} onLongPress={onLongPressDialpad} longPressTrigger={longPressTrigger} dtmfToneAudioContext={dtmfToneAudioContext.current} disableDtmfPlayback={disableDtmfPlayback} />)}\n </Stack>;\n })}\n </FocusZone>\n </Stack>;\n};\n\n/**\n * A component to allow users to enter phone number through clicking on dialpad/using keyboard\n * It will return empty component for stable builds\n *\n * @public\n */\nexport const Dialpad = (props: DialpadProps): JSX.Element => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale().strings.dialpad;\n const dialpadLocaleStringsTrampoline = (): DialpadStrings => {\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n return localeStrings;\n // Even though the component strings type doesn't have `DialpadStrings` in stable build,\n // the string values exist. So unsafe cast for stable build.\n return (('' as unknown) as DialpadStrings);\n };\n const strings = {\n ...dialpadLocaleStringsTrampoline(),\n ...props.strings\n };\n return <DialpadContainer strings={strings} {...props} />;\n};\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BaseCustomStyles } from '../../types';
3
2
  /**
4
3
  * An element that fills the space the DrawerContentContainer does not take up.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BaseCustomStyles } from '../../types';
3
2
  import { _DrawerMenuItemProps } from './DrawerMenuItem';
4
3
  import { _DrawerSurfaceStyles } from './DrawerSurface';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ControlBarButtonProps } from './ControlBarButton';
3
2
  /**
4
3
  * Strings of {@link EndCallButton} that can be overridden.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IMessageBarProps } from '@fluentui/react';
3
2
  /**
4
3
  * Props for {@link ErrorBar}.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { _FileUploadCardsStrings } from './FileUploadCards';
3
2
  /**
4
3
  * @internal
@@ -1,16 +1,9 @@
1
- /// <reference types="react" />
2
- /**
3
- * Represents the type of attachment
4
- * @beta
5
- */
6
- export type ChatAttachmentType = 'unknown' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ 'inlineImage' | /* @conditional-compile-remove(file-sharing) */ 'file';
7
1
  /**
8
2
  * Metadata containing basic information about the uploaded file.
9
3
  *
10
4
  * @beta
11
5
  */
12
6
  export interface FileMetadata {
13
- attachmentType: 'file';
14
7
  /**
15
8
  * Extension hint, useful for rendering a specific icon.
16
9
  * An unknown or empty extension will be rendered as a generic icon.
@@ -20,7 +13,6 @@ export interface FileMetadata {
20
13
  /**
21
14
  * Unique ID of the file.
22
15
  */
23
- id: string;
24
16
  /**
25
17
  * File name to be displayed.
26
18
  */
@@ -29,44 +21,12 @@ export interface FileMetadata {
29
21
  * Download URL for the file.
30
22
  */
31
23
  url: string;
32
- payload?: Record<string, string>;
33
- }
34
- /**
35
- * Metadata for rendering images inline with a message.
36
- * This does not include images attached as files.
37
- * @beta
38
- */
39
- export interface InlineImageMetadata {
40
- attachmentType: 'inlineImage';
41
- /**
42
- * Unique ID of the attachment.
43
- */
44
- id: string;
45
- previewUrl?: string;
46
- /**
47
- * Download URL for the full resolution version.
48
- */
49
- url: string;
50
24
  }
51
25
  /**
52
26
  * Metadata containing information about the uploaded file.
53
27
  * @beta
54
28
  */
55
- export type AttachmentMetadata = FileMetadata | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ InlineImageMetadata;
56
- /**
57
- * Metadata of the attachment object returned by the ACS SDK.
58
- * @beta
59
- */
60
- export interface AttachmentDownloadResult {
61
- /**
62
- * Unique ID of the attachment.
63
- */
64
- attachmentId: string;
65
- /**
66
- * Blob URL for the attachment.
67
- */
68
- blobUrl: string;
69
- }
29
+ export type AttachmentMetadata = FileMetadata;
70
30
  /**
71
31
  * Strings of _FileDownloadCards that can be overridden.
72
32
  *
@@ -12,8 +12,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
12
12
  import { Icon, IconButton, Spinner, SpinnerSize, TooltipHost } from '@fluentui/react';
13
13
  import React, { useCallback, useState } from 'react';
14
14
  import { useMemo } from 'react';
15
- /* @conditional-compile-remove(file-sharing) */
16
- import { useLocale } from '../localization';
17
15
  import { _FileCard } from './FileCard';
18
16
  import { _FileCardGroup } from './FileCardGroup';
19
17
  import { iconButtonClassName } from './styles/IconButton.styles';
@@ -37,26 +35,13 @@ export const _FileDownloadCards = (props) => {
37
35
  return (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile) !== null && _b !== void 0 ? _b : localeStrings.downloadFile;
38
36
  }, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.downloadFile, localeStrings.downloadFile]);
39
37
  const isFileSharingAttachment = useCallback((attachment) => {
40
- /* @conditional-compile-remove(file-sharing) */
41
- return attachment.attachmentType === 'file';
42
38
  return false;
43
39
  }, []);
44
- /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
45
- const isShowDownloadIcon = useCallback((attachment) => {
46
- var _a;
47
- /* @conditional-compile-remove(file-sharing) */
48
- return attachment.attachmentType === 'file' && ((_a = attachment.payload) === null || _a === void 0 ? void 0 : _a.teamsFileAttachment) !== 'true';
49
- return true;
50
- }, []);
51
40
  const fileCardGroupDescription = useMemo(() => () => {
52
- var _a, _b, _c, _d;
41
+ var _a, _b, _c;
53
42
  const fileGroupLocaleString = (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.fileCardGroupMessage) !== null && _b !== void 0 ? _b : localeStrings.fileCardGroupMessage;
54
- /* @conditional-compile-remove(file-sharing) */
55
- return _formatString(fileGroupLocaleString, {
56
- fileCount: `${(_c = fileMetadata === null || fileMetadata === void 0 ? void 0 : fileMetadata.filter(isFileSharingAttachment).length) !== null && _c !== void 0 ? _c : 0}`
57
- });
58
43
  return _formatString(fileGroupLocaleString, {
59
- fileCount: `${(_d = fileMetadata === null || fileMetadata === void 0 ? void 0 : fileMetadata.length) !== null && _d !== void 0 ? _d : 0}`
44
+ fileCount: `${(_c = fileMetadata === null || fileMetadata === void 0 ? void 0 : fileMetadata.length) !== null && _c !== void 0 ? _c : 0}`
60
45
  });
61
46
  }, [(_b = props.strings) === null || _b === void 0 ? void 0 : _b.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);
62
47
  const fileDownloadHandler = useCallback((userId, file) => __awaiter(void 0, void 0, void 0, function* () {
@@ -80,30 +65,24 @@ export const _FileDownloadCards = (props) => {
80
65
  }
81
66
  }
82
67
  }), [props]);
83
- if (!fileMetadata || fileMetadata.length === 0 || /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ !fileMetadata.some(isFileSharingAttachment)) {
68
+ if (!fileMetadata || fileMetadata.length === 0) {
84
69
  return React.createElement(React.Fragment, null);
85
70
  }
86
71
  return React.createElement("div", { style: fileDownloadCardsStyle, "data-ui-id": "file-download-card-group" },
87
72
  React.createElement(_FileCardGroup, { ariaLabel: fileCardGroupDescription() }, fileMetadata && fileMetadata.filter(attachment => {
88
- /* @conditional-compile-remove(file-sharing) */
89
- return isFileSharingAttachment(attachment);
90
73
  return true;
91
74
  }).map(file => file).map(file => React.createElement(TooltipHost, { content: downloadFileButtonString(), key: file.name },
92
- React.createElement(_FileCard, { fileName: file.name, key: file.name, fileExtension: file.extension, actionIcon: showSpinner ? React.createElement(Spinner, { size: SpinnerSize.medium, "aria-live": 'polite', role: 'status' }) : true && /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ isShowDownloadIcon(file) ? React.createElement(IconButton, { className: iconButtonClassName, ariaLabel: downloadFileButtonString() },
75
+ React.createElement(_FileCard, { fileName: file.name, key: file.name, fileExtension: file.extension, actionIcon: showSpinner ? React.createElement(Spinner, { size: SpinnerSize.medium, "aria-live": 'polite', role: 'status' }) : true ? React.createElement(IconButton, { className: iconButtonClassName, ariaLabel: downloadFileButtonString() },
93
76
  React.createElement(DownloadIconTrampoline, null)) : undefined, actionHandler: () => fileDownloadHandler(userId, file) })))));
94
77
  };
95
78
  /**
96
79
  * @private
97
80
  */
98
81
  const DownloadIconTrampoline = () => {
99
- // @conditional-compile-remove(file-sharing)
100
- return React.createElement(Icon, { "data-ui-id": "file-download-card-download-icon", iconName: "DownloadFile", style: actionIconStyle });
101
82
  // Return _some_ available icon, as the real icon is beta-only.
102
83
  return React.createElement(Icon, { iconName: "EditBoxCancel", style: actionIconStyle });
103
84
  };
104
85
  const useLocaleStringsTrampoline = () => {
105
- /* @conditional-compile-remove(file-sharing) @conditional-compile-remove(teams-inline-images-and-file-sharing)*/
106
- return useLocale().strings.messageThread;
107
86
  return {
108
87
  downloadFile: '',
109
88
  fileCardGroupMessage: ''
@@ -1 +1 @@
1
- {"version":3,"file":"FileDownloadCards.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/FileDownloadCards.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,+CAA+C;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,mCAAgC;AA0KxD,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,SAAS;CACr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,CAAC,GAAI,CACpH,CAAC,CACN,CACb,CAAC;AACX,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB,GAAG,GAAgB,EAAE;IAC/C,4CAA4C;IAC5C,OAAO,oBAAC,IAAI,kBAAY,kCAAkC,EAAC,QAAQ,EAAC,cAAc,EAAC,KAAK,EAAE,eAAe,GAAI,CAAC;IAC9G,+DAA+D;IAC/D,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAC,eAAe,EAAC,KAAK,EAAE,eAAe,GAAI,CAAC;AACnE,CAAC,CAAC;AACF,MAAM,0BAA0B,GAAG,GAA8B,EAAE;IACjE,gHAAgH;IAChH,OAAO,SAAS,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC;IACzC,OAAO;QACL,YAAY,EAAE,EAAE;QAChB,oBAAoB,EAAE,EAAE;KACzB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, IconButton, Spinner, SpinnerSize, TooltipHost } from '@fluentui/react';\nimport React, { useCallback, useState } from 'react';\nimport { useMemo } from 'react';\n/* @conditional-compile-remove(file-sharing) */\nimport { useLocale } from '../localization';\nimport { _FileCard } from './FileCard';\nimport { _FileCardGroup } from './FileCardGroup';\nimport { iconButtonClassName } from './styles/IconButton.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/* @conditional-compile-remove(file-sharing) @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n/**\n * Represents the type of attachment\n * @beta\n */\nexport type ChatAttachmentType = 'unknown' | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */'inlineImage' | /* @conditional-compile-remove(file-sharing) */'file';\n\n/**\n * Metadata containing basic information about the uploaded file.\n *\n * @beta\n */\nexport interface FileMetadata {\n /* @conditional-compile-remove(file-sharing) */\n attachmentType: 'file';\n /**\n * Extension hint, useful for rendering a specific icon.\n * An unknown or empty extension will be rendered as a generic icon.\n * Example: `pdf`\n */\n extension: string;\n /**\n * Unique ID of the file.\n */\n /* @conditional-compile-remove(file-sharing) */\n id: string;\n /**\n * File name to be displayed.\n */\n name: string;\n /**\n * Download URL for the file.\n */\n url: string;\n /* @conditional-compile-remove(file-sharing) */\n /*\n * Optional dictionary of meta data associated with the file.\n */\n payload?: Record<string, string>;\n}\n\n/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n/**\n * Metadata for rendering images inline with a message.\n * This does not include images attached as files.\n * @beta\n */\nexport interface InlineImageMetadata {\n /*\n * Type of the attachment\n */\n attachmentType: 'inlineImage';\n /**\n * Unique ID of the attachment.\n */\n id: string;\n /*\n * Preview URL for low resolution version.\n */\n previewUrl?: string;\n /**\n * Download URL for the full resolution version.\n */\n url: string;\n}\n\n/**\n * Metadata containing information about the uploaded file.\n * @beta\n */\nexport type AttachmentMetadata = FileMetadata | /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */InlineImageMetadata;\n\n/* @conditional-compile-remove(file-sharing) @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n/**\n * Metadata of the attachment object returned by the ACS SDK.\n * @beta\n */\nexport interface AttachmentDownloadResult {\n /**\n * Unique ID of the attachment.\n */\n attachmentId: string;\n /**\n * Blob URL for the attachment.\n */\n blobUrl: string;\n}\n\n/**\n * Strings of _FileDownloadCards that can be overridden.\n *\n * @internal\n */\nexport interface _FileDownloadCardsStrings {\n /** Aria label to notify user when focus is on file download button. */\n downloadFile: string;\n fileCardGroupMessage: string;\n}\n\n/**\n * @beta\n * A file download error returned via a {@link FileDownloadHandler}.\n * This error message is used to render an error message in the UI.\n */\nexport interface FileDownloadError {\n /** The error message to display in the UI */\n errorMessage: string;\n}\n\n/**\n * @beta\n *\n * A callback function for handling file downloads.\n * The function needs to return a promise that resolves to a file download URL.\n * If the promise is rejected, the {@link Error.message} will be used to display an error message to the user.\n *\n * @example\n * ```ts\n * const fileDownloadHandler: FileDownloadHandler = async (userId, fileData) => {\n * if (isUnauthorizedUser(userId)) {\n * return { errorMessage: 'You don’t have permission to download this file.' };\n * } else {\n * return new URL(fileData.url);\n * }\n * }\n *\n * const App = () => (\n * <ChatComposite\n * ...\n * fileSharing={{\n * fileDownloadHandler: fileDownloadHandler\n * }}\n * />\n * )\n *\n * ```\n * @param userId - The user ID of the user downloading the file.\n * @param fileMetadata - The {@link AttachmentMetadata} containing file `url`, `extension` and `name`.\n */\nexport type FileDownloadHandler = (userId: string, fileMetadata: AttachmentMetadata) => Promise<URL | FileDownloadError>;\n\n/**\n * @internal\n */\nexport interface _FileDownloadCardsProps {\n /**\n * User id of the local participant\n */\n userId: string;\n /**\n * A chat message metadata that includes file metadata\n */\n fileMetadata?: AttachmentMetadata[];\n /**\n * A function of type {@link FileDownloadHandler} for handling file downloads.\n * If the function is not specified, the file's `url` will be opened in a new tab to\n * initiate the download.\n */\n downloadHandler?: FileDownloadHandler;\n /**\n * Optional callback that runs if downloadHandler returns {@link FileDownloadError}.\n */\n onDownloadErrorMessage?: (errMsg: string) => void;\n /**\n * Optional aria label strings for file download cards\n */\n strings?: _FileDownloadCardsStrings;\n}\nconst fileDownloadCardsStyle = {\n marginTop: '0.25rem'\n};\nconst actionIconStyle = {\n height: '1rem'\n};\n\n/**\n * @internal\n */\nexport const _FileDownloadCards = (props: _FileDownloadCardsProps): JSX.Element => {\n const {\n userId,\n fileMetadata\n } = props;\n const [showSpinner, setShowSpinner] = useState(false);\n const localeStrings = useLocaleStringsTrampoline();\n const downloadFileButtonString = useMemo(() => () => {\n return props.strings?.downloadFile ?? localeStrings.downloadFile;\n }, [props.strings?.downloadFile, localeStrings.downloadFile]);\n const isFileSharingAttachment = useCallback((attachment: AttachmentMetadata): boolean => {\n /* @conditional-compile-remove(file-sharing) */\n return attachment.attachmentType === 'file';\n return false;\n }, []);\n\n /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n const isShowDownloadIcon = useCallback((attachment: AttachmentMetadata): boolean => {\n /* @conditional-compile-remove(file-sharing) */\n return attachment.attachmentType === 'file' && attachment.payload?.teamsFileAttachment !== 'true';\n return true;\n }, []);\n const fileCardGroupDescription = useMemo(() => () => {\n const fileGroupLocaleString = props.strings?.fileCardGroupMessage ?? localeStrings.fileCardGroupMessage;\n /* @conditional-compile-remove(file-sharing) */\n return _formatString(fileGroupLocaleString, {\n fileCount: `${fileMetadata?.filter(isFileSharingAttachment).length ?? 0}`\n });\n return _formatString(fileGroupLocaleString, {\n fileCount: `${fileMetadata?.length ?? 0}`\n });\n }, [props.strings?.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);\n const fileDownloadHandler = useCallback(async (userId: string, file: AttachmentMetadata) => {\n if (!props.downloadHandler) {\n window.open(file.url, '_blank', 'noopener,noreferrer');\n } else {\n setShowSpinner(true);\n try {\n const response = await props.downloadHandler(userId, file);\n setShowSpinner(false);\n if (response instanceof URL) {\n window.open(response.toString(), '_blank', 'noopener,noreferrer');\n } else {\n props.onDownloadErrorMessage && props.onDownloadErrorMessage(response.errorMessage);\n }\n } finally {\n setShowSpinner(false);\n }\n }\n }, [props]);\n if (!fileMetadata || fileMetadata.length === 0 || /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */!fileMetadata.some(isFileSharingAttachment)) {\n return <></>;\n }\n return <div style={fileDownloadCardsStyle} data-ui-id=\"file-download-card-group\">\n <_FileCardGroup ariaLabel={fileCardGroupDescription()}>\n {fileMetadata && fileMetadata.filter(attachment => {\n /* @conditional-compile-remove(file-sharing) */\n return isFileSharingAttachment(attachment);\n return true;\n }).map(file => ((file as unknown) as FileMetadata)).map(file => <TooltipHost content={downloadFileButtonString()} key={file.name}>\n <_FileCard fileName={file.name} key={file.name} fileExtension={file.extension} actionIcon={showSpinner ? <Spinner size={SpinnerSize.medium} aria-live={'polite'} role={'status'} /> : true && /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */isShowDownloadIcon(((file as unknown) as AttachmentMetadata)) ? <IconButton className={iconButtonClassName} ariaLabel={downloadFileButtonString()}>\n <DownloadIconTrampoline />\n </IconButton> : undefined} actionHandler={() => fileDownloadHandler(userId, ((file as unknown) as AttachmentMetadata))} />\n </TooltipHost>)}\n </_FileCardGroup>\n </div>;\n};\n\n/**\n * @private\n */\nconst DownloadIconTrampoline = (): JSX.Element => {\n // @conditional-compile-remove(file-sharing)\n return <Icon data-ui-id=\"file-download-card-download-icon\" iconName=\"DownloadFile\" style={actionIconStyle} />;\n // Return _some_ available icon, as the real icon is beta-only.\n return <Icon iconName=\"EditBoxCancel\" style={actionIconStyle} />;\n};\nconst useLocaleStringsTrampoline = (): _FileDownloadCardsStrings => {\n /* @conditional-compile-remove(file-sharing) @conditional-compile-remove(teams-inline-images-and-file-sharing)*/\n return useLocale().strings.messageThread;\n return {\n downloadFile: '',\n fileCardGroupMessage: ''\n };\n};"]}
1
+ {"version":3,"file":"FileDownloadCards.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/FileDownloadCards.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtF,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,mCAAgC;AA8GxD,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,SAAS;CACrB,CAAC;AACF,MAAM,eAAe,GAAG;IACtB,MAAM,EAAE,MAAM;CACf,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAA8B,EAAe,EAAE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,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC,oBAAC,OAAO,IAAC,IAAI,EAAE,WAAW,CAAC,MAAM,eAAa,QAAQ,EAAE,IAAI,EAAE,QAAQ,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,UAAU,IAAC,SAAS,EAAE,mBAAmB,EAAE,SAAS,EAAE,wBAAwB,EAAE;oBACtQ,oBAAC,sBAAsB,OAAG,CACf,CAAC,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM,EAAI,IAAuC,CAAC,GAAI,CACpH,CAAC,CACN,CACb,CAAC;AACX,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB,GAAG,GAAgB,EAAE;IAC/C,+DAA+D;IAC/D,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAC,eAAe,EAAC,KAAK,EAAE,eAAe,GAAI,CAAC;AACnE,CAAC,CAAC;AACF,MAAM,0BAA0B,GAAG,GAA8B,EAAE;IACjE,OAAO;QACL,YAAY,EAAE,EAAE;QAChB,oBAAoB,EAAE,EAAE;KACzB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Icon, IconButton, Spinner, SpinnerSize, TooltipHost } from '@fluentui/react';\nimport React, { useCallback, useState } from 'react';\nimport { useMemo } from 'react';\nimport { _FileCard } from './FileCard';\nimport { _FileCardGroup } from './FileCardGroup';\nimport { iconButtonClassName } from './styles/IconButton.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n/**\n * Metadata containing basic information about the uploaded file.\n *\n * @beta\n */\nexport interface FileMetadata {\n /**\n * Extension hint, useful for rendering a specific icon.\n * An unknown or empty extension will be rendered as a generic icon.\n * Example: `pdf`\n */\n extension: string;\n /**\n * Unique ID of the file.\n */\n /**\n * File name to be displayed.\n */\n name: string;\n /**\n * Download URL for the file.\n */\n url: string;\n}\n/**\n * Metadata containing information about the uploaded file.\n * @beta\n */\nexport type AttachmentMetadata = FileMetadata;\n/**\n * Strings of _FileDownloadCards that can be overridden.\n *\n * @internal\n */\nexport interface _FileDownloadCardsStrings {\n /** Aria label to notify user when focus is on file download button. */\n downloadFile: string;\n fileCardGroupMessage: string;\n}\n\n/**\n * @beta\n * A file download error returned via a {@link FileDownloadHandler}.\n * This error message is used to render an error message in the UI.\n */\nexport interface FileDownloadError {\n /** The error message to display in the UI */\n errorMessage: string;\n}\n\n/**\n * @beta\n *\n * A callback function for handling file downloads.\n * The function needs to return a promise that resolves to a file download URL.\n * If the promise is rejected, the {@link Error.message} will be used to display an error message to the user.\n *\n * @example\n * ```ts\n * const fileDownloadHandler: FileDownloadHandler = async (userId, fileData) => {\n * if (isUnauthorizedUser(userId)) {\n * return { errorMessage: 'You don’t have permission to download this file.' };\n * } else {\n * return new URL(fileData.url);\n * }\n * }\n *\n * const App = () => (\n * <ChatComposite\n * ...\n * fileSharing={{\n * fileDownloadHandler: fileDownloadHandler\n * }}\n * />\n * )\n *\n * ```\n * @param userId - The user ID of the user downloading the file.\n * @param fileMetadata - The {@link AttachmentMetadata} containing file `url`, `extension` and `name`.\n */\nexport type FileDownloadHandler = (userId: string, fileMetadata: AttachmentMetadata) => Promise<URL | FileDownloadError>;\n\n/**\n * @internal\n */\nexport interface _FileDownloadCardsProps {\n /**\n * User id of the local participant\n */\n userId: string;\n /**\n * A chat message metadata that includes file metadata\n */\n fileMetadata?: AttachmentMetadata[];\n /**\n * A function of type {@link FileDownloadHandler} for handling file downloads.\n * If the function is not specified, the file's `url` will be opened in a new tab to\n * initiate the download.\n */\n downloadHandler?: FileDownloadHandler;\n /**\n * Optional callback that runs if downloadHandler returns {@link FileDownloadError}.\n */\n onDownloadErrorMessage?: (errMsg: string) => void;\n /**\n * Optional aria label strings for file download cards\n */\n strings?: _FileDownloadCardsStrings;\n}\nconst fileDownloadCardsStyle = {\n marginTop: '0.25rem'\n};\nconst actionIconStyle = {\n height: '1rem'\n};\n\n/**\n * @internal\n */\nexport const _FileDownloadCards = (props: _FileDownloadCardsProps): JSX.Element => {\n const {\n userId,\n fileMetadata\n } = props;\n const [showSpinner, setShowSpinner] = useState(false);\n const localeStrings = useLocaleStringsTrampoline();\n const downloadFileButtonString = useMemo(() => () => {\n return props.strings?.downloadFile ?? localeStrings.downloadFile;\n }, [props.strings?.downloadFile, localeStrings.downloadFile]);\n const isFileSharingAttachment = useCallback((attachment: AttachmentMetadata): boolean => {\n return false;\n }, []);\n const fileCardGroupDescription = useMemo(() => () => {\n const fileGroupLocaleString = props.strings?.fileCardGroupMessage ?? localeStrings.fileCardGroupMessage;\n return _formatString(fileGroupLocaleString, {\n fileCount: `${fileMetadata?.length ?? 0}`\n });\n }, [props.strings?.fileCardGroupMessage, localeStrings.fileCardGroupMessage, fileMetadata, isFileSharingAttachment]);\n const fileDownloadHandler = useCallback(async (userId: string, file: AttachmentMetadata) => {\n if (!props.downloadHandler) {\n window.open(file.url, '_blank', 'noopener,noreferrer');\n } else {\n setShowSpinner(true);\n try {\n const response = await props.downloadHandler(userId, file);\n setShowSpinner(false);\n if (response instanceof URL) {\n window.open(response.toString(), '_blank', 'noopener,noreferrer');\n } else {\n props.onDownloadErrorMessage && props.onDownloadErrorMessage(response.errorMessage);\n }\n } finally {\n setShowSpinner(false);\n }\n }\n }, [props]);\n if (!fileMetadata || fileMetadata.length === 0) {\n return <></>;\n }\n return <div style={fileDownloadCardsStyle} data-ui-id=\"file-download-card-group\">\n <_FileCardGroup ariaLabel={fileCardGroupDescription()}>\n {fileMetadata && fileMetadata.filter(attachment => {\n return true;\n }).map(file => ((file as unknown) as FileMetadata)).map(file => <TooltipHost content={downloadFileButtonString()} key={file.name}>\n <_FileCard fileName={file.name} key={file.name} fileExtension={file.extension} actionIcon={showSpinner ? <Spinner size={SpinnerSize.medium} aria-live={'polite'} role={'status'} /> : true ? <IconButton className={iconButtonClassName} ariaLabel={downloadFileButtonString()}>\n <DownloadIconTrampoline />\n </IconButton> : undefined} actionHandler={() => fileDownloadHandler(userId, ((file as unknown) as AttachmentMetadata))} />\n </TooltipHost>)}\n </_FileCardGroup>\n </div>;\n};\n\n/**\n * @private\n */\nconst DownloadIconTrampoline = (): JSX.Element => {\n // Return _some_ available icon, as the real icon is beta-only.\n return <Icon iconName=\"EditBoxCancel\" style={actionIconStyle} />;\n};\nconst useLocaleStringsTrampoline = (): _FileDownloadCardsStrings => {\n return {\n downloadFile: '',\n fileCardGroupMessage: ''\n };\n};"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendBoxErrorBarError } from './SendBoxErrorBar';
3
2
  /**
4
3
  * Attributes required for SendBox to show file uploads like name, progress etc.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @internal
4
3
  */
@@ -1,7 +1,6 @@
1
1
  import React, { ReactNode, FormEvent } from 'react';
2
2
  import { IStyle, ITextField } from '@fluentui/react';
3
3
  import { BaseCustomStyles } from '../types';
4
- import { MentionLookupOptions } from './MentionPopover';
5
4
  /**
6
5
  * @private
7
6
  */
@@ -30,7 +29,6 @@ type InputBoxComponentProps = {
30
29
  disabled?: boolean;
31
30
  styles?: InputBoxStylesProps;
32
31
  autoFocus?: 'sendBoxTextField';
33
- mentionLookupOptions?: MentionLookupOptions;
34
32
  };
35
33
  /**
36
34
  * @private
@@ -4,8 +4,6 @@ import React, { useCallback } from 'react';
4
4
  import { Stack, TextField, mergeStyles, concatStyleSets } from '@fluentui/react';
5
5
  import { isEnterKeyEventFromCompositionSession } from './utils';
6
6
  import { inputBoxStyle, inputBoxWrapperStyle, textFieldStyle, textContainerStyle } from './styles/InputBoxComponent.style';
7
- /* @conditional-compile-remove(mention) */
8
- import { TextFieldWithMention } from './TextFieldWithMention/TextFieldWithMention';
9
7
  /**
10
8
  * @private
11
9
  */
@@ -52,22 +50,6 @@ export const InputBoxComponent = (props) => {
52
50
  errorMessage,
53
51
  onRenderSuffix: props.children ? onRenderChildren : undefined
54
52
  };
55
- /* @conditional-compile-remove(mention) */
56
- const textFieldWithMentionProps = {
57
- textFieldProps: textFieldProps,
58
- dataUiId: dataUiId,
59
- textValue: textValue,
60
- onChange: onChange,
61
- onKeyDown: onKeyDown,
62
- onEnterKeyDown: onEnterKeyDown,
63
- textFieldRef: textFieldRef,
64
- supportNewline: supportNewline,
65
- mentionLookupOptions: props.mentionLookupOptions
66
- };
67
- /* @conditional-compile-remove(mention) */
68
- if (props.mentionLookupOptions) {
69
- return React.createElement(TextFieldWithMention, Object.assign({}, textFieldWithMentionProps));
70
- }
71
53
  return React.createElement("div", { style: textFieldProps.errorMessage ? {
72
54
  padding: '0 0 5px 5px'
73
55
  } : undefined },
@@ -1 +1 @@
1
- {"version":3,"file":"InputBoxComponent.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/InputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAwB,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAsB,eAAe,EAAmB,MAAM,iBAAiB,CAAC;AAEtH,OAAO,EAAE,qCAAqC,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAI3H,0CAA0C;AAC1C,OAAO,EAAE,oBAAoB,EAA6B,MAAM,6CAA6C,CAAC;AAoC9G;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC9E,MAAM,EACJ,MAAM,EACN,EAAE,EACF,YAAY,EAAE,QAAQ,EACtB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,SAAS,EACT,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,QAAQ,EACT,GAAG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I,CACC,CAAC;IACX,CAAC,CAAC;IACF,OAAO,oBAAC,KAAK,IAAC,SAAS,EAAE,eAAe;QACpC,6BAAK,SAAS,EAAE,wBAAwB,IAAG,eAAe,EAAE,CAAO,CAC7D,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { ReactNode, FormEvent, useCallback } from 'react';\nimport { Stack, TextField, mergeStyles, IStyle, ITextField, concatStyleSets, ITextFieldProps } from '@fluentui/react';\nimport { BaseCustomStyles } from '../types';\nimport { isEnterKeyEventFromCompositionSession } from './utils';\nimport { inputBoxStyle, inputBoxWrapperStyle, textFieldStyle, textContainerStyle } from './styles/InputBoxComponent.style';\n\n/* @conditional-compile-remove(mention) */\nimport { MentionLookupOptions } from './MentionPopover';\n/* @conditional-compile-remove(mention) */\nimport { TextFieldWithMention, TextFieldWithMentionProps } from './TextFieldWithMention/TextFieldWithMention';\n\n/**\n * @private\n */\nexport interface InputBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n\n /** Styles for customizing the container of the text field */\n textFieldContainer?: IStyle;\n}\ntype InputBoxComponentProps = {\n children?: ReactNode;\n 'data-ui-id'?: string;\n id?: string;\n textValue: string; // This could be plain text or HTML.\n onChange: (event?: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void;\n textFieldRef?: React.RefObject<ITextField>;\n inputClassName?: string;\n placeholderText?: string;\n supportNewline?: boolean;\n maxLength: number;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n errorMessage?: string | React.ReactElement;\n disabled?: boolean;\n styles?: InputBoxStylesProps;\n autoFocus?: 'sendBoxTextField';\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions?: MentionLookupOptions;\n};\n\n/**\n * @private\n */\nexport const InputBoxComponent = (props: InputBoxComponentProps): JSX.Element => {\n const {\n styles,\n id,\n 'data-ui-id': dataUiId,\n textValue,\n onChange,\n textFieldRef,\n placeholderText,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n inputClassName,\n errorMessage,\n disabled,\n children\n } = props;\n const mergedRootStyle = mergeStyles(inputBoxWrapperStyle, styles?.root);\n const mergedInputFieldStyle = mergeStyles(inputBoxStyle, inputClassName);\n const mergedTextContainerStyle = mergeStyles(textContainerStyle, styles?.textFieldContainer);\n const mergedTextFieldStyle = concatStyleSets(textFieldStyle, {\n fieldGroup: styles?.textField,\n errorMessage: styles?.systemMessage,\n suffix: {\n backgroundColor: 'transparent',\n padding: '0 0'\n }\n });\n const onTextFieldKeyDown = useCallback((ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (isEnterKeyEventFromCompositionSession(ev)) {\n return;\n }\n if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {\n ev.preventDefault();\n onEnterKeyDown && onEnterKeyDown();\n }\n onKeyDown && onKeyDown(ev);\n }, [onEnterKeyDown, onKeyDown, supportNewline]);\n const onRenderChildren = (): JSX.Element => {\n return <>{children}</>;\n };\n const renderTextField = (): JSX.Element => {\n const textFieldProps: ITextFieldProps = {\n autoFocus: props.autoFocus === 'sendBoxTextField',\n multiline: true,\n autoAdjustHeight: true,\n multiple: false,\n resizable: false,\n componentRef: textFieldRef,\n id,\n inputClassName: mergedInputFieldStyle,\n placeholder: placeholderText,\n autoComplete: 'off',\n styles: mergedTextFieldStyle,\n disabled,\n errorMessage,\n onRenderSuffix: props.children ? onRenderChildren : undefined\n };\n\n /* @conditional-compile-remove(mention) */\n const textFieldWithMentionProps: TextFieldWithMentionProps = {\n textFieldProps: textFieldProps,\n dataUiId: dataUiId,\n textValue: textValue,\n onChange: onChange,\n onKeyDown: onKeyDown,\n onEnterKeyDown: onEnterKeyDown,\n textFieldRef: textFieldRef,\n supportNewline: supportNewline,\n mentionLookupOptions: props.mentionLookupOptions\n };\n /* @conditional-compile-remove(mention) */\n if (props.mentionLookupOptions) {\n return <TextFieldWithMention {...textFieldWithMentionProps} />;\n }\n return <div style={textFieldProps.errorMessage ? {\n padding: '0 0 5px 5px'\n } : undefined}>\n <TextField {...textFieldProps} data-ui-id={dataUiId} value={textValue} onChange={onChange} onKeyDown={onTextFieldKeyDown} onFocus={e => {\n // Fix for setting the cursor to the correct position when multiline is true\n // This approach should be reviewed during migration to FluentUI v9\n e.currentTarget.value = '';\n e.currentTarget.value = textValue;\n }} />\n </div>;\n };\n return <Stack className={mergedRootStyle}>\n <div className={mergedTextContainerStyle}>{renderTextField()}</div>\n </Stack>;\n};"]}
1
+ {"version":3,"file":"InputBoxComponent.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/InputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAwB,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAsB,eAAe,EAAmB,MAAM,iBAAiB,CAAC;AAEtH,OAAO,EAAE,qCAAqC,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAiC3H;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC9E,MAAM,EACJ,MAAM,EACN,EAAE,EACF,YAAY,EAAE,QAAQ,EACtB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,SAAS,EACT,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,QAAQ,EACT,GAAG,KAAK,CAAC;IACV,MAAM,eAAe,GAAG,WAAW,CAAC,oBAAoB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CA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,EAAE,YAAY;YAC1B,EAAE;YACF,cAAc,EAAE,qBAAqB;YACrC,WAAW,EAAE,eAAe;YAC5B,YAAY,EAAE,KAAK;YACnB,MAAM,EAAE,oBAAoB;YAC5B,QAAQ;YACR,YAAY;YACZ,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;SAC9D,CAAC;QACF,OAAO,6BAAK,KAAK,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC;gBAC/C,OAAO,EAAE,aAAa;aACvB,CAAC,CAAC,CAAC,SAAS;YACT,oBAAC,SAAS,oBAAK,cAAc,kBAAc,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,kBAAkB,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE;oBACvI,4EAA4E;oBAC5E,mEAAmE;oBACnE,CAAC,CAAC,aAAa,CAAC,KAAK,GAAG,EAAE,CAAC;oBAC3B,CAAC,CAAC,aAAa,CAAC,KAAK,GAAG,SAAS,CAAC;gBACpC,CAAC,IAAI,CACC,CAAC;IACX,CAAC,CAAC;IACF,OAAO,oBAAC,KAAK,IAAC,SAAS,EAAE,eAAe;QACpC,6BAAK,SAAS,EAAE,wBAAwB,IAAG,eAAe,EAAE,CAAO,CAC7D,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { ReactNode, FormEvent, useCallback } from 'react';\nimport { Stack, TextField, mergeStyles, IStyle, ITextField, concatStyleSets, ITextFieldProps } from '@fluentui/react';\nimport { BaseCustomStyles } from '../types';\nimport { isEnterKeyEventFromCompositionSession } from './utils';\nimport { inputBoxStyle, inputBoxWrapperStyle, textFieldStyle, textContainerStyle } from './styles/InputBoxComponent.style';\n/**\n * @private\n */\nexport interface InputBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n\n /** Styles for customizing the container of the text field */\n textFieldContainer?: IStyle;\n}\ntype InputBoxComponentProps = {\n children?: ReactNode;\n 'data-ui-id'?: string;\n id?: string;\n textValue: string; // This could be plain text or HTML.\n onChange: (event?: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void;\n textFieldRef?: React.RefObject<ITextField>;\n inputClassName?: string;\n placeholderText?: string;\n supportNewline?: boolean;\n maxLength: number;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n errorMessage?: string | React.ReactElement;\n disabled?: boolean;\n styles?: InputBoxStylesProps;\n autoFocus?: 'sendBoxTextField';\n};\n\n/**\n * @private\n */\nexport const InputBoxComponent = (props: InputBoxComponentProps): JSX.Element => {\n const {\n styles,\n id,\n 'data-ui-id': dataUiId,\n textValue,\n onChange,\n textFieldRef,\n placeholderText,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n inputClassName,\n errorMessage,\n disabled,\n children\n } = props;\n const mergedRootStyle = mergeStyles(inputBoxWrapperStyle, styles?.root);\n const mergedInputFieldStyle = mergeStyles(inputBoxStyle, inputClassName);\n const mergedTextContainerStyle = mergeStyles(textContainerStyle, styles?.textFieldContainer);\n const mergedTextFieldStyle = concatStyleSets(textFieldStyle, {\n fieldGroup: styles?.textField,\n errorMessage: styles?.systemMessage,\n suffix: {\n backgroundColor: 'transparent',\n padding: '0 0'\n }\n });\n const onTextFieldKeyDown = useCallback((ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (isEnterKeyEventFromCompositionSession(ev)) {\n return;\n }\n if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {\n ev.preventDefault();\n onEnterKeyDown && onEnterKeyDown();\n }\n onKeyDown && onKeyDown(ev);\n }, [onEnterKeyDown, onKeyDown, supportNewline]);\n const onRenderChildren = (): JSX.Element => {\n return <>{children}</>;\n };\n const renderTextField = (): JSX.Element => {\n const textFieldProps: ITextFieldProps = {\n autoFocus: props.autoFocus === 'sendBoxTextField',\n multiline: true,\n autoAdjustHeight: true,\n multiple: false,\n resizable: false,\n componentRef: textFieldRef,\n id,\n inputClassName: mergedInputFieldStyle,\n placeholder: placeholderText,\n autoComplete: 'off',\n styles: mergedTextFieldStyle,\n disabled,\n errorMessage,\n onRenderSuffix: props.children ? onRenderChildren : undefined\n };\n return <div style={textFieldProps.errorMessage ? {\n padding: '0 0 5px 5px'\n } : undefined}>\n <TextField {...textFieldProps} data-ui-id={dataUiId} value={textValue} onChange={onChange} onKeyDown={onTextFieldKeyDown} onFocus={e => {\n // Fix for setting the cursor to the correct position when multiline is true\n // This approach should be reviewed during migration to FluentUI v9\n e.currentTarget.value = '';\n e.currentTarget.value = textValue;\n }} />\n </div>;\n };\n return <Stack className={mergedRootStyle}>\n <div className={mergedTextContainerStyle}>{renderTextField()}</div>\n </Stack>;\n};"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { OptionsDevice } from './DevicesButton';
3
2
  /**
4
3
  * @public
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MessageStatus } from "../../../acs-ui-common/src";
3
2
  import { BaseCustomStyles } from '../types';
4
3
  /**
@@ -1,13 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { IStyle } from '@fluentui/react';
3
2
  import { BaseCustomStyles, ChatMessage, CustomMessage, SystemMessage, OnRenderAvatarCallback, Message, ReadReceiptsBySenderId, ComponentSlotStyle } from '../types';
4
- import { BlockedMessage } from '../types';
5
3
  import { MessageStatusIndicatorProps } from './MessageStatusIndicator';
6
4
  import { MessageStatus } from "../../../acs-ui-common/src";
7
- import { FileDownloadHandler } from './FileDownloadCards';
8
- import { AttachmentMetadata } from './FileDownloadCards';
9
- import { MentionOptions } from './MentionPopover';
10
- import { InlineImageOptions } from './ChatMessage/ChatMessageContent';
11
5
  /**
12
6
  * Fluent styles for {@link MessageThread}.
13
7
  *
@@ -33,7 +27,6 @@ export interface MessageThreadStyles extends BaseCustomStyles {
33
27
  /** Styles for system message container. */
34
28
  systemMessageContainer?: ComponentSlotStyle;
35
29
  /** Styles for blocked message container. */
36
- blockedMessageContainer?: ComponentSlotStyle;
37
30
  /** Styles for message status indicator container. */
38
31
  messageStatusContainer?: (mine: boolean) => IStyle;
39
32
  }
@@ -97,14 +90,6 @@ export interface MessageThreadStrings {
97
90
  actionMenuMoreOptions?: string;
98
91
  /** Aria label to announce when a message is deleted */
99
92
  messageDeletedAnnouncementAriaLabel: string;
100
- /** String for download file button in file card */
101
- downloadFile: string;
102
- /** String for policy violation message removal */
103
- blockedWarningText: string;
104
- /** String for policy violation message removal details link */
105
- blockedWarningLinkText: string;
106
- /** String for aria text in file attachment group*/
107
- fileCardGroupMessage: string;
108
93
  }
109
94
  /**
110
95
  * Arguments for {@link MessageThreadProps.onRenderJumpToNewMessageButton}.
@@ -127,10 +112,7 @@ export type MessageRenderer = (props: MessageProps) => JSX.Element;
127
112
  * @public
128
113
  * Callback function run when a message is updated.
129
114
  */
130
- export type UpdateMessageCallback = (messageId: string, content: string, /* @conditional-compile-remove(file-sharing) */ options?: {
131
- metadata?: Record<string, string>;
132
- attachmentMetadata?: AttachmentMetadata[];
133
- }) => Promise<void>;
115
+ export type UpdateMessageCallback = (messageId: string, content: string) => Promise<void>;
134
116
  /**
135
117
  * @public
136
118
  * Callback function run when a message edit is cancelled.
@@ -149,7 +131,7 @@ export type MessageThreadProps = {
149
131
  /**
150
132
  * Messages to render in message thread. A message can be of type `ChatMessage`, `SystemMessage`, `BlockedMessage` or `CustomMessage`.
151
133
  */
152
- messages: (ChatMessage | SystemMessage | CustomMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage)[];
134
+ messages: (ChatMessage | SystemMessage | CustomMessage)[];
153
135
  /**
154
136
  * number of participants in the thread
155
137
  */
@@ -230,11 +212,6 @@ export type MessageThreadProps = {
230
212
  * `messageRenderer` is not provided for `CustomMessage` and thus only available for `ChatMessage` and `SystemMessage`.
231
213
  */
232
214
  onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element;
233
- /**
234
- * Optional callback to render attached files in the message component.
235
- * @beta
236
- */
237
- onRenderFileDownloads?: (userId: string, message: ChatMessage) => JSX.Element;
238
215
  /**
239
216
  * Optional callback to edit a message.
240
217
  *
@@ -276,28 +253,6 @@ export type MessageThreadProps = {
276
253
  * Optional strings to override in component
277
254
  */
278
255
  strings?: Partial<MessageThreadStrings>;
279
- /**
280
- * @beta
281
- * Optional function called when someone clicks on the file download icon.
282
- * If file attachments are defined in the `message.metadata` property using the `fileSharingMetadata` key,
283
- * this function will be called with the data inside `fileSharingMetadata` key.
284
- */
285
- fileDownloadHandler?: FileDownloadHandler;
286
- /**
287
- * Optional function to provide customized date format.
288
- * @beta
289
- */
290
- onDisplayDateTimeString?: (messageDate: Date) => string;
291
- /**
292
- * Optional props needed to lookup a mention query and display mentions
293
- * @beta
294
- */
295
- mentionOptions?: MentionOptions;
296
- /**
297
- * Optional callback called when an inline image is clicked.
298
- * @beta
299
- */
300
- inlineImageOptions?: InlineImageOptions;
301
256
  };
302
257
  /**
303
258
  * Props to render a single message.