/** * UDP Progress Fields — Single source of truth for step progress counting. * * Used by both frontend (stepper UI) and backend (computeStepProgressCounts). * Each step lists the curated fields that determine filled/total progress. * * Dot-paths (e.g., "currentAddress.state") resolve nested subdocument fields. * Only these fields count toward progress — extra fields in the schema are ignored. * * Progress is VISIBILITY-AWARE: a field only counts toward `total` (the * denominator) when it is actually applicable to the user's own answers, * evaluated via `isFieldVisible`. A class_12 user is not asked for degree * records, and someone who lists no siblings is not asked for sibling links, * so those fields are excluded from both the numerator and the denominator. * This mirrors the conditional rendering the stepper already performs, so the * "%" reflects "how much of what applies to YOU is filled" rather than a fixed * field count. See `conditionalOn` in profile-fields/* + `isFieldVisible`. */ export declare const UDP_PROGRESS_FIELDS: Record; /** Total number of UDP steps */ export declare const UDP_TOTAL_STEPS = 12; /** * Synthetic progress keys — keys that aren't real fields but represent * a group of underlying fields. Counted as "filled" if ANY underlying * field is filled. Used for UI sub-steps that collect multiple fields * at once (e.g. the fullName sub-step that saves firstName, middleName, * and lastName). */ export declare const UDP_PROGRESS_SYNTHETIC: Record; /** * Resolve a dot-path (e.g., "currentAddress.state") against a data object. * Works with both plain objects and Mongoose subdocuments. */ export declare function getNestedValue(obj: Record, path: string): unknown; /** Determine if a field value counts as "filled" for progress */ export declare function isFieldFilled(value: unknown): boolean; /** * Calculate progress for a single step. * Shared between frontend (stepper UI) and backend (API response). */ export declare function calculateStepProgress(stepNumber: number, formData: Record | undefined | null): { filled: number; total: number; }; /** * Calculate overall progress across all steps. * Returns per-step breakdown + overall percentage. * * Mirrors dating-schema's calculateDatingOverallProgress(). * * @param stepData - Map of step number → form data (e.g., { 1: {...}, 2: {...} }) */ export declare function calculateOverallProgress(stepData: Record | undefined | null>): { steps: { stepNumber: number; filled: number; total: number; }[]; totalFilled: number; totalFields: number; percent: number; }; //# sourceMappingURL=progress-fields.d.ts.map