@baravak/risloo-profile-cli 4.3.5 → 4.4.2
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/Gift.js +2 -0
- package/src/handlebars/importPartials.js +1 -0
- package/src/publish/json/profiles/YPI93.json +2498 -0
- package/src/samples/YPI93.js +350 -0
- package/views/gift.hbs +1 -1
- package/views/profiles/samples/YPI93_1.hbs +81 -0
- package/views/profiles/samples/YPI93_2.hbs +69 -0
- package/views/profiles/samples/YPI93_factors.hbs +45 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
const { Profile } = require("../Profile");
|
|
2
|
+
class YPI93 extends Profile {
|
|
3
|
+
// Number of pages
|
|
4
|
+
static pages = 2;
|
|
5
|
+
|
|
6
|
+
// Labels of the sample
|
|
7
|
+
labels = {
|
|
8
|
+
L1_fs: { eng: "ab_father_score", group: 1},
|
|
9
|
+
L1_fp: { eng: "ab_father_percentage", group: 1},
|
|
10
|
+
L1_ms: { eng: "ab_mother_score", group: 1},
|
|
11
|
+
L1_mp: { eng: "ab_mother_percentage", group: 1},
|
|
12
|
+
|
|
13
|
+
L2_fs: { eng: "ma_father_score", group: 1},
|
|
14
|
+
L2_fp: { eng: "ma_father_percentage", group: 1},
|
|
15
|
+
L2_ms: { eng: "ma_mother_score", group: 1},
|
|
16
|
+
L2_mp: { eng: "ma_mother_percentage", group: 1},
|
|
17
|
+
|
|
18
|
+
L3_fs: { eng: "ed_father_score", group: 1},
|
|
19
|
+
L3_fp: { eng: "ed_father_percentage", group: 1},
|
|
20
|
+
L3_ms: { eng: "ed_mother_score", group: 1},
|
|
21
|
+
L3_mp: { eng: "ed_mother_percentage", group: 1},
|
|
22
|
+
|
|
23
|
+
L4_fs: { eng: "ds_father_score", group: 1},
|
|
24
|
+
L4_fp: { eng: "ds_father_percentage", group: 1},
|
|
25
|
+
L4_ms: { eng: "ds_mother_score", group: 1},
|
|
26
|
+
L4_mp: { eng: "ds_mother_percentage", group: 1},
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
L5_fs: { eng: "ai_father_score", group: 2},
|
|
30
|
+
L5_fp: { eng: "ai_father_percentage", group: 2},
|
|
31
|
+
L5_ms: { eng: "ai_mother_score", group: 2},
|
|
32
|
+
L5_mp: { eng: "ai_mother_percentage", group: 2},
|
|
33
|
+
|
|
34
|
+
L6_fs: { eng: "vu_father_score", group: 2},
|
|
35
|
+
L6_fp: { eng: "vu_father_percentage", group: 2},
|
|
36
|
+
L6_ms: { eng: "vu_mother_score", group: 2},
|
|
37
|
+
L6_mp: { eng: "vu_mother_percentage", group: 2},
|
|
38
|
+
|
|
39
|
+
L7_fs: { eng: "eu_father_score", group: 2},
|
|
40
|
+
L7_fp: { eng: "eu_father_percentage", group: 2},
|
|
41
|
+
L7_ms: { eng: "eu_mother_score", group: 2},
|
|
42
|
+
L7_mp: { eng: "eu_mother_percentage", group: 2},
|
|
43
|
+
|
|
44
|
+
L8_fs: { eng: "fa_father_score", group: 2},
|
|
45
|
+
L8_fp: { eng: "fa_father_percentage", group: 2},
|
|
46
|
+
L8_ms: { eng: "fa_mother_score", group: 2},
|
|
47
|
+
L8_mp: { eng: "fa_mother_percentage", group: 2},
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
L9_fs: { eng: "et_father_score", group: 3},
|
|
51
|
+
L9_fp: { eng: "et_father_percentage", group: 3},
|
|
52
|
+
L9_ms: { eng: "et_mother_score", group: 3},
|
|
53
|
+
L9_mp: { eng: "et_mother_percentage", group: 3},
|
|
54
|
+
|
|
55
|
+
L1_fs0: { eng: "is_father_score", group: 3},
|
|
56
|
+
L1_fp0: { eng: "is_father_percentage", group: 3},
|
|
57
|
+
L1_ms0: { eng: "is_mother_score", group: 3},
|
|
58
|
+
L1_mp0: { eng: "is_mother_percentage", group: 3},
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
L1_fs1: { eng: "sb_father_score", group: 4},
|
|
62
|
+
L1_fp1: { eng: "sb_father_percentage", group: 4},
|
|
63
|
+
L1_ms1: { eng: "sb_mother_score", group: 4},
|
|
64
|
+
L1_mp1: { eng: "sb_mother_percentage", group: 4},
|
|
65
|
+
|
|
66
|
+
L1_fs2: { eng: "ss_father_score", group: 4},
|
|
67
|
+
L1_fp2: { eng: "ss_father_percentage", group: 4},
|
|
68
|
+
L1_ms2: { eng: "ss_mother_score", group: 4},
|
|
69
|
+
L1_mp2: { eng: "ss_mother_percentage", group: 4},
|
|
70
|
+
|
|
71
|
+
L1_fs3: { eng: "as_father_score", group: 4},
|
|
72
|
+
L1_fp3: { eng: "as_father_percentage", group: 4},
|
|
73
|
+
L1_ms3: { eng: "as_mother_score", group: 4},
|
|
74
|
+
L1_mp3: { eng: "as_mother_percentage", group: 4},
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
L1_fs4: { eng: "np_father_score", group: 5},
|
|
78
|
+
L1_fp4: { eng: "np_father_percentage", group: 5},
|
|
79
|
+
L1_ms4: { eng: "np_mother_score", group: 5},
|
|
80
|
+
L1_mp4: { eng: "np_mother_percentage", group: 5},
|
|
81
|
+
|
|
82
|
+
L1_fs5: { eng: "ei_father_score", group: 5},
|
|
83
|
+
L1_fp5: { eng: "ei_father_percentage", group: 5},
|
|
84
|
+
L1_ms5: { eng: "ei_mother_score", group: 5},
|
|
85
|
+
L1_mp5: { eng: "ei_mother_percentage", group: 5},
|
|
86
|
+
|
|
87
|
+
L1_fs6: { eng: "us_father_score", group: 5},
|
|
88
|
+
L1_fp6: { eng: "us_father_percentage", group: 5},
|
|
89
|
+
L1_ms6: { eng: "us_mother_score", group: 5},
|
|
90
|
+
L1_mp6: { eng: "us_mother_percentage", group: 5},
|
|
91
|
+
|
|
92
|
+
L1_fs7: { eng: "pu_father_score", group: 5},
|
|
93
|
+
L1_fp7: { eng: "pu_father_percentage", group: 5},
|
|
94
|
+
L1_ms7: { eng: "pu_mother_score", group: 5},
|
|
95
|
+
L1_mp7: { eng: "pu_mother_percentage", group: 5},
|
|
96
|
+
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
profileSpec = {
|
|
100
|
+
/* "sample" determines some important info about the sample and profile */
|
|
101
|
+
/* Default prerequisites: 1. gender, 2. age, 3. education */
|
|
102
|
+
/* "prerequisites" is synonym to "fields" in our program */
|
|
103
|
+
sample: {
|
|
104
|
+
name: "آزمون روانبنههای یانگ - 90 سؤالی" /* Name of the sample */,
|
|
105
|
+
multiProfile: false /* Whether the sample has multiple profiles or not */,
|
|
106
|
+
questions: true /* Determines whether to get questions from inital dataset or not */,
|
|
107
|
+
defaultFields: true /* Determines whether to have default prerequisites in the profile or not */,
|
|
108
|
+
fields: [] /* In case you want to get some additional fields and show in the profile */,
|
|
109
|
+
},
|
|
110
|
+
/* "profile" determines the dimensions of the drawn profile (to be used in svg tag viewbox) */
|
|
111
|
+
/* calculating its dimensions carefully is of great importance */
|
|
112
|
+
profile: {
|
|
113
|
+
get dimensions() {
|
|
114
|
+
return {
|
|
115
|
+
width: 903 + 2 * this.padding.x,
|
|
116
|
+
height: 714 + 2 * this.padding.y,
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
padding: {
|
|
120
|
+
x: 14,
|
|
121
|
+
y: 20,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
|
|
125
|
+
/* "labels" part which has to be provided for each profile */
|
|
126
|
+
labels: Object.values(this.labels),
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
constructor(dataset, options, config = {}) {
|
|
130
|
+
super();
|
|
131
|
+
this._init(dataset, options, config);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
_calcContext() {
|
|
135
|
+
const {
|
|
136
|
+
dataset,
|
|
137
|
+
} = this;
|
|
138
|
+
const factors = ['ed','ab','ma','vu','ai','ds','fa','sb','ss','us','et','is','eu','np','ei','pu','as'];
|
|
139
|
+
const mod = ["father", "mother"]
|
|
140
|
+
const items = {}
|
|
141
|
+
dataset.score.forEach(f => {
|
|
142
|
+
const sp = f.label.eng.split('_')
|
|
143
|
+
if(items[sp[0]] === undefined){
|
|
144
|
+
items[sp[0]] = {
|
|
145
|
+
en: sp[0].toUpperCase(),
|
|
146
|
+
max: fD[sp[0]].max,
|
|
147
|
+
title: fD[sp[0]].fr,
|
|
148
|
+
father: {
|
|
149
|
+
critical : [[], []],
|
|
150
|
+
score: 0,
|
|
151
|
+
percentage: 0,
|
|
152
|
+
},
|
|
153
|
+
mother: {
|
|
154
|
+
critical : [[], []],
|
|
155
|
+
score: 0,
|
|
156
|
+
percentage: 0,
|
|
157
|
+
},
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if(sp[2] === 'percentage'){
|
|
161
|
+
items[sp[0]][sp[1]][sp[2]] = Math.round(f.mark * 100)
|
|
162
|
+
}else{
|
|
163
|
+
items[sp[0]][sp[1]][sp[2]] = f.mark
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
})
|
|
167
|
+
dataset.questions.forEach((e, i) => {
|
|
168
|
+
const id = Math.round((i-1) /2) + 1
|
|
169
|
+
const fs = Items[id]
|
|
170
|
+
const user_answered = parseInt(e.user_answered)
|
|
171
|
+
if(fs === 'ed'){
|
|
172
|
+
if(user_answered === 1){
|
|
173
|
+
items[fs][mod[i % 2]].critical[1].push(id)
|
|
174
|
+
}
|
|
175
|
+
if(user_answered === 2){
|
|
176
|
+
items[fs][mod[i % 2]].critical[0].push(id)
|
|
177
|
+
}
|
|
178
|
+
}else{
|
|
179
|
+
if(user_answered === 5){
|
|
180
|
+
items[fs][mod[i % 2]].critical[0].push(id)
|
|
181
|
+
}
|
|
182
|
+
if(user_answered === 6){
|
|
183
|
+
items[fs][mod[i % 2]].critical[1].push(id)
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
for(const f in items){
|
|
188
|
+
const fi = items[f]
|
|
189
|
+
items[f].father.critical = criticaler(fi.father.critical, 'father', f === 'ed')
|
|
190
|
+
items[f].mother.critical = criticaler(fi.mother.critical, 'mother', f === 'ed')
|
|
191
|
+
}
|
|
192
|
+
return [
|
|
193
|
+
{
|
|
194
|
+
titleAppend: ' - صفحه ۱',
|
|
195
|
+
g1: {
|
|
196
|
+
factors: [items.ab, items.ma, items.ed, items.ds]
|
|
197
|
+
},
|
|
198
|
+
g2: {
|
|
199
|
+
factors: [items.ai, items.vu, items.eu, items.fa]
|
|
200
|
+
},
|
|
201
|
+
g3: {
|
|
202
|
+
factors: [items.et, items.is]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
titleAppend: ' - صفحه ۲',
|
|
207
|
+
g4: {
|
|
208
|
+
factors: [items.sb, items.ss, items.as]
|
|
209
|
+
},
|
|
210
|
+
g5: {
|
|
211
|
+
factors: [items.np, items.ei, items.us, items.pu]
|
|
212
|
+
},
|
|
213
|
+
}
|
|
214
|
+
];
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
const modeCriticalColor ={
|
|
218
|
+
father : {
|
|
219
|
+
p1 : {
|
|
220
|
+
a: '#2563EB',
|
|
221
|
+
b: '#EFF6FF',
|
|
222
|
+
},
|
|
223
|
+
p2 : {
|
|
224
|
+
a: '#1D4ED8',
|
|
225
|
+
b: '#DBEAFE',
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
mother : {
|
|
229
|
+
p1 : {
|
|
230
|
+
a: '#C026D3',
|
|
231
|
+
b: '#FDF4FF',
|
|
232
|
+
},
|
|
233
|
+
p2 : {
|
|
234
|
+
a: '#A21CAF',
|
|
235
|
+
b: '#FAE8FF',
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function criticaler(data, mod, reverse){
|
|
240
|
+
let left = 0
|
|
241
|
+
const result = []
|
|
242
|
+
const lines = []
|
|
243
|
+
if(data[0].length > 0){
|
|
244
|
+
result.push({
|
|
245
|
+
left,
|
|
246
|
+
text: `گ${reverse ? 2 : 5}`,
|
|
247
|
+
bg: modeCriticalColor[mod].p1.a,
|
|
248
|
+
fill: '#FFFFFF',
|
|
249
|
+
w: 35
|
|
250
|
+
})
|
|
251
|
+
left += 37
|
|
252
|
+
data[0].forEach(d => {
|
|
253
|
+
result.push({
|
|
254
|
+
left,
|
|
255
|
+
text: d,
|
|
256
|
+
bg: modeCriticalColor[mod].p1.b,
|
|
257
|
+
fill: modeCriticalColor[mod].p1.a,
|
|
258
|
+
w: 24
|
|
259
|
+
})
|
|
260
|
+
left += 26
|
|
261
|
+
})
|
|
262
|
+
lines.push({start: 5, end: left-5})
|
|
263
|
+
}
|
|
264
|
+
if(data[1].length > 0){
|
|
265
|
+
if(left !== 0){
|
|
266
|
+
left += 8
|
|
267
|
+
}
|
|
268
|
+
const fl = left + 5
|
|
269
|
+
|
|
270
|
+
result.push({
|
|
271
|
+
left,
|
|
272
|
+
text: `گ${reverse ? 1 : 6}`,
|
|
273
|
+
bg: modeCriticalColor[mod].p2.a,
|
|
274
|
+
fill: '#FFFFFF',
|
|
275
|
+
w: 35
|
|
276
|
+
})
|
|
277
|
+
left += 37
|
|
278
|
+
data[1].forEach(d => {
|
|
279
|
+
result.push({
|
|
280
|
+
left,
|
|
281
|
+
text: d,
|
|
282
|
+
bg: modeCriticalColor[mod].p2.b,
|
|
283
|
+
fill: modeCriticalColor[mod].p2.a,
|
|
284
|
+
w: 24
|
|
285
|
+
})
|
|
286
|
+
left += 26
|
|
287
|
+
})
|
|
288
|
+
lines.push({start: fl, end: left-5})
|
|
289
|
+
|
|
290
|
+
}
|
|
291
|
+
return {result, lines}
|
|
292
|
+
}
|
|
293
|
+
module.exports = YPI93;
|
|
294
|
+
const f1= 'ed'
|
|
295
|
+
const f2= 'ab'
|
|
296
|
+
const f3= 'ma'
|
|
297
|
+
const f4= 'vu'
|
|
298
|
+
const f5= 'ai'
|
|
299
|
+
const f6= 'ds'
|
|
300
|
+
const f7= 'fa'
|
|
301
|
+
const f8= 'sb'
|
|
302
|
+
const f9= 'ss'
|
|
303
|
+
const f10= 'us'
|
|
304
|
+
const f11= 'et'
|
|
305
|
+
const f12= 'is'
|
|
306
|
+
const f13= 'eu'
|
|
307
|
+
const f14= 'np'
|
|
308
|
+
const f15= 'ei'
|
|
309
|
+
const f16= 'pu'
|
|
310
|
+
const f17= 'as'
|
|
311
|
+
|
|
312
|
+
const fD = {
|
|
313
|
+
ab: {fr: "رهاشدگی (بیثباتی)", max: 24},
|
|
314
|
+
ma: {fr: "بیاعتمادی (سوءاستفاده)", max: 24},
|
|
315
|
+
ed: {fr: "محرومیت عاطفی", max: 30},
|
|
316
|
+
ds: {fr: "نقص (شرم)", max: 24},
|
|
317
|
+
ai: {fr: "وابستگی (بیکفایتی)", max: 18},
|
|
318
|
+
vu: {fr: "آسیبپذیری در برابر خطر", max: 24},
|
|
319
|
+
eu: {fr: "گرفتارشدگی (خودتحولنایافتگی)", max: 24},
|
|
320
|
+
fa: {fr: "شکست", max: 24},
|
|
321
|
+
et: {fr: "محقبودن (خودبزرگبینی)", max: 24},
|
|
322
|
+
is: {fr: "خودمهارگری ناکافی", max: 24},
|
|
323
|
+
sb: {fr: "انقیاد (اطاعت)", max: 24},
|
|
324
|
+
ss: {fr: "از خودگذشتگی", max: 24},
|
|
325
|
+
as: {fr: "تأییدخواهی یا تصدیقخواهی", max: 24},
|
|
326
|
+
np: {fr: "منفیخوانی یا بدبینی", max: 24},
|
|
327
|
+
ei: {fr: "بیشمهارگری (بازداری هیجانی)", max: 30},
|
|
328
|
+
us: {fr: "استانداردهای سختگیرانه", max: 42},
|
|
329
|
+
pu: {fr: "تنبیهگری", max: 24},
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
const Items = {
|
|
333
|
+
1:f1, 2:f1, 3:f1, 4:f1, 5:f1,
|
|
334
|
+
6:f2,7:f2,8:f2,9:f2,
|
|
335
|
+
10:f3,11:f3,12:f3,13:f3,
|
|
336
|
+
14:f4,15:f4,16:f4,17:f4,
|
|
337
|
+
18:f5,19:f5,20:f5,
|
|
338
|
+
21:f6,22:f6,23:f6,24:f6,
|
|
339
|
+
25:f7,26:f7,27:f7,28:f7,
|
|
340
|
+
29:f8,30:f8,31:f8,32:f8,
|
|
341
|
+
33:f9,34:f9,35:f9,36:f9,
|
|
342
|
+
37:f10,38:f10,39:f10,40:f10,41:f10,42:f10,43:f10,
|
|
343
|
+
44:f11,45:f11,46:f11,47:f11,
|
|
344
|
+
48:f12,49:f12,50:f12,51:f12,
|
|
345
|
+
52:f13,53:f13,54:f13,55:f13,
|
|
346
|
+
56:f14,57:f14,58:f14,59:f14,
|
|
347
|
+
60:f15,61:f15,62:f15,63:f15,64:f15,
|
|
348
|
+
65:f16,66:f16,67:f16,68:f16,
|
|
349
|
+
69:f17,70:f17,71:f17,72:f17
|
|
350
|
+
}
|
package/views/gift.hbs
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<g transform="translate(10, 10)">
|
|
65
65
|
<rect x="0" y="0" width="492" height="492" fill="white" rx="30"/>
|
|
66
66
|
<g transform="translate(246, 0)">
|
|
67
|
-
<text x="0" y="16" font-size="22" font-weight="700" fill="#007BA4" text-anchor="middle" dy="20"
|
|
67
|
+
<text x="0" y="16" font-size="22" font-weight="700" fill="#007BA4" text-anchor="middle" dy="20">{{ENVTitle}}</text>
|
|
68
68
|
<g transform="translate(-170, 64)">
|
|
69
69
|
<use href="#gift-box"/>
|
|
70
70
|
</g>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="bar96x16-2">
|
|
4
|
+
{{bar 96 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
5
|
+
</clipPath>
|
|
6
|
+
<clipPath id="bar96x16-8">
|
|
7
|
+
{{bar 96 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
8
|
+
</clipPath>
|
|
9
|
+
|
|
10
|
+
<clipPath id="bar120x16-2">
|
|
11
|
+
{{bar 120 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
12
|
+
</clipPath>
|
|
13
|
+
<clipPath id="bar120x16-8">
|
|
14
|
+
{{bar 120 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
15
|
+
</clipPath>
|
|
16
|
+
|
|
17
|
+
<clipPath id="bar72x16-2">
|
|
18
|
+
{{bar 72 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
19
|
+
</clipPath>
|
|
20
|
+
<clipPath id="bar72x16-8">
|
|
21
|
+
{{bar 72 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
22
|
+
</clipPath>
|
|
23
|
+
|
|
24
|
+
<clipPath id="bar168x16-2">
|
|
25
|
+
{{bar 168 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
26
|
+
</clipPath>
|
|
27
|
+
<clipPath id="bar168x16-8">
|
|
28
|
+
{{bar 168 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
29
|
+
</clipPath>
|
|
30
|
+
<linearGradient id="fatherg" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
31
|
+
<stop offset="0%" style="stop-color:#A5B4FC;stop-opacity:1" />
|
|
32
|
+
<stop offset="100%" style="stop-color:#2563EB;stop-opacity:1" />
|
|
33
|
+
</linearGradient>
|
|
34
|
+
<linearGradient id="motherg" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
35
|
+
<stop offset="0%" style="stop-color:#F0ABFC;stop-opacity:1" />
|
|
36
|
+
<stop offset="100%" style="stop-color:#C026D3;stop-opacity:1" />
|
|
37
|
+
</linearGradient>
|
|
38
|
+
</defs>
|
|
39
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
40
|
+
{{#with g1}}
|
|
41
|
+
<g>
|
|
42
|
+
<g transform="translate(48,8)">
|
|
43
|
+
{{> YPI93_factors}}
|
|
44
|
+
</g>
|
|
45
|
+
<rect x="311" y="0" width="1" height="208" rx="1" fill="#FFFFFF" style="filter: drop-shadow(2px 0 3px rgba(0,0,0, .5));"/>
|
|
46
|
+
<rect y="8" width="48" height="192" rx="4" fill="#F9FAFB" stroke="#F3F4F6"/>
|
|
47
|
+
<text font-size="13" font-weight="400" fill="#4B5563" text-anchor="middle" transform="rotate(-90) translate(-104,24)" dy=".3em">انفصال و طردشدگی</text>
|
|
48
|
+
</g>
|
|
49
|
+
{{/with}}
|
|
50
|
+
|
|
51
|
+
{{#with g2}}
|
|
52
|
+
<g transform="translate(0, 248)">
|
|
53
|
+
<g transform="translate(48,8)">
|
|
54
|
+
{{> YPI93_factors}}
|
|
55
|
+
</g>
|
|
56
|
+
<rect x="311" y="0" width="1" height="208" rx="1" fill="#FFFFFF" style="filter: drop-shadow(2px 0 3px rgba(0,0,0, .5));"/>
|
|
57
|
+
<rect y="8" width="48" height="192" rx="4" fill="#F9FAFB" stroke="#F3F4F6"/>
|
|
58
|
+
<text font-size="13" font-weight="400" fill="#4B5563" text-anchor="middle" transform="rotate(-90) translate(-104,24)" dy=".3em">استقلال و عملکرد معیوب</text>
|
|
59
|
+
</g>
|
|
60
|
+
{{/with}}
|
|
61
|
+
{{#with g3}}
|
|
62
|
+
<g transform="translate(0, 488)">
|
|
63
|
+
<g transform="translate(48,8)">
|
|
64
|
+
{{> YPI93_factors}}
|
|
65
|
+
</g>
|
|
66
|
+
<rect x="311" y="0" width="1" height="104" rx="1" fill="#FFFFFF" style="filter: drop-shadow(2px 0 3px rgba(0,0,0, .5));"/>
|
|
67
|
+
<rect y="8" width="48" height="104" rx="4" fill="#F9FAFB" stroke="#F3F4F6"/>
|
|
68
|
+
<text font-size="13" font-weight="400" fill="#4B5563" text-anchor="middle" transform="rotate(-90) translate(-60,16)" dy=".3em">محدودیتهای</text>
|
|
69
|
+
<text font-size="13" font-weight="400" fill="#4B5563" text-anchor="middle" transform="rotate(-90) translate(-60,32)" dy=".3em">آسیبزا</text>
|
|
70
|
+
</g>
|
|
71
|
+
{{/with}}
|
|
72
|
+
<g transform="translate(354, 657)">
|
|
73
|
+
<rect width="196" height="37" rx="8" stroke="#F3F4F6" fill="#F9FAFB" />
|
|
74
|
+
<text font-size="12" font-weight="400" y="18" dy=".3em" fill="#4B5563" text-anchor="end" x="32">پدر</text>
|
|
75
|
+
{{bar 24 12 (object tr=2 br=2 bl=0 tl=0) (toRad 0) transform="translate(56,12)" fill="url(#fatherg)"}}
|
|
76
|
+
|
|
77
|
+
<text font-size="12" font-weight="400" y="18" dy=".3em" fill="#4B5563" text-anchor="end" x="112">مادر</text>
|
|
78
|
+
{{bar 24 12 (object tr=6 br=6 bl=0 tl=0) (toRad 0) transform="translate(140,12)" fill="url(#motherg)"}}
|
|
79
|
+
</g>
|
|
80
|
+
</g>
|
|
81
|
+
{{/layout}}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="bar96x16-2">
|
|
4
|
+
{{bar 96 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
5
|
+
</clipPath>
|
|
6
|
+
<clipPath id="bar96x16-8">
|
|
7
|
+
{{bar 96 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
8
|
+
</clipPath>
|
|
9
|
+
|
|
10
|
+
<clipPath id="bar120x16-2">
|
|
11
|
+
{{bar 120 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
12
|
+
</clipPath>
|
|
13
|
+
<clipPath id="bar120x16-8">
|
|
14
|
+
{{bar 120 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
15
|
+
</clipPath>
|
|
16
|
+
|
|
17
|
+
<clipPath id="bar72x16-2">
|
|
18
|
+
{{bar 72 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
19
|
+
</clipPath>
|
|
20
|
+
<clipPath id="bar72x16-8">
|
|
21
|
+
{{bar 72 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
22
|
+
</clipPath>
|
|
23
|
+
|
|
24
|
+
<clipPath id="bar168x16-2">
|
|
25
|
+
{{bar 168 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0)}}
|
|
26
|
+
</clipPath>
|
|
27
|
+
<clipPath id="bar168x16-8">
|
|
28
|
+
{{bar 168 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0)}}
|
|
29
|
+
</clipPath>
|
|
30
|
+
<linearGradient id="fatherg" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
31
|
+
<stop offset="0%" style="stop-color:#A5B4FC;stop-opacity:1" />
|
|
32
|
+
<stop offset="100%" style="stop-color:#2563EB;stop-opacity:1" />
|
|
33
|
+
</linearGradient>
|
|
34
|
+
<linearGradient id="motherg" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
35
|
+
<stop offset="0%" style="stop-color:#F0ABFC;stop-opacity:1" />
|
|
36
|
+
<stop offset="100%" style="stop-color:#C026D3;stop-opacity:1" />
|
|
37
|
+
</linearGradient>
|
|
38
|
+
</defs>
|
|
39
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
40
|
+
{{#with g4}}
|
|
41
|
+
<g transform="translate(0, 113)">
|
|
42
|
+
<g transform="translate(48,8)">
|
|
43
|
+
{{> YPI93_factors}}
|
|
44
|
+
</g>
|
|
45
|
+
<rect x="311" y="0" width="1" height="156" rx="1" fill="#FFFFFF" style="filter: drop-shadow(2px 0 3px rgba(0,0,0, .5));"/>
|
|
46
|
+
<rect y="8" width="48" height="140" rx="4" fill="#F9FAFB" stroke="#F3F4F6"/>
|
|
47
|
+
<text font-size="13" font-weight="400" fill="#4B5563" text-anchor="middle" transform="rotate(-90) translate(-78,24)" dy=".3em">جهتگیری دگرسو</text>
|
|
48
|
+
</g>
|
|
49
|
+
{{/with}}
|
|
50
|
+
{{#with g5}}
|
|
51
|
+
<g transform="translate(0, 309)">
|
|
52
|
+
<g transform="translate(48,8)">
|
|
53
|
+
{{> YPI93_factors}}
|
|
54
|
+
</g>
|
|
55
|
+
<rect x="311" y="0" width="1" height="208" rx="1" fill="#FFFFFF" style="filter: drop-shadow(2px 0 3px rgba(0,0,0, .5));"/>
|
|
56
|
+
<rect y="8" width="48" height="192" rx="4" fill="#F9FAFB" stroke="#F3F4F6"/>
|
|
57
|
+
<text font-size="13" font-weight="400" fill="#4B5563" text-anchor="middle" transform="rotate(-90) translate(-104,24)" dy=".3em">گوش به زنگیِ افراطی و بازداری</text>
|
|
58
|
+
</g>
|
|
59
|
+
{{/with}}
|
|
60
|
+
<g transform="translate(354, 657)">
|
|
61
|
+
<rect width="196" height="37" rx="8" stroke="#F3F4F6" fill="#F9FAFB" />
|
|
62
|
+
<text font-size="12" font-weight="400" y="18" dy=".3em" fill="#4B5563" text-anchor="end" x="32">پدر</text>
|
|
63
|
+
{{bar 24 12 (object tr=2 br=2 bl=0 tl=0) (toRad 0) transform="translate(56,12)" fill="url(#fatherg)"}}
|
|
64
|
+
|
|
65
|
+
<text font-size="12" font-weight="400" y="18" dy=".3em" fill="#4B5563" text-anchor="end" x="112">مادر</text>
|
|
66
|
+
{{bar 24 12 (object tr=6 br=6 bl=0 tl=0) (toRad 0) transform="translate(140,12)" fill="url(#motherg)"}}
|
|
67
|
+
</g>
|
|
68
|
+
</g>
|
|
69
|
+
{{/layout}}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{{#each factors}}
|
|
2
|
+
<g transform="translate(0,{{math 52 '*' @index}})">
|
|
3
|
+
<text font-size="13" font-weight="400" y="18" dy=".3em" fill="#4B5563" text-anchor="middle" x="243">{{en}}</text>
|
|
4
|
+
<text font-size="13" font-weight="400" y="18" dy=".3em" fill="#4B5563" text-anchor="start" x="219">-</text>
|
|
5
|
+
<text font-size="13" font-weight="400" y="18" dy=".3em" fill="#4B5563" text-anchor="start" x="204">{{title}}</text>
|
|
6
|
+
{{bar (math 4 '*' max) 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0) transform="translate(264,0)" fill="#EFF6FF" opacity=".8"}}
|
|
7
|
+
{{bar (math 4 '*' father.score) 16 (object tr=2 br=2 bl=0 tl=0) (toRad 0) transform="translate(264,0)" fill="url(#fatherg)" clip-path=(concat 'url(#bar' (concat max 'x16-2)'))}}
|
|
8
|
+
{{bar (math 4 '*' max) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) transform="translate(264,20)" fill="#FDF4FF" opacity=".8"}}
|
|
9
|
+
{{bar (math 4 '*' mother.score) 16 (object tr=8 br=8 bl=0 tl=0) (toRad 0) transform="translate(264,20)" fill="url(#motherg)" clip-path=(concat 'url(#bar' (concat max 'x16-8)'))}}
|
|
10
|
+
<g transform="translate({{math 272 '+' (math 4 '*' max)}}, 0)">
|
|
11
|
+
<text text-anchor="start" direction="ltr" y="14">
|
|
12
|
+
<tspan font-size="16" font-weight="500" fill="#2563EB">{{father.score}}</tspan>
|
|
13
|
+
<tspan font-size="13" font-weight="400" fill="#4B5563"> / {{max}}</tspan>
|
|
14
|
+
</text>
|
|
15
|
+
<rect x="55" width="35" height="16" rx="2" fill="#F9FAFB"/>
|
|
16
|
+
<text font-size="13" font-weight="400" fill="#2563EB" text-anchor="middle" x="72.5" y="8" dy=".35em">%{{father.percentage}}</text>
|
|
17
|
+
</g>
|
|
18
|
+
<g transform="translate(562, 0)">
|
|
19
|
+
{{#each father.critical.lines}}
|
|
20
|
+
<line x1="{{start}}" x2="{{end}}" y1="8" y2="8" stroke="#D1D5DB" stroke-width="1" />
|
|
21
|
+
{{/each}}
|
|
22
|
+
{{#each father.critical.result}}
|
|
23
|
+
<rect x="{{left}}" width="{{w}}" height="16" fill="{{bg}}" rx="2" />
|
|
24
|
+
<text font-size="13" font-weight="400" y="8" dy=".3em" fill="{{fill}}" text-anchor="middle" x="{{math left '+' (math w '/' 2)}}">{{text}}</text>
|
|
25
|
+
{{/each}}
|
|
26
|
+
</g>
|
|
27
|
+
<g transform="translate({{math 272 '+' (math 4 '*' max)}}, 20)">
|
|
28
|
+
<text text-anchor="start" direction="ltr" y="14">
|
|
29
|
+
<tspan font-size="16" font-weight="500" fill="#C026D3" >{{mother.score}}</tspan>
|
|
30
|
+
<tspan font-size="13" font-weight="400" fill="#4B5563" > / {{max}}</tspan>
|
|
31
|
+
</text>
|
|
32
|
+
<rect x="55" width="35" height="16" rx="2" fill="#F9FAFB"/>
|
|
33
|
+
<text font-size="13" font-weight="400" fill="#C026D3" text-anchor="middle" x="72.5" y="8" dy=".35em">%{{mother.percentage}}</text>
|
|
34
|
+
</g>
|
|
35
|
+
<g transform="translate(562, 20)">
|
|
36
|
+
{{#each mother.critical.lines}}
|
|
37
|
+
<line x1="{{start}}" x2="{{end}}" y1="8" y2="8" stroke="#D1D5DB" stroke-width="1" />
|
|
38
|
+
{{/each}}
|
|
39
|
+
{{#each mother.critical.result}}
|
|
40
|
+
<rect x="{{left}}" width="{{w}}" height="16" fill="{{bg}}" rx="2" />
|
|
41
|
+
<text font-size="13" font-weight="400" y="8" dy=".3em" fill="{{fill}}" text-anchor="middle" x="{{math left '+' (math w '/' 2)}}">{{text}}</text>
|
|
42
|
+
{{/each}}
|
|
43
|
+
</g>
|
|
44
|
+
</g>
|
|
45
|
+
{{/each}}
|