UNPKG

@pagamio/frontend-commons-lib

Version:

Pagamio library for Frontend reusable components like the form engine and table container

51 lines (50 loc) 2.13 kB
import type { Field } from '../../form-engine'; import type { AuthResponse, CustomAuthConfig } from '../types'; import type { BaseAuthPageProps } from './AuthFormUtils'; /** * Props for the PagamioCustomerRegistrationPage component * @template T - Authentication configuration type */ interface PagamioCustomerRegistrationPageProps<T extends CustomAuthConfig> extends BaseAuthPageProps { /** Customizable text content */ text?: { registerTitle: string; registerSubtitle: string; emailLabel: string; firstNameLabel: string; lastNameLabel: string; phoneLabel: string; passwordLabel: string; confirmPasswordLabel: string; registerButtonLabel: string; loadingButtonLabel: string; backToLoginLabel: string; }; customRegistrationFields?: Field[]; /** Custom data mapper function to transform form data before sending it to authService.register */ mapFormDataToRegistration?: (formData: Record<string, any>) => Record<string, any>; /** Callback handlers */ onRegistrationSuccess?: (authResponse?: AuthResponse<T>) => void; onRegistrationError?: (error: Error) => void; onBackToLogin?: () => void; } export declare const customerRegistrationPageDefaultText: { registerTitle: string; registerSubtitle: string; emailLabel: string; firstNameLabel: string; lastNameLabel: string; phoneLabel: string; passwordLabel: string; confirmPasswordLabel: string; registerButtonLabel: string; loadingButtonLabel: string; backToLoginLabel: string; }; /** * Customer Registration Page component * @template T - Authentication configuration type */ export declare function PagamioCustomerRegistrationPage<T extends CustomAuthConfig>({ logo, text, customRegistrationFields, mapFormDataToRegistration, appLabel, onRegistrationSuccess, onRegistrationError, onBackToLogin, className, }: Readonly<PagamioCustomerRegistrationPageProps<T>>): import("react/jsx-runtime").JSX.Element; export default PagamioCustomerRegistrationPage; export type { PagamioCustomerRegistrationPageProps };