@azure/communication-react 1.15.0-alpha-202404030013 → 1.15.0-alpha-202404040013

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 (162) hide show
  1. package/dist/communication-react.d.ts +11 -18
  2. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ButXxDca.js +122 -0
  3. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-ButXxDca.js.map +1 -0
  4. package/dist/dist-cjs/communication-react/{index-aOBAWcNI.js → index-BK44EyzL.js} +443 -467
  5. package/dist/dist-cjs/communication-react/index-BK44EyzL.js.map +1 -0
  6. package/dist/dist-cjs/communication-react/index.js +2 -2
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -1
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +5 -35
  12. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  14. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -1
  15. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  16. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -3
  17. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  18. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +0 -1
  19. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
  20. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  21. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +16 -9
  22. package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
  23. package/dist/dist-esm/communication-react/src/index.d.ts +2 -1
  24. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +8 -8
  26. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js +5 -5
  28. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -0
  30. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.d.ts +23 -0
  32. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +24 -0
  33. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -0
  34. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +7 -4
  35. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +11 -4
  36. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +9 -3
  38. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/Drawer/ReactionDrawerMenuItem.js +1 -1
  40. package/dist/dist-esm/react-components/src/components/Drawer/ReactionDrawerMenuItem.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +1 -1
  42. package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -1
  43. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +6 -0
  44. package/dist/dist-esm/react-components/src/components/MessageThread.js +6 -2
  45. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  47. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js +1 -1
  49. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js +1 -2
  51. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +5 -5
  53. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +25 -25
  55. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +6 -6
  57. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/SendBox.js +18 -18
  59. package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +14 -6
  61. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.d.ts +2 -0
  63. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js +3 -0
  64. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -0
  66. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +21 -0
  67. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  68. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js +4 -1
  70. package/dist/dist-esm/react-components/src/components/styles/ReactionButton.styles.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -3
  72. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  73. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +4 -3
  74. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +13 -19
  75. package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +5 -6
  77. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +2 -2
  79. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/theming/icons.js +1 -1
  81. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +5 -23
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  84. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -2
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +0 -2
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -2
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +0 -3
  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/CallControls.js +7 -1
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js +0 -7
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +1 -5
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -5
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +0 -1
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -6
  105. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  106. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +3 -14
  107. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -1
  109. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  110. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -2
  112. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  113. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.js +0 -3
  114. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.js.map +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CapabilityChangedNotificationTracking.js.map +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js +0 -6
  117. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/TrackCapabilityChangedNotifications.js.map +1 -1
  118. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +1 -8
  119. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +15 -15
  121. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  122. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -3
  123. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  124. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +1 -2
  125. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +8 -8
  126. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
  127. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +2 -2
  128. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  129. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -14
  130. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
  131. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +18 -6
  132. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  133. package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
  134. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js +6 -6
  135. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationAttachmentUploadAdapter.js.map +1 -1
  136. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +22 -22
  137. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
  138. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
  139. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +1 -1
  140. package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
  141. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +4 -4
  142. package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -1
  143. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +9 -5
  144. package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
  145. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +2 -2
  146. package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
  147. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +1 -1
  148. package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -1
  149. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +7 -1
  150. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  151. package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -5
  152. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  153. package/package.json +1 -1
  154. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-B8qxZi1I.js +0 -54
  155. package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-B8qxZi1I.js.map +0 -1
  156. package/dist/dist-cjs/communication-react/index-aOBAWcNI.js.map +0 -1
  157. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +0 -9
  158. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +0 -20
  159. package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +0 -1
  160. package/dist/dist-esm/react-composites/src/composites/common/SendBox.d.ts +0 -17
  161. package/dist/dist-esm/react-composites/src/composites/common/SendBox.js +0 -45
  162. package/dist/dist-esm/react-composites/src/composites/common/SendBox.js.map +0 -1
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  });
11
11
  };
12
12
  import React, { useCallback, useState } from 'react';
13
- import { ChatMessageComponentAsEditBox } from '../ChatMessageComponentAsEditBox';
14
13
  import { ChatMyMessageComponentAsMessageBubble } from './ChatMyMessageComponentAsMessageBubble';
14
+ import { ChatMessageComponentAsEditBoxPicker } from './ChatMessageComponentAsEditBoxPicker';
15
15
  /**
16
16
  * @private
17
17
  */
@@ -36,17 +36,24 @@ export const ChatMyMessageComponent = (props) => {
36
36
  onSendMessage && onSendMessage(content !== undefined ? content : '');
37
37
  }, [clientMessageId, content, onSendMessage, onDeleteMessage]);
