@medicus.ai/medicus-report-pdf-generator 1.0.208 → 1.0.209
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.
|
@@ -1,94 +1,153 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
.report-header,
|
|
2
|
+
.first-page .logo{
|
|
3
|
+
padding-left: 0px;
|
|
4
|
+
padding-right: 50px;
|
|
3
5
|
}
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
/*second page*/
|
|
8
|
+
.single-section {
|
|
9
|
+
padding-left: 0px;
|
|
10
|
+
padding-right: 50px;
|
|
7
11
|
}
|
|
8
12
|
|
|
9
|
-
.
|
|
10
|
-
|
|
13
|
+
.section-title {
|
|
14
|
+
padding-right: 0px;
|
|
15
|
+
padding-left: 50px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.side-chart-container {
|
|
19
|
+
float: right;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
td.bar-title {
|
|
23
|
+
width: 35.7%;
|
|
24
|
+
border-right: 1px solid;
|
|
25
|
+
border-left: 0;
|
|
26
|
+
padding-right: 12px;
|
|
27
|
+
padding-left: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
td.bar-title span {
|
|
31
|
+
text-align: left;
|
|
32
|
+
direction: rtl;
|
|
33
|
+
}
|
|
34
|
+
.page:not(.first-page) {
|
|
35
|
+
page-break-inside: avoid;
|
|
36
|
+
}
|
|
37
|
+
.participant-analytics-section.single-section.page {
|
|
38
|
+
margin-top: 0px;
|
|
39
|
+
}
|
|
40
|
+
.participant-analytics-section .container .side-chart-container:nth-child(odd) .bar-title span {
|
|
41
|
+
text-align: right;
|
|
11
42
|
}
|
|
12
43
|
|
|
13
44
|
.container {
|
|
14
|
-
padding-right:
|
|
45
|
+
padding-right: 0px;
|
|
15
46
|
padding-left: 50px;
|
|
16
47
|
}
|
|
17
48
|
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
49
|
+
.bar-chart {
|
|
50
|
+
float: left;
|
|
51
|
+
border-top-right-radius: 20px;
|
|
52
|
+
border-bottom-right-radius: 20px;
|
|
53
|
+
border-top-left-radius: 0;
|
|
54
|
+
border-bottom-left-radius: 0;
|
|
21
55
|
}
|
|
22
56
|
|
|
23
|
-
.side-chart-container {
|
|
57
|
+
.participant-analytics-section .container .side-chart-container:nth-child(even) table {
|
|
24
58
|
direction: ltr;
|
|
25
59
|
}
|
|
26
60
|
|
|
27
|
-
.
|
|
28
|
-
|
|
61
|
+
.participant-analytics-section .container .side-chart-container:nth-child(even) {
|
|
62
|
+
float: left;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.participant-analytics-section .container .side-chart-container:nth-child(even) table td.bar-title {
|
|
66
|
+
border-left: 1px solid;
|
|
67
|
+
border-right: 0;
|
|
68
|
+
padding-left: 13px;
|
|
69
|
+
padding-right: 0;
|
|
29
70
|
}
|
|
30
71
|
|
|
31
|
-
.
|
|
32
|
-
|
|
33
|
-
|
|
72
|
+
.participant-analytics-section .container .side-chart-container:nth-child(even) table .bar-chart {
|
|
73
|
+
float: right;
|
|
74
|
+
border-radius: 20px 0 0 20px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/*other pages*/
|
|
78
|
+
.element-summary-container {
|
|
79
|
+
float: left;
|
|
34
80
|
}
|
|
35
81
|
|
|
36
82
|
.other .container .side-chart-container table {
|
|
37
83
|
direction: ltr;
|
|
38
84
|
}
|
|
39
85
|
|
|
40
|
-
.other .container .side-chart-container
|
|
86
|
+
.other .container .side-chart-container {
|
|
41
87
|
float: right;
|
|
42
|
-
border-radius: 20px 0 0 20px;
|
|
43
|
-
text-align: left;
|
|
44
88
|
}
|
|
45
89
|
|
|
46
90
|
.other .container .side-chart-container table td.bar-title {
|
|
47
|
-
border-left: 1px solid;
|
|
48
91
|
border-right: 0;
|
|
49
|
-
|
|
92
|
+
border-left: 1px solid;
|
|
93
|
+
padding-right: 0;
|
|
94
|
+
padding-left:13px;
|
|
50
95
|
}
|
|
51
96
|
|
|
52
|
-
.other .
|
|
53
|
-
|
|
97
|
+
.other .container .side-chart-container table .bar-chart {
|
|
98
|
+
float: right;
|
|
99
|
+
border-radius: 20px 0 0 20px;
|
|
54
100
|
}
|
|
55
101
|
|
|
56
|
-
table.data-by-gender tr th:first-child {
|
|
57
|
-
width: 0%;
|
|
58
|
-
}
|
|
59
102
|
|
|
60
|
-
|
|
103
|
+
.other .side-chart-container .chart_title {
|
|
61
104
|
text-align: right;
|
|
62
105
|
}
|
|
63
106
|
|
|
64
|
-
td {
|
|
65
|
-
text-align: right;
|
|
66
|
-
}
|
|
67
107
|
|
|
68
|
-
.
|
|
69
|
-
|
|
108
|
+
.relations-section .single-relation {
|
|
109
|
+
float: right;
|
|
110
|
+
padding: 1% 1% 0% 1%;
|
|
111
|
+
margin-right: 0;
|
|
112
|
+
margin-left: 3%;
|
|
70
113
|
}
|
|
71
114
|
|
|
72
|
-
.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
padding-bottom: 3%;
|
|
115
|
+
.relations-section .single-relation:nth-child(4n) {
|
|
116
|
+
margin-right: 0;
|
|
117
|
+
margin-left: 5%;
|
|
76
118
|
}
|
|
77
119
|
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
|
|
120
|
+
.relation-content-bottom-bg {
|
|
121
|
+
border-bottom-right-radius: 0;
|
|
122
|
+
border-bottom-left-radius: 30px;
|
|
81
123
|
}
|
|
82
124
|
|
|
83
|
-
.
|
|
84
|
-
|
|
125
|
+
table.data-by-gender {
|
|
126
|
+
float: right;
|
|
127
|
+
text-align: right;
|
|
85
128
|
}
|
|
86
129
|
|
|
87
|
-
.
|
|
88
|
-
|
|
130
|
+
.recommends-section {
|
|
131
|
+
float: right;
|
|
132
|
+
margin-left: 0px;
|
|
133
|
+
margin-right: -50px;
|
|
134
|
+
padding-left: 0px;
|
|
89
135
|
padding-right: 50px;
|
|
136
|
+
border-top-right-radius: 0px;
|
|
137
|
+
border-top-left-radius: 20px;
|
|
138
|
+
border-bottom-right-radius: 0px;
|
|
139
|
+
border-bottom-left-radius: 20px;
|
|
90
140
|
}
|
|
91
141
|
|
|
92
|
-
.
|
|
93
|
-
|
|
142
|
+
.recommends-section li img {
|
|
143
|
+
margin-right: 0;
|
|
144
|
+
margin-left: 7px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.sources-section {
|
|
148
|
+
float: left;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.sources-section span {
|
|
152
|
+
float: right;
|
|
94
153
|
}
|
|
@@ -89,8 +89,7 @@ let generateHTMLCorporateReport = async (data, isDebugging) => {
|
|
|
89
89
|
/*check if the language is an RTL language*/
|
|
90
90
|
if (!data.language) {
|
|
91
91
|
localeService.setLocale("en")
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
92
|
+
} else {
|
|
94
93
|
if (data.language.indexOf('ar') !== -1) {
|
|
95
94
|
data.language = 'ar-SA';
|
|
96
95
|
isRTL = true;
|
|
@@ -100,7 +99,7 @@ let generateHTMLCorporateReport = async (data, isDebugging) => {
|
|
|
100
99
|
}
|
|
101
100
|
/*choose the right template*/
|
|
102
101
|
let html = !isRTL ? fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/ltr_no_pages.html'), 'utf8') :
|
|
103
|
-
|
|
102
|
+
fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/rtl_no_pages.html'), 'utf8')
|
|
104
103
|
|
|
105
104
|
let coverPageTemplate = fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/cover_page.html'), 'utf8');
|
|
106
105
|
let participantAnalyticsTemplate = fs.readFileSync(path.resolve(__dirname + '/../templates/corporate_report/participant_analytics.html'), 'utf8');
|
|
@@ -361,34 +360,37 @@ const empty = (value) => {
|
|
|
361
360
|
|
|
362
361
|
|
|
363
362
|
let renderBarChart = (data) => {
|
|
364
|
-
let total = 100
|
|
365
|
-
let barChart = "
|
|
366
|
-
if (!empty(data.
|
|
367
|
-
barChart
|
|
368
|
-
if (data.title
|
|
369
|
-
|
|
363
|
+
let total = 100;
|
|
364
|
+
let barChart = ""
|
|
365
|
+
if (!empty(data) && !empty(data.data)) {
|
|
366
|
+
barChart = "<div class='side-chart-container'>"
|
|
367
|
+
if (!empty(data.title)) {
|
|
368
|
+
barChart += "<div class='chart_title'>" + data.title + "</div>"
|
|
369
|
+
if (data.title === "Activity") {
|
|
370
|
+
total = data.data[1].value
|
|
371
|
+
}
|
|
370
372
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
373
|
+
if (!empty(data.data)) {
|
|
374
|
+
barChart += "<div class='side-chart side-chart-with-border'><table>"
|
|
375
|
+
let dataLength = data.data.length
|
|
376
|
+
let barChartClass = ''
|
|
377
|
+
if (dataLength > 5) {
|
|
378
|
+
barChartClass = 'divide-bar'
|
|
379
|
+
}
|
|
380
|
+
data.data.map((chartData) => {
|
|
381
|
+
barChart += "<tr>"
|
|
382
|
+
barChart += "<td>" +
|
|
383
|
+
"<div class='bar-chart " + barChartClass + "' style='background: " + chartData.color + "' data-value='" + chartData.value + "' data-total='" + total + "'>" + chartData.value + "</div>\n" +
|
|
384
|
+
"</td>"
|
|
385
|
+
barChart += "<td class='bar-title'><span>" + chartData.title + "</span></td>"
|
|
386
|
+
barChart += "</tr>"
|
|
387
|
+
})
|
|
388
|
+
|
|
389
|
+
barChart += "</table></div>";
|
|
378
390
|
}
|
|
379
|
-
data.data.map((chartData) => {
|
|
380
|
-
barChart += "<tr>"
|
|
381
|
-
barChart += "<td>" +
|
|
382
|
-
"<div class='bar-chart " + barChartClass + "' style='background: " + chartData.color + "' data-value='" + chartData.value + "' data-total='" + total + "'>" + chartData.value + "</div>\n" +
|
|
383
|
-
"</td>"
|
|
384
|
-
barChart += "<td class='bar-title'><span>" + chartData.title + "</span></td>"
|
|
385
|
-
barChart += "</tr>"
|
|
386
|
-
})
|
|
387
391
|
|
|
388
|
-
barChart += "</
|
|
392
|
+
barChart += "</div>";
|
|
389
393
|
}
|
|
390
|
-
|
|
391
|
-
barChart += "</div>";
|
|
392
394
|
return barChart;
|
|
393
395
|
}
|
|
394
396
|
|
package/package.json
CHANGED