UNPKG

@infomatebot/chatbot-widget

Version:

Build intelligent chatbots using pre-designed conversation flows with quick reply options. Upload documents for AI-powered, context-aware responses and reduce support costs by 80% with guided conversations

66 lines 2.22 kB
import type { RequiredChatbotConfig, Message, QuickReply } from '../types/internal.types'; export declare class ChatbotUI { private shadow; private config; private elements; private isRendered; private isMaximized; private currentQuickReplies; constructor(shadow: ShadowRoot, config: RequiredChatbotConfig); create(): void; private getHTML; private getTriggerHTML; private getWindowHTML; private getHeaderHTML; private getMessagesHTML; private getInputAreaHTML; private getPoweredByHTML; private cacheElements; private setupInitialState; private setupInputHandlers; addMessage(message: Message, quickReplies?: QuickReply[]): void; getCurrentQuickReplies(): QuickReply[]; private createQuickRepliesElement; removeAllQuickReplies(): void; toggleMaximize(): void; private getMaximizeIcon; private createMessageElement; showTypingIndicator(): void; hideTypingIndicator(): void; clearMessages(): void; clearInput(): void; focusInput(): void; setInputDisabled(disabled: boolean): void; show(): void; hide(): void; updateBotStatus(status: string): void; updateConfig(config: RequiredChatbotConfig): void; getInputValue(): string; onTriggerClick(callback: () => void): void; onCloseClick(callback: () => void): void; onSendMessage(callback: (message: string) => void): void; onQuickReplyClick(callback: (label: string, replyChoiceId: string) => Promise<void> | void): void; private disableQuickReplies; private enableQuickReplies; private isInputValid; private updateSendButtonState; private scrollToBottom; private updateTriggerIcon; private getDownArrowIcon; private announceToScreenReader; isUIRendered(): boolean; getMessageCount(): number; destroy(): void; private getChatIcon; private getBotIcon; private getUserIcon; private getCloseIcon; private getSendIcon; private getLogoSVG; /** * Format message content - API now sends properly formatted HTML * Widget displays the secure HTML directly */ private formatMessageContent; } //# sourceMappingURL=chatbot-ui.d.ts.map