import type { FormField } from '@funkit/connect-core'; import type { TextInputProps } from 'react-native'; /** * The pages the US form is drawn as, in the order the design steps them. * * Figma "EDIT: KYC Enhancements": 1508:2616 (name), 1844:17471 (date of * birth), 1631:7256 (address), 1631:7883 (SSN). `DETAILS` is not a frame — it * is where a field the design never drew goes, so a form the server words its * own way still renders. */ export type KycSection = 'NAME' | 'DOB' | 'NATIONALITY' | 'COUNTRY' | 'ADDRESS' | 'SSN' | 'PHONE' | 'OCCUPATION' | 'EMPLOYMENT' | 'PURPOSE' | 'SOURCE_OF_WEALTH' | 'INCOME' | 'ACTIVITY' | 'DETAILS'; export interface KycSectionPage { section: KycSection; /** Drawn as one card with a rule between rows, rather than loose boxes. */ grouped: boolean; /** Fields sharing a row sit side by side, as the design pairs them. */ rows: FormField[][]; } /** * The questionnaire the due-diligence figures arrive under. The contract types * a questionnaire id as a template, so these are the three this build draws * a page for; any other lands in `DETAILS`. */ export declare const GROSS_ANNUAL_INCOME = "QUESTIONNAIRE_RESPONSE:customerDueDiligence:grossAnnualIncome"; export declare const EXPECTED_AMOUNT_PER_MONTH = "QUESTIONNAIRE_RESPONSE:customerDueDiligence:expectedTransactionAmountPerMonth"; export declare const TRANSACTIONS_PER_MONTH = "QUESTIONNAIRE_RESPONSE:customerDueDiligence:transactionFrequencyPerMonth"; /** * The server owns the field list, so an id this build does not know is not * identity: only the frames that collect who someone is qualify. */ export declare function isIdentityField(field: FormField): boolean; export declare function isInlineChoiceSection(section: KycSection): boolean; export declare function pickedDateField(page: KycSectionPage): FormField | undefined; /** * Whether the field is typed into, and so takes a turn in the return-key * chain. A choice is not. */ export declare function isFocusableField(field: FormField): boolean; export declare function fieldKeyboardType(field: FormField): TextInputProps['keyboardType'] | undefined; /** Whether the field raises a pad rather than letters, and so has no return key. */ export declare function isDigitsField(field: FormField): boolean; /** Whether the field is drawn at a fixed width rather than growing to fill. */ export declare function isFixedWidthField(field: FormField): boolean; /** * The form's fields that no page draws. * * Type only: an unknown id has a page (`DETAILS`), so refusing one would * reject a whole form over a field the screens can draw perfectly well. A * form with any of these cannot be completed here, so the caller shows its * unsupported state rather than a form missing a field the server requires. */ export declare function unsupportedFields(fields: readonly FormField[]): FormField[]; /** * Splits a form into the pages the design steps through. * * Pages keep the design's order; fields keep the server's, so a page that * gains a field it already draws renders it without a client release. A page * with no fields is not a page. */ export declare function sectionPages(fields: readonly FormField[]): KycSectionPage[]; //# sourceMappingURL=formLayout.d.ts.map