@azure/communication-react 1.17.0-alpha-202405280013 → 1.17.0-alpha-202405310013

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 (43) hide show
  1. package/dist/communication-react.d.ts +6 -1
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js → ChatMessageComponentAsRichTextEditBox-anI3y0oU.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js.map → ChatMessageComponentAsRichTextEditBox-anI3y0oU.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DZz_bfUw.js → RichTextSendBoxWrapper-CZ0LZbKA.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DZz_bfUw.js.map → RichTextSendBoxWrapper-CZ0LZbKA.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-DzeOTGqS.js → index-BqQ1gXi4.js} +99 -52
  7. package/dist/dist-cjs/communication-react/index-BqQ1gXi4.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -0
  12. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  13. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -0
  14. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +11 -0
  15. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  16. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
  17. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +16 -0
  18. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  19. package/dist/dist-esm/calling-stateful-client/src/Converter.js +3 -1
  20. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +10 -1
  22. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
  23. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +7 -1
  24. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +1 -5
  26. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +32 -20
  28. package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +2 -6
  30. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +1 -5
  32. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +5 -8
  34. package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
  36. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +4 -0
  37. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  38. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +1 -1
  39. package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
  40. package/dist/dist-esm/react-components/src/types/OnRender.d.ts +1 -1
  41. package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/dist-cjs/communication-react/index-DzeOTGqS.js.map +0 -1
@@ -106,6 +106,7 @@ import { StartCaptionsOptions } from '@azure/communication-calling';
106
106
  import { TeamsCall } from '@azure/communication-calling';
107
107
  import { TeamsCallAgent } from '@azure/communication-calling';
108
108
  import { TeamsCallInfo } from '@azure/communication-calling';
109
+ import { TeamsMeetingAudioConferencingDetails } from '@azure/communication-calling';
109
110
  import { TeamsMeetingIdLocator } from '@azure/communication-calling';
110
111
  import { TeamsMeetingLinkLocator } from '@azure/communication-calling';
111
112
  import { Theme } from '@fluentui/react';
@@ -3078,6 +3079,10 @@ export declare interface CallState {
3078
3079
  * Proxy of {@link @azure/communication-calling#Call.info}.
3079
3080
  */
3080
3081
  info?: TeamsCallInfo | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;
3082
+ /**
3083
+ * Proxy of {@link @azure/communication-calling#TeamsMeetingAudioConferencingCallFeature}.
3084
+ */
3085
+ teamsMeetingConference?: TeamsMeetingAudioConferencingDetails;
3081
3086
  }
3082
3087
 
3083
3088
  /**
@@ -9085,7 +9090,7 @@ userId?: string, options?: CustomAvatarOptions,
9085
9090
  * A default `onRender` component that can be used to render the default avatar.
9086
9091
  * Pass the `options` to the `onRender` component for default rendering.
9087
9092
  */
9088
- defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => JSX.Element;
9093
+ defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element) => JSX.Element | undefined;
9089
9094
 
