@baravak/risloo-profile-cli 4.26.0 → 4.28.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/publish/json/profiles/JSGS93.json +674 -0
- package/src/publish/json/profiles/PCL593.json +316 -0
- package/src/samples/JSGS93.js +99 -0
- package/src/samples/PCL593.js +187 -0
- package/views/profiles/samples/JSGS93.hbs +50 -0
- package/views/profiles/samples/PCL593_1.hbs +96 -0
- package/views/profiles/samples/PCL593_2.hbs +95 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bar" gradientTransform="rotate(90)">
|
|
4
|
+
<stop offset="0%" stop-color="#4F46E5" stop-opacity="1" />
|
|
5
|
+
<stop offset="100%" stop-color="#A5B4FC" stop-opacity="1" />
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="total">
|
|
8
|
+
<stop offset="0%" stop-color="{{status.style.colors.[1]}}" stop-opacity="1" />
|
|
9
|
+
<stop offset="1000%" stop-color="{{status.style.colors.[0]}}" stop-opacity="1" />
|
|
10
|
+
</linearGradient>
|
|
11
|
+
<filter id="barsp" x="0" y="0" width="532" height="7" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
12
|
+
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
13
|
+
<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"/>
|
|
14
|
+
<feOffset dy="-1"/>
|
|
15
|
+
<feGaussianBlur stdDeviation="1.5"/>
|
|
16
|
+
<feComposite in2="hardAlpha" operator="out"/>
|
|
17
|
+
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"/>
|
|
18
|
+
<feBlend mode="normal" in2="BackgroundImageFix" result="effect"/>
|
|
19
|
+
<feBlend mode="normal" in="SourceGraphic" in2="effect" result="shape"/>
|
|
20
|
+
</filter>
|
|
21
|
+
<clipPath id="total_path">
|
|
22
|
+
{{bar 435 28 (object tl=0 bl=0 tr=4 br=4) (toRad 0)}}
|
|
23
|
+
</clipPath>
|
|
24
|
+
<clipPath id="factor_path">
|
|
25
|
+
{{bar 28 300 (object tl=4 tr=4 br=0 bl=0) (toRad 0)}}
|
|
26
|
+
</clipPath>
|
|
27
|
+
</defs>
|
|
28
|
+
<g transform="translate({{spec.profile.padding.[0].x}}, {{spec.profile.padding.[0].y}})">
|
|
29
|
+
<g transform="translate(85, 24)">
|
|
30
|
+
{{#each factors as | item index |}}
|
|
31
|
+
<g transform="translate({{math 92 '*' index }}, 0)">
|
|
32
|
+
<text x="14" y="-16" dy="0.25em" text-anchor="middle" direction="ltr">
|
|
33
|
+
<tspan font-size="16" font-weight="700" fill="#4F46E5">{{item.mark}}</tspan>
|
|
34
|
+
<tspan font-size="12" font-weight="300" fill="#64748B">/</tspan>
|
|
35
|
+
<tspan font-size="13" font-weight="400" fill="#94A3B8">{{item.label.max}}</tspan>
|
|
36
|
+
</text>
|
|
37
|
+
<text x="14" y="313" dy="0.85em" text-anchor="middle" font-size="13" font-weight="400" fill="#334155">{{item.label.short}}</text>
|
|
38
|
+
<text y="330" dy="0.9em" text-anchor="middle" font-size="13" font-weight="400" fill="#334155">
|
|
39
|
+
{{#each item.label.title as |title i|}}<tspan x="14" dy="{{math 0.9 '+' (math i '*' 0.4)}}em">{{title}}</tspan>{{/each}}</text>
|
|
40
|
+
{{bar 28 300 (object tl=4 tr=4 br=0 bl=0) (toRad 0) fill="#F8FAFC"}}
|
|
41
|
+
</g>
|
|
42
|
+
{{/each}}
|
|
43
|
+
<line x1="-45" x2="442" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
44
|
+
<text x="-80" y="0" dy="0.25em" text-anchor="end" font-size="12" font-weight="400" fill="#94A3B8">100 ٪</text>
|
|
45
|
+
|
|
46
|
+
<line x1="-45" x2="442" y1="75" y2="75" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
47
|
+
|
|
48
|
+
<line x1="-45" x2="442" y1="150" y2="150" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
49
|
+
<text x="-80" y="150" dy="0.25em" text-anchor="end" font-size="12" font-weight="400" fill="#94A3B8">50 ٪</text>
|
|
50
|
+
|
|
51
|
+
<line x1="-45" x2="442" y1="225" y2="225" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="6 6"/>
|
|
52
|
+
|
|
53
|
+
{{#each factors as | item index |}}
|
|
54
|
+
<g transform="translate({{math 92 '*' index }}, {{math (math 1 '-' item.label.percentage) '*' 300 }})">
|
|
55
|
+
{{bar 28 (math item.label.percentage '*' 300) (object tl=4 tr=4 br=0 bl=0) (toRad 0) fill="url(#bar)" clip-path="url(#factor_path)"}}
|
|
56
|
+
<text x="14" y="{{ternary (boolean item.label.percentageT '<=' 10) -18 8}}" dy="0.65em" text-anchor="middle" font-size="16" font-weight="600" fill="{{ternary (boolean item.label.percentageT '<=' 10) '#4F46E5' '#FFFFFF'}}">{{item.label.percentageT}}</text>
|
|
57
|
+
</g>
|
|
58
|
+
{{/each}}
|
|
59
|
+
|
|
60
|
+
<g opacity="0.5" filter="url(#barsp)" transform="translate(-88, 296)">
|
|
61
|
+
<line x1="3.5" y1="4.5" x2="526" y2="4.5" stroke="white" stroke-linecap="round"/>
|
|
62
|
+
</g>
|
|
63
|
+
</g>
|
|
64
|
+
<g transform="translate(48.5, 494)">
|
|
65
|
+
<text x="-8.5" y="8" text-anchor="start" font-size="13" font-weight="500" fill="#64748B">نمره کل</text>
|
|
66
|
+
<text x="-8.5" y="25" text-anchor="start" font-size="13" font-weight="600" fill="#475569">{{total.label.percentage}} ٪</text>
|
|
67
|
+
{{bar 435 28 (object tl=0 bl=0 tr=4 br=4) (toRad 0) fill="#F8FAFC"}}
|
|
68
|
+
{{bar total.len 28 (object tl=0 bl=0 tr=4 br=4) (toRad 0) fill="url(#total)" clip-path="url(#total_path)"}}
|
|
69
|
+
{{#if (boolean total.mark '<=' 19)}}
|
|
70
|
+
<text x="{{math total.len '+' 8}}" y="14" dy="0.25em" text-anchor="end" font-size="16" font-weight="600" fill="#475569">{{total.mark}}</text>
|
|
71
|
+
{{else}}
|
|
72
|
+
<text x="{{math total.len '-' 8}}" y="14" dy="0.25em" text-anchor="start" font-size="16" font-weight="600" fill="#FFFFFF">{{total.mark}}</text>
|
|
73
|
+
{{/if}}
|
|
74
|
+
<text x="47.5" y="-10" dy="-0.4em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean status.mark '===' 'minimal') 600 400}}" fill="{{ternary (boolean status.mark '===' 'minimal') status.style.colors.[0] '#64748B'}}">علائم ناچیز</text>
|
|
75
|
+
<text x="95" y="-32" dy="-0.4em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">19</text>
|
|
76
|
+
<line x1="94.5" y1="-27.5" x2="94.5" y2="-3.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
77
|
+
|
|
78
|
+
<text x="143" y="-10" dy="-0.4em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean status.mark '===' 'mild') 600 400}}" fill="{{ternary (boolean status.mark '===' 'mild') status.style.colors.[0] '#64748B'}}">علائم خفیف</text>
|
|
79
|
+
<text x="191" y="-32" dy="-0.4em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">27</text>
|
|
80
|
+
<line x1="190.5" y1="-27.5" x2="190.5" y2="-3.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
81
|
+
|
|
82
|
+
<text x="241" y="-10" dy="-0.4em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean status.mark '===' 'moderate') 600 400}}" fill="{{ternary (boolean status.mark '===' 'moderate') status.style.colors.[0] '#64748B'}}">علائم متوسط</text>
|
|
83
|
+
<text x="291" y="-32" dy="-0.4em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">32</text>
|
|
84
|
+
<line x1="290.5" y1="-27.5" x2="290.5" y2="-3.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
85
|
+
|
|
86
|
+
<text x="363" y="-10" dy="-0.4em" text-anchor="middle" font-size="13" font-weight="{{ternary (boolean status.mark '===' 'severe') 600 400}}" fill="{{ternary (boolean status.mark '===' 'severe') status.style.colors.[0] '#64748B'}}">علائم شدید</text>
|
|
87
|
+
<text x="435" y="-32" dy="-0.4em" text-anchor="middle" font-size="12" font-weight="400" fill="#94A3B8">80</text>
|
|
88
|
+
<line x1="434.5" y1="-27.5" x2="434.5" y2="-3.5" stroke="#E2E8F0" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
89
|
+
|
|
90
|
+
</g>
|
|
91
|
+
<g transform="translate(48.5, 526)">
|
|
92
|
+
<rect width="434" height="33" rx="4" fill="{{status.style.colors.[4]}}" stroke="{{status.style.colors.[3]}}"/>
|
|
93
|
+
<text x="217" y="16.5" text-anchor="middle" dy="0.3em" font-size="13" font-weight="400" fill="{{status.style.colors.[2]}}">{{status.style.description}}</text>
|
|
94
|
+
</g>
|
|
95
|
+
</g>
|
|
96
|
+
{{/layout}}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
3
|
+
<g transform="translate(105, 0)">
|
|
4
|
+
{{#each factors as | factor index |}}
|
|
5
|
+
<g transform="translate(0, {{math factor.itemOption.top '+' (math index '*' 8)}})">
|
|
6
|
+
<rect width="606" height="{{factor.itemOption.height}}" stroke="{{ternary (boolean factor.label.dsm_mode '===' 'positive') '#BE123C' '#E2E8F0'}}" rx="8" fill="none" />
|
|
7
|
+
<rect x="506" y="8" width="92" height="{{math factor.itemOption.height '-' 16}}" fill="{{ternary (boolean factor.label.dsm_mode '===' 'positive') '#FFF1F2' '#F1F5F9'}}" rx="4" />
|
|
8
|
+
{{#if (boolean factor.label.dsm_mode '===' 'positive')}}
|
|
9
|
+
<rect width="8" height="8" fill="#BE123C" transform="translate(602, {{math (math factor.itemOption.height '/' 2) '-' 4}}) rotate(45, 4, 4)" />
|
|
10
|
+
<text x="685" y="{{math factor.itemOption.height '/' 2}}" font-size="13" font-weight="400" fill="#1E293B" dy="-0.35em" text-anchor="middle">
|
|
11
|
+
به دلیل مثبت بودن حداقل
|
|
12
|
+
</text>
|
|
13
|
+
<text x="685" y="{{math factor.itemOption.height '/' 2}}" font-size="13" font-weight="400" fill="#1E293B" dy="1em" text-anchor="middle"><tspan fill="#BE123C">{{ternary (boolean index '<' 2) 'یک' 'دو'}} نشانه</tspan>
|
|
14
|
+
<tspan>احراز شده است.</tspan></text>
|
|
15
|
+
{{/if}}
|
|
16
|
+
<g transform="translate(8,8)">
|
|
17
|
+
{{#each factor.items as | item im |}}
|
|
18
|
+
<g transform="translate(0,{{math 29 '*' im}})">
|
|
19
|
+
<rect width="460" height="26" fill="#F8FAFC" rx="4"/>
|
|
20
|
+
<text x="452" y="13" dy="0.25em" font-weight="400" font-size="12" fill="#475569" text-anchor="start">{{item.text}}</text>
|
|
21
|
+
<text x="477" y="13" dy="0.3em" font-weight="400" font-size="11" fill="#64748B" text-anchor="middle">{{math im '+' factor.itemOption.startItem}}</text>
|
|
22
|
+
<rect x="4" y="4" width="18" height="18" fill="{{ternary (boolean item.user_answered '>' 2) '#BE123C' '#94A3B8'}}" rx="5"/>
|
|
23
|
+
<text x="13" y="13" dy="0.3em" font-weight="500" font-size="13" fill="#FFFFFF" text-anchor="middle">{{math item.user_answered '-' 1}}</text>
|
|
24
|
+
</g>
|
|
25
|
+
{{/each}}
|
|
26
|
+
</g>
|
|
27
|
+
</g>
|
|
28
|
+
{{/each}}
|
|
29
|
+
<g transform="translate(552, 79)">
|
|
30
|
+
<text dy="-1.25em" font-weight="600" font-size="14" fill="#475569" text-anchor="middle">معیار B</text>
|
|
31
|
+
<text dy="0.25em" font-weight="400" font-size="13" fill="#475569" text-anchor="middle">تجربههای</text>
|
|
32
|
+
<text dy="1.75em" font-weight="400" font-size="13" fill="#475569" text-anchor="middle">مزاحم</text>
|
|
33
|
+
</g>
|
|
34
|
+
<g transform="translate(552, 201.5)">
|
|
35
|
+
<text dy="-0.35em" font-weight="600" font-size="14" fill="#475569" text-anchor="middle">معیار C</text>
|
|
36
|
+
<text dy="1em" font-weight="400" font-size="13" fill="#475569" text-anchor="middle">اجتناب</text>
|
|
37
|
+
</g>
|
|
38
|
+
<g transform="translate(552, 353)">
|
|
39
|
+
<text dy="-1.25em" font-weight="600" font-size="14" fill="#475569" text-anchor="middle">معیار D</text>
|
|
40
|
+
<text dy="0.25em" font-weight="400" font-size="13" fill="#475569" text-anchor="middle">تغییرات منفی</text>
|
|
41
|
+
<text dy="1.75em" font-weight="400" font-size="13" fill="#475569" text-anchor="middle">خلقی</text>
|
|
42
|
+
</g>
|
|
43
|
+
<g transform="translate(552, 562.5)">
|
|
44
|
+
<text dy="-1.25em" font-weight="600" font-size="14" fill="#475569" text-anchor="middle">معیار E</text>
|
|
45
|
+
<text dy="0.25em" font-weight="400" font-size="13" fill="#475569" text-anchor="middle">برانگیختگی</text>
|
|
46
|
+
<text dy="1.75em" font-weight="400" font-size="13" fill="#475569" text-anchor="middle">و بیقراری</text>
|
|
47
|
+
</g>
|
|
48
|
+
</g>
|
|
49
|
+
<g transform="translate(110, 683)">
|
|
50
|
+
<g transform="translate(71, 0)">
|
|
51
|
+
<rect x="-18" width="18" height="18" fill="#BE123C" rx="5" />
|
|
52
|
+
<text x="-9" y="9" dy="0.3em" font-weight="500" font-size="13" fill="#FFFFFF" text-anchor="middle">4</text>
|
|
53
|
+
<text x="-25" y="9" dy="0.25em" font-weight="400" font-size="12" fill="#64748B" text-anchor="start">خیلی زیاد</text>
|
|
54
|
+
</g>
|
|
55
|
+
<g transform="translate(133, 0)">
|
|
56
|
+
<rect x="-18" width="18" height="18" fill="#BE123C" rx="5" />
|
|
57
|
+
<text x="-9" y="9" dy="0.3em" font-weight="500" font-size="13" fill="#FFFFFF" text-anchor="middle">3</text>
|
|
58
|
+
<text x="-25" y="9" dy="0.25em" font-weight="400" font-size="12" fill="#64748B" text-anchor="start">زیاد</text>
|
|
59
|
+
</g>
|
|
60
|
+
<g transform="translate(211, 0)">
|
|
61
|
+
<rect x="-18" width="18" height="18" fill="#BE123C" rx="5" />
|
|
62
|
+
<text x="-9" y="9" dy="0.3em" font-weight="500" font-size="13" fill="#FFFFFF" text-anchor="middle">2</text>
|
|
63
|
+
<text x="-25" y="9" dy="0.25em" font-weight="400" font-size="12" fill="#64748B" text-anchor="start">تا حدی</text>
|
|
64
|
+
</g>
|
|
65
|
+
<g transform="translate(532, 0)">
|
|
66
|
+
<rect x="-18" width="18" height="18" fill="#94A3B8" rx="5" />
|
|
67
|
+
<text x="-9" y="9" dy="0.3em" font-weight="500" font-size="13" fill="#FFFFFF" text-anchor="middle">1</text>
|
|
68
|
+
<text x="-25" y="9" dy="0.25em" font-weight="400" font-size="12" fill="#64748B" text-anchor="start">کمی</text>
|
|
69
|
+
</g>
|
|
70
|
+
<g transform="translate(596, 0)">
|
|
71
|
+
<rect x="-18" width="18" height="18" fill="#94A3B8" rx="5" />
|
|
72
|
+
<text x="-9" y="9" dy="0.3em" font-weight="500" font-size="13" fill="#FFFFFF" text-anchor="middle">0</text>
|
|
73
|
+
<text x="-25" y="9" dy="0.25em" font-weight="400" font-size="12" fill="#64748B" text-anchor="start">اصلا</text>
|
|
74
|
+
</g>
|
|
75
|
+
<g transform="translate(298, -5)">
|
|
76
|
+
<text dy="0.8em" font-size="12" fill="#64748B" text-anchor="middle"><tspan font-weight="400">پـاسـخ</tspan>
|
|
77
|
+
<tspan font-weight="600" >مثـبـت</tspan></text>
|
|
78
|
+
<text dy="2em" font-size="12" font-weight="400" fill="#64748B" text-anchor="middle">به وجود نشانه</text>
|
|
79
|
+
<g transform="translate(-59, 9.5)">
|
|
80
|
+
<path d="M11.25 5L0.749999 5M0.749999 5L5.25 0.5M0.749999 5L5.25 9.5" stroke="#94A3B8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
81
|
+
</g>
|
|
82
|
+
</g>
|
|
83
|
+
|
|
84
|
+
<g transform="translate(400, -5)">
|
|
85
|
+
<text dy="0.8em" font-size="12" fill="#64748B" text-anchor="middle"><tspan font-weight="400">پـاسـخ</tspan>
|
|
86
|
+
<tspan font-weight="600" >منـفی</tspan></text>
|
|
87
|
+
<text dy="2em" font-size="12" font-weight="400" fill="#64748B" text-anchor="middle">به وجود نشانه</text>
|
|
88
|
+
<line x1="-51" y1="0.5" x2="-51" y2="27.5" stroke="#CBD5E1" stroke-linecap="round" stroke-dasharray="4 4"/>
|
|
89
|
+
<g transform="translate(47, 9.5)">
|
|
90
|
+
<path d="M0.75 5L11.25 5M11.25 5L6.75 0.5M11.25 5L6.75 9.5" stroke="#94A3B8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
91
|
+
</g>
|
|
92
|
+
</g>
|
|
93
|
+
</g>
|
|
94
|
+
</g>
|
|
95
|
+
{{/layout}}
|