dating-schema 0.46.0 → 0.47.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.
|
@@ -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
|
|
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
|
-
/**
|
|
18
|
+
/** i18n key for the question heading (resolved via t(title)) */
|
|
11
19
|
title: string;
|
|
12
|
-
/**
|
|
20
|
+
/** i18n key for help text below the heading */
|
|
13
21
|
subtitle?: string;
|
|
14
|
-
/**
|
|
22
|
+
/** i18n key for toast message on successful save */
|
|
15
23
|
successMessage: string;
|
|
16
|
-
/** "Show on profile" toggle label (null = no toggle
|
|
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
|
-
/**
|
|
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
|
|
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,EAavD,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
|
|
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,344 +18,310 @@
|
|
|
10
18
|
export const ONBOARDING_FIELDS = {
|
|
11
19
|
// ── Step 1: Basics ──
|
|
12
20
|
displayName: {
|
|
13
|
-
title: '
|
|
14
|
-
subtitle: '
|
|
15
|
-
successMessage: '
|
|
16
|
-
visibilityLabel: '
|
|
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:
|
|
21
|
-
subtitle: '
|
|
22
|
-
successMessage: '
|
|
23
|
-
visibilityLabel: '
|
|
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:
|
|
28
|
-
subtitle: '
|
|
29
|
-
successMessage: '
|
|
30
|
-
visibilityLabel: '
|
|
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: '
|
|
35
|
-
subtitle: '
|
|
36
|
-
successMessage: '
|
|
42
|
+
title: 'phoneNumbers.title',
|
|
43
|
+
subtitle: 'phoneNumbers.subtitle',
|
|
44
|
+
successMessage: 'phoneNumbers.success',
|
|
37
45
|
required: true,
|
|
38
46
|
},
|
|
39
47
|
pronouns: {
|
|
40
|
-
title: '
|
|
41
|
-
subtitle: '
|
|
42
|
-
successMessage: '
|
|
43
|
-
visibilityLabel: '
|
|
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:
|
|
49
|
-
subtitle: '
|
|
50
|
-
successMessage: '
|
|
51
|
-
visibilityLabel: '
|
|
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: '
|
|
56
|
-
subtitle: '
|
|
57
|
-
successMessage: '
|
|
58
|
-
visibilityLabel: '
|
|
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:
|
|
63
|
-
subtitle: '
|
|
64
|
-
successMessage: '
|
|
65
|
-
visibilityLabel: '
|
|
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: '
|
|
70
|
-
subtitle:
|
|
71
|
-
successMessage: '
|
|
72
|
-
visibilityLabel: '
|
|
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: '
|
|
77
|
-
subtitle: '
|
|
78
|
-
successMessage: '
|
|
79
|
-
visibilityLabel: '
|
|
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:
|
|
85
|
-
subtitle: '
|
|
86
|
-
successMessage: '
|
|
87
|
-
visibilityLabel: '
|
|
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:
|
|
92
|
-
subtitle: '
|
|
93
|
-
successMessage: '
|
|
94
|
-
visibilityLabel: '
|
|
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: '
|
|
99
|
-
subtitle: '
|
|
100
|
-
successMessage: '
|
|
101
|
-
visibilityLabel: '
|
|
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: '
|
|
106
|
-
subtitle: '
|
|
107
|
-
successMessage: '
|
|
108
|
-
visibilityLabel: '
|
|
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: '
|
|
114
|
-
subtitle: '
|
|
115
|
-
successMessage: '
|
|
116
|
-
visibilityLabel: '
|
|
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: '
|
|
121
|
-
subtitle: '
|
|
122
|
-
successMessage: '
|
|
123
|
-
visibilityLabel: '
|
|
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:
|
|
128
|
-
subtitle: '
|
|
129
|
-
successMessage: '
|
|
130
|
-
visibilityLabel: '
|
|
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: '
|
|
136
|
-
subtitle: '
|
|
137
|
-
successMessage: '
|
|
138
|
-
visibilityLabel: '
|
|
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:
|
|
143
|
-
subtitle: '
|
|
144
|
-
successMessage: '
|
|
145
|
-
visibilityLabel: '
|
|
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:
|
|
150
|
-
subtitle: '
|
|
151
|
-
successMessage: '
|
|
152
|
-
visibilityLabel: '
|
|
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:
|
|
157
|
-
subtitle: '
|
|
158
|
-
successMessage: '
|
|
159
|
-
visibilityLabel: '
|
|
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: '
|
|
165
|
-
subtitle: '
|
|
166
|
-
successMessage: '
|
|
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: '
|
|
172
|
-
subtitle: '
|
|
173
|
-
successMessage: '
|
|
174
|
-
visibilityLabel: '
|
|
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:
|
|
179
|
-
subtitle: '
|
|
180
|
-
successMessage: '
|
|
181
|
-
visibilityLabel: '
|
|
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:
|
|
186
|
-
subtitle:
|
|
187
|
-
successMessage: '
|
|
188
|
-
visibilityLabel: '
|
|
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:
|
|
193
|
-
subtitle: '
|
|
194
|
-
successMessage: '
|
|
195
|
-
visibilityLabel: '
|
|
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: '
|
|
200
|
-
subtitle: '
|
|
201
|
-
successMessage: '
|
|
202
|
-
visibilityLabel: '
|
|
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: '
|
|
208
|
-
subtitle: '
|
|
209
|
-
successMessage: '
|
|
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:
|
|
215
|
-
subtitle: '
|
|
216
|
-
successMessage: '
|
|
217
|
-
visibilityLabel: '
|
|
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: '
|
|
222
|
-
subtitle: '
|
|
223
|
-
successMessage: '
|
|
224
|
-
visibilityLabel: '
|
|
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: '
|
|
229
|
-
subtitle: '
|
|
230
|
-
successMessage: '
|
|
231
|
-
visibilityLabel: '
|
|
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: '
|
|
237
|
-
subtitle: '
|
|
238
|
-
successMessage: '
|
|
239
|
-
visibilityLabel: '
|
|
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: '
|
|
244
|
-
subtitle: '
|
|
245
|
-
successMessage: '
|
|
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: '
|
|
251
|
-
subtitle: '
|
|
252
|
-
successMessage: '
|
|
258
|
+
title: 'favouriteBooks.title',
|
|
259
|
+
subtitle: 'favouriteBooks.subtitle',
|
|
260
|
+
successMessage: 'favouriteBooks.success',
|
|
253
261
|
required: false,
|
|
254
262
|
},
|
|
255
263
|
favouriteShows: {
|
|
256
|
-
title: '
|
|
257
|
-
subtitle: '
|
|
258
|
-
successMessage: '
|
|
264
|
+
title: 'favouriteShows.title',
|
|
265
|
+
subtitle: 'favouriteShows.subtitle',
|
|
266
|
+
successMessage: 'favouriteShows.success',
|
|
259
267
|
required: false,
|
|
260
268
|
},
|
|
261
269
|
idols: {
|
|
262
|
-
title: '
|
|
263
|
-
subtitle: '
|
|
264
|
-
successMessage: '
|
|
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:
|
|
270
|
-
subtitle:
|
|
271
|
-
successMessage: '
|
|
272
|
-
visibilityLabel: '
|
|
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:
|
|
277
|
-
subtitle: '
|
|
278
|
-
successMessage: '
|
|
279
|
-
visibilityLabel: '
|
|
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:
|
|
284
|
-
subtitle: '
|
|
285
|
-
successMessage: '
|
|
286
|
-
visibilityLabel: '
|
|
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:
|
|
291
|
-
subtitle:
|
|
292
|
-
successMessage: '
|
|
298
|
+
title: 'oceanScores.title',
|
|
299
|
+
subtitle: 'oceanScores.subtitle',
|
|
300
|
+
successMessage: 'oceanScores.success',
|
|
293
301
|
required: false,
|
|
294
302
|
},
|
|
295
303
|
conflictStyle: {
|
|
296
|
-
title: '
|
|
297
|
-
subtitle:
|
|
298
|
-
successMessage: '
|
|
299
|
-
visibilityLabel: '
|
|
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
|
-
{
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
'preferredGenders',
|
|
318
|
-
'relationshipStructure',
|
|
319
|
-
],
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
label: 'Mind & Education',
|
|
323
|
-
icon: 'Brain',
|
|
324
|
-
fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'],
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
label: 'Career & Finance',
|
|
328
|
-
icon: 'Briefcase',
|
|
329
|
-
fields: ['profession', 'careerStage', 'incomeRange'],
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
label: 'Appearance',
|
|
333
|
-
icon: 'Ruler',
|
|
334
|
-
fields: ['height', 'weight', 'bodyBuild', 'complexion'],
|
|
335
|
-
},
|
|
336
|
-
{ label: 'Photos', icon: 'Camera', fields: ['photos'] },
|
|
337
|
-
{
|
|
338
|
-
label: 'Your Roots',
|
|
339
|
-
icon: 'TreePine',
|
|
340
|
-
fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'],
|
|
341
|
-
},
|
|
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'] },
|
|
346
|
-
{
|
|
347
|
-
label: 'Personality',
|
|
348
|
-
icon: 'Puzzle',
|
|
349
|
-
fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'],
|
|
350
|
-
},
|
|
313
|
+
{ label: 'steps.basics', icon: 'User', fields: ['displayName', 'dateOfBirth', 'gender', 'phoneNumbers', 'pronouns'] },
|
|
314
|
+
{ label: 'steps.relationship', icon: 'Heart', fields: ['relationshipStatus', 'relationshipIntent', 'sexualOrientation', 'preferredGenders', 'relationshipStructure'] },
|
|
315
|
+
{ label: 'steps.mindEducation', icon: 'Brain', fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'] },
|
|
316
|
+
{ label: 'steps.careerFinance', icon: 'Briefcase', fields: ['profession', 'careerStage', 'incomeRange'] },
|
|
317
|
+
{ label: 'steps.appearance', icon: 'Ruler', fields: ['height', 'weight', 'bodyBuild', 'complexion'] },
|
|
318
|
+
{ label: 'steps.photos', icon: 'Camera', fields: ['photos'] },
|
|
319
|
+
{ label: 'steps.yourRoots', icon: 'TreePine', fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'] },
|
|
320
|
+
{ label: 'steps.interests', icon: 'Sparkles', fields: ['hobbies'] },
|
|
321
|
+
{ label: 'steps.habits', icon: 'Cigarette', fields: ['diet', 'smoking', 'alcohol'] },
|
|
322
|
+
{ label: 'steps.bio', icon: 'PenLine', fields: ['bio', 'myStory'] },
|
|
323
|
+
{ label: 'steps.favourites', icon: 'Star', fields: ['favouriteBooks', 'favouriteShows', 'idols'] },
|
|
324
|
+
{ label: 'steps.personality', icon: 'Puzzle', fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'] },
|
|
351
325
|
];
|
|
352
326
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
353
327
|
/** Get onboarding config for a single field. */
|
|
@@ -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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AAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE;IAC9E,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,EAAE;IAC7D,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE;IAC5F;QACE,KAAK,EAAE,aAAa;QACpB,IAAI,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 — 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,EAAE,mBAAmB;QACpC,QAAQ,EAAE,IAAI;KACf;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,oBAAoB;QAC3B,QAAQ,EAAE,uBAAuB;QACjC,cAAc,EAAE,sBAAsB;QACtC,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,mBAAmB;QAC7B,cAAc,EAAE,kBAAkB;QAClC,eAAe,EAAE,qBAAqB;QACtC,QAAQ,EAAE,IAAI;KACf;IAED,6BAA6B;IAC7B,kBAAkB,EAAE;QAClB,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,6BAA6B;QACvC,cAAc,EAAE,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M,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 { label: 'steps.basics', icon: 'User', fields: ['displayName', 'dateOfBirth', 'gender', 'phoneNumbers', 'pronouns'] },\n { label: 'steps.relationship', icon: 'Heart', fields: ['relationshipStatus', 'relationshipIntent', 'sexualOrientation', 'preferredGenders', 'relationshipStructure'] },\n { label: 'steps.mindEducation', icon: 'Brain', fields: ['educationLevel', 'institutionTier', 'cognitiveBand', 'politicalOrientation'] },\n { label: 'steps.careerFinance', icon: 'Briefcase', fields: ['profession', 'careerStage', 'incomeRange'] },\n { label: 'steps.appearance', icon: 'Ruler', fields: ['height', 'weight', 'bodyBuild', 'complexion'] },\n { label: 'steps.photos', icon: 'Camera', fields: ['photos'] },\n { label: 'steps.yourRoots', icon: 'TreePine', fields: ['hometown', 'familyReligion', 'personalReligion', 'motherTongue', 'familyValues'] },\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 { label: 'steps.favourites', icon: 'Star', fields: ['favouriteBooks', 'favouriteShows', 'idols'] },\n { label: 'steps.personality', icon: 'Puzzle', fields: ['mbtiType', 'attachmentStyle', 'loveLanguage', 'oceanScores', 'conflictStyle'] },\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"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dating-schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.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",
|