38
38
  if (isEditing && message.messageType === 'chat') {
39
- return (React.createElement(ChatMessageComponentAsEditBox, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter(void 0, void 0, void 0, function* () {
39
+ return (React.createElement(ChatMessageComponentAsEditBoxPicker, { message: message, strings: props.strings, onSubmit: (text, metadata, options) => __awaiter(void 0, void 0, void 0, function* () {
40
40
  props.onUpdateMessage &&
41
41
  message.messageId &&
42
- (yield props.onUpdateMessage(message.messageId, text, metadata, options));
42
+ (yield props.onUpdateMessage(message.messageId, text,
43
+ /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
44
+ {
45
+ metadata: metadata,
46
+ attachmentMetadata: options === null || options === void 0 ? void 0 : options.attachmentMetadata
47
+ }));
43
48
  setIsEditing(false);
44
49
  }), onCancel: (messageId) => {
45
50
  props.onCancelEditMessage && props.onCancelEditMessage(messageId);
46
51
  setIsEditing(false);
47
52
  },
48
53
  /* @conditional-compile-remove(mention) */
49
- mentionLookupOptions: (_a = props.mentionOptions) === null || _a === void 0 ? void 0 : _a.lookupOptions }));
54
+ mentionLookupOptions: (_a = props.mentionOptions) === null || _a === void 0 ? void 0 : _a.lookupOptions,
55
+ /* @conditional-compile-remove(rich-text-editor) */
56
+ richTextEditor: props.richTextEditor }));
50
57
  }
51
58
  else {
52
59
  return (React.createElement(ChatMyMessageComponentAsMessageBubble, Object.assign({}, props, { onRemoveClick: onRemoveClick, onEditClick: onEditClick, onResendClick: onResendClick, onRenderAvatar: props.onRenderAvatar,
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMyMessageComponent.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.tsx"],"names":[],"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AO,EAAE,KAAK,CAAC,OAAO,EACtB,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;YAC5C,0CAA0C;YAC1C,qBAAqB,EAAE,MAAA,KAAK,CAAC,cAAc,0CAAE,cAAc,IAC3D,CACH,CAAC;IACJ,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _formatString } from '@internal/acs-ui-common';\nimport React, { useCallback, useState } from 'react';\nimport { ChatMessageComponentAsEditBox } from '../ChatMessageComponentAsEditBox';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { ChatMessage, ComponentSlotStyle, OnRenderAvatarCallback } from '../../../types';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../../types';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMenuAction, AttachmentMetadata } from '../../../types/Attachment';\n/* @conditional-compile-remove(mention) */\nimport { MentionOptions } from '../../MentionPopover';\nimport { InlineImageOptions } from '../ChatMessageContent';\nimport { ChatMyMessageComponentAsMessageBubble } from './ChatMyMessageComponentAsMessageBubble';\n\ntype ChatMyMessageComponentProps = {\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage;\n userId: string;\n messageContainerStyle?: ComponentSlotStyle;\n showDate?: boolean;\n disableEditing?: boolean;\n onUpdateMessage?: (\n messageId: string,\n content: string,\n metadata?: Record<string, string>,\n options?: {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[];\n }\n ) => Promise<void>;\n onCancelEditMessage?: (messageId: string) => void;\n /**\n * Callback to delete a message. Also called before resending a message that failed to send.\n * @param messageId ID of the message to delete\n */\n onDeleteMessage?: (messageId: string) => Promise<void>;\n /**\n * Callback to send a message\n * @param content The message content to send\n */\n onSendMessage?: (content: string) => Promise<void>;\n strings: MessageThreadStrings;\n messageStatus?: string;\n /**\n * Optional text to display when the message status is 'failed'.\n */\n failureReason?: string;\n /**\n * Whether the status indicator for each message is displayed or not.\n */\n showMessageStatus?: boolean;\n /**\n * Whether to overlap avatar and message when the view is width constrained.\n */\n shouldOverlapAvatarAndMessage: boolean;\n remoteParticipantsCount?: number;\n onActionButtonClick: (\n message: ChatMessage,\n setMessageReadBy: (readBy: { id: string; displayName: string }[]) => void\n ) => void;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\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 /* @conditional-compile-remove(mention) */\n /**\n * Optional props needed to lookup suggestions and display mentions in the mention scenario.\n * @beta\n */\n mentionOptions?: MentionOptions;\n /**\n * Optional callback called when an inline image is clicked.\n * @beta\n */\n inlineImageOptions?: InlineImageOptions;\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};\n\n/**\n * @private\n */\nexport const ChatMyMessageComponent = (props: ChatMyMessageComponentProps): JSX.Element => {\n const { onDeleteMessage, onSendMessage, message } = props;\n const [isEditing, setIsEditing] = useState(false);\n\n const onEditClick = useCallback(() => setIsEditing(true), [setIsEditing]);\n\n const clientMessageId = 'clientMessageId' in message ? message.clientMessageId : undefined;\n const content = 'content' in message ? message.content : undefined;\n const onRemoveClick = useCallback(() => {\n if (onDeleteMessage && message.messageId) {\n onDeleteMessage(message.messageId);\n }\n // when fail to send, message does not have message id, delete message using clientMessageId\n else if (onDeleteMessage && message.messageType === 'chat' && clientMessageId) {\n onDeleteMessage(clientMessageId);\n }\n }, [onDeleteMessage, message.messageId, message.messageType, clientMessageId]);\n const onResendClick = useCallback(() => {\n onDeleteMessage && clientMessageId && onDeleteMessage(clientMessageId);\n onSendMessage && onSendMessage(content !== undefined ? content : '');\n }, [clientMessageId, content, onSendMessage, onDeleteMessage]);\n\n if (isEditing && message.messageType === 'chat') {\n return (\n <ChatMessageComponentAsEditBox\n message={message}\n strings={props.strings}\n onSubmit={async (text, metadata, options) => {\n props.onUpdateMessage &&\n message.messageId &&\n (await props.onUpdateMessage(message.messageId, text, metadata, options));\n setIsEditing(false);\n }}\n onCancel={(messageId) => {\n props.onCancelEditMessage && props.onCancelEditMessage(messageId);\n setIsEditing(false);\n }}\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions={props.mentionOptions?.lookupOptions}\n />\n );\n } else {\n return (\n <ChatMyMessageComponentAsMessageBubble\n {...props}\n onRemoveClick={onRemoveClick}\n onEditClick={onEditClick}\n onResendClick={onResendClick}\n onRenderAvatar={props.onRenderAvatar}\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString={props.onDisplayDateTimeString}\n strings={props.strings}\n inlineImageOptions={props.inlineImageOptions}\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions={props.mentionOptions?.displayOptions}\n />\n );\n }\n};\n"]}
1
+ {"version":3,"file":"ChatMyMessageComponent.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUrD,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAgF5F;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;;IACxF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,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _formatString } from '@internal/acs-ui-common';\nimport React, { useCallback, useState } from 'react';\nimport { MessageThreadStrings, UpdateMessageCallback } from '../../MessageThread';\nimport { ChatMessage, ComponentSlotStyle, OnRenderAvatarCallback } from '../../../types';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../../types';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMenuAction, AttachmentMetadata } from '../../../types/Attachment';\n/* @conditional-compile-remove(mention) */\nimport { MentionOptions } from '../../MentionPopover';\nimport { InlineImageOptions } from '../ChatMessageContent';\nimport { ChatMyMessageComponentAsMessageBubble } from './ChatMyMessageComponentAsMessageBubble';\nimport { ChatMessageComponentAsEditBoxPicker } from './ChatMessageComponentAsEditBoxPicker';\n\ntype ChatMyMessageComponentProps = {\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage;\n userId: string;\n messageContainerStyle?: ComponentSlotStyle;\n showDate?: boolean;\n disableEditing?: boolean;\n onUpdateMessage?: UpdateMessageCallback;\n onCancelEditMessage?: (messageId: string) => void;\n /**\n * Callback to delete a message. Also called before resending a message that failed to send.\n * @param messageId ID of the message to delete\n */\n onDeleteMessage?: (messageId: string) => Promise<void>;\n /**\n * Callback to send a message\n * @param content The message content to send\n */\n onSendMessage?: (content: string) => Promise<void>;\n strings: MessageThreadStrings;\n messageStatus?: string;\n /**\n * Optional text to display when the message status is 'failed'.\n */\n failureReason?: string;\n /**\n * Whether the status indicator for each message is displayed or not.\n */\n showMessageStatus?: boolean;\n /**\n * Whether to overlap avatar and message when the view is width constrained.\n */\n shouldOverlapAvatarAndMessage: boolean;\n remoteParticipantsCount?: number;\n onActionButtonClick: (\n message: ChatMessage,\n setMessageReadBy: (readBy: { id: string; displayName: string }[]) => void\n ) => void;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\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 /* @conditional-compile-remove(mention) */\n /**\n * Optional props needed to lookup suggestions and display mentions in the mention scenario.\n * @beta\n */\n mentionOptions?: MentionOptions;\n /**\n * Optional callback called when an inline image is clicked.\n * @beta\n */\n inlineImageOptions?: InlineImageOptions;\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 /* @conditional-compile-remove(rich-text-editor) */\n /**\n * Optional flag to enable rich text editor.\n * @beta\n */\n richTextEditor?: boolean;\n};\n\n/**\n * @private\n */\nexport const ChatMyMessageComponent = (props: ChatMyMessageComponentProps): JSX.Element => {\n const { onDeleteMessage, onSendMessage, message } = props;\n const [isEditing, setIsEditing] = useState(false);\n\n const onEditClick = useCallback(() => setIsEditing(true), [setIsEditing]);\n\n const clientMessageId = 'clientMessageId' in message ? message.clientMessageId : undefined;\n const content = 'content' in message ? message.content : undefined;\n const onRemoveClick = useCallback(() => {\n if (onDeleteMessage && message.messageId) {\n onDeleteMessage(message.messageId);\n }\n // when fail to send, message does not have message id, delete message using clientMessageId\n else if (onDeleteMessage && message.messageType === 'chat' && clientMessageId) {\n onDeleteMessage(clientMessageId);\n }\n }, [onDeleteMessage, message.messageId, message.messageType, clientMessageId]);\n const onResendClick = useCallback(() => {\n onDeleteMessage && clientMessageId && onDeleteMessage(clientMessageId);\n onSendMessage && onSendMessage(content !== undefined ? content : '');\n }, [clientMessageId, content, onSendMessage, onDeleteMessage]);\n\n if (isEditing && message.messageType === 'chat') {\n return (\n <ChatMessageComponentAsEditBoxPicker\n message={message}\n strings={props.strings}\n onSubmit={async (text, metadata, options) => {\n props.onUpdateMessage &&\n message.messageId &&\n (await props.onUpdateMessage(\n message.messageId,\n text,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n {\n metadata: metadata,\n attachmentMetadata: options?.attachmentMetadata\n }\n ));\n setIsEditing(false);\n }}\n onCancel={(messageId) => {\n props.onCancelEditMessage && props.onCancelEditMessage(messageId);\n setIsEditing(false);\n }}\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions={props.mentionOptions?.lookupOptions}\n /* @conditional-compile-remove(rich-text-editor) */\n richTextEditor={props.richTextEditor}\n />\n );\n } else {\n return (\n <ChatMyMessageComponentAsMessageBubble\n {...props}\n onRemoveClick={onRemoveClick}\n onEditClick={onEditClick}\n onResendClick={onResendClick}\n onRenderAvatar={props.onRenderAvatar}\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString={props.onDisplayDateTimeString}\n strings={props.strings}\n inlineImageOptions={props.inlineImageOptions}\n /* @conditional-compile-remove(mention) */\n mentionDisplayOptions={props.mentionOptions?.displayOptions}\n />\n );\n }\n};\n"]}
@@ -25,7 +25,9 @@ export const FluentChatMyMessageComponent = (props) => {
25
25
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
26
26
  actionsForAttachment,
27
27
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
28
- onRenderAttachmentDownloads } = props;
28
+ onRenderAttachmentDownloads,
29
+ /* @conditional-compile-remove(rich-text-editor) */
30
+ richTextEditor } = props;
29
31
  const chatMessageRenderStyles = useChatMessageRenderStyles();
30
32
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
31
33
  const onRenderAttachmentDownloadsMemo = useMemo(() => {
@@ -50,7 +52,9 @@ export const FluentChatMyMessageComponent = (props) => {
50
52
  /* @conditional-compile-remove(mention) */
51
53
  mentionOptions: mentionOptions,
52
54
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
53
- actionsForAttachment: actionsForAttachment })));
55
+ actionsForAttachment: actionsForAttachment,
56
+ /* @conditional-compile-remove(rich-text-editor) */
57
+ richTextEditor: richTextEditor })));
54
58
  }
