@baravak/risloo-profile-cli 4.20.0 → 4.22.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baravak/risloo-profile-cli",
3
- "version": "4.20.0",
3
+ "version": "4.22.1",
4
4
  "description": "**Risloo Profile CLI** is a library for creating profiles, reports and sheets for *psychological* samples.",
5
5
  "main": "bin/risloo.js",
6
6
  "publishConfig": {
@@ -0,0 +1,22 @@
1
+ const { FS } = require("../Profile");
2
+
3
+ function gauge(data) {
4
+ data.mark = data.mark ?? 0;
5
+ const circleData = {
6
+ angles: {
7
+ start: FS.toRadians(-90),
8
+ end: FS.toRadians(180),
9
+ },
10
+ direction: false,
11
+ get totalAngle() {
12
+ return this.direction ? 2 * Math.PI - (this.angles.end - this.angles.start) : this.angles.end - this.angles.start;
13
+ },
14
+ };
15
+ return {
16
+ details: data,
17
+ circle: circleData,
18
+ zeta: (data.mark / data.label.max) * circleData.totalAngle + circleData.angles.start,
19
+ };
20
+ }
21
+
22
+ module.exports = gauge;
@@ -0,0 +1,254 @@
1
+ {
2
+ "id": "$X1HEDT78U",
3
+ "scale": {
4
+ "id": "$AAI-93",
5
+ "title": "پرسشنامه سبک‌های دلبستگی بزرگسالان هازن و شیور"
6
+ },
7
+ "chain": null,
8
+ "version": "1",
9
+ "edition": "",
10
+ "edition_version": null,
11
+ "client": {
12
+ "id": "GH96XXYY",
13
+ "name": "مراجع",
14
+ "user_id": "IR96XXYY"
15
+ },
16
+ "room": {
17
+ "id": "RS96XXYY",
18
+ "manager": {
19
+ "id": "GH96XXYY",
20
+ "name": "درمانگر",
21
+ "user_id": "IR96XXYY"
22
+ },
23
+ "center": {
24
+ "id": "RS96XXYY",
25
+ "acceptation": null,
26
+ "status": "active",
27
+ "type": "counseling_center",
28
+ "detail": {
29
+ "title": "مرکز"
30
+ }
31
+ },
32
+ "acceptation": null,
33
+ "status": "active",
34
+ "type": "room"
35
+ },
36
+ "case": null,
37
+ "code": null,
38
+ "created_at": 1748455601,
39
+ "started_at": 1748455611,
40
+ "scored_at": 1748455641,
41
+ "closed_at": 1748455611,
42
+ "total_amount": null,
43
+ "prepayment": false,
44
+ "purchased": true,
45
+ "amount": null,
46
+ "billing": null,
47
+ "description": "پاسخگوی گرامی، این پرسشنامه نوع رابطه و دلبستگی‌های شما را به دیگران (افراد نزدیک مثل مادر، پدر، همسر و دوستان) توصیف می‌کند. هر عبارت را با دقت بخوانید و با در نظر گرفتن وضعیت کلی و عمومی روابط و دلبستگی‌هایتان، پاسخی را که بیش از همه با وضعیت شما مطابقت می‌کند، علامت بزنید.\n\nدر این مقیاس هیچ‌یک از پاسخ‌ها صحیح یا غلط نیستند. ممکن است بعضی از عبارت‌ها کاملاً با ویژگی‌های شما مطابقت نکند اما سعی کنید در این موارد هم گزینه‌ای را که به طور نسبی با خصوصیات شما مطابقت می‌کند علامت بزنید.\n\nاز همکاری شما صمیمانه سپاسگزاریم.",
48
+ "psychologist_description": null,
49
+ "items": [
50
+ {
51
+ "type": "text",
52
+ "text": "نزدیک شدن به دیگران و برقراری روابط صمیمی با آن‌ها برایم آسان است.",
53
+ "answer": {
54
+ "type": "optional",
55
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
56
+ },
57
+ "user_answered": "5"
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "نزدیک شدن به دیگران تا حدودی برایم مشکل و ناراحت کننده است.",
62
+ "answer": {
63
+ "type": "optional",
64
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
65
+ },
66
+ "user_answered": "3"
67
+ },
68
+ {
69
+ "type": "text",
70
+ "text": "وقتی با کسی دوست می‌شوم، می‌خواهم خودم را کاملاً به او بسپارم و با او یکی شوم.",
71
+ "answer": {
72
+ "type": "optional",
73
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
74
+ },
75
+ "user_answered": "1"
76
+ },
77
+ {
78
+ "type": "text",
79
+ "text": "تصور می‌کنم به هنگام نیاز، دیگران به من کمک خواهند کرد.",
80
+ "answer": {
81
+ "type": "optional",
82
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
83
+ },
84
+ "user_answered": "1"
85
+ },
86
+ {
87
+ "type": "text",
88
+ "text": "تصور می‌کنم به هنگام نیاز، کسی به من کمک نخواهد کرد.",
89
+ "answer": {
90
+ "type": "optional",
91
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
92
+ },
93
+ "user_answered": "5"
94
+ },
95
+ {
96
+ "type": "text",
97
+ "text": "نمی‌توانم با اطمینان روی کمک دیگران حساب کنم.",
98
+ "answer": {
99
+ "type": "optional",
100
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
101
+ },
102
+ "user_answered": "4"
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "اتکای به دیگران برایم آسان است.",
107
+ "answer": {
108
+ "type": "optional",
109
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
110
+ },
111
+ "user_answered": "4"
112
+ },
113
+ {
114
+ "type": "text",
115
+ "text": "اتکای به دیگران برایم دشوار است.",
116
+ "answer": {
117
+ "type": "optional",
118
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
119
+ },
120
+ "user_answered": "3"
121
+ },
122
+ {
123
+ "type": "text",
124
+ "text": "غالباً نگرانم که نکند دیگران واقعاً مرا دوست نداشته باشند.",
125
+ "answer": {
126
+ "type": "optional",
127
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
128
+ },
129
+ "user_answered": "3"
130
+ },
131
+ {
132
+ "type": "text",
133
+ "text": "اگر دیگران مرا ترک کنند و تنها بمانم ناراحت نمی‌شوم.",
134
+ "answer": {
135
+ "type": "optional",
136
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
137
+ },
138
+ "user_answered": "1"
139
+ },
140
+ {
141
+ "type": "text",
142
+ "text": "دوست ندارم دیگران زیاد به من نزدیک و با من صمیمی شوند.",
143
+ "answer": {
144
+ "type": "optional",
145
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
146
+ },
147
+ "user_answered": "5"
148
+ },
149
+ {
150
+ "type": "text",
151
+ "text": "دوست دارم دیگران خیلی به من نزدیک شوند، اما آن‌ها اجتناب می‌کنند. ",
152
+ "answer": {
153
+ "type": "optional",
154
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
155
+ },
156
+ "user_answered": "4"
157
+ },
158
+ {
159
+ "type": "text",
160
+ "text": "اعتماد به دیگران برایم آسان است.",
161
+ "answer": {
162
+ "type": "optional",
163
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
164
+ },
165
+ "user_answered": "3"
166
+ },
167
+ {
168
+ "type": "text",
169
+ "text": "اعتماد به دیگران برایم دشوار است.",
170
+ "answer": {
171
+ "type": "optional",
172
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
173
+ },
174
+ "user_answered": "1"
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "غالباً نگرانم که نکند دیگران به همان اندازه که من برایشان ارزش قائل هستم برایم ارزش قائل نباشند.",
179
+ "answer": {
180
+ "type": "optional",
181
+ "options": ["خیلی زیاد", "زیاد", "متوسط", "کم", "خیلی کم"]
182
+ },
183
+ "user_answered": "5"
184
+ }
185
+ ],
186
+ "prerequisites": [
187
+ {
188
+ "type": "text",
189
+ "label": "gender",
190
+ "text": "جنسیت",
191
+ "answer": { "type": "select", "options": ["زن", "مرد"] },
192
+ "alias": "gender",
193
+ "force": true,
194
+ "user_answered": "1"
195
+ },
196
+ {
197
+ "type": "text",
198
+ "label": "age",
199
+ "text": "سن",
200
+ "answer": { "type": "number" },
201
+ "alias": "age",
202
+ "force": true,
203
+ "user_answered": "28"
204
+ },
205
+ {
206
+ "type": "text",
207
+ "label": "education",
208
+ "text": "تحصیلات",
209
+ "answer": {
210
+ "type": "select",
211
+ "options": [
212
+ "ابتدایی اول",
213
+ "ابتدایی دوم",
214
+ "متوسطه اول",
215
+ "متوسطه دوم",
216
+ "دیپلم",
217
+ "کارشناسی",
218
+ "کارشناسی ارشد",
219
+ "پزشکی عمومی",
220
+ "متخصص",
221
+ "دکتری تخصصی",
222
+ "حوزوی مقدمات",
223
+ "حوزوی سطح۱",
224
+ "حوزوی سطح۲",
225
+ "حوزوی سطح۳",
226
+ "حوزوی سطح۴"
227
+ ]
228
+ },
229
+ "alias": "education",
230
+ "force": true,
231
+ "user_answered": "6"
232
+ },
233
+ {
234
+ "type": "text",
235
+ "label": "marital_status",
236
+ "text": "وضعیت تأهل",
237
+ "answer": { "type": "select", "options": ["مجرد", "متأهل"] },
238
+ "alias": "marital_status",
239
+ "force": true,
240
+ "user_answered": "2"
241
+ }
242
+ ],
243
+ "cornometer": 0,
244
+ "score": {
245
+ "secure_raw": 16,
246
+ "secure_percentage": 0.64,
247
+ "avoidant_raw": 13,
248
+ "avoidant_percentage": 0.52,
249
+ "ambivalence_raw": 13,
250
+ "ambivalence_percentage": 0.52
251
+ },
252
+ "score_current_version": "1.0.0",
253
+ "score_last_version": "1.0.0"
254
+ }
@@ -418,11 +418,16 @@
418
418
  ],
