UNPKG

@cometchat/chat-uikit-react-native

Version:

Ready-to-use Chat UI Components for React Native

54 lines (53 loc) 2.41 kB
import { CometChat } from "@cometchat/chat-sdk-react-native"; import { JSX } from "react"; import { AdditionalParams, CometChatMessageTemplate, MessageBubbleAlignmentType } from "../../shared"; import { DataSource, DataSourceDecorator } from "../../shared/framework"; import { CometChatTheme } from "../../theme/type"; import { StickerConfigurationInterface } from "./StickerConfiguration"; import { AdditionalAuxiliaryOptionsParams } from "../../shared/base/Types"; /** * StickersExtensionDecorator Class * Extends the DataSourceDecorator to add support for sticker messages. * Defines sticker message templates, auxiliary options, and category/type handling. */ export declare class StickersExtensionDecorator extends DataSourceDecorator { configuration: StickerConfigurationInterface; constructor(props: { dataSource: DataSource; configration?: StickerConfigurationInterface; }); /** * Checks if the message is deleted. * @param {CometChat.BaseMessage} message - The message to check. * @returns {boolean} - True if the message is deleted, otherwise false. */ isDeletedMessage(message: CometChat.BaseMessage): boolean; /** * Adds sticker templates to the list of message templates. */ getAllMessageTemplates(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate[]; /** * Renders a sticker bubble containing the sticker image. */ getStickerBubble(message: CometChat.CustomMessage, alignment: MessageBubbleAlignmentType, theme: CometChatTheme): JSX.Element; /** * Adds the sticker button to auxiliary options for message input. */ getAuxiliaryOptions(user: CometChat.User, group: CometChat.Group, id?: Map<string, any>, additionalAuxiliaryParams?: AdditionalAuxiliaryOptionsParams): JSX.Element[]; /** * Ensures that "custom" is included in the list of message categories. */ getAllMessageCategories(): string[]; /** * Adds the sticker type to the list of supported message types. */ getAllMessageTypes(): string[]; /** * Returns a unique identifier for the sticker extension. */ getId(): string; /** * Customizes the last conversation message preview for sticker messages. */ getLastConversationMessage(conversation: CometChat.Conversation, theme?: CometChatTheme): string | JSX.Element; }