@pagamio/frontend-commons-lib
Version:
Pagamio library for Frontend reusable components like the form engine and table container
22 lines (21 loc) • 1.01 kB
TypeScript
/**
* Configurable Google Form Pre-fill Utility
*
* This utility provides a configurable way to generate pre-filled Google Form URLs
* and open feedback forms across different applications.
*/
import type { FeedbackFormConfig, FeedbackUserData } from './types';
/**
* Generate a pre-filled Google Form URL with user data
* @param config - Form configuration with base URL and field mappings
* @param userData - User information to pre-fill in the form
* @returns Pre-filled Google Form URL
*/
export declare function generateFeedbackFormUrl(config: FeedbackFormConfig, userData?: FeedbackUserData): string;
/**
* Open feedback form in a new tab with pre-filled user data
* @param config - Form configuration with base URL and field mappings
* @param userData - User information to pre-fill in the form
* @param onFormOpened - Optional callback after form is opened
*/
export declare function openFeedbackForm(config: FeedbackFormConfig, userData?: FeedbackUserData, onFormOpened?: () => void): void;