@baravak/risloo-profile-cli 4.2.5 → 4.2.7

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.2.5",
3
+ "version": "4.2.7",
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": {
@@ -16,10 +16,10 @@ class _16PF93 extends Profile {
16
16
  L8: { eng: "i", fr: "I", right: "یکدنده", left: "حساس" },
17
17
  L9: { eng: "l", fr: "L", right: "زودباور", left: "شکاک" },
18
18
  L10: { eng: "m", fr: "M", right: "عمل‌گرا", left: "کولی‌باز" },
19
- L11: { eng: "n", fr: "N", right: "بی‌ظرافت", left: "ظرافت" },
19
+ L11: { eng: "n", fr: "N", right: "بی‌ظرافت", left: "ظرافت‌کاری" },
20
20
  L12: { eng: "o", fr: "O", right: "اطمینان به خود", left: "مستعد احساس گناه" },
21
21
  L13: { eng: "q1", fr: "Q1", right: "محافظه‌کار", left: "بنیادگرا" },
22
- L14: { eng: "q2", fr: "Q2", right: "متکی بر خود", left: "مسلط به دیگران" },
22
+ L14: { eng: "q2", fr: "Q2", right: "متکی به دیگران", left: "مسلط بر خود" },
23
23
  L15: { eng: "q3", fr: "Q3", right: "اختلال‌مدار", left: "کمال‌گرا" },
24
24
  L16: { eng: "q4", fr: "Q4", right: "آرام", left: "اضطراب" },
25
25
  L17: { eng: "extraversion", fr: "برون‌گرایی" },
@@ -67,7 +67,10 @@ class JPFQ93 extends Profile {
67
67
  // },
68
68
  // }));
69
69
  // markSum = 378
70
- return [{ markSum: markSum }];
70
+ this.dataset.score.forEach((f, i) => {
71
+ this.dataset.score[i].label.percentage = Math.round(((this.dataset.score[i].mark * 100) / this.dataset.score[i].label.width))
72
+ })
73
+ return [{ markSum }];
71
74
  }
72
75
  }
73
76
 
@@ -2,14 +2,18 @@
2
2
  <g transform="translate(0, {{math 5 '+' ( math 51 '*' @key )}})">
3
3
  <text y="0" x="169" text-anchor="start" font-size="24px" font-weight="400" dy="24px" fill="#3F3F46">{{label.fr}}</text>
4
4
  <g transform="translate(186, 0)">
5
- {{bar (math label.width '*' 4.5) 30 (object tl=0 tr=15 bl=0 br=15) (toRad 0) fill=label.background opacity='.8'}}
6
- {{bar (math mark '*' 4.5) 30 (object tl=0 tr=15 bl=0 br=15) (toRad 0) fill=label.fill opacity='.8'}}
7
- <text y="17" x="{{math (math label.width '*' 4.5) '+' 7.5 }}" dy="6px" text-anchor="start" direction="ltr">
8
- <tspan fill="{{label.fill}}" font-size="36px" font-weight="500">
5
+ {{bar (math label.width '*' 3.5) 30 (object tl=0 tr=15 bl=0 br=15) (toRad 0) fill=label.background opacity='.8'}}
6
+ {{bar (math mark '*' 3.5) 30 (object tl=0 tr=15 bl=0 br=15) (toRad 0) fill=label.fill opacity='.8'}}
7
+ <text y="17" x="{{math (math label.width '*' 3.5) '+' 8 }}" dy="6px" text-anchor="start" direction="ltr">
8
+ <tspan fill="{{label.fill}}" font-size="27px" font-weight="500">
9
9
  {{mark}}
10
10
  </tspan>
11
- <tspan font-size="24px" fill="#71717A" font-weight="400">/ {{label.width}}</tspan>
12
- </text>
11
+ <tspan font-size="20px" fill="#71717A" font-weight="400">/ {{label.width}}</tspan>
12
+ </text>
13
+ <g transform="translate({{math 95 '+' (math label.width '*' 3.5)}}, 4)">
14
+ <rect x="0" y="0" rx="4" fill="#F8FAFC" width="50" height="25" />
15
+ <text x="25" y="12.5" dy="0.25em" text-anchor="middle" font-weight="400" font-size="20px" fill="{{label.fill}}">%{{label.percentage}}</text>
16
+ </g>
13
17
  </g>
14
18
  </g>
15
19
  {{/each}}