@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
|
+
<g transform="translate({{spec.profile.padding.[1].x}}, {{spec.profile.padding.[1].y}})">
|
|
4
|
+
{{assignGlobal "prev" 0}}
|
|
5
|
+
{{assignGlobal "curr" 0}}
|
|
6
|
+
<g transform="translate(903, 0)">
|
|
7
|
+
{{#each questionItemsPart1 as | question index |}}
|
|
8
|
+
<g transform="translate({{math (floor (math index '/' 24)) '*' -303}}, 0)">
|
|
9
|
+
<g transform="translate(0, {{math (modulo index 24) '*' 28}})">
|
|
10
|
+
{{#unless @last}}
|
|
11
|
+
{{setVar "nextCat" (lookup (lookup @root.questionItemsPart1 (math index '+' 1)) "cat")}}
|
|
12
|
+
{{#if (boolean question.cat '!==' nextCat)}}
|
|
13
|
+
{{assignGlobal "prev" @root.curr}}
|
|
14
|
+
{{assignGlobal "curr" (math index '+' 1)}}
|
|
15
|
+
{{setVar "diff" (math @root.curr '-' @root.prev)}}
|
|
16
|
+
<g transform="translate(-82, 0)">
|
|
17
|
+
{{setVar "height" (math (math (math diff '-' 1) '*' 28) '+' 24)}}
|
|
18
|
+
<rect x="0" y="-{{math height '-' 24}}" width="82" height="{{height}}" fill="#F4F4F5" rx="4" />
|
|
19
|
+
<text x="42" y="{{math -1 '*' (math (math height '-' 44) '/' 2)}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.cat}}</text>
|
|
20
|
+
</g>
|
|
21
|
+
{{else}}
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{/unless}}
|
|
24
|
+
{{#if @last}}
|
|
25
|
+
{{assignGlobal "curr" index}}
|
|
26
|
+
{{setVar "diff" (math @root.curr '-' @root.prev)}}
|
|
27
|
+
<g transform="translate(-82, 0)">
|
|
28
|
+
{{setVar "height" (math (math (math diff '-' 1) '*' 28) '+' 24)}}
|
|
29
|
+
<rect x="0" y="-{{math height '-' 24}}" width="82" height="{{height}}" fill="#F4F4F5" rx="4" />
|
|
30
|
+
<text x="42" y="{{math -1 '*' (math (math height '-' 44) '/' 2)}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.cat}}</text>
|
|
31
|
+
</g>
|
|
32
|
+
{{/if}}
|
|
33
|
+
<g transform="translate(-116, 0)">
|
|
34
|
+
<rect x="0" y="0" width="32" height="24" fill="#F4F4F5" rx="4" />
|
|
35
|
+
<text x="{{math 32 '/' 2}}" y="{{math 24 '/' 2}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.num}}</text>
|
|
36
|
+
</g>
|
|
37
|
+
<g transform="translate(-297, 0)">
|
|
38
|
+
<rect x="0" y="0" width="179" height="24" fill="#F4F4F5" rx="4" />
|
|
39
|
+
<text x="170" y="{{math 24 '/' 2}}" font-size="13" font-weight="500" fill="#52525B" text-anchor="start" dy="3.5">{{question.title}}</text>
|
|
40
|
+
<g transform="translate(12, 12)">
|
|
41
|
+
<circle cx="0" cy="0" r="10" fill="{{question.fill}}" />
|
|
42
|
+
<text x="0" y="0" font-size="12" font-weight="500" fill="white" text-anchor="middle" dy="3">{{question.answer}}</text>
|
|
43
|
+
</g>
|
|
44
|
+
</g>
|
|
45
|
+
</g>
|
|
46
|
+
</g>
|
|
47
|
+
{{/each}}
|
|
48
|
+
</g>
|
|
49
|
+
{{assignGlobal "prev" 0}}
|
|
50
|
+
{{assignGlobal "curr" 0}}
|
|
51
|
+
<g transform="translate(0, 280)">
|
|
52
|
+
<rect x="0" y="0" width="297" height="388" rx="4" stroke="#A1A1AA" fill="none" />
|
|
53
|
+
<g transform="translate(292, 6)">
|
|
54
|
+
{{#each questionItemsPart2 as | question index |}}
|
|
55
|
+
<g transform="translate(0, {{math index '*' 27}})">
|
|
56
|
+
{{#unless @last}}
|
|
57
|
+
{{setVar "nextCat" (lookup (lookup @root.questionItemsPart2 (math index '+' 1)) "cat")}}
|
|
58
|
+
{{#if (boolean question.cat '!==' nextCat)}}
|
|
59
|
+
{{assignGlobal "prev" @root.curr}}
|
|
60
|
+
{{assignGlobal "curr" (math index '+' 1)}}
|
|
61
|
+
{{setVar "diff" (math @root.curr '-' @root.prev)}}
|
|
62
|
+
<g transform="translate(-77, 0)">
|
|
63
|
+
{{setVar "height" (math (math (math diff '-' 1) '*' 27) '+' 24)}}
|
|
64
|
+
<rect x="0" y="-{{math height '-' 24}}" width="77" height="{{height}}" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
65
|
+
<g transform="translate(38.5, {{math -1 '*' (math (math height '-' 47) '/' 2)}})">
|
|
66
|
+
{{setVar "catLines" (wrapOnNewline question.cat)}}
|
|
67
|
+
{{#each catLines as | line index |}}
|
|
68
|
+
<text x="0" y="{{ternary (boolean ../catLines.length '!==' 1) (math (lookup (array -1 1) index) '*' 8) 0}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{line}}</text>
|
|
69
|
+
{{/each}}
|
|
70
|
+
</g>
|
|
71
|
+
</g>
|
|
72
|
+
{{else}}
|
|
73
|
+
{{/if}}
|
|
74
|
+
{{/unless}}
|
|
75
|
+
{{#if (boolean question.cat '===' '-')}}
|
|
76
|
+
<g transform="translate(-77, 0)">
|
|
77
|
+
<rect x="0" y="0" width="77" height="24" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
78
|
+
<text x="38.5" y="12" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.cat}}</text>
|
|
79
|
+
</g>
|
|
80
|
+
{{/if}}
|
|
81
|
+
<g transform="translate(-111, 0)">
|
|
82
|
+
<rect x="0" y="0" width="32" height="24" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
83
|
+
<text x="{{math 32 '/' 2}}" y="{{math 24 '/' 2}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.num}}</text>
|
|
84
|
+
</g>
|
|
85
|
+
<g transform="translate(-287, 0)">
|
|
86
|
+
<rect x="0" y="0" width="174" height="24" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
87
|
+
<text x="165" y="{{math 24 '/' 2}}" font-size="13" font-weight="500" fill="#52525B" text-anchor="start" dy="3.5">{{question.title}}</text>
|
|
88
|
+
<g transform="translate(12, 12)">
|
|
89
|
+
<circle cx="0" cy="0" r="10" fill="{{question.fill}}" />
|
|
90
|
+
<text x="0" y="0" font-size="12" font-weight="500" fill="white" text-anchor="middle" dy="3">{{question.answer}}</text>
|
|
91
|
+
</g>
|
|
92
|
+
</g>
|
|
93
|
+
</g>
|
|
94
|
+
{{/each}}
|
|
95
|
+
</g>
|
|
96
|
+
</g>
|
|
97
|
+
<g transform="translate(0, 672)">
|
|
98
|
+
<rect x="0" y="0" width="297" height="42" rx="4" stroke="#A1A1AA" fill="none" />
|
|
99
|
+
<text x="224" y="21" font-size="13" font-weight="400" fill="#71717A" text-anchor="start" dy="3">شدت وسواس: <tspan font-size="16" font-weight="600" fill="#52525B">{{raw.mark}} {{raw.interpret.fr}}</tspan></text>
|
|
100
|
+
</g>
|
|
101
|
+
<g transform="translate(860, 694)">
|
|
102
|
+
{{setVar "qCountDistanceXArr" (array 0 -136 -247 -326 -409)}}
|
|
103
|
+
{{#each questionItemsPart1Count as | qCount index |}}
|
|
104
|
+
<g transform="translate({{lookup ../qCountDistanceXArr index}}, 0)">
|
|
105
|
+
<g transform="translate(-9, 9)">
|
|
106
|
+
<circle cx="0" cy="0" r="9" fill="{{qCount.fill}}" />
|
|
107
|
+
<text x="0" y="0" font-size="12" font-weight="500" fill="white" text-anchor="middle" dy="3">{{qCount.answer}}</text>
|
|
108
|
+
</g>
|
|
109
|
+
<text x="-24" y="9" font-size="13" font-weight="400" fill="#71717A" text-anchor="start" dy="3">{{qCount.fr}} ({{qCount.count}})</text>
|
|
110
|
+
</g>
|
|
111
|
+
{{/each}}
|
|
112
|
+
</g>
|
|
113
|
+
</g>
|
|
114
|
+
|
|
115
|
+
{{/layout}}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
<g transform="translate({{spec.profile.padding.[2].x}}, {{spec.profile.padding.[2].y}})">
|
|
6
|
+
<g transform="translate(903, 0)">
|
|
7
|
+
{{#each questionItemsPart1Sorted as | question index |}}
|
|
8
|
+
<g transform="translate({{math (floor (math index '/' 24)) '*' -303}}, 0)">
|
|
9
|
+
<g transform="translate(0, {{math (modulo index 24) '*' 28}})">
|
|
10
|
+
<g transform="translate(-82, 0)">
|
|
11
|
+
<rect x="0" y="0" width="82" height="24" fill="#F4F4F5" rx="4" />
|
|
12
|
+
<text x="42" y="12" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.cat}}</text>
|
|
13
|
+
</g>
|
|
14
|
+
<g transform="translate(-116, 0)">
|
|
15
|
+
<rect x="0" y="0" width="32" height="24" fill="#F4F4F5" rx="4" />
|
|
16
|
+
<text x="{{math 32 '/' 2}}" y="{{math 24 '/' 2}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.num}}</text>
|
|
17
|
+
</g>
|
|
18
|
+
<g transform="translate(-297, 0)">
|
|
19
|
+
<rect x="0" y="0" width="179" height="24" fill="#F4F4F5" rx="4" />
|
|
20
|
+
<text x="170" y="{{math 24 '/' 2}}" font-size="13" font-weight="500" fill="#52525B" text-anchor="start" dy="3.5">{{question.title}}</text>
|
|
21
|
+
<circle cx="7" cy="12" r="3" fill="{{question.fill}}" />
|
|
22
|
+
</g>
|
|
23
|
+
</g>
|
|
24
|
+
</g>
|
|
25
|
+
{{/each}}
|
|
26
|
+
</g>
|
|
27
|
+
{{assignGlobal "prev" 0}}
|
|
28
|
+
{{assignGlobal "curr" 0}}
|
|
29
|
+
<g transform="translate(0, 280)">
|
|
30
|
+
<rect x="0" y="0" width="297" height="388" rx="4" stroke="#A1A1AA" fill="none" />
|
|
31
|
+
<g transform="translate(292, 6)">
|
|
32
|
+
{{#each questionItemsPart2 as | question index |}}
|
|
33
|
+
<g transform="translate(0, {{math index '*' 27}})">
|
|
34
|
+
{{#unless @last}}
|
|
35
|
+
{{setVar "nextCat" (lookup (lookup @root.questionItemsPart2 (math index '+' 1)) "cat")}}
|
|
36
|
+
{{#if (boolean question.cat '!==' nextCat)}}
|
|
37
|
+
{{assignGlobal "prev" @root.curr}}
|
|
38
|
+
{{assignGlobal "curr" (math index '+' 1)}}
|
|
39
|
+
{{setVar "diff" (math @root.curr '-' @root.prev)}}
|
|
40
|
+
<g transform="translate(-77, 0)">
|
|
41
|
+
{{setVar "height" (math (math (math diff '-' 1) '*' 27) '+' 24)}}
|
|
42
|
+
<rect x="0" y="-{{math height '-' 24}}" width="77" height="{{height}}" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
43
|
+
<g transform="translate(38.5, {{math -1 '*' (math (math height '-' 47) '/' 2)}})">
|
|
44
|
+
{{setVar "catLines" (wrapOnNewline question.cat)}}
|
|
45
|
+
{{#each catLines as | line index |}}
|
|
46
|
+
<text x="0" y="{{ternary (boolean ../catLines.length '!==' 1) (math (lookup (array -1 1) index) '*' 8) 0}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{line}}</text>
|
|
47
|
+
{{/each}}
|
|
48
|
+
</g>
|
|
49
|
+
</g>
|
|
50
|
+
{{else}}
|
|
51
|
+
{{/if}}
|
|
52
|
+
{{/unless}}
|
|
53
|
+
{{#if (boolean question.cat '===' '-')}}
|
|
54
|
+
<g transform="translate(-77, 0)">
|
|
55
|
+
<rect x="0" y="0" width="77" height="24" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
56
|
+
<text x="38.5" y="12" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.cat}}</text>
|
|
57
|
+
</g>
|
|
58
|
+
{{/if}}
|
|
59
|
+
<g transform="translate(-111, 0)">
|
|
60
|
+
<rect x="0" y="0" width="32" height="24" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
61
|
+
<text x="{{math 32 '/' 2}}" y="{{math 24 '/' 2}}" font-size="13" font-weight="400" fill="#52525B" text-anchor="middle" dy="3.5">{{question.num}}</text>
|
|
62
|
+
</g>
|
|
63
|
+
<g transform="translate(-287, 0)">
|
|
64
|
+
<rect x="0" y="0" width="174" height="24" fill="{{ternary (boolean (boolean index '===' 10) '||' (boolean index '===' 13)) '#E4E4E7' '#F4F4F5'}}" rx="4" />
|
|
65
|
+
<text x="165" y="{{math 24 '/' 2}}" font-size="13" font-weight="500" fill="#52525B" text-anchor="start" dy="3.5">{{question.title}}</text>
|
|
66
|
+
<g transform="translate(12, 12)">
|
|
67
|
+
<circle cx="0" cy="0" r="10" fill="{{question.fill}}" />
|
|
68
|
+
<text x="0" y="0" font-size="12" font-weight="500" fill="white" text-anchor="middle" dy="3">{{question.answer}}</text>
|
|
69
|
+
</g>
|
|
70
|
+
</g>
|
|
71
|
+
</g>
|
|
72
|
+
{{/each}}
|
|
73
|
+
</g>
|
|
74
|
+
</g>
|
|
75
|
+
<g transform="translate(0, 672)">
|
|
76
|
+
<rect x="0" y="0" width="297" height="42" rx="4" stroke="#A1A1AA" fill="none" />
|
|
77
|
+
<text x="224" y="21" font-size="13" font-weight="400" fill="#71717A" text-anchor="start" dy="3">شدت وسواس: <tspan font-size="16" font-weight="600" fill="#52525B">{{raw.mark}} {{raw.interpret.fr}}</tspan></text>
|
|
78
|
+
</g>
|
|
79
|
+
<g transform="translate(860, 694)">
|
|
80
|
+
{{setVar "qCountDistanceXArr" (array 0 -136 -247 -326 -409)}}
|
|
81
|
+
{{#each questionItemsPart1Count as | qCount index |}}
|
|
82
|
+
<g transform="translate({{lookup ../qCountDistanceXArr index}}, 0)">
|
|
83
|
+
<g transform="translate(-9, 9)">
|
|
84
|
+
<circle cx="0" cy="0" r="9" fill="{{qCount.fill}}" />
|
|
85
|
+
<text x="0" y="0" font-size="12" font-weight="500" fill="white" text-anchor="middle" dy="3">{{qCount.answer}}</text>
|
|
86
|
+
</g>
|
|
87
|
+
<text x="-24" y="9" font-size="13" font-weight="400" fill="#71717A" text-anchor="start" dy="3">{{qCount.fr}} ({{qCount.count}})</text>
|
|
88
|
+
</g>
|
|
89
|
+
{{/each}}
|
|
90
|
+
</g>
|
|
91
|
+
</g>
|
|
92
|
+
|
|
93
|
+
{{/layout}}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{{#> layout}}
|
|
2
|
+
|
|
3
|
+
<g transform="translate(100, 300)">
|
|
4
|
+
{{gauge 120 50 (object tl=4 tr=4 bl=15 br=0) (object start=(toRad (math 140 '-' 16)) end=(toRad (math 140 '+' 16))) false stroke="black" fill="none"}}
|
|
5
|
+
{{bar 200 30 (object tl=10 tr=5 bl=0 br=0) (toRad -45) stroke="black" fill="none"}}
|
|
6
|
+
{{polygon 6 (array 40 60 10 30 90 25) (toRad -60) stroke="black" fill="none"}}
|
|
7
|
+
<rect x="0" y="0" width="200" height="30" rx="10" stroke="black" fill="none"/>
|
|
8
|
+
</g>
|
|
9
|
+
|
|
10
|
+
{{/layout}}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<defs>
|
|
2
|
+
<path
|
|
3
|
+
id="person"
|
|
4
|
+
d="M11.2 10.125C10.175 10.125 9.68214 10.6875 8 10.6875C6.31786 10.6875 5.82857 10.125 4.8 10.125C2.15 10.125 0 12.2414 0 14.85V16.3125C0 17.2441 0.767857 18 1.71429 18H14.2857C15.2321 18 16 17.2441 16 16.3125V14.85C16 12.2414 13.85 10.125 11.2 10.125ZM14.8571 16.3125C14.8571 16.6219 14.6 16.875 14.2857 16.875H1.71429C1.4 16.875 1.14286 16.6219 1.14286 16.3125V14.85C1.14286 12.8637 2.78214 11.25 4.8 11.25C5.5 11.25 6.19643 11.8125 8 11.8125C9.8 11.8125 10.5 11.25 11.2 11.25C13.2179 11.25 14.8571 12.8637 14.8571 14.85V16.3125ZM8 9C10.525 9 12.5714 6.98555 12.5714 4.5C12.5714 2.01445 10.525 0 8 0C5.475 0 3.42857 2.01445 3.42857 4.5C3.42857 6.98555 5.475 9 8 9ZM8 1.125C9.88929 1.125 11.4286 2.64023 11.4286 4.5C11.4286 6.35977 9.88929 7.875 8 7.875C6.11071 7.875 4.57143 6.35977 4.57143 4.5C4.57143 2.64023 6.11071 1.125 8 1.125Z"
|
|
5
|
+
fill="#4B5563" />
|
|
6
|
+
<path
|
|
7
|
+
id="calender"
|
|
8
|
+
d="M13.3929 2.25H11.7857V0.421875C11.7857 0.189844 11.6049 0 11.3839 0H11.1161C10.8951 0 10.7143 0.189844 10.7143 0.421875V2.25H4.28571V0.421875C4.28571 0.189844 4.10491 0 3.88393 0H3.61607C3.39509 0 3.21429 0.189844 3.21429 0.421875V2.25H1.60714C0.719866 2.25 0 3.00586 0 3.9375V16.3125C0 17.2441 0.719866 18 1.60714 18H13.3929C14.2801 18 15 17.2441 15 16.3125V3.9375C15 3.00586 14.2801 2.25 13.3929 2.25ZM1.60714 3.375H13.3929C13.6875 3.375 13.9286 3.62812 13.9286 3.9375V5.625H1.07143V3.9375C1.07143 3.62812 1.3125 3.375 1.60714 3.375ZM13.3929 16.875H1.60714C1.3125 16.875 1.07143 16.6219 1.07143 16.3125V6.75H13.9286V16.3125C13.9286 16.6219 13.6875 16.875 13.3929 16.875ZM4.95536 11.25H3.61607C3.39509 11.25 3.21429 11.0602 3.21429 10.8281V9.42188C3.21429 9.18984 3.39509 9 3.61607 9H4.95536C5.17634 9 5.35714 9.18984 5.35714 9.42188V10.8281C5.35714 11.0602 5.17634 11.25 4.95536 11.25ZM8.16964 11.25H6.83036C6.60938 11.25 6.42857 11.0602 6.42857 10.8281V9.42188C6.42857 9.18984 6.60938 9 6.83036 9H8.16964C8.39062 9 8.57143 9.18984 8.57143 9.42188V10.8281C8.57143 11.0602 8.39062 11.25 8.16964 11.25ZM11.3839 11.25H10.0446C9.82366 11.25 9.64286 11.0602 9.64286 10.8281V9.42188C9.64286 9.18984 9.82366 9 10.0446 9H11.3839C11.6049 9 11.7857 9.18984 11.7857 9.42188V10.8281C11.7857 11.0602 11.6049 11.25 11.3839 11.25ZM8.16964 14.625H6.83036C6.60938 14.625 6.42857 14.4352 6.42857 14.2031V12.7969C6.42857 12.5648 6.60938 12.375 6.83036 12.375H8.16964C8.39062 12.375 8.57143 12.5648 8.57143 12.7969V14.2031C8.57143 14.4352 8.39062 14.625 8.16964 14.625ZM4.95536 14.625H3.61607C3.39509 14.625 3.21429 14.4352 3.21429 14.2031V12.7969C3.21429 12.5648 3.39509 12.375 3.61607 12.375H4.95536C5.17634 12.375 5.35714 12.5648 5.35714 12.7969V14.2031C5.35714 14.4352 5.17634 14.625 4.95536 14.625ZM11.3839 14.625H10.0446C9.82366 14.625 9.64286 14.4352 9.64286 14.2031V12.7969C9.64286 12.5648 9.82366 12.375 10.0446 12.375H11.3839C11.6049 12.375 11.7857 12.5648 11.7857 12.7969V14.2031C11.7857 14.4352 11.6049 14.625 11.3839 14.625Z"
|
|
9
|
+
fill="#4B5563" />
|
|
10
|
+
<path
|
|
11
|
+
id="clock"
|
|
12
|
+
d="M8 0.25C3.71875 0.25 0.25 3.71875 0.25 8C0.25 12.2812 3.71875 15.75 8 15.75C12.2812 15.75 15.75 12.2812 15.75 8C15.75 3.71875 12.2812 0.25 8 0.25ZM14.75 8C14.75 11.7094 11.7469 14.75 8 14.75C4.29063 14.75 1.25 11.7469 1.25 8C1.25 4.29063 4.25313 1.25 8 1.25C11.7094 1.25 14.75 4.25313 14.75 8ZM10.0969 10.7594L7.55937 8.91562C7.4625 8.84375 7.40625 8.73125 7.40625 8.6125V3.625C7.40625 3.41875 7.575 3.25 7.78125 3.25H8.21875C8.425 3.25 8.59375 3.41875 8.59375 3.625V8.19687L10.7969 9.8C10.9656 9.92188 11 10.1562 10.8781 10.325L10.6219 10.6781C10.5 10.8438 10.2656 10.8812 10.0969 10.7594Z"
|
|
13
|
+
fill="#4B5563" />
|
|
14
|
+
<path id="line-wrap" d="M 0 0 H 125 M 0 30 H 125 M 0 60 H 125" />
|
|
15
|
+
</defs>
|
|
16
|
+
|
|
17
|
+
<g font-family="DanaFaNum">
|
|
18
|
+
<g fill="white" font-weight="600" font-size="16">
|
|
19
|
+
<rect x="0" y="0" width="100%" height="{{canvas.header.height}}" fill="#007BA4" />
|
|
20
|
+
<text
|
|
21
|
+
x="100%"
|
|
22
|
+
y="{{math canvas.header.height '/' 2}}"
|
|
23
|
+
transform="translate(-{{canvas.header.paddingX}}, 0)"
|
|
24
|
+
text-anchor="start"
|
|
25
|
+
dy="4">
|
|
26
|
+
{{concat info.title (ternary titleAppend titleAppend '')}}
|
|
27
|
+
</text>
|
|
28
|
+
<a href="http://risloo.ir" target="_blank" fill="white">
|
|
29
|
+
<text
|
|
30
|
+
class="eng-font"
|
|
31
|
+
x="0"
|
|
32
|
+
y="{{math canvas.header.height '/' 2}}"
|
|
33
|
+
transform="translate({{canvas.header.paddingX}}, 0)"
|
|
34
|
+
font-family="Dana"
|
|
35
|
+
text-anchor="end"
|
|
36
|
+
letter-spacing="2"
|
|
37
|
+
dy="5">
|
|
38
|
+
RISLOO.IR
|
|
39
|
+
</text>
|
|
40
|
+
</a>
|
|
41
|
+
</g>
|
|
42
|
+
<g transform="translate({{canvas.profile.width}}, {{canvas.header.height}})">
|
|
43
|
+
<rect x="0" y="0" width="{{canvas.sidebar.width}}" height="{{canvas.sidebar.height}}" fill="#F3F4F6" />
|
|
44
|
+
<g transform="translate(0, 27)">
|
|
45
|
+
<g transform="translate({{math canvas.sidebar.width '/' 2}}, 0)" text-anchor="middle">
|
|
46
|
+
<text x="0" y="0" fill="#4B5563" font-size="12"> اتاق درمانی </text>
|
|
47
|
+
{{setVar "managerNameLines" (ellipsisLines (lineWrap info.managerName 22) 2)}}
|
|
48
|
+
<g transform="translate(0, {{canvas.sidebar.lineHeight.high}})" fill="#007BA4" font-size="14" font-weight="600">
|
|
49
|
+
{{#each managerNameLines as |line index|}}
|
|
50
|
+
<text x="0" y="{{math ../canvas.sidebar.lineHeight.medium '*' index}}">{{line}}</text>
|
|
51
|
+
{{/each}}
|
|
52
|
+
</g>
|
|
53
|
+
</g>
|
|
54
|
+
|
|
55
|
+
{{setVar "centerTitleLines" (ellipsisLines (lineWrap info.centerTitle 22) 2)}}
|
|
56
|
+
<g transform="translate(0, {{math (math (math managerNameLines.length '*' canvas.sidebar.lineHeight.medium) '+' canvas.sidebar.lineHeight.high) '+' 5}})">
|
|
57
|
+
<g transform="translate({{math canvas.sidebar.width '/' 2}}, 0)" text-anchor="middle" font-size="12" fill="#007BA4">
|
|
58
|
+
{{#each centerTitleLines as |line index|}}
|
|
59
|
+
<text x="0" y="{{math ../canvas.sidebar.lineHeight.low '*' index}}">{{line}}</text>
|
|
60
|
+
{{/each}}
|
|
61
|
+
</g>
|
|
62
|
+
|
|
63
|
+
<g transform="translate({{math canvas.sidebar.width '-' canvas.sidebar.padding.x}}, {{math (math centerTitleLines.length '*' canvas.sidebar.lineHeight.low) '+' 11}})">
|
|
64
|
+
<g transform="translate(0, {{math canvas.sidebar.icons.offsetY '*' 0}})">
|
|
65
|
+
<text
|
|
66
|
+
x="0"
|
|
67
|
+
y="0"
|
|
68
|
+
transform="translate(-{{math canvas.sidebar.icons.paddingX '+' canvas.sidebar.icons.person.width}}, 0)"
|
|
69
|
+
font-size="12"
|
|
70
|
+
text-anchor="start"
|
|
71
|
+
dy="3"
|
|
72
|
+
fill="#374151">
|
|
73
|
+
{{ellipsisChars info.clientName 20}}
|
|
74
|
+
</text>
|
|
75
|
+
<svg
|
|
76
|
+
width="{{canvas.sidebar.icons.person.width}}"
|
|
77
|
+
height="{{math canvas.sidebar.icons.person.width '/' canvas.sidebar.icons.person.ratio}}"
|
|
78
|
+
x="0"
|
|
79
|
+
y="0"
|
|
80
|
+
viewBox="16 9 16 18"
|
|
81
|
+
overflow="visible">
|
|
82
|
+
<use href="#person" />
|
|
83
|
+
</svg>
|
|
84
|
+
</g>
|
|
85
|
+
<g transform="translate(0, {{math canvas.sidebar.icons.offsetY '*' 1}})">
|
|
86
|
+
<text
|
|
87
|
+
x="0"
|
|
88
|
+
y="0"
|
|
89
|
+
transform="translate(-{{math canvas.sidebar.icons.paddingX '+' canvas.sidebar.icons.person.width}}, 0)"
|
|
90
|
+
font-size="12"
|
|
91
|
+
text-anchor="start"
|
|
92
|
+
dy="3"
|
|
93
|
+
fill="#374151"
|
|
94
|
+
xml:space="preserve">{{info.started_at}}</text>
|
|
95
|
+
<svg
|
|
96
|
+
width="{{canvas.sidebar.icons.calender.width}}"
|
|
97
|
+
height="{{math canvas.sidebar.icons.calender.width '/' canvas.sidebar.icons.calender.ratio}}"
|
|
98
|
+
x="0"
|
|
99
|
+
y="0"
|
|
100
|
+
viewBox="15 9 15 18"
|
|
101
|
+
overflow="visible">
|
|
102
|
+
<use href="#calender" />
|
|
103
|
+
</svg>
|
|
104
|
+
</g>
|
|
105
|
+
<g transform="translate(0, {{math canvas.sidebar.icons.offsetY '*' 2}})">
|
|
106
|
+
<text
|
|
107
|
+
x="0"
|
|
108
|
+
y="0"
|
|
109
|
+
transform="translate(-{{math canvas.sidebar.icons.paddingX '+' canvas.sidebar.icons.person.width}}, 0)"
|
|
110
|
+
font-size="12"
|
|
111
|
+
text-anchor="start"
|
|
112
|
+
dy="3"
|
|
113
|
+
fill="#374151">
|
|
114
|
+
{{info.time}}
|
|
115
|
+
</text>
|
|
116
|
+
<svg
|
|
117
|
+
width="{{canvas.sidebar.icons.clock.width}}"
|
|
118
|
+
height="{{math canvas.sidebar.icons.clock.width '/' canvas.sidebar.icons.clock.ratio}}"
|
|
119
|
+
x="0"
|
|
120
|
+
y="0"
|
|
121
|
+
viewBox="16 8 16 16"
|
|
122
|
+
overflow="visible">
|
|
123
|
+
<use href="#clock" />
|
|
124
|
+
</svg>
|
|
125
|
+
</g>
|
|
126
|
+
|
|
127
|
+
<g transform="translate(0, {{math (math canvas.sidebar.icons.offsetY '*' 2) '+' 22}})">
|
|
128
|
+
{{setVar "fieldsLength" (math info.fields.length '*' canvas.sidebar.fields.offsetY)}}
|
|
129
|
+
<rect x="0" y="0" width="4" height="4" fill="#D1D5DB" transform="rotate(45)" />
|
|
130
|
+
<line
|
|
131
|
+
x1="0"
|
|
132
|
+
y1="0"
|
|
133
|
+
x2="0"
|
|
134
|
+
y2="{{fieldsLength}}"
|
|
135
|
+
stroke="#D1D5DB" />
|
|
136
|
+
<rect
|
|
137
|
+
x="0"
|
|
138
|
+
y="0"
|
|
139
|
+
width="4"
|
|
140
|
+
height="4"
|
|
141
|
+
fill="#D1D5DB"
|
|
142
|
+
transform="translate(0, {{fieldsLength}}) rotate(45)" />
|
|
143
|
+
<g transform="translate(-{{canvas.sidebar.fields.paddingX}}, 12)">
|
|
144
|
+
{{#each info.fields as |field index|}}
|
|
145
|
+
<g transform="translate(0, {{math index '*' ../canvas.sidebar.fields.offsetY}})">
|
|
146
|
+
<text x="0" y="0" text-anchor="start" font-size="12" fill="#6B7280" dy="3">{{field.fr}}</text>
|
|
147
|
+
<text
|
|
148
|
+
x="0"
|
|
149
|
+
y="{{../canvas.sidebar.fields.lineHeight}}"
|
|
150
|
+
text-anchor="start"
|
|
151
|
+
font-size="14"
|
|
152
|
+
font-weight="500"
|
|
153
|
+
fill="#374151"
|
|
154
|
+
dy="3">
|
|
155
|
+
{{ellipsisChars field.value 18}}
|
|
156
|
+
</text>
|
|
157
|
+
</g>
|
|
158
|
+
{{/each}}
|
|
159
|
+
</g>
|
|
160
|
+
</g>
|
|
161
|
+
</g>
|
|
162
|
+
</g>
|
|
163
|
+
</g>
|
|
164
|
+
|
|
165
|
+
<g transform="translate({{math canvas.sidebar.width '-' canvas.sidebar.padding.x}}, 215)">
|
|
166
|
+
|
|
167
|
+
</g>
|
|
168
|
+
<g transform="translate(0, 613)">
|
|
169
|
+
<g font-size="9" font-weight="400">
|
|
170
|
+
<text x="{{math canvas.sidebar.width '-' canvas.sidebar.padding.x}}" y="0" text-anchor="start" fill="#71717A" dy="3">بسته شدن:</text>
|
|
171
|
+
<text x="{{canvas.sidebar.padding.x}}" y="0" text-anchor="end" fill="#52525B" dy="3.5" xml:space="preserve">{{info.closed_at}}</text>
|
|
172
|
+
<text x="{{math canvas.sidebar.width '-' canvas.sidebar.padding.x}}" y="16" text-anchor="start" fill="#71717A" dy="3">نمرهدهی:</text>
|
|
173
|
+
<text x="{{canvas.sidebar.padding.x}}" y="16" text-anchor="end" fill="#52525B" dy="3.5" xml:space="preserve">{{info.scored_at}}</text>
|
|
174
|
+
</g>
|
|
175
|
+
<g transform="translate({{math canvas.sidebar.width '/' 2}}, 34)">
|
|
176
|
+
<g transform="translate(-{{math canvas.sidebar.qrcode.width '/' 2}}, 0)"><a href="{{qrcode.link}}" target="_blank">{{{qrcode.svg}}}</a></g>
|
|
177
|
+
<text
|
|
178
|
+
class="eng-font"
|
|
179
|
+
x="0"
|
|
180
|
+
y="{{math canvas.sidebar.qrcode.height '+' 11}}"
|
|
181
|
+
text-anchor="middle"
|
|
182
|
+
fill="#374151"
|
|
183
|
+
font-size="14"
|
|
184
|
+
dy="4"
|
|
185
|
+
letter-spacing="0.6"
|
|
186
|
+
font-family="Dana"
|
|
187
|
+
direction="ltr">
|
|
188
|
+
{{info.id}}
|
|
189
|
+
</text>
|
|
190
|
+
</g>
|
|
191
|
+
</g>
|
|
192
|
+
</g>
|
|
193
|
+
</g>
|