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

69 lines 1.91 kB
import type { InputCollectorConfig } from '../types/internal.types'; export declare class InputCollector { private shadowRoot; private isDestroyed; private currentCollector; private collectionPromise; constructor(shadowRoot: ShadowRoot); /** * Collect user inputs - handles both single input and multiple inputs uniformly */ collectInputs(config: InputCollectorConfig): Promise<Record<string, string> | null>; /** * Show unified input collector UI - handles both single and multiple inputs */ private showInputCollector; /** * Create appropriate input element based on field config */ private createInputElement; /** * Create unified buttons container for both single and multiple inputs */ private createButtonsContainer; /** * Validate single field */ private validateField; /** * Validate all fields */ private validateAllFields; /** * Show field error (works for both single input and forms) */ private showFieldError; /** * Clear field error (works for both single input and forms) */ private clearFieldError; /** * Handle form submission (unified for single input and multiple inputs) */ private handleFormSubmit; /** * Handle form cancellation (unified for single input and multiple inputs) */ private handleFormCancel; /** * Hide and remove input collector */ hideInputCollector(): void; /** * Get HTML input type from config input type */ private getInputType; /** * Check if input collection is currently active */ isCollecting(): boolean; /** * Cancel current input collection */ cancelCollection(): void; /** * Destroy the input collector */ destroy(): void; } //# sourceMappingURL=input-collector.d.ts.map