@azure/communication-react 1.17.0-alpha-202405150013 → 1.17.0-alpha-202405160013
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 +32 -4
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BkDaUOJU.js → ChatMessageComponentAsRichTextEditBox-LLjD-Jp0.js} +9 -3
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-LLjD-Jp0.js.map +1 -0
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-D7SB5NwN.js +54 -0
- package/dist/dist-cjs/communication-react/RichTextSendBoxWrapper-D7SB5NwN.js.map +1 -0
- package/dist/dist-cjs/communication-react/{index-DJswSfNy.js → index-CfI_of00.js} +247 -76
- package/dist/dist-cjs/communication-react/index-CfI_of00.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +2 -2
- package/dist/dist-esm/acs-ui-common/src/common.d.ts +8 -1
- package/dist/dist-esm/acs-ui-common/src/common.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.d.ts +1 -1
- package/dist/dist-esm/acs-ui-common/src/index.js.map +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/communication-react/src/index.d.ts +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js +27 -22
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCard.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCardGroup.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCardGroup.js +14 -16
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentCardGroup.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +16 -15
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentUploadCards.js +2 -2
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentUploadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +9 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +8 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +8 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +9 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBoundary.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/ErrorBoundary.js +2 -2
- package/dist/dist-esm/react-components/src/components/ErrorBoundary.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +5 -3
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +5 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +5 -2
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +6 -4
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/components/index.js +1 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.d.ts +9 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js +27 -3
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.d.ts +17 -0
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js +47 -0
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +8 -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/ChatMessageComponentAsEditBoxUtils.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +9 -0
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +6 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +28 -8
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.d.ts +10 -0
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js +20 -0
- package/dist/dist-esm/react-composites/src/composites/common/RichTextSendBoxWrapper.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.d.ts +30 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js +44 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -0
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BkDaUOJU.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-DJswSfNy.js.map +0 -1
@@ -3865,6 +3865,13 @@ export declare type CallWithChatCompositeOptions = {
|
|
3865
3865
|
*/
|
3866
3866
|
hideSpotlightButtons?: boolean;
|
3867
3867
|
};
|
3868
|
+
/**
|
3869
|
+
* enables rich text editor for the edit box
|
3870
|
+
* @defaultValue `false`
|
3871
|
+
*
|
3872
|
+
* @beta
|
3873
|
+
*/
|
3874
|
+
richTextEditor?: boolean;
|
3868
3875
|
};
|
3869
3876
|
|
3870
3877
|
/**
|
@@ -4834,6 +4841,13 @@ export declare type ChatCompositeOptions = {
|
|
4834
4841
|
* @beta
|
4835
4842
|
*/
|
4836
4843
|
attachmentOptions?: AttachmentOptions;
|
4844
|
+
/**
|
4845
|
+
* enables rich text editor for the edit box
|
4846
|
+
* @defaultValue `false`
|
4847
|
+
*
|
4848
|
+
* @beta
|
4849
|
+
*/
|
4850
|
+
richTextEditor?: boolean;
|
4837
4851
|
};
|
4838
4852
|
|
4839
4853
|
/**
|
@@ -4994,6 +5008,12 @@ export declare interface ChatMessage extends MessageCommon {
|
|
4994
5008
|
attachments?: AttachmentMetadata[];
|
4995
5009
|
}
|
4996
5010
|
|
5011
|
+
/**
|
5012
|
+
* @beta
|
5013
|
+
* Type of the message content, either 'text' or 'html'.
|
5014
|
+
*/
|
5015
|
+
export declare type ChatMessageType = 'text' | 'html';
|
5016
|
+
|
4997
5017
|
/**
|
4998
5018
|
* An extension to {@link @azure/communication-chat#ChatMessage} that stores
|
4999
5019
|
* client-side only metadata for chat messages.
|
@@ -8077,12 +8097,14 @@ export declare type MessageEditedListener = MessageReceivedListener;
|
|
8077
8097
|
* @beta
|
8078
8098
|
* Message option that defines properties that can be set when
|
8079
8099
|
* sending or updating a chat message.
|
8080
|
-
* @property metadata - Metadata that contains additional information about the message to be passed
|
8100
|
+
* @property metadata - Metadata that contains additional information about the message to be passed between 2 users.
|
8081
8101
|
* @property attachments - Attachments that contains file attachments attached to the message.
|
8102
|
+
* @property type - Type of the message content, either 'text' or 'html'.
|
8082
8103
|
*/
|
8083
8104
|
export declare type MessageOptions = {
|
8084
8105
|
metadata?: Record<string, string>;
|
8085
8106
|
attachments?: AttachmentMetadata[];
|
8107
|
+
type?: ChatMessageType;
|
8086
8108
|
};
|
8087
8109
|
|
8088
8110
|
/**
|
@@ -8142,10 +8164,11 @@ export declare type MessageProps = {
|
|
8142
8164
|
/**
|
8143
8165
|
* Optional callback to send a message.
|
8144
8166
|
*
|
8145
|
-
* @param
|
8167
|
+
* @param content - message content from chatClient
|
8168
|
+
* @param options - message options to be included in the message
|
8146
8169
|
*
|
8147
8170
|
*/
|
8148
|
-
onSendMessage?: (
|
8171
|
+
onSendMessage?: (content: string, options?: MessageOptions) => Promise<void>;
|
8149
8172
|
};
|
8150
8173
|
|
8151
8174
|
/**
|
@@ -8388,9 +8411,10 @@ export declare type MessageThreadProps = {
|
|
8388
8411
|
* Optional callback to send a message.
|
8389
8412
|
*
|
8390
8413
|
* @param content - message body to send
|
8414
|
+
* @param options - message options to be included in the message
|
8391
8415
|
*
|
8392
8416
|
*/
|
8393
|
-
onSendMessage?: (content: string) => Promise<void>;
|
8417
|
+
onSendMessage?: (content: string, options?: MessageOptions) => Promise<void>;
|
8394
8418
|
/**
|
8395
8419
|
/**
|
8396
8420
|
* Disable editing messages.
|
@@ -9794,6 +9818,10 @@ export declare interface RichTextStrings {
|
|
9794
9818
|
* Text for the delete table menu.
|
9795
9819
|
*/
|
9796
9820
|
richTextDeleteTableMenu: string;
|
9821
|
+
/**
|
9822
|
+
* Text for the rich text toolbar more button.
|
9823
|
+
*/
|
9824
|
+
richTextToolbarMoreButtonAriaLabel: string;
|
9797
9825
|
}
|
9798
9826
|
|
9799
9827
|
/**
|
@@ -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-CfI_of00.js');
|
8
8
|
var React = require('react');
|
9
9
|
require('reselect');
|
10
10
|
require('@azure/communication-calling');
|
@@ -70,6 +70,10 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
70
70
|
const onRenderThemedSubmitIcon = React.useCallback((isHover) => {
|
71
71
|
return index.onRenderSubmitIcon(iconClassName(isHover));
|
72
72
|
}, [iconClassName]);
|
73
|
+
/* @conditional-compile-remove(attachment-upload) */
|
74
|
+
const hasMultipleAttachments = React.useMemo(() => {
|
75
|
+
return index.doesMessageContainMultipleAttachments(message);
|
76
|
+
}, [message]);
|
73
77
|
const actionButtons = React.useMemo(() => {
|
74
78
|
return (React.createElement(react.Stack, { horizontal: true },
|
75
79
|
React.createElement(index.InputBoxButton, { className: index.richTextActionButtonsStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
|
@@ -127,7 +131,9 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
127
131
|
};
|
128
132
|
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
129
133
|
return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
|
130
|
-
className: chatMyMessageStyles.root
|
134
|
+
className: reactComponents.mergeClasses(chatMyMessageStyles.root,
|
135
|
+
/* @conditional-compile-remove(attachment-upload) */
|
136
|
+
hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined)
|
131
137
|
}, body: {
|
132
138
|
className: reactComponents.mergeClasses(editContainerStyles.body, attached !== 'top' ? editContainerStyles.bodyAttached : undefined)
|
133
139
|
} }, getContent()));
|
@@ -135,4 +141,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
135
141
|
|
136
142
|
exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
|
137
143
|
exports.default = ChatMessageComponentAsRichTextEditBox;
|
138
|
-
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-
|
144
|
+
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-LLjD-Jp0.js.map
|
package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-LLjD-Jp0.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ChatMessageComponentAsRichTextEditBox-LLjD-Jp0.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, 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 = getMessageState(\n textValue,\n /* @conditional-compile-remove(attachment-upload) */ attachmentMetadata ?? []\n );\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = (newValue?: string): void => {\n setTextValue(newValue ?? '');\n };\n\n const textTooLongMessage =\n messageState === 'too long'\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\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 remvoes 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 content={textValue}\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","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","useCallback","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","useMemo","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,CAAC,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,EAAE,CAChD,CAAC;IACF,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAA6B,IAAI,CAAC,CAAC;AACxE,IAAA,MAAM,KAAK,GAAGC,cAAQ,EAAE,CAAC;AACzB,IAAA,MAAM,YAAY,GAAGC,qBAAe,CAClC,SAAS;yDAC4C,kBAAkB,KAAlB,IAAA,IAAA,kBAAkB,cAAlB,kBAAkB,GAAI,EAAE,CAC9E,CAAC;AACF,IAAA,MAAM,aAAa,GAAG,YAAY,KAAK,IAAI,CAAC;AAE5C,IAAA,MAAM,mBAAmB,GAAGC,+CAAyC,EAAE,CAAC;AACxE,IAAA,MAAM,mBAAmB,GAAGC,4BAAsB,EAAE,CAAC;AACrD,IAAA,MAAM,MAAM,GAAGC,eAAS,EAAE,CAAC,OAAO,CAAC;AAEnC,IAAA,MAAM,OAAO,GAAG,CAAC,QAAiB,KAAU;Q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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;;;;;"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var React = require('react');
|
4
|
+
var index = require('./index-CfI_of00.js');
|
5
|
+
require('@fluentui/react');
|
6
|
+
require('@fluentui/react-components');
|
7
|
+
require('@fluentui-contrib/react-chat');
|
8
|
+
require('@azure/communication-common');
|
9
|
+
require('@fluentui/react-hooks');
|
10
|
+
require('react-use-draggable-scroll');
|
11
|
+
require('copy-to-clipboard');
|
12
|
+
require('reselect');
|
13
|
+
require('@azure/communication-calling');
|
14
|
+
require('memoize-one');
|
15
|
+
require('@azure/logger');
|
16
|
+
require('events');
|
17
|
+
require('immer');
|
18
|
+
require('@fluentui/react-icons');
|
19
|
+
require('textarea-caret-ts');
|
20
|
+
require('use-debounce');
|
21
|
+
require('@fluentui/react-file-type-icons');
|
22
|
+
require('@griffel/react');
|
23
|
+
require('roosterjs-editor-plugins');
|
24
|
+
require('roosterjs-editor-core');
|
25
|
+
require('roosterjs-editor-types-compatible');
|
26
|
+
require('roosterjs-react');
|
27
|
+
require('roosterjs-editor-dom');
|
28
|
+
require('roosterjs-editor-api');
|
29
|
+
require('uuid');
|
30
|
+
require('html-react-parser');
|
31
|
+
require('react-linkify');
|
32
|
+
require('dompurify');
|
33
|
+
require('@fluentui/react-window-provider');
|
34
|
+
require('@azure/communication-chat');
|
35
|
+
require('nanoid');
|
36
|
+
require('@azure/communication-calling-effects');
|
37
|
+
|
38
|
+
// Copyright (c) Microsoft Corporation.
|
39
|
+
// Licensed under the MIT License.
|
40
|
+
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
41
|
+
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
42
|
+
/**
|
43
|
+
* @private
|
44
|
+
*
|
45
|
+
* Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox
|
46
|
+
* before lazyLoading is done
|
47
|
+
*/
|
48
|
+
const RichTextSendBoxWrapper = (props) => {
|
49
|
+
const richTextSendBoxProps = index.usePropsFor(index.RichTextSendBox);
|
50
|
+
return React.createElement(index.RichTextSendBox, Object.assign({}, richTextSendBoxProps, props));
|
51
|
+
};
|
52
|
+
|
53
|
+
exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
|
54
|
+
//# sourceMappingURL=RichTextSendBoxWrapper-D7SB5NwN.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RichTextSendBoxWrapper-D7SB5NwN.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;;;;"}
|