9090
9095
  /**
9091
9096
  * Dependency resolution for video background effects.
@@ -4,7 +4,7 @@ var react = require('@fluentui/react');
4
4
  var reactChat = require('@fluentui-contrib/react-chat');
5
5
  var reactComponents = require('@fluentui/react-components');
6
6
  require('@azure/communication-common');
7
- var index = require('./index-DzeOTGqS.js');
7
+ var index = require('./index-BqQ1gXi4.js');
8
8
  var React = require('react');
9
9
  require('reselect');
10
10
  require('@azure/communication-calling');
@@ -146,4 +146,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
146
146
 
147
147
  exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
148
148
  exports.default = ChatMessageComponentAsRichTextEditBox;
149
- //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js.map
149
+ //# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-anI3y0oU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(attachment-upload) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(attachment-upload) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(attachment-upload) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const { onCancel, onSubmit, strings, message } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(attachment-upload) */ attachmentMetadata, textValue]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [messageState, strings.editBoxTextLimit]);\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(attachment-upload) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n submitEnabled &&\n onSubmit(textValue, /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata);\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata,\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n onSubmit,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n submitEnabled,\n textValue\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors textTooLongMessage={textTooLongMessage} systemMessage={message.failureReason} />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={setText}\n editorComponentRef={editTextFieldRef}\n initialContent={message.content}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(attachment-upload) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","useMemo","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAqDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;IACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,IAAA,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAGA,cAAQ,CAAS,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;;AAE1E,IAAA,MAAM,CAAC,kBAAkB,EAAE,sBAAsB,CAAC,GAAGC,gBAAU,CAC7DC,+B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pD,CAAA,CACI,EACR;AACJ,KAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,mBAAmB,GAAG,SAAS,CAC7E;AACF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,4BAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS,CAClE;AACF,SAAA,EAAA,EAEA,UAAU,EAAE,CACC,EAChB;AACJ;;;;;"}
1
+ {"version":3,"file":"ChatMessageComponentAsRichTextEditBox-anI3y0oU.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(attachment-upload) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE } from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(attachment-upload) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(attachment-upload) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const { onCancel, onSubmit, strings, message } = props;\n\n const [textValue, setTextValue] = useState<string>(message.content || '');\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(attachment-upload) */ attachmentMetadata, textValue]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [messageState, strings.editBoxTextLimit]);\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(attachment-upload) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n submitEnabled &&\n onSubmit(textValue, /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata);\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n /* @conditional-compile-remove(attachment-upload) */\n attachmentMetadata,\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n onSubmit,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n submitEnabled,\n textValue\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors textTooLongMessage={textTooLongMessage} systemMessage={message.failureReason} />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={setText}\n editorComponentRef={editTextFieldRef}\n initialContent={message.content}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(attachment-upload) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","useMemo","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAqDA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;IACf,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAA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B,EAAE,gBAAgB,EACpC,cAAc,EAAE,OAAO,CAAC,OAAO,EAC/B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,aAAa,EAC/B,wBAAwB,EAAEC,gCAA0B,EACpD,0BAA0B,EAAE,IAAI;;AAEhC,gBAAA,yBAAyB,EAAE,yBAAyB,EACpD,CAAA,CACI,EACR;AACJ,KAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,mBAAmB,GAAG,SAAS,CAC7E;AACF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,4BAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS,CAClE;AACF,SAAA,EAAA,EAEA,UAAU,EAAE,CACC,EAChB;AACJ;;;;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var index = require('./index-DzeOTGqS.js');
4
+ var index = require('./index-BqQ1gXi4.js');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-components');
7
7
  require('@fluentui-contrib/react-chat');
@@ -49,4 +49,4 @@ const RichTextSendBoxWrapper = (props) => {
49
49
  };
50
50
 
51
51
  exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
52
- //# sourceMappingURL=RichTextSendBoxWrapper-DZz_bfUw.js.map
52
+ //# sourceMappingURL=RichTextSendBoxWrapper-CZ0LZbKA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextSendBoxWrapper-DZz_bfUw.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC,CAAC;AAE1D,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI,CAAC;AAClE;;;;"}
1
+ {"version":3,"file":"RichTextSendBoxWrapper-CZ0LZbKA.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC,CAAC;AAE1D,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI,CAAC;AAClE;;;;"}
@@ -174,7 +174,7 @@ function getDefaultExportFromCjs (x) {
174
174
  // Copyright (c) Microsoft Corporation.
175
175
  // Licensed under the MIT License.
176
176
  // GENERATED FILE. DO NOT EDIT MANUALLY.
177
- var telemetryVersion = '1.17.0-alpha-202405280013';
177
+ var telemetryVersion = '1.17.0-alpha-202405310013';
178
178
 
179
179
 
180
180
  var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
@@ -1845,7 +1845,9 @@ function convertSdkCallToDeclarativeCall(call) {
1845
1845
  /* @conditional-compile-remove(hide-attendee-name) */
1846
1846
  hideAttendeeNames,
1847
1847
  /* @conditional-compile-remove(meeting-id) */
1848
- info: callInfo
1848
+ info: callInfo,
1849
+ /* @conditional-compile-remove(teams-meeting-conference) */
1850
+ teamsMeetingConference: undefined
1849
1851
  };
1850
1852
  }
1851
1853
  /**
@@ -2029,6 +2031,8 @@ let CallContext$2 = class CallContext {
2029
2031
  existingCall.captionsFeature.currentCaptionLanguage = call.captionsFeature.currentCaptionLanguage;
2030
2032
  /* @conditional-compile-remove(meeting-id) */
2031
2033
  existingCall.info = call.info;
2034
+ /* @conditional-compile-remove(teams-meeting-conference) */
2035
+ existingCall.teamsMeetingConference = call.teamsMeetingConference;
2032
2036
  }