55
59
  return React.createElement(React.Fragment, null);
56
60
  }, [
@@ -70,7 +74,9 @@ export const FluentChatMyMessageComponent = (props) => {
70
74
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
71
75
  actionsForAttachment,
72
76
  // eslint-disable-next-line react-hooks/exhaustive-deps
73
- new Date().toDateString()
77
+ new Date().toDateString(),
78
+ /* @conditional-compile-remove(rich-text-editor) */
79
+ richTextEditor
74
80
  ]);
75
81
  const messageRenderer = useCallback((messageProps) => {
76
82
  return onRenderMessage === undefined
@@ -1 +1 @@
1
- {"version":3,"file":"FluentChatMyMessageComponent.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAKpD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACrG,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAGjF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,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AC,EAAE,CAAC,uBAAuB,CAAC,UAAU,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC;IAEhF,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;;QACvC,OAAO,CACL,6BACE,SAAS,EAAE,WAAW,CACpB,EAAE,WAAW,EAAE,SAAS,EAAE,EAC1B,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,sBAAsB,EAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAA,OAAO,CAAC,IAAI,mCAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAC3F,IAEA,OAAO,CAAC,MAAM;YACb,CAAC,CAAC,qBAAqB,CACnB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,CACV;YACH,CAAC,CAAC,SAAS,CACT,CACP,CAAC;IACJ,CAAC,EAAE;QACD,qBAAqB;QACrB,OAAO,CAAC,IAAI;QACZ,OAAO,CAAC,MAAM;QACd,qBAAqB;QACrB,qBAAqB;QACrB,gBAAgB;QAChB,SAAS;QACT,iBAAiB;QACjB,MAAM;KACP,CAAC,CAAC;IAEH,8EAA8E;IAC9E,uFAAuF;IACvF,iFAAiF;IACjF,2EAA2E;IAC3E,OAAO,CACL,oBAAC,mBAAmB,IAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,kBAAkB,EACxB,IAAI,EAAE,kBAAkB,EACxB,UAAU,EAAE,mBAAmB,IAE9B,eAAe,mBAAM,KAAK,EAAG,CACV,CACvB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageStatus, _formatString } from '@internal/acs-ui-common';\nimport React, { useCallback, useMemo } from 'react';\nimport { MessageProps, _ChatMessageProps } from '../../MessageThread';\nimport { ChatMessage } from '../../../types';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../../types';\nimport { noMessageStatusStyle, useChatMessageRenderStyles } from '../../styles/MessageThread.styles';\nimport { mergeStyles } from '@fluentui/react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { createStyleFromV8Style } from '../../styles/v8StyleShim';\nimport { MessageStatusIndicatorProps } from '../../MessageStatusIndicator';\nimport { ChatMyMessageComponent } from './ChatMyMessageComponent';\nimport { ChatMyMessage as FluentChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { getFluentUIAttachedValue } from '../../utils/ChatMessageComponentUtils';\nimport type { FluentChatMessageComponentWrapperProps } from '../MessageComponents/FluentChatMessageComponent';\n\n/**\n * The component for rendering a chat message using Fluent UI components\n * and handling default and custom renderers.\n * This component handles rendering for chat message body, avatar and message status.\n * The chat message body, avatar and message status should be shown for both default and custom renderers.\n *\n * @private\n */\nexport const FluentChatMyMessageComponent = (props: FluentChatMessageComponentWrapperProps): JSX.Element => {\n const {\n message,\n styles,\n shouldOverlapAvatarAndMessage,\n onRenderMessage,\n onRenderAvatar,\n showMessageStatus,\n onRenderMessageStatus,\n participantCount,\n readCount,\n onActionButtonClick,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString,\n inlineImageOptions,\n /* @conditional-compile-remove(mention) */\n mentionOptions,\n userId,\n defaultStatusRenderer,\n statusToRender,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentDownloads\n } = props;\n const chatMessageRenderStyles = useChatMessageRenderStyles();\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentDownloadsMemo = useMemo(() => {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return onRenderAttachmentDownloads;\n return undefined;\n }, [\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ onRenderAttachmentDownloads\n ]);\n\n // To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp\n // needs to be regenerated), the dependency on \"new Date().toDateString()\"\" is added.\n const defaultChatMessageRenderer = useCallback(\n (messageProps: MessageProps) => {\n if (\n messageProps.message.messageType === 'chat' ||\n /* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked'\n ) {\n return (\n <ChatMyMessageComponent\n {...messageProps}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentDownloads={onRenderAttachmentDownloadsMemo}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n strings={messageProps.strings}\n message={messageProps.message}\n userId={userId}\n remoteParticipantsCount={participantCount ? participantCount - 1 : 0}\n shouldOverlapAvatarAndMessage={shouldOverlapAvatarAndMessage}\n onRenderAvatar={onRenderAvatar}\n showMessageStatus={showMessageStatus}\n messageStatus={messageProps.message.status}\n onActionButtonClick={onActionButtonClick}\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString={onDisplayDateTimeString}\n inlineImageOptions={inlineImageOptions}\n /* @conditional-compile-remove(mention) */\n mentionOptions={mentionOptions}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment={actionsForAttachment}\n />\n );\n }\n return <></>;\n },\n [\n onActionButtonClick,\n onRenderAvatar,\n participantCount,\n shouldOverlapAvatarAndMessage,\n showMessageStatus,\n userId,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString,\n inlineImageOptions,\n /* @conditional-compile-remove(mention) */\n mentionOptions,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentDownloadsMemo,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n new Date().toDateString()\n ]\n );\n\n const messageRenderer = useCallback(\n (messageProps: MessageProps) => {\n return onRenderMessage === undefined\n ? defaultChatMessageRenderer({ ...messageProps })\n : onRenderMessage(messageProps, defaultChatMessageRenderer);\n },\n [defaultChatMessageRenderer, onRenderMessage]\n );\n\n const messageStatusRenderer = useCallback(\n (\n onRenderMessageStatus:\n | ((messageStatusIndicatorProps: MessageStatusIndicatorProps) => JSX.Element | null)\n | undefined,\n defaultStatusRenderer: (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n participantCount: number,\n readCount: number,\n status?: MessageStatus\n ) => JSX.Element,\n showMessageStatus?: boolean,\n participantCount?: number,\n readCount?: number\n ) => {\n return showMessageStatus && statusToRender ? (\n onRenderMessageStatus ? (\n onRenderMessageStatus({ status: message.status })\n ) : (\n defaultStatusRenderer(message, participantCount ?? 0, readCount ?? 0, message.status)\n )\n ) : (\n <div className={mergeStyles(noMessageStatusStyle)} />\n );\n },\n [message, statusToRender]\n );\n\n const attached = useMemo(() => {\n return getFluentUIAttachedValue(message.attached);\n }, [message.attached]);\n\n const myMessageRootProps = useMemo(() => {\n return {\n // myChatItemMessageContainer used in className and style prop as style prop can't handle CSS selectors\n className: mergeClasses(\n chatMessageRenderStyles.rootMyMessage,\n chatMessageRenderStyles.rootCommon,\n mergeStyles(styles?.myChatItemMessageContainer)\n ),\n style:\n styles?.myChatItemMessageContainer !== undefined\n ? createStyleFromV8Style(styles?.myChatItemMessageContainer)\n : {},\n role: 'none'\n };\n }, [chatMessageRenderStyles.rootCommon, chatMessageRenderStyles.rootMyMessage, styles?.myChatItemMessageContainer]);\n\n const myMessageBodyProps = useMemo(() => {\n return {\n className: mergeClasses(chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage),\n // make body not focusable to remove repetitions from narrators.\n // inner components are already focusable\n tabIndex: -1,\n role: 'none'\n };\n }, [chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage]);\n\n const myMessageStatusIcon = useMemo(() => {\n return (\n <div\n className={mergeStyles(\n { paddingLeft: '0.25rem' },\n styles?.messageStatusContainer ? styles.messageStatusContainer(message.mine ?? false) : ''\n )}\n >\n {message.status\n ? messageStatusRenderer(\n onRenderMessageStatus,\n defaultStatusRenderer,\n showMessageStatus,\n participantCount,\n readCount\n )\n : undefined}\n </div>\n );\n }, [\n defaultStatusRenderer,\n message.mine,\n message.status,\n messageStatusRenderer,\n onRenderMessageStatus,\n participantCount,\n readCount,\n showMessageStatus,\n styles\n ]);\n\n // Fluent UI message components are used here as for default message renderer,\n // timestamp and author name should be shown but they aren't shown for custom renderer.\n // More investigations are needed to check if this can be simplified with states.\n // Status and avatar should be shown for both custom and default renderers.\n return (\n <FluentChatMyMessage\n attached={attached}\n root={myMessageRootProps}\n body={myMessageBodyProps}\n statusIcon={myMessageStatusIcon}\n >\n {messageRenderer({ ...props })}\n </FluentChatMyMessage>\n );\n};\n"]}
1
+ {"version":3,"file":"FluentChatMyMessageComponent.js","sourceRoot":"","sources":["../../../../../../../../react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAKpD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AACrG,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AAGjF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAA6C,EAAe,EAAE;IACzG,MAAM,EACJ,OAAO,EACP,MAAM,EACN,6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SACb,CAAC;IACJ,CAAC,EAAE,CAAC,uBAAuB,CAAC,UAAU,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAC,CAAC;IAEhF,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;;QACvC,OAAO,CACL,6BACE,SAAS,EAAE,WAAW,CACpB,EAAE,WAAW,EAAE,SAAS,EAAE,EAC1B,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,sBAAsB,EAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAA,OAAO,CAAC,IAAI,mCAAI,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAC3F,IAEA,OAAO,CAAC,MAAM;YACb,CAAC,CAAC,qBAAqB,CACnB,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,CACV;YACH,CAAC,CAAC,SAAS,CACT,CACP,CAAC;IACJ,CAAC,EAAE;QACD,qBAAqB;QACrB,OAAO,CAAC,IAAI;QACZ,OAAO,CAAC,MAAM;QACd,qBAAqB;QACrB,qBAAqB;QACrB,gBAAgB;QAChB,SAAS;QACT,iBAAiB;QACjB,MAAM;KACP,CAAC,CAAC;IAEH,8EAA8E;IAC9E,uFAAuF;IACvF,iFAAiF;IACjF,2EAA2E;IAC3E,OAAO,CACL,oBAAC,mBAAmB,IAClB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,kBAAkB,EACxB,IAAI,EAAE,kBAAkB,EACxB,UAAU,EAAE,mBAAmB,IAE9B,eAAe,mBAAM,KAAK,EAAG,CACV,CACvB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageStatus, _formatString } from '@internal/acs-ui-common';\nimport React, { useCallback, useMemo } from 'react';\nimport { MessageProps, _ChatMessageProps } from '../../MessageThread';\nimport { ChatMessage } from '../../../types';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../../types';\nimport { noMessageStatusStyle, useChatMessageRenderStyles } from '../../styles/MessageThread.styles';\nimport { mergeStyles } from '@fluentui/react';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { createStyleFromV8Style } from '../../styles/v8StyleShim';\nimport { MessageStatusIndicatorProps } from '../../MessageStatusIndicator';\nimport { ChatMyMessageComponent } from './ChatMyMessageComponent';\nimport { ChatMyMessage as FluentChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { getFluentUIAttachedValue } from '../../utils/ChatMessageComponentUtils';\nimport type { FluentChatMessageComponentWrapperProps } from '../MessageComponents/FluentChatMessageComponent';\n\n/**\n * The component for rendering a chat message using Fluent UI components\n * and handling default and custom renderers.\n * This component handles rendering for chat message body, avatar and message status.\n * The chat message body, avatar and message status should be shown for both default and custom renderers.\n *\n * @private\n */\nexport const FluentChatMyMessageComponent = (props: FluentChatMessageComponentWrapperProps): JSX.Element => {\n const {\n message,\n styles,\n shouldOverlapAvatarAndMessage,\n onRenderMessage,\n onRenderAvatar,\n showMessageStatus,\n onRenderMessageStatus,\n participantCount,\n readCount,\n onActionButtonClick,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString,\n inlineImageOptions,\n /* @conditional-compile-remove(mention) */\n mentionOptions,\n userId,\n defaultStatusRenderer,\n statusToRender,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentDownloads,\n /* @conditional-compile-remove(rich-text-editor) */\n richTextEditor\n } = props;\n const chatMessageRenderStyles = useChatMessageRenderStyles();\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentDownloadsMemo = useMemo(() => {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n return onRenderAttachmentDownloads;\n return undefined;\n }, [\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */ onRenderAttachmentDownloads\n ]);\n\n // To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp\n // needs to be regenerated), the dependency on \"new Date().toDateString()\"\" is added.\n const defaultChatMessageRenderer = useCallback(\n (messageProps: MessageProps) => {\n if (\n messageProps.message.messageType === 'chat' ||\n /* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked'\n ) {\n return (\n <ChatMyMessageComponent\n {...messageProps}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentDownloads={onRenderAttachmentDownloadsMemo}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n strings={messageProps.strings}\n message={messageProps.message}\n userId={userId}\n remoteParticipantsCount={participantCount ? participantCount - 1 : 0}\n shouldOverlapAvatarAndMessage={shouldOverlapAvatarAndMessage}\n onRenderAvatar={onRenderAvatar}\n showMessageStatus={showMessageStatus}\n messageStatus={messageProps.message.status}\n onActionButtonClick={onActionButtonClick}\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString={onDisplayDateTimeString}\n inlineImageOptions={inlineImageOptions}\n /* @conditional-compile-remove(mention) */\n mentionOptions={mentionOptions}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment={actionsForAttachment}\n /* @conditional-compile-remove(rich-text-editor) */\n richTextEditor={richTextEditor}\n />\n );\n }\n return <></>;\n },\n [\n onActionButtonClick,\n onRenderAvatar,\n participantCount,\n shouldOverlapAvatarAndMessage,\n showMessageStatus,\n userId,\n /* @conditional-compile-remove(date-time-customization) */\n onDisplayDateTimeString,\n inlineImageOptions,\n /* @conditional-compile-remove(mention) */\n mentionOptions,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentDownloadsMemo,\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n actionsForAttachment,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n new Date().toDateString(),\n /* @conditional-compile-remove(rich-text-editor) */\n richTextEditor\n ]\n );\n\n const messageRenderer = useCallback(\n (messageProps: MessageProps) => {\n return onRenderMessage === undefined\n ? defaultChatMessageRenderer({ ...messageProps })\n : onRenderMessage(messageProps, defaultChatMessageRenderer);\n },\n [defaultChatMessageRenderer, onRenderMessage]\n );\n\n const messageStatusRenderer = useCallback(\n (\n onRenderMessageStatus:\n | ((messageStatusIndicatorProps: MessageStatusIndicatorProps) => JSX.Element | null)\n | undefined,\n defaultStatusRenderer: (\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage,\n participantCount: number,\n readCount: number,\n status?: MessageStatus\n ) => JSX.Element,\n showMessageStatus?: boolean,\n participantCount?: number,\n readCount?: number\n ) => {\n return showMessageStatus && statusToRender ? (\n onRenderMessageStatus ? (\n onRenderMessageStatus({ status: message.status })\n ) : (\n defaultStatusRenderer(message, participantCount ?? 0, readCount ?? 0, message.status)\n )\n ) : (\n <div className={mergeStyles(noMessageStatusStyle)} />\n );\n },\n [message, statusToRender]\n );\n\n const attached = useMemo(() => {\n return getFluentUIAttachedValue(message.attached);\n }, [message.attached]);\n\n const myMessageRootProps = useMemo(() => {\n return {\n // myChatItemMessageContainer used in className and style prop as style prop can't handle CSS selectors\n className: mergeClasses(\n chatMessageRenderStyles.rootMyMessage,\n chatMessageRenderStyles.rootCommon,\n mergeStyles(styles?.myChatItemMessageContainer)\n ),\n style:\n styles?.myChatItemMessageContainer !== undefined\n ? createStyleFromV8Style(styles?.myChatItemMessageContainer)\n : {},\n role: 'none'\n };\n }, [chatMessageRenderStyles.rootCommon, chatMessageRenderStyles.rootMyMessage, styles?.myChatItemMessageContainer]);\n\n const myMessageBodyProps = useMemo(() => {\n return {\n className: mergeClasses(chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage),\n // make body not focusable to remove repetitions from narrators.\n // inner components are already focusable\n tabIndex: -1,\n role: 'none'\n };\n }, [chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage]);\n\n const myMessageStatusIcon = useMemo(() => {\n return (\n <div\n className={mergeStyles(\n { paddingLeft: '0.25rem' },\n styles?.messageStatusContainer ? styles.messageStatusContainer(message.mine ?? false) : ''\n )}\n >\n {message.status\n ? messageStatusRenderer(\n onRenderMessageStatus,\n defaultStatusRenderer,\n showMessageStatus,\n participantCount,\n readCount\n )\n : undefined}\n </div>\n );\n }, [\n defaultStatusRenderer,\n message.mine,\n message.status,\n messageStatusRenderer,\n onRenderMessageStatus,\n participantCount,\n readCount,\n showMessageStatus,\n styles\n ]);\n\n // Fluent UI message components are used here as for default message renderer,\n // timestamp and author name should be shown but they aren't shown for custom renderer.\n // More investigations are needed to check if this can be simplified with states.\n // Status and avatar should be shown for both custom and default renderers.\n return (\n <FluentChatMyMessage\n attached={attached}\n root={myMessageRootProps}\n body={myMessageBodyProps}\n statusIcon={myMessageStatusIcon}\n >\n {messageRenderer({ ...props })}\n </FluentChatMyMessage>\n );\n};\n"]}
@@ -36,7 +36,7 @@ export const _ReactionDrawerMenuItem = (props) => {
36
36
  marginTop: '12px'
37
37
  }
38
38
  };
