UNPKG

communication-react-19

Version:

React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)

57 lines 2.77 kB
/// <reference types="react" /> import { MessageStatus } from "../../../../acs-ui-common/src"; import { MessageProps, MessageRenderer, MessageThreadStyles, _ChatMessageProps } from '../MessageThread'; import { ChatMessage, OnRenderAvatarCallback } from '../../types'; import { BlockedMessage } from '../../types'; import { AttachmentMenuAction } from '../../types/Attachment'; import { AttachmentMetadata } from "../../../../acs-ui-common/src"; import { AttachmentMetadataInProgress } from "../../../../acs-ui-common/src"; import { MentionOptions } from '../MentionPopover'; import { MessageStatusIndicatorProps } from '../MessageStatusIndicator'; import { InlineImageOptions } from './ChatMessageContent'; /** * Props for {@link ChatMessageComponentWrapper} * * @private */ export type ChatMessageComponentWrapperProps = _ChatMessageProps & { /** * UserId of the current user. */ userId: string; styles: MessageThreadStyles | undefined; shouldOverlapAvatarAndMessage: boolean; onRenderMessageStatus: ((messageStatusIndicatorProps: MessageStatusIndicatorProps) => JSX.Element | null) | undefined; defaultStatusRenderer: (message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage, participantCount: number, readCount: number, status?: MessageStatus) => JSX.Element; onRenderMessage?: (messageProps: MessageProps, messageRenderer?: MessageRenderer) => JSX.Element; onRenderAvatar?: OnRenderAvatarCallback; showMessageStatus?: boolean; participantCount?: number; readCount?: number; onActionButtonClick: (message: ChatMessage, setMessageReadBy: (readBy: { id: string; displayName: string; }[]) => void) => void; onDisplayDateTimeString?: (messageDate: Date) => string; inlineImageOptions?: InlineImageOptions; mentionOptions?: MentionOptions; onRenderAttachmentDownloads?: (message: ChatMessage) => JSX.Element; /** * Optional callback to define custom actions for attachments. */ actionsForAttachment?: (attachment: AttachmentMetadata, message?: ChatMessage) => AttachmentMenuAction[]; isRichTextEditorEnabled?: boolean; onPaste?: (event: { content: DocumentFragment; }) => void; onRemoveInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void; onInsertInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void; inlineImagesWithProgress?: AttachmentMetadataInProgress[]; }; /** * The wrapper component to display different types of chat message. * * @private */ export declare const ChatMessageComponentWrapper: (props: ChatMessageComponentWrapperProps) => JSX.Element; //# sourceMappingURL=ChatMessageComponentWrapper.d.ts.map