@baravak/risloo-profile-cli 4.85.0 → 4.87.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/profiles/gauge.js +14 -2
- package/src/publish/json/profiles/AIS93.json +223 -0
- package/src/publish/json/profiles/CAARS93.json +533 -0
- package/src/publish/json/profiles/ISI93.json +219 -0
- package/src/samples/AIS93.js +90 -0
- package/src/samples/CAARS93.js +93 -0
- package/src/samples/ISI93.js +146 -0
- package/views/profiles/samples/AIS93.hbs +51 -0
- package/views/profiles/samples/CAARS93.hbs +67 -0
- package/views/profiles/samples/ISI93.hbs +82 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
{{#if valid}}
|
|
5
|
+
{{! Severity strip fill, in the respondent's band colour (BDI "Total") }}
|
|
6
|
+
<linearGradient id="isiTotal" x1="-4.8" y1="14" x2="{{total.width}}" y2="14" gradientUnits="userSpaceOnUse">
|
|
7
|
+
<stop stop-color="{{total.colors.[0]}}"/>
|
|
8
|
+
<stop offset="1" stop-color="{{total.colors.[1]}}"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
<clipPath id="isiTotalTrack">
|
|
11
|
+
{{bar 449 28 (object tl=0 bl=0 tr=4 br=4) (toRad 0)}}
|
|
12
|
+
</clipPath>
|
|
13
|
+
|
|
14
|
+
{{! Component ring gauge ("P Total" at 6/7 scale: R 60, r 42), neutral slate: gradient local to the ring centre }}
|
|
15
|
+
<linearGradient id="isiGauge" x1="60" y1="-59.34" x2="-50.43" y2="107.66" gradientUnits="userSpaceOnUse">
|
|
16
|
+
<stop stop-color="#94A3B8"/>
|
|
17
|
+
<stop offset="0.5" stop-color="#475569"/>
|
|
18
|
+
<stop offset="1" stop-color="#475569"/>
|
|
19
|
+
</linearGradient>
|
|
20
|
+
<clipPath id="isiGaugeTrack">
|
|
21
|
+
{{gauge 60 42 (object tl=6 tr=6 bl=6 br=6) (object start=(toRad -90) end=(toRad 180)) false}}
|
|
22
|
+
</clipPath>
|
|
23
|
+
{{/if}}
|
|
24
|
+
</defs>
|
|
25
|
+
|
|
26
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
27
|
+
|
|
28
|
+
{{#if valid}}
|
|
29
|
+
|
|
30
|
+
{{! ===================== Severity strip (BDI "Total" piece) ===================== }}
|
|
31
|
+
<g>
|
|
32
|
+
<g transform="translate(48, 44)">
|
|
33
|
+
<text y="0" x="-8" dy=".85em" text-anchor="start" font-size="13" font-weight="500" fill="#64748B">نمره کل</text>
|
|
34
|
+
<text y="0" x="-8" dy="2.1em" text-anchor="start" font-size="13" font-weight="600" fill="#475569">{{total.pct}} ٪</text>
|
|
35
|
+
{{bar 449 28 (object tl=0 bl=0 tr=4 br=4) (toRad 0) fill="#F8FAFC"}}
|
|
36
|
+
{{#if total.width}}
|
|
37
|
+
{{bar total.width 28 (object tl=0 bl=0 tr=4 br=4) (toRad 0) fill="url(#isiTotal)" clip-path="url(#isiTotalTrack)"}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
<text y="14" x="{{total.labelX}}" dy=".3em" text-anchor="{{total.labelAnchor}}" font-size="16" font-weight="600" fill="{{total.labelFill}}">{{total.mark}}</text>
|
|
40
|
+
</g>
|
|
41
|
+
|
|
42
|
+
{{! Band edges: upper score above a dashed line, band title centred in the band }}
|
|
43
|
+
<g transform="translate(48, 16)">
|
|
44
|
+
{{#each bands as |band|}}
|
|
45
|
+
<text y="-16" x="{{band.edge}}" dy=".85em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">{{band.to}}</text>
|
|
46
|
+
<text y="3" x="{{band.center}}" dy=".85em" text-anchor="middle" font-size="13" font-weight="{{ternary band.active 600 400}}" fill="{{ternary band.active ../total.colors.[1] '#64748B'}}">{{band.title}}</text>
|
|
47
|
+
<line x1="{{math band.edge '-' 0.5}}" y1="{{ternary @last -0.5 2}}" x2="{{math band.edge '-' 0.5}}" y2="23" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
48
|
+
{{/each}}
|
|
49
|
+
</g>
|
|
50
|
+
</g>
|
|
51
|
+
|
|
52
|
+
{{! ===================== Components: 270° ring gauges ("P Total") ===================== }}
|
|
53
|
+
{{#each components as |item|}}
|
|
54
|
+
<g transform="translate({{item.x}}, {{item.y}})">
|
|
55
|
+
{{gauge 60 42 (object tl=6 tr=6 bl=6 br=6) (object start=(toRad -90) end=(toRad 180)) false clip-path="url(#isiGaugeTrack)" fill="#F1F5F9"}}
|
|
56
|
+
{{#if item.mark}}{{gauge 60 42 (object tl=6 tr=6 bl=6 br=6) (object start=(toRad -90) end=item.zeta) false clip-path="url(#isiGaugeTrack)" fill="url(#isiGauge)"}}{{/if}}
|
|
57
|
+
|
|
58
|
+
<text x="0" y="-3" text-anchor="middle" font-size="21" font-weight="600" fill="#334155" direction="ltr">٪ {{item.pct}}</text>
|
|
59
|
+
<text x="0" y="19" text-anchor="middle" font-size="13" font-weight="500" fill="#64748B">{{item.mark}} از {{item.max}}</text>
|
|
60
|
+
|
|
61
|
+
<text x="-51" y="-7" text-anchor="middle" font-size="12" fill="#64748B" direction="ltr">٪ 100</text>
|
|
62
|
+
<text x="-9" y="-48" text-anchor="middle" font-size="12" fill="#64748B">0</text>
|
|
63
|
+
|
|
64
|
+
<text x="0" y="88" text-anchor="middle" font-size="14" font-weight="500" fill="#475569">{{item.title}}</text>
|
|
65
|
+
</g>
|
|
66
|
+
{{/each}}
|
|
67
|
+
|
|
68
|
+
{{else}}
|
|
69
|
+
|
|
70
|
+
{{! ===================== No result (all-or-nothing) ===================== }}
|
|
71
|
+
<rect x="22.5" y="45" width="500" height="199" rx="12" fill="#F8FAFC" stroke="#E2E8F0"/>
|
|
72
|
+
<circle cx="272.5" cy="95.5" r="17" fill="none" stroke="#64748B" stroke-width="2"/>
|
|
73
|
+
<line x1="272.5" y1="86.5" x2="272.5" y2="98.5" stroke="#64748B" stroke-width="2.5" stroke-linecap="round"/>
|
|
74
|
+
<circle cx="272.5" cy="105" r="1.6" fill="#64748B"/>
|
|
75
|
+
<text x="272.5" y="151.5" text-anchor="middle" font-size="17" font-weight="600" fill="#1E293B">نمره تولید نشد</text>
|
|
76
|
+
<text x="272.5" y="183.5" text-anchor="middle" font-size="13" fill="#64748B">پاسخ ناقص یا نامعتبر است؛ هیچ نمرهای، حتی نمرهٔ جزئی، گزارش نمیشود.</text>
|
|
77
|
+
|
|
78
|
+
{{/if}}
|
|
79
|
+
|
|
80
|
+
</g>
|
|
81
|
+
|
|
82
|
+
{{/layout}}
|