39
- return (React.createElement(Stack, { id: "reaction", role: "menuitem", horizontal: true, className: mergeStyles(drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small), props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined, modifiedFirstItemStyle.root) },
39
+ return (React.createElement(Stack, { "data-ui-id": "reaction-mobile-drawer-menu-item", id: "reaction", role: "menuitem", horizontal: true, className: mergeStyles(drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small), props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined, modifiedFirstItemStyle.root) },
40
40
  React.createElement("div", { style: mobileViewMenuItemStyle() }, emojis.map((emoji, index) => {
41
41
  const resourceUrl = emojiResource.get(emoji.toString());
42
42
  return (React.createElement(IconButton, { key: index, onClick: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"ReactionDrawerMenuItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Drawer/ReactionDrawerMenuItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2CAA2C;AAC3C,OAAO,EAAqB,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxE,2CAA2C;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,2CAA2C;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,2CAA2C;AAC3C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AACjG,2CAA2C;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA0B7C,2CAA2C;AAC3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IACpF,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC1C,MAAM,aAAa,GAAoC,IAAI,GAAG,CAAC;QAC7D,CAAC,MAAM,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,YAAY,0CAAE,GAAG,CAAC;QACtC,CAAC,OAAO,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,aAAa,0CAAE,GAAG,CAAC;QACxC,CAAC,OAAO,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,aAAa,0CAAE,GAAG,CAAC;QACxC,CAAC,UAAU,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,gBAAgB,0CAAE,GAAG,CAAC;QAC9C,CAAC,WAAW,EAAE,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,iBAAiB,0CAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IACH,M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AAE,QAAmB,EAAU,EAAE,CAAC,iCACtF,QAAQ,KACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,SAAS,EACjB,gBAAgB,EAAE;QAChB,UAAU,EAAE,eAAe;KAC5B,IACD,CAAC;AAEH,2CAA2C;AAC3C,MAAM,gCAAgC,GAAG,CAAC,UAAkB,EAAU,EAAE,CAAC,CAAC;IACxE,aAAa,EAAE,MAAM;IACrB,UAAU,EAAE,UAAU;IACtB,gBAAgB,EAAE;QAChB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport { IRawStyle, IStyle, mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport React from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { useTheme } from '../../theming/FluentThemeProvider';\n/* @conditional-compile-remove(reaction) */\nimport { mobileViewEmojiStyles, mobileViewMenuItemStyle } from '../styles/ReactionButton.styles';\n/* @conditional-compile-remove(reaction) */\nimport { IconButton } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { _DrawerMenuItemProps, ReactionResources } from '../..';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Props for the ReactionMenuItem\n *\n * @internal\n */\nexport interface _ReactionMenuItemProps {\n /**\n * Reaction resources to render for mobile button menus for reaction\n */\n reactionResources?: ReactionResources;\n /**\n * reaction click event from the call adapter.\n */\n onReactionClick?: (reaction: string) => Promise<void>;\n /**\n * Whether the menu item is disabled\n * @defaultvalue false\n */\n disabled?: boolean;\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Maps the individual item in menuProps.items passed in the {@link DrawerMenu} into a UI component.\n *\n * @internal\n */\nexport const _ReactionDrawerMenuItem = (props: _ReactionMenuItemProps): JSX.Element => {\n const theme = useTheme();\n const resources = props.reactionResources;\n const emojiResource: Map<string, string | undefined> = new Map([\n ['like', resources?.likeReaction?.url],\n ['heart', resources?.heartReaction?.url],\n ['laugh', resources?.laughReaction?.url],\n ['applause', resources?.applauseReaction?.url],\n ['surprised', resources?.surprisedReaction?.url]\n ]);\n const emojis: string[] = ['like', 'heart', 'laugh', 'applause', 'surprised'];\n\n const borderRadius = useTheme().effects.roundedCorner4;\n const modifiedFirstItemStyle = {\n root: {\n borderTopRightRadius: borderRadius,\n borderTopLeftRadius: borderRadius,\n marginTop: '12px'\n }\n };\n\n return (\n <Stack\n id=\"reaction\"\n role=\"menuitem\"\n horizontal\n className={mergeStyles(\n drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small),\n props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined,\n modifiedFirstItemStyle.root\n )}\n >\n <div style={mobileViewMenuItemStyle()}>\n {emojis.map((emoji, index) => {\n const resourceUrl = emojiResource.get(emoji.toString());\n\n return (\n <IconButton\n key={index}\n onClick={() => {\n props.onReactionClick?.(emoji);\n }}\n style={mobileViewEmojiStyles(resourceUrl ? resourceUrl : '', 'running')}\n />\n );\n })}\n </div>\n </Stack>\n );\n};\n\n/* @conditional-compile-remove(reaction) */\nconst drawerMenuItemRootStyles = (hoverBackground: string, fontSize: IRawStyle): IStyle => ({\n ...fontSize,\n height: '3rem',\n lineHeight: '3rem',\n padding: '0rem 0.75rem',\n cursor: 'pointer',\n ':hover, :focus': {\n background: hoverBackground\n }\n});\n\n/* @conditional-compile-remove(reaction) */\nconst disabledDrawerMenuItemRootStyles = (background: string): IStyle => ({\n pointerEvents: 'none',\n background: background,\n ':hover, :focus': {\n background: background\n }\n});\n"]}
1
+ {"version":3,"file":"ReactionDrawerMenuItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Drawer/ReactionDrawerMenuItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,2CAA2C;AAC3C,OAAO,EAAqB,WAAW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,eAAe;KAC5B,IACD,CAAC;AAEH,2CAA2C;AAC3C,MAAM,gCAAgC,GAAG,CAAC,UAAkB,EAAU,EAAE,CAAC,CAAC;IACxE,aAAa,EAAE,MAAM;IACrB,UAAU,EAAE,UAAU;IACtB,gBAAgB,EAAE;QAChB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport { IRawStyle, IStyle, mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport React from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { useTheme } from '../../theming/FluentThemeProvider';\n/* @conditional-compile-remove(reaction) */\nimport { mobileViewEmojiStyles, mobileViewMenuItemStyle } from '../styles/ReactionButton.styles';\n/* @conditional-compile-remove(reaction) */\nimport { IconButton } from '@fluentui/react';\n/* @conditional-compile-remove(reaction) */\nimport { _DrawerMenuItemProps, ReactionResources } from '../..';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Props for the ReactionMenuItem\n *\n * @internal\n */\nexport interface _ReactionMenuItemProps {\n /**\n * Reaction resources to render for mobile button menus for reaction\n */\n reactionResources?: ReactionResources;\n /**\n * reaction click event from the call adapter.\n */\n onReactionClick?: (reaction: string) => Promise<void>;\n /**\n * Whether the menu item is disabled\n * @defaultvalue false\n */\n disabled?: boolean;\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Maps the individual item in menuProps.items passed in the {@link DrawerMenu} into a UI component.\n *\n * @internal\n */\nexport const _ReactionDrawerMenuItem = (props: _ReactionMenuItemProps): JSX.Element => {\n const theme = useTheme();\n const resources = props.reactionResources;\n const emojiResource: Map<string, string | undefined> = new Map([\n ['like', resources?.likeReaction?.url],\n ['heart', resources?.heartReaction?.url],\n ['laugh', resources?.laughReaction?.url],\n ['applause', resources?.applauseReaction?.url],\n ['surprised', resources?.surprisedReaction?.url]\n ]);\n const emojis: string[] = ['like', 'heart', 'laugh', 'applause', 'surprised'];\n\n const borderRadius = useTheme().effects.roundedCorner4;\n const modifiedFirstItemStyle = {\n root: {\n borderTopRightRadius: borderRadius,\n borderTopLeftRadius: borderRadius,\n marginTop: '12px'\n }\n };\n\n return (\n <Stack\n data-ui-id=\"reaction-mobile-drawer-menu-item\"\n id=\"reaction\"\n role=\"menuitem\"\n horizontal\n className={mergeStyles(\n drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small),\n props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined,\n modifiedFirstItemStyle.root\n )}\n >\n <div style={mobileViewMenuItemStyle()}>\n {emojis.map((emoji, index) => {\n const resourceUrl = emojiResource.get(emoji.toString());\n\n return (\n <IconButton\n key={index}\n onClick={() => {\n props.onReactionClick?.(emoji);\n }}\n style={mobileViewEmojiStyles(resourceUrl ? resourceUrl : '', 'running')}\n />\n );\n })}\n </div>\n </Stack>\n );\n};\n\n/* @conditional-compile-remove(reaction) */\nconst drawerMenuItemRootStyles = (hoverBackground: string, fontSize: IRawStyle): IStyle => ({\n ...fontSize,\n height: '3rem',\n lineHeight: '3rem',\n padding: '0rem 0.75rem',\n cursor: 'pointer',\n ':hover, :focus': {\n background: hoverBackground\n }\n});\n\n/* @conditional-compile-remove(reaction) */\nconst disabledDrawerMenuItemRootStyles = (background: string): IStyle => ({\n pointerEvents: 'none',\n background: background,\n ':hover, :focus': {\n background: background\n }\n});\n"]}
@@ -11,7 +11,7 @@ import { RemoteContentShareReactionOverlay } from './VideoGallery/RemoteContentS
11
11
  * Emoji max size
12
12
  * @internal
13
13
  */
14
- const DEFAULT_EMOJI_MAX_SIZE_PX = 100;
14
+ const DEFAULT_EMOJI_MAX_SIZE_PX = 70;
15
15
  /* @conditional-compile-remove(reaction) */
16
16
  /**
17
17
  * Emoji min size
@@ -1 +1 @@
1
- {"version":3,"file":"MeetingReactionOverlay.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MeetingReactionO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pC,CACE,CACP,CAAC;IACJ,CAAC;SAAM,IAAI,KAAK,CAAC,WAAW,KAAK,cAAc,IAAI,KAAK,CAAC,WAAW,KAAK,eAAe,EAAE,CAAC;QACzF,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;YAC9D,oBAAC,iCAAiC,IAChC,aAAa,EAAE,SAAS,EACxB,YAAY,EAAE,QAAQ,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,GACtC,CACE,CACP,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,yCAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport {\n OverlayModeTypes,\n Reaction,\n ReactionResources,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant\n} from '../types';\n/* @conditional-compile-remove(reaction) */\nimport React, { useLayoutEffect, useRef, useState } from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { ParticipantVideoTileOverlay } from './VideoGallery/ParticipantVideoTileOverlay';\n/* @conditional-compile-remove(reaction) */\nimport { RemoteContentShareReactionOverlay } from './VideoGallery/RemoteContentShareReactionOverlay';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Reaction overlay component props\n *\n * Can be used with {@link VideoTile}.\n *\n * @internal\n */\nexport interface MeetingReactionOverlayProps {\n /**\n * Reaction rendering overlay type. i.e. single reaction rendering on grid-tile, screen share mode overlay\n */\n overlayMode: OverlayModeTypes;\n /**\n * Received reaction when overlay mode is grid-tile\n */\n reaction?: Reaction;\n /**\n * Reactions resources' url and metadata.\n */\n reactionResources: ReactionResources;\n /**\n * Local participant's reaction event that comes from participant object.\n */\n localParticipant?: VideoGalleryLocalParticipant;\n /**\n * Remote participant's reaction event.\n */\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Emoji max size\n * @internal\n */\nconst DEFAULT_EMOJI_MAX_SIZE_PX = 100;\n/* @conditional-compile-remove(reaction) */\n/**\n * Emoji min size\n * @internal\n */\nconst DEFAULT_EMOJI_MIN_SIZE_PX = 32;\n/* @conditional-compile-remove(reaction) */\n/**\n * Emoji resize scale constant\n * @internal\n */\nconst REACTION_EMOJI_RESIZE_SCALE_CONSTANT = 3;\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Reaction overlay component\n *\n * Can be used with {@link VideoTile}.\n *\n * @internal\n */\nexport const MeetingReactionOverlay = (props: MeetingReactionOverlayProps): JSX.Element => {\n const { overlayMode, reaction, reactionResources, localParticipant, remoteParticipants } = props;\n const [emojiSizePx, setEmojiSizePx] = useState(0);\n const [divHeight, setDivHeight] = useState(0);\n const [divWidth, setDivWidth] = useState(0);\n const videoTileRef = useRef<HTMLDivElement>(null);\n\n const observer = useRef(\n new ResizeObserver((entries): void => {\n const domRect = entries.at(0)?.contentRect;\n const width = domRect !== undefined ? domRect.width : 0;\n const height = domRect !== undefined ? domRect.height : 0;\n const reactionEmojiCalcSize = Math.min(width, height) / REACTION_EMOJI_RESIZE_SCALE_CONSTANT;\n // we only want to set the persona size if it has changed\n if (reactionEmojiCalcSize !== emojiSizePx) {\n setEmojiSizePx(Math.max(Math.min(reactionEmojiCalcSize, DEFAULT_EMOJI_MAX_SIZE_PX), DEFAULT_EMOJI_MIN_SIZE_PX));\n }\n\n if (height !== divHeight) {\n setDivHeight(height);\n }\n\n if (width !== divWidth) {\n setDivWidth(width);\n }\n })\n );\n\n useLayoutEffect(() => {\n if (videoTileRef.current) {\n observer.current.observe(videoTileRef.current);\n }\n const currentObserver = observer.current;\n return () => currentObserver.disconnect();\n }, [videoTileRef]);\n\n if (overlayMode === 'grid-tiles') {\n return (\n <div ref={videoTileRef} style={{ width: '100%', height: '100%' }}>\n <ParticipantVideoTileOverlay\n emojiSize={emojiSizePx}\n reaction={reaction}\n reactionResources={reactionResources}\n />\n </div>\n );\n } else if (props.overlayMode === 'screen-share' || props.overlayMode === 'content-share') {\n return (\n <div ref={videoTileRef} style={{ width: '100%', height: '100%' }}>\n <RemoteContentShareReactionOverlay\n hostDivHeight={divHeight}\n hostDivWidth={divWidth}\n reactionResources={reactionResources}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n />\n </div>\n );\n } else {\n return <></>;\n }\n};\n"]}
1
+ {"version":3,"file":"MeetingReactionOverlay.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/MeetingReactionOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,2CAA2C;AAC3C,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,2CAA2C;AAC3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,2CAA2C;AAC3C,OAAO,EAAE,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AAiCrG,2CAA2C;AAC3C;;;GAGG;AACH,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,2CAA2C;AAC3C;;;GAGG;AACH,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,2CAA2C;AAC3C;;;GAGG;AACH,MAAM,oCAAoC,GAAG,CAAC,CAAC;AAE/C,2CAA2C;AAC3C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;IACxF,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IACjG,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CA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AQ,CAAC,OAAO,CAAC;QACzC,OAAO,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;IAC5C,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,IAAI,WAAW,KAAK,YAAY,EAAE,CAAC;QACjC,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;YAC9D,oBAAC,2BAA2B,IAC1B,SAAS,EAAE,WAAW,EACtB,QAAQ,EAAE,QAAQ,EAClB,iBAAiB,EAAE,iBAAiB,GACpC,CACE,CACP,CAAC;IACJ,CAAC;SAAM,IAAI,KAAK,CAAC,WAAW,KAAK,cAAc,IAAI,KAAK,CAAC,WAAW,KAAK,eAAe,EAAE,CAAC;QACzF,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;YAC9D,oBAAC,iCAAiC,IAChC,aAAa,EAAE,SAAS,EACxB,YAAY,EAAE,QAAQ,EACtB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,GACtC,CACE,CACP,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,yCAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(reaction) */\nimport {\n OverlayModeTypes,\n Reaction,\n ReactionResources,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant\n} from '../types';\n/* @conditional-compile-remove(reaction) */\nimport React, { useLayoutEffect, useRef, useState } from 'react';\n/* @conditional-compile-remove(reaction) */\nimport { ParticipantVideoTileOverlay } from './VideoGallery/ParticipantVideoTileOverlay';\n/* @conditional-compile-remove(reaction) */\nimport { RemoteContentShareReactionOverlay } from './VideoGallery/RemoteContentShareReactionOverlay';\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Reaction overlay component props\n *\n * Can be used with {@link VideoTile}.\n *\n * @internal\n */\nexport interface MeetingReactionOverlayProps {\n /**\n * Reaction rendering overlay type. i.e. single reaction rendering on grid-tile, screen share mode overlay\n */\n overlayMode: OverlayModeTypes;\n /**\n * Received reaction when overlay mode is grid-tile\n */\n reaction?: Reaction;\n /**\n * Reactions resources' url and metadata.\n */\n reactionResources: ReactionResources;\n /**\n * Local participant's reaction event that comes from participant object.\n */\n localParticipant?: VideoGalleryLocalParticipant;\n /**\n * Remote participant's reaction event.\n */\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n}\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Emoji max size\n * @internal\n */\nconst DEFAULT_EMOJI_MAX_SIZE_PX = 70;\n/* @conditional-compile-remove(reaction) */\n/**\n * Emoji min size\n * @internal\n */\nconst DEFAULT_EMOJI_MIN_SIZE_PX = 32;\n/* @conditional-compile-remove(reaction) */\n/**\n * Emoji resize scale constant\n * @internal\n */\nconst REACTION_EMOJI_RESIZE_SCALE_CONSTANT = 3;\n\n/* @conditional-compile-remove(reaction) */\n/**\n * Reaction overlay component\n *\n * Can be used with {@link VideoTile}.\n *\n * @internal\n */\nexport const MeetingReactionOverlay = (props: MeetingReactionOverlayProps): JSX.Element => {\n const { overlayMode, reaction, reactionResources, localParticipant, remoteParticipants } = props;\n const [emojiSizePx, setEmojiSizePx] = useState(0);\n const [divHeight, setDivHeight] = useState(0);\n const [divWidth, setDivWidth] = useState(0);\n const videoTileRef = useRef<HTMLDivElement>(null);\n\n const observer = useRef(\n new ResizeObserver((entries): void => {\n const domRect = entries.at(0)?.contentRect;\n const width = domRect !== undefined ? domRect.width : 0;\n const height = domRect !== undefined ? domRect.height : 0;\n const reactionEmojiCalcSize = Math.min(width, height) / REACTION_EMOJI_RESIZE_SCALE_CONSTANT;\n // we only want to set the persona size if it has changed\n if (reactionEmojiCalcSize !== emojiSizePx) {\n setEmojiSizePx(Math.max(Math.min(reactionEmojiCalcSize, DEFAULT_EMOJI_MAX_SIZE_PX), DEFAULT_EMOJI_MIN_SIZE_PX));\n }\n\n if (height !== divHeight) {\n setDivHeight(height);\n }\n\n if (width !== divWidth) {\n setDivWidth(width);\n }\n })\n );\n\n useLayoutEffect(() => {\n if (videoTileRef.current) {\n observer.current.observe(videoTileRef.current);\n }\n const currentObserver = observer.current;\n return () => currentObserver.disconnect();\n }, [videoTileRef]);\n\n if (overlayMode === 'grid-tiles') {\n return (\n <div ref={videoTileRef} style={{ width: '100%', height: '100%' }}>\n <ParticipantVideoTileOverlay\n emojiSize={emojiSizePx}\n reaction={reaction}\n reactionResources={reactionResources}\n />\n </div>\n );\n } else if (props.overlayMode === 'screen-share' || props.overlayMode === 'content-share') {\n return (\n <div ref={videoTileRef} style={{ width: '100%', height: '100%' }}>\n <RemoteContentShareReactionOverlay\n hostDivHeight={divHeight}\n hostDivWidth={divWidth}\n reactionResources={reactionResources}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n />\n </div>\n );\n } else {\n return <></>;\n }\n};\n"]}
@@ -298,6 +298,12 @@ export type MessageThreadProps = {
298
298
  * @beta
299
299
  */
300
300
  inlineImageOptions?: InlineImageOptions;
301
+ /**
302
+ * enables rich text editor for the edit box
303
+ *
304
+ * @defaultValue `false`
305
+ */
306
+ richTextEditor?: boolean;
301
307
  };
302
308
  /**
303
309
  * Props to render a single message.
@@ -176,7 +176,9 @@ export const MessageThreadWrapper = (props) => {
176
176
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
177
177
  attachmentOptions,
178
178
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
179
- onRenderAttachmentDownloads } = props;
179
+ onRenderAttachmentDownloads,
180
+ /* @conditional-compile-remove(rich-text-editor) */
181
+ richTextEditor = false } = props;
180
182
  // We need this state to wait for one tick and scroll to bottom after messages have been initialized.
181
183
  // Otherwise chatScrollDivRef.current.clientHeight is wrong if we scroll to bottom before messages are initialized.
182
184
  const [chatMessagesInitialized, setChatMessagesInitialized] = useState(false);
@@ -519,7 +521,9 @@ export const MessageThreadWrapper = (props) => {
519
521
  /* @conditional-compile-remove(mention) */
520
522
  mentionOptions: mentionOptions,
521
523
  /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */
522
- onRenderAttachmentDownloads: onRenderAttachmentDownloads })));
524
+ onRenderAttachmentDownloads: onRenderAttachmentDownloads,
525
+ /* @conditional-compile-remove(rich-text-editor) */
526
+ richTextEditor: richTextEditor })));
523
527
  }))))));
524
528
  };
525
529
  const MemoChatMessageComponentWrapper = React.memo((obj) => {