@baravak/risloo-profile-cli 4.40.3 → 4.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/handlebars/helpers/lineWrap.js +41 -18
- package/src/publish/json/profiles/YMQ93.json +1278 -0
- package/src/samples/YMQ93.js +272 -0
- package/views/profiles/samples/YMQ93_1.hbs +134 -0
- package/views/profiles/samples/YMQ93_2.hbs +133 -0
- package/views/profiles/samples/YMQ93_3.hbs +132 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
const { Profile } = require("../Profile");
|
|
2
|
+
|
|
3
|
+
const colors = {
|
|
4
|
+
baseline: ['#2DD4BF', '#0D9488', '#CCFBF1','#F0FDFA'],
|
|
5
|
+
clinical: ['#C084FC', '#9333EA', '#F3E8FF', '#FAF5FF'],
|
|
6
|
+
personality: ['#818CF8', '#4F46E5', '#E0E7FF', '#EEF2FF']
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class YMQ93 extends Profile {
|
|
11
|
+
// Number of pages
|
|
12
|
+
static pages = 3;
|
|
13
|
+
|
|
14
|
+
// Labels of the sample
|
|
15
|
+
labels = {
|
|
16
|
+
L1: {
|
|
17
|
+
eng: "vulnerable_child_raw",
|
|
18
|
+
short: "VC",
|
|
19
|
+
fa: "کودک آسیبپذیر",
|
|
20
|
+
max: 60,
|
|
21
|
+
norms: {
|
|
22
|
+
baseline: { mean: 1.47, sd: 0.51 },
|
|
23
|
+
clinical: { mean: 2.66, sd: 0.94 },
|
|
24
|
+
personality: { mean: 3.36, sd: 1.11 },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
L1_2 : {eng: "vulnerable_child_mean"},
|
|
28
|
+
L2: {
|
|
29
|
+
eng: "angry_child_raw",
|
|
30
|
+
short: "AC",
|
|
31
|
+
fa: "کودک عصبانی",
|
|
32
|
+
max: 60,
|
|
33
|
+
norms: {
|
|
34
|
+
baseline: { mean: 1.81, sd: 0.48 },
|
|
35
|
+
clinical: { mean: 2.56, sd: 0.9 },
|
|
36
|
+
personality: { mean: 3.09, sd: 0.94 },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
L2_2 : {eng: "angry_child_mean"},
|
|
40
|
+
L3: {
|
|
41
|
+
eng: "engraed_child_raw",
|
|
42
|
+
short: "EC",
|
|
43
|
+
fa: "کودک غضبناک",
|
|
44
|
+
max: 60,
|
|
45
|
+
norms: {
|
|
46
|
+
baseline: { mean: 1.2, sd: 0.29 },
|
|
47
|
+
clinical: { mean: 1.55, sd: 0.67 },
|
|
48
|
+
personality: { mean: 2.05, sd: 0.92 },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
L3_2 : {eng: "engraed_child_mean"},
|
|
52
|
+
L4: {
|
|
53
|
+
eng: "impulsive_child_raw",
|
|
54
|
+
short: "IC",
|
|
55
|
+
fa: "کودک تکانشی",
|
|
56
|
+
max: 54,
|
|
57
|
+
norms: {
|
|
58
|
+
baseline: { mean: 2.15, sd: 0.53 },
|
|
59
|
+
clinical: { mean: 2.46, sd: 0.72 },
|
|
60
|
+
personality: { mean: 3.05, sd: 0.97 },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
L4_2 : {eng: "impulsive_child_mean"},
|
|
64
|
+
L5: {
|
|
65
|
+
eng: "undisciplined_child_raw",
|
|
66
|
+
short: "UC",
|
|
67
|
+
fa: "کودک بیانضباط",
|
|
68
|
+
max: 36,
|
|
69
|
+
norms: {
|
|
70
|
+
baseline: { mean: 2.27, sd: 0.6 },
|
|
71
|
+
clinical: { mean: 2.57, sd: 0.85 },
|
|
72
|
+
personality: { mean: 2.95, sd: 0.94 },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
L5_2 : {eng: "undisciplined_child_mean"},
|
|
76
|
+
L6: {
|
|
77
|
+
eng: "happy_child_raw",
|
|
78
|
+
short: "HC",
|
|
79
|
+
fa: "کودک شاد",
|
|
80
|
+
max: 60,
|
|
81
|
+
norms: {
|
|
82
|
+
baseline: { mean: 4.52, sd: 0.54 },
|
|
83
|
+
clinical: { mean: 3.39, sd: 0.87 },
|
|
84
|
+
personality: { mean: 2.88, sd: 0.77 },
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
L6_2 : {eng: "happy_child_mean"},
|
|
88
|
+
|
|
89
|
+
L7: {
|
|
90
|
+
eng: "compliant_surrender_raw",
|
|
91
|
+
short: "CS",
|
|
92
|
+
fa: "تسلیمشده مطیع",
|
|
93
|
+
max: 42,
|
|
94
|
+
norms: {
|
|
95
|
+
baseline: { mean: 2.51, sd: 0.56 },
|
|
96
|
+
clinical: { mean: 3, sd: 0.88 },
|
|
97
|
+
personality: { mean: 3.32, sd: 0.95 },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
L7_2 : {eng: "compliant_surrender_mean"},
|
|
101
|
+
L8: {
|
|
102
|
+
eng: "detached_protector_raw",
|
|
103
|
+
short: "DP",
|
|
104
|
+
fa: "محافظ بیتفاوت",
|
|
105
|
+
max: 54,
|
|
106
|
+
norms: {
|
|
107
|
+
baseline: { mean: 1.59, sd: 0.52 },
|
|
108
|
+
clinical: { mean: 2.35, sd: 0.94 },
|
|
109
|
+
personality: { mean: 2.95, sd: 0.94 },
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
L8_2 : {eng: "detached_protector_mean"},
|
|
113
|
+
L9: {
|
|
114
|
+
eng: "detached_self_soother_raw",
|
|
115
|
+
short: "DS",
|
|
116
|
+
fa: "خود آرامبخش بیتفاوت",
|
|
117
|
+
max: 24,
|
|
118
|
+
norms: {
|
|
119
|
+
baseline: { mean: 1.93, sd: 0.65 },
|
|
120
|
+
clinical: { mean: 3, sd: 0.91 },
|
|
121
|
+
personality: { mean: 3.32, sd: 0.98 },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
L9_2 : {eng: "detached_self_soother_mean"},
|
|
125
|
+
L10: {
|
|
126
|
+
eng: "self_aggrandizer_raw",
|
|
127
|
+
short: "SA",
|
|
128
|
+
fa: "خود بزرگمنش",
|
|
129
|
+
max: 60,
|
|
130
|
+
norms: {
|
|
131
|
+
baseline: { mean: 2.31, sd: 0.59 },
|
|
132
|
+
clinical: { mean: 2.47, sd: 0.76 },
|
|
133
|
+
personality: { mean: 2.63, sd: 0.87 },
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
L10_2 : {eng: "self_aggrandizer_mean"},
|
|
137
|
+
L11: {
|
|
138
|
+
eng: "bully_and_attack_raw",
|
|
139
|
+
short: "BA",
|
|
140
|
+
fa: "زورگو و تهاجمی",
|
|
141
|
+
max: 54,
|
|
142
|
+
norms: {
|
|
143
|
+
baseline: { mean: 1.72, sd: 0.51 },
|
|
144
|
+
clinical: { mean: 1.91, sd: 0.68 },
|
|
145
|
+
personality: { mean: 2.21, sd: 0.77 },
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
L11_2 : {eng: "bully_and_attack_mean"},
|
|
149
|
+
|
|
150
|
+
L12: {
|
|
151
|
+
eng: "punishing_parent_raw",
|
|
152
|
+
short: "PP",
|
|
153
|
+
fa: "والد تنبیهگر",
|
|
154
|
+
max: 60,
|
|
155
|
+
norms: {
|
|
156
|
+
baseline: { mean: 1.47, sd: 0.39 },
|
|
157
|
+
clinical: { mean: 2.16, sd: 0.9 },
|
|
158
|
+
personality: { mean: 2.75, sd: 0.97 },
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
L12_2 : {eng: "punishing_parent_mean"},
|
|
162
|
+
L13: {
|
|
163
|
+
eng: "demanding_parent_raw",
|
|
164
|
+
short: "DP",
|
|
165
|
+
fa: "والد پرتوقع",
|
|
166
|
+
max: 60,
|
|
167
|
+
norms: {
|
|
168
|
+
baseline: { mean: 3.06, sd: 0.6 },
|
|
169
|
+
clinical: { mean: 3.5, sd: 0.85 },
|
|
170
|
+
personality: { mean: 3.71, sd: 0.9 },
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
L13_2 : {eng: "demanding_parent_mean"},
|
|
174
|
+
L14: {
|
|
175
|
+
eng: "healthy_adult_raw",
|
|
176
|
+
short: "HA",
|
|
177
|
+
fa: "بزرگسال سالم",
|
|
178
|
+
max: 60,
|
|
179
|
+
norms: {
|
|
180
|
+
baseline: { mean: 4.6, sd: 0.56 },
|
|
181
|
+
clinical: { mean: 3.99, sd: 0.8 },
|
|
182
|
+
personality: { mean: 3.6, sd: 0.83 },
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
L14_2 : {eng: "healthy_adult_mean"},
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
profileSpec = {
|
|
189
|
+
/* "sample" determines some important info about the sample and profile */
|
|
190
|
+
/* Default prerequisites: 1. gender, 2. age, 3. education */
|
|
191
|
+
/* "prerequisites" is synonym to "fields" in our program */
|
|
192
|
+
sample: {
|
|
193
|
+
name: "پرسشنامه سلامت عمومی" /* Name of the sample */,
|
|
194
|
+
multiProfile: false /* Whether the sample has multiple profiles or not */,
|
|
195
|
+
questions: false /* Determines whether to get questions from inital dataset or not */,
|
|
196
|
+
defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
|
|
197
|
+
fields: [] /* In case you want to get some additional fields and show in the profile */,
|
|
198
|
+
},
|
|
199
|
+
/* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
|
|
200
|
+
/* calculating its dimensions carefully is of great importance */
|
|
201
|
+
profile: {
|
|
202
|
+
get dimensions() {
|
|
203
|
+
return {
|
|
204
|
+
width: 899 + 2 * this.padding.x,
|
|
205
|
+
height: 682 + 2 * this.padding.y,
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
padding: {
|
|
209
|
+
x: 2,
|
|
210
|
+
y: 16,
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
/* "labels" part which has to be provided for each profile */
|
|
215
|
+
labels: Object.values(this.labels),
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
constructor(dataset, options, config = {}) {
|
|
219
|
+
super();
|
|
220
|
+
this._init(dataset, options, config);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
_calcContext() {
|
|
224
|
+
const {
|
|
225
|
+
dataset,
|
|
226
|
+
} = this;
|
|
227
|
+
const items = []
|
|
228
|
+
for(let i = 0; i < 28; i+=2){
|
|
229
|
+
const item = dataset.score[i]
|
|
230
|
+
const norms = []
|
|
231
|
+
Object.entries(item.label.norms).forEach(([key, value]) => {
|
|
232
|
+
norms.push(entries(key, value))
|
|
233
|
+
})
|
|
234
|
+
items.push({
|
|
235
|
+
mark: item.mark ?? 0,
|
|
236
|
+
mean: dataset.score[i+1].mark ?? 0,
|
|
237
|
+
meanText: (Math.round((dataset.score[i+1].mark ?? 0) * 10) / 10).toString().replace(".", "٬"),
|
|
238
|
+
label: {
|
|
239
|
+
...item.label,
|
|
240
|
+
norms
|
|
241
|
+
}
|
|
242
|
+
})
|
|
243
|
+
}
|
|
244
|
+
return [
|
|
245
|
+
{ titleAppend: ' - 1', colors, items: items.slice(0, 6) },
|
|
246
|
+
{
|
|
247
|
+
titleAppend: ' - 2', colors, items: items.slice(6, 11)
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
titleAppend: ' - 3', colors, items: items.slice(11, 14)
|
|
251
|
+
}
|
|
252
|
+
];
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
function entries(key, value){
|
|
256
|
+
const mean = value.mean - 1
|
|
257
|
+
const start = ((mean - value.sd) * 100) + 9
|
|
258
|
+
const end = ((value.sd + mean) * 100) + 1
|
|
259
|
+
return {
|
|
260
|
+
mean: value.mean,
|
|
261
|
+
sd: value.sd,
|
|
262
|
+
meanText: value.mean.toString().replace(".", "٬"),
|
|
263
|
+
sdText: value.sd.toString().replace(".", "٬"),
|
|
264
|
+
pixels: {
|
|
265
|
+
start: Math.max(9, start),
|
|
266
|
+
width: end - start
|
|
267
|
+
},
|
|
268
|
+
colors: colors[key],
|
|
269
|
+
key
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
module.exports = YMQ93;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<filter id="li" x="0" y="0" width="7" height="606" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
4
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
5
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
6
|
+
<feOffset dx="1"/>
|
|
7
|
+
<feGaussianBlur stdDeviation="1.5"/>
|
|
8
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
9
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
|
|
10
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4717_118407"/>
|
|
11
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4717_118407" result="shape"/>
|
|
12
|
+
</filter>
|
|
13
|
+
{{#each colors as | color key | }}
|
|
14
|
+
<linearGradient id="{{key}}L" y1="10" y2="10">
|
|
15
|
+
<stop stop-color="{{color.[2]}}"/>
|
|
16
|
+
<stop offset="1" stop-color="{{color.[3]}}" opacity="0.5"/>
|
|
17
|
+
</linearGradient>
|
|
18
|
+
<linearGradient id="{{key}}R" y1="10" y2="10">
|
|
19
|
+
<stop stop-color="{{color.[3]}}" opacity="0.5" />
|
|
20
|
+
<stop offset="1" stop-color="{{color.[2]}}"/>
|
|
21
|
+
</linearGradient>
|
|
22
|
+
<linearGradient id="{{key}}I" x1="32.5" y1="9" x2="0.5" y2="9" gradientUnits="userSpaceOnUse">
|
|
23
|
+
<stop stop-color="{{color.[3]}}" stop-opacity="0.5"/>
|
|
24
|
+
<stop offset="0.5" stop-color="{{color.[2]}}"/>
|
|
25
|
+
<stop offset="1" stop-color="{{color.[3]}}" stop-opacity="0.5"/>
|
|
26
|
+
</linearGradient>
|
|
27
|
+
{{/each}}
|
|
28
|
+
</defs>
|
|
29
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
30
|
+
<g>
|
|
31
|
+
<text x="48.5" y="1" text-anchor="middle" dy=".85em" font-size="12" font-weight="400" fill="#94A3B8">
|
|
32
|
+
<tspan>
|
|
33
|
+
انحراف
|
|
34
|
+
</tspan>
|
|
35
|
+
<tspan x="48.5" dy="1em">
|
|
36
|
+
معیار
|
|
37
|
+
</tspan>
|
|
38
|
+
</text>
|
|
39
|
+
<text x="104" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">میانگین</text>
|
|
40
|
+
<text x="866" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">نمره خام</text>
|
|
41
|
+
<path d="M 838 3.5 v 7 m 0 0 l 3 -3 m -3 3 l -3 -3" stroke="#94A3B8" stroke-width="0.75" stroke-linecap="round" stroke-linejoin="round"/>
|
|
42
|
+
<rect y="121" width="899" height="100" fill="#F8FAFC" rx="12" />
|
|
43
|
+
<rect y="321" width="899" height="100" fill="#F8FAFC" rx="12" />
|
|
44
|
+
<rect y="521" width="899" height="100" fill="#F8FAFC" rx="12" />
|
|
45
|
+
<text x="322" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">1</text>
|
|
46
|
+
<line x1="321.5" y1="20.5" x2="321.5" y2="620" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
47
|
+
|
|
48
|
+
<text x="422" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">2</text>
|
|
49
|
+
<line x1="421.5" y1="20.5" x2="421.5" y2="620" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
50
|
+
|
|
51
|
+
<text x="522" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">3</text>
|
|
52
|
+
<line x1="521.5" y1="20.5" x2="521.5" y2="620" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
53
|
+
|
|
54
|
+
<text x="622" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">4</text>
|
|
55
|
+
<line x1="621.5" y1="20.5" x2="621.5" y2="620" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
56
|
+
|
|
57
|
+
<text x="722" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">5</text>
|
|
58
|
+
<line x1="721.5" y1="20.5" x2="721.5" y2="620" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
59
|
+
|
|
60
|
+
<text x="822" y="7" text-anchor="start" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">6</text>
|
|
61
|
+
<line x1="821.5" y1="20.5" x2="821.5" y2="620" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
62
|
+
<g transform="translate(0, 21)">
|
|
63
|
+
{{#each items as | item index |}}
|
|
64
|
+
<g transform="translate(0, {{math index '*' 100}})">
|
|
65
|
+
<g transform="translate(24, 16)">
|
|
66
|
+
{{#each label.norms as | norm ni |}}
|
|
67
|
+
<g transform="translate(0, {{math 24 '*' ni}})">
|
|
68
|
+
<rect width="48" height="20" fill="url(#{{norm.key}}R)" rx="4" />
|
|
69
|
+
<text x="24" y="10" text-anchor="middle" dy="0.3em" font-size="13" font-weight="400" fill="{{norm.colors.[1]}}">{{norm.sdText}}</text>
|
|
70
|
+
|
|
71
|
+
<rect x="56" width="48" height="20" fill="url(#{{norm.key}}L)" rx="4" />
|
|
72
|
+
<text x="80" y="10" text-anchor="middle" dy="0.3em" font-size="13" font-weight="400" fill="{{norm.colors.[1]}}">{{norm.meanText}}</text>
|
|
73
|
+
</g>
|
|
74
|
+
{{/each}}
|
|
75
|
+
</g>
|
|
76
|
+
<g transform="translate(312, 36)">
|
|
77
|
+
<rect width="510" height="28" fill="#E2E8F0" opacity=".75" />
|
|
78
|
+
{{bar (math 10 '+' (math (math item.mean '-1') '*' 100)) 28 (object tr=2 br=2 tl=0 bl=0) (toRad 0) fill="#475569"}}
|
|
79
|
+
<text x="{{math 10 '+' (math (math item.mean '-1') '*' 100)}}" y="-13" text-anchor="middle" dy="0.3em" font-size="16" font-weight="600" fill="{{norm.colors.[1]}}">{{meanText}}</text>
|
|
80
|
+
<text x="-9" y="14" text-anchor="start" dy="0.3em" font-size="13" font-weight="400" fill="#475569">{{label.short}}</text>
|
|
81
|
+
<text x="-35" y="14" text-anchor="start" dy="0.3em" font-size="13" font-weight="400" fill="#475569">-</text>
|
|
82
|
+
<text x="-46" y="14" text-anchor="start" dy="0.3em" font-size="13" font-weight="400" fill="#475569">{{label.fa}}</text>
|
|
83
|
+
<text x="522" y="14" text-anchor="start" dy="0.3em" font-size="12" font-weight="300" fill="#64748B" direction="ltr">
|
|
84
|
+
<tspan font-size="18" font-weight="600" fill="#1E293B">{{mark}}</tspan>
|
|
85
|
+
<tspan>/</tspan>
|
|
86
|
+
<tspan font-size="13" font-weight="400">{{label.max}}</tspan>
|
|
87
|
+
</text>
|
|
88
|
+
<g transform="translate(0, 3)">
|
|
89
|
+
{{#each label.norms as | norm ni |}}
|
|
90
|
+
<g transform="translate({{norm.pixels.start}}, {{math 8 '*' ni}})">
|
|
91
|
+
<rect width="2" height="6" fill="{{norm.colors.[0]}}" />
|
|
92
|
+
<rect y="2" width="{{norm.pixels.width}}" height="2" fill="{{norm.colors.[0]}}" />
|
|
93
|
+
<circle cx="{{math (math norm.pixels.width '/' 2) '-' 3}}" cy="3" r="3" fill="{{norm.colors.[0]}}" />
|
|
94
|
+
<rect x="{{math norm.pixels.width '-' 2}}" width="2" height="6" fill="{{norm.colors.[0]}}" />
|
|
95
|
+
</g>
|
|
96
|
+
{{/each}}
|
|
97
|
+
</g>
|
|
98
|
+
</g>
|
|
99
|
+
</g>
|
|
100
|
+
{{/each}}
|
|
101
|
+
</g>
|
|
102
|
+
<g transform="translate(309, 17.5)" opacity="0.5" filter="url(#li)">
|
|
103
|
+
<line x1="2.5" y1="3.5" x2="2.5" y2="602.5" stroke="white" stroke-linecap="round"/>
|
|
104
|
+
</g>
|
|
105
|
+
</g>
|
|
106
|
+
<g transform="translate(164, 650)">
|
|
107
|
+
<rect width="571" height="32" fill="none" stroke="#E2E8F0" rx="16" />
|
|
108
|
+
<g transform="translate(167, 7)">
|
|
109
|
+
<rect width="32" height="18" fill="url(#personalityI)" />
|
|
110
|
+
<rect y="6" width="2" height="6" fill="{{colors.personality.[0]}}" />
|
|
111
|
+
<rect x="0" y="8" width="32" height="2" fill="{{colors.personality.[0]}}" />
|
|
112
|
+
<circle r="3" cx="16" cy="9" fill="{{colors.personality.[0]}}" />
|
|
113
|
+
<rect x="30" y="6" width="2" height="6" fill="{{colors.personality.[0]}}" />
|
|
114
|
+
<text x="-6" y="9" text-anchor="start" dy="0.3em" font-size="11" font-weight="400" fill="#57534E">هنجار گروه اختلالات شخصیت</text>
|
|
115
|
+
</g>
|
|
116
|
+
<g transform="translate(359, 7)">
|
|
117
|
+
<rect width="32" height="18" fill="url(#clinicalI)" />
|
|
118
|
+
<rect y="6" width="2" height="6" fill="{{colors.clinical.[0]}}" />
|
|
119
|
+
<rect x="0" y="8" width="32" height="2" fill="{{colors.clinical.[0]}}" />
|
|
120
|
+
<circle r="3" cx="16" cy="9" fill="{{colors.clinical.[0]}}" />
|
|
121
|
+
<rect x="30" y="6" width="2" height="6" fill="{{colors.clinical.[0]}}" />
|
|
122
|
+
<text x="-6" y="9" text-anchor="start" dy="0.3em" font-size="11" font-weight="400" fill="#57534E">هنجار گروه اختلالات بالینی</text>
|
|
123
|
+
</g>
|
|
124
|
+
<g transform="translate(507, 7)">
|
|
125
|
+
<rect width="32" height="18" fill="url(#baselineI)" />
|
|
126
|
+
<rect y="6" width="2" height="6" fill="{{colors.baseline.[0]}}" />
|
|
127
|
+
<rect x="0" y="8" width="32" height="2" fill="{{colors.baseline.[0]}}" />
|
|
128
|
+
<circle r="3" cx="16" cy="9" fill="{{colors.baseline.[0]}}" />
|
|
129
|
+
<rect x="30" y="6" width="2" height="6" fill="{{colors.baseline.[0]}}" />
|
|
130
|
+
<text x="-6" y="9" text-anchor="start" dy="0.3em" font-size="11" font-weight="400" fill="#57534E">هنجار گروه سالم</text>
|
|
131
|
+
</g>
|
|
132
|
+
</g>
|
|
133
|
+
</g>
|
|
134
|
+
{{/layout}}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<filter id="li" x="0" y="0" width="7" height="506" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
4
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
5
|
+
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
6
|
+
<feOffset dx="1"/>
|
|
7
|
+
<feGaussianBlur stdDeviation="1.5"/>
|
|
8
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
9
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
|
|
10
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4717_118624"/>
|
|
11
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4717_118624" result="shape"/>
|
|
12
|
+
</filter>
|
|
13
|
+
{{#each colors as | color key | }}
|
|
14
|
+
<linearGradient id="{{key}}L" y1="10" y2="10">
|
|
15
|
+
<stop stop-color="{{color.[2]}}"/>
|
|
16
|
+
<stop offset="1" stop-color="{{color.[3]}}" opacity="0.5"/>
|
|
17
|
+
</linearGradient>
|
|
18
|
+
<linearGradient id="{{key}}R" y1="10" y2="10">
|
|
19
|
+
<stop stop-color="{{color.[3]}}" opacity="0.5" />
|
|
20
|
+
<stop offset="1" stop-color="{{color.[2]}}"/>
|
|
21
|
+
</linearGradient>
|
|
22
|
+
<linearGradient id="{{key}}I" x1="32.5" y1="9" x2="0.5" y2="9" gradientUnits="userSpaceOnUse">
|
|
23
|
+
<stop stop-color="{{color.[3]}}" stop-opacity="0.5"/>
|
|
24
|
+
<stop offset="0.5" stop-color="{{color.[2]}}"/>
|
|
25
|
+
<stop offset="1" stop-color="{{color.[3]}}" stop-opacity="0.5"/>
|
|
26
|
+
</linearGradient>
|
|
27
|
+
{{/each}}
|
|
28
|
+
</defs>
|
|
29
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
30
|
+
<g transform="translate(0, 64)">
|
|
31
|
+
<text x="48.5" y="1" text-anchor="middle" dy=".85em" font-size="12" font-weight="400" fill="#94A3B8">
|
|
32
|
+
<tspan>
|
|
33
|
+
انحراف
|
|
34
|
+
</tspan>
|
|
35
|
+
<tspan x="48.5" dy="1em">
|
|
36
|
+
معیار
|
|
37
|
+
</tspan>
|
|
38
|
+
</text>
|
|
39
|
+
<text x="104" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">میانگین</text>
|
|
40
|
+
<text x="866" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">نمره خام</text>
|
|
41
|
+
<path d="M 838 3.5 v 7 m 0 0 l 3 -3 m -3 3 l -3 -3" stroke="#94A3B8" stroke-width="0.75" stroke-linecap="round" stroke-linejoin="round"/>
|
|
42
|
+
<rect y="121" width="899" height="100" fill="#F8FAFC" rx="12" />
|
|
43
|
+
<rect y="321" width="899" height="100" fill="#F8FAFC" rx="12" />
|
|
44
|
+
<text x="322" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">1</text>
|
|
45
|
+
<line x1="321.5" y1="20.5" x2="321.5" y2="520" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
46
|
+
|
|
47
|
+
<text x="422" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">2</text>
|
|
48
|
+
<line x1="421.5" y1="20.5" x2="421.5" y2="520" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
49
|
+
|
|
50
|
+
<text x="522" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">3</text>
|
|
51
|
+
<line x1="521.5" y1="20.5" x2="521.5" y2="520" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
52
|
+
|
|
53
|
+
<text x="622" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">4</text>
|
|
54
|
+
<line x1="621.5" y1="20.5" x2="621.5" y2="520" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
55
|
+
|
|
56
|
+
<text x="722" y="7" text-anchor="middle" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">5</text>
|
|
57
|
+
<line x1="721.5" y1="20.5" x2="721.5" y2="520" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
58
|
+
|
|
59
|
+
<text x="822" y="7" text-anchor="start" dy="0.3em" font-size="12" font-weight="400" fill="#94A3B8">6</text>
|
|
60
|
+
<line x1="821.5" y1="20.5" x2="821.5" y2="520" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
61
|
+
<g transform="translate(0, 21)">
|
|
62
|
+
{{#each items as | item index |}}
|
|
63
|
+
<g transform="translate(0, {{math index '*' 100}})">
|
|
64
|
+
<g transform="translate(24, 16)">
|
|
65
|
+
{{#each label.norms as | norm ni |}}
|
|
66
|
+
<g transform="translate(0, {{math 24 '*' ni}})">
|
|
67
|
+
<rect width="48" height="20" fill="url(#{{norm.key}}R)" rx="4" />
|
|
68
|
+
<text x="24" y="10" text-anchor="middle" dy="0.3em" font-size="13" font-weight="400" fill="{{norm.colors.[1]}}">{{norm.sdText}}</text>
|
|
69
|
+
|
|
70
|
+
<rect x="56" width="48" height="20" fill="url(#{{norm.key}}L)" rx="4" />
|
|
71
|
+
<text x="80" y="10" text-anchor="middle" dy="0.3em" font-size="13" font-weight="400" fill="{{norm.colors.[1]}}">{{norm.meanText}}</text>
|
|
72
|
+
</g>
|
|
73
|
+
{{/each}}
|
|
74
|
+
</g>
|
|
75
|
+
<g transform="translate(312, 36)">
|
|
76
|
+
<rect width="510" height="28" fill="#E2E8F0" opacity=".75" />
|
|
77
|
+
{{bar (math 10 '+' (math (math item.mean '-1') '*' 100)) 28 (object tr=2 br=2 tl=0 bl=0) (toRad 0) fill="#475569"}}
|
|
78
|
+
<text x="{{math 10 '+' (math (math item.mean '-1') '*' 100)}}" y="-13" text-anchor="middle" dy="0.3em" font-size="16" font-weight="600" fill="{{norm.colors.[1]}}">{{meanText}}</text>
|
|
79
|
+
<text x="-9" y="14" text-anchor="start" dy="0.3em" font-size="13" font-weight="400" fill="#475569">{{label.short}}</text>
|
|
80
|
+
<text x="-35" y="14" text-anchor="start" dy="0.3em" font-size="13" font-weight="400" fill="#475569">-</text>
|
|
81
|
+
<text x="-46" y="14" text-anchor="start" dy="0.3em" font-size="13" font-weight="400" fill="#475569">{{label.fa}}</text>
|
|
82
|
+
<text x="522" y="14" text-anchor="start" dy="0.3em" font-size="12" font-weight="300" fill="#64748B" direction="ltr">
|
|
83
|
+
<tspan font-size="18" font-weight="600" fill="#1E293B">{{mark}}</tspan>
|
|
84
|
+
<tspan>/</tspan>
|
|
85
|
+
<tspan font-size="13" font-weight="400">{{label.max}}</tspan>
|
|
86
|
+
</text>
|
|
87
|
+
<g transform="translate(0, 3)">
|
|
88
|
+
{{#each label.norms as | norm ni |}}
|
|
89
|
+
<g transform="translate({{norm.pixels.start}}, {{math 8 '*' ni}})">
|
|
90
|
+
<rect width="2" height="6" fill="{{norm.colors.[0]}}" />
|
|
91
|
+
<rect y="2" width="{{norm.pixels.width}}" height="2" fill="{{norm.colors.[0]}}" />
|
|
92
|
+
<circle cx="{{math (math norm.pixels.width '/' 2) '-' 3}}" cy="3" r="3" fill="{{norm.colors.[0]}}" />
|
|
93
|
+
<rect x="{{math norm.pixels.width '-' 2}}" width="2" height="6" fill="{{norm.colors.[0]}}" />
|
|
94
|
+
</g>
|
|
95
|
+
{{/each}}
|
|
96
|
+
</g>
|
|
97
|
+
</g>
|
|
98
|
+
</g>
|
|
99
|
+
{{/each}}
|
|
100
|
+
</g>
|
|
101
|
+
<g transform="translate(309, 17.5)" opacity="0.5" filter="url(#li)">
|
|
102
|
+
<line x1="2.5" y1="3.5" x2="2.5" y2="502.5" stroke="white" stroke-linecap="round"/>
|
|
103
|
+
</g>
|
|
104
|
+
</g>
|
|
105
|
+
<g transform="translate(164, 650)">
|
|
106
|
+
<rect width="571" height="32" fill="none" stroke="#E2E8F0" rx="16" />
|
|
107
|
+
<g transform="translate(167, 7)">
|
|
108
|
+
<rect width="32" height="18" fill="url(#personalityI)" />
|
|
109
|
+
<rect y="6" width="2" height="6" fill="{{colors.personality.[0]}}" />
|
|
110
|
+
<rect x="0" y="8" width="32" height="2" fill="{{colors.personality.[0]}}" />
|
|
111
|
+
<circle r="3" cx="16" cy="9" fill="{{colors.personality.[0]}}" />
|
|
112
|
+
<rect x="30" y="6" width="2" height="6" fill="{{colors.personality.[0]}}" />
|
|
113
|
+
<text x="-6" y="9" text-anchor="start" dy="0.3em" font-size="11" font-weight="400" fill="#57534E">هنجار گروه اختلالات شخصیت</text>
|
|
114
|
+
</g>
|
|
115
|
+
<g transform="translate(359, 7)">
|
|
116
|
+
<rect width="32" height="18" fill="url(#clinicalI)" />
|
|
117
|
+
<rect y="6" width="2" height="6" fill="{{colors.clinical.[0]}}" />
|
|
118
|
+
<rect x="0" y="8" width="32" height="2" fill="{{colors.clinical.[0]}}" />
|
|
119
|
+
<circle r="3" cx="16" cy="9" fill="{{colors.clinical.[0]}}" />
|
|
120
|
+
<rect x="30" y="6" width="2" height="6" fill="{{colors.clinical.[0]}}" />
|
|
121
|
+
<text x="-6" y="9" text-anchor="start" dy="0.3em" font-size="11" font-weight="400" fill="#57534E">هنجار گروه اختلالات بالینی</text>
|
|
122
|
+
</g>
|
|
123
|
+
<g transform="translate(507, 7)">
|
|
124
|
+
<rect width="32" height="18" fill="url(#baselineI)" />
|
|
125
|
+
<rect y="6" width="2" height="6" fill="{{colors.baseline.[0]}}" />
|
|
126
|
+
<rect x="0" y="8" width="32" height="2" fill="{{colors.baseline.[0]}}" />
|
|
127
|
+
<circle r="3" cx="16" cy="9" fill="{{colors.baseline.[0]}}" />
|
|
128
|
+
<rect x="30" y="6" width="2" height="6" fill="{{colors.baseline.[0]}}" />
|
|
129
|
+
<text x="-6" y="9" text-anchor="start" dy="0.3em" font-size="11" font-weight="400" fill="#57534E">هنجار گروه سالم</text>
|
|
130
|
+
</g>
|
|
131
|
+
</g>
|
|
132
|
+
</g>
|
|
133
|
+
{{/layout}}
|