@baravak/risloo-profile-cli 4.77.0 → 4.78.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/samples/BSSI93.js +38 -8
- package/views/profiles/samples/BSSI93.hbs +10 -10
package/package.json
CHANGED
package/src/samples/BSSI93.js
CHANGED
|
@@ -58,14 +58,44 @@ class BSSI93 extends Profile {
|
|
|
58
58
|
const end = FS.toRadians(180); // 100% at left (9 o'clock)
|
|
59
59
|
total.zeta = total.p * (end - start) + start; // clockwise 270° sweep
|
|
60
60
|
|
|
61
|
-
// --- Factors (
|
|
62
|
-
//
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
// --- Factors (visual order, left → right) ---
|
|
62
|
+
// The scientific score keys stay unchanged. The design places the intent
|
|
63
|
+
// score in the middle slot and the preparation score in the right slot.
|
|
64
|
+
const factorSpecs = [
|
|
65
|
+
{
|
|
66
|
+
raw: s[2],
|
|
67
|
+
percentage: s[3],
|
|
68
|
+
cx: 120,
|
|
69
|
+
trackLeft: 106,
|
|
70
|
+
scoreX: 120.5,
|
|
71
|
+
lines: [{ text: "تمایل به مرگ", x: 120, y: 351.5 }],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
raw: s[6],
|
|
75
|
+
percentage: s[7],
|
|
76
|
+
cx: 220,
|
|
77
|
+
trackLeft: 206,
|
|
78
|
+
scoreX: 221.5,
|
|
79
|
+
lines: [
|
|
80
|
+
{ text: "آمادگی برای", x: 219.5, y: 351.5 },
|
|
81
|
+
{ text: "خودکشی", x: 219, y: 368 },
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
raw: s[4],
|
|
86
|
+
percentage: s[5],
|
|
87
|
+
cx: 320,
|
|
88
|
+
trackLeft: 306,
|
|
89
|
+
scoreX: 322,
|
|
90
|
+
lines: [
|
|
91
|
+
{ text: "تمایل به", x: 322, y: 352.5 },
|
|
92
|
+
{ text: "خودکشی واقعی", x: 322, y: 368 },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
const factors = factorSpecs.map(({ raw, percentage, ...geometry }) => ({
|
|
97
|
+
...packItem(raw, percentage),
|
|
98
|
+
...geometry,
|
|
69
99
|
}));
|
|
70
100
|
|
|
71
101
|
return [{ total, factors }];
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
<line x1="69.5" y1="102.5" x2="408.5" y2="102.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
48
48
|
<line x1="69.5" y1="177.5" x2="408.5" y2="177.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
49
49
|
<line x1="69.5" y1="252.5" x2="408.5" y2="252.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
50
|
-
<text x="53" y="
|
|
51
|
-
<text x="53" y="
|
|
50
|
+
<text x="53" y="25.5" text-anchor="end" dy=".85em" font-size="12" fill="#94A3B8" direction="ltr">٪ 100</text>
|
|
51
|
+
<text x="53" y="175.5" text-anchor="end" dy=".35em" font-size="12" fill="#94A3B8" direction="ltr">٪ 50</text>
|
|
52
52
|
|
|
53
53
|
{{! Value bars + inside/outside percentage label }}
|
|
54
54
|
{{#each factors as |factor|}}
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
|
|
67
67
|
{{! Domain names under each bar }}
|
|
68
68
|
{{#each factors as |factor|}}
|
|
69
|
-
{{#each factor.lines as |line
|
|
70
|
-
<text x="{{
|
|
69
|
+
{{#each factor.lines as |line|}}
|
|
70
|
+
<text x="{{line.x}}" y="{{line.y}}" text-anchor="middle" font-size="14" fill="#334155">{{line.text}}</text>
|
|
71
71
|
{{/each}}
|
|
72
72
|
{{/each}}
|
|
73
73
|
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
</g>
|
|
78
78
|
|
|
79
79
|
{{! ===== "raw score" header row: legend + per-bar raw/max fractions ===== }}
|
|
80
|
-
<text x="38" y="
|
|
80
|
+
<text x="38" y="7.5" text-anchor="start" dy=".3em" font-size="12" fill="#94A3B8">نمره خام</text>
|
|
81
81
|
<path d="M45.5 8L52.5 8M49.5 11L52.5 8L49.5 5" stroke="#94A3B8" stroke-width="0.75" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
|
|
82
82
|
{{#each factors as |factor|}}
|
|
83
|
-
<text x="{{factor.
|
|
83
|
+
<text x="{{factor.scoreX}}" y="9.5" text-anchor="middle" dy=".3em" direction="ltr"><tspan font-weight="700" font-size="16" fill="#BE185D">{{factor.mark}}</tspan><tspan font-weight="300" font-size="12" fill="#64748B"> / </tspan><tspan font-weight="400" font-size="13" fill="#64748B">{{factor.max}}</tspan></text>
|
|
84
84
|
{{/each}}
|
|
85
85
|
|
|
86
86
|
{{! ===================== Total score ring gauge ===================== }}
|
|
@@ -88,13 +88,13 @@
|
|
|
88
88
|
{{gauge 70 49 (object tl=6 tr=6 bl=6 br=6) (object start=(toRad -90) end=(toRad 180)) false clip-path="url(#gauge-roll)" fill="#F1F5F9"}}
|
|
89
89
|
{{#if total.mark}}{{gauge 70 49 (object tl=6 tr=6 bl=6 br=6) (object start=(toRad -90) end=total.zeta) false clip-path="url(#gauge-roll)" fill="url(#gaugeGrad)"}}{{/if}}
|
|
90
90
|
|
|
91
|
-
<text x="0" y="-
|
|
92
|
-
<text x="0" y="
|
|
91
|
+
<text x="0" y="-4" text-anchor="middle" font-size="24" font-weight="600" fill="#334155" direction="ltr">٪ {{total.pct}}</text>
|
|
92
|
+
<text x="0" y="22" text-anchor="middle" font-size="15" font-weight="500" fill="#64748B">{{total.mark}} از {{total.max}}</text>
|
|
93
93
|
|
|
94
|
-
<text x="-60" y="-
|
|
94
|
+
<text x="-60" y="-8" text-anchor="middle" font-size="14" fill="#64748B" direction="ltr">٪ 100</text>
|
|
95
95
|
<text x="-11" y="-56" text-anchor="middle" font-size="14" fill="#64748B">0</text>
|
|
96
96
|
|
|
97
|
-
<text x="0" y="
|
|
97
|
+
<text x="0" y="102" text-anchor="middle" font-size="16" font-weight="500" fill="#475569">نمره کل</text>
|
|
98
98
|
</g>
|
|
99
99
|
|
|
100
100
|
</g>
|