2033
2037
  else {
2034
2038
  draft.calls[latestCallId] = call;
@@ -2339,6 +2343,15 @@ let CallContext$2 = class CallContext {
2339
2343
  }
2340
2344
  });
2341
2345
  }
2346
+ /* @conditional-compile-remove(teams-meeting-conference) */
2347
+ setTeamsMeetingConference(callId, teamsMeetingConferenceDetails) {
2348
+ this.modifyState((draft) => {
2349
+ const call = draft.calls[this._callIdHistory.latestCallId(callId)];
2350
+ if (call) {
2351
+ call.teamsMeetingConference = teamsMeetingConferenceDetails;
2352
+ }
2353
+ });
2354
+ }
2342
2355
  /* @conditional-compile-remove(spotlight) */
2343
2356
  setParticipantSpotlighted(callId, spotlightedParticipant) {
2344
2357
  this.modifyState((draft) => {
@@ -4171,6 +4184,8 @@ class CallSubscriber {
4171
4184
  this.subscribe = () => {
4172
4185
  this._call.on('stateChanged', this.stateChanged);
4173
4186
  this._call.on('stateChanged', this.initCaptionSubscriber);
4187
+ /* @conditional-compile-remove(teams-meeting-conference) */
4188
+ this._call.on('stateChanged', this.initTeamsMeetingConference);
4174
4189
  /* @conditional-compile-remove(local-recording-notification) */
4175
4190
  this._call.on('stateChanged', this.initLocalRecordingNotificationSubscriber);
4176
4191
  this._call.on('idChanged', this.idChanged);
@@ -4198,6 +4213,8 @@ class CallSubscriber {
4198
4213
  this._call.off('stateChanged', this.initCaptionSubscriber);
4199
4214
  /* @conditional-compile-remove(local-recording-notification) */
4200
4215
  this._call.off('stateChanged', this.initLocalRecordingNotificationSubscriber);
4216
+ /* @conditional-compile-remove(teams-meeting-conference) */
4217
+ this._call.off('stateChanged', this.initTeamsMeetingConference);
4201
4218
  this._call.off('idChanged', this.idChanged);
4202
4219
  this._call.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged);
4203
4220
  this._call.off('remoteParticipantsUpdated', this.remoteParticipantsUpdated);
@@ -4241,6 +4258,18 @@ class CallSubscriber {
4241
4258
  this._call.off('stateChanged', this.initCaptionSubscriber);
4242
4259
  }
4243
4260
  };
4261
+ /* @conditional-compile-remove(teams-meeting-conference) */
4262
+ this.initTeamsMeetingConference = () => {
4263
+ if (this._call.state === 'Connected' && this._call.kind === 'TeamsCall') {
4264
+ this._call
4265
+ .feature(communicationCalling.Features.TeamsMeetingAudioConferencing)
4266
+ .getTeamsMeetingAudioConferencingDetails()
4267
+ .then((teamsMeetingConferenceDetails) => {
4268
+ this._context.setTeamsMeetingConference(this._callIdRef.callId, teamsMeetingConferenceDetails);
4269
+ });
4270
+ this._call.off('stateChanged', this.initTeamsMeetingConference);
4271
+ }
4272
+ };
4244
4273
  /* @conditional-compile-remove(local-recording-notification) */
4245
4274
  this.initLocalRecordingNotificationSubscriber = () => {
4246
4275
  // Subscribe to LocalRecordingFeature as it is only available in interop scenarios
@@ -8808,13 +8837,11 @@ const SendBoxErrorBar = (props) => {
8808
8837
  };
8809
8838
  }, [dismissAfterMs, onDismiss, error]);
8810
8839
  if (errorMessage) {
8811
- return (React.createElement(React.Fragment, null,
8812
- React.createElement(Announcer$1, { announcementString: errorMessage, ariaLive: 'polite' }),
8813
- React.createElement(react.MessageBar, { "data-testid": 'send-box-message-bar', messageBarType: react.MessageBarType.warning, styles: {
8814
- iconContainer: {
8815
- display: 'none'
8816
- }
8817
- } }, errorMessage)));
8840
+ return (React.createElement(react.MessageBar, { role: "alert", "aria-label": errorMessage, "data-testid": 'send-box-message-bar', messageBarType: react.MessageBarType.warning, styles: {
8841
+ iconContainer: {
8842
+ display: 'none'
8843
+ }
8844
+ } }, errorMessage));
8818
8845
  }
8819
8846
  else {
8820
8847
  return React.createElement(React.Fragment, null);
@@ -11794,6 +11821,10 @@ const useChatMessageRenderStyles = reactComponents.makeStyles({
11794
11821
  marginLeft: `${AVATAR_MARGIN_LEFT}rem`,
11795
11822
  marginTop: '0'
11796
11823
  },
11824
+ bodyHiddenAvatar: {
11825
+ marginLeft: 0,
11826
+ marginTop: 0
11827
+ },
11797
11828
  bodyWithAvatar: {
11798
11829
  marginLeft: `0`,
11799
11830
  marginTop: '0.75rem'
@@ -12635,7 +12666,16 @@ const ChatMessageActionFlyout = (props) => {
12635
12666
  key: person.displayName,
12636
12667
  text: person.displayName,
12637
12668
  itemProps: { styles: props.increaseFlyoutItemSize ? menuItemIncreasedSizeStyles : undefined },
12638
- onRenderIcon: () => { var _a; return onRenderAvatar ? onRenderAvatar((_a = person.id) !== null && _a !== void 0 ? _a : '', personaOptions) : React.createElement(react.Persona, Object.assign({}, personaOptions)); },
12669
+ onRenderIcon: () => {
12670
+ var _a;
12671
+ if (onRenderAvatar) {
12672
+ const rendered = onRenderAvatar((_a = person.id) !== null && _a !== void 0 ? _a : '', personaOptions);
12673
+ if (rendered) {
12674
+ return rendered;
12675
+ }
12676
+ }
12677
+ return React.createElement(react.Persona, Object.assign({}, personaOptions));
12678
+ },
12639
12679
  iconProps: {
12640
12680
  styles: menuIconStyleSet
12641
12681
  }
@@ -12961,6 +13001,13 @@ const processHtmlToReact = (props) => {
12961
13001
  ? props.inlineImageOptions.onRenderInlineImage(inlineImageProps, defaultOnRenderInlineImage)
12962
13002
  : defaultOnRenderInlineImage(inlineImageProps);
12963
13003
  }
13004
+ // Transform links to open in new tab
13005
+ if (domNode.name === 'a' && React.isValidElement(reactNode)) {
13006
+ return React.cloneElement(reactNode, {
13007
+ target: '_blank',
13008
+ rel: 'noreferrer noopener'
13009
+ });
13010
+ }
12964
13011
  }
12965
13012
  // Pass through the original node
12966
13013
  return reactNode;
@@ -13199,7 +13246,7 @@ actionsForAttachment) {
13199
13246
  return (React.createElement("div", { tabIndex: 0 },
13200
13247
  React.createElement(BlockedMessageContent, { message: message, strings: strings })));
13201
13248
  }
13202
- return (React.createElement("div", { tabIndex: 0, className: "ui-chat__message__content" },
13249
+ return (React.createElement("div", { className: "ui-chat__message__content" },
13203
13250
  React.createElement(ChatMessageContent, { message: message, strings: strings,
13204
13251
  /* @conditional-compile-remove(mention) */
13205
13252
  mentionDisplayOptions: mentionDisplayOptions, inlineImageOptions: inlineImageOptions }),
@@ -13377,12 +13424,8 @@ const MessageBubble$1 = (props) => {
13377
13424
  // react onFocus is called even when nested component receives focus (i.e. it bubbles)
13378
13425
  // so when focus moves within actionMenu, the `focus` state in chatMessage remains true, and keeps actionMenu visible
13379
13426
  setFocused(true);
13380
- },
13381
- // make body not focusable to remove repetitions from narrators.
13382
- // inner components are already focusable
13383
- role: 'none',
13384
- tabIndex: -1
13385
- }, "data-ui-id": "chat-composite-message", author: React.createElement(react.Text, { className: chatMessageDateStyle, tabIndex: 0 }, message.senderDisplayName), timestamp: React.createElement(react.Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp, tabIndex: 0 }, formattedTimestamp), details: getMessageDetails(), actions: {
13427
+ }
13428
+ }, "data-ui-id": "chat-composite-message", author: React.createElement(react.Text, { className: chatMessageDateStyle }, message.senderDisplayName), timestamp: React.createElement(react.Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp }, formattedTimestamp), details: getMessageDetails(), actions: {
13386
13429
  children: actionMenuProps === null || actionMenuProps === void 0 ? void 0 : actionMenuProps.children,
13387
13430
  className: reactComponents.mergeClasses(chatMyMessageStyles.menu,
13388
13431
  // Make actions menu visible when the message is focused or the flyout is shown
@@ -13541,7 +13584,7 @@ class _ErrorBoundary extends React.Component {
13541
13584
  // Copyright (c) Microsoft Corporation.
13542
13585
  // Licensed under the MIT License.
13543
13586
  /* @conditional-compile-remove(rich-text-editor) */
13544
- const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js'); }));
13587
+ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-anI3y0oU.js'); }));
13545
13588
  /**
13546
13589
  * @private
13547
13590
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -13549,7 +13592,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
13549
13592
  *
13550
13593
  * @conditional-compile-remove(rich-text-editor)
13551
13594
  */
13552
- const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-ULEp7UIs.js'); });
13595
+ const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-anI3y0oU.js'); });
13553
13596
  /**
13554
13597
  * @private
13555
13598
  */
@@ -13743,11 +13786,7 @@ const FluentChatMyMessageComponent = (props) => {
13743
13786
  }, [chatMessageRenderStyles.rootCommon, chatMessageRenderStyles.rootMyMessage, styles === null || styles === void 0 ? void 0 : styles.myChatItemMessageContainer]);
13744
13787
  const myMessageBodyProps = React.useMemo(() => {
13745
13788
  return {
13746
- className: reactComponents.mergeClasses(chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage),
13747
- // make body not focusable to remove repetitions from narrators.
13748
- // inner components are already focusable
13749
- tabIndex: -1,
13750
- role: 'none'
13789
+ className: reactComponents.mergeClasses(chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage)
13751
13790
  };
13752
13791
  }, [chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage]);
13753
13792
  const myMessageStatusIcon = React.useMemo(() => {
@@ -13840,11 +13879,7 @@ const MessageBubble = (props) => {
13840
13879
  const chatMessage = (React.createElement(React.Fragment, null,
13841
13880
  React.createElement("div", { key: props.message.messageId },
13842
13881
  React.createElement(reactChat.ChatMessage, { attached: attached, key: props.message.messageId, root: {
13843
- className: chatMessageStyles.root,
13844
- // make body not focusable to remove repetitions from narrators.
13845
- // inner components are already focusable
13846
- tabIndex: -1,
13847
- role: 'none'
13882
+ className: chatMessageStyles.root
13848
13883
  }, author: React.createElement(react.Text, { className: chatMessageAuthorStyle }, message.senderDisplayName), body: {
13849
13884
  className: chatItemMessageContainerClassName,
13850
13885
  style: Object.assign({}, createStyleFromV8Style(messageContainerStyle))
@@ -13922,36 +13957,48 @@ const FluentChatMessageComponent = (props) => {
13922
13957
  const messageRootProps = React.useMemo(() => {
13923
13958
  return { className: reactComponents.mergeClasses(chatMessageRenderStyles.rootMessage, chatMessageRenderStyles.rootCommon) };
13924
13959
  }, [chatMessageRenderStyles.rootCommon, chatMessageRenderStyles.rootMessage]);
13960
+ const avatar = React.useMemo(() => {
13961
+ const chatAvatarStyle = shouldShowAvatar ? gutterWithAvatar : gutterWithHiddenAvatar;
13962
+ const personaOptions = {
13963
+ hidePersonaDetails: true,
13964
+ size: react.PersonaSize.size32,
13965
+ text: message.senderDisplayName,
13966
+ showOverflowTooltip: false
13967
+ };
13968
+ let renderedAvatar;
13969
+ if (onRenderAvatar) {
13970
+ const avatarComponent = onRenderAvatar === null || onRenderAvatar === void 0 ? void 0 : onRenderAvatar(message.senderId, personaOptions);
13971
+ if (!avatarComponent) {
13972
+ return undefined;
13973
+ }
13974
+ else {
13975
+ renderedAvatar = avatarComponent;
13976
+ }
13977
+ }
13978
+ return (React.createElement("div", { className: react.mergeStyles(chatAvatarStyle) }, renderedAvatar ? renderedAvatar : React.createElement(react.Persona, Object.assign({}, personaOptions))));
13979
+ }, [message.senderDisplayName, message.senderId, onRenderAvatar, shouldShowAvatar]);
13925
13980
  const messageBodyProps = React.useMemo(() => {
13926
13981
  return {
13927
13982
  // chatItemMessageContainer used in className and style prop as style prop can't handle CSS selectors
13928
- className: reactComponents.mergeClasses(chatMessageRenderStyles.bodyCommon, !shouldShowAvatar ? chatMessageRenderStyles.bodyWithoutAvatar : chatMessageRenderStyles.bodyWithAvatar, shouldOverlapAvatarAndMessage ? chatMessageRenderStyles.avatarOverlap : chatMessageRenderStyles.avatarNoOverlap, react.mergeStyles(styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer)),
13929
- style: (styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) !== undefined ? createStyleFromV8Style(styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) : {},
13930
- // make body not focusable to remove repetitions from narrators.
13931
- // inner components are already focusable
13932
- tabIndex: -1,
13933
- role: 'none'
13983
+ className: reactComponents.mergeClasses(chatMessageRenderStyles.bodyCommon, !shouldShowAvatar
13984
+ ? avatar
13985
+ ? chatMessageRenderStyles.bodyWithoutAvatar
13986
+ : chatMessageRenderStyles.bodyHiddenAvatar
13987
+ : chatMessageRenderStyles.bodyWithAvatar, shouldOverlapAvatarAndMessage ? chatMessageRenderStyles.avatarOverlap : chatMessageRenderStyles.avatarNoOverlap, react.mergeStyles(styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer)),
13988
+ style: (styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) !== undefined ? createStyleFromV8Style(styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer) : {}
13934
13989
  };
13935
13990
  }, [
13936
- chatMessageRenderStyles.avatarNoOverlap,
13937
- chatMessageRenderStyles.avatarOverlap,
13938
13991
  chatMessageRenderStyles.bodyCommon,
13939
- chatMessageRenderStyles.bodyWithAvatar,
13940
13992
  chatMessageRenderStyles.bodyWithoutAvatar,
13941
- shouldOverlapAvatarAndMessage,
13993
+ chatMessageRenderStyles.bodyHiddenAvatar,
13994
+ chatMessageRenderStyles.bodyWithAvatar,
13995
+ chatMessageRenderStyles.avatarOverlap,
13996
+ chatMessageRenderStyles.avatarNoOverlap,
13942
13997
  shouldShowAvatar,
13998
+ avatar,
13999
+ shouldOverlapAvatarAndMessage,
13943
14000
  styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer
13944
14001
  ]);
13945
- const avatar = React.useMemo(() => {
13946
- const chatAvatarStyle = shouldShowAvatar ? gutterWithAvatar : gutterWithHiddenAvatar;
13947
- const personaOptions = {
13948
- hidePersonaDetails: true,
13949
- size: react.PersonaSize.size32,
13950
- text: message.senderDisplayName,
13951
- showOverflowTooltip: false
13952
- };
13953
- return (React.createElement("div", { className: react.mergeStyles(chatAvatarStyle) }, onRenderAvatar ? onRenderAvatar === null || onRenderAvatar === void 0 ? void 0 : onRenderAvatar(message.senderId, personaOptions) : React.createElement(react.Persona, Object.assign({}, personaOptions))));
13954
- }, [message.senderDisplayName, message.senderId, onRenderAvatar, shouldShowAvatar]);
13955
14002
  // Fluent UI message components are used here as for default message renderer,
13956
14003
  // timestamp and author name should be shown but they aren't shown for custom renderer.
13957
14004
  // More investigations are needed to check if this can be simplified with states.
@@ -27825,7 +27872,7 @@ const AttachmentDownloadErrorBar = (props) => {
27825
27872
  /**
27826
27873
  * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
27827
27874
  */
27828
- const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DZz_bfUw.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
27875
+ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-CZ0LZbKA.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
27829
27876
  /**
27830
27877
  * @private
27831
27878
  * Use this function to load RoosterJS dependencies early in the lifecycle.
@@ -27833,7 +27880,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
27833
27880
  *
27834
27881
  /* @conditional-compile-remove(rich-text-editor-composite-support)
27835
27882
  */
27836
- const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DZz_bfUw.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
27883
+ const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-CZ0LZbKA.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
27837
27884
  /**
27838
27885
  * @private
27839
27886
  */
@@ -40541,4 +40588,4 @@ exports.useTeamsCall = useTeamsCall;
40541
40588
  exports.useTeamsCallAdapter = useTeamsCallAdapter;
40542
40589
  exports.useTeamsCallAgent = useTeamsCallAgent;
40543
40590
  exports.useTheme = useTheme;
40544
- //# sourceMappingURL=index-DzeOTGqS.js.map
40591
+ //# sourceMappingURL=index-BqQ1gXi4.js.map