@azure/communication-react 1.5.1-alpha-202304040013 → 1.5.1-beta.2

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 (184) hide show
  1. package/CHANGELOG.beta.md +76 -1
  2. package/CHANGELOG.json +621 -0
  3. package/dist/communication-react.d.ts +160 -192
  4. package/dist/dist-cjs/communication-react/index.js +1615 -2195
  5. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  6. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  8. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +2 -29
  9. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  10. package/dist/dist-esm/chat-component-bindings/src/utils/constants.d.ts +0 -4
  11. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js +0 -4
  12. package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
  13. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +26 -32
  14. package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
  15. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -6
  16. package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
  17. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +0 -1
  18. package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
  19. package/dist/dist-esm/communication-react/src/index.d.ts +0 -2
  20. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +29 -31
  22. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -2
  24. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +13 -11
  25. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +1 -2
  27. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +20 -34
  28. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +2 -11
  30. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +9 -47
  31. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +0 -7
  33. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +1 -5
  34. package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +3 -10
  36. package/dist/dist-esm/react-components/src/components/MessageThread.js +36 -57
  37. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  38. package/dist/dist-esm/react-components/src/components/index.d.ts +0 -1
  39. package/dist/dist-esm/react-components/src/components/index.js +0 -1
  40. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +13 -0
  42. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +35 -0
  43. package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js.map +1 -0
  44. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +0 -5
  45. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +0 -28
  46. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +4 -6
  48. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +1 -1
  49. package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/index.d.ts +0 -1
  51. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +116 -11
  53. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +115 -10
  54. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -3
  55. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +115 -10
  56. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +116 -11
  57. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +115 -10
  58. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +115 -10
  59. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +115 -10
  60. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +115 -10
  61. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +116 -11
  62. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +115 -10
  63. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +116 -11
  64. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +115 -10
  65. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +115 -10
  66. package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -1
  67. package/dist/dist-esm/react-components/src/theming/icons.js +0 -8
  68. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -20
  70. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +0 -20
  72. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -7
  74. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +2 -14
  75. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +0 -8
  77. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +20 -93
  79. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  80. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +3 -9
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +1 -3
  84. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +1 -1
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +1 -1
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +1 -1
  92. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +1 -1
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +2 -2
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -19
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +1 -5
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +0 -20
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +87 -5
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +75 -15
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -7
  107. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +28 -0
  109. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +194 -0
  110. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +1 -0
  111. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/CustomButton.d.ts +16 -19
  112. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/CustomButton.js +4 -4
  113. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +1 -0
  114. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/PeopleButton.d.ts +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite}/PeopleButton.js +3 -3
  116. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +1 -0
  117. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite}/PreparedMoreDrawer.d.ts +2 -2
  118. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite}/PreparedMoreDrawer.js +5 -5
  119. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +1 -0
  120. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +0 -2
  121. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +1 -7
  122. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  123. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +0 -10
  124. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  125. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +0 -2
  126. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +1 -7
  127. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  128. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite/components}/DesktopMoreButton.d.ts +2 -2
  129. package/dist/dist-esm/react-composites/src/composites/{common/ControlBar → CallWithChatComposite/components}/DesktopMoreButton.js +3 -3
  130. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -0
  131. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite/components}/MoreDrawer.d.ts +2 -2
  132. package/dist/dist-esm/react-composites/src/composites/{common/Drawer → CallWithChatComposite/components}/MoreDrawer.js +5 -4
  133. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -0
  134. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
  135. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  136. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -3
  137. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -6
  138. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  139. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +0 -1
  140. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +0 -11
  141. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  142. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +1 -4
  143. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -29
  144. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
  145. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +0 -2
  146. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -88
  147. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  148. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +1 -7
  149. package/dist/dist-esm/react-composites/src/composites/common/icons.js +1 -7
  150. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  151. package/dist/dist-esm/react-composites/src/composites/index.d.ts +0 -3
  152. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  153. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +17 -3
  154. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +17 -3
  155. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +0 -5
  156. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +17 -3
  157. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +17 -3
  158. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +17 -3
  159. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +17 -3
  160. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +17 -3
  161. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +17 -3
  162. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +17 -3
  163. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +17 -3
  164. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +17 -3
  165. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +17 -3
  166. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +17 -3
  167. package/package.json +10 -10
  168. package/dist/dist-esm/react-components/src/components/Caption.d.ts +0 -21
  169. package/dist/dist-esm/react-components/src/components/Caption.js +0 -32
  170. package/dist/dist-esm/react-components/src/components/Caption.js.map +0 -1
  171. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +0 -21
  172. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +0 -41
  173. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +0 -1
  174. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +0 -30
  175. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +0 -253
  176. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +0 -1
  177. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +0 -1
  178. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +0 -1
  179. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +0 -1
  180. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +0 -1
  181. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +0 -1
  182. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +0 -165
  183. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js +0 -4
  184. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +0 -1
@@ -12,8 +12,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
12
12
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
13
13
  import { Chat, Flex, Ref, mergeStyles as mergeNorthstarThemes } from '@fluentui/react-northstar';
14
14
  import { DownIconStyle, newMessageButtonContainerStyle, messageThreadContainerStyle, chatStyle, buttonWithIconStyles, newMessageButtonStyle, messageStatusContainerStyle, noMessageStatusStyle, defaultChatItemMessageContainer, defaultMyChatMessageContainer, defaultChatMessageContainer, gutterWithAvatar, gutterWithHiddenAvatar, FailedMyChatMessageContainer } from './styles/MessageThread.styles';
15
- /* @conditional-compile-remove(data-loss-prevention) */
16
- import { defaultBlockedMessageStyleContainer } from './styles/MessageThread.styles';
17
15
  import { Icon, mergeStyles, Persona, PersonaSize, PrimaryButton, Stack } from '@fluentui/react';
18
16
  import { LiveAnnouncer } from 'react-aria-live';
19
17
  import { delay } from './utils/delay';
@@ -23,7 +21,7 @@ import { SystemMessage as SystemMessageComponent } from './SystemMessage';
23
21
  import { ChatMessageComponent } from './ChatMessage/ChatMessageComponent';
24
22
  import { useLocale } from '../localization/LocalizationProvider';
25
23
  import { isNarrowWidth, _useContainerWidth } from './utils/responsive';
26
- import getParticipantsWhoHaveReadMessage from './utils/getParticipantsWhoHaveReadMessage';
24
+ import { getParticipantsWhoHaveReadMessage } from './utils/getParticipantsWhoHaveReadMessage';
27
25
  import { useTheme } from '../theming';
