@baravak/risloo-profile-cli 4.46.3 → 4.75.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.
Files changed (101) hide show
  1. package/.agents/skills/create-profile/SKILL.md +14 -0
  2. package/.claude/settings.local.json +1 -3
  3. package/.claude/skills/create-profile/SKILL.md +203 -0
  4. package/AGENTS.md +413 -0
  5. package/CLAUDE.md +2 -185
  6. package/package.json +1 -1
  7. package/src/cli-commands/Executor.js +8 -2
  8. package/src/cli-commands/ExtractExecutor.js +55 -21
  9. package/src/cli-commands/GiftExecutor.js +1 -0
  10. package/src/handlebars/importPartials.js +10 -44
  11. package/src/handlebars/init.js +17 -11
  12. package/src/publish/json/profiles/BSSI93.json +392 -0
  13. package/src/publish/json/profiles/FRHPT93.json +2 -2
  14. package/src/publish/json/profiles/ISKS93.json +288 -0
  15. package/src/publish/json/profiles/MCMI9A.json +1540 -0
  16. package/src/publish/json/profiles/NEO93.json +3858 -0
  17. package/src/publish/json/profiles/NEO9A.json +1159 -1
  18. package/src/publish/json/profiles/NEO9Q.json +3856 -0
  19. package/src/publish/json/profiles/NEO9V.json +1157 -0
  20. package/src/publish/json/profiles/RIASEC9A.json +2775 -0
  21. package/src/publish/json/profiles/RSI93.json +359 -0
  22. package/src/samples/AEQ93.js +1 -1
  23. package/src/samples/AMS93.js +1 -1
  24. package/src/samples/AMS9A.js +3 -1
  25. package/src/samples/BAOMEIS93.js +1 -1
  26. package/src/samples/BEQI93.js +1 -1
  27. package/src/samples/BSCT93.js +5 -0
  28. package/src/samples/BSSI93.js +93 -0
  29. package/src/samples/CAATS93.js +1 -1
  30. package/src/samples/CERQ93.js +1 -1
  31. package/src/samples/CRAAS93.js +1 -1
  32. package/src/samples/DSWLS93.js +1 -1
  33. package/src/samples/EMSS93.js +1 -1
  34. package/src/samples/EPQ9A.js +6 -1
  35. package/src/samples/FACES93.js +6 -0
  36. package/src/samples/FRHPT93.js +41 -13
  37. package/src/samples/GMIT93.js +1 -1
  38. package/src/samples/HPL93.js +1 -1
  39. package/src/samples/ISKS93.js +62 -0
  40. package/src/samples/IUS93.js +1 -1
  41. package/src/samples/JCSI93.js +1 -1
  42. package/src/samples/JPFQ93.js +5 -0
  43. package/src/samples/KJGI93.js +1 -1
  44. package/src/samples/LMIQ93.js +1 -1
  45. package/src/samples/MCMI9A.js +530 -0
  46. package/src/samples/MMFAD93.js +1 -1
  47. package/src/samples/MOCI93.js +1 -1
  48. package/src/samples/NEO93.js +279 -0
  49. package/src/samples/NEO9A.js +93 -60
  50. package/src/samples/NEO9Q.js +281 -0
  51. package/src/samples/NEO9V.js +218 -0
  52. package/src/samples/OBQ4493.js +1 -1
  53. package/src/samples/PIES93.js +1 -1
  54. package/src/samples/PIES9A.js +4 -0
  55. package/src/samples/PMCIEF93.js +7 -1
  56. package/src/samples/PSWQ93.js +1 -1
  57. package/src/samples/RIASEC93.js +1 -1
  58. package/src/samples/RIASEC9A.js +256 -0
  59. package/src/samples/RSI93.js +89 -0
  60. package/src/samples/SASQ93.js +1 -1
  61. package/src/samples/SDCAQ93.js +1 -1
  62. package/src/samples/STAIY93.js +1 -1
  63. package/src/samples/WAQ93.js +1 -1
  64. package/src/samples/YBOCS93.js +1 -1
  65. package/src/samples/YPI93.js +5 -1
  66. package/views/profiles/MCMI9A_facets_partial.hbs +96 -0
  67. package/views/profiles/MCMI9A_main_partial.hbs +262 -0
  68. package/views/profiles/MCMI9A_noteworthy_partial.hbs +66 -0
  69. package/views/profiles/MCMI9A_vertical_label_partial.hbs +8 -0
  70. package/views/profiles/NEO_long_facets.hbs +125 -0
  71. package/views/profiles/NEO_main.hbs +152 -0
  72. package/views/profiles/NEO_short_facets.hbs +82 -0
  73. package/views/profiles/samples/BSCT93.hbs +17 -17
  74. package/views/profiles/samples/BSSI93.hbs +102 -0
  75. package/views/profiles/samples/FRHPT93_1.hbs +568 -87
  76. package/views/profiles/samples/FRHPT93_2.hbs +90 -76
  77. package/views/profiles/samples/FRHPT93_3.hbs +2 -2
  78. package/views/profiles/samples/FRHPT93_4.hbs +2 -2
  79. package/views/profiles/samples/FRHPT93_5.hbs +103 -0
  80. package/views/profiles/samples/FRHPT9A.hbs +7 -7
  81. package/views/profiles/samples/ISKS93.hbs +38 -0
  82. package/views/profiles/samples/MCMI9A_1.hbs +3 -0
  83. package/views/profiles/samples/MCMI9A_2.hbs +3 -0
  84. package/views/profiles/samples/MCMI9A_3.hbs +3 -0
  85. package/views/profiles/samples/MCMI9A_4.hbs +3 -0
  86. package/views/profiles/samples/NEO93_1.hbs +14 -0
  87. package/views/profiles/samples/NEO93_2.hbs +15 -0
  88. package/views/profiles/samples/NEO93_3.hbs +15 -0
  89. package/views/profiles/samples/NEO9A.hbs +14 -29
  90. package/views/profiles/samples/NEO9Q_1.hbs +13 -0
  91. package/views/profiles/samples/NEO9Q_2.hbs +14 -0
  92. package/views/profiles/samples/NEO9Q_3.hbs +14 -0
  93. package/views/profiles/samples/NEO9V_1.hbs +13 -0
  94. package/views/profiles/samples/NEO9V_2.hbs +3 -0
  95. package/views/profiles/samples/RIASEC9A_1.hbs +38 -0
  96. package/views/profiles/samples/RIASEC9A_2.hbs +67 -0
  97. package/views/profiles/samples/RIASEC9A_3.hbs +93 -0
  98. package/views/profiles/samples/RSI93.hbs +101 -0
  99. package/a.json +0 -4805
  100. package/src/publish/json/profiles/BSCT93_t1.json +0 -512
  101. package/src/publish/json/profiles/BSCT93_t2.json +0 -512
