dating-schema 0.46.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export { type AgeRange, ageRangeSchema, emptyStringToUndefined, type Gender, gen
11
11
  export { getFieldMeta, getFieldOptions } from './field-helpers.js';
12
12
  export { type BoostBody, boostBodySchema, type ComplimentBody, complimentBodySchema, type ImageLikeBody, type InteractionListQuery, type InteractionType, imageLikeBodySchema, interactionListQuerySchema, interactionTypeSchema, type RewindBody, rewindBodySchema, type SwipeBody, type SwipeResponse, swipeBodySchema, swipeResponseSchema, } from './interactions.js';
13
13
  export { getOnboardingFieldConfig, ONBOARDING_FIELDS, ONBOARDING_STEP_GROUPS, ONBOARDING_TOTAL_MAIN_STEPS, ONBOARDING_TOTAL_SUB_STEPS, type OnboardingFieldConfig, type OnboardingStepGroup, } from './onboarding-config.js';
14
+ export { DATING_PROGRESS_FIELDS, DATING_PROGRESS_TOTAL_STEPS, calculateDatingStepProgress, calculateDatingOverallProgress, getNestedValue, isFieldFilled, } from './onboarding-progress.js';
14
15
  export { type BooleanFeatureKey, type EnumFeatureKey, type ExploreAccessLevel, type FeatureDisplayItem, type FeatureKey, type FilterLevel, getMinPlanForFeature, getPlanFeatureDisplay, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, isPaidPlan, type NumericFeatureKey, PAID_PLANS, PLAN_FEATURE_DISPLAY, PLAN_IDS, PLAN_LIMITS, type PlanDisplayValue, type PlanId, type PlanLimits, PREMIUM_EXPLORE_CATEGORIES, PREMIUM_PLANS, renderPlanDisplayValue, type ScoreBreakdownLevel, TOP_PLANS, type WhoLikedYouLevel, } from './plan-limits.js';
15
16
  export { type CreateProfileInput, createProfileSchema, type FullProfileData, fullProfileSchema, getCognitiveBandRank, type OnboardingFormData, onboardingFormSchema, type UpdateProfileInput, updateProfileSchema, } from './profile.js';
16
17
  export { allFieldGroups, basics, career, cognitive, type FieldGroup, type FieldOption, familyHome, favourites, financeLegal, healthWellness, heroIdentity, interestCategories, interests, lifestyle, lookingFor, type MultiSelectField, type OptionCategory, type ProfileField, personality, relationshipIntimacy, religionCommunity, type SelectField, selfAssessment, storyPrompts, values, } from './profile-fields/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,gBAAgB,EACrB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,QAAQ,EAEb,cAAc,EACd,sBAAsB,EACtB,KAAK,MAAM,EAEX,YAAY,EACZ,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B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B,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,MAAM,EACX,YAAY,GACb,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,cAAc,EACd,KAAK,gBAAgB,EACrB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,KAAK,QAAQ,EAEb,cAAc,EACd,sBAAsB,EACtB,KAAK,MAAM,EAEX,YAAY,EACZ,KAAK,YAAY,EACjB,kBAAkB,EAClB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,UAAU,EACf,KAAK,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,WAAW,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EACL,KAAK,SAAS,EACd,eAAe,EACf,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,KAAK,qBAAqB,EAC1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AS,EACd,eAAe,EACf,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,KAAK,sBAAsB,EAC3B,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,wBAAwB,EACxB,KAAK,MAAM,EACX,YAAY,GACb,MAAM,mBAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ export { getFieldMeta, getFieldOptions } from './field-helpers.js';
18
18
  // ─── Interaction schemas ─────────────────────────────────────────────────────
19
19
  export { boostBodySchema, complimentBodySchema, imageLikeBodySchema, interactionListQuerySchema, interactionTypeSchema, rewindBodySchema, swipeBodySchema, swipeResponseSchema, } from './interactions.js';
20
20
  export { getOnboardingFieldConfig, ONBOARDING_FIELDS, ONBOARDING_STEP_GROUPS, ONBOARDING_TOTAL_MAIN_STEPS, ONBOARDING_TOTAL_SUB_STEPS, } from './onboarding-config.js';
21
+ export { DATING_PROGRESS_FIELDS, DATING_PROGRESS_TOTAL_STEPS, calculateDatingStepProgress, calculateDatingOverallProgress, getNestedValue, isFieldFilled, } from './onboarding-progress.js';
21
22
  // ─── Plan limits ─────────────────────────────────────────────────────────────
22
23
  export { getMinPlanForFeature, getPlanFeatureDisplay, getPlanLimit, getPlanLimits, hasRemainingQuota, isFeatureEnabled, isPaidPlan, PAID_PLANS, PLAN_FEATURE_DISPLAY, PLAN_IDS, PLAN_LIMITS, PREMIUM_EXPLORE_CATEGORIES, PREMIUM_PLANS, renderPlanDisplayValue, TOP_PLANS, } from './plan-limits.js';
23
24
  // ─── Profile schemas ─────────────────────────────────────────────────────────
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,OAAO,EACL,aAAa,EAGb,cAAc,EAEd,sBAAsB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AAM,GACP,MAAM,2BAA2B,CAAC;AACnC,+EAA+E;AAC/E,cAAc,sBAAsB,CAAC;AAErC,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAIf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAEL,4BAA4B,EAE5B,wBAAwB,EAExB,YAAY,GACb,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * dating-schema — Shared Zod schemas for the Dating feature\n *\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\n * Guarantees identical validation logic and TypeScript types on both sides.\n *\n * @module dating-schema\n */\n\n// ─── Badge schemas ──────────────────────────────────────────────────────────\nexport {\n BADGE_DISPLAY,\n type BadgeDisplayInfo,\n type BadgeKey,\n badgeKeySchema,\n type UpdateBadgesBody,\n updateBadgesBodySchema,\n} from './badges.js';\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n type AgeRange,\n // sub-schemas\n ageRangeSchema,\n emptyStringToUndefined,\n type Gender,\n // enums\n genderSchema,\n type InterestedIn,\n interestedInSchema,\n type LookingFor,\n lookingForSchema,\n type MaritalStatus,\n type MatchStatus,\n type MessageType,\n maritalStatusSchema,\n matchStatusSchema,\n messageTypeSchema,\n optionalTrimmedString,\n type Pagination,\n type Photo,\n paginationSchema,\n photoSchema,\n type SwipeAction,\n swipeActionSchema,\n} from './common.js';\nexport { getFieldMeta, getFieldOptions } from './field-helpers.js';\n// ─── Interaction schemas ─────────────────────────────────────────────────────\nexport {\n type BoostBody,\n boostBodySchema,\n type ComplimentBody,\n complimentBodySchema,\n type ImageLikeBody,\n type InteractionListQuery,\n type InteractionType,\n imageLikeBodySchema,\n interactionListQuerySchema,\n interactionTypeSchema,\n type RewindBody,\n rewindBodySchema,\n type SwipeBody,\n type SwipeResponse,\n swipeBodySchema,\n swipeResponseSchema,\n} from './interactions.js';\nexport {\n getOnboardingFieldConfig,\n ONBOARDING_FIELDS,\n ONBOARDING_STEP_GROUPS,\n ONBOARDING_TOTAL_MAIN_STEPS,\n ONBOARDING_TOTAL_SUB_STEPS,\n type OnboardingFieldConfig,\n type OnboardingStepGroup,\n} from './onboarding-config.js';\n// ─── Plan limits ─────────────────────────────────────────────────────────────\nexport {\n type BooleanFeatureKey,\n type EnumFeatureKey,\n type ExploreAccessLevel,\n type FeatureDisplayItem,\n type FeatureKey,\n type FilterLevel,\n getMinPlanForFeature,\n getPlanFeatureDisplay,\n getPlanLimit,\n getPlanLimits,\n hasRemainingQuota,\n isFeatureEnabled,\n isPaidPlan,\n type NumericFeatureKey,\n PAID_PLANS,\n PLAN_FEATURE_DISPLAY,\n PLAN_IDS,\n PLAN_LIMITS,\n type PlanDisplayValue,\n type PlanId,\n type PlanLimits,\n PREMIUM_EXPLORE_CATEGORIES,\n PREMIUM_PLANS,\n renderPlanDisplayValue,\n type ScoreBreakdownLevel,\n TOP_PLANS,\n type WhoLikedYouLevel,\n} from './plan-limits.js';\n// ─── Profile schemas ─────────────────────────────────────────────────────────\nexport {\n type CreateProfileInput,\n createProfileSchema,\n type FullProfileData,\n fullProfileSchema,\n getCognitiveBandRank,\n type OnboardingFormData,\n onboardingFormSchema,\n type UpdateProfileInput,\n updateProfileSchema,\n} from './profile.js';\n// ─── Profile field configs (option arrays with labels for UI rendering) ──────\nexport {\n allFieldGroups,\n basics,\n career,\n cognitive,\n type FieldGroup,\n type FieldOption,\n familyHome,\n favourites,\n financeLegal,\n healthWellness,\n heroIdentity,\n interestCategories,\n interests,\n lifestyle,\n lookingFor,\n type MultiSelectField,\n type OptionCategory,\n type ProfileField,\n personality,\n relationshipIntimacy,\n religionCommunity,\n type SelectField,\n selfAssessment,\n storyPrompts,\n values,\n} from './profile-fields/index.js';\n// ─── API Response types (entities, results, params) ─────────────────────────\nexport * from './responses/index.js';\n\n// ─── Safety schemas ──────────────────────────────────────────────────────────\nexport {\n type BlockBody,\n blockBodySchema,\n type ReportBody,\n type ReportReason,\n type ReportStatus,\n reportBodySchema,\n reportReasonSchema,\n reportStatusSchema,\n} from './safety.js';\n\n// ─── Subscription schemas ────────────────────────────────────────────────────\nexport {\n type CreateSubscriptionBody,\n createSubscriptionBodySchema,\n type SubscriptionStatus,\n subscriptionStatusSchema,\n type Tenure,\n tenureSchema,\n} from './subscription.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+EAA+E;AAC/E,OAAO,EACL,aAAa,EAGb,cAAc,EAEd,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,gFAAgF;AAChF,OAAO;AAEL,cAAc;AACd,cAAc,EACd,sBAAsB;AAEtB,QAAQ;AACR,YAAY,EAEZ,kBAAkB,EAElB,gBAAgB,EAIhB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EAGrB,gBAAgB,EAChB,WAAW,EAEX,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACnE,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAEf,oBAAoB,EAIpB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EAErB,gBAAgB,EAGhB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,GAG3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,cAAc,EACd,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,gFAAgF;AAChF,OAAO,EAOL,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EAEV,UAAU,EACV,oBAAoB,EACpB,QAAQ,EACR,WAAW,EAIX,0BAA0B,EAC1B,aAAa,EACb,sBAAsB,EAEtB,SAAS,GAEV,MAAM,kBAAkB,CAAC;AAC1B,gFAAgF;AAChF,OAAO,EAEL,mBAAmB,EAEnB,iBAAiB,EACjB,oBAAoB,EAEpB,oBAAoB,EAEpB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,gFAAgF;AAChF,OAAO,EACL,cAAc,EACd,MAAM,EACN,MAAM,EACN,SAAS,EAGT,UAAU,EACV,UAAU,EACV,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,UAAU,EAIV,WAAW,EACX,oBAAoB,EACpB,iBAAiB,EAEjB,cAAc,EACd,YAAY,EACZ,MAAM,GACP,MAAM,2BAA2B,CAAC;AACnC,+EAA+E;AAC/E,cAAc,sBAAsB,CAAC;AAErC,gFAAgF;AAChF,OAAO,EAEL,eAAe,EAIf,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,gFAAgF;AAChF,OAAO,EAEL,4BAA4B,EAE5B,wBAAwB,EAExB,YAAY,GACb,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * dating-schema — Shared Zod schemas for the Dating feature\n *\n * Single source of truth consumed by both jansathi-frontend and reform-backend.\n * Guarantees identical validation logic and TypeScript types on both sides.\n *\n * @module dating-schema\n */\n\n// ─── Badge schemas ──────────────────────────────────────────────────────────\nexport {\n BADGE_DISPLAY,\n type BadgeDisplayInfo,\n type BadgeKey,\n badgeKeySchema,\n type UpdateBadgesBody,\n updateBadgesBodySchema,\n} from './badges.js';\n// ─── Common helpers and enums ────────────────────────────────────────────────\nexport {\n type AgeRange,\n // sub-schemas\n ageRangeSchema,\n emptyStringToUndefined,\n type Gender,\n // enums\n genderSchema,\n type InterestedIn,\n interestedInSchema,\n type LookingFor,\n lookingForSchema,\n type MaritalStatus,\n type MatchStatus,\n type MessageType,\n maritalStatusSchema,\n matchStatusSchema,\n messageTypeSchema,\n optionalTrimmedString,\n type Pagination,\n type Photo,\n paginationSchema,\n photoSchema,\n type SwipeAction,\n swipeActionSchema,\n} from './common.js';\nexport { getFieldMeta, getFieldOptions } from './field-helpers.js';\n// ─── Interaction schemas ─────────────────────────────────────────────────────\nexport {\n type BoostBody,\n boostBodySchema,\n type ComplimentBody,\n complimentBodySchema,\n type ImageLikeBody,\n type InteractionListQuery,\n type InteractionType,\n imageLikeBodySchema,\n interactionListQuerySchema,\n interactionTypeSchema,\n type RewindBody,\n rewindBodySchema,\n type SwipeBody,\n type SwipeResponse,\n swipeBodySchema,\n swipeResponseSchema,\n} from './interactions.js';\nexport {\n getOnboardingFieldConfig,\n ONBOARDING_FIELDS,\n ONBOARDING_STEP_GROUPS,\n ONBOARDING_TOTAL_MAIN_STEPS,\n ONBOARDING_TOTAL_SUB_STEPS,\n type OnboardingFieldConfig,\n type OnboardingStepGroup,\n} from './onboarding-config.js';\nexport {\n DATING_PROGRESS_FIELDS,\n DATING_PROGRESS_TOTAL_STEPS,\n calculateDatingStepProgress,\n calculateDatingOverallProgress,\n getNestedValue,\n isFieldFilled,\n} from './onboarding-progress.js';\n// ─── Plan limits ─────────────────────────────────────────────────────────────\nexport {\n type BooleanFeatureKey,\n type EnumFeatureKey,\n type ExploreAccessLevel,\n type FeatureDisplayItem,\n type FeatureKey,\n type FilterLevel,\n getMinPlanForFeature,\n getPlanFeatureDisplay,\n getPlanLimit,\n getPlanLimits,\n hasRemainingQuota,\n isFeatureEnabled,\n isPaidPlan,\n type NumericFeatureKey,\n PAID_PLANS,\n PLAN_FEATURE_DISPLAY,\n PLAN_IDS,\n PLAN_LIMITS,\n type PlanDisplayValue,\n type PlanId,\n type PlanLimits,\n PREMIUM_EXPLORE_CATEGORIES,\n PREMIUM_PLANS,\n renderPlanDisplayValue,\n type ScoreBreakdownLevel,\n TOP_PLANS,\n type WhoLikedYouLevel,\n} from './plan-limits.js';\n// ─── Profile schemas ─────────────────────────────────────────────────────────\nexport {\n type CreateProfileInput,\n createProfileSchema,\n type FullProfileData,\n fullProfileSchema,\n getCognitiveBandRank,\n type OnboardingFormData,\n onboardingFormSchema,\n type UpdateProfileInput,\n updateProfileSchema,\n} from './profile.js';\n// ─── Profile field configs (option arrays with labels for UI rendering) ──────\nexport {\n allFieldGroups,\n basics,\n career,\n cognitive,\n type FieldGroup,\n type FieldOption,\n familyHome,\n favourites,\n financeLegal,\n healthWellness,\n heroIdentity,\n interestCategories,\n interests,\n lifestyle,\n lookingFor,\n type MultiSelectField,\n type OptionCategory,\n type ProfileField,\n personality,\n relationshipIntimacy,\n religionCommunity,\n type SelectField,\n selfAssessment,\n storyPrompts,\n values,\n} from './profile-fields/index.js';\n// ─── API Response types (entities, results, params) ─────────────────────────\nexport * from './responses/index.js';\n\n// ─── Safety schemas ──────────────────────────────────────────────────────────\nexport {\n type BlockBody,\n blockBodySchema,\n type ReportBody,\n type ReportReason,\n type ReportStatus,\n reportBodySchema,\n reportReasonSchema,\n reportStatusSchema,\n} from './safety.js';\n\n// ─── Subscription schemas ────────────────────────────────────────────────────\nexport {\n type CreateSubscriptionBody,\n createSubscriptionBodySchema,\n type SubscriptionStatus,\n subscriptionStatusSchema,\n type Tenure,\n tenureSchema,\n} from './subscription.js';\n"]}
@@ -2,25 +2,33 @@
2
2
  * Onboarding Field Configuration
3
3
  * ================================
4
4
  * Single source of truth for all per-field onboarding metadata.
5
- * Both frontend and backend import this — NO hardcoded strings elsewhere.
5
+ * Both frontend and backend import this.
6
+ *
7
+ * IMPORTANT: All string properties (title, subtitle, successMessage, visibilityLabel,
8
+ * step group label) are i18n KEYS, not display text. The frontend resolves them via
9
+ * useTranslations("datingOnboarding") → t(config.title).
10
+ *
11
+ * Translation files:
12
+ * - messages/en/dating-onboarding.json (English)
13
+ * - messages/hi/dating-onboarding.json (Hindi)
6
14
  *
7
15
  * @module dating-schema/onboarding-config
8
16
  */
9
17
  export interface OnboardingFieldConfig {
10
- /** Question heading shown to user */
18
+ /** i18n key for the question heading (resolved via t(title)) */
11
19
  title: string;
12
- /** Help text below the heading */
20
+ /** i18n key for help text below the heading */
13
21
  subtitle?: string;
14
- /** Toast message on successful save */
22
+ /** i18n key for toast message on successful save */
15
23
  successMessage: string;
16
- /** "Show on profile" toggle label (null = no toggle for this field) */
24
+ /** i18n key for "Show on profile" toggle label (null = no toggle) */
17
25
  visibilityLabel?: string;
18
26
  /** Whether the field is required to proceed */
19
27
  required: boolean;
20
28
  }
21
29
  /** Step grouping for the onboarding flow */
22
30
  export interface OnboardingStepGroup {
23
- /** Section label (e.g. "Basics") */
31
+ /** i18n key for section label */
24
32
  label: string;
25
33
  /** Icon name from lucide-react (resolved at runtime by frontend) */
26
34
  icon: string;
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-config.d.ts","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,WAAW,qBAAqB;IACpC,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAID,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAkTnE,CAAC;AAIF,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EA+CvD,CAAC;AAIF,gDAAgD;AAChD,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,qBAAqB,GAAG,SAAS,CAGnC;AAED,kCAAkC;AAClC,eAAO,MAAM,2BAA2B,QAAgC,CAAC;AAEzE,uDAAuD;AACvD,eAAO,MAAM,0BAA0B,QAGtC,CAAC"}
1
+ {"version":3,"file":"onboarding-config.d.ts","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAID,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CA+SnE,CAAC;AAIF,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EAmDvD,CAAC;AAIF,gDAAgD;AAChD,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,qBAAqB,GAAG,SAAS,CAGnC;AAED,kCAAkC;AAClC,eAAO,MAAM,2BAA2B,QAAgC,CAAC;AAEzE,uDAAuD;AACvD,eAAO,MAAM,0BAA0B,QAGtC,CAAC"}
@@ -2,7 +2,15 @@
2
2
  * Onboarding Field Configuration
3
3
  * ================================
4
4
  * Single source of truth for all per-field onboarding metadata.
5
- * Both frontend and backend import this — NO hardcoded strings elsewhere.
5
+ * Both frontend and backend import this.
6
+ *
7
+ * IMPORTANT: All string properties (title, subtitle, successMessage, visibilityLabel,
8
+ * step group label) are i18n KEYS, not display text. The frontend resolves them via
9
+ * useTranslations("datingOnboarding") → t(config.title).
10
+ *
11
+ * Translation files:
12
+ * - messages/en/dating-onboarding.json (English)
13
+ * - messages/hi/dating-onboarding.json (Hindi)
6
14
  *
7
15
  * @module dating-schema/onboarding-config
8
16
  */
@@ -10,305 +18,305 @@
10
18
  export const ONBOARDING_FIELDS = {
11
19
  // ── Step 1: Basics ──
12
20
  displayName: {
13
- title: 'What should we call you?',
14
- subtitle: 'This is the name others will see on your profile',
15
- successMessage: 'Display name saved!',
16
- visibilityLabel: 'Show on my profile',
21
+ title: 'displayName.title',
22
+ subtitle: 'displayName.subtitle',
23
+ successMessage: 'displayName.success',
24
+ visibilityLabel: 'common.showOnProfile',
17
25
  required: true,
18
26
  },
19
27
  dateOfBirth: {
20
- title: "When's your birthday?",
21
- subtitle: 'You must be at least 18. Your age will be shown on your profile.',
22
- successMessage: 'Birthday saved!',
23
- visibilityLabel: 'Show my age on my profile',
28
+ title: 'dateOfBirth.title',
29
+ subtitle: 'dateOfBirth.subtitle',
30
+ successMessage: 'dateOfBirth.success',
31
+ visibilityLabel: 'dateOfBirth.visibility',
24
32
  required: true,
25
33
  },
26
34
  gender: {
27
- title: "What's your gender?",
28
- subtitle: 'This helps us show you to the right people',
29
- successMessage: 'Gender saved!',
30
- visibilityLabel: 'Show my gender on my profile',
35
+ title: 'gender.title',
36
+ subtitle: 'gender.subtitle',
37
+ successMessage: 'gender.success',
38
+ visibilityLabel: 'gender.visibility',
31
39
  required: true,
32
40
  },
33
41
  phoneNumbers: {
34
- title: 'Contact numbers',
35
- subtitle: 'Interested matches can contact you or your family on these numbers — only if you allow it.',
36
- successMessage: 'Contact numbers saved!',
42
+ title: 'phoneNumbers.title',
43
+ subtitle: 'phoneNumbers.subtitle',
44
+ successMessage: 'phoneNumbers.success',
37
45
  required: true,
38
46
  },
39
47
  pronouns: {
40
- title: 'What are your pronouns?',
41
- subtitle: 'Let people know how to refer to you',
42
- successMessage: 'Pronouns saved!',
43
- visibilityLabel: 'Show my pronouns on my profile',
48
+ title: 'pronouns.title',
49
+ subtitle: 'pronouns.subtitle',
50
+ successMessage: 'pronouns.success',
51
+ visibilityLabel: 'pronouns.visibility',
44
52
  required: true,
45
53
  },
46
54
  // ── Step 2: Relationship ──
47
55
  relationshipStatus: {
48
- title: "What's your current relationship status?",
49
- subtitle: 'Helps us understand your situation better',
50
- successMessage: 'Relationship status saved!',
51
- visibilityLabel: 'Show on my profile',
56
+ title: 'relationshipStatus.title',
57
+ subtitle: 'relationshipStatus.subtitle',
58
+ successMessage: 'relationshipStatus.success',
59
+ visibilityLabel: 'common.showOnProfile',
52
60
  required: true,
53
61
  },
54
62
  relationshipIntent: {
55
- title: 'What are you looking for?',
56
- subtitle: 'Be honest — it helps us find better matches',
57
- successMessage: 'Relationship intent saved!',
58
- visibilityLabel: 'Show on my profile',
63
+ title: 'relationshipIntent.title',
64
+ subtitle: 'relationshipIntent.subtitle',
65
+ successMessage: 'relationshipIntent.success',
66
+ visibilityLabel: 'common.showOnProfile',
59
67
  required: true,
60
68
  },
61
69
  sexualOrientation: {
62
- title: "What's your sexual orientation?",
63
- subtitle: 'Used to show you relevant profiles',
64
- successMessage: 'Orientation saved!',
65
- visibilityLabel: 'Show my orientation on my profile',
70
+ title: 'sexualOrientation.title',
71
+ subtitle: 'sexualOrientation.subtitle',
72
+ successMessage: 'sexualOrientation.success',
73
+ visibilityLabel: 'sexualOrientation.visibility',
66
74
  required: false,
67
75
  },
68
76
  preferredGenders: {
69
- title: 'Who are you interested in?',
70
- subtitle: "Select one or more genders you'd like to see",
71
- successMessage: 'Gender preference saved!',
72
- visibilityLabel: 'Show on my profile',
77
+ title: 'preferredGenders.title',
78
+ subtitle: 'preferredGenders.subtitle',
79
+ successMessage: 'preferredGenders.success',
80
+ visibilityLabel: 'common.showOnProfile',
73
81
  required: true,
74
82
  },
75
83
  relationshipStructure: {
76
- title: 'What relationship structure works for you?',
77
- subtitle: 'How do you prefer to structure your relationships?',
78
- successMessage: 'Relationship structure saved!',
79
- visibilityLabel: 'Show on my profile',
84
+ title: 'relationshipStructure.title',
85
+ subtitle: 'relationshipStructure.subtitle',
86
+ successMessage: 'relationshipStructure.success',
87
+ visibilityLabel: 'common.showOnProfile',
80
88
  required: false,
81
89
  },
82
90
  // ── Step 3: Mind & Education ──
83
91
  educationLevel: {
84
- title: "What's your highest education level?",
85
- subtitle: 'Your academic background',
86
- successMessage: 'Education level saved!',
87
- visibilityLabel: 'Show my education on my profile',
92
+ title: 'educationLevel.title',
93
+ subtitle: 'educationLevel.subtitle',
94
+ successMessage: 'educationLevel.success',
95
+ visibilityLabel: 'educationLevel.visibility',
88
96
  required: false,
89
97
  },
90
98
  institutionTier: {
91
- title: "What's your institution's prestige tier?",
92
- subtitle: 'The tier of your most recent educational institution',
93
- successMessage: 'Institution tier saved!',
94
- visibilityLabel: 'Show on my profile',
99
+ title: 'institutionTier.title',
100
+ subtitle: 'institutionTier.subtitle',
101
+ successMessage: 'institutionTier.success',
102
+ visibilityLabel: 'common.showOnProfile',
95
103
  required: false,
96
104
  },
97
105
  cognitiveBand: {
98
- title: 'How do you approach truth & decisions?',
99
- subtitle: 'From tradition-based to evidence-based — where do you fall?',
100
- successMessage: 'Cognitive approach saved!',
101
- visibilityLabel: 'Show on my profile',
106
+ title: 'cognitiveBand.title',
107
+ subtitle: 'cognitiveBand.subtitle',
108
+ successMessage: 'cognitiveBand.success',
109
+ visibilityLabel: 'common.showOnProfile',
102
110
  required: false,
103
111
  },
104
112
  politicalOrientation: {
105
- title: 'Where do you fall on the political spectrum?',
106
- subtitle: 'Understanding your worldview helps us find compatible matches',
107
- successMessage: 'Political orientation saved!',
108
- visibilityLabel: 'Show on my profile',
113
+ title: 'politicalOrientation.title',
114
+ subtitle: 'politicalOrientation.subtitle',
115
+ successMessage: 'politicalOrientation.success',
116
+ visibilityLabel: 'common.showOnProfile',
109
117
  required: false,
110
118
  },
111
119
  // ── Step 4: Career & Finance ──
112
120
  profession: {
113
- title: 'What is your profession or occupation?',
114
- subtitle: 'Select the field that best describes what you do',
115
- successMessage: 'Profession saved!',
116
- visibilityLabel: 'Show my profession on my profile',
121
+ title: 'profession.title',
122
+ subtitle: 'profession.subtitle',
123
+ successMessage: 'profession.success',
124
+ visibilityLabel: 'profession.visibility',
117
125
  required: false,
118
126
  },
119
127
  careerStage: {
120
- title: 'What stage is your career at?',
121
- subtitle: 'Where are you in your professional journey right now?',
122
- successMessage: 'Career stage saved!',
123
- visibilityLabel: 'Show on my profile',
128
+ title: 'careerStage.title',
129
+ subtitle: 'careerStage.subtitle',
130
+ successMessage: 'careerStage.success',
131
+ visibilityLabel: 'common.showOnProfile',
124
132
  required: false,
125
133
  },
126
134
  incomeRange: {
127
- title: "What's your annual income range?",
128
- subtitle: 'This is kept private by default — only shared when you choose',
129
- successMessage: 'Income range saved!',
130
- visibilityLabel: 'Show on my profile',
135
+ title: 'incomeRange.title',
136
+ subtitle: 'incomeRange.subtitle',
137
+ successMessage: 'incomeRange.success',
138
+ visibilityLabel: 'common.showOnProfile',
131
139
  required: false,
132
140
  },
133
141
  // ── Step 5: Appearance ──
134
142
  height: {
135
- title: 'How tall are you?',
136
- subtitle: 'Drag the slider to set your height',
137
- successMessage: 'Height saved!',
138
- visibilityLabel: 'Show my height on my profile',
143
+ title: 'height.title',
144
+ subtitle: 'height.subtitle',
145
+ successMessage: 'height.success',
146
+ visibilityLabel: 'height.visibility',
139
147
  required: false,
140
148
  },
141
149
  weight: {
142
- title: "What's your weight?",
143
- subtitle: 'Only you control who sees this',
144
- successMessage: 'Weight saved!',
145
- visibilityLabel: 'Show my weight on my profile',
150
+ title: 'weight.title',
151
+ subtitle: 'weight.subtitle',
152
+ successMessage: 'weight.success',
153
+ visibilityLabel: 'weight.visibility',
146
154
  required: false,
147
155
  },
148
156
  bodyBuild: {
149
- title: "What's your body type?",
150
- subtitle: 'How would you describe your build?',
151
- successMessage: 'Body type saved!',
152
- visibilityLabel: 'Show on my profile',
157
+ title: 'bodyBuild.title',
158
+ subtitle: 'bodyBuild.subtitle',
159
+ successMessage: 'bodyBuild.success',
160
+ visibilityLabel: 'common.showOnProfile',
153
161
  required: false,
154
162
  },
155
163
  complexion: {
156
- title: "What's your complexion?",
157
- subtitle: 'Your skin tone',
158
- successMessage: 'Complexion saved!',
159
- visibilityLabel: 'Show on my profile',
164
+ title: 'complexion.title',
165
+ subtitle: 'complexion.subtitle',
166
+ successMessage: 'complexion.success',
167
+ visibilityLabel: 'common.showOnProfile',
160
168
  required: false,
161
169
  },
162
170
  // ── Step 6: Photos ──
163
171
  photos: {
164
- title: 'Add your best photos',
165
- subtitle: 'Upload at least 2 photos. Profiles with 4+ photos get 3x more likes.',
166
- successMessage: 'Photos saved!',
172
+ title: 'photos.title',
173
+ subtitle: 'photos.subtitle',
174
+ successMessage: 'photos.success',
167
175
  required: true,
168
176
  },
169
177
  // ── Step 7: Your Roots ──
170
178
  hometown: {
171
- title: 'Where is your hometown?',
172
- subtitle: 'Select your home state and district',
173
- successMessage: 'Hometown saved!',
174
- visibilityLabel: 'Show on my profile',
179
+ title: 'hometown.title',
180
+ subtitle: 'hometown.subtitle',
181
+ successMessage: 'hometown.success',
182
+ visibilityLabel: 'common.showOnProfile',
175
183
  required: true,
176
184
  },
177
185
  familyReligion: {
178
- title: "What's your family's religion?",
179
- subtitle: 'The religion you were raised in',
180
- successMessage: 'Family religion saved!',
181
- visibilityLabel: 'Show on my profile',
186
+ title: 'familyReligion.title',
187
+ subtitle: 'familyReligion.subtitle',
188
+ successMessage: 'familyReligion.success',
189
+ visibilityLabel: 'common.showOnProfile',
182
190
  required: true,
183
191
  },
184
192
  personalReligion: {
185
- title: "What's your personal faith?",
186
- subtitle: "This can be different from your family's religion",
187
- successMessage: 'Personal faith saved!',
188
- visibilityLabel: 'Show on my profile',
193
+ title: 'personalReligion.title',
194
+ subtitle: 'personalReligion.subtitle',
195
+ successMessage: 'personalReligion.success',
196
+ visibilityLabel: 'common.showOnProfile',
189
197
  required: false,
190
198
  },
191
199
  motherTongue: {
192
- title: "What's your mother tongue?",
193
- subtitle: 'The primary language spoken at home',
194
- successMessage: 'Mother tongue saved!',
195
- visibilityLabel: 'Show on my profile',
200
+ title: 'motherTongue.title',
201
+ subtitle: 'motherTongue.subtitle',
202
+ successMessage: 'motherTongue.success',
203
+ visibilityLabel: 'common.showOnProfile',
196
204
  required: true,
197
205
  },
198
206
  familyValues: {
199
- title: 'How would you describe your family values?',
200
- subtitle: 'How traditional or progressive is your family?',
201
- successMessage: 'Family values saved!',
202
- visibilityLabel: 'Show on my profile',
207
+ title: 'familyValues.title',
208
+ subtitle: 'familyValues.subtitle',
209
+ successMessage: 'familyValues.success',
210
+ visibilityLabel: 'common.showOnProfile',
203
211
  required: false,
204
212
  },
205
213
  // ── Step 8: Interests ──
206
214
  hobbies: {
207
- title: 'What are your interests & hobbies?',
208
- subtitle: 'Select up to 20 — these help us find compatible matches',
209
- successMessage: 'Interests saved!',
215
+ title: 'hobbies.title',
216
+ subtitle: 'hobbies.subtitle',
217
+ successMessage: 'hobbies.success',
210
218
  required: false,
211
219
  },
212
220
  // ── Step 9: Habits ──
213
221
  diet: {
214
- title: "What's your diet preference?",
215
- subtitle: 'Your food habits',
216
- successMessage: 'Diet preference saved!',
217
- visibilityLabel: 'Show on my profile',
222
+ title: 'diet.title',
223
+ subtitle: 'diet.subtitle',
224
+ successMessage: 'diet.success',
225
+ visibilityLabel: 'common.showOnProfile',
218
226
  required: false,
219
227
  },
220
228
  smoking: {
221
- title: 'Do you smoke?',
222
- subtitle: 'Your smoking habits',
223
- successMessage: 'Smoking habit saved!',
224
- visibilityLabel: 'Show on my profile',
229
+ title: 'smoking.title',
230
+ subtitle: 'smoking.subtitle',
231
+ successMessage: 'smoking.success',
232
+ visibilityLabel: 'common.showOnProfile',
225
233
  required: false,
226
234
  },
227
235
  alcohol: {
228
- title: 'Do you drink alcohol?',
229
- subtitle: 'Your drinking habits',
230
- successMessage: 'Drinking habit saved!',
231
- visibilityLabel: 'Show on my profile',
236
+ title: 'alcohol.title',
237
+ subtitle: 'alcohol.subtitle',
238
+ successMessage: 'alcohol.success',
239
+ visibilityLabel: 'common.showOnProfile',
232
240
  required: false,
233
241
  },
234
242
  // ── Step 10: Bio ──
235
243
  bio: {
236
- title: 'Write a short bio',
237
- subtitle: 'Like a WhatsApp status — a quick, catchy line about you (10–150 characters)',
238
- successMessage: 'Bio saved!',
239
- visibilityLabel: 'Show on my profile',
244
+ title: 'bio.title',
245
+ subtitle: 'bio.subtitle',
246
+ successMessage: 'bio.success',
247
+ visibilityLabel: 'common.showOnProfile',
240
248
  required: true,
241
249
  },
242
250
  myStory: {
243
- title: 'Tell us your story',
244
- subtitle: 'Share your journey, personality, what shaped you — help people truly know you',
245
- successMessage: 'Story saved!',
251
+ title: 'myStory.title',
252
+ subtitle: 'myStory.subtitle',
253
+ successMessage: 'myStory.success',
246
254
  required: false,
247
255
  },
248
256
  // ── Step 11: Favourites ──
249
257
  favouriteBooks: {
250
- title: 'What are your favourite books?',
251
- subtitle: 'Add up to 5 — search or type your own. Great conversation starters!',
252
- successMessage: 'Favourite books saved!',
258
+ title: 'favouriteBooks.title',
259
+ subtitle: 'favouriteBooks.subtitle',
260
+ successMessage: 'favouriteBooks.success',
253
261
  required: false,
254
262
  },
255
263
  favouriteShows: {
256
- title: 'What are your favourite shows?',
257
- subtitle: 'Movies, TV shows, anime — anything you love watching',
258
- successMessage: 'Favourite shows saved!',
264
+ title: 'favouriteShows.title',
265
+ subtitle: 'favouriteShows.subtitle',
266
+ successMessage: 'favouriteShows.success',
259
267
  required: false,
260
268
  },
261
269
  idols: {
262
- title: 'Who are your idols?',
263
- subtitle: 'People who inspire you — living or historic',
264
- successMessage: 'Idols saved!',
270
+ title: 'idols.title',
271
+ subtitle: 'idols.subtitle',
272
+ successMessage: 'idols.success',
265
273
  required: false,
266
274
  },
267
275
  // ── Step 12: Personality ──
268
276
  mbtiType: {
269
- title: "What's your MBTI personality type?",
270
- subtitle: "Don't know? No worries — you can skip this",
271
- successMessage: 'MBTI type saved!',
272
- visibilityLabel: 'Show on my profile',
277
+ title: 'mbtiType.title',
278
+ subtitle: 'mbtiType.subtitle',
279
+ successMessage: 'mbtiType.success',
280
+ visibilityLabel: 'common.showOnProfile',
273
281
  required: false,
274
282
  },
275
283
  attachmentStyle: {
276
- title: "What's your attachment style?",
277
- subtitle: 'The #1 predictor of relationship success',
278
- successMessage: 'Attachment style saved!',
279
- visibilityLabel: 'Show on my profile',
284
+ title: 'attachmentStyle.title',
285
+ subtitle: 'attachmentStyle.subtitle',
286
+ successMessage: 'attachmentStyle.success',
287
+ visibilityLabel: 'common.showOnProfile',
280
288
  required: false,
281
289
  },
282
290
  loveLanguage: {
283
- title: "What's your love language?",
284
- subtitle: 'How you prefer to give and receive love — willingness to adapt matters more than matching (Chapman research)',
285
- successMessage: 'Love language saved!',
286
- visibilityLabel: 'Show on my profile',
291
+ title: 'loveLanguage.title',
292
+ subtitle: 'loveLanguage.subtitle',
293
+ successMessage: 'loveLanguage.success',
294
+ visibilityLabel: 'common.showOnProfile',
287
295
  required: false,
288
296
  },
289
297
  oceanScores: {
290
- title: "What's your Big Five personality?",
291
- subtitle: "Rate yourself on each trait (1-100). Don't know? Take a free test first!",
292
- successMessage: 'Big Five scores saved!',
298
+ title: 'oceanScores.title',
299
+ subtitle: 'oceanScores.subtitle',
300
+ successMessage: 'oceanScores.success',
293
301
  required: false,
294
302
  },
295
303
  conflictStyle: {
296
- title: 'How do you handle conflicts?',
297
- subtitle: "Gottman's research predicts relationship outcomes with 94% accuracy based on conflict style",
298
- successMessage: 'Conflict style saved!',
299
- visibilityLabel: 'Show on my profile',
304
+ title: 'conflictStyle.title',
305
+ subtitle: 'conflictStyle.subtitle',
306
+ successMessage: 'conflictStyle.success',
307
+ visibilityLabel: 'common.showOnProfile',
300
308
  required: false,
301
309
  },
302
310
  };
303
311
  // ─── Step grouping ──────────────────────────────────────────────────────────
304
312
  export const ONBOARDING_STEP_GROUPS = [
305
313
  {
306
- label: 'Basics',
314
+ label: 'steps.basics',
307
315
  icon: 'User',
308
316
  fields: ['displayName', 'dateOfBirth', 'gender', 'phoneNumbers', 'pronouns'],
309
317
  },
310
318
  {
311
- label: 'Relationship',
319
+ label: 'steps.relationship',
312
320
  icon: 'Heart',
313
321
  fields: [
314
322
  'relationshipStatus',
@@ -319,32 +327,36 @@ export const ONBOARDING_STEP_GROUPS = [
319
327
  ],
320
328
  },
321
329
  {
322
- label: 'Mind & Education',
330
+ label: 'steps.mindEducation',
323
331
  icon: 'Brain',
324
332
  fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'],
325
333
  },
326
334
  {
327
- label: 'Career & Finance',
335
+ label: 'steps.careerFinance',
328
336
  icon: 'Briefcase',
329
337
  fields: ['profession', 'careerStage', 'incomeRange'],
330
338
  },
331
339
  {
332
- label: 'Appearance',
340
+ label: 'steps.appearance',
333
341
  icon: 'Ruler',
334
342
  fields: ['height', 'weight', 'bodyBuild', 'complexion'],
335
343
  },
336
- { label: 'Photos', icon: 'Camera', fields: ['photos'] },
344
+ { label: 'steps.photos', icon: 'Camera', fields: ['photos'] },
337
345
  {
338
- label: 'Your Roots',
346
+ label: 'steps.yourRoots',
339
347
  icon: 'TreePine',
340
348
  fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'],
341
349
  },
342
- { label: 'Interests', icon: 'Sparkles', fields: ['hobbies'] },
343
- { label: 'Habits', icon: 'Cigarette', fields: ['diet', 'smoking', 'alcohol'] },
344
- { label: 'Bio', icon: 'PenLine', fields: ['bio', 'myStory'] },
345
- { label: 'Favourites', icon: 'Star', fields: ['favouriteBooks', 'favouriteShows', 'idols'] },
350
+ { label: 'steps.interests', icon: 'Sparkles', fields: ['hobbies'] },
351
+ { label: 'steps.habits', icon: 'Cigarette', fields: ['diet', 'smoking', 'alcohol'] },
352
+ { label: 'steps.bio', icon: 'PenLine', fields: ['bio', 'myStory'] },
353
+ {
354
+ label: 'steps.favourites',
355
+ icon: 'Star',
356
+ fields: ['favouriteBooks', 'favouriteShows', 'idols'],
357
+ },
346
358
  {
347
- label: 'Personality',
359
+ label: 'steps.personality',
348
360
  icon: 'Puzzle',
349
361
  fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'],
350
362
  },
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-config.js","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AA2BH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,iBAAiB,GAA0C;IACtE,uBAAuB;IACvB,WAAW,EAAE;QACX,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,kDAAkD;QAC5D,cAAc,EAAE,qBAAqB;QACrC,eAAe,EAAE,oBAAoB;QACrC,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,kEAAkE;QAC5E,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,2BAA2B;QAC5C,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,KAAK,EAAE,qBAAqB;QAC5B,QAAQ,EAAE,4CAA4C;QACtD,cAAc,EAAE,eAAe;QAC/B,eAAe,EAAE,8BAA8B;QAC/C,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EACN,4FAA4F;QAC9F,cAAc,EAAE,wBAAwB;QACxC,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,yBAAyB;QAChC,QAAQ,EAAE,qCAAqC;QAC/C,cAAc,EAAE,iBAAiB;QACjC,eAAe,EAAE,gCAAgC;QACjD,QAAQ,EAAE,IAAI;KACf;IAED,6BAA6B;IAC7B,kBAAkB,EAAE;QAClB,KAAK,EAAE,0CAA0C;QACjD,QAAQ,EAAE,2CAA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CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAC,MAAM,CACrE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,EACjC,CAAC,CACF,CAAC","sourcesContent":["/**\n * Onboarding Field Configuration\n * ================================\n * Single source of truth for all per-field onboarding metadata.\n * Both frontend and backend import this — NO hardcoded strings elsewhere.\n *\n * @module dating-schema/onboarding-config\n */\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport interface OnboardingFieldConfig {\n /** Question heading shown to user */\n title: string;\n /** Help text below the heading */\n subtitle?: string;\n /** Toast message on successful save */\n successMessage: string;\n /** \"Show on profile\" toggle label (null = no toggle for this field) */\n visibilityLabel?: string;\n /** Whether the field is required to proceed */\n required: boolean;\n}\n\n/** Step grouping for the onboarding flow */\nexport interface OnboardingStepGroup {\n /** Section label (e.g. \"Basics\") */\n label: string;\n /** Icon name from lucide-react (resolved at runtime by frontend) */\n icon: string;\n /** Ordered list of field keys in this section */\n fields: string[];\n}\n\n// ─── Per-field onboarding metadata ──────────────────────────────────────────\n\nexport const ONBOARDING_FIELDS: Record<string, OnboardingFieldConfig> = {\n // ── Step 1: Basics ──\n displayName: {\n title: 'What should we call you?',\n subtitle: 'This is the name others will see on your profile',\n successMessage: 'Display name saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n dateOfBirth: {\n title: \"When's your birthday?\",\n subtitle: 'You must be at least 18. Your age will be shown on your profile.',\n successMessage: 'Birthday saved!',\n visibilityLabel: 'Show my age on my profile',\n required: true,\n },\n gender: {\n title: \"What's your gender?\",\n subtitle: 'This helps us show you to the right people',\n successMessage: 'Gender saved!',\n visibilityLabel: 'Show my gender on my profile',\n required: true,\n },\n phoneNumbers: {\n title: 'Contact numbers',\n subtitle:\n 'Interested matches can contact you or your family on these numbers — only if you allow it.',\n successMessage: 'Contact numbers saved!',\n required: true,\n },\n pronouns: {\n title: 'What are your pronouns?',\n subtitle: 'Let people know how to refer to you',\n successMessage: 'Pronouns saved!',\n visibilityLabel: 'Show my pronouns on my profile',\n required: true,\n },\n\n // ── Step 2: Relationship ──\n relationshipStatus: {\n title: \"What's your current relationship status?\",\n subtitle: 'Helps us understand your situation better',\n successMessage: 'Relationship status saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n relationshipIntent: {\n title: 'What are you looking for?',\n subtitle: 'Be honest — it helps us find better matches',\n successMessage: 'Relationship intent saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n sexualOrientation: {\n title: \"What's your sexual orientation?\",\n subtitle: 'Used to show you relevant profiles',\n successMessage: 'Orientation saved!',\n visibilityLabel: 'Show my orientation on my profile',\n required: false,\n },\n preferredGenders: {\n title: 'Who are you interested in?',\n subtitle: \"Select one or more genders you'd like to see\",\n successMessage: 'Gender preference saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n relationshipStructure: {\n title: 'What relationship structure works for you?',\n subtitle: 'How do you prefer to structure your relationships?',\n successMessage: 'Relationship structure saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 3: Mind & Education ──\n educationLevel: {\n title: \"What's your highest education level?\",\n subtitle: 'Your academic background',\n successMessage: 'Education level saved!',\n visibilityLabel: 'Show my education on my profile',\n required: false,\n },\n institutionTier: {\n title: \"What's your institution's prestige tier?\",\n subtitle: 'The tier of your most recent educational institution',\n successMessage: 'Institution tier saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n cognitiveBand: {\n title: 'How do you approach truth & decisions?',\n subtitle: 'From tradition-based to evidence-based — where do you fall?',\n successMessage: 'Cognitive approach saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n politicalOrientation: {\n title: 'Where do you fall on the political spectrum?',\n subtitle: 'Understanding your worldview helps us find compatible matches',\n successMessage: 'Political orientation saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 4: Career & Finance ──\n profession: {\n title: 'What is your profession or occupation?',\n subtitle: 'Select the field that best describes what you do',\n successMessage: 'Profession saved!',\n visibilityLabel: 'Show my profession on my profile',\n required: false,\n },\n careerStage: {\n title: 'What stage is your career at?',\n subtitle: 'Where are you in your professional journey right now?',\n successMessage: 'Career stage saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n incomeRange: {\n title: \"What's your annual income range?\",\n subtitle: 'This is kept private by default — only shared when you choose',\n successMessage: 'Income range saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 5: Appearance ──\n height: {\n title: 'How tall are you?',\n subtitle: 'Drag the slider to set your height',\n successMessage: 'Height saved!',\n visibilityLabel: 'Show my height on my profile',\n required: false,\n },\n weight: {\n title: \"What's your weight?\",\n subtitle: 'Only you control who sees this',\n successMessage: 'Weight saved!',\n visibilityLabel: 'Show my weight on my profile',\n required: false,\n },\n bodyBuild: {\n title: \"What's your body type?\",\n subtitle: 'How would you describe your build?',\n successMessage: 'Body type saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n complexion: {\n title: \"What's your complexion?\",\n subtitle: 'Your skin tone',\n successMessage: 'Complexion saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 6: Photos ──\n photos: {\n title: 'Add your best photos',\n subtitle: 'Upload at least 2 photos. Profiles with 4+ photos get 3x more likes.',\n successMessage: 'Photos saved!',\n required: true,\n },\n\n // ── Step 7: Your Roots ──\n hometown: {\n title: 'Where is your hometown?',\n subtitle: 'Select your home state and district',\n successMessage: 'Hometown saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n familyReligion: {\n title: \"What's your family's religion?\",\n subtitle: 'The religion you were raised in',\n successMessage: 'Family religion saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n personalReligion: {\n title: \"What's your personal faith?\",\n subtitle: \"This can be different from your family's religion\",\n successMessage: 'Personal faith saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n motherTongue: {\n title: \"What's your mother tongue?\",\n subtitle: 'The primary language spoken at home',\n successMessage: 'Mother tongue saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n familyValues: {\n title: 'How would you describe your family values?',\n subtitle: 'How traditional or progressive is your family?',\n successMessage: 'Family values saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 8: Interests ──\n hobbies: {\n title: 'What are your interests & hobbies?',\n subtitle: 'Select up to 20 — these help us find compatible matches',\n successMessage: 'Interests saved!',\n required: false,\n },\n\n // ── Step 9: Habits ──\n diet: {\n title: \"What's your diet preference?\",\n subtitle: 'Your food habits',\n successMessage: 'Diet preference saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n smoking: {\n title: 'Do you smoke?',\n subtitle: 'Your smoking habits',\n successMessage: 'Smoking habit saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n alcohol: {\n title: 'Do you drink alcohol?',\n subtitle: 'Your drinking habits',\n successMessage: 'Drinking habit saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n\n // ── Step 10: Bio ──\n bio: {\n title: 'Write a short bio',\n subtitle: 'Like a WhatsApp status — a quick, catchy line about you (10–150 characters)',\n successMessage: 'Bio saved!',\n visibilityLabel: 'Show on my profile',\n required: true,\n },\n myStory: {\n title: 'Tell us your story',\n subtitle: 'Share your journey, personality, what shaped you — help people truly know you',\n successMessage: 'Story saved!',\n required: false,\n },\n\n // ── Step 11: Favourites ──\n favouriteBooks: {\n title: 'What are your favourite books?',\n subtitle: 'Add up to 5 — search or type your own. Great conversation starters!',\n successMessage: 'Favourite books saved!',\n required: false,\n },\n favouriteShows: {\n title: 'What are your favourite shows?',\n subtitle: 'Movies, TV shows, anime — anything you love watching',\n successMessage: 'Favourite shows saved!',\n required: false,\n },\n idols: {\n title: 'Who are your idols?',\n subtitle: 'People who inspire you — living or historic',\n successMessage: 'Idols saved!',\n required: false,\n },\n\n // ── Step 12: Personality ──\n mbtiType: {\n title: \"What's your MBTI personality type?\",\n subtitle: \"Don't know? No worries — you can skip this\",\n successMessage: 'MBTI type saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n attachmentStyle: {\n title: \"What's your attachment style?\",\n subtitle: 'The #1 predictor of relationship success',\n successMessage: 'Attachment style saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n loveLanguage: {\n title: \"What's your love language?\",\n subtitle:\n 'How you prefer to give and receive love — willingness to adapt matters more than matching (Chapman research)',\n successMessage: 'Love language saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n oceanScores: {\n title: \"What's your Big Five personality?\",\n subtitle: \"Rate yourself on each trait (1-100). Don't know? Take a free test first!\",\n successMessage: 'Big Five scores saved!',\n required: false,\n },\n conflictStyle: {\n title: 'How do you handle conflicts?',\n subtitle:\n \"Gottman's research predicts relationship outcomes with 94% accuracy based on conflict style\",\n successMessage: 'Conflict style saved!',\n visibilityLabel: 'Show on my profile',\n required: false,\n },\n};\n\n// ─── Step grouping ──────────────────────────────────────────────────────────\n\nexport const ONBOARDING_STEP_GROUPS: OnboardingStepGroup[] = [\n {\n label: 'Basics',\n icon: 'User',\n fields: ['displayName', 'dateOfBirth', 'gender', 'phoneNumbers', 'pronouns'],\n },\n {\n label: 'Relationship',\n icon: 'Heart',\n fields: [\n 'relationshipStatus',\n 'relationshipIntent',\n 'sexualOrientation',\n 'preferredGenders',\n 'relationshipStructure',\n ],\n },\n {\n label: 'Mind & Education',\n icon: 'Brain',\n fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'],\n },\n {\n label: 'Career & Finance',\n icon: 'Briefcase',\n fields: ['profession', 'careerStage', 'incomeRange'],\n },\n {\n label: 'Appearance',\n icon: 'Ruler',\n fields: ['height', 'weight', 'bodyBuild', 'complexion'],\n },\n { label: 'Photos', icon: 'Camera', fields: ['photos'] },\n {\n label: 'Your Roots',\n icon: 'TreePine',\n fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'],\n },\n { label: 'Interests', icon: 'Sparkles', fields: ['hobbies'] },\n { label: 'Habits', icon: 'Cigarette', fields: ['diet', 'smoking', 'alcohol'] },\n { label: 'Bio', icon: 'PenLine', fields: ['bio', 'myStory'] },\n { label: 'Favourites', icon: 'Star', fields: ['favouriteBooks', 'favouriteShows', 'idols'] },\n {\n label: 'Personality',\n icon: 'Puzzle',\n fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'],\n },\n];\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/** Get onboarding config for a single field. */\nexport function getOnboardingFieldConfig(\n fieldKey: string | undefined,\n): OnboardingFieldConfig | undefined {\n if (!fieldKey) return undefined;\n return ONBOARDING_FIELDS[fieldKey];\n}\n\n/** Total number of main steps. */\nexport const ONBOARDING_TOTAL_MAIN_STEPS = ONBOARDING_STEP_GROUPS.length;\n\n/** Total number of sub-steps across all main steps. */\nexport const ONBOARDING_TOTAL_SUB_STEPS = ONBOARDING_STEP_GROUPS.reduce(\n (sum, g) => sum + g.fields.length,\n 0,\n);\n"]}
1
+ {"version":3,"file":"onboarding-config.js","sourceRoot":"","sources":["../src/onboarding-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AA2BH,+EAA+E;AAE/E,MAAM,CAAC,MAAM,iBAAiB,GAA0C;IACtE,uBAAuB;IACvB,WAAW,EAAE;QACX,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,sBAAsB;QAChC,cAAc,EAAE,qBAAqB;QACrC,eAAe,EAAE,sBAAsB;QACvC,QAAQ,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACX,KAAK,EAAE,mBAAmB;QAC1B,QAAQ,EAAE,sBAAsB;QAChC,cAAc,EAAE,qBAAqB;QACrC,eAAe,EAAE,wBAAwB;QACzC,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,iBAAiB;QAC3B,cAAc,EAAE,gBAAgB;QAChC,eAAe,EA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AI,EAAE,QAAQ;QACd,MAAM,EAAE,CAAC,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,CAAC;KACxF;CACF,CAAC;AAEF,gFAAgF;AAEhF,gDAAgD;AAChD,MAAM,UAAU,wBAAwB,CACtC,QAA4B;IAE5B,IAAI,CAAC,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChC,OAAO,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED,kCAAkC;AAClC,MAAM,CAAC,MAAM,2BAA2B,GAAG,sBAAsB,CAAC,MAAM,CAAC;AAEzE,uDAAuD;AACvD,MAAM,CAAC,MAAM,0BAA0B,GAAG,sBAAsB,CAAC,MAAM,CACrE,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAC,MAAM,EACjC,CAAC,CACF,CAAC","sourcesContent":["/**\n * Onboarding Field Configuration\n * ================================\n * Single source of truth for all per-field onboarding metadata.\n * Both frontend and backend import this.\n *\n * IMPORTANT: All string properties (title, subtitle, successMessage, visibilityLabel,\n * step group label) are i18n KEYS, not display text. The frontend resolves them via\n * useTranslations(\"datingOnboarding\") → t(config.title).\n *\n * Translation files:\n * - messages/en/dating-onboarding.json (English)\n * - messages/hi/dating-onboarding.json (Hindi)\n *\n * @module dating-schema/onboarding-config\n */\n\n// ─── Types ───────────────────────────────────────────────────────────────────\n\nexport interface OnboardingFieldConfig {\n /** i18n key for the question heading (resolved via t(title)) */\n title: string;\n /** i18n key for help text below the heading */\n subtitle?: string;\n /** i18n key for toast message on successful save */\n successMessage: string;\n /** i18n key for \"Show on profile\" toggle label (null = no toggle) */\n visibilityLabel?: string;\n /** Whether the field is required to proceed */\n required: boolean;\n}\n\n/** Step grouping for the onboarding flow */\nexport interface OnboardingStepGroup {\n /** i18n key for section label */\n label: string;\n /** Icon name from lucide-react (resolved at runtime by frontend) */\n icon: string;\n /** Ordered list of field keys in this section */\n fields: string[];\n}\n\n// ─── Per-field onboarding metadata ──────────────────────────────────────────\n\nexport const ONBOARDING_FIELDS: Record<string, OnboardingFieldConfig> = {\n // ── Step 1: Basics ──\n displayName: {\n title: 'displayName.title',\n subtitle: 'displayName.subtitle',\n successMessage: 'displayName.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n dateOfBirth: {\n title: 'dateOfBirth.title',\n subtitle: 'dateOfBirth.subtitle',\n successMessage: 'dateOfBirth.success',\n visibilityLabel: 'dateOfBirth.visibility',\n required: true,\n },\n gender: {\n title: 'gender.title',\n subtitle: 'gender.subtitle',\n successMessage: 'gender.success',\n visibilityLabel: 'gender.visibility',\n required: true,\n },\n phoneNumbers: {\n title: 'phoneNumbers.title',\n subtitle: 'phoneNumbers.subtitle',\n successMessage: 'phoneNumbers.success',\n required: true,\n },\n pronouns: {\n title: 'pronouns.title',\n subtitle: 'pronouns.subtitle',\n successMessage: 'pronouns.success',\n visibilityLabel: 'pronouns.visibility',\n required: true,\n },\n\n // ── Step 2: Relationship ──\n relationshipStatus: {\n title: 'relationshipStatus.title',\n subtitle: 'relationshipStatus.subtitle',\n successMessage: 'relationshipStatus.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n relationshipIntent: {\n title: 'relationshipIntent.title',\n subtitle: 'relationshipIntent.subtitle',\n successMessage: 'relationshipIntent.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n sexualOrientation: {\n title: 'sexualOrientation.title',\n subtitle: 'sexualOrientation.subtitle',\n successMessage: 'sexualOrientation.success',\n visibilityLabel: 'sexualOrientation.visibility',\n required: false,\n },\n preferredGenders: {\n title: 'preferredGenders.title',\n subtitle: 'preferredGenders.subtitle',\n successMessage: 'preferredGenders.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n relationshipStructure: {\n title: 'relationshipStructure.title',\n subtitle: 'relationshipStructure.subtitle',\n successMessage: 'relationshipStructure.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 3: Mind & Education ──\n educationLevel: {\n title: 'educationLevel.title',\n subtitle: 'educationLevel.subtitle',\n successMessage: 'educationLevel.success',\n visibilityLabel: 'educationLevel.visibility',\n required: false,\n },\n institutionTier: {\n title: 'institutionTier.title',\n subtitle: 'institutionTier.subtitle',\n successMessage: 'institutionTier.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n cognitiveBand: {\n title: 'cognitiveBand.title',\n subtitle: 'cognitiveBand.subtitle',\n successMessage: 'cognitiveBand.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n politicalOrientation: {\n title: 'politicalOrientation.title',\n subtitle: 'politicalOrientation.subtitle',\n successMessage: 'politicalOrientation.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 4: Career & Finance ──\n profession: {\n title: 'profession.title',\n subtitle: 'profession.subtitle',\n successMessage: 'profession.success',\n visibilityLabel: 'profession.visibility',\n required: false,\n },\n careerStage: {\n title: 'careerStage.title',\n subtitle: 'careerStage.subtitle',\n successMessage: 'careerStage.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n incomeRange: {\n title: 'incomeRange.title',\n subtitle: 'incomeRange.subtitle',\n successMessage: 'incomeRange.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 5: Appearance ──\n height: {\n title: 'height.title',\n subtitle: 'height.subtitle',\n successMessage: 'height.success',\n visibilityLabel: 'height.visibility',\n required: false,\n },\n weight: {\n title: 'weight.title',\n subtitle: 'weight.subtitle',\n successMessage: 'weight.success',\n visibilityLabel: 'weight.visibility',\n required: false,\n },\n bodyBuild: {\n title: 'bodyBuild.title',\n subtitle: 'bodyBuild.subtitle',\n successMessage: 'bodyBuild.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n complexion: {\n title: 'complexion.title',\n subtitle: 'complexion.subtitle',\n successMessage: 'complexion.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 6: Photos ──\n photos: {\n title: 'photos.title',\n subtitle: 'photos.subtitle',\n successMessage: 'photos.success',\n required: true,\n },\n\n // ── Step 7: Your Roots ──\n hometown: {\n title: 'hometown.title',\n subtitle: 'hometown.subtitle',\n successMessage: 'hometown.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n familyReligion: {\n title: 'familyReligion.title',\n subtitle: 'familyReligion.subtitle',\n successMessage: 'familyReligion.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n personalReligion: {\n title: 'personalReligion.title',\n subtitle: 'personalReligion.subtitle',\n successMessage: 'personalReligion.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n motherTongue: {\n title: 'motherTongue.title',\n subtitle: 'motherTongue.subtitle',\n successMessage: 'motherTongue.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n familyValues: {\n title: 'familyValues.title',\n subtitle: 'familyValues.subtitle',\n successMessage: 'familyValues.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 8: Interests ──\n hobbies: {\n title: 'hobbies.title',\n subtitle: 'hobbies.subtitle',\n successMessage: 'hobbies.success',\n required: false,\n },\n\n // ── Step 9: Habits ──\n diet: {\n title: 'diet.title',\n subtitle: 'diet.subtitle',\n successMessage: 'diet.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n smoking: {\n title: 'smoking.title',\n subtitle: 'smoking.subtitle',\n successMessage: 'smoking.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n alcohol: {\n title: 'alcohol.title',\n subtitle: 'alcohol.subtitle',\n successMessage: 'alcohol.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n\n // ── Step 10: Bio ──\n bio: {\n title: 'bio.title',\n subtitle: 'bio.subtitle',\n successMessage: 'bio.success',\n visibilityLabel: 'common.showOnProfile',\n required: true,\n },\n myStory: {\n title: 'myStory.title',\n subtitle: 'myStory.subtitle',\n successMessage: 'myStory.success',\n required: false,\n },\n\n // ── Step 11: Favourites ──\n favouriteBooks: {\n title: 'favouriteBooks.title',\n subtitle: 'favouriteBooks.subtitle',\n successMessage: 'favouriteBooks.success',\n required: false,\n },\n favouriteShows: {\n title: 'favouriteShows.title',\n subtitle: 'favouriteShows.subtitle',\n successMessage: 'favouriteShows.success',\n required: false,\n },\n idols: {\n title: 'idols.title',\n subtitle: 'idols.subtitle',\n successMessage: 'idols.success',\n required: false,\n },\n\n // ── Step 12: Personality ──\n mbtiType: {\n title: 'mbtiType.title',\n subtitle: 'mbtiType.subtitle',\n successMessage: 'mbtiType.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n attachmentStyle: {\n title: 'attachmentStyle.title',\n subtitle: 'attachmentStyle.subtitle',\n successMessage: 'attachmentStyle.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n loveLanguage: {\n title: 'loveLanguage.title',\n subtitle: 'loveLanguage.subtitle',\n successMessage: 'loveLanguage.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n oceanScores: {\n title: 'oceanScores.title',\n subtitle: 'oceanScores.subtitle',\n successMessage: 'oceanScores.success',\n required: false,\n },\n conflictStyle: {\n title: 'conflictStyle.title',\n subtitle: 'conflictStyle.subtitle',\n successMessage: 'conflictStyle.success',\n visibilityLabel: 'common.showOnProfile',\n required: false,\n },\n};\n\n// ─── Step grouping ──────────────────────────────────────────────────────────\n\nexport const ONBOARDING_STEP_GROUPS: OnboardingStepGroup[] = [\n {\n label: 'steps.basics',\n icon: 'User',\n fields: ['displayName', 'dateOfBirth', 'gender', 'phoneNumbers', 'pronouns'],\n },\n {\n label: 'steps.relationship',\n icon: 'Heart',\n fields: [\n 'relationshipStatus',\n 'relationshipIntent',\n 'sexualOrientation',\n 'preferredGenders',\n 'relationshipStructure',\n ],\n },\n {\n label: 'steps.mindEducation',\n icon: 'Brain',\n fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'],\n },\n {\n label: 'steps.careerFinance',\n icon: 'Briefcase',\n fields: ['profession', 'careerStage', 'incomeRange'],\n },\n {\n label: 'steps.appearance',\n icon: 'Ruler',\n fields: ['height', 'weight', 'bodyBuild', 'complexion'],\n },\n { label: 'steps.photos', icon: 'Camera', fields: ['photos'] },\n {\n label: 'steps.yourRoots',\n icon: 'TreePine',\n fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'],\n },\n { label: 'steps.interests', icon: 'Sparkles', fields: ['hobbies'] },\n { label: 'steps.habits', icon: 'Cigarette', fields: ['diet', 'smoking', 'alcohol'] },\n { label: 'steps.bio', icon: 'PenLine', fields: ['bio', 'myStory'] },\n {\n label: 'steps.favourites',\n icon: 'Star',\n fields: ['favouriteBooks', 'favouriteShows', 'idols'],\n },\n {\n label: 'steps.personality',\n icon: 'Puzzle',\n fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'],\n },\n];\n\n// ─── Helpers ─────────────────────────────────────────────────────────────────\n\n/** Get onboarding config for a single field. */\nexport function getOnboardingFieldConfig(\n fieldKey: string | undefined,\n): OnboardingFieldConfig | undefined {\n if (!fieldKey) return undefined;\n return ONBOARDING_FIELDS[fieldKey];\n}\n\n/** Total number of main steps. */\nexport const ONBOARDING_TOTAL_MAIN_STEPS = ONBOARDING_STEP_GROUPS.length;\n\n/** Total number of sub-steps across all main steps. */\nexport const ONBOARDING_TOTAL_SUB_STEPS = ONBOARDING_STEP_GROUPS.reduce(\n (sum, g) => sum + g.fields.length,\n 0,\n);\n"]}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Dating Onboarding Progress — Shared between frontend and backend.
3
+ *
4
+ * Maps each onboarding step to the DB fields that count toward progress.
5
+ * Used by frontend (stepper UI: "3/5 filled") and backend (API progress response).
6
+ *
7
+ * Keys are 0-indexed step numbers matching ONBOARDING_STEP_GROUPS order.
8
+ * Values are DB field paths on the DatingProfile document.
9
+ *
10
+ * @module dating-schema/onboarding-progress
11
+ */
12
+ /**
13
+ * Per-step progress fields.
14
+ * Each key is a step index (0-11), each value is the list of DB field paths
15
+ * that count toward that step's completion.
16
+ */
17
+ export declare const DATING_PROGRESS_FIELDS: Record<number, readonly string[]>;
18
+ /** Total number of steps with progress tracking. */
19
+ export declare const DATING_PROGRESS_TOTAL_STEPS: number;
20
+ /**
21
+ * Navigate nested object properties using dot-path notation.
22
+ * e.g., getNestedValue(profile, "guardianContact.phoneNumber")
23
+ */
24
+ export declare function getNestedValue(obj: Record<string, unknown>, path: string): unknown;
25
+ /** Determine if a field value counts as "filled" for progress. */
26
+ export declare function isFieldFilled(value: unknown): boolean;
27
+ /**
28
+ * Calculate progress for a single dating onboarding step.
29
+ * Returns { filled, total } counts.
30
+ *
31
+ * @param stepIndex - 0-indexed step number (0-11)
32
+ * @param profile - Dating profile document (or partial record)
33
+ */
34
+ export declare function calculateDatingStepProgress(stepIndex: number, profile: Record<string, unknown> | undefined | null): {
35
+ filled: number;
36
+ total: number;
37
+ };
38
+ /**
39
+ * Calculate overall dating onboarding progress across all steps.
40
+ * Returns per-step breakdowns + overall percentage.
41
+ */
42
+ export declare function calculateDatingOverallProgress(profile: Record<string, unknown> | undefined | null): {
43
+ steps: {
44
+ filled: number;
45
+ total: number;
46
+ }[];
47
+ totalFilled: number;
48
+ totalFields: number;
49
+ percent: number;
50
+ };
51
+ //# sourceMappingURL=onboarding-progress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboarding-progress.d.ts","sourceRoot":"","sources":["../src/onboarding-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAyBpE,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,2BAA2B,QAA6C,CAAC;AAEtF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAQlF;AAED,kEAAkE;AAClE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAarD;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GAClD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAcnC;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,GAClD;IACD,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAcA"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Dating Onboarding Progress — Shared between frontend and backend.
3
+ *
4
+ * Maps each onboarding step to the DB fields that count toward progress.
5
+ * Used by frontend (stepper UI: "3/5 filled") and backend (API progress response).
6
+ *
7
+ * Keys are 0-indexed step numbers matching ONBOARDING_STEP_GROUPS order.
8
+ * Values are DB field paths on the DatingProfile document.
9
+ *
10
+ * @module dating-schema/onboarding-progress
11
+ */
12
+ /**
13
+ * Per-step progress fields.
14
+ * Each key is a step index (0-11), each value is the list of DB field paths
15
+ * that count toward that step's completion.
16
+ */
17
+ export const DATING_PROGRESS_FIELDS = {
18
+ // Step 0: Basics
19
+ 0: ['displayName', 'dateOfBirth', 'gender', 'phoneNumber', 'pronouns'],
20
+ // Step 1: Relationship
21
+ 1: ['relationshipStatus', 'relationshipIntent', 'sexualOrientation', 'preferredGenders', 'relationshipStructure'],
22
+ // Step 2: Mind & Education
23
+ 2: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'],
24
+ // Step 3: Career & Finance
25
+ 3: ['profession', 'careerStage', 'incomeRange'],
26
+ // Step 4: Appearance
27
+ 4: ['height', 'weight', 'bodyBuild', 'complexion'],
28
+ // Step 5: Photos
29
+ 5: ['photos'],
30
+ // Step 6: Your Roots
31
+ 6: ['hometownState', 'hometownDistrict', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'],
32
+ // Step 7: Interests
33
+ 7: ['hobbies'],
34
+ // Step 8: Habits
35
+ 8: ['diet', 'smoking', 'alcohol'],
36
+ // Step 9: Bio
37
+ 9: ['bio', 'myStory'],
38
+ // Step 10: Favourites
39
+ 10: ['favouriteBooks', 'favouriteShows', 'idols'],
40
+ // Step 11: Personality & Mindset
41
+ 11: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanOpenness', 'oceanConscientiousness', 'oceanExtraversion', 'oceanAgreeableness', 'oceanNeuroticism', 'conflictStyle'],
42
+ };
43
+ /** Total number of steps with progress tracking. */
44
+ export const DATING_PROGRESS_TOTAL_STEPS = Object.keys(DATING_PROGRESS_FIELDS).length;
45
+ /**
46
+ * Navigate nested object properties using dot-path notation.
47
+ * e.g., getNestedValue(profile, "guardianContact.phoneNumber")
48
+ */
49
+ export function getNestedValue(obj, path) {
50
+ const parts = path.split('.');
51
+ let current = obj;
52
+ for (const part of parts) {
53
+ if (current === null || current === undefined || typeof current !== 'object')
54
+ return undefined;
55
+ current = current[part];
56
+ }
57
+ return current;
58
+ }
59
+ /** Determine if a field value counts as "filled" for progress. */
60
+ export function isFieldFilled(value) {
61
+ if (value === null || value === undefined)
62
+ return false;
63
+ if (typeof value === 'string')
64
+ return value.trim().length > 0;
65
+ if (typeof value === 'number')
66
+ return true;
67
+ if (typeof value === 'boolean')
68
+ return true;
69
+ if (Array.isArray(value))
70
+ return value.length > 0;
71
+ if (typeof value === 'object') {
72
+ if ('name' in value && typeof value.name === 'string') {
73
+ return value.name !== '';
74
+ }
75
+ return Object.keys(value).length > 0;
76
+ }
77
+ return false;
78
+ }
79
+ /**
80
+ * Calculate progress for a single dating onboarding step.
81
+ * Returns { filled, total } counts.
82
+ *
83
+ * @param stepIndex - 0-indexed step number (0-11)
84
+ * @param profile - Dating profile document (or partial record)
85
+ */
86
+ export function calculateDatingStepProgress(stepIndex, profile) {
87
+ const fields = DATING_PROGRESS_FIELDS[stepIndex];
88
+ if (!fields)
89
+ return { filled: 0, total: 0 };
90
+ const total = fields.length;
91
+ if (!profile || total === 0)
92
+ return { filled: 0, total };
93
+ let filled = 0;
94
+ for (const fieldPath of fields) {
95
+ if (isFieldFilled(getNestedValue(profile, fieldPath))) {
96
+ filled++;
97
+ }
98
+ }
99
+ return { filled, total };
100
+ }
101
+ /**
102
+ * Calculate overall dating onboarding progress across all steps.
103
+ * Returns per-step breakdowns + overall percentage.
104
+ */
105
+ export function calculateDatingOverallProgress(profile) {
106
+ const steps = [];
107
+ let totalFilled = 0;
108
+ let totalFields = 0;
109
+ for (let i = 0; i < DATING_PROGRESS_TOTAL_STEPS; i++) {
110
+ const step = calculateDatingStepProgress(i, profile);
111
+ steps.push(step);
112
+ totalFilled += step.filled;
113
+ totalFields += step.total;
114
+ }
115
+ const percent = totalFields > 0 ? Math.round((totalFilled / totalFields) * 100) : 0;
116
+ return { steps, totalFilled, totalFields, percent };
117
+ }
118
+ //# sourceMappingURL=onboarding-progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"onboarding-progress.js","sourceRoot":"","sources":["../src/onboarding-progress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsC;IACvE,iBAAiB;IACjB,CAAC,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC;IACtE,uBAAuB;IACvB,CAAC,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,uBAAuB,CAA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AAC,OAAO,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;IAEzD,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,SAAS,IAAI,MAAM,EAAE,CAAC;QAC/B,IAAI,aAAa,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;YACtD,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAC5C,OAAmD;IAOnD,MAAM,KAAK,GAAwC,EAAE,CAAC;IACtD,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,WAAW,GAAG,CAAC,CAAC;IAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,2BAA2B,EAAE,CAAC,EAAE,EAAE,CAAC;QACrD,MAAM,IAAI,GAAG,2BAA2B,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QACrD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC;QAC3B,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED,MAAM,OAAO,GAAG,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpF,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AACtD,CAAC","sourcesContent":["/**\n * Dating Onboarding Progress — Shared between frontend and backend.\n *\n * Maps each onboarding step to the DB fields that count toward progress.\n * Used by frontend (stepper UI: \"3/5 filled\") and backend (API progress response).\n *\n * Keys are 0-indexed step numbers matching ONBOARDING_STEP_GROUPS order.\n * Values are DB field paths on the DatingProfile document.\n *\n * @module dating-schema/onboarding-progress\n */\n\n/**\n * Per-step progress fields.\n * Each key is a step index (0-11), each value is the list of DB field paths\n * that count toward that step's completion.\n */\nexport const DATING_PROGRESS_FIELDS: Record<number, readonly string[]> = {\n // Step 0: Basics\n 0: ['displayName', 'dateOfBirth', 'gender', 'phoneNumber', 'pronouns'],\n // Step 1: Relationship\n 1: ['relationshipStatus', 'relationshipIntent', 'sexualOrientation', 'preferredGenders', 'relationshipStructure'],\n // Step 2: Mind & Education\n 2: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'],\n // Step 3: Career & Finance\n 3: ['profession', 'careerStage', 'incomeRange'],\n // Step 4: Appearance\n 4: ['height', 'weight', 'bodyBuild', 'complexion'],\n // Step 5: Photos\n 5: ['photos'],\n // Step 6: Your Roots\n 6: ['hometownState', 'hometownDistrict', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'],\n // Step 7: Interests\n 7: ['hobbies'],\n // Step 8: Habits\n 8: ['diet', 'smoking', 'alcohol'],\n // Step 9: Bio\n 9: ['bio', 'myStory'],\n // Step 10: Favourites\n 10: ['favouriteBooks', 'favouriteShows', 'idols'],\n // Step 11: Personality & Mindset\n 11: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanOpenness', 'oceanConscientiousness', 'oceanExtraversion', 'oceanAgreeableness', 'oceanNeuroticism', 'conflictStyle'],\n};\n\n/** Total number of steps with progress tracking. */\nexport const DATING_PROGRESS_TOTAL_STEPS = Object.keys(DATING_PROGRESS_FIELDS).length;\n\n/**\n * Navigate nested object properties using dot-path notation.\n * e.g., getNestedValue(profile, \"guardianContact.phoneNumber\")\n */\nexport function getNestedValue(obj: Record<string, unknown>, path: string): unknown {\n const parts = path.split('.');\n let current: unknown = obj;\n for (const part of parts) {\n if (current === null || current === undefined || typeof current !== 'object') return undefined;\n current = (current as Record<string, unknown>)[part];\n }\n return current;\n}\n\n/** Determine if a field value counts as \"filled\" for progress. */\nexport function isFieldFilled(value: unknown): boolean {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string') return value.trim().length > 0;\n if (typeof value === 'number') return true;\n if (typeof value === 'boolean') return true;\n if (Array.isArray(value)) return value.length > 0;\n if (typeof value === 'object') {\n if ('name' in value && typeof (value as Record<string, unknown>).name === 'string') {\n return (value as Record<string, unknown>).name !== '';\n }\n return Object.keys(value).length > 0;\n }\n return false;\n}\n\n/**\n * Calculate progress for a single dating onboarding step.\n * Returns { filled, total } counts.\n *\n * @param stepIndex - 0-indexed step number (0-11)\n * @param profile - Dating profile document (or partial record)\n */\nexport function calculateDatingStepProgress(\n stepIndex: number,\n profile: Record<string, unknown> | undefined | null,\n): { filled: number; total: number } {\n const fields = DATING_PROGRESS_FIELDS[stepIndex];\n if (!fields) return { filled: 0, total: 0 };\n\n const total = fields.length;\n if (!profile || total === 0) return { filled: 0, total };\n\n let filled = 0;\n for (const fieldPath of fields) {\n if (isFieldFilled(getNestedValue(profile, fieldPath))) {\n filled++;\n }\n }\n return { filled, total };\n}\n\n/**\n * Calculate overall dating onboarding progress across all steps.\n * Returns per-step breakdowns + overall percentage.\n */\nexport function calculateDatingOverallProgress(\n profile: Record<string, unknown> | undefined | null,\n): {\n steps: { filled: number; total: number }[];\n totalFilled: number;\n totalFields: number;\n percent: number;\n} {\n const steps: { filled: number; total: number }[] = [];\n let totalFilled = 0;\n let totalFields = 0;\n\n for (let i = 0; i < DATING_PROGRESS_TOTAL_STEPS; i++) {\n const step = calculateDatingStepProgress(i, profile);\n steps.push(step);\n totalFilled += step.filled;\n totalFields += step.total;\n }\n\n const percent = totalFields > 0 ? Math.round((totalFilled / totalFields) * 100) : 0;\n return { steps, totalFilled, totalFields, percent };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dating-schema",
3
- "version": "0.46.0",
3
+ "version": "0.48.0",
4
4
  "description": "Shared Zod schemas for the Dating feature — single source of truth for API contracts, validation, and TypeScript types (frontend + backend).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",