28
26
  const isMessageSame = (first, second) => {
29
27
  return (first.messageId === second.messageId &&
@@ -112,7 +110,7 @@ const DefaultSystemMessage = (props) => {
112
110
  return React.createElement(React.Fragment, null);
113
111
  };
114
112
  const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate, showMessageStatus, onRenderAvatar, shouldOverlapAvatarAndMessage, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings, theme, _attached, statusToRender, participantCount, readCount, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, disableEditing) => {
115
- var _a, _b, _c, _d, _e, _f, _g, _h;
113
+ var _a, _b, _c, _d, _e, _f, _g;
116
114
  const messageProps = {
117
115
  message,
118
116
  strings,
@@ -122,54 +120,40 @@ const memoizeAllMessages = memoizeFnAll((_messageKey, message, showMessageDate,
122
120
  onSendMessage,
123
121
  disableEditing
124
122
  };
125
- const chatMessageItemProps = (message, messageProps) => {
126
- var _a, _b, _c;
127
- const chatMessageComponent = onRenderMessage === undefined
128
- ? defaultChatMessageRenderer(messageProps)
129
- : onRenderMessage(messageProps, defaultChatMessageRenderer);
130
- const personaOptions = {
131
- hidePersonaDetails: true,
132
- size: PersonaSize.size32,
133
- text: message.senderDisplayName,
134
- showOverflowTooltip: false
135
- };
136
- const chatItemMessageStyle = (message.mine ? styles === null || styles === void 0 ? void 0 : styles.myChatItemMessageContainer : styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) ||
137
- defaultChatItemMessageContainer(shouldOverlapAvatarAndMessage);
138
- const chatGutterStyles = message.attached === 'top' || message.attached === false ? gutterWithAvatar : gutterWithHiddenAvatar;
139
- return {
140
- gutter: {
141
- styles: chatGutterStyles,
142
- content: message.mine ? ('') : onRenderAvatar ? (onRenderAvatar((_a = message.senderId) !== null && _a !== void 0 ? _a : '', personaOptions)) : (React.createElement(Persona, Object.assign({}, personaOptions)))
143
- },
144
- contentPosition: message.mine ? 'end' : 'start',
145
- message: {
146
- styles: chatItemMessageStyle,
147
- content: (React.createElement(Flex, { hAlign: message.mine ? 'end' : undefined, vAlign: "end" },
148
- chatMessageComponent,
149
- React.createElement("div", { className: mergeStyles(messageStatusContainerStyle((_b = message.mine) !== null && _b !== void 0 ? _b : false), (styles === null || styles === void 0 ? void 0 : styles.messageStatusContainer) ? styles.messageStatusContainer((_c = message.mine) !== null && _c !== void 0 ? _c : false) : '') }, showMessageStatus && statusToRender ? (onRenderMessageStatus ? (onRenderMessageStatus({ status: statusToRender })) : (defaultStatusRenderer(message, statusToRender, participantCount !== null && participantCount !== void 0 ? participantCount : 0, readCount !== null && readCount !== void 0 ? readCount : 0))) : (React.createElement("div", { className: mergeStyles(noMessageStatusStyle) })))))
150
- },
151
- attached: message.attached,
152
- key: _messageKey
153
- };
154
- };
155
- /* @conditional-compile-remove(data-loss-prevention) */
156
- // Similar logic as switch statement case 'chat', if statement for conditional compile (merge logic to switch case when stablize)
157
- if (message.messageType === 'blocked') {
158
- const myChatMessageStyle = message.status === 'failed'
159
- ? (_b = (_a = styles === null || styles === void 0 ? void 0 : styles.failedMyChatMessageContainer) !== null && _a !== void 0 ? _a : styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _b !== void 0 ? _b : FailedMyChatMessageContainer
160
- : (_c = styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _c !== void 0 ? _c : defaultBlockedMessageStyleContainer(theme);
161
- const blockedMessageStyle = (_d = styles === null || styles === void 0 ? void 0 : styles.blockedMessageContainer) !== null && _d !== void 0 ? _d : defaultBlockedMessageStyleContainer(theme);
162
- messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : blockedMessageStyle;
163
- return chatMessageItemProps(message, messageProps);
164
- }
165
123
  switch (message.messageType) {
166
124
  case 'chat': {
167
125
  const myChatMessageStyle = message.status === 'failed'
168
- ? (_f = (_e = styles === null || styles === void 0 ? void 0 : styles.failedMyChatMessageContainer) !== null && _e !== void 0 ? _e : styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _f !== void 0 ? _f : FailedMyChatMessageContainer
169
- : (_g = styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _g !== void 0 ? _g : defaultMyChatMessageContainer;
170
- const chatMessageStyle = (_h = styles === null || styles === void 0 ? void 0 : styles.chatMessageContainer) !== null && _h !== void 0 ? _h : defaultChatMessageContainer(theme);
126
+ ? (_b = (_a = styles === null || styles === void 0 ? void 0 : styles.failedMyChatMessageContainer) !== null && _a !== void 0 ? _a : styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _b !== void 0 ? _b : FailedMyChatMessageContainer
127
+ : (_c = styles === null || styles === void 0 ? void 0 : styles.myChatMessageContainer) !== null && _c !== void 0 ? _c : defaultMyChatMessageContainer;
128
+ const chatMessageStyle = (_d = styles === null || styles === void 0 ? void 0 : styles.chatMessageContainer) !== null && _d !== void 0 ? _d : defaultChatMessageContainer(theme);
171
129
  messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : chatMessageStyle;
172
- return chatMessageItemProps(message, messageProps);
130
+ const chatMessageComponent = onRenderMessage === undefined
131
+ ? defaultChatMessageRenderer(messageProps)
132
+ : onRenderMessage(messageProps, defaultChatMessageRenderer);
133
+ const personaOptions = {
134
+ hidePersonaDetails: true,
135
+ size: PersonaSize.size32,
136
+ text: message.senderDisplayName,
137
+ showOverflowTooltip: false
138
+ };
139
+ const chatItemMessageStyle = (message.mine ? styles === null || styles === void 0 ? void 0 : styles.myChatItemMessageContainer : styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) ||
140
+ defaultChatItemMessageContainer(shouldOverlapAvatarAndMessage);
141
+ const chatGutterStyles = message.attached === 'top' || message.attached === false ? gutterWithAvatar : gutterWithHiddenAvatar;
142
+ return {
143
+ gutter: {
144
+ styles: chatGutterStyles,
145
+ content: message.mine ? ('') : onRenderAvatar ? (onRenderAvatar((_e = message.senderId) !== null && _e !== void 0 ? _e : '', personaOptions)) : (React.createElement(Persona, Object.assign({}, personaOptions)))
146
+ },
147
+ contentPosition: message.mine ? 'end' : 'start',
148
+ message: {
149
+ styles: chatItemMessageStyle,
150
+ content: (React.createElement(Flex, { hAlign: message.mine ? 'end' : undefined, vAlign: "end" },
151
+ chatMessageComponent,
152
+ React.createElement("div", { className: mergeStyles(messageStatusContainerStyle((_f = message.mine) !== null && _f !== void 0 ? _f : false), (styles === null || styles === void 0 ? void 0 : styles.messageStatusContainer) ? styles.messageStatusContainer((_g = message.mine) !== null && _g !== void 0 ? _g : false) : '') }, showMessageStatus && statusToRender ? (onRenderMessageStatus ? (onRenderMessageStatus({ status: statusToRender })) : (defaultStatusRenderer(message, statusToRender, participantCount !== null && participantCount !== void 0 ? participantCount : 0, readCount !== null && readCount !== void 0 ? readCount : 0))) : (React.createElement("div", { className: mergeStyles(noMessageStatusStyle) })))))
153
+ },
154
+ attached: message.attached,
155
+ key: _messageKey
156
+ };
173
157
  }
174
158
  case 'system': {
175
159
  messageProps.messageContainerStyle = styles === null || styles === void 0 ? void 0 : styles.systemMessageContainer;
@@ -434,8 +418,7 @@ export const MessageThread = (props) => {
434
418
  const strings = useMemo(() => (Object.assign(Object.assign({}, localeStrings), props.strings)), [localeStrings, props.strings]);
435
419
  // To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp need to be regenerated)
436
420
  const defaultChatMessageRenderer = useCallback((messageProps) => {
437
- if (messageProps.message.messageType === 'chat' ||
438
- /* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked') {
421
+ if (messageProps.message.messageType === 'chat') {
439
422
  return (React.createElement(ChatMessageComponent, Object.assign({}, messageProps, { onRenderFileDownloads: onRenderFileDownloads,
440
423
  /* @conditional-compile-remove(file-sharing) */
441
424
  strings: strings, message: messageProps.message, userId: props.userId, remoteParticipantsCount: participantCount ? participantCount - 1 : 0, inlineAcceptRejectEditButtons: !isNarrow, onRenderAvatar: onRenderAvatar, showMessageStatus: showMessageStatus, messageStatus: messageProps.message.status, onActionButtonClick: onActionButtonClickMemo,
@@ -474,9 +457,8 @@ export const MessageThread = (props) => {
474
457
  return messages.map((message, index) => {
475
458
  let key = message.messageId;
476
459
  let statusToRender = undefined;
477
- if (message.messageType === 'chat' ||
478
- /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked') {
479
- if ((!message.messageId || message.messageId === '') && 'clientMessageId' in message) {
460
+ if (message.messageType === 'chat') {
461
+ if (!message.messageId || message.messageId === '') {
480
462
  key = message.clientMessageId;
481
463
  }
482
464
  if (showMessageStatus && message.mine) {
@@ -502,10 +484,7 @@ export const MessageThread = (props) => {
502
484
  return memoizedMessageFn(key !== null && key !== void 0 ? key : 'id_' + index, message, showMessageDate, showMessageStatus, onRenderAvatar, isNarrow, styles, onRenderMessageStatus, defaultStatusRenderer, defaultChatMessageRenderer, strings, theme,
503
485
  // Temporary solution to make sure we re-render if attach attribute is changed.
504
486
  // The proper fix should be in selector.
505
- message.messageType === 'chat' ||
506
- /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked'
507
- ? message.attached
508
- : undefined, statusToRender, participantCount, readCountForHoveredIndicator, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, props.disableEditing);
487
+ message.messageType === 'chat' ? message.attached : undefined, statusToRender, participantCount, readCountForHoveredIndicator, onRenderMessage, onUpdateMessage, onDeleteMessage, onSendMessage, props.disableEditing);
509
488
  });
510
489
  }), [
511
490
  messages,
@@ -1 +1 @@
1
- {"version":3,"file":"MessageThread.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MessageThread.t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,CAAC,2BAA2B,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,EAAE,IAAI;YAI3E,oBAAoB,IAAI,CAAC,6BAA6B,IAAI,CACzD,6BAAK,SAAS,EAAE,WAAW,CAAC,8BAA8B,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,yBAAyB,CAAC,IAC3F,8BAA8B,CAAC,CAAC,CAAC,CAChC,8BAA8B,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC,CAChG,CAAC,CAAC,CAAC,CACF,oBAAC,6BAA6B,IAAC,IAAI,EAAE,OAAO,CAAC,oBAAoB,EAAE,OAAO,EAAE,cAAc,GAAI,CAC/F,CACG,CACP;YAED,oBAAC,GAAG,IAAC,QAAQ,EAAE,gBAAgB,IAAG,QAAQ,CAAO,CAC3C,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,+BAA+B,GAAG,CACtC,KAAyB,EAC4C,EAAE;IACvE,+CAA+C;IAC/C,OAAO,KAAK,CAAC,qBAAqB,CAAC;IACnC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAY,EAAsB,EAAE;IACtD,OAAO;QACL,UAAU,EAAE;YACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;SAClC;QACD,aAAa,EAAE;YACb,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACjC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACjC;QACD,cAAc,EAAE;YACd,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACjC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n Chat,\n ChatItemProps,\n Flex,\n Ref,\n ShorthandValue,\n mergeStyles as mergeNorthstarThemes\n} from '@fluentui/react-northstar';\nimport {\n DownIconStyle,\n newMessageButtonContainerStyle,\n messageThreadContainerStyle,\n chatStyle,\n buttonWithIconStyles,\n newMessageButtonStyle,\n messageStatusContainerStyle,\n noMessageStatusStyle,\n defaultChatItemMessageContainer,\n defaultMyChatMessageContainer,\n defaultChatMessageContainer,\n gutterWithAvatar,\n gutterWithHiddenAvatar,\n FailedMyChatMessageContainer\n} from './styles/MessageThread.styles';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { defaultBlockedMessageStyleContainer } from './styles/MessageThread.styles';\nimport {\n Icon,\n IStyle,\n mergeStyles,\n Persona,\n PersonaSize,\n PrimaryButton,\n Stack,\n IPersona,\n Theme\n} from '@fluentui/react';\nimport { ComponentSlotStyle } from '@fluentui/react-northstar';\nimport { LiveAnnouncer } from 'react-aria-live';\nimport { delay } from './utils/delay';\nimport {\n BaseCustomStyles,\n ChatMessage,\n CustomMessage,\n SystemMessage,\n CommunicationParticipant,\n OnRenderAvatarCallback,\n ParticipantAddedSystemMessage,\n ParticipantRemovedSystemMessage,\n Message,\n ReadReceiptsBySenderId\n} from '../types';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../types';\nimport { MessageStatusIndicator, MessageStatusIndicatorProps } from './MessageStatusIndicator';\nimport { memoizeFnAll, MessageStatus } from '@internal/acs-ui-common';\nimport { SystemMessage as SystemMessageComponent, SystemMessageIconTypes } from './SystemMessage';\nimport { ChatMessageComponent } from './ChatMessage/ChatMessageComponent';\nimport { useLocale } from '../localization/LocalizationProvider';\nimport { isNarrowWidth, _useContainerWidth } from './utils/responsive';\nimport getParticipantsWhoHaveReadMessage from './utils/getParticipantsWhoHaveReadMessage';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileDownloadHandler, FileMetadata } from './FileDownloadCards';\nimport { useTheme } from '../theming';\n\nconst isMessageSame = (first: ChatMessage, second: ChatMessage): boolean => {\n return (\n first.messageId === second.messageId &&\n first.content === second.content &&\n first.contentType === second.contentType &&\n JSON.stringify(first.createdOn) === JSON.stringify(second.createdOn) &&\n first.senderId === second.senderId &&\n first.senderDisplayName === second.senderDisplayName &&\n first.status === second.status\n );\n};\n\n/**\n * Get the latest message from the message array.\n *\n * @param messages\n */\nconst getLatestChatMessage = (messages: Message[]): ChatMessage | undefined => {\n for (let i = messages.length - 1; i >= 0; i--) {\n const message = messages[i];\n if (message.messageType === 'chat' && !!message.createdOn) {\n return message;\n }\n }\n return undefined;\n};\n\n/**\n * Compare latestMessageFromPreviousMessages & latestMessageFromNewMessages to see if the new message is not from\n * current user.\n */\nconst isThereNewMessageNotFromCurrentUser = (\n userId: string,\n latestMessageFromPreviousMessages?: ChatMessage,\n latestMessageFromNewMessages?: ChatMessage\n): boolean => {\n if (latestMessageFromNewMessages === undefined) {\n return false;\n }\n if (latestMessageFromPreviousMessages === undefined) {\n return latestMessageFromNewMessages.senderId !== userId;\n }\n return (\n !isMessageSame(latestMessageFromNewMessages, latestMessageFromPreviousMessages) &&\n latestMessageFromNewMessages.senderId !== userId\n );\n};\n\n/**\n * Returns true if the current user sent the latest message and false otherwise. It will ignore messages that have no\n * sender, messages that have failed to send, and messages from the current user that is marked as SEEN. This is meant\n * as an indirect way to detect if user is at bottom of the chat when the component updates with new messages. If we\n * updated this component due to current user sending a message we want to then call scrollToBottom.\n */\nconst didUserSendTheLatestMessage = (\n userId: string,\n latestMessageFromPreviousMessages?: ChatMessage,\n latestMessageFromNewMessages?: ChatMessage\n): boolean => {\n if (latestMessageFromNewMessages === undefined) {\n return false;\n }\n if (latestMessageFromPreviousMessages === undefined) {\n return latestMessageFromNewMessages.senderId === userId;\n }\n return (\n !isMessageSame(latestMessageFromNewMessages, latestMessageFromPreviousMessages) &&\n latestMessageFromNewMessages.senderId === userId\n );\n};\n\n/**\n * Fluent styles for {@link MessageThread}.\n *\n * @public\n */\nexport interface MessageThreadStyles extends BaseCustomStyles {\n /** Styles for load previous messages container. */\n loadPreviousMessagesButtonContainer?: IStyle;\n /** Styles for new message container. */\n newMessageButtonContainer?: IStyle;\n /** Styles for chat container. */\n chatContainer?: ComponentSlotStyle;\n /** styles for my chat items. */\n myChatItemMessageContainer?: ComponentSlotStyle;\n /** styles for chat items. */\n chatItemMessageContainer?: ComponentSlotStyle;\n /** Styles for my chat message container. */\n myChatMessageContainer?: ComponentSlotStyle;\n /** Styles for my chat message container in case of failure. */\n failedMyChatMessageContainer?: ComponentSlotStyle;\n /** Styles for chat message container. */\n chatMessageContainer?: ComponentSlotStyle;\n /** Styles for system message container. */\n systemMessageContainer?: ComponentSlotStyle;\n /** Styles for blocked message container. */\n /* @conditional-compile-remove(data-loss-prevention) */\n blockedMessageContainer?: ComponentSlotStyle;\n /** Styles for message status indicator container. */\n messageStatusContainer?: (mine: boolean) => IStyle;\n}\n\n/**\n * Strings of {@link MessageThread} that can be overridden.\n *\n * @public\n */\nexport interface MessageThreadStrings {\n /** String for Sunday */\n sunday: string;\n /** String for Monday */\n monday: string;\n /** String for Tuesday */\n tuesday: string;\n /** String for Wednesday */\n wednesday: string;\n /** String for Thursday */\n thursday: string;\n /** String for Friday */\n friday: string;\n /** String for Saturday */\n saturday: string;\n /** String for Yesterday */\n yesterday: string;\n /** String for participants joined */\n participantJoined: string;\n /** String for participants left */\n participantLeft: string;\n /** Tag shown on a message that has been edited */\n editedTag: string;\n /** String for editing message in floating menu */\n editMessage: string;\n /** String for removing message in floating menu */\n removeMessage: string;\n /** String for resending failed message in floating menu */\n resendMessage?: string;\n /** String for indicating failed to send messages */\n failToSendTag?: string;\n /** String for LiveMessage introduction for the Chat Message */\n liveAuthorIntro: string;\n /** String for aria text of remote user's message content */\n messageContentAriaText: string;\n /** String for aria text of local user's message content */\n messageContentMineAriaText: string;\n /** String for warning on text limit exceeded in EditBox*/\n editBoxTextLimit: string;\n /** String for placeholder text in EditBox when there is no user input*/\n editBoxPlaceholderText: string;\n /** String for new messages indicator*/\n newMessagesIndicator: string;\n /** String for showing message read status in floating menu */\n messageReadCount?: string;\n /** String for replacing display name when there is none*/\n noDisplayNameSub: string;\n /** String for Cancel button in EditBox*/\n editBoxCancelButton: string;\n /** String for Submit in EditBox when there is no user input*/\n editBoxSubmitButton: string;\n /** String for action menu indicating there are more options */\n actionMenuMoreOptions?: string;\n /* @conditional-compile-remove(file-sharing) */\n /** String for download file button in file card */\n downloadFile: string;\n /* @conditional-compile-remove(data-loss-prevention) */\n /** String for policy violation message removal */\n blockedWarningText: string;\n /* @conditional-compile-remove(data-loss-prevention) */\n /** String for policy violation message removal details link */\n blockedWarningLinkText: string;\n}\n\n/**\n * Arguments for {@link MessageThreadProps.onRenderJumpToNewMessageButton}.\n *\n * @public\n */\nexport interface JumpToNewMessageButtonProps {\n /** String for button text */\n text: string;\n /** Callback for when button is clicked */\n onClick: () => void;\n}\n\nconst DefaultJumpToNewMessageButton = (props: JumpToNewMessageButtonProps): JSX.Element => {\n const { text, onClick } = props;\n return (\n <PrimaryButton\n className={newMessageButtonStyle}\n styles={buttonWithIconStyles}\n text={text}\n onClick={onClick}\n onRenderIcon={() => <Icon iconName=\"Down\" className={DownIconStyle} />}\n />\n );\n};\n\nconst generateParticipantsStr = (participants: CommunicationParticipant[], defaultName: string): string =>\n participants\n .map(\n (participant) =>\n `${!participant.displayName || participant.displayName === '' ? defaultName : participant.displayName}`\n )\n .join(', ');\n\n/**\n * A component to render a single message.\n *\n * @public\n */\nexport type MessageRenderer = (props: MessageProps) => JSX.Element;\n\nconst ParticipantSystemMessageComponent = ({\n message,\n style,\n defaultName\n}: {\n message: ParticipantAddedSystemMessage | ParticipantRemovedSystemMessage;\n style?: ComponentSlotStyle;\n defaultName: string;\n}): JSX.Element => {\n const { strings } = useLocale();\n const participantsStr = generateParticipantsStr(message.participants, defaultName);\n const messageSuffix =\n message.systemMessageType === 'participantAdded'\n ? strings.messageThread.participantJoined\n : strings.messageThread.participantLeft;\n\n if (participantsStr !== '') {\n return (\n <SystemMessageComponent\n iconName={(message.iconName ? message.iconName : '') as SystemMessageIconTypes}\n content={`${participantsStr} ${messageSuffix}`}\n containerStyle={style}\n />\n );\n }\n return <></>;\n};\n\nconst DefaultSystemMessage: MessageRenderer = (props: MessageProps) => {\n const message = props.message;\n switch (message.messageType) {\n case 'system':\n switch (message.systemMessageType) {\n case 'content':\n return (\n <SystemMessageComponent\n iconName={(message.iconName ? message.iconName : '') as SystemMessageIconTypes}\n content={message.content ?? ''}\n containerStyle={props?.messageContainerStyle}\n />\n );\n case 'participantAdded':\n case 'participantRemoved':\n return (\n <ParticipantSystemMessageComponent\n message={message}\n style={props.messageContainerStyle}\n defaultName={props.strings.noDisplayNameSub}\n />\n );\n }\n }\n return <></>;\n};\n\nconst memoizeAllMessages = memoizeFnAll(\n (\n _messageKey: string,\n message: Message,\n showMessageDate: boolean,\n showMessageStatus: boolean,\n onRenderAvatar: OnRenderAvatarCallback | undefined,\n shouldOverlapAvatarAndMessage: boolean,\n styles: MessageThreadStyles | undefined,\n onRenderMessageStatus:\n | ((messageStatusIndicatorProps: MessageStatusIndicatorProps) => JSX.Element | null)\n | undefined,\n defaultStatusRenderer: (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n status: MessageStatus,\n participantCount: number,\n readCount: number\n ) => JSX.Element,\n defaultChatMessageRenderer: (message: MessageProps) => JSX.Element,\n strings: MessageThreadStrings,\n theme: Theme,\n _attached?: boolean | string,\n statusToRender?: MessageStatus,\n participantCount?: number,\n readCount?: number,\n onRenderMessage?: (message: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element,\n onUpdateMessage?: UpdateMessageCallback,\n onDeleteMessage?: (messageId: string) => Promise<void>,\n onSendMessage?: (content: string) => Promise<void>,\n disableEditing?: boolean\n ): ShorthandValue<ChatItemProps> => {\n const messageProps: MessageProps = {\n message,\n strings,\n showDate: showMessageDate,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n disableEditing\n };\n\n const chatMessageItemProps = (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n messageProps: MessageProps\n ): ShorthandValue<ChatItemProps> => {\n const chatMessageComponent =\n onRenderMessage === undefined\n ? defaultChatMessageRenderer(messageProps)\n : onRenderMessage(messageProps, defaultChatMessageRenderer);\n\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: message.senderDisplayName,\n showOverflowTooltip: false\n };\n\n const chatItemMessageStyle =\n (message.mine ? styles?.myChatItemMessageContainer : styles?.chatItemMessageContainer) ||\n defaultChatItemMessageContainer(shouldOverlapAvatarAndMessage);\n\n const chatGutterStyles =\n message.attached === 'top' || message.attached === false ? gutterWithAvatar : gutterWithHiddenAvatar;\n\n return {\n gutter: {\n styles: chatGutterStyles,\n content: message.mine ? (\n ''\n ) : onRenderAvatar ? (\n onRenderAvatar(message.senderId ?? '', personaOptions)\n ) : (\n <Persona {...personaOptions} />\n )\n },\n contentPosition: message.mine ? 'end' : 'start',\n message: {\n styles: chatItemMessageStyle,\n content: (\n <Flex hAlign={message.mine ? 'end' : undefined} vAlign=\"end\">\n {chatMessageComponent}\n <div\n className={mergeStyles(\n messageStatusContainerStyle(message.mine ?? false),\n styles?.messageStatusContainer ? styles.messageStatusContainer(message.mine ?? false) : ''\n )}\n >\n {showMessageStatus && statusToRender ? (\n onRenderMessageStatus ? (\n onRenderMessageStatus({ status: statusToRender })\n ) : (\n defaultStatusRenderer(message, statusToRender, participantCount ?? 0, readCount ?? 0)\n )\n ) : (\n <div className={mergeStyles(noMessageStatusStyle)} />\n )}\n </div>\n </Flex>\n )\n },\n attached: message.attached,\n key: _messageKey\n };\n };\n\n /* @conditional-compile-remove(data-loss-prevention) */\n // Similar logic as switch statement case 'chat', if statement for conditional compile (merge logic to switch case when stablize)\n if (message.messageType === 'blocked') {\n const myChatMessageStyle =\n message.status === 'failed'\n ? styles?.failedMyChatMessageContainer ?? styles?.myChatMessageContainer ?? FailedMyChatMessageContainer\n : styles?.myChatMessageContainer ?? defaultBlockedMessageStyleContainer(theme);\n const blockedMessageStyle = styles?.blockedMessageContainer ?? defaultBlockedMessageStyleContainer(theme);\n messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : blockedMessageStyle;\n return chatMessageItemProps(message, messageProps);\n }\n\n switch (message.messageType) {\n case 'chat': {\n const myChatMessageStyle =\n message.status === 'failed'\n ? styles?.failedMyChatMessageContainer ?? styles?.myChatMessageContainer ?? FailedMyChatMessageContainer\n : styles?.myChatMessageContainer ?? defaultMyChatMessageContainer;\n const chatMessageStyle = styles?.chatMessageContainer ?? defaultChatMessageContainer(theme);\n messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : chatMessageStyle;\n\n return chatMessageItemProps(message, messageProps);\n }\n\n case 'system': {\n messageProps.messageContainerStyle = styles?.systemMessageContainer;\n const systemMessageComponent =\n onRenderMessage === undefined ? (\n <DefaultSystemMessage {...messageProps} />\n ) : (\n onRenderMessage(messageProps, (props) => <DefaultSystemMessage {...props} />)\n );\n return {\n children: systemMessageComponent,\n key: _messageKey\n };\n }\n\n default: {\n // We do not handle custom type message by default, users can handle custom type by using onRenderMessage function.\n const customMessageComponent = onRenderMessage === undefined ? <></> : onRenderMessage(messageProps);\n return {\n children: customMessageComponent,\n key: _messageKey\n };\n }\n }\n }\n);\n\nconst getLastChatMessageIdWithStatus = (messages: Message[], status: MessageStatus): string | undefined => {\n for (let i = messages.length - 1; i >= 0; i--) {\n const message = messages[i];\n if (message.messageType === 'chat' && message.status === status && message.mine) {\n return message.messageId;\n }\n }\n return undefined;\n};\n\n/**\n * @public\n * Callback function run when a message is updated.\n */\nexport type UpdateMessageCallback = (\n messageId: string,\n content: string,\n /* @conditional-compile-remove(file-sharing) */\n metadata?: Record<string, string>,\n /* @conditional-compile-remove(file-sharing) */\n options?: {\n attachedFilesMetadata?: FileMetadata[];\n }\n) => Promise<void>;\n\n/**\n * Props for {@link MessageThread}.\n *\n * @public\n */\nexport type MessageThreadProps = {\n /**\n * UserId of the current user.\n */\n userId: string;\n /**\n * Messages to render in message thread. A message can be of type `ChatMessage`, `SystemMessage`, `BlockedMessage` or `CustomMessage`.\n */\n messages: (\n | ChatMessage\n | SystemMessage\n | CustomMessage\n | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage\n )[];\n /**\n * number of participants in the thread\n */\n participantCount?: number;\n /**\n * read receipts for each sender in the chat\n */\n readReceiptsBySenderId?: ReadReceiptsBySenderId;\n /**\n * Allows users to pass an object containing custom CSS styles.\n * @Example\n * ```\n * <MessageThread styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: MessageThreadStyles;\n /**\n * Whether the new message button is disabled or not.\n *\n * @defaultValue `false`\n */\n disableJumpToNewMessageButton?: boolean;\n /**\n * Whether the date of each message is displayed or not.\n * It is ignored when onDisplayDateTimeString is supplied.\n *\n * @defaultValue `false`\n */\n showMessageDate?: boolean;\n /**\n * Whether the status indicator for each message is displayed or not.\n *\n * @defaultValue `false`\n */\n showMessageStatus?: boolean;\n /**\n * Number of chat messages to reload each time onLoadPreviousChatMessages is called.\n *\n * @defaultValue 0\n */\n numberOfChatMessagesToReload?: number;\n /**\n * Optional callback to override actions on message being seen.\n *\n * @param messageId - message Id\n */\n onMessageSeen?: (messageId: string) => Promise<void>;\n /**\n * Optional callback to override render of the message status indicator.\n *\n * @param messageStatusIndicatorProps - props of type MessageStatusIndicatorProps\n */\n onRenderMessageStatus?: (messageStatusIndicatorProps: MessageStatusIndicatorProps) => JSX.Element | null;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Optional callback to override render of the button for jumping to the new message.\n *\n * @param newMessageButtonProps - button props of type JumpToNewMessageButtonProps\n */\n onRenderJumpToNewMessageButton?: (newMessageButtonProps: JumpToNewMessageButtonProps) => JSX.Element;\n /**\n * Optional callback to override loading of previous messages.\n * It accepts the number of history chat messages that we want to load and return a boolean Promise indicating if we have got all the history messages.\n * If the promise resolves to `true`, we have load all chat messages into the message thread and `loadPreviousMessagesButton` will not be rendered anymore.\n */\n onLoadPreviousChatMessages?: (messagesToLoad: number) => Promise<boolean>;\n /**\n * Optional callback to override render of a message.\n *\n * @param messageProps - props of type {@link communication-react#MessageProps}\n * @param defaultOnRender - default render of type {@link communication-react#MessageRenderer}\n *\n * @remarks\n * `messageRenderer` is not provided for `CustomMessage` and thus only available for `ChatMessage` and `SystemMessage`.\n */\n onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Optional callback to render uploaded files in the message component.\n * @beta\n */\n onRenderFileDownloads?: (userId: string, message: ChatMessage) => JSX.Element;\n /**\n * Optional callback to edit a message.\n *\n * @param messageId - message id from chatClient\n * @param content - new content of the message\n *\n */\n onUpdateMessage?: UpdateMessageCallback;\n\n /**\n * Optional callback to delete a message.\n *\n * @param messageId - message id from chatClient\n *\n */\n onDeleteMessage?: (messageId: string) => Promise<void>;\n\n /**\n * Optional callback to send a message.\n *\n * @param content - message body to send\n *\n */\n onSendMessage?: (content: string) => Promise<void>;\n\n /**\n /**\n * Disable editing messages.\n *\n * @remarks This removes the action menu on messages.\n *\n * @defaultValue `false`\n */\n disableEditing?: boolean;\n\n /**\n * Optional strings to override in component\n */\n strings?: Partial<MessageThreadStrings>;\n\n /* @conditional-compile-remove(file-sharing) */\n /**\n * @beta\n * Optional function called when someone clicks on the file download icon.\n * If file attachments are defined in the `message.metadata` property using the `fileSharingMetadata` key,\n * this function will be called with the data inside `fileSharingMetadata` key.\n */\n fileDownloadHandler?: FileDownloadHandler;\n\n /* @conditional-compile-remove(date-time-customization) */\n /**\n * Optional function to provide customized date format.\n * @beta\n */\n onDisplayDateTimeString?: (messageDate: Date) => string;\n};\n\n/**\n * Props to render a single message.\n *\n * See {@link MessageRenderer}.\n *\n * @public\n */\nexport type MessageProps = {\n /**\n * Message to render. It can type `ChatMessage` or `SystemMessage`, `BlockedMessage` or `CustomMessage`.\n */\n message: Message;\n /**\n * Strings from parent MessageThread component\n */\n strings: MessageThreadStrings;\n /**\n * Custom CSS styles for chat message container.\n */\n messageContainerStyle?: ComponentSlotStyle;\n /**\n * Whether the date of a message is displayed or not.\n *\n * @defaultValue `false`\n */\n showDate?: boolean;\n /**\n * Disable editing messages.\n *\n * @remarks This removes the action menu on messages.\n *\n * @defaultValue `false`\n */\n disableEditing?: boolean;\n /**\n * Optional callback to edit a message.\n *\n * @param messageId - message id from chatClient\n * @param content - new content of the message\n */\n onUpdateMessage?: UpdateMessageCallback;\n\n /**\n * Optional callback to delete a message.\n *\n * @param messageId - message id from chatClient\n *\n */\n onDeleteMessage?: (messageId: string) => Promise<void>;\n\n /**\n * Optional callback to send a message.\n *\n * @param messageId - message id from chatClient\n *\n */\n onSendMessage?: (messageId: string) => Promise<void>;\n};\n\n/**\n * `MessageThread` allows you to easily create a component for rendering chat messages, handling scrolling behavior of new/old messages and customizing icons & controls inside the chat thread.\n * @param props - of type MessageThreadProps\n *\n * Users will need to provide at least chat messages and userId to render the `MessageThread` component.\n * Users can also customize `MessageThread` by passing in their own Avatar, `MessageStatusIndicator` icon, `JumpToNewMessageButton`, `LoadPreviousMessagesButton` and the behavior of these controls.\n *\n * `MessageThread` internally uses the `Chat` & `Chat.Message` component from `@fluentui/react-northstar`. You can checkout the details about these [two components](https://fluentsite.z22.web.core.windows.net/0.53.0/components/chat/props).\n *\n * @public\n */\nexport const MessageThread = (props: MessageThreadProps): JSX.Element => {\n const {\n messages: newMessages,\n userId,\n participantCount,\n readReceiptsBySenderId,\n styles,\n disableJumpToNewMessageButton = false,\n showMessageDate = false,\n showMessageStatus = false,\n numberOfChatMessagesToReload = 5,\n onMessageSeen,\n onRenderMessageStatus,\n onRenderAvatar,\n onLoadPreviousChatMessages,\n onRenderJumpToNewMessageButton,\n onRenderMessage,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString\n } = props;\n const onRenderFileDownloads = onRenderFileDownloadsTrampoline(props);\n\n const [messages, setMessages] = useState<Message[]>([]);\n // We need this state to wait for one tick and scroll to bottom after messages have been initialized.\n // Otherwise chatScrollDivRef.current.clientHeight is wrong if we scroll to bottom before messages are initialized.\n const [chatMessagesInitialized, setChatMessagesInitialized] = useState<boolean>(false);\n const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState<boolean>(true);\n const [forceUpdate, setForceUpdate] = useState<number>(0);\n\n // Used to decide if should auto scroll to bottom or show \"new message\" button\n const [latestPreviousChatMessage, setLatestPreviousChatMessage] = useState<ChatMessage | undefined>(undefined);\n const [latestCurrentChatMessage, setLatestCurrentChatMessage] = useState<ChatMessage | undefined>(undefined);\n const [existsNewChatMessage, setExistsNewChatMessage] = useState<boolean>(false);\n\n const [lastSeenChatMessage, setLastSeenChatMessage] = useState<string | undefined>(undefined);\n const [lastDeliveredChatMessage, setLastDeliveredChatMessage] = useState<string | undefined>(undefined);\n const [lastSendingChatMessage, setLastSendingChatMessage] = useState<string | undefined>(undefined);\n\n // readCount and participantCount will only need to be updated on-fly when user hover on an indicator\n const [readCountForHoveredIndicator, setReadCountForHoveredIndicator] = useState<number | undefined>(undefined);\n\n const isAllChatMessagesLoadedRef = useRef(false);\n // isAllChatMessagesLoadedRef needs to be updated every time when a new adapter is set in order to display correct data\n // onLoadPreviousChatMessages is updated when a new adapter is set\n useEffect(() => {\n if (onLoadPreviousChatMessages) {\n isAllChatMessagesLoadedRef.current = false;\n }\n }, [onLoadPreviousChatMessages]);\n\n const previousTopRef = useRef<number>(-1);\n const previousHeightRef = useRef<number>(-1);\n\n const messageIdSeenByMeRef = useRef<string>('');\n\n const chatScrollDivRef = useRef<HTMLElement>(null);\n const chatThreadRef = useRef<HTMLElement>(null);\n const isLoadingChatMessagesRef = useRef(false);\n\n // When the chat thread is narrow, we perform space optimizations such as overlapping\n // the avatar on top of the chat message and moving the chat accept/reject edit buttons\n // to a new line\n const chatThreadWidth = _useContainerWidth(chatThreadRef);\n const isNarrow = chatThreadWidth ? isNarrowWidth(chatThreadWidth) : false;\n\n const messagesRef = useRef(messages);\n const setMessagesRef = (messagesWithAttachedValue: Message[]): void => {\n messagesRef.current = messagesWithAttachedValue;\n setMessages(messagesWithAttachedValue);\n };\n\n const isAtBottomOfScrollRef = useRef(isAtBottomOfScroll);\n const setIsAtBottomOfScrollRef = (isAtBottomOfScrollValue: boolean): void => {\n isAtBottomOfScrollRef.current = isAtBottomOfScrollValue;\n setIsAtBottomOfScroll(isAtBottomOfScrollValue);\n };\n\n const chatMessagesInitializedRef = useRef(chatMessagesInitialized);\n const setChatMessagesInitializedRef = (chatMessagesInitialized: boolean): void => {\n chatMessagesInitializedRef.current = chatMessagesInitialized;\n setChatMessagesInitialized(chatMessagesInitialized);\n };\n\n // we try to only send those message status if user is scrolled to the bottom.\n const sendMessageStatusIfAtBottom = useCallback(async (): Promise<void> => {\n if (\n !isAtBottomOfScrollRef.current ||\n !document.hasFocus() ||\n !messagesRef.current ||\n messagesRef.current.length === 0 ||\n !showMessageStatus\n ) {\n return;\n }\n const messagesWithId = messagesRef.current.filter((message) => {\n return message.messageType === 'chat' && !message.mine && !!message.messageId;\n });\n if (messagesWithId.length === 0) {\n return;\n }\n const lastMessage: ChatMessage = messagesWithId[messagesWithId.length - 1] as ChatMessage;\n try {\n if (\n onMessageSeen &&\n lastMessage &&\n lastMessage.messageId &&\n lastMessage.messageId !== messageIdSeenByMeRef.current\n ) {\n await onMessageSeen(lastMessage.messageId);\n messageIdSeenByMeRef.current = lastMessage.messageId;\n }\n } catch (e) {\n console.log('onMessageSeen Error', lastMessage, e);\n }\n }, [showMessageStatus, onMessageSeen]);\n\n const scrollToBottom = useCallback((): void => {\n if (chatScrollDivRef.current) {\n chatScrollDivRef.current.scrollTop = chatScrollDivRef.current.scrollHeight;\n }\n setExistsNewChatMessage(false);\n setIsAtBottomOfScrollRef(true);\n sendMessageStatusIfAtBottom();\n }, [sendMessageStatusIfAtBottom]);\n\n const handleScrollToTheBottom = useCallback((): void => {\n if (!chatScrollDivRef.current) {\n return;\n }\n\n const atBottom =\n Math.ceil(chatScrollDivRef.current.scrollTop) >=\n chatScrollDivRef.current.scrollHeight - chatScrollDivRef.current.clientHeight;\n if (atBottom) {\n sendMessageStatusIfAtBottom();\n if (!isAtBottomOfScrollRef.current) {\n scrollToBottom();\n }\n }\n setIsAtBottomOfScrollRef(atBottom);\n }, [scrollToBottom, sendMessageStatusIfAtBottom]);\n\n // Infinite scrolling + threadInitialize function\n const fetchNewMessageWhenAtTop = useCallback(async () => {\n if (!isLoadingChatMessagesRef.current) {\n if (onLoadPreviousChatMessages) {\n isLoadingChatMessagesRef.current = true;\n try {\n // Fetch message until scrollTop reach the threshold for fetching new message\n while (\n !isAllChatMessagesLoadedRef.current &&\n chatScrollDivRef.current &&\n chatScrollDivRef.current.scrollTop <= 500\n ) {\n isAllChatMessagesLoadedRef.current = await onLoadPreviousChatMessages(numberOfChatMessagesToReload);\n await delay(200);\n }\n } finally {\n // Set isLoadingChatMessagesRef to false after messages are fetched\n isLoadingChatMessagesRef.current = false;\n }\n }\n }\n }, [numberOfChatMessagesToReload, onLoadPreviousChatMessages]);\n\n // The below 2 of useEffects are design for fixing infinite scrolling problem\n // Scrolling element will behave differently when scrollTop = 0(it sticks at the top)\n // we need to get previousTop before it prepend contents\n // Execute order [newMessage useEffect] => get previousTop => dom update => [messages useEffect]\n useEffect(() => {\n if (!chatScrollDivRef.current) {\n return;\n }\n previousTopRef.current = chatScrollDivRef.current.scrollTop;\n previousHeightRef.current = chatScrollDivRef.current.scrollHeight;\n }, [newMessages]);\n\n useEffect(() => {\n if (!chatScrollDivRef.current) {\n return;\n }\n chatScrollDivRef.current.scrollTop =\n chatScrollDivRef.current.scrollHeight - (previousHeightRef.current - previousTopRef.current);\n }, [messages]);\n\n // Fetch more messages to make the scroll bar appear, infinity scroll is then handled in the handleScroll function.\n useEffect(() => {\n fetchNewMessageWhenAtTop();\n }, [fetchNewMessageWhenAtTop]);\n\n /**\n * One time run useEffects. Sets up listeners when component is mounted and tears down listeners when component\n * unmounts unless these function changed\n */\n useEffect(() => {\n window && window.addEventListener('click', sendMessageStatusIfAtBottom);\n window && window.addEventListener('focus', sendMessageStatusIfAtBottom);\n return () => {\n window && window.removeEventListener('click', sendMessageStatusIfAtBottom);\n window && window.removeEventListener('focus', sendMessageStatusIfAtBottom);\n };\n }, [sendMessageStatusIfAtBottom]);\n\n useEffect(() => {\n const chatScrollDiv = chatScrollDivRef.current;\n chatScrollDiv?.addEventListener('scroll', handleScrollToTheBottom);\n chatScrollDiv?.addEventListener('scroll', fetchNewMessageWhenAtTop);\n\n return () => {\n chatScrollDiv?.removeEventListener('scroll', handleScrollToTheBottom);\n chatScrollDiv?.removeEventListener('scroll', fetchNewMessageWhenAtTop);\n };\n }, [fetchNewMessageWhenAtTop, handleScrollToTheBottom]);\n\n /**\n * ClientHeight controls the number of messages to render. However ClientHeight will not be initialized after the\n * first render (not sure but I guess Fluent is updating it in hook which is after render maybe?) so we need to\n * trigger a re-render until ClientHeight is initialized. This force re-render should only happen once.\n */\n const clientHeight = chatThreadRef.current?.clientHeight;\n useEffect(() => {\n if (clientHeight === undefined) {\n setForceUpdate(forceUpdate + 1);\n return;\n }\n // Only scroll to bottom if isAtBottomOfScrollRef is true\n isAtBottomOfScrollRef.current && scrollToBottom();\n }, [clientHeight, forceUpdate, scrollToBottom, chatMessagesInitialized]);\n\n /**\n * This needs to run to update latestPreviousChatMessage & latestCurrentChatMessage.\n * These two states are used to manipulate scrollbar\n */\n useEffect(() => {\n setLatestPreviousChatMessage(getLatestChatMessage(messagesRef.current));\n setLatestCurrentChatMessage(getLatestChatMessage(newMessages));\n setMessagesRef(newMessages);\n !chatMessagesInitializedRef.current && setChatMessagesInitializedRef(true);\n setLastDeliveredChatMessage(getLastChatMessageIdWithStatus(newMessages, 'delivered'));\n setLastSeenChatMessage(getLastChatMessageIdWithStatus(newMessages, 'seen'));\n setLastSendingChatMessage(getLastChatMessageIdWithStatus(newMessages, 'sending'));\n }, [newMessages]);\n\n /**\n * This needs to run after messages are rendererd so we can manipulate the scroll bar.\n */\n useEffect(() => {\n // If user just sent the latest message then we assume we can move user to bottom of scroll.\n if (\n isThereNewMessageNotFromCurrentUser(userId, latestPreviousChatMessage, latestCurrentChatMessage) &&\n !isAtBottomOfScrollRef.current\n ) {\n setExistsNewChatMessage(true);\n } else if (\n didUserSendTheLatestMessage(userId, latestPreviousChatMessage, latestCurrentChatMessage) ||\n isAtBottomOfScrollRef.current\n ) {\n scrollToBottom();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messages]);\n\n const participantCountRef = useRef(participantCount);\n const readReceiptsBySenderIdRef = useRef(readReceiptsBySenderId);\n\n participantCountRef.current = participantCount;\n readReceiptsBySenderIdRef.current = readReceiptsBySenderId;\n\n const onActionButtonClickMemo = useCallback(\n (message: ChatMessage, setMessageReadBy: (readBy: { id: string; displayName: string }[]) => void) => {\n if (participantCountRef.current && participantCountRef.current - 1 > 1 && readReceiptsBySenderIdRef.current) {\n setMessageReadBy(getParticipantsWhoHaveReadMessage(message, readReceiptsBySenderIdRef.current));\n }\n },\n []\n );\n\n const localeStrings = useLocale().strings.messageThread;\n const strings = useMemo(() => ({ ...localeStrings, ...props.strings }), [localeStrings, props.strings]);\n // To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp need to be regenerated)\n const defaultChatMessageRenderer = useCallback(\n (messageProps: MessageProps) => {\n if (\n messageProps.message.messageType === 'chat' ||\n /* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked'\n ) {\n return (\n <ChatMessageComponent\n {...messageProps}\n onRenderFileDownloads={onRenderFileDownloads}\n /* @conditional-compile-remove(file-sharing) */\n strings={strings}\n message={messageProps.message}\n userId={props.userId}\n remoteParticipantsCount={participantCount ? participantCount - 1 : 0}\n inlineAcceptRejectEditButtons={!isNarrow}\n onRenderAvatar={onRenderAvatar}\n showMessageStatus={showMessageStatus}\n messageStatus={messageProps.message.status}\n onActionButtonClick={onActionButtonClickMemo}\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString={onDisplayDateTimeString}\n />\n );\n }\n return <></>;\n },\n [\n onRenderFileDownloads,\n /* @conditional-compile-remove(file-sharing) */\n strings,\n props.userId,\n participantCount,\n isNarrow,\n onRenderAvatar,\n showMessageStatus,\n onActionButtonClickMemo,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString\n ]\n );\n\n const defaultStatusRenderer = useCallback(\n (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n status: MessageStatus,\n participantCount: number,\n readCount: number\n ) => {\n const onToggleToolTip = (isToggled: boolean): void => {\n if (isToggled && readReceiptsBySenderIdRef.current) {\n setReadCountForHoveredIndicator(\n getParticipantsWhoHaveReadMessage(message, readReceiptsBySenderIdRef.current).length\n );\n } else {\n setReadCountForHoveredIndicator(undefined);\n }\n };\n return (\n <MessageStatusIndicator\n status={status}\n readCount={readCount}\n onToggleToolTip={onToggleToolTip}\n // -1 because participant count does not include myself\n remoteParticipantsCount={participantCount ? participantCount - 1 : 0}\n />\n );\n },\n []\n );\n\n const theme = useTheme();\n\n const messagesToDisplay = useMemo(\n () =>\n memoizeAllMessages((memoizedMessageFn) => {\n return messages.map((message: Message, index: number): ShorthandValue<ChatItemProps> => {\n let key: string | undefined = message.messageId;\n let statusToRender: MessageStatus | undefined = undefined;\n\n if (\n message.messageType === 'chat' ||\n /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked'\n ) {\n if ((!message.messageId || message.messageId === '') && 'clientMessageId' in message) {\n key = message.clientMessageId;\n }\n if (showMessageStatus && message.mine) {\n switch (message.messageId) {\n case lastSeenChatMessage: {\n statusToRender = 'seen';\n break;\n }\n case lastSendingChatMessage: {\n statusToRender = 'sending';\n break;\n }\n case lastDeliveredChatMessage: {\n statusToRender = 'delivered';\n break;\n }\n }\n }\n if (message.mine && message.status === 'failed') {\n statusToRender = 'failed';\n }\n }\n\n return memoizedMessageFn(\n key ?? 'id_' + index,\n message,\n showMessageDate,\n showMessageStatus,\n onRenderAvatar,\n isNarrow,\n styles,\n onRenderMessageStatus,\n defaultStatusRenderer,\n defaultChatMessageRenderer,\n strings,\n theme,\n // Temporary solution to make sure we re-render if attach attribute is changed.\n // The proper fix should be in selector.\n message.messageType === 'chat' ||\n /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked'\n ? message.attached\n : undefined,\n statusToRender,\n participantCount,\n readCountForHoveredIndicator,\n onRenderMessage,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n props.disableEditing\n );\n });\n }),\n [\n messages,\n showMessageDate,\n showMessageStatus,\n onRenderAvatar,\n isNarrow,\n styles,\n onRenderMessageStatus,\n defaultStatusRenderer,\n defaultChatMessageRenderer,\n strings,\n theme,\n participantCount,\n readCountForHoveredIndicator,\n onRenderMessage,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n lastSeenChatMessage,\n lastSendingChatMessage,\n lastDeliveredChatMessage,\n props.disableEditing\n ]\n );\n\n const chatBody = useMemo(() => {\n return (\n <LiveAnnouncer>\n <Chat\n styles={mergeNorthstarThemes(chatStyle, linkStyles(theme), styles?.chatContainer ?? {})}\n items={messagesToDisplay}\n />\n </LiveAnnouncer>\n );\n }, [theme, styles?.chatContainer, messagesToDisplay]);\n\n return (\n <Ref innerRef={chatThreadRef}>\n <Stack className={mergeStyles(messageThreadContainerStyle, styles?.root)} grow>\n {/* Always ensure New Messages button is above the chat body element in the DOM tree. This is to ensure correct\n tab ordering. Because the New Messages button floats on top of the chat body it is in a higher z-index and\n thus Users should be able to tab navigate to the new messages button _before_ tab focus is taken to the chat body.*/}\n {existsNewChatMessage && !disableJumpToNewMessageButton && (\n <div className={mergeStyles(newMessageButtonContainerStyle, styles?.newMessageButtonContainer)}>\n {onRenderJumpToNewMessageButton ? (\n onRenderJumpToNewMessageButton({ text: strings.newMessagesIndicator, onClick: scrollToBottom })\n ) : (\n <DefaultJumpToNewMessageButton text={strings.newMessagesIndicator} onClick={scrollToBottom} />\n )}\n </div>\n )}\n\n <Ref innerRef={chatScrollDivRef}>{chatBody}</Ref>\n </Stack>\n </Ref>\n );\n};\n\nconst onRenderFileDownloadsTrampoline = (\n props: MessageThreadProps\n): ((userId: string, message: ChatMessage) => JSX.Element) | undefined => {\n /* @conditional-compile-remove(file-sharing) */\n return props.onRenderFileDownloads;\n return undefined;\n};\n\nconst linkStyles = (theme: Theme): ComponentSlotStyle => {\n return {\n '& a:link': {\n color: theme.palette.themePrimary\n },\n '& a:visited': {\n color: theme.palette.themeDarker\n },\n '& a:hover': {\n color: theme.palette.themeDarker\n },\n '& a:selected': {\n color: theme.palette.themeDarker\n }\n };\n};\n\"../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"MessageThread.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MessageThread.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EACL,IAAI,EAEJ,IAAI,EACJ,GAAG,EAEH,WAAW,IAAI,oBAAoB,EACpC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,aAAa,EACb,8BAA8B,EAC9B,2BAA2B,EAC3B,SAAS,EACT,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,oBAAoB,EACpB,+BAA+B,EAC/B,6BAA6B,EAC7B,2BAA2B,EAC3B,gBAAgB,EAChB,sBAAsB,EACtB,4BAA4B,EAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,IAAI,EAEJ,WAAW,EACX,OAAO,EACP,WAAW,EACX,aAAa,EACb,KAAK,EAGN,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,C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AED,oBAAC,GAAG,IAAC,QAAQ,EAAE,gBAAgB,IAAG,QAAQ,CAAO,CAC3C,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,+BAA+B,GAAG,CACtC,KAAyB,EAC4C,EAAE;IACvE,+CAA+C;IAC/C,OAAO,KAAK,CAAC,qBAAqB,CAAC;IACnC,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAY,EAAsB,EAAE;IACtD,OAAO;QACL,UAAU,EAAE;YACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;SAClC;QACD,aAAa,EAAE;YACb,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACjC;QACD,WAAW,EAAE;YACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACjC;QACD,cAAc,EAAE;YACd,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;SACjC;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n Chat,\n ChatItemProps,\n Flex,\n Ref,\n ShorthandValue,\n mergeStyles as mergeNorthstarThemes\n} from '@fluentui/react-northstar';\nimport {\n DownIconStyle,\n newMessageButtonContainerStyle,\n messageThreadContainerStyle,\n chatStyle,\n buttonWithIconStyles,\n newMessageButtonStyle,\n messageStatusContainerStyle,\n noMessageStatusStyle,\n defaultChatItemMessageContainer,\n defaultMyChatMessageContainer,\n defaultChatMessageContainer,\n gutterWithAvatar,\n gutterWithHiddenAvatar,\n FailedMyChatMessageContainer\n} from './styles/MessageThread.styles';\nimport {\n Icon,\n IStyle,\n mergeStyles,\n Persona,\n PersonaSize,\n PrimaryButton,\n Stack,\n IPersona,\n Theme\n} from '@fluentui/react';\nimport { ComponentSlotStyle } from '@fluentui/react-northstar';\nimport { LiveAnnouncer } from 'react-aria-live';\nimport { delay } from './utils/delay';\nimport {\n BaseCustomStyles,\n ChatMessage,\n CustomMessage,\n SystemMessage,\n CommunicationParticipant,\n OnRenderAvatarCallback,\n ParticipantAddedSystemMessage,\n ParticipantRemovedSystemMessage,\n Message,\n ReadReceiptsBySenderId\n} from '../types';\nimport { MessageStatusIndicator, MessageStatusIndicatorProps } from './MessageStatusIndicator';\nimport { memoizeFnAll, MessageStatus } from '@internal/acs-ui-common';\nimport { SystemMessage as SystemMessageComponent, SystemMessageIconTypes } from './SystemMessage';\nimport { ChatMessageComponent } from './ChatMessage/ChatMessageComponent';\nimport { useLocale } from '../localization/LocalizationProvider';\nimport { isNarrowWidth, _useContainerWidth } from './utils/responsive';\nimport { getParticipantsWhoHaveReadMessage } from './utils/getParticipantsWhoHaveReadMessage';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileDownloadHandler, FileMetadata } from './FileDownloadCards';\nimport { useTheme } from '../theming';\n\nconst isMessageSame = (first: ChatMessage, second: ChatMessage): boolean => {\n return (\n first.messageId === second.messageId &&\n first.content === second.content &&\n first.contentType === second.contentType &&\n JSON.stringify(first.createdOn) === JSON.stringify(second.createdOn) &&\n first.senderId === second.senderId &&\n first.senderDisplayName === second.senderDisplayName &&\n first.status === second.status\n );\n};\n\n/**\n * Get the latest message from the message array.\n *\n * @param messages\n */\nconst getLatestChatMessage = (messages: (ChatMessage | SystemMessage | CustomMessage)[]): ChatMessage | undefined => {\n for (let i = messages.length - 1; i >= 0; i--) {\n const message = messages[i];\n if (message.messageType === 'chat' && !!message.createdOn) {\n return message;\n }\n }\n return undefined;\n};\n\n/**\n * Compare latestMessageFromPreviousMessages & latestMessageFromNewMessages to see if the new message is not from\n * current user.\n */\nconst isThereNewMessageNotFromCurrentUser = (\n userId: string,\n latestMessageFromPreviousMessages?: ChatMessage,\n latestMessageFromNewMessages?: ChatMessage\n): boolean => {\n if (latestMessageFromNewMessages === undefined) {\n return false;\n }\n if (latestMessageFromPreviousMessages === undefined) {\n return latestMessageFromNewMessages.senderId !== userId;\n }\n return (\n !isMessageSame(latestMessageFromNewMessages, latestMessageFromPreviousMessages) &&\n latestMessageFromNewMessages.senderId !== userId\n );\n};\n\n/**\n * Returns true if the current user sent the latest message and false otherwise. It will ignore messages that have no\n * sender, messages that have failed to send, and messages from the current user that is marked as SEEN. This is meant\n * as an indirect way to detect if user is at bottom of the chat when the component updates with new messages. If we\n * updated this component due to current user sending a message we want to then call scrollToBottom.\n */\nconst didUserSendTheLatestMessage = (\n userId: string,\n latestMessageFromPreviousMessages?: ChatMessage,\n latestMessageFromNewMessages?: ChatMessage\n): boolean => {\n if (latestMessageFromNewMessages === undefined) {\n return false;\n }\n if (latestMessageFromPreviousMessages === undefined) {\n return latestMessageFromNewMessages.senderId === userId;\n }\n return (\n !isMessageSame(latestMessageFromNewMessages, latestMessageFromPreviousMessages) &&\n latestMessageFromNewMessages.senderId === userId\n );\n};\n\n/**\n * Fluent styles for {@link MessageThread}.\n *\n * @public\n */\nexport interface MessageThreadStyles extends BaseCustomStyles {\n /** Styles for load previous messages container. */\n loadPreviousMessagesButtonContainer?: IStyle;\n /** Styles for new message container. */\n newMessageButtonContainer?: IStyle;\n /** Styles for chat container. */\n chatContainer?: ComponentSlotStyle;\n /** styles for my chat items. */\n myChatItemMessageContainer?: ComponentSlotStyle;\n /** styles for chat items. */\n chatItemMessageContainer?: ComponentSlotStyle;\n /** Styles for my chat message container. */\n myChatMessageContainer?: ComponentSlotStyle;\n /** Styles for my chat message container in case of failure. */\n failedMyChatMessageContainer?: ComponentSlotStyle;\n /** Styles for chat message container. */\n chatMessageContainer?: ComponentSlotStyle;\n /** Styles for system message container. */\n systemMessageContainer?: ComponentSlotStyle;\n /** Styles for message status indicator container. */\n messageStatusContainer?: (mine: boolean) => IStyle;\n}\n\n/**\n * Strings of {@link MessageThread} that can be overridden.\n *\n * @public\n */\nexport interface MessageThreadStrings {\n /** String for Sunday */\n sunday: string;\n /** String for Monday */\n monday: string;\n /** String for Tuesday */\n tuesday: string;\n /** String for Wednesday */\n wednesday: string;\n /** String for Thursday */\n thursday: string;\n /** String for Friday */\n friday: string;\n /** String for Saturday */\n saturday: string;\n /** String for Yesterday */\n yesterday: string;\n /** String for participants joined */\n participantJoined: string;\n /** String for participants left */\n participantLeft: string;\n /** Tag shown on a message that has been edited */\n editedTag: string;\n /** String for editing message in floating menu */\n editMessage: string;\n /** String for removing message in floating menu */\n removeMessage: string;\n /** String for resending failed message in floating menu */\n resendMessage?: string;\n /** String for indicating failed to send messages */\n failToSendTag?: string;\n /** String for LiveMessage introduction for the Chat Message */\n liveAuthorIntro: string;\n /** String for aria text of remote user's message content */\n messageContentAriaText: string;\n /** String for aria text of local user's message content */\n messageContentMineAriaText: string;\n /** String for warning on text limit exceeded in EditBox*/\n editBoxTextLimit: string;\n /** String for placeholder text in EditBox when there is no user input*/\n editBoxPlaceholderText: string;\n /** String for new messages indicator*/\n newMessagesIndicator: string;\n /** String for showing message read status in floating menu */\n messageReadCount?: string;\n /** String for replacing display name when there is none*/\n noDisplayNameSub: string;\n /** String for Cancel button in EditBox*/\n editBoxCancelButton: string;\n /** String for Submit in EditBox when there is no user input*/\n editBoxSubmitButton: string;\n /** String for action menu indicating there are more options */\n actionMenuMoreOptions?: string;\n /* @conditional-compile-remove(file-sharing) */\n /** String for download file button in file card */\n downloadFile: string;\n}\n\n/**\n * Arguments for {@link MessageThreadProps.onRenderJumpToNewMessageButton}.\n *\n * @public\n */\nexport interface JumpToNewMessageButtonProps {\n /** String for button text */\n text: string;\n /** Callback for when button is clicked */\n onClick: () => void;\n}\n\nconst DefaultJumpToNewMessageButton = (props: JumpToNewMessageButtonProps): JSX.Element => {\n const { text, onClick } = props;\n return (\n <PrimaryButton\n className={newMessageButtonStyle}\n styles={buttonWithIconStyles}\n text={text}\n onClick={onClick}\n onRenderIcon={() => <Icon iconName=\"Down\" className={DownIconStyle} />}\n />\n );\n};\n\nconst generateParticipantsStr = (participants: CommunicationParticipant[], defaultName: string): string =>\n participants\n .map(\n (participant) =>\n `${!participant.displayName || participant.displayName === '' ? defaultName : participant.displayName}`\n )\n .join(', ');\n\n/**\n * A component to render a single message.\n *\n * @public\n */\nexport type MessageRenderer = (props: MessageProps) => JSX.Element;\n\nconst ParticipantSystemMessageComponent = ({\n message,\n style,\n defaultName\n}: {\n message: ParticipantAddedSystemMessage | ParticipantRemovedSystemMessage;\n style?: ComponentSlotStyle;\n defaultName: string;\n}): JSX.Element => {\n const { strings } = useLocale();\n const participantsStr = generateParticipantsStr(message.participants, defaultName);\n const messageSuffix =\n message.systemMessageType === 'participantAdded'\n ? strings.messageThread.participantJoined\n : strings.messageThread.participantLeft;\n\n if (participantsStr !== '') {\n return (\n <SystemMessageComponent\n iconName={(message.iconName ? message.iconName : '') as SystemMessageIconTypes}\n content={`${participantsStr} ${messageSuffix}`}\n containerStyle={style}\n />\n );\n }\n return <></>;\n};\n\nconst DefaultSystemMessage: MessageRenderer = (props: MessageProps) => {\n const message = props.message;\n switch (message.messageType) {\n case 'system':\n switch (message.systemMessageType) {\n case 'content':\n return (\n <SystemMessageComponent\n iconName={(message.iconName ? message.iconName : '') as SystemMessageIconTypes}\n content={message.content ?? ''}\n containerStyle={props?.messageContainerStyle}\n />\n );\n case 'participantAdded':\n case 'participantRemoved':\n return (\n <ParticipantSystemMessageComponent\n message={message}\n style={props.messageContainerStyle}\n defaultName={props.strings.noDisplayNameSub}\n />\n );\n }\n }\n return <></>;\n};\n\nconst memoizeAllMessages = memoizeFnAll(\n (\n _messageKey: string,\n message: Message,\n showMessageDate: boolean,\n showMessageStatus: boolean,\n onRenderAvatar: OnRenderAvatarCallback | undefined,\n shouldOverlapAvatarAndMessage: boolean,\n styles: MessageThreadStyles | undefined,\n onRenderMessageStatus:\n | ((messageStatusIndicatorProps: MessageStatusIndicatorProps) => JSX.Element | null)\n | undefined,\n defaultStatusRenderer: (\n message: ChatMessage,\n status: MessageStatus,\n participantCount: number,\n readCount: number\n ) => JSX.Element,\n defaultChatMessageRenderer: (message: MessageProps) => JSX.Element,\n strings: MessageThreadStrings,\n theme: Theme,\n _attached?: boolean | string,\n statusToRender?: MessageStatus,\n participantCount?: number,\n readCount?: number,\n onRenderMessage?: (message: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element,\n onUpdateMessage?: UpdateMessageCallback,\n onDeleteMessage?: (messageId: string) => Promise<void>,\n onSendMessage?: (content: string) => Promise<void>,\n disableEditing?: boolean\n ): ShorthandValue<ChatItemProps> => {\n const messageProps: MessageProps = {\n message,\n strings,\n showDate: showMessageDate,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n disableEditing\n };\n\n switch (message.messageType) {\n case 'chat': {\n const myChatMessageStyle =\n message.status === 'failed'\n ? styles?.failedMyChatMessageContainer ?? styles?.myChatMessageContainer ?? FailedMyChatMessageContainer\n : styles?.myChatMessageContainer ?? defaultMyChatMessageContainer;\n const chatMessageStyle = styles?.chatMessageContainer ?? defaultChatMessageContainer(theme);\n messageProps.messageContainerStyle = message.mine ? myChatMessageStyle : chatMessageStyle;\n\n const chatMessageComponent =\n onRenderMessage === undefined\n ? defaultChatMessageRenderer(messageProps)\n : onRenderMessage(messageProps, defaultChatMessageRenderer);\n\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: message.senderDisplayName,\n showOverflowTooltip: false\n };\n\n const chatItemMessageStyle =\n (message.mine ? styles?.myChatItemMessageContainer : styles?.chatItemMessageContainer) ||\n defaultChatItemMessageContainer(shouldOverlapAvatarAndMessage);\n\n const chatGutterStyles =\n message.attached === 'top' || message.attached === false ? gutterWithAvatar : gutterWithHiddenAvatar;\n\n return {\n gutter: {\n styles: chatGutterStyles,\n content: message.mine ? (\n ''\n ) : onRenderAvatar ? (\n onRenderAvatar(message.senderId ?? '', personaOptions)\n ) : (\n <Persona {...personaOptions} />\n )\n },\n contentPosition: message.mine ? 'end' : 'start',\n message: {\n styles: chatItemMessageStyle,\n content: (\n <Flex hAlign={message.mine ? 'end' : undefined} vAlign=\"end\">\n {chatMessageComponent}\n <div\n className={mergeStyles(\n messageStatusContainerStyle(message.mine ?? false),\n styles?.messageStatusContainer ? styles.messageStatusContainer(message.mine ?? false) : ''\n )}\n >\n {showMessageStatus && statusToRender ? (\n onRenderMessageStatus ? (\n onRenderMessageStatus({ status: statusToRender })\n ) : (\n defaultStatusRenderer(message, statusToRender, participantCount ?? 0, readCount ?? 0)\n )\n ) : (\n <div className={mergeStyles(noMessageStatusStyle)} />\n )}\n </div>\n </Flex>\n )\n },\n attached: message.attached,\n key: _messageKey\n };\n }\n\n case 'system': {\n messageProps.messageContainerStyle = styles?.systemMessageContainer;\n const systemMessageComponent =\n onRenderMessage === undefined ? (\n <DefaultSystemMessage {...messageProps} />\n ) : (\n onRenderMessage(messageProps, (props) => <DefaultSystemMessage {...props} />)\n );\n return {\n children: systemMessageComponent,\n key: _messageKey\n };\n }\n\n default: {\n // We do not handle custom type message by default, users can handle custom type by using onRenderMessage function.\n const customMessageComponent = onRenderMessage === undefined ? <></> : onRenderMessage(messageProps);\n return {\n children: customMessageComponent,\n key: _messageKey\n };\n }\n }\n }\n);\n\nconst getLastChatMessageIdWithStatus = (messages: Message[], status: MessageStatus): string | undefined => {\n for (let i = messages.length - 1; i >= 0; i--) {\n const message = messages[i];\n if (message.messageType === 'chat' && message.status === status && message.mine) {\n return message.messageId;\n }\n }\n return undefined;\n};\n\n/**\n * @public\n * Callback function run when a message is updated.\n */\nexport type UpdateMessageCallback = (\n messageId: string,\n content: string,\n /* @conditional-compile-remove(file-sharing) */\n metadata?: Record<string, string>,\n /* @conditional-compile-remove(file-sharing) */\n options?: {\n attachedFilesMetadata?: FileMetadata[];\n }\n) => Promise<void>;\n\n/**\n * Props for {@link MessageThread}.\n *\n * @public\n */\nexport type MessageThreadProps = {\n /**\n * UserId of the current user.\n */\n userId: string;\n /**\n * Messages to render in message thread. A message can be of type `ChatMessage`, `SystemMessage` or `CustomMessage`.\n */\n messages: (ChatMessage | SystemMessage | CustomMessage)[];\n /**\n * number of participants in the thread\n */\n participantCount?: number;\n /**\n * read receipts for each sender in the chat\n */\n readReceiptsBySenderId?: ReadReceiptsBySenderId;\n /**\n * Allows users to pass an object containing custom CSS styles.\n * @Example\n * ```\n * <MessageThread styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: MessageThreadStyles;\n /**\n * Whether the new message button is disabled or not.\n *\n * @defaultValue `false`\n */\n disableJumpToNewMessageButton?: boolean;\n /**\n * Whether the date of each message is displayed or not.\n * It is ignored when onDisplayDateTimeString is supplied.\n *\n * @defaultValue `false`\n */\n showMessageDate?: boolean;\n /**\n * Whether the status indicator for each message is displayed or not.\n *\n * @defaultValue `false`\n */\n showMessageStatus?: boolean;\n /**\n * Number of chat messages to reload each time onLoadPreviousChatMessages is called.\n *\n * @defaultValue 0\n */\n numberOfChatMessagesToReload?: number;\n /**\n * Optional callback to override actions on message being seen.\n *\n * @param messageId - message Id\n */\n onMessageSeen?: (messageId: string) => Promise<void>;\n /**\n * Optional callback to override render of the message status indicator.\n *\n * @param messageStatusIndicatorProps - props of type MessageStatusIndicatorProps\n */\n onRenderMessageStatus?: (messageStatusIndicatorProps: MessageStatusIndicatorProps) => JSX.Element | null;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Optional callback to override render of the button for jumping to the new message.\n *\n * @param newMessageButtonProps - button props of type JumpToNewMessageButtonProps\n */\n onRenderJumpToNewMessageButton?: (newMessageButtonProps: JumpToNewMessageButtonProps) => JSX.Element;\n /**\n * Optional callback to override loading of previous messages.\n * It accepts the number of history chat messages that we want to load and return a boolean Promise indicating if we have got all the history messages.\n * If the promise resolves to `true`, we have load all chat messages into the message thread and `loadPreviousMessagesButton` will not be rendered anymore.\n */\n onLoadPreviousChatMessages?: (messagesToLoad: number) => Promise<boolean>;\n /**\n * Optional callback to override render of a message.\n *\n * @param messageProps - props of type {@link communication-react#MessageProps}\n * @param defaultOnRender - default render of type {@link communication-react#MessageRenderer}\n *\n * @remarks\n * `messageRenderer` is not provided for `CustomMessage` and thus only available for `ChatMessage` and `SystemMessage`.\n */\n onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Optional callback to render uploaded files in the message component.\n * @beta\n */\n onRenderFileDownloads?: (userId: string, message: ChatMessage) => JSX.Element;\n /**\n * Optional callback to edit a message.\n *\n * @param messageId - message id from chatClient\n * @param content - new content of the message\n *\n */\n onUpdateMessage?: UpdateMessageCallback;\n\n /**\n * Optional callback to delete a message.\n *\n * @param messageId - message id from chatClient\n *\n */\n onDeleteMessage?: (messageId: string) => Promise<void>;\n\n /**\n * Optional callback to send a message.\n *\n * @param content - message body to send\n *\n */\n onSendMessage?: (content: string) => Promise<void>;\n\n /**\n /**\n * Disable editing messages.\n *\n * @remarks This removes the action menu on messages.\n *\n * @defaultValue `false`\n */\n disableEditing?: boolean;\n\n /**\n * Optional strings to override in component\n */\n strings?: Partial<MessageThreadStrings>;\n\n /* @conditional-compile-remove(file-sharing) */\n /**\n * @beta\n * Optional function called when someone clicks on the file download icon.\n * If file attachments are defined in the `message.metadata` property using the `fileSharingMetadata` key,\n * this function will be called with the data inside `fileSharingMetadata` key.\n */\n fileDownloadHandler?: FileDownloadHandler;\n\n /* @conditional-compile-remove(date-time-customization) */\n /**\n * Optional function to provide customized date format.\n * @beta\n */\n onDisplayDateTimeString?: (messageDate: Date) => string;\n};\n\n/**\n * Props to render a single message.\n *\n * See {@link MessageRenderer}.\n *\n * @public\n */\nexport type MessageProps = {\n /**\n * Message to render. It can type `ChatMessage` or `SystemMessage` or `CustomMessage`.\n */\n message: Message;\n /**\n * Strings from parent MessageThread component\n */\n strings: MessageThreadStrings;\n /**\n * Custom CSS styles for chat message container.\n */\n messageContainerStyle?: ComponentSlotStyle;\n /**\n * Whether the date of a message is displayed or not.\n *\n * @defaultValue `false`\n */\n showDate?: boolean;\n /**\n * Disable editing messages.\n *\n * @remarks This removes the action menu on messages.\n *\n * @defaultValue `false`\n */\n disableEditing?: boolean;\n /**\n * Optional callback to edit a message.\n *\n * @param messageId - message id from chatClient\n * @param content - new content of the message\n */\n onUpdateMessage?: UpdateMessageCallback;\n\n /**\n * Optional callback to delete a message.\n *\n * @param messageId - message id from chatClient\n *\n */\n onDeleteMessage?: (messageId: string) => Promise<void>;\n\n /**\n * Optional callback to send a message.\n *\n * @param messageId - message id from chatClient\n *\n */\n onSendMessage?: (messageId: string) => Promise<void>;\n};\n\n/**\n * `MessageThread` allows you to easily create a component for rendering chat messages, handling scrolling behavior of new/old messages and customizing icons & controls inside the chat thread.\n * @param props - of type MessageThreadProps\n *\n * Users will need to provide at least chat messages and userId to render the `MessageThread` component.\n * Users can also customize `MessageThread` by passing in their own Avatar, `MessageStatusIndicator` icon, `JumpToNewMessageButton`, `LoadPreviousMessagesButton` and the behavior of these controls.\n *\n * `MessageThread` internally uses the `Chat` & `Chat.Message` component from `@fluentui/react-northstar`. You can checkout the details about these [two components](https://fluentsite.z22.web.core.windows.net/0.53.0/components/chat/props).\n *\n * @public\n */\nexport const MessageThread = (props: MessageThreadProps): JSX.Element => {\n const {\n messages: newMessages,\n userId,\n participantCount,\n readReceiptsBySenderId,\n styles,\n disableJumpToNewMessageButton = false,\n showMessageDate = false,\n showMessageStatus = false,\n numberOfChatMessagesToReload = 5,\n onMessageSeen,\n onRenderMessageStatus,\n onRenderAvatar,\n onLoadPreviousChatMessages,\n onRenderJumpToNewMessageButton,\n onRenderMessage,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString\n } = props;\n const onRenderFileDownloads = onRenderFileDownloadsTrampoline(props);\n\n const [messages, setMessages] = useState<(ChatMessage | SystemMessage | CustomMessage)[]>([]);\n // We need this state to wait for one tick and scroll to bottom after messages have been initialized.\n // Otherwise chatScrollDivRef.current.clientHeight is wrong if we scroll to bottom before messages are initialized.\n const [chatMessagesInitialized, setChatMessagesInitialized] = useState<boolean>(false);\n const [isAtBottomOfScroll, setIsAtBottomOfScroll] = useState<boolean>(true);\n const [forceUpdate, setForceUpdate] = useState<number>(0);\n\n // Used to decide if should auto scroll to bottom or show \"new message\" button\n const [latestPreviousChatMessage, setLatestPreviousChatMessage] = useState<ChatMessage | undefined>(undefined);\n const [latestCurrentChatMessage, setLatestCurrentChatMessage] = useState<ChatMessage | undefined>(undefined);\n const [existsNewChatMessage, setExistsNewChatMessage] = useState<boolean>(false);\n\n const [lastSeenChatMessage, setLastSeenChatMessage] = useState<string | undefined>(undefined);\n const [lastDeliveredChatMessage, setLastDeliveredChatMessage] = useState<string | undefined>(undefined);\n const [lastSendingChatMessage, setLastSendingChatMessage] = useState<string | undefined>(undefined);\n\n // readCount and participantCount will only need to be updated on-fly when user hover on an indicator\n const [readCountForHoveredIndicator, setReadCountForHoveredIndicator] = useState<number | undefined>(undefined);\n\n const isAllChatMessagesLoadedRef = useRef(false);\n // isAllChatMessagesLoadedRef needs to be updated every time when a new adapter is set in order to display correct data\n // onLoadPreviousChatMessages is updated when a new adapter is set\n useEffect(() => {\n if (onLoadPreviousChatMessages) {\n isAllChatMessagesLoadedRef.current = false;\n }\n }, [onLoadPreviousChatMessages]);\n\n const previousTopRef = useRef<number>(-1);\n const previousHeightRef = useRef<number>(-1);\n\n const messageIdSeenByMeRef = useRef<string>('');\n\n const chatScrollDivRef = useRef<HTMLElement>(null);\n const chatThreadRef = useRef<HTMLElement>(null);\n const isLoadingChatMessagesRef = useRef(false);\n\n // When the chat thread is narrow, we perform space optimizations such as overlapping\n // the avatar on top of the chat message and moving the chat accept/reject edit buttons\n // to a new line\n const chatThreadWidth = _useContainerWidth(chatThreadRef);\n const isNarrow = chatThreadWidth ? isNarrowWidth(chatThreadWidth) : false;\n\n const messagesRef = useRef(messages);\n const setMessagesRef = (messagesWithAttachedValue: (ChatMessage | SystemMessage | CustomMessage)[]): void => {\n messagesRef.current = messagesWithAttachedValue;\n setMessages(messagesWithAttachedValue);\n };\n\n const isAtBottomOfScrollRef = useRef(isAtBottomOfScroll);\n const setIsAtBottomOfScrollRef = (isAtBottomOfScrollValue: boolean): void => {\n isAtBottomOfScrollRef.current = isAtBottomOfScrollValue;\n setIsAtBottomOfScroll(isAtBottomOfScrollValue);\n };\n\n const chatMessagesInitializedRef = useRef(chatMessagesInitialized);\n const setChatMessagesInitializedRef = (chatMessagesInitialized: boolean): void => {\n chatMessagesInitializedRef.current = chatMessagesInitialized;\n setChatMessagesInitialized(chatMessagesInitialized);\n };\n\n // we try to only send those message status if user is scrolled to the bottom.\n const sendMessageStatusIfAtBottom = useCallback(async (): Promise<void> => {\n if (\n !isAtBottomOfScrollRef.current ||\n !document.hasFocus() ||\n !messagesRef.current ||\n messagesRef.current.length === 0 ||\n !showMessageStatus\n ) {\n return;\n }\n const messagesWithId = messagesRef.current.filter((message) => {\n return message.messageType === 'chat' && !message.mine && !!message.messageId;\n });\n if (messagesWithId.length === 0) {\n return;\n }\n const lastMessage: ChatMessage = messagesWithId[messagesWithId.length - 1] as ChatMessage;\n try {\n if (\n onMessageSeen &&\n lastMessage &&\n lastMessage.messageId &&\n lastMessage.messageId !== messageIdSeenByMeRef.current\n ) {\n await onMessageSeen(lastMessage.messageId);\n messageIdSeenByMeRef.current = lastMessage.messageId;\n }\n } catch (e) {\n console.log('onMessageSeen Error', lastMessage, e);\n }\n }, [showMessageStatus, onMessageSeen]);\n\n const scrollToBottom = useCallback((): void => {\n if (chatScrollDivRef.current) {\n chatScrollDivRef.current.scrollTop = chatScrollDivRef.current.scrollHeight;\n }\n setExistsNewChatMessage(false);\n setIsAtBottomOfScrollRef(true);\n sendMessageStatusIfAtBottom();\n }, [sendMessageStatusIfAtBottom]);\n\n const handleScrollToTheBottom = useCallback((): void => {\n if (!chatScrollDivRef.current) {\n return;\n }\n\n const atBottom =\n Math.ceil(chatScrollDivRef.current.scrollTop) >=\n chatScrollDivRef.current.scrollHeight - chatScrollDivRef.current.clientHeight;\n if (atBottom) {\n sendMessageStatusIfAtBottom();\n if (!isAtBottomOfScrollRef.current) {\n scrollToBottom();\n }\n }\n setIsAtBottomOfScrollRef(atBottom);\n }, [scrollToBottom, sendMessageStatusIfAtBottom]);\n\n // Infinite scrolling + threadInitialize function\n const fetchNewMessageWhenAtTop = useCallback(async () => {\n if (!isLoadingChatMessagesRef.current) {\n if (onLoadPreviousChatMessages) {\n isLoadingChatMessagesRef.current = true;\n try {\n // Fetch message until scrollTop reach the threshold for fetching new message\n while (\n !isAllChatMessagesLoadedRef.current &&\n chatScrollDivRef.current &&\n chatScrollDivRef.current.scrollTop <= 500\n ) {\n isAllChatMessagesLoadedRef.current = await onLoadPreviousChatMessages(numberOfChatMessagesToReload);\n await delay(200);\n }\n } finally {\n // Set isLoadingChatMessagesRef to false after messages are fetched\n isLoadingChatMessagesRef.current = false;\n }\n }\n }\n }, [numberOfChatMessagesToReload, onLoadPreviousChatMessages]);\n\n // The below 2 of useEffects are design for fixing infinite scrolling problem\n // Scrolling element will behave differently when scrollTop = 0(it sticks at the top)\n // we need to get previousTop before it prepend contents\n // Execute order [newMessage useEffect] => get previousTop => dom update => [messages useEffect]\n useEffect(() => {\n if (!chatScrollDivRef.current) {\n return;\n }\n previousTopRef.current = chatScrollDivRef.current.scrollTop;\n previousHeightRef.current = chatScrollDivRef.current.scrollHeight;\n }, [newMessages]);\n\n useEffect(() => {\n if (!chatScrollDivRef.current) {\n return;\n }\n chatScrollDivRef.current.scrollTop =\n chatScrollDivRef.current.scrollHeight - (previousHeightRef.current - previousTopRef.current);\n }, [messages]);\n\n // Fetch more messages to make the scroll bar appear, infinity scroll is then handled in the handleScroll function.\n useEffect(() => {\n fetchNewMessageWhenAtTop();\n }, [fetchNewMessageWhenAtTop]);\n\n /**\n * One time run useEffects. Sets up listeners when component is mounted and tears down listeners when component\n * unmounts unless these function changed\n */\n useEffect(() => {\n window && window.addEventListener('click', sendMessageStatusIfAtBottom);\n window && window.addEventListener('focus', sendMessageStatusIfAtBottom);\n return () => {\n window && window.removeEventListener('click', sendMessageStatusIfAtBottom);\n window && window.removeEventListener('focus', sendMessageStatusIfAtBottom);\n };\n }, [sendMessageStatusIfAtBottom]);\n\n useEffect(() => {\n const chatScrollDiv = chatScrollDivRef.current;\n chatScrollDiv?.addEventListener('scroll', handleScrollToTheBottom);\n chatScrollDiv?.addEventListener('scroll', fetchNewMessageWhenAtTop);\n\n return () => {\n chatScrollDiv?.removeEventListener('scroll', handleScrollToTheBottom);\n chatScrollDiv?.removeEventListener('scroll', fetchNewMessageWhenAtTop);\n };\n }, [fetchNewMessageWhenAtTop, handleScrollToTheBottom]);\n\n /**\n * ClientHeight controls the number of messages to render. However ClientHeight will not be initialized after the\n * first render (not sure but I guess Fluent is updating it in hook which is after render maybe?) so we need to\n * trigger a re-render until ClientHeight is initialized. This force re-render should only happen once.\n */\n const clientHeight = chatThreadRef.current?.clientHeight;\n useEffect(() => {\n if (clientHeight === undefined) {\n setForceUpdate(forceUpdate + 1);\n return;\n }\n // Only scroll to bottom if isAtBottomOfScrollRef is true\n isAtBottomOfScrollRef.current && scrollToBottom();\n }, [clientHeight, forceUpdate, scrollToBottom, chatMessagesInitialized]);\n\n /**\n * This needs to run to update latestPreviousChatMessage & latestCurrentChatMessage.\n * These two states are used to manipulate scrollbar\n */\n useEffect(() => {\n setLatestPreviousChatMessage(getLatestChatMessage(messagesRef.current));\n setLatestCurrentChatMessage(getLatestChatMessage(newMessages));\n setMessagesRef(newMessages);\n !chatMessagesInitializedRef.current && setChatMessagesInitializedRef(true);\n setLastDeliveredChatMessage(getLastChatMessageIdWithStatus(newMessages, 'delivered'));\n setLastSeenChatMessage(getLastChatMessageIdWithStatus(newMessages, 'seen'));\n setLastSendingChatMessage(getLastChatMessageIdWithStatus(newMessages, 'sending'));\n }, [newMessages]);\n\n /**\n * This needs to run after messages are rendererd so we can manipulate the scroll bar.\n */\n useEffect(() => {\n // If user just sent the latest message then we assume we can move user to bottom of scroll.\n if (\n isThereNewMessageNotFromCurrentUser(userId, latestPreviousChatMessage, latestCurrentChatMessage) &&\n !isAtBottomOfScrollRef.current\n ) {\n setExistsNewChatMessage(true);\n } else if (\n didUserSendTheLatestMessage(userId, latestPreviousChatMessage, latestCurrentChatMessage) ||\n isAtBottomOfScrollRef.current\n ) {\n scrollToBottom();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messages]);\n\n const participantCountRef = useRef(participantCount);\n const readReceiptsBySenderIdRef = useRef(readReceiptsBySenderId);\n\n participantCountRef.current = participantCount;\n readReceiptsBySenderIdRef.current = readReceiptsBySenderId;\n\n const onActionButtonClickMemo = useCallback(\n (message: ChatMessage, setMessageReadBy: (readBy: { id: string; displayName: string }[]) => void) => {\n if (participantCountRef.current && participantCountRef.current - 1 > 1 && readReceiptsBySenderIdRef.current) {\n setMessageReadBy(getParticipantsWhoHaveReadMessage(message, readReceiptsBySenderIdRef.current));\n }\n },\n []\n );\n\n const localeStrings = useLocale().strings.messageThread;\n const strings = useMemo(() => ({ ...localeStrings, ...props.strings }), [localeStrings, props.strings]);\n // To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp need to be regenerated)\n const defaultChatMessageRenderer = useCallback(\n (messageProps: MessageProps) => {\n if (messageProps.message.messageType === 'chat') {\n return (\n <ChatMessageComponent\n {...messageProps}\n onRenderFileDownloads={onRenderFileDownloads}\n /* @conditional-compile-remove(file-sharing) */\n strings={strings}\n message={messageProps.message}\n userId={props.userId}\n remoteParticipantsCount={participantCount ? participantCount - 1 : 0}\n inlineAcceptRejectEditButtons={!isNarrow}\n onRenderAvatar={onRenderAvatar}\n showMessageStatus={showMessageStatus}\n messageStatus={messageProps.message.status}\n onActionButtonClick={onActionButtonClickMemo}\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString={onDisplayDateTimeString}\n />\n );\n }\n return <></>;\n },\n [\n onRenderFileDownloads,\n /* @conditional-compile-remove(file-sharing) */\n strings,\n props.userId,\n participantCount,\n isNarrow,\n onRenderAvatar,\n showMessageStatus,\n onActionButtonClickMemo,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString\n ]\n );\n\n const defaultStatusRenderer = useCallback(\n (message: ChatMessage, status: MessageStatus, participantCount: number, readCount: number) => {\n const onToggleToolTip = (isToggled: boolean): void => {\n if (isToggled && readReceiptsBySenderIdRef.current) {\n setReadCountForHoveredIndicator(\n getParticipantsWhoHaveReadMessage(message, readReceiptsBySenderIdRef.current).length\n );\n } else {\n setReadCountForHoveredIndicator(undefined);\n }\n };\n return (\n <MessageStatusIndicator\n status={status}\n readCount={readCount}\n onToggleToolTip={onToggleToolTip}\n // -1 because participant count does not include myself\n remoteParticipantsCount={participantCount ? participantCount - 1 : 0}\n />\n );\n },\n []\n );\n\n const theme = useTheme();\n\n const messagesToDisplay = useMemo(\n () =>\n memoizeAllMessages((memoizedMessageFn) => {\n return messages.map((message: Message, index: number): ShorthandValue<ChatItemProps> => {\n let key: string | undefined = message.messageId;\n let statusToRender: MessageStatus | undefined = undefined;\n\n if (message.messageType === 'chat') {\n if (!message.messageId || message.messageId === '') {\n key = message.clientMessageId;\n }\n if (showMessageStatus && message.mine) {\n switch (message.messageId) {\n case lastSeenChatMessage: {\n statusToRender = 'seen';\n break;\n }\n case lastSendingChatMessage: {\n statusToRender = 'sending';\n break;\n }\n case lastDeliveredChatMessage: {\n statusToRender = 'delivered';\n break;\n }\n }\n }\n if (message.mine && message.status === 'failed') {\n statusToRender = 'failed';\n }\n }\n\n return memoizedMessageFn(\n key ?? 'id_' + index,\n message,\n showMessageDate,\n showMessageStatus,\n onRenderAvatar,\n isNarrow,\n styles,\n onRenderMessageStatus,\n defaultStatusRenderer,\n defaultChatMessageRenderer,\n strings,\n theme,\n // Temporary solution to make sure we re-render if attach attribute is changed.\n // The proper fix should be in selector.\n message.messageType === 'chat' ? message.attached : undefined,\n statusToRender,\n participantCount,\n readCountForHoveredIndicator,\n onRenderMessage,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n props.disableEditing\n );\n });\n }),\n [\n messages,\n showMessageDate,\n showMessageStatus,\n onRenderAvatar,\n isNarrow,\n styles,\n onRenderMessageStatus,\n defaultStatusRenderer,\n defaultChatMessageRenderer,\n strings,\n theme,\n participantCount,\n readCountForHoveredIndicator,\n onRenderMessage,\n onUpdateMessage,\n onDeleteMessage,\n onSendMessage,\n lastSeenChatMessage,\n lastSendingChatMessage,\n lastDeliveredChatMessage,\n props.disableEditing\n ]\n );\n\n const chatBody = useMemo(() => {\n return (\n <LiveAnnouncer>\n <Chat\n styles={mergeNorthstarThemes(chatStyle, linkStyles(theme), styles?.chatContainer ?? {})}\n items={messagesToDisplay}\n />\n </LiveAnnouncer>\n );\n }, [theme, styles?.chatContainer, messagesToDisplay]);\n\n return (\n <Ref innerRef={chatThreadRef}>\n <Stack className={mergeStyles(messageThreadContainerStyle, styles?.root)} grow>\n {/* Always ensure New Messages button is above the chat body element in the DOM tree. This is to ensure correct\n tab ordering. Because the New Messages button floats on top of the chat body it is in a higher z-index and\n thus Users should be able to tab navigate to the new messages button _before_ tab focus is taken to the chat body.*/}\n {existsNewChatMessage && !disableJumpToNewMessageButton && (\n <div className={mergeStyles(newMessageButtonContainerStyle, styles?.newMessageButtonContainer)}>\n {onRenderJumpToNewMessageButton ? (\n onRenderJumpToNewMessageButton({ text: strings.newMessagesIndicator, onClick: scrollToBottom })\n ) : (\n <DefaultJumpToNewMessageButton text={strings.newMessagesIndicator} onClick={scrollToBottom} />\n )}\n </div>\n )}\n\n <Ref innerRef={chatScrollDivRef}>{chatBody}</Ref>\n </Stack>\n </Ref>\n );\n};\n\nconst onRenderFileDownloadsTrampoline = (\n props: MessageThreadProps\n): ((userId: string, message: ChatMessage) => JSX.Element) | undefined => {\n /* @conditional-compile-remove(file-sharing) */\n return props.onRenderFileDownloads;\n return undefined;\n};\n\nconst linkStyles = (theme: Theme): ComponentSlotStyle => {\n return {\n '& a:link': {\n color: theme.palette.themePrimary\n },\n '& a:visited': {\n color: theme.palette.themeDarker\n },\n '& a:hover': {\n color: theme.palette.themeDarker\n },\n '& a:selected': {\n color: theme.palette.themeDarker\n }\n };\n};\n\"../../../acs-ui-common/src\""]}
@@ -91,5 +91,4 @@ export { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEff
91
91
  export type { _VideoBackgroundEffectsPickerProps, _VideoBackgroundEffectChoiceOption, _VideoBackgroundEffectsPickerStyles } from './VideoEffects/VideoBackgroundEffectsPicker';
92
92
  export type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';
93
93
  export * from './CaptionsBanner';
94
- export * from './Caption';
95
94
  //# sourceMappingURL=index.d.ts.map
@@ -50,5 +50,4 @@ export { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';
50
50
  export { _VideoEffectsItemNoBackground, _VideoEffectsItemBlur, _VideoEffectsItemAddImage } from './VideoEffects/PresetVideoEffectsItems';
51
51
  export { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';
52
52
  export * from './CaptionsBanner';
53
- export * from './Caption';
54
53
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAWhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;A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,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAM/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAS5F,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n/* @conditional-compile-remove(file-sharing) */\nexport type { ActiveFileUpload } from './SendBox';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback\n} from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type { VideoGalleryProps, VideoGalleryStrings, VideoGalleryStyles, VideoGalleryLayout } from './VideoGallery';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from './VideoGallery';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps } from './VideoTile';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(file-sharing) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\nexport * from './FileCard';\nexport * from './FileCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './FileDownloadCards';\nexport type { _FileUploadCardsStrings } from './FileUploadCards';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\n\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n\nexport * from './CaptionsBanner';\nexport * from './Caption';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC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iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAG5C,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAM/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAS5F,cAAc,kBAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n/* @conditional-compile-remove(file-sharing) */\nexport type { ActiveFileUpload } from './SendBox';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback\n} from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type { VideoGalleryProps, VideoGalleryStrings, VideoGalleryStyles, VideoGalleryLayout } from './VideoGallery';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from './VideoGallery';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps } from './VideoTile';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(file-sharing) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\nexport * from './FileCard';\nexport * from './FileCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './FileDownloadCards';\nexport type { _FileUploadCardsStrings } from './FileUploadCards';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\n\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n\nexport * from './CaptionsBanner';\n"]}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @private
3
+ */
4
+ export declare const gridContainerClassName: string;
5
+ /**
6
+ * @private
7
+ */
8
+ export declare const displayNameClassName: string;
9
+ /**
10
+ * @private
11
+ */
12
+ export declare const captionClassName: string;
13
+ //# sourceMappingURL=CaptionsBanner.style.d.ts.map
@@ -0,0 +1,35 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { mergeStyles } from '@fluentui/react';
4
+ import { _pxToRem } from "../../../../acs-ui-common/src";
5
+ /**
6
+ * @private
7
+ */
8
+ export const gridContainerClassName = mergeStyles({
9
+ overflowY: 'scroll',
10
+ overflowX: 'hidden',
11
+ width: '100%',
12
+ height: _pxToRem(60),
13
+ display: 'grid',
14
+ gridTemplateColumns: 'auto 1fr',
15
+ alignItems: 'stretch',
16
+ columnGap: _pxToRem(16),
17
+ padding: _pxToRem(8)
18
+ });
19
+ /**
20
+ * @private
21
+ */
22
+ export const displayNameClassName = mergeStyles({
23
+ fontWeight: 600,
24
+ fontSize: _pxToRem(12),
25
+ lineHeight: _pxToRem(30)
26
+ });
27
+ /**
28
+ * @private
29
+ */
30
+ export const captionClassName = mergeStyles({
31
+ fontWeight: 400,
32
+ fontSize: _pxToRem(16),
33
+ lineHeight: _pxToRem(30)
34
+ });
35
+ //# sourceMappingURL=CaptionsBanner.style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaptionsBanner.style.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/CaptionsBanner.style.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,sCAAgC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC;IAChD,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM;IACf,mBAAmB,EAAE,UAAU;IAC/B,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC;IACvB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAC1C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const gridContainerClassName = mergeStyles({\n overflowY: 'scroll',\n overflowX: 'hidden',\n width: '100%',\n height: _pxToRem(60),\n display: 'grid',\n gridTemplateColumns: 'auto 1fr',\n alignItems: 'stretch',\n columnGap: _pxToRem(16),\n padding: _pxToRem(8)\n});\n\n/**\n * @private\n */\nexport const displayNameClassName = mergeStyles({\n fontWeight: 600,\n fontSize: _pxToRem(12),\n lineHeight: _pxToRem(30)\n});\n\n/**\n * @private\n */\nexport const captionClassName = mergeStyles({\n fontWeight: 400,\n fontSize: _pxToRem(16),\n lineHeight: _pxToRem(30)\n});\n\"../../../../acs-ui-common/src\""]}