@@ -0,0 +1,359 @@
1
+ {
2
+ "id": "$X1HXXXXX",
3
+ "scale": { "id": "$RSI-93", "title": "پرسشنامه تصور از خدا (خسروی)" },
4
+
5
+ "chain": null,
6
+ "version": "2",
7
+ "edition": "",
8
+ "edition_version": null,
9
+ "client": {
10
+ "id": "GH966XXXX",
11
+ "name": "مراجع"
12
+ },
13
+ "room": {
14
+ "id": "RS96XXXX",
15
+ "manager": {
16
+ "id": "GH9XXXXX",
17
+ "name": "درمانگر",
18
+ "user_id": "IR9XXXX"
19
+ },
20
+ "center": {
21
+ "id": "RS966XXXX",
22
+ "acceptation": null,
23
+ "status": "active",
24
+ "type": "personal_clinic",
25
+ "detail": {
26
+ "title": "درمانگر"
27
+ }
28
+ },
29
+ "acceptation": null,
30
+ "status": "active",
31
+ "type": "personal_clinic"
32
+ },
33
+ "case": null,
34
+ "code": null,
35
+ "created_at": 1694157079,
36
+ "started_at": 1694157198,
37
+ "scored_at": 1694242467,
38
+ "closed_at": 1694160574,
39
+ "total_amount": 100000,
40
+ "prepayment": true,
41
+ "purchased": true,
42
+ "amount": 100000,
43
+ "description": "عبارت‌های زیر را با دقت بخوانید و نشان دهید هر یک تا چه حدی در مورد شما درست و یا نادرست است. پاسخ‌های خود را با انتخاب یکی از گزینه‌های زیر علامت بزنید.",
44
+ "items": [
45
+ {
46
+ "type": "text",
47
+ "text": "من می‌دانم که ارتباطم با خدا بر چگونگی ارتباط من با خانواده‌ام تأثیر می‌گذارد.",
48
+ "answer": {
49
+ "type": "optional",
50
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
51
+ },
52
+ "user_answered": "2"
53
+ },
54
+ {
55
+ "type": "text",
56
+ "text": "خدا یک نیروی جهانی و متعلق به همگان است.",
57
+ "answer": {
58
+ "type": "optional",
59
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
60
+ },
61
+ "user_answered": "1"
62
+ },
63
+ {
64
+ "type": "text",
65
+ "text": "وقتی می‌خواهم تصمیمی اساسی بگیرم، به این فکر می‌کنم که خدا برای زندگی من چه خواسته است.",
66
+ "answer": {
67
+ "type": "optional",
68
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
69
+ },
70
+ "user_answered": "2"
71
+ },
72
+ {
73
+ "type": "text",
74
+ "text": "من از خداوند، آفریننده‌ام، بسیار وحشت دارم و با او احساس بیگانگی می‌کنم.",
75
+ "answer": {
76
+ "type": "optional",
77
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
78
+ },
79
+ "user_answered": "4"
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "من معتقدم که خدا برای من در شغلم یا آنچه انجام می‌دهم، هدفی در نظر گرفته است.",
84
+ "answer": {
85
+ "type": "optional",
86
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
87
+ },
88
+ "user_answered": "2"
89
+ },
90
+ {
91
+ "type": "text",
92
+ "text": "من به ندرت برای فکرکردن درباره ارتباط با خدا وقت می گذارم.",
93
+ "answer": {
94
+ "type": "optional",
95
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
96
+ },
97
+ "user_answered": "2"
98
+ },
99
+ {
100
+ "type": "text",
101
+ "text": "تلاش می کنم از طریق کارهایم به خدا خدمت کنم.",
102
+ "answer": {
103
+ "type": "optional",
104
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
105
+ },
106
+ "user_answered": "2"
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "من به ندرت به این فکر می‌افتم که خدا درباره اعمال من چه نظری دارد.",
111
+ "answer": {
112
+ "type": "optional",
113
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
114
+ },
115
+ "user_answered": "2"
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "من بدون نیاز به یاری خداوند زندگی خود را می گذرانم.",
120
+ "answer": {
121
+ "type": "optional",
122
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
123
+ },
124
+ "user_answered": "5"
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "دغدغه‌ من برای دیگران بر اساس عشق و علاقه من به خداست.",
129
+ "answer": {
130
+ "type": "optional",
131
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
132
+ },
133
+ "user_answered": "3"
134
+ },
135
+ {
136
+ "type": "text",
137
+ "text": "من بدون فکرکردن درباره اعتقادهای دینی ام زندگی روزمره ام را می‌گذرانم.",
138
+ "answer": {
139
+ "type": "optional",
140
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
141
+ },
142
+ "user_answered": "4"
143
+ },
144
+ {
145
+ "type": "text",
146
+ "text": "من همیشه آسوده‌خاطرم، زیرا خدا در همه مشکلات مراقب من است.",
147
+ "answer": {
148
+ "type": "optional",
149
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
150
+ },
151
+ "user_answered": "2"
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "اتخاذ یک تصمیم به همین سادگی است که از خدا درخواست کنیم و منتظر پاسخ باشیم.",
156
+ "answer": {
157
+ "type": "optional",
158
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
159
+ },
160
+ "user_answered": "3"
161
+ },
162
+ {
163
+ "type": "text",
164
+ "text": "من می دانم که خداوند همه موقعیت های دردناک مرا ختم به خیر خواهد کرد، زیرا او مرا دوست دارد.",
165
+ "answer": {
166
+ "type": "optional",
167
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
168
+ },
169
+ "user_answered": "2"
170
+ },
171
+ {
172
+ "type": "text",
173
+ "text": "من احساس امنیت و آرامش می‌کنم، زیرا می‌دانم که خدا مرا دوست می‌دارد.",
174
+ "answer": {
175
+ "type": "optional",
176
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
177
+ },
178
+ "user_answered": "2"
179
+ },
180
+ {
181
+ "type": "text",
182
+ "text": "من اطمینان دارم که آینده وابسته به خواست خداست و هرچه را او برای من در نظر بگیرد خواهم پذیرفت.",
183
+ "answer": {
184
+ "type": "optional",
185
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
186
+ },
187
+ "user_answered": "1"
188
+ },
189
+ {
190
+ "type": "text",
191
+ "text": "من در کوچک‌ترین تصمیم‌هایم نیز به کمک خدا نیاز دارم.",
192
+ "answer": {
193
+ "type": "optional",
194
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
195
+ },
196
+ "user_answered": "1"
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "باتوجه به اینکه مشمول رحمت و عفو خداوند هستم احساس راحتی می کنم.",
201
+ "answer": {
202
+ "type": "optional",
203
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
204
+ },
205
+ "user_answered": "3"
206
+ },
207
+ {
208
+ "type": "text",
209
+ "text": "هنگامی که گناه می‌کنم، احساس می‌کنم که خدا مرا عفو خواهد کرد.",
210
+ "answer": {
211
+ "type": "optional",
212
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
213
+ },
214
+ "user_answered": "2"
215
+ },
216
+ {
217
+ "type": "text",
218
+ "text": "من از اینکه خدا مرا به عنوان وسیله‌ای برای انجام‌دادن کارهای مثبت به کار می‌گیرد احساس خوبی دارم.",
219
+ "answer": {
220
+ "type": "optional",
221
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
222
+ },
223
+ "user_answered": "3"
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "تنها چیزی که لازم است درباره ایمان خود بدانم این است که خداوند مرا دوست دارد.",
228
+ "answer": {
229
+ "type": "optional",
230
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
231
+ },
232
+ "user_answered": "3"
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "هنگامی که گناه می کنم این احساس را دارم که خداوند درباره آنچه برای من رخ می دهد مراقبت چندانی ندارد.",
237
+ "answer": {
238
+ "type": "optional",
239
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
240
+ },
241
+ "user_answered": "3"
242
+ },
243
+ {
244
+ "type": "text",
245
+ "text": "از اینکه خداوند در بهبود زندگی ام نقش اندکی ایفا می کند رنجیده خاطرم.",
246
+ "answer": {
247
+ "type": "optional",
248
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
249
+ },
250
+ "user_answered": "5"
251
+ },
252
+ {
253
+ "type": "text",
254
+ "text": "من در مورد اینکه چگونه نقش هایم را در رابطه با کار و خانواده ام ایفا کنم از ناحیه خداوند هدایتی را دریافت نمی کنم.",
255
+ "answer": {
256
+ "type": "optional",
257
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
258
+ },
259
+ "user_answered": "4"
260
+ },
261
+ {
262
+ "type": "text",
263
+ "text": "من فقط از ترس مجازات خدا، مراقبم که کارهای درست را انجام دهم.",
264
+ "answer": {
265
+ "type": "optional",
266
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
267
+ },
268
+ "user_answered": "4"
269
+ },
270
+ {
271
+ "type": "text",
272
+ "text": "اغلب شک دارم که آیا خدا واقعاً مرا می‌بخشد.",
273
+ "answer": {
274
+ "type": "optional",
275
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
276
+ },
277
+ "user_answered": "2"
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "من احساس می کنم که عشق و علاقه خدا در زندگی من غایب است.",
282
+ "answer": {
283
+ "type": "optional",
284
+ "options": ["کاملاً موافق", "موافق", "بی‌نظر", "مخالف", "کاملاً مخالف"]
285
+ },
286
+ "user_answered": "3"
287
+ }
288
+ ],
289
+ "prerequisites": [
290
+ {
291
+ "type": "text",
292
+ "label": "gender",
293
+ "text": "جنسیت",
294
+ "answer": { "type": "select", "options": ["زن", "مرد"] },
295
+ "alias": "gender",
296
+ "force": true,
297
+ "user_answered": "1"
298
+ },
299
+ {
300
+ "type": "text",
301
+ "label": "age",
302
+ "text": "سن",
303
+ "answer": { "type": "number" },
304
+ "alias": "age",
305
+ "force": true,
306
+ "user_answered": "16"
307
+ },
308
+ {
309
+ "type": "text",
310
+ "label": "education",
311
+ "text": "تحصیلات",
312
+ "answer": {
313
+ "type": "select",
314
+ "options": [
315
+ "ابتدایی اول",
316
+ "ابتدایی دوم",
317
+ "متوسطه اول",
318
+ "متوسطه دوم",
319
+ "دیپلم",
320
+ "کارشناسی",
321
+ "کارشناسی ارشد",
322
+ "پزشکی عمومی",
323
+ "متخصص",
324
+ "دکتری تخصصی",
325
+ "حوزوی مقدمات",
326
+ "حوزوی سطح۱",
327
+ "حوزوی سطح۲",
328
+ "حوزوی سطح۳",
329
+ "حوزوی سطح۴"
330
+ ]
331
+ },
332
+ "alias": "education",
333
+ "force": true,
334
+ "user_answered": "4"
335
+ },
336
+ {
337
+ "type": "text",
338
+ "label": "marital_status",
339
+ "text": "وضعیت تأهل",
340
+ "answer": { "type": "select", "options": ["مجرد", "متأهل"] },
341
+ "alias": "marital_status",
342
+ "force": true,
343
+ "user_answered": "1"
344
+ }
345
+ ],
346
+ "cornometer": 4,
347
+ "score": {
348
+ "god_in_life_raw": 41,
349
+ "god_in_life_percentage": 0.75,
350
+ "god_cares_raw": 38,
351
+ "god_cares_percentage": 0.76,
352
+ "positive_image_raw": 79,
353
+ "positive_image_percentage": 0.75,
354
+ "negative_image_raw": 15,
355
+ "negative_image_percentage": 0.5
356
+ },
357
+ "score_current_version": "1.0.0",
358
+ "score_last_version": "1.0.0"
359
+ }
@@ -18,7 +18,7 @@ class AEQ93 extends Profile {
18
18
  multiProfile: false /* Whether the sample has multiple profiles or not */,
19
19
  questions: false /* Determines whether to get questions from inital dataset or not */,
20
20
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
21
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
21
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
22
22
  },
