react-native-chating-ui-kit
Version:
CometChat React Native UI Kit is a collection of custom UI Components designed to build text , chat and calling features in your application. The UI Kit is developed to keep developers in mind and aims to reduce development efforts significantly
97 lines (96 loc) • 4.87 kB
TypeScript
/// <reference types="react" />
import { AvatarStyleInterface, ListItemStyleInterface } from "../shared";
import { ImageType } from "../shared";
import { DatePattern, SelectionMode } from "../shared/base/Types";
import { CometChatOptions } from "../shared";
import { ConversationsStyleInterface } from "./ConversationsStyle";
import { CometChat } from "@cometchat-pro/react-native-chat";
import { StatusIndicatorStyleInterface } from "../shared/views/CometChatStatusIndicator/StatusIndicatorStyle";
import { DateStyleInterface } from "../shared/views/CometChatDate/DateStyle";
import { BadgeStyleInterface } from "../shared/views/CometChatBadge";
export interface ConversationsConfigurationInterface {
disableUsersPresence?: boolean;
disableReceipt?: boolean;
disableTyping?: boolean;
disableSoundForMessages?: boolean;
customSoundForMessages?: string;
protectedGroupIcon?: ImageType;
privateGroupIcon?: ImageType;
readIcon?: ImageType;
deliveredIcon?: ImageType;
sentIcon?: ImageType;
datePattern?: (conversation: CometChat.Conversation) => DatePattern;
ListItemView?: (item: CometChat.Conversation) => JSX.Element;
AppBarOption?: () => JSX.Element;
options?: (item: CometChat.Conversation) => CometChatOptions[];
hideSeparator?: boolean;
searchPlaceholder?: string;
backButtonIcon?: ImageType;
showBackButton?: boolean;
selectionMode?: SelectionMode;
onSelection?: (items: Array<CometChat.Conversation>) => void;
selectedConversations?: () => Array<CometChat.Conversation>;
searchBoxIcon?: ImageType;
hideSearch?: boolean;
EmptyStateView?: () => JSX.Element;
ErrorStateView?: () => JSX.Element;
LoadingStateView?: () => JSX.Element;
conversationsRequestBuilder?: CometChat.ConversationsRequestBuilder;
SubtitleView?: (item: CometChat.Conversation) => JSX.Element;
onItemPress?: (item: CometChat.Conversation) => void;
onItemLongPress?: (item: CometChat.Conversation) => void;
onError?: (e: CometChat.CometChatException) => void;
onBack?: () => void;
statusIndicatorStyle?: StatusIndicatorStyleInterface;
avatarStyle?: AvatarStyleInterface;
receiptStyle?: any;
dateStyle?: DateStyleInterface;
conversationsStyle?: ConversationsStyleInterface;
listItemStyle?: ListItemStyleInterface;
badgeStyle?: BadgeStyleInterface;
}
/**
* @class ConversationsConfiguration
*/
export declare class ConversationsConfiguration implements ConversationsConfigurationInterface {
disableUsersPresence?: boolean;
disableReceipt?: boolean;
disableTyping?: boolean;
disableSoundForMessages?: boolean;
customSoundForMessages?: string;
protectedGroupIcon?: ImageType;
privateGroupIcon?: ImageType;
readIcon?: ImageType;
deliveredIcon?: ImageType;
sentIcon?: ImageType;
datePattern?: (conversation: CometChat.Conversation) => DatePattern;
ListItemView?: (item: CometChat.Conversation) => JSX.Element;
AppBarOption?: () => JSX.Element;
options?: (item: CometChat.Conversation) => CometChatOptions[];
hideSeparator?: boolean;
searchPlaceholder?: string;
backButtonIcon?: ImageType;
showBackButton?: boolean;
selectionMode?: SelectionMode;
onSelection?: (items: Array<CometChat.Conversation>) => void;
selectedConversations?: () => Array<CometChat.Conversation>;
searchBoxIcon?: ImageType;
hideSearch?: boolean;
EmptyStateView?: () => JSX.Element;
ErrorStateView?: () => JSX.Element;
LoadingStateView?: () => JSX.Element;
conversationsRequestBuilder?: CometChat.ConversationsRequestBuilder;
SubtitleView?: (item: CometChat.Conversation) => JSX.Element;
onItemPress?: (item: CometChat.Conversation) => void;
onItemLongPress?: (item: CometChat.Conversation) => void;
onError?: (e: CometChat.CometChatException) => void;
onBack?: () => void;
statusIndicatorStyle?: StatusIndicatorStyleInterface;
avatarStyle?: AvatarStyleInterface;
receiptStyle?: any;
dateStyle?: DateStyleInterface;
conversationsStyle?: ConversationsStyleInterface;
listItemStyle?: ListItemStyleInterface;
badgeStyle?: BadgeStyleInterface;
constructor({ disableUsersPresence, disableReceipt, disableTyping, disableSoundForMessages, customSoundForMessages, protectedGroupIcon, privateGroupIcon, readIcon, deliveredIcon, sentIcon, datePattern, ListItemView, AppBarOption, options, hideSeparator, searchPlaceholder, backButtonIcon, showBackButton, selectionMode, onSelection, selectedConversations, searchBoxIcon, hideSearch, EmptyStateView, ErrorStateView, LoadingStateView, conversationsRequestBuilder, SubtitleView, onItemPress, onItemLongPress, onError, onBack, statusIndicatorStyle, avatarStyle, receiptStyle, dateStyle, conversationsStyle, listItemStyle, badgeStyle, }: ConversationsConfigurationInterface);
}