@hedia/recommendation-screen 2.0.2 → 2.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/App.d.ts +2 -2
- package/coverage/clover.xml +700 -0
- package/coverage/coverage-final.json +28 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +79 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +201 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +170 -0
- package/coverage/lcov-report/src/RecommendationScreen.tsx.html +1460 -0
- package/coverage/lcov-report/src/__tests__/index.html +111 -0
- package/coverage/lcov-report/src/__tests__/utils.tsx.html +512 -0
- package/coverage/lcov-report/src/components/Header.tsx.html +347 -0
- package/coverage/lcov-report/src/components/InfoBars.tsx.html +404 -0
- package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +374 -0
- package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +191 -0
- package/coverage/lcov-report/src/components/LineSeparator.tsx.html +152 -0
- package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +383 -0
- package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +737 -0
- package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +857 -0
- package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +605 -0
- package/coverage/lcov-report/src/components/Remeasure.tsx.html +440 -0
- package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +380 -0
- package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +635 -0
- package/coverage/lcov-report/src/components/activity/Activity.tsx.html +311 -0
- package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +242 -0
- package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +257 -0
- package/coverage/lcov-report/src/components/activity/index.html +141 -0
- package/coverage/lcov-report/src/components/index.html +276 -0
- package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +278 -0
- package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +260 -0
- package/coverage/lcov-report/src/components/mood/index.html +126 -0
- package/coverage/lcov-report/src/index.html +111 -0
- package/coverage/lcov-report/src/locale/i18nUtils.ts.html +161 -0
- package/coverage/lcov-report/src/locale/index.html +111 -0
- package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +326 -0
- package/coverage/lcov-report/src/utils/Constants.ts.html +176 -0
- package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +500 -0
- package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +467 -0
- package/coverage/lcov-report/src/utils/Translations.ts.html +107 -0
- package/coverage/lcov-report/src/utils/Utils.ts.html +263 -0
- package/coverage/lcov-report/src/utils/Validations.ts.html +815 -0
- package/coverage/lcov-report/src/utils/index.html +201 -0
- package/coverage/lcov.info +1581 -0
- package/jest.config.js +2 -1
- package/package.json +2 -2
- package/src/RecommendationScreen.d.ts +2 -3
- package/src/__tests__/components/Emotion.test.jsx +7 -8
- package/src/components/Icon.d.ts +13 -0
- package/src/components/Icon.jsx +42 -0
- package/src/components/LimitationMessage.d.ts +1 -2
- package/src/components/RecommendationModal.d.ts +2 -3
- package/src/components/RecommendationModal.jsx +2 -1
- package/src/components/activity/ActivityIntensity.jsx +4 -3
- package/src/utils/AttentionMessages.d.ts +16 -10
- package/src/utils/AttentionMessages.jsx +15 -10
- package/src/utils/RecommendationUtils.d.ts +2 -3
- package/src/utils/RecommendationUtils.js +10 -6
- package/src/utils/Utils.d.ts +1 -0
- package/src/utils/Utils.js +4 -0
- package/tsconfig.json +7 -5
- package/App.tsx +0 -140
- package/index.ts +0 -6
- package/src/RecommendationScreen.tsx +0 -461
- package/src/__tests__/RecommendationScreen.test.tsx +0 -1231
- package/src/__tests__/RecommendationUtils.test.ts +0 -332
- package/src/__tests__/Translate.test.tsx +0 -31
- package/src/__tests__/Utils.test.ts +0 -91
- package/src/__tests__/Validations.test.ts +0 -648
- package/src/__tests__/components/Activity.test.tsx +0 -163
- package/src/__tests__/components/Emotion.test.tsx +0 -110
- package/src/__tests__/components/Header.test.tsx +0 -44
- package/src/__tests__/components/InfoBars.test.tsx +0 -152
- package/src/__tests__/components/InvisibleNumberInput.test.tsx +0 -294
- package/src/__tests__/components/LimitationMessage.test.tsx +0 -58
- package/src/__tests__/components/MoodIcon.test.tsx +0 -45
- package/src/__tests__/components/RecommendationModal.test.tsx +0 -169
- package/src/__tests__/components/RecommendedCarbs.test.tsx +0 -234
- package/src/__tests__/components/RecommendedInsulin.test.tsx +0 -241
- package/src/__tests__/components/Remeasure.test.tsx +0 -97
- package/src/__tests__/components/TransferToLogbook.test.tsx +0 -38
- package/src/__tests__/components/TwoOptionModal.test.tsx +0 -72
- package/src/__tests__/utils.tsx +0 -144
- package/src/components/Header.tsx +0 -89
- package/src/components/Icon.js +0 -41
- package/src/components/InfoBars.tsx +0 -108
- package/src/components/InvisibleNumberInput.tsx +0 -98
- package/src/components/LimitationMessage.tsx +0 -38
- package/src/components/LineSeparator.tsx +0 -24
- package/src/components/RecentInsulin.tsx +0 -101
- package/src/components/RecommendationModal.tsx +0 -224
- package/src/components/RecommendedCarbs.tsx +0 -259
- package/src/components/RecommendedInsulin.tsx +0 -175
- package/src/components/Remeasure.tsx +0 -120
- package/src/components/TransferToLogbook.tsx +0 -100
- package/src/components/TwoOptionModal.tsx +0 -185
- package/src/components/activity/Activity.tsx +0 -77
- package/src/components/activity/ActivityIcon.tsx +0 -54
- package/src/components/activity/ActivityIntensity.tsx +0 -58
- package/src/components/mood/Emotion.tsx +0 -66
- package/src/components/mood/MoodIcon.tsx +0 -60
- package/src/locale/CleanLanguage.ts +0 -13
- package/src/locale/i18nUtils.ts +0 -27
- package/src/types/enum.ts +0 -108
- package/src/types/types.ts +0 -16
- package/src/utils/AttentionMessages.tsx +0 -75
- package/src/utils/Constants.ts +0 -32
- package/src/utils/RecommendationError.tsx +0 -140
- package/src/utils/RecommendationUtils.ts +0 -125
- package/src/utils/Translations.ts +0 -9
- package/src/utils/Utils.ts +0 -57
- package/src/utils/Validations.ts +0 -245
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for src/utils/Constants.ts</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/utils</a> Constants.ts</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>23/23</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>0/0</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>0/0</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>23/23</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
</div>
|
|
58
|
+
<div class='status-line high'></div>
|
|
59
|
+
<pre><table class="coverage">
|
|
60
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
61
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
62
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
63
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
64
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
65
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
66
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
67
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
68
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
69
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
70
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
71
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
72
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
73
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
74
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
75
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
76
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
77
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
78
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
79
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
80
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
81
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
82
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
83
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
84
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
85
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
86
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
87
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
88
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
89
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
90
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
91
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
92
|
+
<a name='L33'></a><a href='#L33'>33</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
93
|
+
<span class="cline-any cline-neutral"> </span>
|
|
94
|
+
<span class="cline-any cline-yes">13x</span>
|
|
95
|
+
<span class="cline-any cline-yes">13x</span>
|
|
96
|
+
<span class="cline-any cline-yes">13x</span>
|
|
97
|
+
<span class="cline-any cline-neutral"> </span>
|
|
98
|
+
<span class="cline-any cline-yes">13x</span>
|
|
99
|
+
<span class="cline-any cline-neutral"> </span>
|
|
100
|
+
<span class="cline-any cline-yes">13x</span>
|
|
101
|
+
<span class="cline-any cline-yes">13x</span>
|
|
102
|
+
<span class="cline-any cline-yes">13x</span>
|
|
103
|
+
<span class="cline-any cline-neutral"> </span>
|
|
104
|
+
<span class="cline-any cline-yes">13x</span>
|
|
105
|
+
<span class="cline-any cline-yes">13x</span>
|
|
106
|
+
<span class="cline-any cline-yes">13x</span>
|
|
107
|
+
<span class="cline-any cline-neutral"> </span>
|
|
108
|
+
<span class="cline-any cline-yes">13x</span>
|
|
109
|
+
<span class="cline-any cline-yes">13x</span>
|
|
110
|
+
<span class="cline-any cline-yes">13x</span>
|
|
111
|
+
<span class="cline-any cline-neutral"> </span>
|
|
112
|
+
<span class="cline-any cline-yes">13x</span>
|
|
113
|
+
<span class="cline-any cline-yes">13x</span>
|
|
114
|
+
<span class="cline-any cline-yes">13x</span>
|
|
115
|
+
<span class="cline-any cline-neutral"> </span>
|
|
116
|
+
<span class="cline-any cline-yes">13x</span>
|
|
117
|
+
<span class="cline-any cline-yes">13x</span>
|
|
118
|
+
<span class="cline-any cline-yes">13x</span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-yes">13x</span>
|
|
121
|
+
<span class="cline-any cline-yes">13x</span>
|
|
122
|
+
<span class="cline-any cline-yes">13x</span>
|
|
123
|
+
<span class="cline-any cline-yes">13x</span>
|
|
124
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { IInterval } from "../types/types";
|
|
125
|
+
|
|
126
|
+
export const BACKGROUND_COLOUR_PURPLE = `rgba(27, 31, 72, 1)`;
|
|
127
|
+
export const BORDER_COLOUR_GREY = `rgba(74, 91, 134, 1)`;
|
|
128
|
+
export const BORDER_COLOUR_TEAL = `rgba(1, 255, 252, 0.8)`;
|
|
129
|
+
|
|
130
|
+
export const SEVERE_HYPERGLYCEMIA_START_MMOL = 15;
|
|
131
|
+
|
|
132
|
+
export const FOUR_HOURS_SECONDS = 14400;
|
|
133
|
+
export const ONE_HOUR_MINUTES = 60;
|
|
134
|
+
export const ACTIVITY_BUFFER_MINUTES = 10;
|
|
135
|
+
|
|
136
|
+
export const CARBOHYDRATES_LIMTS: IInterval = { min: 0, max: 300 };
|
|
137
|
+
export const INSULIN_DOSE_LIMITS: IInterval = { min: 0, max: 50 };
|
|
138
|
+
export const BOLUS_SECONDS_PASSED_LIMITS: IInterval = { min: 0, max: FOUR_HOURS_SECONDS };
|
|
139
|
+
|
|
140
|
+
export const ACTIVITY_DURATION_MINUTES_LIMITS: IInterval = { min: 1, max: ONE_HOUR_MINUTES };
|
|
141
|
+
export const INSULIN_SENSITIVITY_MMOL_LIMITS: IInterval = { min: 0.3, max: 10 };
|
|
142
|
+
export const INSULIN_TO_CARBS_RATIO_LIMITS: IInterval = { min: 1, max: 50 };
|
|
143
|
+
|
|
144
|
+
export const CURRENT_BGL_MMOL_LIMITS: IInterval = { min: 1.1, max: 33.3 };
|
|
145
|
+
export const MMOLL_PER_MGDL_BGL: number = 0.0555;
|
|
146
|
+
export const MGDL_PER_MMOLL_BGL: number = 1 / MMOLL_PER_MGDL_BGL;
|
|
147
|
+
|
|
148
|
+
export const CURRENT_BKL_MMOL_LIMITS: IInterval = { min: 0, max: 8 };
|
|
149
|
+
export const MMOLL_PER_MGDL_BKL: number = 0.096;
|
|
150
|
+
export const MGDL_PER_MMOLL_BKL: number = 1 / MMOLL_PER_MGDL_BKL;
|
|
151
|
+
|
|
152
|
+
export const TARGET_BGL_MMOL_LIMITS: IInterval = { min: 5, max: 13.9 };
|
|
153
|
+
export const ACTIVITY_TARGET_BGL_MMOL_LIMITS: IInterval = { min: 5, max: 13.9 };
|
|
154
|
+
export const REMINDER_HOURS_LIMITS: IInterval = { min: 0, max: 6 };
|
|
155
|
+
export const ACTIVITY_SETTINGS_INTERVAL_LIMITS: IInterval = { min: 0, max: 1 };
|
|
156
|
+
</pre></td></tr></table></pre>
|
|
157
|
+
|
|
158
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
159
|
+
</div><!-- /wrapper -->
|
|
160
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
161
|
+
Code coverage generated by
|
|
162
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
163
|
+
at Thu Mar 11 2021 10:40:38 GMT+0000 (Coordinated Universal Time)
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<script src="../../prettify.js"></script>
|
|
167
|
+
<script>
|
|
168
|
+
window.onload = function () {
|
|
169
|
+
prettyPrint();
|
|
170
|
+
};
|
|
171
|
+
</script>
|
|
172
|
+
<script src="../../sorter.js"></script>
|
|
173
|
+
<script src="../../block-navigation.js"></script>
|
|
174
|
+
</body>
|
|
175
|
+
</html>
|
|
176
|
+
|