23
23
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
24
24
  /* calculating its dimensions carefully is of great importance */
@@ -24,7 +24,7 @@ class AMS93 extends Profile {
24
24
  multiProfile: false /* Whether the sample has multiple profiles or not */,
25
25
  questions: false /* Determines whether to get questions from inital dataset or not */,
26
26
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
27
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
27
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
28
28
  },
29
29
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
30
30
  /* calculating its dimensions carefully is of great importance */
@@ -3,7 +3,9 @@ const AMS93 = require("./AMS93");
3
3
  // This profile is completely identical to AMS93
4
4
 
5
5
  class AMS9A extends AMS93 {
6
-
6
+ static partials = {
7
+ AMS93: "samples/AMS93.hbs",
8
+ };
7
9
  }
8
10
 
9
11
  module.exports = AMS9A;
@@ -21,7 +21,7 @@ class BAOMEIS93 extends Profile {
21
21
  multiProfile: false /* Whether the sample has multiple profiles or not */,
22
22
  questions: false /* Determines whether to get questions from inital dataset or not */,
23
23
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
24
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
24
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
25
25
  },
26
26
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
27
27
  /* calculating its dimensions carefully is of great importance */
@@ -42,7 +42,7 @@ class BEQI93 extends Profile {
42
42
  multiProfile: false /* Whether the sample has multiple profiles or not */,
43
43
  questions: false /* Determines whether to get questions from inital dataset or not */,
44
44
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
45
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
45
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
46
46
  },