419
419
  "cornometer": 0,
420
420
  "score": {
421
- "survival": 22,
422
- "love_belonging": 13,
423
- "power": 23,
424
- "freedom": 22,
425
- "fun": 20
421
+ "survival_raw": 22,
422
+ "survival_percentage": 0.63,
423
+ "love_belonging_raw": 13,
424
+ "love_belonging_percentage": 0.37,
425
+ "power_raw": 23,
426
+ "power_percentage": 0.66,
427
+ "freedom_raw": 22,
428
+ "freedom_percentage": 0.63,
429
+ "fun_raw": 20,
430
+ "fun_percentage": 0.57
426
431
  },
427
432
  "score_current_version": "1.0.0",
428
433
  "score_last_version": "1.0.0"
@@ -0,0 +1,70 @@
1
+ const { Profile, FS } = require("../Profile");
2
+ const polygonXY = require("../helpers/polygonXY");
3
+ const polygonDefaultStart = require("../helpers/polygonDefaultStart");
4
+ const round = require("../handlebars/helpers/round");
5
+ const gauge = require("../helpers/gauge");
6
+
7
+ class AAI93 extends Profile {
8
+ // Number of pages
9
+ static pages = 1;
10
+
11
+ // Labels of the sample
12
+ labels = {
13
+ L1_1: {eng: 'secure_raw', fa: 'دلبستگی ایمن', primary: '#65A30D', secondary: '#A3E635', max: 25},
14
+ L1_2: {eng: 'secure_percentage'},
15
+ L2_1: {eng: 'ambivalence_raw', fa: 'دلبستگی دوسوگرا', primary: '#EA580C', secondary: '#FB923C', max: 25},
16
+ L2_2: {eng: 'ambivalence_percentage'},
17
+ L3_1: {eng: 'avoidant_raw', fa: 'دلبستگی اجتنابی', primary: '#E11D48', secondary: '#FB7185', max: 25},
18
+ L3_2: {eng: 'avoidant_percentage'},
19
+ };
20
+
21
+ profileSpec = {
22
+ /* "sample" determines some important info about the sample and profile */
23
+ /* Default prerequisites: 1. gender, 2. age, 3. education */
24
+ /* "prerequisites" is synonym to "fields" in our program */
25
+ sample: {
26
+ name: "پرسشنامه سبک‌های دلبستگی بزرگسالان هازن و شیور" /* Name of the sample */,
27
+ multiProfile: false /* Whether the sample has multiple profiles or not */,
28
+ questions: false /* Determines whether to get questions from inital dataset or not */,
29
+ defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
30
+ fields: [] /* In case you want to get some additional fields and show in the profile */,
31
+ },
32
+ /* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
33
+ /* calculating its dimensions carefully is of great importance */
34
+ profile: {
35
+ get dimensions() {
36
+ return {
37
+ width: 599 + 2 * this.padding.x,
38
+ height: 179 + 2 * this.padding.y,
39
+ }
40
+ },
41
+ padding: {
42
+ x: 152,
43
+ y: 267.5,
44
+ },
45
+ },
46
+ /* "raw" is the general term used for total data element in the profile */
47
+ /* "labels" part which has to be provided for each profile */
48
+ labels: Object.values(this.labels),
49
+ };
50
+
51
+ constructor(dataset, options, config = {}) {
52
+ super();
53
+ this._init(dataset, options, config);
54
+ }
55
+
56
+ _calcContext() {
57
+ const {
58
+ spec: { parameters: spec },
59
+ dataset,
60
+ } = this;
61
+
62
+ const scores = dataset.score.filter(score => score.label.eng.includes('_raw')).map((score, index) => ({
63
+ ...gauge(score),
64
+ fill: `url(#${score.label.eng}_gradient)`,
65
+ percentage: Math.round(dataset.score[(index * 2) + 1].mark * 100),
66
+ }))
67
+ return [{ scores }];
68
+ }
69
+ }
70
+ module.exports = AAI93;
@@ -9,11 +9,16 @@ class BNQ93 extends Profile {
9
9
 
10
10
  // Labels of the sample
11
11
  labels = {
12
- L1: {eng: 'survival', fa: 'نیاز به بقاء'},
13
- L2: {eng: 'love_belonging', fa: 'نیاز به عشق و تعلق'},
14
- L3: {eng: 'power', fa: 'نیاز به قدرت'},
15
- L4: {eng: 'freedom', fa: 'نیاز به آزادی'},
16
- L5: {eng: 'fun', fa: 'نیاز به تفریح'},
12
+ L1_1: {eng: 'survival_raw', fa: 'نیاز به بقاء'},
13
+ L1_2: {eng: 'survival_percentage'},
14
+ L2_1: {eng: 'love_belonging_raw', fa: 'نیاز به عشق و تعلق'},
15
+ L2_2: {eng: 'love_belonging_percentage'},
16
+ L3_1: {eng: 'power_raw', fa: 'نیاز به قدرت'},
17
+ L3_2: {eng: 'power_percentage'},
18
+ L4_1: {eng: 'freedom_raw', fa: 'نیاز به آزادی'},
19
+ L4_2: {eng: 'freedom_percentage'},
20
+ L5_1: {eng: 'fun_raw', fa: 'نیاز به تفریح'},
21
+ L5_2: {eng: 'fun_percentage'},
17
22
  };
18
23
 
19
24
  profileSpec = {
@@ -62,13 +67,15 @@ class BNQ93 extends Profile {
62
67
  {r: 112.5, points: polygonXY(0, 0, Array(5).fill(112.5), startAngle)},
63
68
  {r: 67.5, points: polygonXY(0, 0, Array(5).fill(67.5), startAngle)},
64
69
  ]
65
- const points = dataset.score.map(score => (157.5 * score.mark) / 35)
66
- const polygonDots = polygonXY(0,0, points, startAngle)
67
- const polygonArea = polygonDots.map(points => `${round(points[0], 6)},${round(points[1], 6)}`).join(' ')
70
+ const points = []
68
71
  const scores = {}
69
- dataset.score.forEach(score => {
70
- scores[score.label.eng] = {mark: score.mark, label: score.label.fa}
72
+ dataset.score.forEach((score, index) => {
73
+ if(index % 2 !== 0) return
74
+ points.push(157.5 * score.mark / 35)
75
+ scores[score.label.eng.replace('_raw', '')] = {mark: score.mark, label: score.label.fa, percentage: Math.round(dataset.score[index + 1].mark * 100)}
71
76
  })
77
+ const polygonDots = polygonXY(0,0, points, startAngle)
78
+ const polygonArea = polygonDots.map(points => `${round(points[0], 6)},${round(points[1], 6)}`).join(' ')
72
79
  return [{ rs, polygonDots, polygonArea, scores }];
73
80
  }
74
81
  }
@@ -7,31 +7,31 @@ class MMAFD9A extends Profile {
7
7
 
8
8
  // Labels of the sample
9
9
  labels = {
10
- L1: { eng: "problem_solving_raw", fr: "حل مسأله", CoP: 2.2},
10
+ L1: { eng: "problem_solving_raw", fr: "حل مسأله", CoP: 2.2, max: 24},
11
11
  L1_2 : {eng: "problem_solving_avg"},
12
12
  L1_3 : {eng: "problem_solving_report"},
13
13
 
14
- L2: { eng: "roles_raw", fr: "نقش‌ها", CoP: 2.3},
14
+ L2: { eng: "roles_raw", fr: "نقش‌ها", CoP: 2.3, max: 44},
15
15
  L2_2 : {eng: "roles_avg"},
16
16
  L2_3 : {eng: "roles_report"},
17
17
 
18
- L3: { eng: "affective_responsiveness_raw", fr: "پاسخ‌دهی عاطفی", CoP: 2.2},
18
+ L3: { eng: "affective_responsiveness_raw", fr: "پاسخ‌دهی عاطفی", CoP: 2.2, max: 24},
19
19
  L3_2 : {eng: "affective_responsiveness_avg"},
20
20
  L3_3 : {eng: "affective_responsiveness_report"},
21
21
 
22
- L4: { eng: "communication_raw", fr: "ارتباط", CoP: 2.2},
22
+ L4: { eng: "communication_raw", fr: "ارتباط", CoP: 2.2, max: 36},
23
23
  L4_2 : {eng: "communication_avg"},
24
24
  L4_3 : {eng: "communication_report"},
25
25
 
26
- L5: { eng: "affective_involvement_raw", fr: "مشارکت عاطفی", CoP: 2.1},
26
+ L5: { eng: "affective_involvement_raw", fr: "مشارکت عاطفی", CoP: 2.1, max: 28},
27
27
  L5_2 : {eng: "affective_involvement_avg"},
28
28
  L5_3 : {eng: "affective_involvement_report"},
29
29
 
30
- L6: { eng: "behaviour_control_raw", fr: "کنترل رفتار", CoP: 1.9},
30
+ L6: { eng: "behaviour_control_raw", fr: "کنترل رفتار", CoP: 1.9, max: 36},
31
31
  L6_2 : {eng: "behaviour_control_avg"},
32
32
  L6_3 : {eng: "behaviour_control_report"},
33
33
 
34
- L7: { eng: "overall_performance_raw", fr: "کارکرد عمومی", CoP: 2},
34
+ L7: { eng: "overall_performance_raw", fr: "کارکرد عمومی", CoP: 2, max: 48},
35
35
  L7_2 : {eng: "overall_performance_avg"},
36
36
  L7_3 : {eng: "overall_performance_report"},
37
37
  };
@@ -0,0 +1,25 @@
1
+ {{#> layout}}
2
+ <defs>
3
+ {{#each scores as |score|}}
4
+ <linearGradient id="{{details.label.eng}}_gradient" x1="140" y1="0" x2="0" y2="140" gradientUnits="userSpaceOnUse">
5
+ <stop stop-color="{{details.label.secondary}}" />
6
+ <stop offset="0.5" stop-color="{{details.label.primary}}" />
7
+ <stop offset="1" stop-color="{{details.label.primary}}" />
8
+ </linearGradient>
9
+ {{/each}}
10
+ </defs>
11
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
12
+ {{#each scores as |score|}}
13
+ <g transform="translate({{math 70 '+' (math 228.5 '*' @index)}}, 70)">
14
+ {{gauge 70 (math 70 '*' 0.7) (object tl=6 tr=6 bl=6 br=6) (object start=circle.angles.start end=circle.angles.end) direction fill='#F1F5F9'}}
15
+ {{gauge 70 (math 70 '*' 0.7) (object tl=6 tr=0 bl=6 br=0) (object start=circle.angles.start end=zeta) direction fill=fill}}
16
+ <text y="-10" text-anchor="middle" dy=".3em" font-size="28" font-weight="500" fill="{{details.label.primary}}">٪{{percentage}}</text>
17
+ <text y="20" text-anchor="middle" dy=".3em" font-size="18" font-weight="500" fill="{{details.label.primary}}">{{details.mark}}</text>
18
+ <text y="-68" x="-12" text-anchor="middle" dy=".75em" font-size="14" font-weight="500" fill="#64748B">0</text>
19
+ <text y="-14" x="-60" text-anchor="middle" dy=".3em" font-size="14" font-weight="500" fill="#64748B">25</text>
20
+ <text y="86" x="0" text-anchor="middle" dy="1em" font-size="16" font-weight="500" fill="{{details.label.primary}}">{{details.label.fa}}</text>
21
+ </g>
22
+ {{/each}}
23
+ </g>
24
+
25
+ {{/layout}}
@@ -27,25 +27,45 @@
27
27
  <polygon points="{{polygonArea}}" fill="#4F46E533" stroke="#4F46E5" stroke-width="3" />
28
28
  <text x="0" y="169" dy=".35em" text-anchor="middle" font-size="10" font-weight="400" fill="#94A3B8">35</text>
29
29
  <g transform="translate(-30, -210.5)">
30
- <text x="30" y="0" dy=".7em" text-anchor="middle" font-size="16" font-weight="700" fill="#4F46E5">{{scores.survival.mark}}</text>
31
- <text x="30" y="17" dy="1em" text-anchor="middle" font-size="14" font-weight="500" fill="#475569">{{scores.survival.label}}</text>
30
+ <g transform="translate(30, 0)">
31
+ <rect x="0" y="0" width="32" height="18" fill="#F1F5F9" rx="4" stroke="#E2E8F0" stroke-width="1" />
32
+ <text x="16" y="0" dy="1.1em" text-anchor="middle" font-size="12" font-weight="400" fill="#64748B">٪{{scores.survival.percentage}}</text>
33
+ <text x="-6" y="0" dy="0.9em" text-anchor="start" font-size="16" font-weight="700" fill="#4F46E5">{{scores.survival.mark}}</text>
34
+ </g>
35
+ <text x="30" y="0" dy="2.5em" text-anchor="middle" font-size="14" font-weight="500" fill="#475569">{{scores.survival.label}}</text>
32
36
  </g>
33
37
  <g transform="translate(165.5, -107.5)">
34
- <text x="0" y="0" dy=".7em" text-anchor="end" font-size="16" font-weight="700" fill="#4F46E5">{{scores.love_belonging.mark}}</text>
35
- <text x="0" y="17" dy="1em" text-anchor="end" font-size="14" font-weight="500" fill="#475569">نیاز به عشق</text>
36
- <text x="0" y="17" dy="2.5em" text-anchor="end" font-size="14" font-weight="500" fill="#475569">و تعلق</text>
38
+ <g transform="translate(0, 0)">
39
+ <rect x="0" y="0" width="32" height="18" fill="#F1F5F9" rx="4" stroke="#E2E8F0" stroke-width="1" />
40
+ <text x="16" y="0" dy="1.1em" text-anchor="middle" font-size="12" font-weight="400" fill="#64748B">٪{{scores.love_belonging.percentage}}</text>
41
+ <text x="38" y="0" dy="0.9em" text-anchor="end" font-size="16" font-weight="700" fill="#4F46E5">{{scores.love_belonging.mark}}</text>
42
+ </g>
43
+ <text x="0" y="0" dy="2.5em" text-anchor="end" font-size="14" font-weight="500" fill="#475569">نیاز به عشق</text>
44
+ <text x="0" y="0" dy="4em" text-anchor="end" font-size="14" font-weight="500" fill="#475569">و تعلق</text>
37
45
  </g>
38
46
  <g transform="translate(96.5, 141.5)">
39
- <text x="0" y="0" dy=".7em" text-anchor="end" font-size="14" font-weight="500" fill="#475569">نیاز به قدرت</text>
40
- <text x="0" y="17" dy="1em" text-anchor="end" font-size="16" font-weight="700" fill="#4F46E5">{{scores.power.mark}}</text>
47
+ <g transform="translate(0, 26)">
48
+ <rect x="0" y="0" width="32" height="18" fill="#F1F5F9" rx="4" stroke="#E2E8F0" stroke-width="1" />
49
+ <text x="16" y="0" dy="1.1em" text-anchor="middle" font-size="12" font-weight="400" fill="#64748B">٪{{scores.power.percentage}}</text>
50
+ <text x="38" y="0" dy="0.9em" text-anchor="end" font-size="16" font-weight="700" fill="#4F46E5">{{scores.power.mark}}</text>
51
+ </g>
52
+ <text x="0" y="0" dy="1em" text-anchor="end" font-size="14" font-weight="500" fill="#475569">نیاز به قدرت</text>
41
53
  </g>
42
54
  <g transform="translate(-101.5, 141.5)">
43
- <text x="0" y="0" dy=".7em" text-anchor="start" font-size="14" font-weight="500" fill="#475569">نیاز به آزادی</text>
44
- <text x="0" y="17" dy="1em" text-anchor="start" font-size="16" font-weight="700" fill="#4F46E5">{{scores.freedom.mark}}</text>
55
+ <g transform="translate(-32, 26)">
56
+ <rect x="0" y="0" width="32" height="18" fill="#F1F5F9" rx="4" stroke="#E2E8F0" stroke-width="1" />
57
+ <text x="16" y="0" dy="1.1em" text-anchor="middle" font-size="12" font-weight="400" fill="#64748B">٪{{scores.freedom.percentage}}</text>
58
+ <text x="-6" y="0" dy="0.9em" text-anchor="start" font-size="16" font-weight="700" fill="#4F46E5">{{scores.freedom.mark}}</text>
59
+ </g>
60
+ <text x="0" y="0" dy="1em" text-anchor="start" font-size="14" font-weight="500" fill="#475569">نیاز به آزادی</text>
45
61
  </g>
46
62
  <g transform="translate(-165.5, -87.5)">
47
- <text x="0" y="0" dy=".7em" text-anchor="start" font-size="16" font-weight="700" fill="#4F46E5">{{scores.fun.mark}}</text>
48
- <text x="0" y="17" dy="1em" text-anchor="start" font-size="14" font-weight="500" fill="#475569">نیاز به تفریح</text>
63
+ <g transform="translate(-32, 0)">
64
+ <rect x="0" y="0" width="32" height="18" fill="#F1F5F9" rx="4" stroke="#E2E8F0" stroke-width="1" />
65
+ <text x="16" y="0" dy="1.1em" text-anchor="middle" font-size="12" font-weight="400" fill="#64748B">٪{{scores.fun.percentage}}</text>
66
+ <text x="-6" y="0" dy="0.9em" text-anchor="start" font-size="16" font-weight="700" fill="#4F46E5">{{scores.fun.mark}}</text>
67
+ </g>
68
+ <text x="0" y="0" dy="2.5em" text-anchor="start" font-size="14" font-weight="500" fill="#475569">نیاز به تفریح</text>
49
69
  </g>
50
70
  </g>
51
71
  </g>