@azure/communication-react 1.17.0-alpha-202405290014 → 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.
- package/dist/communication-react.d.ts +6 -1
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DnFVPZv-.js → ChatMessageComponentAsRichTextEditBox-anI3y0oU.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DnFVPZv-.js.map → ChatMessageComponentAsRichTextEditBox-anI3y0oU.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DfoveBvm.js → RichTextSendBoxWrapper-CZ0LZbKA.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DfoveBvm.js.map → RichTextSendBoxWrapper-CZ0LZbKA.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-CYkd_Ir9.js → index-BqQ1gXi4.js} +94 -45
- package/dist/dist-cjs/communication-react/index-BqQ1gXi4.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +11 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +16 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +3 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +10 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +7 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +1 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +32 -20
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +2 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +1 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +4 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/OnRender.d.ts +1 -1
- package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-CYkd_Ir9.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-
|
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-
|
149
|
+
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-anI3y0oU.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponentAsRichTextEditBox-DnFVPZv-.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,+BAAyB,EACzB,CAAA,EAAA,GAAAC,sCAAgC,CAAC,OAAO,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AQ,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,OAAO,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;AAEvD,I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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-
|
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-
|
52
|
+
//# sourceMappingURL=RichTextSendBoxWrapper-CZ0LZbKA.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RichTextSendBoxWrapper-
|
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-
|
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
|
@@ -11792,6 +11821,10 @@ const useChatMessageRenderStyles = reactComponents.makeStyles({
|
|
11792
11821
|
marginLeft: `${AVATAR_MARGIN_LEFT}rem`,
|
11793
11822
|
marginTop: '0'
|
11794
11823
|
},
|
11824
|
+
bodyHiddenAvatar: {
|
11825
|
+
marginLeft: 0,
|
11826
|
+
marginTop: 0
|
11827
|
+
},
|
11795
11828
|
bodyWithAvatar: {
|
11796
11829
|
marginLeft: `0`,
|
11797
11830
|
marginTop: '0.75rem'
|
@@ -12633,7 +12666,16 @@ const ChatMessageActionFlyout = (props) => {
|
|
12633
12666
|
key: person.displayName,
|
12634
12667
|
text: person.displayName,
|
12635
12668
|
itemProps: { styles: props.increaseFlyoutItemSize ? menuItemIncreasedSizeStyles : undefined },
|
12636
|
-
onRenderIcon: () => {
|
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
|
+
},
|
12637
12679
|
iconProps: {
|
12638
12680
|
styles: menuIconStyleSet
|
12639
12681
|
}
|
@@ -12959,6 +13001,13 @@ const processHtmlToReact = (props) => {
|
|
12959
13001
|
? props.inlineImageOptions.onRenderInlineImage(inlineImageProps, defaultOnRenderInlineImage)
|
12960
13002
|
: defaultOnRenderInlineImage(inlineImageProps);
|
12961
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
|
+
}
|
12962
13011
|
}
|
12963
13012
|
// Pass through the original node
|
12964
13013
|
return reactNode;
|
@@ -13197,7 +13246,7 @@ actionsForAttachment) {
|
|
13197
13246
|
return (React.createElement("div", { tabIndex: 0 },
|
13198
13247
|
React.createElement(BlockedMessageContent, { message: message, strings: strings })));
|
13199
13248
|
}
|
13200
|
-
return (React.createElement("div", {
|
13249
|
+
return (React.createElement("div", { className: "ui-chat__message__content" },
|
13201
13250
|
React.createElement(ChatMessageContent, { message: message, strings: strings,
|
13202
13251
|
/* @conditional-compile-remove(mention) */
|
13203
13252
|
mentionDisplayOptions: mentionDisplayOptions, inlineImageOptions: inlineImageOptions }),
|
@@ -13375,12 +13424,8 @@ const MessageBubble$1 = (props) => {
|
|
13375
13424
|
// react onFocus is called even when nested component receives focus (i.e. it bubbles)
|
13376
13425
|
// so when focus moves within actionMenu, the `focus` state in chatMessage remains true, and keeps actionMenu visible
|
13377
13426
|
setFocused(true);
|
13378
|
-
}
|
13379
|
-
|
13380
|
-
// inner components are already focusable
|
13381
|
-
role: 'none',
|
13382
|
-
tabIndex: -1
|
13383
|
-
}, "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: {
|
13384
13429
|
children: actionMenuProps === null || actionMenuProps === void 0 ? void 0 : actionMenuProps.children,
|
13385
13430
|
className: reactComponents.mergeClasses(chatMyMessageStyles.menu,
|
13386
13431
|
// Make actions menu visible when the message is focused or the flyout is shown
|
@@ -13539,7 +13584,7 @@ class _ErrorBoundary extends React.Component {
|
|
13539
13584
|
// Copyright (c) Microsoft Corporation.
|
13540
13585
|
// Licensed under the MIT License.
|
13541
13586
|
/* @conditional-compile-remove(rich-text-editor) */
|
13542
|
-
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
13587
|
+
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-anI3y0oU.js'); }));
|
13543
13588
|
/**
|
13544
13589
|
* @private
|
13545
13590
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -13547,7 +13592,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
|
|
13547
13592
|
*
|
13548
13593
|
* @conditional-compile-remove(rich-text-editor)
|
13549
13594
|
*/
|
13550
|
-
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
13595
|
+
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-anI3y0oU.js'); });
|
13551
13596
|
/**
|
13552
13597
|
* @private
|
13553
13598
|
*/
|
@@ -13741,11 +13786,7 @@ const FluentChatMyMessageComponent = (props) => {
|
|
13741
13786
|
}, [chatMessageRenderStyles.rootCommon, chatMessageRenderStyles.rootMyMessage, styles === null || styles === void 0 ? void 0 : styles.myChatItemMessageContainer]);
|
13742
13787
|
const myMessageBodyProps = React.useMemo(() => {
|
13743
13788
|
return {
|
13744
|
-
className: reactComponents.mergeClasses(chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage)
|
13745
|
-
// make body not focusable to remove repetitions from narrators.
|
13746
|
-
// inner components are already focusable
|
13747
|
-
tabIndex: -1,
|
13748
|
-
role: 'none'
|
13789
|
+
className: reactComponents.mergeClasses(chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage)
|
13749
13790
|
};
|
13750
13791
|
}, [chatMessageRenderStyles.bodyCommon, chatMessageRenderStyles.bodyMyMessage]);
|
13751
13792
|
const myMessageStatusIcon = React.useMemo(() => {
|
@@ -13838,11 +13879,7 @@ const MessageBubble = (props) => {
|
|
13838
13879
|
const chatMessage = (React.createElement(React.Fragment, null,
|
13839
13880
|
React.createElement("div", { key: props.message.messageId },
|
13840
13881
|
React.createElement(reactChat.ChatMessage, { attached: attached, key: props.message.messageId, root: {
|
13841
|
-
className: chatMessageStyles.root
|
13842
|
-
// make body not focusable to remove repetitions from narrators.
|
13843
|
-
// inner components are already focusable
|
13844
|
-
tabIndex: -1,
|
13845
|
-
role: 'none'
|
13882
|
+
className: chatMessageStyles.root
|
13846
13883
|
}, author: React.createElement(react.Text, { className: chatMessageAuthorStyle }, message.senderDisplayName), body: {
|
13847
13884
|
className: chatItemMessageContainerClassName,
|
13848
13885
|
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle))
|
@@ -13920,36 +13957,48 @@ const FluentChatMessageComponent = (props) => {
|
|
13920
13957
|
const messageRootProps = React.useMemo(() => {
|
13921
13958
|
return { className: reactComponents.mergeClasses(chatMessageRenderStyles.rootMessage, chatMessageRenderStyles.rootCommon) };
|
13922
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]);
|
13923
13980
|
const messageBodyProps = React.useMemo(() => {
|
13924
13981
|
return {
|
13925
13982
|
// chatItemMessageContainer used in className and style prop as style prop can't handle CSS selectors
|
13926
|
-
className: reactComponents.mergeClasses(chatMessageRenderStyles.bodyCommon, !shouldShowAvatar
|
13927
|
-
|
13928
|
-
|
13929
|
-
|
13930
|
-
|
13931
|
-
|
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) : {}
|
13932
13989
|
};
|
13933
13990
|
}, [
|
13934
|
-
chatMessageRenderStyles.avatarNoOverlap,
|
13935
|
-
chatMessageRenderStyles.avatarOverlap,
|
13936
13991
|
chatMessageRenderStyles.bodyCommon,
|
13937
|
-
chatMessageRenderStyles.bodyWithAvatar,
|
13938
13992
|
chatMessageRenderStyles.bodyWithoutAvatar,
|
13939
|
-
|
13993
|
+
chatMessageRenderStyles.bodyHiddenAvatar,
|
13994
|
+
chatMessageRenderStyles.bodyWithAvatar,
|
13995
|
+
chatMessageRenderStyles.avatarOverlap,
|
13996
|
+
chatMessageRenderStyles.avatarNoOverlap,
|
13940
13997
|
shouldShowAvatar,
|
13998
|
+
avatar,
|
13999
|
+
shouldOverlapAvatarAndMessage,
|
13941
14000
|
styles === null || styles === void 0 ? void 0 : styles.chatItemMessageContainer
|
13942
14001
|
]);
|
13943
|
-
const avatar = React.useMemo(() => {
|
13944
|
-
const chatAvatarStyle = shouldShowAvatar ? gutterWithAvatar : gutterWithHiddenAvatar;
|
13945
|
-
const personaOptions = {
|
13946
|
-
hidePersonaDetails: true,
|
13947
|
-
size: react.PersonaSize.size32,
|
13948
|
-
text: message.senderDisplayName,
|
13949
|
-
showOverflowTooltip: false
|
13950
|
-
};
|
13951
|
-
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))));
|
13952
|
-
}, [message.senderDisplayName, message.senderId, onRenderAvatar, shouldShowAvatar]);
|
13953
14002
|
// Fluent UI message components are used here as for default message renderer,
|
13954
14003
|
// timestamp and author name should be shown but they aren't shown for custom renderer.
|
13955
14004
|
// More investigations are needed to check if this can be simplified with states.
|
@@ -27823,7 +27872,7 @@ const AttachmentDownloadErrorBar = (props) => {
|
|
27823
27872
|
/**
|
27824
27873
|
* Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
|
27825
27874
|
*/
|
27826
|
-
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
27875
|
+
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-CZ0LZbKA.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
|
27827
27876
|
/**
|
27828
27877
|
* @private
|
27829
27878
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -27831,7 +27880,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
|
|
27831
27880
|
*
|
27832
27881
|
/* @conditional-compile-remove(rich-text-editor-composite-support)
|
27833
27882
|
*/
|
27834
|
-
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
27883
|
+
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-CZ0LZbKA.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
|
27835
27884
|
/**
|
27836
27885
|
* @private
|
27837
27886
|
*/
|
@@ -40539,4 +40588,4 @@ exports.useTeamsCall = useTeamsCall;
|
|
40539
40588
|
exports.useTeamsCallAdapter = useTeamsCallAdapter;
|
40540
40589
|
exports.useTeamsCallAgent = useTeamsCallAgent;
|
40541
40590
|
exports.useTheme = useTheme;
|
40542
|
-
//# sourceMappingURL=index-
|
40591
|
+
//# sourceMappingURL=index-BqQ1gXi4.js.map
|