feedlet-widget
Version:
Lightweight JavaScript widget for capturing user feedback and exit-intent surveys
62 lines (60 loc) • 1.9 kB
TypeScript
import { FeedLetConfig } from './types';
export declare class FeedLetWidget {
private config;
private floatingButton;
private threadInterface;
private exitIntentDetector;
private screenshotCapture;
private supabaseClient;
private apiClient;
private contextualManager;
private themeManager;
private eventListeners;
private isInitialized;
private currentThreadData;
constructor(config: FeedLetConfig);
private getClient;
init(): void;
private checkForCommentViewMode;
private loadAndDisplayComment;
private displayCommentOverlay;
private highlightElement;
private addCommentOverlayStyles;
private addBackToDashboardButton;
private escapeHtml;
private setupFloatingButton;
private setupThreadInterface;
private setupExitIntent;
private setupContextualFeedback;
private setupTheme;
private handleThemeChange;
private toggleContextualComments;
private showContextualModeInstruction;
private hideContextualModeInstruction;
private refreshFloatingButton;
private openCommentModal;
private openFeedbackModal;
private openExitSurveyModal;
private handleContextualMarker;
private handleThreadSubmit;
private showThreadSuccess;
private showThreadError;
private getCurrentContextualMarker;
private submitFeedback;
private submitExitSurvey;
showFeedbackModal(): void;
enableContextualComments(): void;
showCommentModal(): void;
enableContextualFeedback(): void;
disableContextualFeedback(): void;
testConnection(): Promise<boolean>;
enableContextualMode(): void;
disableContextualMode(): void;
isContextualModeEnabled(): boolean;
on(event: string, callback: Function): void;
off(event: string, callback: Function): void;
private emit;
hide(): void;
show(): void;
destroy(): void;
}