@baravak/risloo-profile-cli 3.1.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/.github/workflows/push.yml +14 -0
- package/.prettierrc +16 -0
- package/.yarn/releases/yarn-1.22.19.cjs +147529 -0
- package/.yarnrc.yml +1 -0
- package/README.md +98 -0
- package/bin/risloo.js +9 -0
- package/package.json +44 -0
- package/src/Gift.js +29 -0
- package/src/Profile.js +405 -0
- package/src/cli-commands/Executor.js +118 -0
- package/src/cli-commands/ExtractExecutor.js +194 -0
- package/src/cli-commands/GiftExecutor.js +56 -0
- package/src/cli-commands/utilities/BaseOps.js +71 -0
- package/src/cli-commands/utilities/Benchmarker.js +88 -0
- package/src/cli-commands/utilities/CustomErrors.js +14 -0
- package/src/cli-commands/utilities/Response.js +59 -0
- package/src/cli-commands/utilities/STATUSES.js +16 -0
- package/src/cli-commands/utilities/Status.js +9 -0
- package/src/cli.js +125 -0
- package/src/handlebars/helpers/abs.js +8 -0
- package/src/handlebars/helpers/addCommas.js +8 -0
- package/src/handlebars/helpers/array.js +8 -0
- package/src/handlebars/helpers/assignGlobal.js +9 -0
- package/src/handlebars/helpers/boolean.js +19 -0
- package/src/handlebars/helpers/ceil.js +8 -0
- package/src/handlebars/helpers/concat.js +8 -0
- package/src/handlebars/helpers/cos.js +8 -0
- package/src/handlebars/helpers/displacePoint.js +11 -0
- package/src/handlebars/helpers/ellipsisChars.js +10 -0
- package/src/handlebars/helpers/ellipsisLines.js +11 -0
- package/src/handlebars/helpers/first.js +11 -0
- package/src/handlebars/helpers/floor.js +8 -0
- package/src/handlebars/helpers/forLoop.js +15 -0
- package/src/handlebars/helpers/getArrOfProp.js +8 -0
- package/src/handlebars/helpers/isArray.js +8 -0
- package/src/handlebars/helpers/join.js +10 -0
- package/src/handlebars/helpers/last.js +11 -0
- package/src/handlebars/helpers/lineWrap.js +28 -0
- package/src/handlebars/helpers/math.js +24 -0
- package/src/handlebars/helpers/modulo.js +8 -0
- package/src/handlebars/helpers/normalizeAngle.js +7 -0
- package/src/handlebars/helpers/object.js +8 -0
- package/src/handlebars/helpers/objectEntries.js +8 -0
- package/src/handlebars/helpers/polarToCartesian.js +14 -0
- package/src/handlebars/helpers/prepend.js +10 -0
- package/src/handlebars/helpers/profiles/bar.js +45 -0
- package/src/handlebars/helpers/profiles/calcGaugeSidePoints.js +34 -0
- package/src/handlebars/helpers/profiles/gauge.js +61 -0
- package/src/handlebars/helpers/profiles/polygon.js +40 -0
- package/src/handlebars/helpers/reverse.js +9 -0
- package/src/handlebars/helpers/roundToTwo.js +8 -0
- package/src/handlebars/helpers/setVar.js +8 -0
- package/src/handlebars/helpers/sin.js +8 -0
- package/src/handlebars/helpers/split.js +8 -0
- package/src/handlebars/helpers/tan.js +8 -0
- package/src/handlebars/helpers/ternary.js +9 -0
- package/src/handlebars/helpers/toDeg.js +8 -0
- package/src/handlebars/helpers/toRad.js +8 -0
- package/src/handlebars/helpers/withGroup.js +20 -0
- package/src/handlebars/helpers/wrapOnNewline.js +11 -0
- package/src/handlebars/helpers.js +86 -0
- package/src/handlebars/importPartials.js +40 -0
- package/src/handlebars/init.js +15 -0
- package/src/publish/bot.js +91 -0
- package/src/publish/json/gift/gift.json +16 -0
- package/src/publish/json/profiles/16PF93.json +201 -0
- package/src/publish/json/profiles/AEQ93.json +96 -0
- package/src/publish/json/profiles/AMS93.json +102 -0
- package/src/publish/json/profiles/AMS9A.json +102 -0
- package/src/publish/json/profiles/BAOMEIS93.json +99 -0
- package/src/publish/json/profiles/BEQI93.json +1589 -0
- package/src/publish/json/profiles/CAATS93.json +11355 -0
- package/src/publish/json/profiles/CADS93.json +351 -0
- package/src/publish/json/profiles/CARSP93.json +96 -0
- package/src/publish/json/profiles/CERQ93.json +106 -0
- package/src/publish/json/profiles/CRAAS93.json +98 -0
- package/src/publish/json/profiles/CSI93.json +143 -0
- package/src/publish/json/profiles/DSWLS93.json +93 -0
- package/src/publish/json/profiles/EMSS93.json +116 -0
- package/src/publish/json/profiles/FACES93.json +106 -0
- package/src/publish/json/profiles/FTEPT93.json +102 -0
- package/src/publish/json/profiles/GMIT93.json +98 -0
- package/src/publish/json/profiles/HPL93.json +102 -0
- package/src/publish/json/profiles/IBT93.json +106 -0
- package/src/publish/json/profiles/IUS93.json +93 -0
- package/src/publish/json/profiles/JCSI93.json +102 -0
- package/src/publish/json/profiles/JPFQ93.json +1 -0
- package/src/publish/json/profiles/KJGI93.json +100 -0
- package/src/publish/json/profiles/LMIQ93.json +109 -0
- package/src/publish/json/profiles/MMFAD93.json +103 -0
- package/src/publish/json/profiles/MMFAD9A.json +103 -0
- package/src/publish/json/profiles/MOCI93.json +100 -0
- package/src/publish/json/profiles/OBQ4493.json +96 -0
- package/src/publish/json/profiles/PIES93.json +104 -0
- package/src/publish/json/profiles/PIES9A.json +104 -0
- package/src/publish/json/profiles/PMCIEF93.json +1 -0
- package/src/publish/json/profiles/PSWQ93.json +97 -0
- package/src/publish/json/profiles/RIASEC93.json +2511 -0
- package/src/publish/json/profiles/SAFE93.json +110 -0
- package/src/publish/json/profiles/SASQ93.json +92 -0
- package/src/publish/json/profiles/SCASP93.json +611 -0
- package/src/publish/json/profiles/SDCAQ93.json +96 -0
- package/src/publish/json/profiles/STAIY93.json +98 -0
- package/src/publish/json/profiles/WAQ93.json +100 -0
- package/src/publish/json/profiles/YBOCS93.json +1322 -0
- package/src/publish/json/profiles/empty.json +139 -0
- package/src/publish/new-version.hbs +11 -0
- package/src/publish/test.js +109 -0
- package/src/qrcode/qrCodeGenerator.js +14 -0
- package/src/qrcode/qrRender.js +229 -0
- package/src/samples/16PF93.js +158 -0
- package/src/samples/AEQ93.js +121 -0
- package/src/samples/AMS93.js +139 -0
- package/src/samples/AMS9A.js +9 -0
- package/src/samples/BAOMEIS93.js +146 -0
- package/src/samples/BEQI93.js +255 -0
- package/src/samples/CAATS93.js +218 -0
- package/src/samples/CADS93.js +161 -0
- package/src/samples/CARSP93.js +134 -0
- package/src/samples/CERQ93.js +195 -0
- package/src/samples/CRAAS93.js +141 -0
- package/src/samples/CSI93.js +315 -0
- package/src/samples/DSWLS93.js +112 -0
- package/src/samples/EMSS93.js +178 -0
- package/src/samples/FACES93.js +225 -0
- package/src/samples/FTEPT93.js +167 -0
- package/src/samples/GMIT93.js +142 -0
- package/src/samples/HPL93.js +132 -0
- package/src/samples/IBT93.js +99 -0
- package/src/samples/IUS93.js +204 -0
- package/src/samples/JCSI93.js +174 -0
- package/src/samples/JPFQ93.js +74 -0
- package/src/samples/KJGI93.js +136 -0
- package/src/samples/LMIQ93.js +188 -0
- package/src/samples/MMFAD93.js +135 -0
- package/src/samples/MMFAD9A.js +31 -0
- package/src/samples/MOCI93.js +128 -0
- package/src/samples/OBQ4493.js +132 -0
- package/src/samples/PIES93.js +228 -0
- package/src/samples/PIES9A.js +32 -0
- package/src/samples/PMCIEF93.js +64 -0
- package/src/samples/PSWQ93.js +126 -0
- package/src/samples/RIASEC93.js +144 -0
- package/src/samples/SAFE93.js +64 -0
- package/src/samples/SASQ93.js +130 -0
- package/src/samples/SCASP93.js +207 -0
- package/src/samples/SDCAQ93.js +174 -0
- package/src/samples/STAIY93.js +159 -0
- package/src/samples/WAQ93.js +208 -0
- package/src/samples/YBOCS93.js +583 -0
- package/src/samples/empty.js +53 -0
- package/views/gift.hbs +160 -0
- package/views/profiles/fonts.css +18 -0
- package/views/profiles/layout.hbs +27 -0
- package/views/profiles/samples/16PF93.hbs +54 -0
- package/views/profiles/samples/AEQ93.hbs +31 -0
- package/views/profiles/samples/AMS93.hbs +97 -0
- package/views/profiles/samples/AMS9A.hbs +1 -0
- package/views/profiles/samples/BAOMEIS93.hbs +48 -0
- package/views/profiles/samples/BEQI93.hbs +118 -0
- package/views/profiles/samples/CAATS93.hbs +251 -0
- package/views/profiles/samples/CADS93.hbs +104 -0
- package/views/profiles/samples/CARSP93.hbs +26 -0
- package/views/profiles/samples/CERQ93.hbs +115 -0
- package/views/profiles/samples/CRAAS93.hbs +88 -0
- package/views/profiles/samples/CSI93_1.hbs +110 -0
- package/views/profiles/samples/CSI93_2.hbs +76 -0
- package/views/profiles/samples/DSWLS93.hbs +26 -0
- package/views/profiles/samples/EMSS93.hbs +101 -0
- package/views/profiles/samples/FACES93_1.hbs +107 -0
- package/views/profiles/samples/FACES93_2.hbs +51 -0
- package/views/profiles/samples/FTEPT93.hbs +67 -0
- package/views/profiles/samples/GMIT93.hbs +45 -0
- package/views/profiles/samples/HPL93.hbs +36 -0
- package/views/profiles/samples/IBT93.hbs +67 -0
- package/views/profiles/samples/IUS93.hbs +123 -0
- package/views/profiles/samples/JCSI93.hbs +65 -0
- package/views/profiles/samples/JPFQ93.hbs +44 -0
- package/views/profiles/samples/KJGI93.hbs +57 -0
- package/views/profiles/samples/LMIQ93.hbs +82 -0
- package/views/profiles/samples/MMFAD93.hbs +35 -0
- package/views/profiles/samples/MMFAD9A.hbs +1 -0
- package/views/profiles/samples/MOCI93.hbs +60 -0
- package/views/profiles/samples/OBQ4493.hbs +61 -0
- package/views/profiles/samples/PIES93.hbs +67 -0
- package/views/profiles/samples/PIES9A.hbs +1 -0
- package/views/profiles/samples/PMCIEF93.hbs +8 -0
- package/views/profiles/samples/PSWQ93.hbs +32 -0
- package/views/profiles/samples/RIASEC93.hbs +38 -0
- package/views/profiles/samples/SAFE93.hbs +118 -0
- package/views/profiles/samples/SASQ93.hbs +45 -0
- package/views/profiles/samples/SCASP93.hbs +94 -0
- package/views/profiles/samples/SDCAQ93.hbs +68 -0
- package/views/profiles/samples/STAIY93.hbs +67 -0
- package/views/profiles/samples/WAQ93.hbs +74 -0
- package/views/profiles/samples/YBOCS93_1.hbs +96 -0
- package/views/profiles/samples/YBOCS93_2.hbs +115 -0
- package/views/profiles/samples/YBOCS93_3.hbs +93 -0
- package/views/profiles/samples/empty.hbs +10 -0
- package/views/profiles/sidebar.hbs +193 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<linearGradient id="horizontal-shadow">
|
|
5
|
+
<stop offset="0%" stop-color="black" />
|
|
6
|
+
<stop offset="100%" stop-color="transparent" />
|
|
7
|
+
</linearGradient>
|
|
8
|
+
<linearGradient id="vertical-shadow" gradientTransform="rotate(90)">
|
|
9
|
+
<stop offset="0%" stop-color="black" />
|
|
10
|
+
<stop offset="100%" stop-color="transparent" />
|
|
11
|
+
</linearGradient>
|
|
12
|
+
</defs>
|
|
13
|
+
|
|
14
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
15
|
+
<g transform="translate({{math spec.items.offsetX '+' spec.items.label.rect.width}}, 0)">
|
|
16
|
+
{{setVar "tickTotalHeight" (math (math (math (math 2 '*' spec.items.ticks.heightOffset) '+' spec.items.totalHeights.[0]) '+' spec.items.offsetY2) '+' spec.items.totalHeights.[1])}}
|
|
17
|
+
{{#each itemsTicks as | tick index |}}
|
|
18
|
+
<g transform="translate({{tick.leftPos}}, 0)">
|
|
19
|
+
<line x1="0" y1="0" x2="0" y2="{{../tickTotalHeight}}" stroke="#E4E4E7" stroke-dasharray="3.5" stroke-linecap="round" stroke-width="2"/>
|
|
20
|
+
<text x="-{{@root.spec.items.ticks.numberOffset.x}}" y="{{@root.spec.items.ticks.numberOffset.y}}" fill="#A1A1AA" text-anchor="start" font-size="16" font-weight="500" dy="5">{{tick.number}}</text>
|
|
21
|
+
</g>
|
|
22
|
+
{{/each}}
|
|
23
|
+
</g>
|
|
24
|
+
<g transform="translate(0, {{spec.items.ticks.heightOffset}})">
|
|
25
|
+
<g transform="rotate(-90) translate(-{{spec.items.totalHeights.[0]}}, 0)">
|
|
26
|
+
<rect x="0" y="0" width="{{spec.items.totalHeights.[0]}}" height="{{spec.items.label.rect.width}}" fill="{{spec.items.label.colors.[0]}}" rx="{{spec.items.label.rect.borderRadius}}"/>
|
|
27
|
+
<text x="{{math spec.items.totalHeights.[0] '/' 2}}" y="{{math spec.items.label.rect.width '/' 2}}" text-anchor="middle" font-size="18" font-weight="500" fill="white" dy="5">{{raw.[0].label.fr}}</text>
|
|
28
|
+
</g>
|
|
29
|
+
<g transform="translate({{math spec.items.offsetX '+' spec.items.label.rect.width}}, 0)">
|
|
30
|
+
{{#each items.[0] as | item index |}}
|
|
31
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
32
|
+
<g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
|
|
33
|
+
<path d="M 0 0 h {{math item.width '-' itemsSpec.rect.borderRadius}} a {{itemsSpec.rect.borderRadius}} {{itemsSpec.rect.borderRadius}} 180 0 1 0 {{itemsSpec.rect.height}} h -{{math item.width '-' itemsSpec.rect.borderRadius}} z" fill="{{item.fill}}" fill-opacity="{{item.opacity}}"/>
|
|
34
|
+
<g transform="translate(0, {{itemsSpec.rect.borderRadius}})">
|
|
35
|
+
<text x="-{{itemsSpec.label.offsetX}}" y="0" fill="#52525B" text-anchor="start" font-size="18" font-weight="400" dy="3">{{item.label.fr}}</text>
|
|
36
|
+
<text x="{{math item.width '-' itemsSpec.rect.borderRadius}}" y="0" fill="white" text-anchor="middle" font-size="20" font-weight="600" dy="6">{{item.mark}}</text>
|
|
37
|
+
</g>
|
|
38
|
+
</g>
|
|
39
|
+
{{/with}}
|
|
40
|
+
{{/each}}
|
|
41
|
+
|
|
42
|
+
<g transform="translate(-1, -1)">
|
|
43
|
+
<rect x="0" y="0" width="1" height="{{math spec.items.totalHeights.[0] '+' 2}}" fill="#FFFFFF" rx="1"/>
|
|
44
|
+
<rect x="1" y="0" width="5" height="{{math spec.items.totalHeights.[0] '+' 2}}" fill="url('#horizontal-shadow')" fill-opacity="0.2"/>
|
|
45
|
+
</g>
|
|
46
|
+
</g>
|
|
47
|
+
|
|
48
|
+
{{setVar "rawLeftPos" (math (math (math spec.items.label.rect.width '+' spec.items.offsetX) '+' (math spec.items.maxValue '*' spec.items.widthCoeff)) '+' spec.raw.offsetX)}}
|
|
49
|
+
<g transform="translate({{rawLeftPos}}, {{spec.items.totalHeights.[0]}})">
|
|
50
|
+
<path d="M 0 0 v -{{math (math spec.raw.heightCoeff '*' spec.raw.maxValues.[0]) '-' spec.raw.rect.borderRadius}} a {{spec.raw.rect.borderRadius}} {{spec.raw.rect.borderRadius}} 180 0 1 {{spec.raw.rect.width}} 0 v {{math (math spec.raw.heightCoeff '*' spec.raw.maxValues.[0]) '-' spec.raw.rect.borderRadius}} z" fill="#F4F4F5"/>
|
|
51
|
+
<path d="M 0 0 v -{{math raw.[0].height '-' spec.raw.rect.borderRadius}} a {{spec.raw.rect.borderRadius}} {{spec.raw.rect.borderRadius}} 180 0 1 {{spec.raw.rect.width}} 0 v {{math raw.[0].height '-' spec.raw.rect.borderRadius}} z" fill="#52525B"/>
|
|
52
|
+
<text x="{{spec.raw.rect.borderRadius}}" y="-{{math raw.[0].height '-' spec.raw.rect.borderRadius}}" text-anchor="middle" font-size="20" font-weight="700" fill="white" dy="6" transform="translate(0, 10)">{{raw.[0].mark}}</text>
|
|
53
|
+
<text x="0" y="-22" text-anchor="end" font--size="18" font-weight="500" fill="#71717A" dy="5" transform="rotate(-90)">نمره کل</text>
|
|
54
|
+
<g transform="scale(1, -1)">
|
|
55
|
+
<rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="1" fill="#FFFFFF" rx="1"/>
|
|
56
|
+
<rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="5" fill="url('#vertical-shadow')" fill-opacity="0.2"/>
|
|
57
|
+
</g>
|
|
58
|
+
|
|
59
|
+
<g transform="translate({{math spec.raw.rect.width '+' spec.raw.ticks.line.offsetX}}, 0)">
|
|
60
|
+
{{#each rawTicks.[0] as | tick index |}}
|
|
61
|
+
<line x1="0" y1="-{{tick.bottomPos}}" x2="{{@root.spec.raw.ticks.line.width}}" y2="-{{tick.bottomPos}}" stroke="#E4E4E7" stroke-dasharray="3" stroke-linecap="round" stroke-width="2"/>
|
|
62
|
+
<g transform="translate({{math @root.spec.raw.ticks.line.width '+' @root.spec.raw.ticks.number.offsetX}}, -{{tick.bottomPos}})">
|
|
63
|
+
<text x="0" y="0" fill="#A1A1AA" text-anchor="end" font-size="14" font-weight="500" dy="4">{{tick.number}}</text>
|
|
64
|
+
</g>
|
|
65
|
+
{{/each}}
|
|
66
|
+
</g>
|
|
67
|
+
</g>
|
|
68
|
+
</g>
|
|
69
|
+
<g transform="translate(0, {{math (math spec.items.ticks.heightOffset '+' spec.items.totalHeights.[0]) '+' spec.items.offsetY2}})">
|
|
70
|
+
<g transform="rotate(-90) translate(-{{spec.items.totalHeights.[1]}}, 0)">
|
|
71
|
+
<rect x="0" y="0" width="{{spec.items.totalHeights.[1]}}" height="{{spec.items.label.rect.width}}" fill="{{spec.items.label.colors.[1]}}" rx="{{spec.items.label.rect.borderRadius}}"/>
|
|
72
|
+
<text x="{{math spec.items.totalHeights.[1] '/' 2}}" y="{{math spec.items.label.rect.width '/' 2}}" text-anchor="middle" font-size="18" font-weight="500" fill="white" dy="5">{{raw.[1].label.fr}}</text>
|
|
73
|
+
</g>
|
|
74
|
+
<g transform="translate({{math spec.items.offsetX '+' spec.items.label.rect.width}}, 0)">
|
|
75
|
+
{{#each items.[1] as | item index |}}
|
|
76
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
77
|
+
<g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
|
|
78
|
+
<path d="M 0 0 h {{math item.width '-' itemsSpec.rect.borderRadius}} a {{itemsSpec.rect.borderRadius}} {{itemsSpec.rect.borderRadius}} 180 0 1 0 {{itemsSpec.rect.height}} h -{{math item.width '-' itemsSpec.rect.borderRadius}} z" fill="{{item.fill}}" fill-opacity="{{item.opacity}}"/>
|
|
79
|
+
<g transform="translate(0, {{itemsSpec.rect.borderRadius}})">
|
|
80
|
+
<text x="-{{itemsSpec.label.offsetX}}" y="0" fill="#52525B" text-anchor="start" font-size="18" font-weight="400" dy="3">{{item.label.fr}}</text>
|
|
81
|
+
<text x="{{math item.width '-' itemsSpec.rect.borderRadius}}" y="0" fill="white" text-anchor="middle" font-size="20" font-weight="600" dy="6">{{item.mark}}</text>
|
|
82
|
+
</g>
|
|
83
|
+
</g>
|
|
84
|
+
{{/with}}
|
|
85
|
+
{{/each}}
|
|
86
|
+
|
|
87
|
+
<g transform="translate(-1, -1)">
|
|
88
|
+
<rect x="0" y="0" width="1" height="{{math spec.items.totalHeights.[1] '+' 2}}" fill="#FFFFFF" rx="1"/>
|
|
89
|
+
<rect x="1" y="0" width="5" height="{{math spec.items.totalHeights.[1] '+' 2}}" fill="url('#horizontal-shadow')" fill-opacity="0.2"/>
|
|
90
|
+
</g>
|
|
91
|
+
</g>
|
|
92
|
+
|
|
93
|
+
<g transform="translate({{rawLeftPos}}, {{spec.items.totalHeights.[1]}})">
|
|
94
|
+
<path d="M 0 0 v -{{math (math spec.raw.heightCoeff '*' spec.raw.maxValues.[1]) '-' spec.raw.rect.borderRadius}} a {{spec.raw.rect.borderRadius}} {{spec.raw.rect.borderRadius}} 180 0 1 {{spec.raw.rect.width}} 0 v {{math (math spec.raw.heightCoeff '*' spec.raw.maxValues.[1]) '-' spec.raw.rect.borderRadius}} z" fill="#F4F4F5"/>
|
|
95
|
+
<path d="M 0 0 v -{{math raw.[1].height '-' spec.raw.rect.borderRadius}} a {{spec.raw.rect.borderRadius}} {{spec.raw.rect.borderRadius}} 180 0 1 {{spec.raw.rect.width}} 0 v {{math raw.[1].height '-' spec.raw.rect.borderRadius}} z" fill="#52525B"/>
|
|
96
|
+
<text x="{{spec.raw.rect.borderRadius}}" y="-{{math raw.[1].height '-' spec.raw.rect.borderRadius}}" text-anchor="middle" font-size="20" font-weight="700" fill="white" transform="translate(0, 10)" dy="6">{{raw.[1].mark}}</text>
|
|
97
|
+
<text x="0" y="-22" text-anchor="end" font--size="18" font-weight="500" fill="#71717A" dy="5" transform="rotate(-90)">نمره کل</text>
|
|
98
|
+
<g transform="scale(1, -1)">
|
|
99
|
+
<rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="1" fill="#FFFFFF" rx="1"/>
|
|
100
|
+
<rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="5" fill="url('#vertical-shadow')" fill-opacity="0.2"/>
|
|
101
|
+
</g>
|
|
102
|
+
|
|
103
|
+
<g transform="translate({{math spec.raw.rect.width '+' spec.raw.ticks.line.offsetX}}, 0)">
|
|
104
|
+
{{#each rawTicks.[1] as | tick index |}}
|
|
105
|
+
<line x1="0" y1="-{{tick.bottomPos}}" x2="{{@root.spec.raw.ticks.line.width}}" y2="-{{tick.bottomPos}}" stroke="#E4E4E7" stroke-dasharray="3" stroke-linecap="round" stroke-width="2"/>
|
|
106
|
+
<g transform="translate({{math @root.spec.raw.ticks.line.width '+' @root.spec.raw.ticks.number.offsetX}}, -{{tick.bottomPos}})">
|
|
107
|
+
<text x="0" y="0" fill="#A1A1AA" text-anchor="end" font-size="14" font-weight="500" dy="4">{{tick.number}}</text>
|
|
108
|
+
</g>
|
|
109
|
+
{{/each}}
|
|
110
|
+
</g>
|
|
111
|
+
</g>
|
|
112
|
+
</g>
|
|
113
|
+
</g>
|
|
114
|
+
|
|
115
|
+
{{/layout}}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
4
|
+
<g transform="translate(525, 526)">
|
|
5
|
+
<g fill="none" stroke="#E1EDF2">
|
|
6
|
+
{{assignGlobal "radius" spec.polygons.radius}}
|
|
7
|
+
{{assignGlobal "dist" (math (math spec.polygons.radius '-' spec.polygons.centerOffset) '/' spec.items.maxValue)}}
|
|
8
|
+
{{#with spec.polygons as | polygonsSpec |}}
|
|
9
|
+
{{#forLoop 0 (math @root.spec.items.maxValue '+' 1) 1}}
|
|
10
|
+
{{polygon polygonsSpec.n @root.radius polygonsSpec.startAngle}}
|
|
11
|
+
{{assignGlobal "radius" (math @root.radius '-' @root.dist)}}
|
|
12
|
+
{{/forLoop}}
|
|
13
|
+
{{/with}}
|
|
14
|
+
</g>
|
|
15
|
+
<g fill="none" stroke="#111827" stroke-width="4">
|
|
16
|
+
{{polygon spec.polygons.n (getArrOfProp items 'radius') spec.polygons.startAngle}}
|
|
17
|
+
</g>
|
|
18
|
+
<g fill="white">
|
|
19
|
+
{{#each items as |item index|}}
|
|
20
|
+
{{setVar "point" (polarToCartesian item.radius item.angle)}}
|
|
21
|
+
<g transform="translate({{point.x}}, {{point.y}})">
|
|
22
|
+
<circle
|
|
23
|
+
cx="0"
|
|
24
|
+
cy="0"
|
|
25
|
+
r="{{@root.spec.items.dataPoints.radius}}"
|
|
26
|
+
stroke="{{item.fill}}"
|
|
27
|
+
stroke-width="2" />
|
|
28
|
+
<text
|
|
29
|
+
x="0"
|
|
30
|
+
y="0"
|
|
31
|
+
font-size="16"
|
|
32
|
+
font-weight="600"
|
|
33
|
+
text-anchor="middle"
|
|
34
|
+
dy="5"
|
|
35
|
+
fill="{{item.fill}}">
|
|
36
|
+
{{item.mark}}
|
|
37
|
+
</text>
|
|
38
|
+
</g>
|
|
39
|
+
{{/each}}
|
|
40
|
+
</g>
|
|
41
|
+
<g fill="#4B5563" font-size="16" dy="5">
|
|
42
|
+
{{#each items as |item index|}}
|
|
43
|
+
{{setVar "point" (polarToCartesian (math @root.spec.polygons.radius '+' @root.spec.items.labels.offset) item.angle)}}
|
|
44
|
+
<g transform="translate({{point.x}}, {{point.y}})">
|
|
45
|
+
<text
|
|
46
|
+
x="0"
|
|
47
|
+
y="0"
|
|
48
|
+
transform="translate(0, -{{@root.spec.items.labels.paddingY}})"
|
|
49
|
+
font-weight="600"
|
|
50
|
+
text-anchor="middle">
|
|
51
|
+
{{item.label.name}}
|
|
52
|
+
</text>
|
|
53
|
+
<text
|
|
54
|
+
x="0"
|
|
55
|
+
y="0"
|
|
56
|
+
transform="translate(0, +{{@root.spec.items.labels.paddingY}})"
|
|
57
|
+
text-anchor="middle">
|
|
58
|
+
({{item.label.type}})
|
|
59
|
+
</text>
|
|
60
|
+
</g>
|
|
61
|
+
{{/each}}
|
|
62
|
+
</g>
|
|
63
|
+
<g>
|
|
64
|
+
{{#each ticks as |tick index|}}
|
|
65
|
+
{{setVar "point" (displacePoint (polarToCartesian tick.radius tick.angle) tick.disVector tick.disValue)}}
|
|
66
|
+
<g transform="translate({{point.x}}, {{point.y}})">
|
|
67
|
+
<rect
|
|
68
|
+
x="0"
|
|
69
|
+
y="0"
|
|
70
|
+
width="{{@root.spec.items.ticks.rectDim}}"
|
|
71
|
+
height="{{@root.spec.items.ticks.rectDim}}"
|
|
72
|
+
transform="translate(-{{math @root.spec.items.ticks.rectDim '/' 2}},-{{math @root.spec.items.ticks.rectDim '/' 2}})"
|
|
73
|
+
fill="white" />
|
|
74
|
+
<text
|
|
75
|
+
x="0"
|
|
76
|
+
y="0"
|
|
77
|
+
font-size="12"
|
|
78
|
+
text-anchor="middle"
|
|
79
|
+
dy="3"
|
|
80
|
+
fill="#9CA3AF">
|
|
81
|
+
{{tick.number}}
|
|
82
|
+
</text>
|
|
83
|
+
</g>
|
|
84
|
+
{{/each}}
|
|
85
|
+
</g>
|
|
86
|
+
</g>
|
|
87
|
+
</g>
|
|
88
|
+
{{/layout}}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<clipPath id="item-bar">
|
|
5
|
+
{{#with spec.items.rect.itemBar}}
|
|
6
|
+
<rect x="0" y="0" width="{{width}}" height="{{height}}" rx="{{br}}"/>
|
|
7
|
+
{{/with}}
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
10
|
+
|
|
11
|
+
<g transform="translate(0, {{spec.profile.padding.y}})">
|
|
12
|
+
<g transform="translate({{math spec.profile.dimensions.width '-' spec.profile.padding.x}}, 0)">
|
|
13
|
+
|
|
14
|
+
<g transform="translate(0, 0)" font-size="12" font-weight="500" fill="#A1A1AA" text-anchor="start">
|
|
15
|
+
<g transform="translate(0, {{math 34 '/' 2}})">
|
|
16
|
+
<g transform="translate(-{{spec.items.rightPosArr.[0]}}, 0)">
|
|
17
|
+
<text x="0" y="0" dy="3">گروه</text>
|
|
18
|
+
</g>
|
|
19
|
+
<g transform="translate(-{{spec.items.rightPosArr.[1]}}, 0)">
|
|
20
|
+
<text x="0" y="0" dy="3">نوع اختلال / بیماری</text>
|
|
21
|
+
</g>
|
|
22
|
+
<g transform="translate(-{{spec.items.rightPosArr.[2]}}, 0)">
|
|
23
|
+
<text x="0" y="0" dy="3">گروههای دیگر بیماری که امکان وجود آنها باید بررسی و حذف شود</text>
|
|
24
|
+
</g>
|
|
25
|
+
<g transform="translate(-{{spec.items.rightPosArr.[3]}}, 0)">
|
|
26
|
+
<text x="0" y="0" dy="3">نمره</text>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
|
|
31
|
+
{{setVar "topPos" (math spec.items.rect.distanceY '+' 4)}}
|
|
32
|
+
|
|
33
|
+
{{#each itemsGroups.[0] as | item itemIndex |}}
|
|
34
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
35
|
+
{{#unless @first}}
|
|
36
|
+
<g transform="translate(0, {{@root.topPos}})" font-size="12" font-weight="400" fill="#3F3F46" text-anchor="start">
|
|
37
|
+
<rect x="0" y="0" width="{{itemsSpec.rect.width}}" height="{{itemsSpec.rect.height}}" rx="{{itemsSpec.rect.br}}" fill="{{lookup itemsSpec.rect.colors (modulo (math itemIndex '-' 1) 2)}}" transform="scale(-1, 1)"/>
|
|
38
|
+
<g transform="translate(0, {{math itemsSpec.rect.height '*' 0.5}})">
|
|
39
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[0]}}, 0)">
|
|
40
|
+
<text x="0" y="0" dy="2.5" class="eng-font" font-family="Dana">{{ternary (boolean itemIndex '===' 1) 'A الف' 'A'}}</text>
|
|
41
|
+
</g>
|
|
42
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[1]}}, 0)">
|
|
43
|
+
<text x="0" y="0" dy="2.5">{{ternary (boolean itemIndex '===' 1) 'بیش فعالی / اختلال توجه نوع بیش جنب بدون تأمل' 'بیش فعالی / اختلال توجه نوع فاقد تمرکز حواس'}}</text>
|
|
44
|
+
</g>
|
|
45
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[2]}}, 0)">
|
|
46
|
+
<text x="0" y="0" dy="2.5" class="eng-font" font-family="Dana">{{join item.relatedGroups ' , '}}</text>
|
|
47
|
+
</g>
|
|
48
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[3]}}, 0)">
|
|
49
|
+
<text x="0" y="0" dy="2.5">{{item.mark}}</text>
|
|
50
|
+
</g>
|
|
51
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[4]}}, 0)" font-size="10" fill="#A1A1AA" text-anchor="end">
|
|
52
|
+
<text x="0" y="0" dy="2.5">{{itemsSpec.minValue}}</text>
|
|
53
|
+
<g transform="translate(10, -{{math itemsSpec.rect.itemBar.height '/' 2}})">
|
|
54
|
+
<rect x="0" y="0" width="{{itemsSpec.rect.itemBar.width}}" height="{{itemsSpec.rect.itemBar.height}}" fill="{{itemsSpec.rect.itemBar.defaultFill}}" clip-path="url(#item-bar)"/>
|
|
55
|
+
<rect x="0" y="0" width="{{item.width}}" height="{{itemsSpec.rect.itemBar.height}}" fill="{{itemsSpec.rect.itemBar.fill}}" clip-path="url(#item-bar)"/>
|
|
56
|
+
</g>
|
|
57
|
+
<text x="90" y="0" dy="2.5">{{lookup itemsSpec.maxValues item.label.eng}}</text>
|
|
58
|
+
</g>
|
|
59
|
+
</g>
|
|
60
|
+
</g>
|
|
61
|
+
{{assignGlobal "topPos" (math (math @root.topPos '+' itemsSpec.rect.height) '+' itemsSpec.rect.offsetY)}}
|
|
62
|
+
{{/unless}}
|
|
63
|
+
{{/with}}
|
|
64
|
+
{{/each}}
|
|
65
|
+
|
|
66
|
+
{{#each itemsGroups as | items itemsIndex |}}
|
|
67
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
68
|
+
<g transform="translate(0, {{@root.topPos}})" font-size="12" font-weight="400" fill="#3F3F46" text-anchor="start">
|
|
69
|
+
<rect x="0" y="0" width="{{itemsSpec.rect.width}}" height="{{math itemsSpec.rect.height '*' items.length}}" rx="{{itemsSpec.rect.br}}" fill="{{lookup itemsSpec.rect.colors (modulo itemsIndex 2)}}" transform="scale(-1, 1)"/>
|
|
70
|
+
{{#each items as | item itemIndex |}}
|
|
71
|
+
<g transform="translate(0, {{math itemsSpec.rect.height '*' (math itemIndex '+' 0.5)}})">
|
|
72
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[1]}}, 0)">
|
|
73
|
+
<text x="0" y="0" dy="2.5" xml:space="preserve">{{ternary @first item.label.fr (prepend item.label.fr " - ")}}</text>
|
|
74
|
+
</g>
|
|
75
|
+
{{#if @first}}
|
|
76
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[0]}}, 0)">
|
|
77
|
+
<text x="0" y="0" dy="2.5" class="eng-font" font-family="Dana">{{lookup (split item.label.group "_") 0}}</text>
|
|
78
|
+
</g>
|
|
79
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[2]}}, 0)">
|
|
80
|
+
<text x="0" y="0" dy="2.5" class="eng-font" font-family="Dana">{{join item.relatedGroups ' , '}}</text>
|
|
81
|
+
</g>
|
|
82
|
+
{{/if}}
|
|
83
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[3]}}, 0)">
|
|
84
|
+
<text x="0" y="0" dy="2.5">{{item.mark}}</text>
|
|
85
|
+
</g>
|
|
86
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[4]}}, 0)" font-size="10" fill="#A1A1AA" text-anchor="end">
|
|
87
|
+
<text x="0" y="0" dy="2.5">{{itemsSpec.minValue}}</text>
|
|
88
|
+
<g transform="translate(10, -{{math itemsSpec.rect.itemBar.height '/' 2}})">
|
|
89
|
+
<rect x="0" y="0" width="{{itemsSpec.rect.itemBar.width}}" height="{{itemsSpec.rect.itemBar.height}}" fill="{{itemsSpec.rect.itemBar.defaultFill}}" clip-path="url(#item-bar)"/>
|
|
90
|
+
<rect x="0" y="0" width="{{item.width}}" height="{{itemsSpec.rect.itemBar.height}}" fill="{{itemsSpec.rect.itemBar.fill}}" clip-path="url(#item-bar)"/>
|
|
91
|
+
</g>
|
|
92
|
+
<text x="90" y="0" dy="2.5">{{lookup itemsSpec.maxValues item.label.eng}}</text>
|
|
93
|
+
</g>
|
|
94
|
+
</g>
|
|
95
|
+
{{/each}}
|
|
96
|
+
</g>
|
|
97
|
+
{{assignGlobal "topPos" (math (math @root.topPos '+' (math itemsSpec.rect.height '*' items.length)) '+' itemsSpec.rect.offsetY)}}
|
|
98
|
+
{{/with}}
|
|
99
|
+
{{/each}}
|
|
100
|
+
|
|
101
|
+
{{#if (boolean variant '!==' 'raw')}}
|
|
102
|
+
<g transform="translate(-{{math spec.profile.dimensions.width '-' 65}}, {{math topPos '+' 25}})">
|
|
103
|
+
<text x="0" y="0" font-size="12" font-weight="400" fill="#71717A" text-anchor="start" dy="3">صفحه 1 از 2</text>
|
|
104
|
+
</g>
|
|
105
|
+
{{/if}}
|
|
106
|
+
|
|
107
|
+
</g>
|
|
108
|
+
</g>
|
|
109
|
+
|
|
110
|
+
{{/layout}}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<clipPath id="item-bar">
|
|
5
|
+
{{#with spec.items.rect.itemBar}}
|
|
6
|
+
<rect x="0" y="0" width="{{width}}" height="{{height}}" rx="{{br}}"/>
|
|
7
|
+
{{/with}}
|
|
8
|
+
</clipPath>
|
|
9
|
+
</defs>
|
|
10
|
+
|
|
11
|
+
<g transform="translate(0, {{spec.profile.padding.y}})">
|
|
12
|
+
<g transform="translate({{math spec.profile.dimensions.width '-' spec.profile.padding.x}}, 0)">
|
|
13
|
+
|
|
14
|
+
<g transform="translate(0, 0)" font-size="12" font-weight="500" fill="#A1A1AA" text-anchor="start">
|
|
15
|
+
<g transform="translate(0, {{math 34 '/' 2}})">
|
|
16
|
+
<g transform="translate(-{{spec.items.rightPosArr.[0]}}, 0)">
|
|
17
|
+
<text x="0" y="0" dy="3">گروه</text>
|
|
18
|
+
</g>
|
|
19
|
+
<g transform="translate(-{{spec.items.rightPosArr.[1]}}, 0)">
|
|
20
|
+
<text x="0" y="0" dy="3">نوع اختلال / بیماری</text>
|
|
21
|
+
</g>
|
|
22
|
+
<g transform="translate(-{{spec.items.rightPosArr.[2]}}, 0)">
|
|
23
|
+
<text x="0" y="0" dy="3">گروههای دیگر بیماری که امکان وجود آنها باید بررسی و حذف شود</text>
|
|
24
|
+
</g>
|
|
25
|
+
<g transform="translate(-{{spec.items.rightPosArr.[3]}}, 0)">
|
|
26
|
+
<text x="0" y="0" dy="3">نمره</text>
|
|
27
|
+
</g>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
|
|
31
|
+
{{setVar "topPos" (math spec.items.rect.distanceY '+' 4)}}
|
|
32
|
+
{{#each itemsGroups as | items itemsIndex |}}
|
|
33
|
+
{{#with @root.spec.items as | itemsSpec |}}
|
|
34
|
+
<g transform="translate(0, {{@root.topPos}})" font-size="12" font-weight="400" fill="#3F3F46" text-anchor="start">
|
|
35
|
+
<rect x="0" y="0" width="{{itemsSpec.rect.width}}" height="{{math itemsSpec.rect.height '*' items.length}}" rx="{{itemsSpec.rect.br}}" fill="{{lookup itemsSpec.rect.colors (modulo itemsIndex 2)}}" transform="scale(-1, 1)"/>
|
|
36
|
+
{{#each items as | item itemIndex |}}
|
|
37
|
+
<g transform="translate(0, {{math itemsSpec.rect.height '*' (math itemIndex '+' 0.5)}})">
|
|
38
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[1]}}, 0)">
|
|
39
|
+
<text x="0" y="0" dy="2.5" xml:space="preserve">{{ternary @first item.label.fr (prepend item.label.fr " - ")}}</text>
|
|
40
|
+
</g>
|
|
41
|
+
{{#if @first}}
|
|
42
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[0]}}, 0)">
|
|
43
|
+
<text x="0" y="0" dy="2.5" class="eng-font" font-family="Dana">{{lookup (split item.label.group "_") 0}}</text>
|
|
44
|
+
</g>
|
|
45
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[2]}}, 0)">
|
|
46
|
+
<text x="0" y="0" dy="2.5" class="eng-font" font-family="Dana">{{join item.relatedGroups ' , '}}</text>
|
|
47
|
+
</g>
|
|
48
|
+
{{/if}}
|
|
49
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[3]}}, 0)">
|
|
50
|
+
<text x="0" y="0" dy="2.5">{{item.mark}}</text>
|
|
51
|
+
</g>
|
|
52
|
+
<g transform="translate(-{{itemsSpec.rightPosArr.[4]}}, 0)" font-size="10" fill="#A1A1AA" text-anchor="end">
|
|
53
|
+
<text x="0" y="0" dy="2.5">{{itemsSpec.minValue}}</text>
|
|
54
|
+
<g transform="translate(10, -{{math itemsSpec.rect.itemBar.height '/' 2}})">
|
|
55
|
+
<rect x="0" y="0" width="{{itemsSpec.rect.itemBar.width}}" height="{{itemsSpec.rect.itemBar.height}}" fill="{{itemsSpec.rect.itemBar.defaultFill}}" clip-path="url(#item-bar)"/>
|
|
56
|
+
<rect x="0" y="0" width="{{item.width}}" height="{{itemsSpec.rect.itemBar.height}}" fill="{{itemsSpec.rect.itemBar.fill}}" clip-path="url(#item-bar)"/>
|
|
57
|
+
</g>
|
|
58
|
+
<text x="90" y="0" dy="2.5">{{lookup itemsSpec.maxValues item.label.eng}}</text>
|
|
59
|
+
</g>
|
|
60
|
+
</g>
|
|
61
|
+
{{/each}}
|
|
62
|
+
</g>
|
|
63
|
+
{{assignGlobal "topPos" (math (math @root.topPos '+' (math itemsSpec.rect.height '*' items.length)) '+' itemsSpec.rect.offsetY)}}
|
|
64
|
+
{{/with}}
|
|
65
|
+
{{/each}}
|
|
66
|
+
|
|
67
|
+
{{#if (boolean variant '!==' 'raw')}}
|
|
68
|
+
<g transform="translate(-{{math spec.profile.dimensions.width '-' 65}}, {{math topPos '+' 25}})">
|
|
69
|
+
<text x="0" y="0" font-size="12" font-weight="400" fill="#71717A" text-anchor="start" dy="3">صفحه 2 از 2</text>
|
|
70
|
+
</g>
|
|
71
|
+
{{/if}}
|
|
72
|
+
|
|
73
|
+
</g>
|
|
74
|
+
</g>
|
|
75
|
+
|
|
76
|
+
{{/layout}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
{{#with spec.raw.circle}}
|
|
5
|
+
<clipPath id="raw-circle-roll">
|
|
6
|
+
{{gauge R r brs (object start=angles.start end=angles.end) false}}
|
|
7
|
+
</clipPath>
|
|
8
|
+
{{/with}}
|
|
9
|
+
</defs>
|
|
10
|
+
|
|
11
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
12
|
+
<g transform="translate({{spec.raw.circle.R}}, {{spec.raw.circle.R}})">
|
|
13
|
+
{{#with spec.raw.circle}}
|
|
14
|
+
{{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=angles.end) direction clip-path="url(#raw-circle-roll)" fill="#F4F4F5" stroke="#E4E4E7"}}
|
|
15
|
+
{{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=@root.raw.zeta) direction clip-path="url(#raw-circle-roll)" fill=@root.spec.raw.fill fill-opacity=@root.raw.opacity}}
|
|
16
|
+
{{/with}}
|
|
17
|
+
<text x="0" y="0" text-anchor="middle" font-size="42" font-weight="600" fill="{{spec.raw.fill}}" dy="12">{{raw.mark}}</text>
|
|
18
|
+
{{#each raw.ticks as | tick |}}
|
|
19
|
+
{{setVar "rm" (math (math @root.spec.raw.circle.R '+' @root.spec.raw.circle.r) '/' 2)}}
|
|
20
|
+
{{setVar "p" (polarToCartesian rm tick.angle)}}
|
|
21
|
+
<text x="{{p.x}}" y="{{p.y}}" font-size="18" font-weight="500" fill="#D4D4D8" text-anchor="middle" dy="5" transform="translate(-{{ternary @first @root.spec.raw.ticks.number.offset 0}}, -{{ternary @last @root.spec.raw.ticks.number.offset 0}})">{{tick.number}}</text>
|
|
22
|
+
{{/each}}
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
|
|
26
|
+
{{/layout}}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<defs>
|
|
4
|
+
<path id="badge" d="M149.75 125.5L149.75 0V-125.5C149.75 -136.5 137.75 -150 126.25 -150L-127.75 -150C-135.75 -150 -149.75 -139 -149.75 -126.5V-46C-149.75 -46 -171.25 -14 -173.25 -11C-175.25 -8 -178.25 -7 -180.25 -7H-242.25C-245.25 -7 -247.75 -3.5 -247.75 0C-247.75 3.5 -245.25 7 -242.25 7H-180.25C-178.25 7 -175.25 8 -173.25 11C-171.25 14 -149.75 46 -149.75 46V126.5C-149.75 139 -135.75 150 -127.75 150H126.25C137.75 150 149.75 136.5 149.75 125.5Z"/>
|
|
5
|
+
</defs>
|
|
6
|
+
|
|
7
|
+
<g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
|
|
8
|
+
<g transform="translate(48, 16)">
|
|
9
|
+
<g transform="translate(0, 546.5)">
|
|
10
|
+
<text x="-5" y="0" font-size="14" font-weight="400" fill="#52525B" text-anchor="start" dy="-2">{{raw.label.fr}}</text>
|
|
11
|
+
|
|
12
|
+
{{#each spec.raw.stops as | stopMark stopMarkIndex |}}
|
|
13
|
+
{{#with @root.spec.raw as | rawSpec |}}
|
|
14
|
+
{{#unless @first}}
|
|
15
|
+
{{setVar "previousStopMark" (ternary (boolean stopMarkIndex '!==' 1) (lookup rawSpec.stops (math stopMarkIndex '-' 1)) 0)}}
|
|
16
|
+
{{setVar 'diffHeight' (math (math stopMark '-' previousStopMark) '*' rawSpec.heightCoeff)}}
|
|
17
|
+
{{setVar 'fill' (lookup (lookup @root.spec.items.interprets (math stopMarkIndex '-' 1)) 'fill')}}
|
|
18
|
+
|
|
19
|
+
{{setVar "halt" false}}
|
|
20
|
+
{{setVar "toDiffHeight" diffHeight}}
|
|
21
|
+
{{#if (boolean @root.raw.tScore '<=' stopMark)}}
|
|
22
|
+
{{setVar "toDiffHeight" (math (math @root.raw.tScore '-' previousStopMark) '*' rawSpec.heightCoeff)}}
|
|
23
|
+
{{#if (boolean @root.raw.tScore '<=' previousStopMark)}}
|
|
24
|
+
{{setVar "halt" true}}
|
|
25
|
+
{{/if}}
|
|
26
|
+
{{/if}}
|
|
27
|
+
|
|
28
|
+
<g transform="translate(0, -{{math previousStopMark '*' rawSpec.heightCoeff}})">
|
|
29
|
+
{{bar diffHeight rawSpec.rect.width (ternary @last rawSpec.rect.brs (object tl=0 tr=0 bl=0 br=0)) (toRad -90) fill=fill fill-opacity=rawSpec.rect.opacity.default}}
|
|
30
|
+
{{#unless halt}}
|
|
31
|
+
{{bar toDiffHeight rawSpec.rect.width (ternary @last rawSpec.rect.brs (object tl=0 tr=0 bl=0 br=0)) (toRad -90) fill=fill fill-opacity=rawSpec.rect.opacity.chosen}}
|
|
32
|
+
{{/unless}}
|
|
33
|
+
</g>
|
|
34
|
+
{{/unless}}
|
|
35
|
+
<g transform="translate(-5, -{{math stopMark '*' rawSpec.heightCoeff}})">
|
|
36
|
+
<line x1="0" y1="0" x2="-10" y2="0" stroke="#D4D4D8" stroke-dasharray="3"/>
|
|
37
|
+
<text x="-20" y="0" font-size="10" font-weight="400" fill="#A1A1AA" text-anchor="middle" dy="2">{{stopMark}}</text>
|
|
38
|
+
</g>
|
|
39
|
+
{{/with}}
|
|
40
|
+
{{/each}}
|
|
41
|
+
|
|
42
|
+
<g transform="translate({{math 30 '+' 39.5}}, -{{math raw.tScore '*' spec.raw.heightCoeff}})">
|
|
43
|
+
<svg width="{{spec.raw.label.shape.width}}" height="{{spec.raw.label.shape.height}}" x="0" y="0" viewBox="0 0 397.5 300" overflow="visible">
|
|
44
|
+
<use href="#badge" fill="{{raw.fill}}" fill-opacity="{{spec.raw.rect.opacity.chosen}}"/>
|
|
45
|
+
</svg>
|
|
46
|
+
<text x="0" y="-7" font-size="20" font-weight="600" fill="white" text-anchor="middle" dy="6">{{raw.tScore}}</text>
|
|
47
|
+
<text x="0" y="+11" font-size="10" font-weight="400" fill="white" text-anchor="middle" dy="2">({{raw.mark}})</text>
|
|
48
|
+
</g>
|
|
49
|
+
|
|
50
|
+
<g transform="translate(586, 86)">
|
|
51
|
+
{{assignGlobal 'distanceXArr' (array 0 104 192 331 416)}}
|
|
52
|
+
{{#each spec.items.interprets as | interpret index |}}
|
|
53
|
+
<g transform="translate(-{{lookup @root.distanceXArr index}}, 0)">
|
|
54
|
+
<rect x="0" y="0" width="8" height="8" fill="{{interpret.fill}}"/>
|
|
55
|
+
<text x="-5" y="{{math 8 '/' 2}}" font-size="12" font-weight="400" fill="#71717A" text-anchor="start" dy="3">{{interpret.fr}}</text>
|
|
56
|
+
</g>
|
|
57
|
+
{{/each}}
|
|
58
|
+
</g>
|
|
59
|
+
</g>
|
|
60
|
+
<g transform="translate(441.5, 275)">
|
|
61
|
+
<g fill="none" stroke="#E4E4E7">
|
|
62
|
+
{{#each spec.circles.radiuses as | radius |}}
|
|
63
|
+
<circle cx="0" cy="0" r="{{radius}}"/>
|
|
64
|
+
{{/each}}
|
|
65
|
+
|
|
66
|
+
<g transform="rotate({{toDeg (math spec.circles.theta '/' 2)}})">
|
|
67
|
+
{{#forLoop 0 spec.circles.n 1}}
|
|
68
|
+
{{setVar "angle" (math @root.spec.circles.startAngle '-' (math i '*' @root.spec.circles.theta))}}
|
|
69
|
+
{{setVar "p1" (polarToCartesian (first @root.spec.circles.radiuses) angle)}}
|
|
70
|
+
{{setVar "p2" (polarToCartesian (last @root.spec.circles.radiuses) angle)}}
|
|
71
|
+
<line x1="{{p1.x}}" y1="{{p1.y}}" x2="{{p2.x}}" y2="{{p2.y}}"/>
|
|
72
|
+
{{/forLoop}}
|
|
73
|
+
</g>
|
|
74
|
+
</g>
|
|
75
|
+
|
|
76
|
+
{{assignGlobal "markOffset" (array 0 0 0 -5 -10 -12 -10 -5 0)}}
|
|
77
|
+
{{assignGlobal "angleOffset" (array (toRad -2) (toRad 2) (toRad 4) (toRad 5) (toRad 4) (toRad 0) (toRad -4) (toRad -5) (toRad -4))}}
|
|
78
|
+
{{#each items as | item index |}}
|
|
79
|
+
{{#with @root.spec.items.circle as | circleSpec |}}
|
|
80
|
+
{{gauge item.radius circleSpec.r circleSpec.brs (object start=(math item.angle '-' (math circleSpec.totalAngle '/' 2)) end=(math item.angle '+' (math circleSpec.totalAngle '/' 2))) circleSpec.direction fill=item.fill fill-opacity=circleSpec.opacity}}
|
|
81
|
+
|
|
82
|
+
{{setVar "p3" (polarToCartesian (math (math item.radius '+' -15) '+' (lookup @root.markOffset index)) (math item.angle '+' (ternary (boolean item.tScore '===' 1) (lookup @root.angleOffset index) 0)))}}
|
|
83
|
+
{{setVar "p4" (polarToCartesian (math (last @root.spec.circles.radiuses) '+' 20) item.angle)}}
|
|
84
|
+
|
|
85
|
+
<g transform="translate({{p3.x}}, {{p3.y}})" fill="white" text-anchor="middle">
|
|
86
|
+
<text x="0" y="0" font-size="16" font-weight="600" dy="5">{{item.tScore}}</text>
|
|
87
|
+
<text x="0" y="15" font-size="10" font-weight="400" dy="2">({{item.mark}})</text>
|
|
88
|
+
</g>
|
|
89
|
+
{{setVar "normalizedAngle" (normalizeAngle item.angle)}}
|
|
90
|
+
{{setVar "betMinus180And0" (boolean (boolean normalizedAngle '>' (toRad -180)) '&&' (boolean normalizedAngle '<' (toRad 0)))}}
|
|
91
|
+
<g transform="translate({{p4.x}}, {{p4.y}}) rotate({{math (ternary betMinus180And0 90 -90) '+' (toDeg item.angle)}})">
|
|
92
|
+
<text x="0" y="0" font-size="14" font-weight="400" fill="#71717A" text-anchor="middle" dy="{{ternary betMinus180And0 0 5}}">{{item.label.fr}}</text>
|
|
93
|
+
</g>
|
|
94
|
+
{{/with}}
|
|
95
|
+
{{/each}}
|
|
96
|
+
|
|
97
|
+
</g>
|
|
98
|
+
</g>
|
|
99
|
+
</g>
|
|
100
|
+
|
|
101
|
+
{{/layout}}
|