@medicus.ai/medicus-report-pdf-generator 1.0.294 → 1.0.296

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.
@@ -10,21 +10,6 @@ body {
10
10
  height: 297mm;
11
11
  MARGIN: AUTO;
12
12
  font-family: 'Open Sans', sans-serif;
13
- position: relative;
14
- }
15
- .diagnostikare .report-header,
16
- .diagnostikare .score-header,
17
- .diagnostikare .chart-title,
18
- .diagnostikare h5.recommended-tips-title{
19
- font-family: 'DM Serif Display', serif;
20
- }
21
-
22
- .diagnostikare *{
23
- font-family: 'DM Sans', sans-serif;
24
- }
25
-
26
- .diagnostikare .report-header{
27
- font-size:19px
28
13
  }
29
14
 
30
15
  html {
@@ -33,6 +18,11 @@ html {
33
18
  scroll-behavior: smooth;
34
19
  }
35
20
 
21
+ body {
22
+ position: relative;
23
+ font-family: 'Open Sans', sans-serif;
24
+ }
25
+
36
26
  header {
37
27
  min-height: 38px;
38
28
  padding: 3.143em 3.571em 0;
@@ -3445,7 +3435,4 @@ div[key="mind"] .score-details-title {
3445
3435
  }
3446
3436
  .es .disclaimer-text{
3447
3437
  font-size:7px
3448
- }
3449
- .diagnostikare .footer-logo{
3450
- display: none;
3451
3438
  }
@@ -5,11 +5,11 @@
5
5
  "mind_icon": "https://i.ibb.co/gVjxNZ7/mind-section.png",
6
6
  "bulb_icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAABKCAYAAADgxem7AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAXPSURBVHgB7ZvPbxtFFMe/b9cJQVTgSgiQoMK58OOUVNBDhQQuLee2dyDJqQcOTSRKeotzK1yanEJboaR/QdM7ouYUCYSaXKgI0GxFC4gCMQjUJLb38WZtN2vjTWbWa3tX3Y8Uxd6Z9a6/+37MvBkT+gT/tjAOsha9N5VNoLpZb+BZOvRJAX3AQspDUjF8pGL46EgM/mU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hBHdrgaWkZgs0kpO5ixas2l9MZhiVfw1gvGUTjctMeqZJLlUcFCn26OxWYWidpMkw3pDci0x6NWigySTwaZON4PUyj1aUO4ChL90uhlkEyupYpR0Z64GYkgBKIkwtJc+TMYZodZTYsC+Ff4G+mJYlSKSCDdX8fZCWwx6qSiWsffSQQxxpPRX1O1sNs5gvopkUTTpbCbGYGUuUSl2x2xh2kgMGi6WZJVtHslgyXRB2nw4rqyDZb0h3jimVqEw3/qorIOqpxFnGFNhtimEmqiRyiyuO4U44mKWXtdPp35Cz1rplS/Ufoz+bDMMQglxJPxieEdTeHr580JsBOlQCEXH9YxYCBKBEIpIijt9FSQiIRSRVbr6IkiEQiii3/q4fkJtlsubnBNyFd6h1zCMCIlUjHevrOSfHNi+9rj9wGhZ4dZ2Bd9ulU1Owd+VA6U/t4cmMP1mqDTaDqOfZenwb2UoK39G5/y8xbizBVOyIDfStZz0d60+UjF8pGL4SMXwEWkAzbBdYnKd+tvmvdlRIcUlBtUKTEyRFpq69uOb9z5bGbeYFnX6rkk2WdPMJszuLM69UUAXSN3ERyqGj1QMH5GPQBvY7AU6p/62s2DaxaDZdBn0gPevrCwRUeCG2v0CKEulGx8eDfUrZhNSN/GRiuEjFcNH1wKoH4uagmlbeK/oVWWtnTed8h/GgiL7CdPgMgAAAABJRU5ErkJggg==",
7
7
  "bulb_icon_font_color": "rgb(171, 204, 58)",
8
- "first-level-color": "rgb(251, 186, 125)",
9
- "second-level-color": "rgb(254, 146, 43)",
10
- "third-level-color": "rgb(95, 156, 200)",
11
- "forth-level-color": "rgb(134, 181, 128)",
12
- "fifth-level-color": "rgb(171, 204, 58)",
8
+ "first-level-color": "rgb(250, 239, 116)",
9
+ "second-level-color": "rgb(250, 239, 116)",
10
+ "third-level-color": "rgb(70, 191, 245)",
11
+ "forth-level-color": "rgb(167, 214, 186)",
12
+ "fifth-level-color": "rgb(167, 214, 186)",
13
13
  "general-font-color": "rgb(95, 156, 200)",
14
14
  "disclaimer-text-color": "rgb(51, 51, 51)",
15
15
  "top-box-background": "#f7fbfd",
@@ -355,23 +355,20 @@ let generateHTMLWellbeingReport = async (data, isDebugging, clientName, language
355
355
  let mindTips = []
356
356
  let bodyTips = []
357
357
  let i = 0;
358
- Object.entries(partScores).map(([key, value], index) => {
359
- if (key === 'bodyInsights' || key === 'lifeStyleInsights' || key === 'mindInsights') {
360
- partScores[key]['tips'].map((tip, index) => {
361
- if (key === 'lifeStyleInsights') {
362
- tip.type = 'lifeStyleInsights'
363
- lifeStyleTips.push(tip)
364
- }
365
- if (key === 'bodyInsights') {
366
- tip.type = 'bodyInsights'
367
- bodyTips.push(tip)
368
- }
369
- if (key === 'mindInsights') {
370
- tip.type = 'mindInsights'
371
- mindTips.push(tip)
372
- }
373
- i++;
374
- })
358
+ tips.map((key, index) => {
359
+ if (key.partId === 1 || key.partId === 2 || key.partId === 3) {
360
+ if (key.partId === 1) {
361
+ key.type = 'lifeStyleInsights'
362
+ lifeStyleTips.push(key)
363
+ }
364
+ if (key.partId === 2) {
365
+ key.type = 'bodyInsights'
366
+ bodyTips.push(key)
367
+ }
368
+ if (key.partId === 3) {
369
+ key.type = 'mindInsights'
370
+ mindTips.push(key)
371
+ }
375
372
  }
376
373
  });
377
374
 
@@ -536,31 +533,29 @@ let renderScoreListElements = (key, partScores) => {
536
533
  let i = 0;
537
534
  if (!isEmpty(partScores)) {
538
535
  Object.entries(partScores).map(([key, value], index) => {
539
- if (key === 'body' || key === 'lifeStyle' || key === 'mind') {
540
- partScores[key].map((item, index) => {
541
- let name = item['icon'].split(".png", [1]);
542
- let icon = icons[name];
543
- let score_segments = Math.round(item['score'] / 2) + "/5"; // get score between 1 and 5
544
- let color = '#8b8ba7';
545
- let tempElement = {
546
- id: i,
547
- icon: icon,
548
- name: item['name'],
549
- color: color,
550
- score: key === 'healthRisk' ? item['scoreText'] : score_segments
551
- };
552
- if (key === 'body') {
553
- body.push(tempElement)
554
- } else if (key === 'lifeStyle') {
555
- lifeStyle.push(tempElement)
556
- } else if (key === 'mind') {
557
- mind.push(tempElement)
558
- } else {
559
- healthRisk.push(tempElement)
560
- }
561
- i++;
562
- })
563
- }
536
+ partScores[key].map((item, index) => {
537
+ let name = item['icon'].split(".png", [1]);
538
+ let icon = icons[name];
539
+ let score_segments = Math.round(item['score'] / 2) + "/5"; // get score between 1 and 5
540
+ let color = '#8b8ba7';
541
+ let tempElement = {
542
+ id: i,
543
+ icon: icon,
544
+ name: item['name'],
545
+ color: color,
546
+ score: key === 'healthRisk' ? item['scoreText'] : score_segments
547
+ };
548
+ if (key === 'body') {
549
+ body.push(tempElement)
550
+ } else if (key === 'lifeStyle') {
551
+ lifeStyle.push(tempElement)
552
+ } else if (key === 'mind') {
553
+ mind.push(tempElement)
554
+ } else {
555
+ healthRisk.push(tempElement)
556
+ }
557
+ i++;
558
+ })
564
559
  });
565
560
  tempElements['lifeStyle'] = lifeStyle;
566
561
  tempElements['body'] = body;
@@ -662,13 +657,13 @@ let renderInsightTips = (tips) => {
662
657
  let insightClass = 'insight-container-without-img';
663
658
  let tipsTextClass = ''
664
659
  if (index === 0) {
665
- if (tip.type === 'lifeStyleInsights') {
660
+ if (tip.partId === 1) {
666
661
  tipImage = lifestyleImage
667
662
  }
668
- if (tip.type === 'bodyInsights') {
663
+ if (tip.partId === 2) {
669
664
  tipImage = bodyImage
670
665
  }
671
- if (tip.type === 'mindInsights') {
666
+ if (tip.partId === 3) {
672
667
  tipImage = mindImage
673
668
  }
674
669
  insightClass = "insight-container-with-img";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicus.ai/medicus-report-pdf-generator",
3
- "version": "1.0.294",
3
+ "version": "1.0.296",
4
4
  "description": "Nasco corporate report - latest update in 12/10/2023 - Fix HRC for bionext",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,10 +5,6 @@
5
5
  <title>TEMPLATE</title>
6
6
  <link rel="stylesheet" href="../assets/wellbeing/css/nasco_report.css" type="text/css">
7
7
  <link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700;1,800&display=swap" rel="stylesheet">
8
-
9
- <link rel="preconnect" href="https://fonts.googleapis.com">
10
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
- <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100;0,9..40,200;0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;0,9..40,900;0,9..40,1000;1,9..40,100;1,9..40,200;1,9..40,300;1,9..40,400;1,9..40,500;1,9..40,600;1,9..40,700;1,9..40,800;1,9..40,900;1,9..40,1000&family=DM+Serif+Display:ital@0;1&display=swap" rel="stylesheet">
12
8
  <script>
13
9
  var IS_ARABIC = false;
14
10
  </script>
@@ -1,93 +0,0 @@
1
- Copyright 2014-2017 Indian Type Foundry (info@indiantypefoundry.com). Copyright 2019 Google LLC.
2
-
3
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
- This license is copied below, and is also available with a FAQ at:
5
- http://scripts.sil.org/OFL
6
-
7
-
8
- -----------------------------------------------------------
9
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
- -----------------------------------------------------------
11
-
12
- PREAMBLE
13
- The goals of the Open Font License (OFL) are to stimulate worldwide
14
- development of collaborative font projects, to support the font creation
15
- efforts of academic and linguistic communities, and to provide a free and
16
- open framework in which fonts may be shared and improved in partnership
17
- with others.
18
-
19
- The OFL allows the licensed fonts to be used, studied, modified and
20
- redistributed freely as long as they are not sold by themselves. The
21
- fonts, including any derivative works, can be bundled, embedded,
22
- redistributed and/or sold with any software provided that any reserved
23
- names are not used by derivative works. The fonts and derivatives,
24
- however, cannot be released under any other type of license. The
25
- requirement for fonts to remain under this license does not apply
26
- to any document created using the fonts or their derivatives.
27
-
28
- DEFINITIONS
29
- "Font Software" refers to the set of files released by the Copyright
30
- Holder(s) under this license and clearly marked as such. This may
31
- include source files, build scripts and documentation.
32
-
33
- "Reserved Font Name" refers to any names specified as such after the
34
- copyright statement(s).
35
-
36
- "Original Version" refers to the collection of Font Software components as
37
- distributed by the Copyright Holder(s).
38
-
39
- "Modified Version" refers to any derivative made by adding to, deleting,
40
- or substituting -- in part or in whole -- any of the components of the
41
- Original Version, by changing formats or by porting the Font Software to a
42
- new environment.
43
-
44
- "Author" refers to any designer, engineer, programmer, technical
45
- writer or other person who contributed to the Font Software.
46
-
47
- PERMISSION & CONDITIONS
48
- Permission is hereby granted, free of charge, to any person obtaining
49
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
- redistribute, and sell modified and unmodified copies of the Font
51
- Software, subject to the following conditions:
52
-
53
- 1) Neither the Font Software nor any of its individual components,
54
- in Original or Modified Versions, may be sold by itself.
55
-
56
- 2) Original or Modified Versions of the Font Software may be bundled,
57
- redistributed and/or sold with any software, provided that each copy
58
- contains the above copyright notice and this license. These can be
59
- included either as stand-alone text files, human-readable headers or
60
- in the appropriate machine-readable metadata fields within text or
61
- binary files as long as those fields can be easily viewed by the user.
62
-
63
- 3) No Modified Version of the Font Software may use the Reserved Font
64
- Name(s) unless explicit written permission is granted by the corresponding
65
- Copyright Holder. This restriction only applies to the primary font name as
66
- presented to the users.
67
-
68
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
- Software shall not be used to promote, endorse or advertise any
70
- Modified Version, except to acknowledge the contribution(s) of the
71
- Copyright Holder(s) and the Author(s) or with their explicit written
72
- permission.
73
-
74
- 5) The Font Software, modified or unmodified, in part or in whole,
75
- must be distributed entirely under this license, and must not be
76
- distributed under any other license. The requirement for fonts to
77
- remain under this license does not apply to any document created
78
- using the Font Software.
79
-
80
- TERMINATION
81
- This license becomes null and void if any of the above conditions are
82
- not met.
83
-
84
- DISCLAIMER
85
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
- OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -1,93 +0,0 @@
1
- Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. Copyright 2019 Google LLC.
2
-
3
- This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
- This license is copied below, and is also available with a FAQ at:
5
- http://scripts.sil.org/OFL
6
-
7
-
8
- -----------------------------------------------------------
9
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
- -----------------------------------------------------------
11
-
12
- PREAMBLE
13
- The goals of the Open Font License (OFL) are to stimulate worldwide
14
- development of collaborative font projects, to support the font creation
15
- efforts of academic and linguistic communities, and to provide a free and
16
- open framework in which fonts may be shared and improved in partnership
17
- with others.
18
-
19
- The OFL allows the licensed fonts to be used, studied, modified and
20
- redistributed freely as long as they are not sold by themselves. The
21
- fonts, including any derivative works, can be bundled, embedded,
22
- redistributed and/or sold with any software provided that any reserved
23
- names are not used by derivative works. The fonts and derivatives,
24
- however, cannot be released under any other type of license. The
25
- requirement for fonts to remain under this license does not apply
26
- to any document created using the fonts or their derivatives.
27
-
28
- DEFINITIONS
29
- "Font Software" refers to the set of files released by the Copyright
30
- Holder(s) under this license and clearly marked as such. This may
31
- include source files, build scripts and documentation.
32
-
33
- "Reserved Font Name" refers to any names specified as such after the
34
- copyright statement(s).
35
-
36
- "Original Version" refers to the collection of Font Software components as
37
- distributed by the Copyright Holder(s).
38
-
39
- "Modified Version" refers to any derivative made by adding to, deleting,
40
- or substituting -- in part or in whole -- any of the components of the
41
- Original Version, by changing formats or by porting the Font Software to a
42
- new environment.
43
-
44
- "Author" refers to any designer, engineer, programmer, technical
45
- writer or other person who contributed to the Font Software.
46
-
47
- PERMISSION & CONDITIONS
48
- Permission is hereby granted, free of charge, to any person obtaining
49
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
- redistribute, and sell modified and unmodified copies of the Font
51
- Software, subject to the following conditions:
52
-
53
- 1) Neither the Font Software nor any of its individual components,
54
- in Original or Modified Versions, may be sold by itself.
55
-
56
- 2) Original or Modified Versions of the Font Software may be bundled,
57
- redistributed and/or sold with any software, provided that each copy
58
- contains the above copyright notice and this license. These can be
59
- included either as stand-alone text files, human-readable headers or
60
- in the appropriate machine-readable metadata fields within text or
61
- binary files as long as those fields can be easily viewed by the user.
62
-
63
- 3) No Modified Version of the Font Software may use the Reserved Font
64
- Name(s) unless explicit written permission is granted by the corresponding
65
- Copyright Holder. This restriction only applies to the primary font name as
66
- presented to the users.
67
-
68
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
- Software shall not be used to promote, endorse or advertise any
70
- Modified Version, except to acknowledge the contribution(s) of the
71
- Copyright Holder(s) and the Author(s) or with their explicit written
72
- permission.
73
-
74
- 5) The Font Software, modified or unmodified, in part or in whole,
75
- must be distributed entirely under this license, and must not be
76
- distributed under any other license. The requirement for fonts to
77
- remain under this license does not apply to any document created
78
- using the Font Software.
79
-
80
- TERMINATION
81
- This license becomes null and void if any of the above conditions are
82
- not met.
83
-
84
- DISCLAIMER
85
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
- OTHER DEALINGS IN THE FONT SOFTWARE.