@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
88 lines (87 loc) • 3.61 kB
TypeScript
import { DataSource, DataSourceDecorator } from "../../shared/framework";
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { CometChatMessageComposerAction } from "../../shared/helper/types";
import { CometChatMessageTemplate } from "../../shared/modals";
import { JSX } from "react";
import { AdditionalAttachmentOptionsParams, AdditionalParams, MessageBubbleAlignmentType } from "../../shared/base/Types";
import { CometChatTheme } from "../../theme/type";
/**
* Extension decorator for Collaborative Whiteboard messages.
*/
export declare class CollaborativeWhiteboardExtensionDecorator extends DataSourceDecorator {
whiteboardUrl: string;
loggedInUser: CometChat.User;
/**
* Creates an instance of CollaborativeWhiteboardExtensionDecorator.
*
* @param dataSource - The data source instance to decorate.
*/
constructor(dataSource: DataSource);
/**
* Checks if the given message is deleted.
*
* @param message - The message to check.
* @returns True if the message is deleted.
*/
isDeletedMessage(message: CometChat.BaseMessage): boolean;
/**
* Returns the unique ID for this extension.
*
* @returns The extension ID.
*/
getId(): string;
/**
* Gets a preview for the last conversation message.
*
* @param conversation - The conversation object.
* @param theme - (Optional) The theme.
* @returns A string or JSX.Element to display as the conversation preview.
*/
getLastConversationMessage(conversation: CometChat.Conversation, theme?: CometChatTheme): string | JSX.Element;
/**
* Returns an array of all message categories, ensuring custom category is included.
*
* @returns Array of message categories.
*/
getAllMessageCategories(): string[];
/**
* Returns an array of all message types, including whiteboard type.
*
* @returns Array of message types.
*/
getAllMessageTypes(): string[];
/**
* Returns the attachment options for the composer, including the whiteboard option.
*
* @param theme - The current theme.
* @param user - (Optional) The user object.
* @param group - (Optional) The group object.
* @param composerId - (Optional) The composer ID.
* @returns Array of attachment option actions.
*/
getAttachmentOptions(theme: CometChatTheme, user?: any, group?: any, composerId?: any, additionalAttachmentOptionsParams?: AdditionalAttachmentOptionsParams): CometChatMessageComposerAction[];
/**
* Shares a collaborative whiteboard by calling the extension.
*
* @param user - (Optional) The user object.
* @param group - (Optional) The group object.
*/
shareCollaborativeWhiteboard(user?: CometChat.User, group?: CometChat.Group): void;
/**
* Returns all message templates including the whiteboard template.
*
* @param theme - The current theme.
* @param additionalParams - (Optional) Additional parameters.
* @returns Array of message templates.
*/
getAllMessageTemplates(theme: CometChatTheme, additionalParams?: AdditionalParams): CometChatMessageTemplate[];
/**
* Returns the collaborative bubble component for a whiteboard message.
*
* @param message - The message object.
* @param _alignment - The bubble alignment.
* @param theme - The current theme.
* @returns A JSX.Element to render.
*/
getCollaborativeBubble(message: CometChat.BaseMessage, _alignment: MessageBubbleAlignmentType, theme: CometChatTheme): JSX.Element;
}