47
47
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
48
48
  /* calculating its dimensions carefully is of great importance */
@@ -56,6 +56,11 @@ class BSCT93 extends Profile {
56
56
 
57
57
  const total = packItem(dataset.score[0], dataset.score[1]);
58
58
  total.transform = `translate(30, ${4 + 230 - total.p * 230})`;
59
+ // گرادیان لنگرخورده روی کلِ مسیر: روشن (#94A3B8) پایینِ مسیر (abs y=235.5)،
60
+ // تیره (#334155) بالای مسیر (abs y=12.4). در مختصاتِ محلیِ میله بیان می‌شود
61
+ // چون <path> همان total.transform را حمل می‌کند (مطابق paint6 در SVG طراحی).
62
+ total.gradY1 = 230 * total.p + 0.5; // پایینِ مسیر → abs y 235.5
63
+ total.gradY2 = 230 * total.p - 222.6; // بالای مسیر → abs y 12.4
59
64
 
60
65
  const factors = [
61
66
  packItem(dataset.score[2], dataset.score[3]),
@@ -0,0 +1,93 @@
1
+ const { Profile, FS } = require("../Profile");
2
+
3
+ class BSSI93 extends Profile {
4
+ static pages = 1;
5
+
6
+ // Bar height / percentage comes STRAIGHT from the scoring's *_percentage field
7
+ // (single source of truth). *_raw + max only drive the "نمره خام" fraction row.
8
+ // max = items × 2 (desire 5→10, preparation 5→10, intent 7→14, total 19→38).
9
+ labels = {
10
+ L0_1: { eng: "total_raw", max: 38 },
11
+ L0_2: { eng: "total_percentage" },
12
+
13
+ L1_1: { eng: "desire_raw", max: 10 },
14
+ L1_2: { eng: "desire_percentage" },
15
+
16
+ L2_1: { eng: "preparation_raw", max: 10 },
17
+ L2_2: { eng: "preparation_percentage" },
18
+
19
+ L3_1: { eng: "intent_raw", max: 14 },
20
+ L3_2: { eng: "intent_percentage" },
21
+ };
22
+
23
+ profileSpec = {
24
+ sample: {
25
+ name: "پرسشنامه افکار خودکشی بک",
26
+ multiProfile: false,
27
+ questions: false,
28
+ defaultFields: true,
29
+ fields: [],
30
+ },
31
+ profile: {
32
+ get dimensions() {
33
+ return {
34
+ width: 412 + 2 * this.padding.x,
35
+ height: 607 + 2 * this.padding.y,
36
+ };
37
+ },
38
+ padding: {
39
+ x: 265.5,
40
+ y: 73.5,
41
+ },
42
+ },
43
+ labels: Object.values(this.labels),
44
+ };
45
+
46
+ constructor(dataset, options, config = {}) {
47
+ super();
48
+ this._init(dataset, options, config);
49
+ }
50
+
51
+ _calcContext() {
52
+ const { dataset } = this;
53
+ const s = dataset.score; // [total_raw, total_%, desire_raw, desire_%, prep_raw, prep_%, intent_raw, intent_%]
54
+
55
+ // --- Total (ring gauge) ---
56
+ const total = packItem(s[0], s[1]);
57
+ const start = FS.toRadians(-90); // 0% at top (12 o'clock)
58
+ const end = FS.toRadians(180); // 100% at left (9 o'clock)
59
+ total.zeta = total.p * (end - start) + start; // clockwise 270° sweep
60
+
61
+ // --- Factors (vertical bars, left → right) ---
62
+ // Domain names are drawn under each bar; 2-line ones split as in the design.
63
+ const lines = [["تمایل به مرگ"], ["آمادگی برای", "خودکشی"], ["تمایل به", "خودکشی واقعی"]];
64
+ const factors = [packItem(s[2], s[3]), packItem(s[4], s[5]), packItem(s[6], s[7])].map((f, i) => ({
65
+ ...f,
66
+ cx: 120 + i * 100, // bar centres: 120, 220, 320
67
+ trackLeft: 106 + i * 100, // track/bar left edges: 106, 206, 306
68
+ lines: lines[i],
69
+ }));
70
+
71
+ return [{ total, factors }];
72
+ }
73
+ }
74
+
75
+ // raw: { label: { max }, mark } → the "X از Y" fraction
76
+ // percentage: { label, mark: 0..1 } → the bar height + % label
77
+ function packItem(raw, percentage) {
78
+ const mark = raw.mark ?? 0;
79
+ const max = raw.label.max;
80
+ // Clamp to [0,1] so a malformed/out-of-range percentage can never overflow
81
+ // the track or the ring gauge — the chart degrades gracefully.
82
+ const p = Math.min(Math.max(percentage.mark ?? 0, 0), 1);
83
+ return {
84
+ mark,
85
+ max,
86
+ p,
87
+ pct: Math.round(p * 100),
88
+ barH: FS.roundTo2(300 * p), // 300px full track
89
+ topY: FS.roundTo2(327 - 300 * p), // bars grow up from the y=327 baseline
90
+ };
91
+ }
92
+
93
+ module.exports = BSSI93;
@@ -70,7 +70,7 @@ class CAATS93 extends Profile {
70
70
  multiProfile: false /* Whether the sample has multiple profiles or not */,
71
71
  questions: true /* Determines whether to get questions from inital dataset or not */,
72
72
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
73
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
73
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
74
74
  },
75
75
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
76
76
  /* calculating its dimensions carefully is of great importance */
@@ -28,7 +28,7 @@ class CERQ93 extends Profile {
28
28
  multiProfile: false /* Whether the sample has multiple profiles or not */,
29
29
  questions: false /* Determines whether to get questions from inital dataset or not */,
30
30
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
31
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
31
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
32
32
  },
33
33
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
34
34
  /* calculating its dimensions carefully is of great importance */
@@ -20,7 +20,7 @@ class CRAAS93 extends Profile {
20
20
  multiProfile: false /* Whether the sample has multiple profiles or not */,
21
21
  questions: false /* Determines whether to get questions from inital dataset or not */,
22
22
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
23
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
23
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
24
24
  },
25
25
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
26
26
  /* calculating its dimensions carefully is of great importance */
@@ -18,7 +18,7 @@ class DSWLS93 extends Profile {
18
18
  multiProfile: false /* Whether the sample has multiple profiles or not */,
19
19
  questions: false /* Determines whether to get questions from inital dataset or not */,
20
20
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
21
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
21
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
22
22
  },
23
23
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
24
24
  /* calculating its dimensions carefully is of great importance */
@@ -38,7 +38,7 @@ class EMSS93 extends Profile {
38
38
  multiProfile: false /* Whether the sample has multiple profiles or not */,
39
39
  questions: false /* Determines whether to get questions from inital dataset or not */,
40
40
  defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
41
- fields: ["marital_status"] /* In case you want to get some additional fields and show in the profile */,
41
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
42
42
  },
43
43
  /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
44
44
  /* calculating its dimensions carefully is of great importance */
@@ -1,4 +1,9 @@
1
1
  const EPQ93 = require("./EPQ93");
2
- class EPQ9A extends EPQ93 {}
2
+
3
+ class EPQ9A extends EPQ93 {
4
+ static partials = {
5
+ EPQ93: "samples/EPQ93.hbs",
6
+ };
7
+ }
3
8
 
4
9
  module.exports = EPQ9A;
@@ -4,6 +4,12 @@ class FACES93 extends Profile {
4
4
  // Number of pages
5
5
  static pages = 2;
6
6
 
7
+ static partials = {
8
+ FACES93_1_partial: "samples/FACES93_1_partial.hbs",
9
+ FACES93_2_1_partial: "samples/FACES93_2_1_partial.hbs",
10
+ FACES93_2_2_partial: "samples/FACES93_2_2_partial.hbs",
11
+ };
12
+
7
13
  // Labels of the sample
8
14
  labels = {
9
15
  L1: {