@azure/communication-react 1.14.1-alpha-202403290012 → 1.15.0-alpha-202404030013

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 (192) hide show
  1. package/dist/communication-react.d.ts +125 -218
  2. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CH6WvEGZ.js → RichTextSendBoxWrapper-B8qxZi1I.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CH6WvEGZ.js.map → RichTextSendBoxWrapper-B8qxZi1I.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{index-qxnuqL7s.js → index-aOBAWcNI.js} +1018 -874
  5. package/dist/dist-cjs/communication-react/index-aOBAWcNI.js.map +1 -0
  6. package/dist/dist-cjs/communication-react/index.js +2 -1
  7. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  10. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +4 -4
  11. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  12. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +4 -0
  13. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +6 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  15. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.d.ts +1 -1
  16. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.js +2 -2
  17. package/dist/dist-esm/calling-stateful-client/src/ReactionSubscriber.js.map +1 -1
  18. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +20 -20
  19. package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
  20. package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
  21. package/dist/dist-esm/communication-react/src/index.js +2 -0
  22. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/AttachmentCard.d.ts +0 -4
  24. package/dist/dist-esm/react-components/src/components/AttachmentCard.js +4 -1
  25. package/dist/dist-esm/react-components/src/components/AttachmentCard.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.d.ts +5 -36
  27. package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js +17 -26
  28. package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +6 -10
  30. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js +2 -2
  32. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/EndCallButton.d.ts +10 -1
  34. package/dist/dist-esm/react-components/src/components/EndCallButton.js +93 -51
  35. package/dist/dist-esm/react-components/src/components/EndCallButton.js.map +1 -1
  36. package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +2 -2
  37. package/dist/dist-esm/react-components/src/components/ReactionButton.js +12 -15
  38. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +2 -2
  40. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +6 -6
  41. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +6 -6
  43. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +25 -25
  44. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/SendBox.d.ts +6 -6
  46. package/dist/dist-esm/react-components/src/components/SendBox.js +18 -18
  47. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +8 -0
  49. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
  50. package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
  51. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +8 -4
  52. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +4 -4
  54. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -1
  55. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -0
  56. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +22 -1
  57. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -2
  59. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.d.ts +3 -3
  61. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +16 -9
  62. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.d.ts +2 -1
  64. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js +10 -12
  65. package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +1 -1
  67. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -2
  68. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +1 -0
  70. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +3 -1
  71. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -1
  73. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +2 -2
  74. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  75. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +4 -3
  76. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  77. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +3 -3
  78. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +7 -7
  79. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/components/utils/common.d.ts +1 -1
  81. package/dist/dist-esm/react-components/src/components/utils/common.js +1 -1
  82. package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
  83. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +3 -1
  85. package/dist/dist-esm/react-components/src/types/Attachment.d.ts +22 -95
  86. package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
  87. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +2 -2
  88. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +24 -0
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +3 -4
  92. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js +0 -7
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +2 -0
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js +66 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +1 -3
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  100. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +2 -2
  101. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +3 -3
  102. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  103. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +8 -8
  104. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +21 -21
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +8 -8
  107. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +8 -8
  109. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +15 -15
  110. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -3
  112. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -2
  113. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +2 -2
  115. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +2 -33
  118. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +26 -18
  119. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +2 -2
  121. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  122. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.d.ts +47 -0
  123. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js +179 -0
  124. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js.map +1 -0
  125. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +9 -9
  126. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +30 -30
  127. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  128. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +5 -5
  129. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  130. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.d.ts +2 -2
  131. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +8 -8
  132. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  133. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/{FileUpload.d.ts → AttachmentUpload.d.ts} +11 -11
  134. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/{FileUpload.js → AttachmentUpload.js} +13 -13
  135. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -0
  136. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.d.ts +38 -0
  137. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/{FileUploadButton.js → AttachmentUploadButton.js} +14 -12
  138. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -0
  139. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +4 -4
  140. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +2 -2
  141. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
  142. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +2 -3
  143. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  144. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.d.ts +29 -0
  145. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.js +12 -0
  146. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/attachmentUploadsSelector.js.map +1 -0
  147. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +2 -2
  148. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +2 -2
  149. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  150. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +26 -9
  151. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  152. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +6 -2
  153. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  154. package/dist/dist-esm/react-composites/src/composites/common/SendBox.js +5 -5
  155. package/dist/dist-esm/react-composites/src/composites/common/SendBox.js.map +1 -1
  156. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +8 -2
  157. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  158. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +4 -0
  159. package/dist/dist-esm/react-composites/src/composites/common/utils.js +6 -0
  160. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  161. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +1 -1
  162. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +1 -1
  163. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +1 -1
  164. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +1 -1
  165. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +7 -1
  166. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +1 -1
  167. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +1 -1
  168. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +1 -1
  169. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +1 -1
  170. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +1 -1
  171. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +1 -1
  172. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +1 -1
  173. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +1 -1
  174. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +1 -1
  175. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +1 -1
  176. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +1 -1
  177. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +1 -1
  178. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +1 -1
  179. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +1 -1
  180. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +1 -1
  181. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +1 -1
  182. package/package.json +7 -7
  183. package/dist/dist-cjs/communication-react/index-qxnuqL7s.js.map +0 -1
  184. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +0 -48
  185. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +0 -160
  186. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +0 -1
  187. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +0 -1
  188. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.d.ts +0 -36
  189. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +0 -1
  190. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +0 -27
  191. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +0 -12
  192. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ReactionOverlay.style.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/ReactionOverlay.style.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2CAA2C;AAC3C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE7D,2CAA2C;AAC3C;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,QAAgB;IAC/D,OAAO,QAAQ,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,2CAA2C;AAC3C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,QAAgB;IAC7D,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAED,2CAA2C;AAC3C;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAa,EACb,eAAuB,EACvB,yBAAkC,IAAI;IAEtC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAExE,4FAA4F;IAC5F,8EAA8E;IAC9E,wFAAwF;IACxF,+CAA+C;IAC/C,MAAM,SAAS,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxD,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;QACpB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,qDAAqD;IACrD,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACxC,OAAO,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,e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;KAC5B,CAAC;AACJ,CAAC,CAAC;AAEF,2CAA2C;AAC3C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC,CAAC,WAAW,EAAE,aAAa,EAAE,EAAE,CACzE,SAAS,CAAC;IACR,IAAI,EAAE;QACJ,kBAAkB,EAAE,SAAS;KAC9B;IACD,EAAE,EAAE;QACF,kBAAkB,EAAE,QAAQ,WAAW,GAAG,aAAa,IAAI;KAC5D;CACF,CAAC,CACH,CAAC;AAEF,2CAA2C;AAC3C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,WAAmB,EACnB,aAAqB,EACrB,QAAgB,EACK,EAAE;IACvB,OAAO;QACL,MAAM,EAAE,GAAG,aAAa,IAAI;QAC5B,KAAK,EAAE,GAAG,aAAa,IAAI;QAC3B,eAAe,EAAE,OAAO,QAAQ,GAAG;QACnC,gBAAgB,EAAE,WAAW;QAC7B,aAAa,EAAE,YAAY,CAAC,WAAW,EAAE,aAAa,CAAC;QACvD,iBAAiB,EAAE,GAAG,WAAW,GAAG,EAAE,GAAG;QACzC,iBAAiB,EAAE,UAAU;QAC7B,uBAAuB,EAAE,UAAU;QACnC,uBAAuB,EAAE,SAAS,WAAW,GAAG;QAChD,cAAc,EAAE,GAAG,aAAa,MAAM,WAAW,GAAG,aAAa,IAAI;QACrE,SAAS,EAAE,SAAS,aAAa,OAAO;KACzC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport { keyframes, memoizeFunction } from '@fluentui/react';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Generate random float between two numbers, including min and max\n * @private\n */\nexport function getRandomFloat(minValue: number, maxValue: number): number {\n return minValue + Math.random() * (maxValue - minValue);\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Generate random int between two numbers, including min and max\n * @private\n */\nexport function getRandomInt(minValue: number, maxValue: number): number {\n return Math.floor(getRandomFloat(minValue, maxValue + 1));\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Calculate the start position for a new reaction in the prescriptive wave pattern\n * @private\n */\nexport function generateStartPositionWave(\n index: number,\n halfCanvasWidth: number,\n isOriginAtCanvasCenter: boolean = true\n): number {\n const midPointCoordinate = isOriginAtCanvasCenter ? halfCanvasWidth : 0;\n\n // If the # of reactions on the screen is 0 or a multiple of 25, then we set direction to 0.\n // Otherwise, every other reaction goes right, left in alternating directions.\n // To get alternating sequence, we take n % 2 (which gives 0 or 1), multiple result by 2\n // and subtract 1, which will result in -1 or 1\n const direction = index === 0 ? 0 : (index % 2) * 2 - 1;\n if (direction === 0) {\n return midPointCoordinate;\n }\n\n // Now we get how far the reaction starts from center\n const adjustment = scaleStartPos(index);\n return midPointCoordinate + direction * adjustment * halfCanvasWidth;\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const reactionOverlayStyle: React.CSSProperties = {\n bottom: '0',\n height: '50%',\n pointerEvents: 'none',\n position: 'absolute',\n width: '100%'\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport function getReactionMovementStyle(reactionXPoint: number): React.CSSProperties {\n return {\n position: 'absolute',\n left: `${reactionXPoint}px`\n };\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Scale metric to determine the start position of a reaction in presentation mode to avoid overlap.\n * @private\n */\nfunction scaleStartPos(index: number): number {\n switch (index) {\n case 1:\n case 2:\n return 0.3;\n case 3:\n case 4:\n return 0.6;\n case 5:\n case 6:\n return 0.9;\n case 7:\n case 8:\n return 0.75;\n case 9:\n case 18:\n return 0.375;\n case 10:\n case 23:\n return 0.525;\n case 11:\n case 16:\n return 0.15;\n case 12:\n case 15:\n return 0.225;\n case 13:\n case 14:\n return 0.075;\n case 17:\n case 24:\n return 0.45;\n case 19:\n case 20:\n return 0.675;\n case 21:\n case 22:\n return 0.825;\n default:\n return 0;\n }\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nconst ReactionStyleBuckets: Array<IReactionStyleBucket> = [\n {\n sizeScale: 1,\n heightMaxScale: 1 * 0.95,\n opacityMax: 1\n },\n {\n sizeScale: 0.9,\n heightMaxScale: 0.7 * 0.95,\n opacityMax: 0.9\n },\n {\n sizeScale: 0.8,\n heightMaxScale: 0.4 * 0.95,\n opacityMax: 0.8\n }\n];\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nconst ReactionBurstStyleBuckets: Array<IReactionStyleBucket> = [\n {\n sizeScale: 0.6,\n opacityMax: 0.75,\n heightMaxScale: 0.93,\n heightMinScale: 0.27\n },\n {\n sizeScale: 0.6,\n opacityMax: 0.75,\n heightMaxScale: 0.8,\n heightMinScale: 0.13\n },\n {\n sizeScale: 0.6,\n opacityMax: 0.75,\n heightMaxScale: 0.67,\n heightMinScale: 0\n }\n];\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport interface IReactionStyleBucket {\n sizeScale: number;\n opacityMax: number;\n heightMaxScale: number;\n heightMinScale?: number;\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Return a style bucket based on the number of active sprites.\n * For example, the first three reactions should appear at maximum\n * height, width, and opacity.\n * @private\n */\nexport function getReactionStyleBucket(activeSpritesCount: number): IReactionStyleBucket {\n const index = activeSpritesCount < 3 ? 0 : activeSpritesCount < 5 ? getRandomInt(0, 1) : getRandomInt(0, 2);\n return ReactionStyleBuckets[index];\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Return a style bucket for burst scenario\n * @private\n */\nexport function getReactionBurstStyleBucket(): IReactionStyleBucket {\n const index = getRandomInt(0, ReactionBurstStyleBuckets.length - 1);\n return ReactionBurstStyleBuckets[index];\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const moveFrames = memoizeFunction((maxHeight, travelHeight) =>\n keyframes({\n '0%': {\n transform: `translateY(${maxHeight}px)`\n },\n '100%': {\n transform: `translateY(${travelHeight}px)`\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const moveAnimationStyles = (maxHeight: number, travelHeight: number): React.CSSProperties => {\n return {\n animationName: moveFrames(maxHeight, travelHeight),\n animationFillMode: 'forwards',\n animationDuration: `4.133s`,\n animationTimingFunction: 'cubic-bezier(0, 0.83, 0.19, 1.09)'\n };\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const opacityTransition = memoizeFunction((maxOpacity) =>\n keyframes({\n '0%': {\n opacity: 0\n },\n '31.2%': {\n opacity: maxOpacity\n },\n '67.2%': {\n opacity: maxOpacity\n },\n '100%': {\n opacity: 0,\n display: 'none',\n visibility: 'hidden'\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const opacityAnimationStyles = (maxOpacity: number): React.CSSProperties => {\n return {\n animationName: opacityTransition(maxOpacity),\n animationFillMode: 'forwards',\n animationDuration: `4.133s`\n };\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const spriteFrames = memoizeFunction((numOfFrames, displaySizePx) =>\n keyframes({\n from: {\n backgroundPosition: '0px 0px'\n },\n to: {\n backgroundPosition: `0px -${numOfFrames * displaySizePx}px`\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const spriteAnimationStyles = (\n numOfFrames: number,\n displaySizePx: number,\n imageUrl: string\n): React.CSSProperties => {\n return {\n height: `${displaySizePx}px`,\n width: `${displaySizePx}px`,\n backgroundImage: `url(${imageUrl})`,\n backgroundRepeat: 'no-repeat',\n animationName: spriteFrames(numOfFrames, displaySizePx),\n animationDuration: `${numOfFrames / 24}s`,\n animationFillMode: `forwards`,\n animationIterationCount: 'infinite',\n animationTimingFunction: `steps(${numOfFrames})`,\n backgroundSize: `${displaySizePx}px ${numOfFrames * displaySizePx}px`,\n transform: `scale(${displaySizePx}/128)`\n };\n};\n"]}
1
+ {"version":3,"file":"ReactionOverlay.style.js","sour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AO;QACL,MAAM,EAAE,GAAG,aAAa,IAAI;QAC5B,KAAK,EAAE,GAAG,aAAa,IAAI;QAC3B,eAAe,EAAE,OAAO,QAAQ,GAAG;QACnC,gBAAgB,EAAE,WAAW;QAC7B,aAAa,EAAE,YAAY,CAAC,WAAW,EAAE,aAAa,CAAC;QACvD,iBAAiB,EAAE,GAAG,WAAW,GAAG,EAAE,GAAG;QACzC,iBAAiB,EAAE,UAAU;QAC7B,uBAAuB,EAAE,UAAU;QACnC,uBAAuB,EAAE,SAAS,WAAW,GAAG;QAChD,cAAc,EAAE,GAAG,aAAa,MAAM,WAAW,GAAG,aAAa,IAAI;QACrE,SAAS,EAAE,SAAS,aAAa,OAAO;KACzC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport { keyframes, memoizeFunction } from '@fluentui/react';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Generate random float between two numbers, including min and max\n * @private\n */\nexport function getRandomFloat(minValue: number, maxValue: number): number {\n return minValue + Math.random() * (maxValue - minValue);\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Generate random int between two numbers, including min and max\n * @private\n */\nexport function getRandomInt(minValue: number, maxValue: number): number {\n return Math.floor(getRandomFloat(minValue, maxValue + 1));\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Calculate the start position for a new reaction in the prescriptive wave pattern\n * @private\n */\nexport function generateStartPositionWave(\n index: number,\n halfCanvasWidth: number,\n isOriginAtCanvasCenter: boolean = true\n): number {\n const midPointCoordinate = isOriginAtCanvasCenter ? halfCanvasWidth : 0;\n\n // If the # of reactions on the screen is 0 or a multiple of 25, then we set direction to 0.\n // Otherwise, every other reaction goes right, left in alternating directions.\n // To get alternating sequence, we take n % 2 (which gives 0 or 1), multiple result by 2\n // and subtract 1, which will result in -1 or 1\n const direction = index === 0 ? 0 : (index % 2) * 2 - 1;\n if (direction === 0) {\n return midPointCoordinate;\n }\n\n // Now we get how far the reaction starts from center\n const adjustment = scaleStartPos(index);\n return midPointCoordinate + direction * adjustment * halfCanvasWidth;\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const reactionOverlayStyle: React.CSSProperties = {\n bottom: '0',\n height: '50%',\n pointerEvents: 'none',\n position: 'absolute',\n width: '100%'\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport function getReactionMovementStyle(reactionXPoint: number): React.CSSProperties {\n return {\n position: 'absolute',\n left: `${reactionXPoint}px`\n };\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Scale metric to determine the start position of a reaction in presentation mode to avoid overlap.\n * @private\n */\nfunction scaleStartPos(index: number): number {\n switch (index) {\n case 1:\n case 2:\n return 0.3;\n case 3:\n case 4:\n return 0.6;\n case 5:\n case 6:\n return 0.9;\n case 7:\n case 8:\n return 0.75;\n case 9:\n case 18:\n return 0.375;\n case 10:\n case 23:\n return 0.525;\n case 11:\n case 16:\n return 0.15;\n case 12:\n case 15:\n return 0.225;\n case 13:\n case 14:\n return 0.075;\n case 17:\n case 24:\n return 0.45;\n case 19:\n case 20:\n return 0.675;\n case 21:\n case 22:\n return 0.825;\n default:\n return 0;\n }\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * We have only one bucket item for presentation style of the reaction animation.\n * We are choosing to keep the array so that, in future, with styles needed to get updated, one\n * can add new styles and apply from here, rather than updating over the same style. Later we can remove\n * the old ones.\n * It is for the ease of testing and implementation.\n * @private\n */\nconst ReactionStyleBuckets: Array<IReactionStyleBucket> = [\n {\n sizeScale: 0.9,\n heightMaxScale: 0.7 * 0.95,\n opacityMax: 0.9\n }\n];\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nconst ReactionBurstStyleBuckets: Array<IReactionStyleBucket> = [\n {\n sizeScale: 0.6,\n opacityMax: 0.75,\n heightMaxScale: 0.93,\n heightMinScale: 0.27\n },\n {\n sizeScale: 0.6,\n opacityMax: 0.75,\n heightMaxScale: 0.8,\n heightMinScale: 0.13\n },\n {\n sizeScale: 0.6,\n opacityMax: 0.75,\n heightMaxScale: 0.67,\n heightMinScale: 0\n }\n];\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport interface IReactionStyleBucket {\n sizeScale: number;\n opacityMax: number;\n heightMaxScale: number;\n heightMinScale?: number;\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Return a style bucket based on the number of active sprites.\n * For example, the first three reactions should appear at maximum\n * height, width, and opacity.\n * @private\n */\nexport function getReactionStyleBucket(): IReactionStyleBucket {\n // Having dynamic emoji size on rendering animation impacts performance of the animation itself.\n // So we are choosing to use a fixed size for all cases.\n const index = 0;\n return ReactionStyleBuckets[index];\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Return a style bucket for burst scenario\n * We can utilize this style when we allow more than 50 reactions at a time. Can be configured through ECS.\n * @private\n */\nexport function getReactionBurstStyleBucket(): IReactionStyleBucket {\n const index = getRandomInt(0, ReactionBurstStyleBuckets.length - 1);\n return ReactionBurstStyleBuckets[index];\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const moveFrames = memoizeFunction((maxHeight, travelHeight) =>\n keyframes({\n '0%': {\n transform: `translateY(${maxHeight}px)`\n },\n '100%': {\n transform: `translateY(${travelHeight}px)`\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const moveAnimationStyles = (maxHeight: number, travelHeight: number): React.CSSProperties => {\n return {\n animationName: moveFrames(maxHeight, travelHeight),\n animationFillMode: 'forwards',\n animationDuration: `4.133s`,\n animationTimingFunction: 'cubic-bezier(0, 0.83, 0.19, 1.09)'\n };\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const opacityTransition = memoizeFunction((maxOpacity) =>\n keyframes({\n '0%': {\n opacity: 0\n },\n '31.2%': {\n opacity: maxOpacity\n },\n '67.2%': {\n opacity: maxOpacity\n },\n '100%': {\n opacity: 0,\n display: 'none',\n visibility: 'hidden'\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const opacityAnimationStyles = (maxOpacity: number): React.CSSProperties => {\n return {\n animationName: opacityTransition(maxOpacity),\n animationFillMode: 'forwards',\n animationDuration: `4.133s`\n };\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const spriteFrames = memoizeFunction((numOfFrames, displaySizePx) =>\n keyframes({\n from: {\n backgroundPosition: '0px 0px'\n },\n to: {\n backgroundPosition: `0px -${numOfFrames * displaySizePx}px`\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const spriteAnimationStyles = (\n numOfFrames: number,\n displaySizePx: number,\n imageUrl: string\n): React.CSSProperties => {\n return {\n height: `${displaySizePx}px`,\n width: `${displaySizePx}px`,\n backgroundImage: `url(${imageUrl})`,\n backgroundRepeat: 'no-repeat',\n animationName: spriteFrames(numOfFrames, displaySizePx),\n animationDuration: `${numOfFrames / 24}s`,\n animationFillMode: `forwards`,\n animationIterationCount: 'infinite',\n animationTimingFunction: `steps(${numOfFrames})`,\n backgroundSize: `${displaySizePx}px ${numOfFrames * displaySizePx}px`,\n transform: `scale(${displaySizePx}/128)`\n };\n};\n"]}
@@ -28,7 +28,7 @@ export declare const sendButtonStyle: string;
28
28
  export declare const sendIconStyle: (props: {
29
29
  theme: Theme;
30
30
  hasText: boolean;
31
- hasFile: boolean;
31
+ hasAttachment: boolean;
32
32
  disabled?: boolean;
33
33
  hasErrorMessage: boolean;
34
34
  customSendIconStyle?: IStyle;
@@ -33,9 +33,9 @@ export const sendButtonStyle = mergeStyles({
33
33
  */
34
34
  export const sendIconStyle = (props) => {
35
35
  const { theme, hasText, disabled = false,
36
- /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ hasFile, hasErrorMessage, customSendIconStyle, defaultTextColor = theme.palette.neutralTertiary } = props;
36
+ /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ hasAttachment, hasErrorMessage, customSendIconStyle, defaultTextColor = theme.palette.neutralTertiary } = props;
37
37
  const hasNoContent = !hasText &&
38
- /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ !hasFile;
38
+ /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ !hasAttachment;
39
39
  return mergeStyles(editorTextBoxButtonStyle, {
40
40
  color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary
41
41
  }, customSendIconStyle);
@@ -1 +1 @@
1
- {"version":3,"file":"SendBox.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/SendBox.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAS,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACtF,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,QAAQ;IAClB;;OAEG;IACH,oBAAoB,EAAE;QACpB,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACzC,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;CACjB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAQ7B,EAAU,EAAE;IACX,MAAM,EACJ,KAAK,EACL,OAAO,EACP,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,kBAAkB,GAAG,CAAC,KAKlC,EAAU,EAAE;IACX,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IACvE,MAAM,WAAW,GAAG,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAC1F,MAAM,iBAAiB,GAAG,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;IAExG,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wCAAwC,CAAC;IAChF,MAAM,qBAAqB,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,sCAAsC,CAAC;IAEpF,OAAO;QACL,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc;QAC1C,MAAM,EAAE,GAAG,eAAe,aAAa,WAAW,EAAE;QAEpD,mHAAmH;QACnH,uHAAuH;QACvH,MAAM,EAAE,GAAG,sCAAsC,GAAG,eAAe,KAAK;QAExE,wCAAwC,EAAE;YACxC,MAAM,EAAE,GAAG,qBAAqB,aAAa,iBAAiB,EAAE;YAChE,MAAM,EAAE,GAAG,sCAAsC,GAAG,qBAAqB,KAAK;SAC/E;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, mergeStyles, Theme } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const suppressIconStyle = {\n iconContainer: { minHeight: '0', minWidth: '0', height: '0', width: '0', margin: '0' },\n icon: { display: 'none' }\n};\n\n/**\n * @private\n */\nexport const sendBoxWrapperStyles = mergeStyles({\n margin: '0.25rem',\n overflow: 'hidden',\n /**\n * margin-top set for all the child components of sendbox except first\n */\n ':not(:first-child)': {\n marginTop: '0.25rem'\n }\n});\n\n/**\n * @private\n */\nexport const sendButtonStyle = mergeStyles({\n height: '2.25rem',\n width: '2.25rem'\n});\n\n/**\n * @private\n */\nexport const sendIconStyle = (props: {\n theme: Theme;\n hasText: boolean;\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ hasFile: boolean;\n disabled?: boolean;\n hasErrorMessage: boolean;\n customSendIconStyle?: IStyle;\n defaultTextColor?: string;\n}): string => {\n const {\n theme,\n hasText,\n disabled = false,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ hasFile,\n hasErrorMessage,\n customSendIconStyle,\n defaultTextColor = theme.palette.neutralTertiary\n } = props;\n const hasNoContent =\n !hasText &&\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ !hasFile;\n return mergeStyles(\n editorTextBoxButtonStyle,\n {\n color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary\n },\n customSendIconStyle\n );\n};\n\n/**\n * @private\n */\nexport const editorTextBoxButtonStyle: IStyle = {\n width: '1.25rem',\n height: '1.25rem',\n margin: 'auto'\n};\n\n/**\n * @private\n */\nexport const attachmentUploadCardsStyles = mergeStyles({\n margin: '0 0.25rem 0.25rem 0.25rem',\n maxHeight: '12.5rem',\n overflow: 'auto'\n});\n\n/**\n * @private\n */\nexport const attachmentCardBoxStyle = mergeStyles({\n width: '100%',\n padding: '0.50rem'\n});\n\n/**\n * @private\n */\nexport const defaultSendBoxInactiveBorderThicknessREM = 0.0625;\n/**\n * @private\n */\nexport const defaultSendBoxActiveBorderThicknessREM = 0.125;\n\n/**\n * @private\n */\nexport const borderAndBoxShadowStyle = (props: {\n theme: Theme;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): string => {\n return mergeStyles(borderEditBoxStyle({ ...props, defaultBorderColor: props.theme.palette.neutralSecondary }));\n};\n\n/**\n * @private\n */\nexport const borderEditBoxStyle = (props: {\n theme: Theme;\n defaultBorderColor?: string;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): IStyle => {\n const { theme, hasErrorMessage, disabled, defaultBorderColor } = props;\n const borderColor = hasErrorMessage ? theme.semanticColors.errorText : defaultBorderColor;\n const borderColorActive = hasErrorMessage ? theme.semanticColors.errorText : theme.palette.themePrimary;\n\n const borderThickness = disabled ? 0 : defaultSendBoxInactiveBorderThicknessREM;\n const borderActiveThickness = disabled ? 0 : defaultSendBoxActiveBorderThicknessREM;\n\n return {\n borderRadius: theme.effects.roundedCorner4,\n border: `${borderThickness}rem solid ${borderColor}`,\n\n // The border thickness of the sendbox wrapper changes on hover, to prevent the border thickness change causing the\n // input box to shift we apply a margin to compensate. This margin is then removed on hover when the border is thicker.\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderThickness}rem`,\n\n ':hover, :active, :focus, :focus-within': {\n border: `${borderActiveThickness}rem solid ${borderColorActive}`,\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderActiveThickness}rem`\n }\n };\n};\n"]}
1
+ {"version":3,"file":"SendBox.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/SendBox.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,WAAW,EAAS,MAAM,iBAAiB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACtF,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,QAAQ;IAClB;;OAEG;IACH,oBAAoB,EAAE;QACpB,SAAS,EAAE,SAAS;KACrB;CACF,CAAC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entui/react';\n\n/**\n * @private\n */\nexport const suppressIconStyle = {\n iconContainer: { minHeight: '0', minWidth: '0', height: '0', width: '0', margin: '0' },\n icon: { display: 'none' }\n};\n\n/**\n * @private\n */\nexport const sendBoxWrapperStyles = mergeStyles({\n margin: '0.25rem',\n overflow: 'hidden',\n /**\n * margin-top set for all the child components of sendbox except first\n */\n ':not(:first-child)': {\n marginTop: '0.25rem'\n }\n});\n\n/**\n * @private\n */\nexport const sendButtonStyle = mergeStyles({\n height: '2.25rem',\n width: '2.25rem'\n});\n\n/**\n * @private\n */\nexport const sendIconStyle = (props: {\n theme: Theme;\n hasText: boolean;\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ hasAttachment: boolean;\n disabled?: boolean;\n hasErrorMessage: boolean;\n customSendIconStyle?: IStyle;\n defaultTextColor?: string;\n}): string => {\n const {\n theme,\n hasText,\n disabled = false,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ hasAttachment,\n hasErrorMessage,\n customSendIconStyle,\n defaultTextColor = theme.palette.neutralTertiary\n } = props;\n const hasNoContent =\n !hasText &&\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ !hasAttachment;\n return mergeStyles(\n editorTextBoxButtonStyle,\n {\n color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary\n },\n customSendIconStyle\n );\n};\n\n/**\n * @private\n */\nexport const editorTextBoxButtonStyle: IStyle = {\n width: '1.25rem',\n height: '1.25rem',\n margin: 'auto'\n};\n\n/**\n * @private\n */\nexport const attachmentUploadCardsStyles = mergeStyles({\n margin: '0 0.25rem 0.25rem 0.25rem',\n maxHeight: '12.5rem',\n overflow: 'auto'\n});\n\n/**\n * @private\n */\nexport const attachmentCardBoxStyle = mergeStyles({\n width: '100%',\n padding: '0.50rem'\n});\n\n/**\n * @private\n */\nexport const defaultSendBoxInactiveBorderThicknessREM = 0.0625;\n/**\n * @private\n */\nexport const defaultSendBoxActiveBorderThicknessREM = 0.125;\n\n/**\n * @private\n */\nexport const borderAndBoxShadowStyle = (props: {\n theme: Theme;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): string => {\n return mergeStyles(borderEditBoxStyle({ ...props, defaultBorderColor: props.theme.palette.neutralSecondary }));\n};\n\n/**\n * @private\n */\nexport const borderEditBoxStyle = (props: {\n theme: Theme;\n defaultBorderColor?: string;\n hasErrorMessage: boolean;\n disabled: boolean;\n}): IStyle => {\n const { theme, hasErrorMessage, disabled, defaultBorderColor } = props;\n const borderColor = hasErrorMessage ? theme.semanticColors.errorText : defaultBorderColor;\n const borderColorActive = hasErrorMessage ? theme.semanticColors.errorText : theme.palette.themePrimary;\n\n const borderThickness = disabled ? 0 : defaultSendBoxInactiveBorderThicknessREM;\n const borderActiveThickness = disabled ? 0 : defaultSendBoxActiveBorderThicknessREM;\n\n return {\n borderRadius: theme.effects.roundedCorner4,\n border: `${borderThickness}rem solid ${borderColor}`,\n\n // The border thickness of the sendbox wrapper changes on hover, to prevent the border thickness change causing the\n // input box to shift we apply a margin to compensate. This margin is then removed on hover when the border is thicker.\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderThickness}rem`,\n\n ':hover, :active, :focus, :focus-within': {\n border: `${borderActiveThickness}rem solid ${borderColorActive}`,\n margin: `${defaultSendBoxActiveBorderThicknessREM - borderActiveThickness}rem`\n }\n };\n};\n"]}
@@ -61,5 +61,6 @@ export declare const playFrames: () => string;
61
61
  export declare const reactionRenderingStyle: (args: {
62
62
  spriteImageUrl?: string;
63
63
  emojiSize: number;
64
+ frameCount?: number;
64
65
  }) => string;
65
66
  //# sourceMappingURL=VideoTile.styles.d.ts.map
@@ -179,7 +179,9 @@ export const playFrames = memoizeFunction(() => keyframes({
179
179
  * @private
180
180
  */
181
181
  export const reactionRenderingStyle = (args) => {
182
+ var _a;
182
183
  const imageUrl = `url(${args.spriteImageUrl})`;
184
+ const steps = (_a = args.frameCount) !== null && _a !== void 0 ? _a : 51;
183
185
  return mergeStyles({
184
186
  height: '100%',
185
187
  width: '100%',
@@ -187,7 +189,7 @@ export const reactionRenderingStyle = (args) => {
187
189
  animationName: playFrames(),
188
190
  backgroundImage: imageUrl,
189
191
  animationDuration: '5.12s',
190
- animationTimingFunction: `steps(102)`,
192
+ animationTimingFunction: `steps(${steps})`,
191
193
  backgroundSize: `cover`,
192
194
  animationPlayState: 'running',
193
195
  animationIterationCount: 'infinite',
@@ -1 +1 @@
1
- {"version":3,"file":"VideoTile.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/VideoTile.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAyB,WAAW,EAAiB,MAAM,iBAAiB,CAAC;AACpF,2CAA2C;AAC3C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE7D,2CAA2C;AAC3C;;GAEG;AACH,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAW;IAChC,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;CACd,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAW;IAC1C,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,MAAM;IACjB,cAAc,EAAE,QAAQ;IACxB,SAAS,EAAE,OAAO;IAClB,MAAM,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAW;IAC5C,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC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CAAC;IACR,IAAI,EAAE;QACJ,kBAAkB,EAAE,YAAY;KACjC;IACD,EAAE,EAAE;QACF,kBAAkB,EAAE,SAAS;KAC9B;CACF,CAAC,CACH,CAAC;AAEF,2CAA2C;AAC3C;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAoD,EAAU,EAAE;IACrG,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,cAAc,GAAG,CAAC;IAC/C,OAAO,WAAW,CAAC;QACjB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,QAAQ;QAClB,aAAa,EAAE,UAAU,EAAE;QAC3B,eAAe,EAAE,QAAQ;QACzB,iBAAiB,EAAE,OAAO;QAC1B,uBAAuB,EAAE,YAAY;QACrC,cAAc,EAAE,OAAO;QACvB,kBAAkB,EAAE,SAAS;QAC7B,uBAAuB,EAAE,UAAU;QACnC,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,kBAAkB,EAAE,QAAQ;QAC5B,SAAS,EAAE,SACT,2BAA2B,GAAG,IAAI,CAAC,SAAS;YAC1C,CAAC,CAAC,2BAA2B,GAAG,IAAI,CAAC,SAAS;YAC9C,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,2BACvB,GAAG;KACJ,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IButtonStyles, IStyle, mergeStyles, Theme, ITheme } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { keyframes, memoizeFunction } from '@fluentui/react';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nconst DEFAULT_ORIGINAL_EMOJI_SIZE = 84;\n\n/**\n * @private\n */\nexport const rootStyles: IStyle = {\n position: 'relative',\n height: '100%',\n width: '100%'\n};\n\n/**\n * @private\n */\nexport const videoContainerStyles: IStyle = {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n minWidth: '100%',\n minHeight: '100%',\n objectPosition: 'center',\n objectFit: 'cover',\n zIndex: 0\n};\n\n/**\n * @private\n */\nexport const overlayContainerStyles: IStyle = {\n width: '100%',\n height: '100%',\n zIndex: 5\n};\n\n/**\n * @private\n */\nexport const tileInfoContainerStyle = mergeStyles({\n position: 'absolute',\n bottom: '0',\n left: '0',\n padding: '0.5rem',\n width: '100%'\n});\n\n/**\n * @private\n */\nexport const disabledVideoHint = mergeStyles({\n backgroundColor: 'inherit',\n boxShadow: 'none',\n textAlign: 'left',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n alignItems: 'center',\n padding: '0.15rem',\n maxWidth: '100%'\n});\n\n/**\n * @private\n */\nexport const videoHint = mergeStyles(disabledVideoHint, {\n // This will appear on top of the video stream, so no dependency on theme and explicitly use a translucent white\n backgroundColor: 'rgba(255,255,255,0.8)'\n});\n\n/**\n * @private\n */\nexport const displayNameStyle: IStyle = {\n padding: '0.1rem',\n fontSize: '0.75rem',\n fontWeight: 600,\n // Text component will take body color by default (white in Dark Mode), so forcing it to be parent container color\n color: 'inherit',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%'\n};\n\n/**\n * @private\n */\nexport const pinIconStyle: IStyle = {\n padding: '0.125rem'\n};\n\n/**\n * @private\n */\nexport const iconContainerStyle: IStyle = {\n margin: 'auto',\n alignItems: 'center',\n '& svg': {\n display: 'block',\n // Similar to text color, icon color will be inherited from parent container\n color: 'inherit'\n }\n};\n\n/**\n * @private\n */\nexport const participantStateStringStyles = (theme: Theme): IStyle => {\n return {\n minWidth: 'max-content',\n color: theme.palette.black,\n fontSize: '0.75rem',\n lineHeight: 'normal',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n padding: '0.1rem'\n };\n};\n\n/**\n * @private\n */\nexport const moreButtonStyles: IButtonStyles = {\n root: {\n // To ensure that the button is clickable when there is a floating video tile\n zIndex: 1,\n color: 'inherit',\n top: '-0.125rem',\n height: '100%',\n padding: '0rem'\n },\n rootHovered: {\n background: 'none'\n },\n rootPressed: {\n background: 'none'\n },\n rootExpanded: {\n background: 'none'\n }\n};\n\n/**\n * @private\n */\nexport const raiseHandContainerStyles = (theme: ITheme, limitedSpace: boolean): string =>\n mergeStyles(\n {\n alignItems: 'center',\n padding: '0.2rem 0.3rem',\n backgroundColor: theme.palette.white,\n opacity: 0.9,\n borderRadius: '1rem',\n margin: '0.5rem',\n width: 'fit-content',\n position: 'absolute'\n },\n limitedSpace && raiseHandLimitedSpaceStyles\n );\n\n/**\n * @private\n */\nexport const raiseHandLimitedSpaceStyles: IStyle = {\n // position centrally\n marginLeft: 'auto',\n marginRight: 'auto',\n left: 0,\n right: 0,\n // position at the bottom\n bottom: 0\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const playFrames = memoizeFunction(() =>\n keyframes({\n from: {\n backgroundPosition: '0px 8568px'\n },\n to: {\n backgroundPosition: '0px 0px'\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const reactionRenderingStyle = (args: { spriteImageUrl?: string; emojiSize: number }): string => {\n const imageUrl = `url(${args.spriteImageUrl})`;\n return mergeStyles({\n height: '100%',\n width: '100%',\n overflow: 'hidden',\n animationName: playFrames(),\n backgroundImage: imageUrl,\n animationDuration: '5.12s',\n animationTimingFunction: `steps(102)`,\n backgroundSize: `cover`,\n animationPlayState: 'running',\n animationIterationCount: 'infinite',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundPosition: `center`,\n transform: `scale(${\n DEFAULT_ORIGINAL_EMOJI_SIZE < args.emojiSize\n ? DEFAULT_ORIGINAL_EMOJI_SIZE / args.emojiSize\n : args.emojiSize / DEFAULT_ORIGINAL_EMOJI_SIZE\n })`\n });\n};\n"]}
1
+ {"version":3,"file":"VideoTile.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/VideoTile.styles.ts"],"names":[],"mappings":"AAAA,uC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AE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,QAAQ;QAClB,aAAa,EAAE,UAAU,EAAE;QAC3B,eAAe,EAAE,QAAQ;QACzB,iBAAiB,EAAE,OAAO;QAC1B,uBAAuB,EAAE,SAAS,KAAK,GAAG;QAC1C,cAAc,EAAE,OAAO;QACvB,kBAAkB,EAAE,SAAS;QAC7B,uBAAuB,EAAE,UAAU;QACnC,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,kBAAkB,EAAE,QAAQ;QAC5B,SAAS,EAAE,SACT,2BAA2B,GAAG,IAAI,CAAC,SAAS;YAC1C,CAAC,CAAC,2BAA2B,GAAG,IAAI,CAAC,SAAS;YAC9C,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,2BACvB,GAAG;KACJ,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IButtonStyles, IStyle, mergeStyles, Theme, ITheme } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { keyframes, memoizeFunction } from '@fluentui/react';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nconst DEFAULT_ORIGINAL_EMOJI_SIZE = 84;\n\n/**\n * @private\n */\nexport const rootStyles: IStyle = {\n position: 'relative',\n height: '100%',\n width: '100%'\n};\n\n/**\n * @private\n */\nexport const videoContainerStyles: IStyle = {\n position: 'absolute',\n top: '0',\n left: '0',\n width: '100%',\n height: '100%',\n minWidth: '100%',\n minHeight: '100%',\n objectPosition: 'center',\n objectFit: 'cover',\n zIndex: 0\n};\n\n/**\n * @private\n */\nexport const overlayContainerStyles: IStyle = {\n width: '100%',\n height: '100%',\n zIndex: 5\n};\n\n/**\n * @private\n */\nexport const tileInfoContainerStyle = mergeStyles({\n position: 'absolute',\n bottom: '0',\n left: '0',\n padding: '0.5rem',\n width: '100%'\n});\n\n/**\n * @private\n */\nexport const disabledVideoHint = mergeStyles({\n backgroundColor: 'inherit',\n boxShadow: 'none',\n textAlign: 'left',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n alignItems: 'center',\n padding: '0.15rem',\n maxWidth: '100%'\n});\n\n/**\n * @private\n */\nexport const videoHint = mergeStyles(disabledVideoHint, {\n // This will appear on top of the video stream, so no dependency on theme and explicitly use a translucent white\n backgroundColor: 'rgba(255,255,255,0.8)'\n});\n\n/**\n * @private\n */\nexport const displayNameStyle: IStyle = {\n padding: '0.1rem',\n fontSize: '0.75rem',\n fontWeight: 600,\n // Text component will take body color by default (white in Dark Mode), so forcing it to be parent container color\n color: 'inherit',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%'\n};\n\n/**\n * @private\n */\nexport const pinIconStyle: IStyle = {\n padding: '0.125rem'\n};\n\n/**\n * @private\n */\nexport const iconContainerStyle: IStyle = {\n margin: 'auto',\n alignItems: 'center',\n '& svg': {\n display: 'block',\n // Similar to text color, icon color will be inherited from parent container\n color: 'inherit'\n }\n};\n\n/**\n * @private\n */\nexport const participantStateStringStyles = (theme: Theme): IStyle => {\n return {\n minWidth: 'max-content',\n color: theme.palette.black,\n fontSize: '0.75rem',\n lineHeight: 'normal',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n padding: '0.1rem'\n };\n};\n\n/**\n * @private\n */\nexport const moreButtonStyles: IButtonStyles = {\n root: {\n // To ensure that the button is clickable when there is a floating video tile\n zIndex: 1,\n color: 'inherit',\n top: '-0.125rem',\n height: '100%',\n padding: '0rem'\n },\n rootHovered: {\n background: 'none'\n },\n rootPressed: {\n background: 'none'\n },\n rootExpanded: {\n background: 'none'\n }\n};\n\n/**\n * @private\n */\nexport const raiseHandContainerStyles = (theme: ITheme, limitedSpace: boolean): string =>\n mergeStyles(\n {\n alignItems: 'center',\n padding: '0.2rem 0.3rem',\n backgroundColor: theme.palette.white,\n opacity: 0.9,\n borderRadius: '1rem',\n margin: '0.5rem',\n width: 'fit-content',\n position: 'absolute'\n },\n limitedSpace && raiseHandLimitedSpaceStyles\n );\n\n/**\n * @private\n */\nexport const raiseHandLimitedSpaceStyles: IStyle = {\n // position centrally\n marginLeft: 'auto',\n marginRight: 'auto',\n left: 0,\n right: 0,\n // position at the bottom\n bottom: 0\n};\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const playFrames = memoizeFunction(() =>\n keyframes({\n from: {\n backgroundPosition: '0px 8568px'\n },\n to: {\n backgroundPosition: '0px 0px'\n }\n })\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const reactionRenderingStyle = (args: {\n spriteImageUrl?: string;\n emojiSize: number;\n frameCount?: number;\n}): string => {\n const imageUrl = `url(${args.spriteImageUrl})`;\n const steps = args.frameCount ?? 51;\n return mergeStyles({\n height: '100%',\n width: '100%',\n overflow: 'hidden',\n animationName: playFrames(),\n backgroundImage: imageUrl,\n animationDuration: '5.12s',\n animationTimingFunction: `steps(${steps})`,\n backgroundSize: `cover`,\n animationPlayState: 'running',\n animationIterationCount: 'infinite',\n justifyContent: 'center',\n alignItems: 'center',\n backgroundPosition: `center`,\n transform: `scale(${\n DEFAULT_ORIGINAL_EMOJI_SIZE < args.emojiSize\n ? DEFAULT_ORIGINAL_EMOJI_SIZE / args.emojiSize\n : args.emojiSize / DEFAULT_ORIGINAL_EMOJI_SIZE\n })`\n });\n};\n"]}
@@ -18,6 +18,6 @@ export declare function getMessageState(messageText: string, attachmentMetadata:
18
18
  * @private
19
19
  * @TODO: Remove when file-sharing feature becomes stable.
20
20
  */
21
- export declare function getMessageAttachedFilesMetadata(message: ChatMessage): AttachmentMetadata[] | undefined;
21
+ export declare function getMessageWithAttachmentMetadata(message: ChatMessage): AttachmentMetadata[] | undefined;
22
22
  export {};
23
23
  //# sourceMappingURL=ChatMessageComponentAsEditBoxUtils.d.ts.map
@@ -39,7 +39,7 @@ export function getMessageState(messageText,
39
39
  * @private
40
40
  * @TODO: Remove when file-sharing feature becomes stable.
41
41
  */
42
- export function getMessageAttachedFilesMetadata(message) {
43
- return message.files;
42
+ export function getMessageWithAttachmentMetadata(message) {
43
+ return message.attachments;
44
44
  }
45
45
  //# sourceMappingURL=ChatMessageComponentAsEditBoxUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentAsEditBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAIF,SAAS,cAAc,CACrB,WAAmB;AACnB,qGAAqG;AACrG,kBAAyC;IAEzC,qGAAqG;IACrG,OAAO,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,MAAK,CAAC,CAAC;IAC3E,OAAO,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,WAAmB;AACnB,qGAAqG,CAAC,kBAAwC;IAE9I,OAAO,cAAc,CACnB,WAAW;IACX,qGAAqG,CAAC,kBAAkB,CACzH;QACC,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC;YACtC,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,qGAAqG;AACrG;;;GAGG;AACH,MAAM,UAAU,+BAA+B,CAAC,OAAoB;IAClE,OAAO,OAAO,CAAC,KAAK,CAAC;AACvB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon } from '@fluentui/react';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '../../types/Attachment';\nimport { isMessageTooLong } from './SendBoxUtils';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { ChatMessage } from '../../types';\n\n/**\n * @private\n */\nexport const onRenderCancelIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxCancel'} className={className} />;\n};\n\n/**\n * @private\n */\nexport const onRenderSubmitIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxSubmit'} className={className} />;\n};\n\ntype MessageState = 'OK' | 'too short' | 'too long';\n\nfunction isMessageEmpty(\n messageText: string,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[]\n): boolean {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return messageText.trim().length === 0 && attachmentMetadata?.length === 0;\n return messageText.trim().length === 0;\n}\n\n/**\n * @private\n */\nexport function getMessageState(\n messageText: string,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ attachmentMetadata: AttachmentMetadata[]\n): MessageState {\n return isMessageEmpty(\n messageText,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ attachmentMetadata\n )\n ? 'too short'\n : isMessageTooLong(messageText.length)\n ? 'too long'\n : 'OK';\n}\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n/**\n * @private\n * @TODO: Remove when file-sharing feature becomes stable.\n */\nexport function getMessageAttachedFilesMetadata(message: ChatMessage): AttachmentMetadata[] | undefined {\n return message.files;\n}\n"]}
1
+ {"version":3,"file":"ChatMessageComponentAsEditBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAe,EAAE;IACnE,OAAO,oBAAC,IAAI,IAAC,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAI,CAAC;AACnE,CAAC,CAAC;AAIF,SAAS,cAAc,CACrB,WAAmB;AACnB,qGAAqG;AACrG,kBAAyC;IAEzC,qGAAqG;IACrG,OAAO,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,MAAM,MAAK,CAAC,CAAC;IAC3E,OAAO,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,WAAmB;AACnB,qGAAqG,CAAC,kBAAwC;IAE9I,OAAO,cAAc,CACnB,WAAW;IACX,qGAAqG,CAAC,kBAAkB,CACzH;QACC,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,MAAM,CAAC;YACtC,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,qGAAqG;AACrG;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAAC,OAAoB;IACnE,OAAO,OAAO,CAAC,WAAW,CAAC;AAC7B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { Icon } from '@fluentui/react';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '../../types/Attachment';\nimport { isMessageTooLong } from './SendBoxUtils';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { ChatMessage } from '../../types';\n\n/**\n * @private\n */\nexport const onRenderCancelIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxCancel'} className={className} />;\n};\n\n/**\n * @private\n */\nexport const onRenderSubmitIcon = (className: string): JSX.Element => {\n return <Icon iconName={'EditBoxSubmit'} className={className} />;\n};\n\ntype MessageState = 'OK' | 'too short' | 'too long';\n\nfunction isMessageEmpty(\n messageText: string,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[]\n): boolean {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return messageText.trim().length === 0 && attachmentMetadata?.length === 0;\n return messageText.trim().length === 0;\n}\n\n/**\n * @private\n */\nexport function getMessageState(\n messageText: string,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ attachmentMetadata: AttachmentMetadata[]\n): MessageState {\n return isMessageEmpty(\n messageText,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ attachmentMetadata\n )\n ? 'too short'\n : isMessageTooLong(messageText.length)\n ? 'too long'\n : 'OK';\n}\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n/**\n * @private\n * @TODO: Remove when file-sharing feature becomes stable.\n */\nexport function getMessageWithAttachmentMetadata(message: ChatMessage): AttachmentMetadata[] | undefined {\n return message.attachments;\n}\n"]}
@@ -51,10 +51,11 @@ actionsForAttachment) {
51
51
  */
52
52
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
53
53
  const defaultOnRenderAttachmentDownloads = (message, strings, actionsForAttachment) => {
54
+ var _a, _b;
54
55
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
55
- return (React.createElement(_AttachmentDownloadCards, { message: message,
56
+ return ((_b = (_a = message.attachments) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0 ? (React.createElement(_AttachmentDownloadCards, { message: message,
56
57
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
57
- attachments: message.files || [],
58
+ attachments: message.attachments,
58
59
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
59
60
  actionsForAttachment: actionsForAttachment,
60
61
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
@@ -62,7 +63,7 @@ const defaultOnRenderAttachmentDownloads = (message, strings, actionsForAttachme
62
63
  downloadAttachment: strings.downloadAttachment,
63
64
  openAttachment: strings.openAttachment,
64
65
  attachmentCardGroupMessage: strings.attachmentCardGroupMessage
65
- } }));
66
+ } })) : (React.createElement(React.Fragment, null));
66
67
  return undefined;
67
68
  };
68
69
  /** @private */
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EA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AE,CAAC;IAEP,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,OAA6F,EAC7F,KAAY,EACZ,SAAiB,EACQ,EAAE;IAC3B,MAAM,QAAQ,GAAG,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,IAAI,OAAO,CAAC,WAAW,KAAK,MAAM,IAAI,QAAQ,EAAE,CAAC;QAC/C,OAAO,6BAAK,SAAS,EAAE,yBAAyB,CAAC,KAAK,CAAC,IAAG,SAAS,CAAO,CAAC;IAC7E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { ChatMessage, MessageAttachedStatus } from '../../types/ChatMessage';\nimport { ChatMessageContent } from '../ChatMessage/ChatMessageContent';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../types/ChatMessage';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessageContent } from '../ChatMessage/ChatMessageContent';\nimport { InlineImageOptions } from '../ChatMessage/ChatMessageContent';\nimport { MessageThreadStrings } from '../MessageThread';\n/* @conditional-compile-remove(mention) */\nimport { MentionDisplayOptions } from '../MentionPopover';\nimport { _AttachmentDownloadCards } from '../AttachmentDownloadCards';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMenuAction, AttachmentMetadata } from '../../types/Attachment';\nimport { formatTimeForChatMessage, formatTimestampForChatMessage } from './Datetime';\nimport { ComponentLocale } from '../../localization/LocalizationProvider';\nimport { chatMessageEditedTagStyle } from '../styles/ChatMessageComponent.styles';\nimport { Theme } from '@fluentui/react';\n\n/** @private\n * Return the string value for the FluentUI message attached prop based on the message's attached status.\n * @param attached - The message's attached status.\n */\nexport const getFluentUIAttachedValue = (\n messageAttachedStatus?: MessageAttachedStatus\n): 'bottom' | 'top' | 'center' | undefined => {\n return messageAttachedStatus === 'top' || messageAttachedStatus === false ? 'top' : 'center';\n};\n\n/**\n * @private\n * Get the message bubble content for the message.\n */\nexport function getMessageBubbleContent(\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n strings: MessageThreadStrings,\n userId: string,\n inlineImageOptions: InlineImageOptions | undefined,\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions?: MentionDisplayOptions,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n /**\n * Optional callback to render message attachments in the message component.\n */\n onRenderAttachmentDownloads?: (userId: string, message: ChatMessage) => JSX.Element,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n /**\n * Optional callback to define custom actions for attachments.\n */\n actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]\n): JSX.Element {\n /* @conditional-compile-remove(data-loss-prevention) */\n if (message.messageType === 'blocked') {\n return (\n <div tabIndex={0}>\n <BlockedMessageContent message={message} strings={strings} />\n </div>\n );\n }\n return (\n <div tabIndex={0} className=\"ui-chat__message__content\">\n <ChatMessageContent\n message={message}\n strings={strings}\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions={mentionDisplayOptions}\n inlineImageOptions={inlineImageOptions}\n />\n {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ onRenderAttachmentDownloads\n ? onRenderAttachmentDownloads(userId, message)\n : defaultOnRenderAttachmentDownloads(\n message,\n strings,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment\n )\n }\n </div>\n );\n}\n\n/**\n * Default component for rendering attachment downloads.\n */\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nconst defaultOnRenderAttachmentDownloads = (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n strings: MessageThreadStrings,\n actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]\n): JSX.Element | undefined => {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return (\n <_AttachmentDownloadCards\n message={message as ChatMessage}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n attachments={(message as ChatMessage).files || []}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment={actionsForAttachment}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n strings={{\n downloadAttachment: strings.downloadAttachment,\n openAttachment: strings.openAttachment,\n attachmentCardGroupMessage: strings.attachmentCardGroupMessage\n }}\n />\n );\n return undefined;\n};\n\n/** @private */\nexport const generateDefaultTimestamp = (\n createdOn: Date,\n showDate: boolean | undefined,\n strings: MessageThreadStrings\n): string => {\n const formattedTimestamp = showDate\n ? formatTimestampForChatMessage(createdOn, new Date(), strings)\n : formatTimeForChatMessage(createdOn);\n\n return formattedTimestamp;\n};\n\n// onDisplayDateTimeString from props overwrite onDisplayDateTimeString from locale\n/** @private */\nexport const generateCustomizedTimestamp = (\n createdOn: Date,\n locale: ComponentLocale,\n onDisplayDateTimeString?: (messageDate: Date) => string\n): string => {\n /* @conditional-compile-remove(date-time-customization) */\n return onDisplayDateTimeString\n ? onDisplayDateTimeString(createdOn)\n : locale.onDisplayDateTimeString\n ? locale.onDisplayDateTimeString(createdOn)\n : '';\n\n return '';\n};\n\n/**\n * @private\n * Get the edited tag for the message if it is edited.\n */\nexport const getMessageEditedDetails = (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n theme: Theme,\n editedTag: string\n): JSX.Element | undefined => {\n const editedOn = 'editedOn' in message ? message.editedOn : undefined;\n if (message.messageType === 'chat' && editedOn) {\n return <div className={chatMessageEditedTagStyle(theme)}>{editedTag}</div>;\n }\n return undefined;\n};\n"]}
1
+ {"version":3,"file":"ChatMessageComponentUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/ChatMessageComponentUtils.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,uDAAuD;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAGtE,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAErF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAGlF;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,qBAA6C,EACJ,EAAE;IAC3C,OAAO,qBAAqB,KAAK,KAAK,IAAI,qBAAqB,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC/F,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,OAA6F,EAC7F,OAA6B,EAC7B,MAAc,EACd,kBAAkD;AAClD,0CAA0C;AAC1C,qBAA6C;AAC7C,qGAAqG;AACrG;;GAEG;AACH,2BAAmF;AACnF,qGAAqG;AACrG;;GAEG;AACH,oBAAwG;IAExG,uDAAuD;IACvD,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACtC,OAAO,CACL,6BAAK,QAAQ,EAAE,CAAC;YACd,oBAAC,qBAAqB,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAI,CACzD,CACP,CAAC;IACJ,CAAC;IACD,OAAO,CACL,6BAAK,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAC,2BAA2B;QACrD,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO,EAChB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AC,CAAC;AAEF,mFAAmF;AACnF,eAAe;AACf,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,SAAe,EACf,MAAuB,EACvB,uBAAuD,EAC/C,EAAE;IACV,0DAA0D;IAC1D,OAAO,uBAAuB;QAC5B,CAAC,CAAC,uBAAuB,CAAC,SAAS,CAAC;QACpC,CAAC,CAAC,MAAM,CAAC,uBAAuB;YAChC,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAC,SAAS,CAAC;YAC3C,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,OAA6F,EAC7F,KAAY,EACZ,SAAiB,EACQ,EAAE;IAC3B,MAAM,QAAQ,GAAG,UAAU,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACtE,IAAI,OAAO,CAAC,WAAW,KAAK,MAAM,IAAI,QAAQ,EAAE,CAAC;QAC/C,OAAO,6BAAK,SAAS,EAAE,yBAAyB,CAAC,KAAK,CAAC,IAAG,SAAS,CAAO,CAAC;IAC7E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { ChatMessage, MessageAttachedStatus } from '../../types/ChatMessage';\nimport { ChatMessageContent } from '../ChatMessage/ChatMessageContent';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../types/ChatMessage';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessageContent } from '../ChatMessage/ChatMessageContent';\nimport { InlineImageOptions } from '../ChatMessage/ChatMessageContent';\nimport { MessageThreadStrings } from '../MessageThread';\n/* @conditional-compile-remove(mention) */\nimport { MentionDisplayOptions } from '../MentionPopover';\nimport { _AttachmentDownloadCards } from '../AttachmentDownloadCards';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMenuAction, AttachmentMetadata } from '../../types/Attachment';\nimport { formatTimeForChatMessage, formatTimestampForChatMessage } from './Datetime';\nimport { ComponentLocale } from '../../localization/LocalizationProvider';\nimport { chatMessageEditedTagStyle } from '../styles/ChatMessageComponent.styles';\nimport { Theme } from '@fluentui/react';\n\n/** @private\n * Return the string value for the FluentUI message attached prop based on the message's attached status.\n * @param attached - The message's attached status.\n */\nexport const getFluentUIAttachedValue = (\n messageAttachedStatus?: MessageAttachedStatus\n): 'bottom' | 'top' | 'center' | undefined => {\n return messageAttachedStatus === 'top' || messageAttachedStatus === false ? 'top' : 'center';\n};\n\n/**\n * @private\n * Get the message bubble content for the message.\n */\nexport function getMessageBubbleContent(\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n strings: MessageThreadStrings,\n userId: string,\n inlineImageOptions: InlineImageOptions | undefined,\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions?: MentionDisplayOptions,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n /**\n * Optional callback to render message attachments in the message component.\n */\n onRenderAttachmentDownloads?: (userId: string, message: ChatMessage) => JSX.Element,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n /**\n * Optional callback to define custom actions for attachments.\n */\n actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]\n): JSX.Element {\n /* @conditional-compile-remove(data-loss-prevention) */\n if (message.messageType === 'blocked') {\n return (\n <div tabIndex={0}>\n <BlockedMessageContent message={message} strings={strings} />\n </div>\n );\n }\n return (\n <div tabIndex={0} className=\"ui-chat__message__content\">\n <ChatMessageContent\n message={message}\n strings={strings}\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions={mentionDisplayOptions}\n inlineImageOptions={inlineImageOptions}\n />\n {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ onRenderAttachmentDownloads\n ? onRenderAttachmentDownloads(userId, message)\n : defaultOnRenderAttachmentDownloads(\n message,\n strings,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment\n )\n }\n </div>\n );\n}\n\n/**\n * Default component for rendering attachment downloads.\n */\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nconst defaultOnRenderAttachmentDownloads = (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n strings: MessageThreadStrings,\n actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]\n): JSX.Element | undefined => {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return ((message as ChatMessage).attachments?.length ?? 0) > 0 ? (\n <_AttachmentDownloadCards\n message={message as ChatMessage}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n attachments={(message as ChatMessage).attachments}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment={actionsForAttachment}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n strings={{\n downloadAttachment: strings.downloadAttachment,\n openAttachment: strings.openAttachment,\n attachmentCardGroupMessage: strings.attachmentCardGroupMessage\n }}\n />\n ) : (\n <></>\n );\n return undefined;\n};\n\n/** @private */\nexport const generateDefaultTimestamp = (\n createdOn: Date,\n showDate: boolean | undefined,\n strings: MessageThreadStrings\n): string => {\n const formattedTimestamp = showDate\n ? formatTimestampForChatMessage(createdOn, new Date(), strings)\n : formatTimeForChatMessage(createdOn);\n\n return formattedTimestamp;\n};\n\n// onDisplayDateTimeString from props overwrite onDisplayDateTimeString from locale\n/** @private */\nexport const generateCustomizedTimestamp = (\n createdOn: Date,\n locale: ComponentLocale,\n onDisplayDateTimeString?: (messageDate: Date) => string\n): string => {\n /* @conditional-compile-remove(date-time-customization) */\n return onDisplayDateTimeString\n ? onDisplayDateTimeString(createdOn)\n : locale.onDisplayDateTimeString\n ? locale.onDisplayDateTimeString(createdOn)\n : '';\n\n return '';\n};\n\n/**\n * @private\n * Get the edited tag for the message if it is edited.\n */\nexport const getMessageEditedDetails = (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n theme: Theme,\n editedTag: string\n): JSX.Element | undefined => {\n const editedOn = 'editedOn' in message ? message.editedOn : undefined;\n if (message.messageType === 'chat' && editedOn) {\n return <div className={chatMessageEditedTagStyle(theme)}>{editedTag}</div>;\n }\n return undefined;\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { ActiveFileUpload } from '../AttachmentUploadCards';
1
+ import { AttachmentMetadata } from '../../types/Attachment';
2
2
  /**
3
3
  * @private
4
4
  */
@@ -6,11 +6,11 @@ export declare const MAXIMUM_LENGTH_OF_MESSAGE = 8000;
6
6
  /**
7
7
  * @private
8
8
  */
9
- export declare const hasIncompleteFileUploads: (activeFileUploads: ActiveFileUpload[] | undefined) => boolean;
9
+ export declare const hasIncompleteAttachmentUploads: (activeAttachmentUploads: AttachmentMetadata[] | undefined) => boolean;
10
10
  /**
11
11
  * @private
12
12
  */
13
- export declare const hasCompletedFileUploads: (activeFileUploads: ActiveFileUpload[] | undefined) => boolean;
13
+ export declare const hasCompletedAttachmentUploads: (activeAttachmentUploads: AttachmentMetadata[] | undefined) => boolean;
14
14
  /**
15
15
  * @private
16
16
  */
@@ -9,18 +9,18 @@ const EMPTY_MESSAGE_REGEX = /^\s*$/;
9
9
  /**
10
10
  * @private
11
11
  */
12
- export const hasIncompleteFileUploads = (activeFileUploads) => {
13
- return !!((activeFileUploads === null || activeFileUploads === void 0 ? void 0 : activeFileUploads.length) &&
14
- !activeFileUploads
15
- .filter((attachmentUpload) => !attachmentUpload.error)
16
- .every((attachmentUpload) => attachmentUpload.uploadComplete));
12
+ export const hasIncompleteAttachmentUploads = (activeAttachmentUploads) => {
13
+ return !!((activeAttachmentUploads === null || activeAttachmentUploads === void 0 ? void 0 : activeAttachmentUploads.length) &&
14
+ !activeAttachmentUploads
15
+ .filter((attachmentUpload) => !attachmentUpload.uploadError)
16
+ .every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined));
17
17
  };
18
18
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
19
19
  /**
20
20
  * @private
21
21
  */
22
- export const hasCompletedFileUploads = (activeFileUploads) => {
23
- return !!(activeFileUploads === null || activeFileUploads === void 0 ? void 0 : activeFileUploads.find((file) => !file.error));
22
+ export const hasCompletedAttachmentUploads = (activeAttachmentUploads) => {
23
+ return !!(activeAttachmentUploads === null || activeAttachmentUploads === void 0 ? void 0 : activeAttachmentUploads.find((attachment) => !attachment.uploadError));
24
24
  };
25
25
  /**
26
26
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,qGAAqG;AACrG;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,iBAAiD,EAAW,EAAE;IACrG,OAAO,CAAC,CAAC,CACP,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,MAAM;QACzB,CAAC,iBAAiB;aACf,MAAM,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC;aACrD,KAAK,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAChE,CAAC;AACJ,CAAC,CAAC;AAEF,qGAAqG;AACrG;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,iBAAiD,EAAW,EAAE;IACpG,OAAO,CAAC,CAAC,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,CAAC;AAC1D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAmB,EAAW,EAAE;IAC/D,OAAO,WAAW,GAAG,yBAAyB,CAAC;AACjD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAU,EAAE;IACtD,IAAI,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,OAAO,EAAE,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { ActiveFileUpload } from '../AttachmentUploadCards';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n/**\n * @private\n */\nexport const hasIncompleteFileUploads = (activeFileUploads: ActiveFileUpload[] | undefined): boolean => {\n return !!(\n activeFileUploads?.length &&\n !activeFileUploads\n .filter((attachmentUpload) => !attachmentUpload.error)\n .every((attachmentUpload) => attachmentUpload.uploadComplete)\n );\n};\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n/**\n * @private\n */\nexport const hasCompletedFileUploads = (activeFileUploads: ActiveFileUpload[] | undefined): boolean => {\n return !!activeFileUploads?.find((file) => !file.error);\n};\n\n/**\n * @private\n */\nexport const isMessageTooLong = (valueLength: number): boolean => {\n return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;\n};\n\n/**\n * @private\n */\nexport const sanitizeText = (message: string): string => {\n if (EMPTY_MESSAGE_REGEX.test(message)) {\n return '';\n } else {\n return message;\n }\n};\n"]}
1
+ {"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,qGAAqG;AACrG;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,uBAAyD,EAAW,EAAE;IACnH,OAAO,CAAC,CAAC,CACP,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,MAAM;QAC/B,CAAC,uBAAuB;aACrB,MAAM,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC;aAC3D,KAAK,CAAC,CAAC,gBAAgB,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,KAAK,CAAC,IAAI,gBAAgB,CAAC,QAAQ,KAAK,SAAS,CAAC,CAC3G,CAAC;AACJ,CAAC,CAAC;AAEF,qGAAqG;AACrG;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,uBAAyD,EAAW,EAAE;IAClH,OAAO,CAAC,CAAC,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA,CAAC;AAClF,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAmB,EAAW,EAAE;IAC/D,OAAO,WAAW,GAAG,yBAAyB,CAAC;AACjD,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAU,EAAE;IACtD,IAAI,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,OAAO,EAAE,CAAC;IACZ,CAAC;SAAM,CAAC;QACN,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '../../types/Attachment';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n/**\n * @private\n */\nexport const hasIncompleteAttachmentUploads = (activeAttachmentUploads: AttachmentMetadata[] | undefined): boolean => {\n return !!(\n activeAttachmentUploads?.length &&\n !activeAttachmentUploads\n .filter((attachmentUpload) => !attachmentUpload.uploadError)\n .every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined)\n );\n};\n\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n/**\n * @private\n */\nexport const hasCompletedAttachmentUploads = (activeAttachmentUploads: AttachmentMetadata[] | undefined): boolean => {\n return !!activeAttachmentUploads?.find((attachment) => !attachment.uploadError);\n};\n\n/**\n * @private\n */\nexport const isMessageTooLong = (valueLength: number): boolean => {\n return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;\n};\n\n/**\n * @private\n */\nexport const sanitizeText = (message: string): string => {\n if (EMPTY_MESSAGE_REGEX.test(message)) {\n return '';\n } else {\n return message;\n }\n};\n"]}
@@ -2,7 +2,7 @@ import { _AttachmentUploadCardsStrings } from '../AttachmentUploadCards';
2
2
  import { ParticipantState } from '../../types';
3
3
  /**
4
4
  * Conditionally modify locale strings passed to the attachment card
5
- * @returns file upload card strings
5
+ * @returns attachment upload card strings
6
6
  */
7
7
  export declare const useLocaleAttachmentCardStringsTrampoline: () => _AttachmentUploadCardsStrings;
8
8
  /**
@@ -4,7 +4,7 @@
4
4
  import { useLocale } from '../../localization';
5
5
  /**
6
6
  * Conditionally modify locale strings passed to the attachment card
7
- * @returns file upload card strings
7
+ * @returns attachment upload card strings
8
8
  */
9
9
  export const useLocaleAttachmentCardStringsTrampoline = () => {
10
10
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,qGAAqG;AACrG,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C;;;GAGG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,GAAkC,EAAE;IAC1F,qGAAqG;IACrG,OAAO,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IACnC,OAAO;QACL,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,EAAE;QACnB,SAAS,EAAE,EAAE;KACd,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,gBAAmC,EAAW,EAAE;IAC/F,OAAO,CAAC,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAClH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _AttachmentUploadCardsStrings } from '../AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { useLocale } from '../../localization';\nimport { ParticipantState } from '../../types';\n\n/**\n * Conditionally modify locale strings passed to the attachment card\n * @returns file upload card strings\n */\nexport const useLocaleAttachmentCardStringsTrampoline = (): _AttachmentUploadCardsStrings => {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return useLocale().strings.sendBox;\n return {\n removeAttachment: '',\n uploadCompleted: '',\n uploading: ''\n };\n};\n\n/**\n * Identify if a participant state if part of the Calling states or Hold states.\n */\nexport const _isParticipantStateCallingOrHold = (participantState?: ParticipantState): boolean => {\n return !!participantState && ['Idle', 'Connecting', 'EarlyMedia', 'Ringing', 'Hold'].includes(participantState);\n};\n"]}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/common.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,qGAAqG;AACrG,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C;;;GAGG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAG,GAAkC,EAAE;IAC1F,qGAAqG;IACrG,OAAO,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IACnC,OAAO;QACL,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,EAAE;QACnB,SAAS,EAAE,EAAE;KACd,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,gBAAmC,EAAW,EAAE;IAC/F,OAAO,CAAC,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAClH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _AttachmentUploadCardsStrings } from '../AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { useLocale } from '../../localization';\nimport { ParticipantState } from '../../types';\n\n/**\n * Conditionally modify locale strings passed to the attachment card\n * @returns attachment upload card strings\n */\nexport const useLocaleAttachmentCardStringsTrampoline = (): _AttachmentUploadCardsStrings => {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return useLocale().strings.sendBox;\n return {\n removeAttachment: '',\n uploadCompleted: '',\n uploading: ''\n };\n};\n\n/**\n * Identify if a participant state if part of the Calling states or Hold states.\n */\nexport const _isParticipantStateCallingOrHold = (participantState?: ParticipantState): boolean => {\n return !!participantState && ['Idle', 'Connecting', 'EarlyMedia', 'Ringing', 'Hold'].includes(participantState);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/localization/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAgCzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAuJnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAkB,sBAAsB,CAAC,CAAC;AAcpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnC,OAAO,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA0B,CAAC;AACpF,CAAC,CAAC;AAEF,kCAAkC;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAoB,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport {\n CameraButtonStrings,\n EndCallButtonStrings,\n ErrorBarStrings,\n MessageStatusIndicatorStrings,\n MessageThreadStrings,\n MicrophoneButtonStrings,\n DevicesButtonStrings,\n ParticipantsButtonStrings,\n ParticipantItemStrings,\n ScreenShareButtonStrings,\n SendBoxStrings,\n TypingIndicatorStrings,\n VideoGalleryStrings\n} from '../components';\n\nimport { RaiseHandButtonStrings } from '../components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButtonStrings } from '../components';\nimport { DialpadStrings } from '../components';\n/* @conditional-compile-remove(call-readiness) */\nimport { SitePermissionsStrings } from '../components/DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedStrings } from '../components/DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedIOSStrings } from '../components/DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserStrings } from '../components/UnsupportedBrowser';\n/* @conditional-compile-remove(one-to-n-calling) */\n// @conditional-compile-remove(PSTN-calls)\nimport { VideoTileStrings } from '../components/VideoTile';\nimport { COMPONENT_LOCALE_EN_US } from './locales';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserVersionStrings } from '../components/UnsupportedBrowserVersion';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedOperatingSystemStrings } from '../components/UnsupportedOperatingSystem';\nimport { VerticalGalleryStrings } from '../components/VerticalGallery';\n/* @conditional-compile-remove(total-participant-count) */\nimport { ParticipantListStrings } from '../components/ParticipantList';\n/* @conditional-compile-remove(mention) */\nimport { MentionPopoverStrings } from '../components/MentionPopover';\nimport { ImageOverlayStrings } from '../components/ImageOverlay';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionButtonStrings } from '../components';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextSendBoxStrings } from '../components/RichTextEditor/RichTextSendBox';\n\n/**\n * Locale information for all components exported from this library.\n *\n * @public\n */\nexport interface ComponentLocale {\n /** Strings for components */\n strings: ComponentStrings;\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 * Strings used by all components exported from this library.\n *\n * @public\n */\nexport interface ComponentStrings {\n /** Strings for MessageThread */\n messageThread: MessageThreadStrings;\n /** Strings for ParticipantItem */\n participantItem: ParticipantItemStrings;\n /** Strings for CameraButton */\n cameraButton: CameraButtonStrings;\n /** Strings for MicrophoneButton */\n microphoneButton: MicrophoneButtonStrings;\n /** Strings for EndCallButton */\n endCallButton: EndCallButtonStrings;\n /** Strings for DevicesButton */\n devicesButton: DevicesButtonStrings;\n /** Strings for ParticipantsButton */\n participantsButton: ParticipantsButtonStrings;\n /** Strings for ScreenShareButton */\n screenShareButton: ScreenShareButtonStrings;\n /** Strings for RaiseHandButton */\n raiseHandButton: RaiseHandButtonStrings;\n /* @conditional-compile-remove(reaction) */\n /**\n * Strings for ReactionButton\n * @beta\n * */\n reactionButton: ReactionButtonStrings;\n /** Strings for TypingIndicator */\n typingIndicator: TypingIndicatorStrings;\n /** Strings for SendBox */\n sendBox: SendBoxStrings;\n /* @conditional-compile-remove(rich-text-editor) */\n /** Strings for RichTextSendBox */\n richTextSendBox: RichTextSendBoxStrings;\n /* @conditional-compile-remove(mention) */\n /** Strings for MentionPopover */\n mentionPopover: MentionPopoverStrings;\n /** Strings for ImageOverlay */\n imageOverlay: ImageOverlayStrings;\n /** Strings for MessageStatusIndicator */\n messageStatusIndicator: MessageStatusIndicatorStrings;\n /** Strings for ErroBar */\n errorBar: ErrorBarStrings;\n /** Strings for VideoGallery */\n videoGallery: VideoGalleryStrings;\n /** Strings for Dialpad */\n dialpad: DialpadStrings;\n /* @conditional-compile-remove(one-to-n-calling) */\n // @conditional-compile-remove(PSTN-calls)\n /** Strings for VideoTile */\n videoTile: VideoTileStrings;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /** Strings for HoldButton */\n holdButton: HoldButtonStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraAndMicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n MicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraAndMicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n MicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraAndMicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraAndMicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n MicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n MicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser UI */\n UnsupportedBrowser: UnsupportedBrowserStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedBrowserVersion: UnsupportedBrowserVersionStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedOperatingSystem: UnsupportedOperatingSystemStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDenied */\n BrowserPermissionDenied: BrowserPermissionDeniedStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDeniedIOS */\n BrowserPermissionDeniedIOS: BrowserPermissionDeniedIOSStrings;\n\n /**\n * Strings for the VerticalGallery.\n */\n verticalGallery: VerticalGalleryStrings;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list component */\n ParticipantList: ParticipantListStrings;\n /* @conditional-compile-remove(hide-attendee-name) */\n}\n\n/**\n * Context for providing localized strings to components exported from this library.\n *\n * @public\n */\nexport const LocaleContext = createContext<ComponentLocale>(COMPONENT_LOCALE_EN_US);\n\n/**\n * Props for {@link LocalizationProvider}.\n *\n * @public\n */\nexport type LocalizationProviderProps = {\n /** Locale context to provide components */\n locale: ComponentLocale;\n /** Children to provide locale context. */\n children: React.ReactNode;\n};\n\n/**\n * Provider to provide localized strings for this library's react components.\n *\n * @remarks Components will be provided localized strings in English (US) by default if this\n * provider is not used.\n *\n * @public\n */\nexport const LocalizationProvider = (props: LocalizationProviderProps): JSX.Element => {\n const { locale, children } = props;\n return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>;\n};\n\n/** React hook to access locale */\nexport const useLocale = (): ComponentLocale => useContext(LocaleContext);\n"]}
1
+ {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/localization/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAgCzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAsJnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAkB,sBAAsB,CAAC,CAAC;AAcpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnC,OAAO,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA0B,CAAC;AACpF,CAAC,CAAC;AAEF,kCAAkC;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAoB,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport {\n CameraButtonStrings,\n EndCallButtonStrings,\n ErrorBarStrings,\n MessageStatusIndicatorStrings,\n MessageThreadStrings,\n MicrophoneButtonStrings,\n DevicesButtonStrings,\n ParticipantsButtonStrings,\n ParticipantItemStrings,\n ScreenShareButtonStrings,\n SendBoxStrings,\n TypingIndicatorStrings,\n VideoGalleryStrings\n} from '../components';\n\nimport { RaiseHandButtonStrings } from '../components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButtonStrings } from '../components';\nimport { DialpadStrings } from '../components';\n/* @conditional-compile-remove(call-readiness) */\nimport { SitePermissionsStrings } from '../components/DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedStrings } from '../components/DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedIOSStrings } from '../components/DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserStrings } from '../components/UnsupportedBrowser';\n/* @conditional-compile-remove(one-to-n-calling) */\n// @conditional-compile-remove(PSTN-calls)\nimport { VideoTileStrings } from '../components/VideoTile';\nimport { COMPONENT_LOCALE_EN_US } from './locales';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserVersionStrings } from '../components/UnsupportedBrowserVersion';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedOperatingSystemStrings } from '../components/UnsupportedOperatingSystem';\nimport { VerticalGalleryStrings } from '../components/VerticalGallery';\n/* @conditional-compile-remove(total-participant-count) */\nimport { ParticipantListStrings } from '../components/ParticipantList';\n/* @conditional-compile-remove(mention) */\nimport { MentionPopoverStrings } from '../components/MentionPopover';\nimport { ImageOverlayStrings } from '../components/ImageOverlay';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionButtonStrings } from '../components';\n/* @conditional-compile-remove(rich-text-editor) */\nimport { RichTextSendBoxStrings } from '../components/RichTextEditor/RichTextSendBox';\n\n/**\n * Locale information for all components exported from this library.\n *\n * @public\n */\nexport interface ComponentLocale {\n /** Strings for components */\n strings: ComponentStrings;\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 * Strings used by all components exported from this library.\n *\n * @public\n */\nexport interface ComponentStrings {\n /** Strings for MessageThread */\n messageThread: MessageThreadStrings;\n /** Strings for ParticipantItem */\n participantItem: ParticipantItemStrings;\n /** Strings for CameraButton */\n cameraButton: CameraButtonStrings;\n /** Strings for MicrophoneButton */\n microphoneButton: MicrophoneButtonStrings;\n /** Strings for EndCallButton */\n endCallButton: EndCallButtonStrings;\n /** Strings for DevicesButton */\n devicesButton: DevicesButtonStrings;\n /** Strings for ParticipantsButton */\n participantsButton: ParticipantsButtonStrings;\n /** Strings for ScreenShareButton */\n screenShareButton: ScreenShareButtonStrings;\n /** Strings for RaiseHandButton */\n raiseHandButton: RaiseHandButtonStrings;\n /* @conditional-compile-remove(reaction) */\n /**\n * Strings for ReactionButton\n * @beta\n * */\n reactionButton: ReactionButtonStrings;\n /** Strings for TypingIndicator */\n typingIndicator: TypingIndicatorStrings;\n /** Strings for SendBox */\n sendBox: SendBoxStrings;\n /* @conditional-compile-remove(rich-text-editor) */\n /** Strings for RichTextSendBox */\n richTextSendBox: RichTextSendBoxStrings;\n /* @conditional-compile-remove(mention) */\n /** Strings for MentionPopover */\n mentionPopover: MentionPopoverStrings;\n /** Strings for ImageOverlay */\n imageOverlay: ImageOverlayStrings;\n /** Strings for MessageStatusIndicator */\n messageStatusIndicator: MessageStatusIndicatorStrings;\n /** Strings for ErroBar */\n errorBar: ErrorBarStrings;\n /** Strings for VideoGallery */\n videoGallery: VideoGalleryStrings;\n /** Strings for Dialpad */\n dialpad: DialpadStrings;\n /* @conditional-compile-remove(one-to-n-calling) */\n // @conditional-compile-remove(PSTN-calls)\n /** Strings for VideoTile */\n videoTile: VideoTileStrings;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /** Strings for HoldButton */\n holdButton: HoldButtonStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraAndMicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n MicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraAndMicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n MicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraAndMicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraAndMicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n MicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n MicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser UI */\n UnsupportedBrowser: UnsupportedBrowserStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedBrowserVersion: UnsupportedBrowserVersionStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedOperatingSystem: UnsupportedOperatingSystemStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDenied */\n BrowserPermissionDenied: BrowserPermissionDeniedStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDeniedIOS */\n BrowserPermissionDeniedIOS: BrowserPermissionDeniedIOSStrings;\n\n /**\n * Strings for the VerticalGallery.\n */\n verticalGallery: VerticalGalleryStrings;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list component */\n ParticipantList: ParticipantListStrings;\n}\n\n/**\n * Context for providing localized strings to components exported from this library.\n *\n * @public\n */\nexport const LocaleContext = createContext<ComponentLocale>(COMPONENT_LOCALE_EN_US);\n\n/**\n * Props for {@link LocalizationProvider}.\n *\n * @public\n */\nexport type LocalizationProviderProps = {\n /** Locale context to provide components */\n locale: ComponentLocale;\n /** Children to provide locale context. */\n children: React.ReactNode;\n};\n\n/**\n * Provider to provide localized strings for this library's react components.\n *\n * @remarks Components will be provided localized strings in English (US) by default if this\n * provider is not used.\n *\n * @public\n */\nexport const LocalizationProvider = (props: LocalizationProviderProps): JSX.Element => {\n const { locale, children } = props;\n return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>;\n};\n\n/** React hook to access locale */\nexport const useLocale = (): ComponentLocale => useContext(LocaleContext);\n"]}
@@ -77,7 +77,9 @@
77
77
  },
78
78
  "endCallButton": {
79
79
  "label": "Leave",
80
- "tooltipContent": "Leave call"
80
+ "tooltipContent": "Leave call",
81
+ "leaveOption": "Leave",
82
+ "endCallOption": "End call"
81
83
  },
82
84
  "cameraButton": {
83
85
  "onLabel": "Camera",