import { LoginBoxCommonTheme, LoginBoxCommonThemeOptions } from '../index'; import { ExtendedCSSProperties } from '../../Common'; import { CustomComponent } from '../ComponentsOptions'; import { DisclaimerOptions } from '../DisclaimerOptions'; import { OverrideSignupFields } from './DynamicFields'; interface TitleProps { title: string; } export declare enum SignupFields { /** * Phone number and username fields wont be displayed in sign up form by default * Use this field in signup fields properties to enable it * Currently this field will only be externalized to signUpComplete event and will not be sent to the backend */ phoneNumber = "phoneNumber", username = "username" } type SignupFieldsProperties = { [K in SignupFields]?: { /** * If true the field in will be rendered in signup form * Default false */ enabled?: boolean; settings?: { validation?: { /** * If true the field will be required in signup form * Default false */ required?: boolean; }; }; }; }; export interface GoToLoginMessageProps { goToLogin: () => void; goToLoginMessage: string; goToLoginButtonText: string; } export type SignUpDisclaimerOptions = DisclaimerOptions; export declare enum COUNTRY_FILTER_TYPE { ALLOWED = "allowedCountries", BLOCKED = "blockedCountries" } /** * Determine which countries will be displayed or blocked in the phone number field */ export type PhoneNumberCountryCodes = { [COUNTRY_FILTER_TYPE.ALLOWED]: string[]; } | { [COUNTRY_FILTER_TYPE.BLOCKED]: string[]; }; export interface SignupPageComponentsTheme { /** * Signup page title default is 'Account Sign Up' * displayed in sign up screen when no tenant invitation token is active * passing 'null' will hide the title */ accountTitle?: CustomComponent; /** * Direct css style for Account Sign Up title */ accountTitleStyle?: ExtendedCSSProperties; /** * Signup page title default is 'User Sign Up' * displayed in sign up screen when tenant invitation token is active * passing 'null' will hide the title */ userTitle?: CustomComponent; /** * Direct css style for User Sign Up title */ userTitleStyle?: ExtendedCSSProperties; /** * Login page container style */ containerStyle?: ExtendedCSSProperties; /** * Login page form container style */ formContainerStyle?: ExtendedCSSProperties; /** * Login page title default is 'Sign In' * displayed in login screen (login with password, pre-login) * passing 'null' will hide the title */ title?: CustomComponent; /** * Direct css style for Login Page title */ titleStyle?: ExtendedCSSProperties; /** * Go to login component displayed under box title default is 'Already have an account?' * displayed in login screen (login with password, pre-login) * passing 'null' will hide the signup message */ loginMessage?: CustomComponent; /** * Direct css style for 'Go to Login' */ loginMessageStyle?: ExtendedCSSProperties; /** * Disclaimer options * on sign page can be displayed as mandatory checkbox or text info */ disclaimer?: SignUpDisclaimerOptions; loginMessagePlacement?: 'box' | 'page'; /** * use this flag if you want to hide the sign up form and use only SSO or social sign ups */ hideSignUpForm?: boolean; /** * use this flag if you want to hide the field "Company name" from the sign up form */ hideSignUpFields?: { hideCompanyName?: boolean; }; /** * Control the state of the "Sign Up" fields */ fieldsProperties?: SignupFieldsProperties; /** * use this flag if you want to show password meter on the sign up form */ passwordMeter?: { enabled?: boolean; }; /** * use this flag if you want to separate full name to first and last name. * by default: false. */ splitFullName?: boolean; /** * Use this options to override the default signup fields * This function will be called before rendering the signup form * and will receive the default signup fields, the Yup instance and the translation function * The function should return the modified array of form field configurations * Use string js code to be evaluated at runtime */ overrideSignupFields?: OverrideSignupFields | string; /** * If true, beside the password field will be displayed a confirmation password field * Default is false */ requirePasswordConfirmation?: boolean; } export interface SignupPageThemeOptions extends LoginBoxCommonThemeOptions, SignupPageComponentsTheme { } export interface SignupPageTheme extends LoginBoxCommonTheme, SignupPageComponentsTheme { } export {};