import { ChangeDetectorRef, NgZone, OnChanges, OnInit, SimpleChanges, TemplateRef } from "@angular/core"; import { CometChat } from "@cometchat-pro/chat"; import { Subscription } from "rxjs"; import { SelectionMode, States, TitleAlignment, BaseStyle, ConversationsStyle, ListStyle } from "uikit-utils-lerna"; import { CometChatOption, DatePatterns } from 'uikit-resources-lerna'; import 'my-cstom-package-lit'; import { AvatarStyle, ListItemStyle, ConfirmDialogStyle, ReceiptStyle, DateStyle, BadgeStyle } from 'my-cstom-package-lit'; import { CometChatThemeService } from "../../CometChatTheme.service"; /** * * CometChatConversation is a wrapper component consists of CometChatListBaseComponent and ConversationListComponent. * * @version 1.0.0 * @author CometChatTeam * @copyright © 2022 CometChat Inc. * */ export declare class CometChatConversationsComponent implements OnInit, OnChanges { private ngZone; private ref; private themeService; /** * This properties will come from Parent. */ subtitleView: TemplateRef; title: string; options: ((member: CometChat.Conversation) => CometChatOption[]) | null; searchPlaceHolder: string; disableUsersPresence: boolean; disableReceipt: boolean; disableTyping: boolean; deliveredIcon: string; readIcon: string; errorIcon: string; datePattern: DatePatterns; onError: (error: CometChat.CometChatException) => void; sentIcon: string; privateGroupIcon: string; protectedGroupIcon: string; customSoundForMessages: string; activeConversation: CometChat.Conversation | null; searchIconURL: string; hideSearch: boolean; conversationsRequestBuilder: any; emptyStateView: TemplateRef; onSelect: (conversation: CometChat.Conversation) => void; loadingIconURL: string; errorStateView: TemplateRef; loadingStateView: TemplateRef; emptyStateText: string; errorStateText: string; titleAlignment: TitleAlignment; listItemView: TemplateRef; menu: TemplateRef; hideSeparator: boolean; searchPlaceholder: string; hideError: boolean; selectionMode: SelectionMode; disableSoundForMessages: boolean; confirmDialogTitle: any; confirmButtonText: string; cancelButtonText: string; confirmDialogMessage: string; onItemClick: (conversation: CometChat.Conversation) => void; deleteConversationDialogStyle: ConfirmDialogStyle; backdropStyle: BaseStyle; badgeStyle: BadgeStyle; dateStyle: DateStyle; conversationsStyle: ConversationsStyle; listItemStyle: ListItemStyle; statusIndicatorStyle: any; typingIndicatorText: string; threadIndicatorText: string; avatarStyle: AvatarStyle; receiptStyle: ReceiptStyle; ccGroupMemberAdded: Subscription; ccGroupMemberJoined: Subscription; ccGroupMemberKicked: Subscription; ccGroupMemberBanned: Subscription; ccGroupMemberScopeChanged: Subscription; ccOwnershipChanged: Subscription; ccMessageEdit: Subscription; ccMessageSent: Subscription; ccMessageEdited: Subscription; ccMessageDelete: Subscription; ccGroupDeleted: Subscription; ccGroupLeft: Subscription; ccUserBlocked: Subscription; ccMessageRead: Subscription; iconStyle: any; listStyle: ListStyle; menustyle: { width: string; height: string; border: string; borderRadius: string; background: string; textFont: string; textColor: string; iconTint: string; iconBackground: string; iconBorder: string; iconBorderRadius: string; submenuWidth: string; submenuHeight: string; submenuBorder: string; submenuBorderRadius: string; submenuBackground: string; }; typingIndicator: CometChat.TypingIndicator | null; typingListenerId: string; selectionmodeEnum: typeof SelectionMode; isDialogOpen: boolean; isEmpty: boolean; isLoading: boolean; state: States; statusColor: any; limit: number; isError: boolean; conversationList: CometChat.Conversation[]; scrolledToBottom: boolean; checkItemChange: boolean; conversationOptions: CometChatOption[]; showConfirmDialog: boolean; conversationToBeDeleted: CometChat.Conversation | null; conversationListenerId: string; userListenerId: string; groupListenerId: string; groupToUpdate: CometChat.Group | {}; enablePolls: boolean; enableStickers: boolean; enableWhiteboard: boolean; enableDocument: boolean; threadIconURL: string; confirmDialogStyle: ConfirmDialogStyle; subtitleValue: string; modalStyle: BaseStyle; /** * Properties for internal use */ localize: (str: string) => any; /** * This properties will come from Parent. */ loggedInUser: CometChat.User | null; /** * Properties for internal use */ /** * passing this callback to menuList component on delete click * @param {CometChat.Conversation} conversation */ deleteConversationOnClick: (() => void) | null; onConfirmClick: () => void; setStatusIndicatorStyle: (conversation: CometChat.Conversation) => any; /** * @param {CometChat.Conversation} conversation */ checkStatusType(conversation: CometChat.Conversation): any; getExtensionData(messageObject: CometChat.BaseMessage): any; setSubtitle: (conversationObject: CometChat.Conversation) => string; checkGroupType(conversation: CometChat.Conversation): string; onCancelClick: () => void; getMessageReceipt: (conversation: CometChat.Conversation) => import("uikit-utils-lerna/dist/Utils/MessageReceiptUtils").receipts; getDate(): DatePatterns.DayDate | DatePatterns.DayDateTime; optionsStyle: { background: string; border: string; }; isActive: boolean; contactsNotFound: boolean; chatSearch: boolean; constructor(ngZone: NgZone, ref: ChangeDetectorRef, themeService: CometChatThemeService); ngOnInit(): void; updateConversationObject(conversation: CometChat.Conversation): void; subscribeToEvents(): void; unsubscribeToEvents(): void; getConversationFromUser(user: CometChat.User): CometChat.Conversation | null; getConversationFromGroup(group: CometChat.Group): CometChat.Conversation | null; ngOnChanges(change: SimpleChanges): void; ngOnDestroy(): void; setConversationOptions(): void; onClick(conversation: CometChat.Conversation): void; resetUnreadCount(): void; setThemeStyle(): void; setListItemStyle(): void; setAvatarStyle(): void; setStatusStyle(): void; setConversationsStyle(): void; setDateStyle(): void; setReceiptStyle(): void; setBadgeStyle(): void; setConfirmDialogStyle(): void; /** * @param {Object={}} config * @param {Object} defaultConfig? * @returns defaultConfig */ /** * @param {CometChat.Conversation} conversation */ /** * Fetches the coversation based on the conversationRequest config */ fetchNextConversation(): any; updateEditedMessage(message: CometChat.TextMessage): void; /** * attaches Listeners for user activity , group activities and calling * @param callback */ /** * @param {Function} callback */ attachListeners(callback: any): void; /** * Removes all listeners */ removeListeners(): void; /** * Fetches Conversations Details with all the users */ getConversation: () => void; isReceiptDisable(conversation: CometChat.Conversation): boolean; /** * Updates the conversation list's last message , badgeCount , user presence based on activities propagated by listeners */ conversationUpdated: (key: any, item: CometChat.User | CometChat.Group | null | undefined, message: CometChat.BaseMessage, options?: null) => void; /** * @param {CometChat.BaseMessage} message */ markMessageAsDelivered: (message: CometChat.BaseMessage) => void; /** * @param {CometChat.BaseMessage} readMessage */ getUinx: () => string; markAsRead(readMessage: CometChat.MessageReceipt): void; /** * Updates Detail when user comes online/offline * @param */ /** * @param {CometChat.User|CometChat.Group|null} user */ updateUser(user: CometChat.User | CometChat.Group | null): void; /** * * Gets the last message * @param conversation /** * @param {CometChat.BaseMessage} message * @param {CometChat.Conversation|{}} conversation */ makeLastMessage(message: CometChat.BaseMessage, conversation?: CometChat.Conversation | {}): CometChat.BaseMessage; /** * * Updates Conversations as Text/Custom Messages are received * @param * */ /** * @param {CometChat.BaseMessage} message * @param {boolean} notification */ updateConversation(message: CometChat.BaseMessage, notification?: boolean): void; updateDeliveredMessage(messageReceipt: CometChat.MessageReceipt): void; /** * * Gets The Count of Unread Messages * @param */ /** * @param {any} conversation * @param {any} operator */ makeUnreadMessageCount(conversation: CometChat.Conversation, operator?: any): number; /** * Changes detail of conversations * @param */ /** * @param {CometChat.BaseMessage} message */ makeConversation(message: CometChat.BaseMessage): Promise; /** * Updates Conversation View when message is edited or deleted */ conversationEditedDeleted(message: CometChat.BaseMessage): void; /** * If User scrolls to the bottom of the current Conversation list than fetch next items of the Conversation list and append * @param Event */ /** * Plays Audio When Message is Received */ playAudio(): void; /** * @param {CometChat.Conversation|{}} conversation */ updateConversationList(conversation: CometChat.Conversation | null): void; /** * showing dialog for confirm and cancel * @param {CometChat.Conversation|{}} conversation */ showConfirmationDialog: (conversation: CometChat.Conversation) => void; onOptionClick(event: any, conversation: CometChat.Conversation): void; /** * show confirm dialog screen * @param {CometChat.Conversation|{}} conversaton */ getActiveConversation(conversation: CometChat.Conversation): boolean | null; /** * handle confirm dialog response * @param {string} value */ deleteSelectedConversation(): void; updateLastMessage(message: CometChat.BaseMessage): void; removeConversation(conversation: CometChat.Conversation): void; styles: any; subtitleStyle: (conversation: any) => { font: string | undefined; color: string | undefined; }; itemThreadIndicatorStyle: () => { textFont: string; textColor: string | undefined; }; }