UNPKG

communication-react-19

Version:

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

77 lines 2.78 kB
import { AttachmentMetadataInProgress } from "../../../../acs-ui-common/src"; import { AttachmentMetadata } from "../../../../acs-ui-common/src"; /** * @private */ export declare const MAXIMUM_LENGTH_OF_MESSAGE = 8000; /** * @private */ export declare const hasIncompleteAttachmentUploads: (attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined) => boolean; /** * @private */ export declare const isAttachmentUploadCompleted: (attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined) => boolean; /** * Obtain any image nodes from the content DOM passed in * returns a list of image IDs * @internal */ export declare const inlineImageIds: (content?: string) => { id: string; url?: string; }[]; /** * Check if the content has inline image. * @internal */ export declare const hasInlineImageContent: (content: string) => boolean; /** * @internal * * @param message - The message content to update. * @param initialInlineImages - The initial inline images that comes with the message before editing. * * @returns The updated message content. */ export declare const updateStylesOfInlineImages: (message: string, initialInlineImages: Record<string, string>[]) => Promise<string>; /** * @private */ export declare const isMessageTooLong: (valueLength: number) => boolean; /** * @private */ export declare const sanitizeText: (message: string) => string; /** * Determines whether the send box should be disabled. * * @param hasContent - Indicates whether the send box has content. * @param hasCompletedAttachmentUploads - Indicates whether attachment uploads have completed. * @param hasError - Indicates whether there is an error. * @param disabled - Indicates whether the send box is disabled. * @returns A boolean value indicating whether the send box should be disabled. */ export declare const isSendBoxButtonDisabled: ({ hasContent, hasCompletedAttachmentUploads, hasError, disabled }: { hasContent: boolean; hasCompletedAttachmentUploads: boolean; hasError: boolean; disabled: boolean; }) => boolean; /** * @internal */ export declare const toAttachmentMetadata: (attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined) => AttachmentMetadata[] | undefined; /** * @internal */ export declare const modifyInlineImagesInContentString: (content: string, initialInlineImages: Record<string, string>[], onCompleted?: (content: string) => void) => Promise<void>; /** * @internal */ export declare const removeBrokenImageContentAndClearImageSizeStyles: (content: string) => string; /** * @internal */ export declare const getContentWithUpdatedInlineImagesInfo: (content: string, inlineImageWithProgress: AttachmentMetadataInProgress[]) => string; //# sourceMappingURL=SendBoxUtils.d.ts.map