@hedia/recommendation-screen 2.1.21 → 2.1.22-alpha.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/coverage/clover.xml +716 -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 +2483 -0
- package/coverage/lcov-report/src/__tests__/index.html +111 -0
- package/coverage/lcov-report/src/__tests__/utils.tsx.html +533 -0
- package/coverage/lcov-report/src/components/Header.tsx.html +356 -0
- package/coverage/lcov-report/src/components/InfoBars.tsx.html +518 -0
- package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +566 -0
- package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +209 -0
- package/coverage/lcov-report/src/components/LineSeparator.tsx.html +161 -0
- package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +410 -0
- package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +923 -0
- package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +1061 -0
- package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +779 -0
- package/coverage/lcov-report/src/components/Remeasure.tsx.html +551 -0
- package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +443 -0
- package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +665 -0
- package/coverage/lcov-report/src/components/activity/Activity.tsx.html +371 -0
- package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +281 -0
- package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +281 -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 +353 -0
- package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +335 -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 +206 -0
- package/coverage/lcov-report/src/locale/index.html +111 -0
- package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +554 -0
- package/coverage/lcov-report/src/utils/Constants.ts.html +248 -0
- package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +620 -0
- package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +764 -0
- package/coverage/lcov-report/src/utils/Translations.ts.html +131 -0
- package/coverage/lcov-report/src/utils/Utils.ts.html +545 -0
- package/coverage/lcov-report/src/utils/Validations.ts.html +1544 -0
- package/coverage/lcov-report/src/utils/index.html +201 -0
- package/coverage/lcov.info +1611 -0
- package/package.json +2 -2
- package/src/__tests__/utils.js +2 -2
|
@@ -0,0 +1,248 @@
|
|
|
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>
|
|
93
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
94
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
95
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
96
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
97
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
98
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
99
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
100
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
101
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
102
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
103
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
104
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
105
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
106
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
107
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
108
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
109
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
110
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
111
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
112
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
113
|
+
<a name='L54'></a><a href='#L54'>54</a>
|
|
114
|
+
<a name='L55'></a><a href='#L55'>55</a>
|
|
115
|
+
<a name='L56'></a><a href='#L56'>56</a>
|
|
116
|
+
<a name='L57'></a><a href='#L57'>57</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
117
|
+
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-neutral"> </span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
120
|
+
<span class="cline-any cline-yes">13x</span>
|
|
121
|
+
<span class="cline-any cline-neutral"> </span>
|
|
122
|
+
<span class="cline-any cline-yes">13x</span>
|
|
123
|
+
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-yes">13x</span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-yes">13x</span>
|
|
128
|
+
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-yes">13x</span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-yes">13x</span>
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-yes">13x</span>
|
|
135
|
+
<span class="cline-any cline-neutral"> </span>
|
|
136
|
+
<span class="cline-any cline-neutral"> </span>
|
|
137
|
+
<span class="cline-any cline-yes">13x</span>
|
|
138
|
+
<span class="cline-any cline-neutral"> </span>
|
|
139
|
+
<span class="cline-any cline-yes">13x</span>
|
|
140
|
+
<span class="cline-any cline-neutral"> </span>
|
|
141
|
+
<span class="cline-any cline-yes">13x</span>
|
|
142
|
+
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-neutral"> </span>
|
|
144
|
+
<span class="cline-any cline-yes">13x</span>
|
|
145
|
+
<span class="cline-any cline-neutral"> </span>
|
|
146
|
+
<span class="cline-any cline-yes">13x</span>
|
|
147
|
+
<span class="cline-any cline-neutral"> </span>
|
|
148
|
+
<span class="cline-any cline-yes">13x</span>
|
|
149
|
+
<span class="cline-any cline-neutral"> </span>
|
|
150
|
+
<span class="cline-any cline-neutral"> </span>
|
|
151
|
+
<span class="cline-any cline-yes">13x</span>
|
|
152
|
+
<span class="cline-any cline-neutral"> </span>
|
|
153
|
+
<span class="cline-any cline-yes">13x</span>
|
|
154
|
+
<span class="cline-any cline-neutral"> </span>
|
|
155
|
+
<span class="cline-any cline-yes">13x</span>
|
|
156
|
+
<span class="cline-any cline-neutral"> </span>
|
|
157
|
+
<span class="cline-any cline-neutral"> </span>
|
|
158
|
+
<span class="cline-any cline-yes">13x</span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-yes">13x</span>
|
|
161
|
+
<span class="cline-any cline-neutral"> </span>
|
|
162
|
+
<span class="cline-any cline-yes">13x</span>
|
|
163
|
+
<span class="cline-any cline-neutral"> </span>
|
|
164
|
+
<span class="cline-any cline-neutral"> </span>
|
|
165
|
+
<span class="cline-any cline-yes">13x</span>
|
|
166
|
+
<span class="cline-any cline-neutral"> </span>
|
|
167
|
+
<span class="cline-any cline-yes">13x</span>
|
|
168
|
+
<span class="cline-any cline-neutral"> </span>
|
|
169
|
+
<span class="cline-any cline-yes">13x</span>
|
|
170
|
+
<span class="cline-any cline-neutral"> </span>
|
|
171
|
+
<span class="cline-any cline-yes">13x</span>
|
|
172
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { BolusCalculator } from "@hedia/types";
|
|
173
|
+
import { IInterval } from "../types/types";
|
|
174
|
+
|
|
175
|
+
/** Reusable color definition. */
|
|
176
|
+
export const BACKGROUND_COLOUR_PURPLE = `rgba(27, 31, 72, 1)`;
|
|
177
|
+
/** Reusable color definition. */
|
|
178
|
+
export const BORDER_COLOUR_GREY = `rgba(74, 91, 134, 1)`;
|
|
179
|
+
/** Reusable color definition. */
|
|
180
|
+
export const BORDER_COLOUR_TEAL = `rgba(1, 255, 252, 0.8)`;
|
|
181
|
+
|
|
182
|
+
/** The threshold above which hyperglycemia is considered to be severe in mmol/L */
|
|
183
|
+
export const SEVERE_HYPERGLYCEMIA_START_MMOL = 15;
|
|
184
|
+
|
|
185
|
+
/** The number of seconds in four hours. */
|
|
186
|
+
export const FOUR_HOURS_SECONDS = 14400;
|
|
187
|
+
/** The number of minutes in one hour. */
|
|
188
|
+
export const ONE_HOUR_MINUTES = 60;
|
|
189
|
+
/** Extra time before an activity starts or stops. */
|
|
190
|
+
export const ACTIVITY_BUFFER_MINUTES = 10;
|
|
191
|
+
|
|
192
|
+
/** The lower and upper limits for the amount of carbohydrates in grams. */
|
|
193
|
+
export const CARBOHYDRATES_LIMTS: IInterval = { min: 0, max: 300 };
|
|
194
|
+
/** The lower and upper limits for the insulin dose in units. The upper limit is represented by the SAFETY_INSULIN_LIMIT constant while the lower limit is 0. */
|
|
195
|
+
export const INSULIN_DOSE_LIMITS: IInterval = { min: 0, max: BolusCalculator.Constants.SAFETY_INSULIN_LIMIT };
|
|
196
|
+
/** The lower and upper limits for the age of boluses that gets taken into account for calculating insulin on board. */
|
|
197
|
+
export const BOLUS_SECONDS_PASSED_LIMITS: IInterval = { min: 0, max: FOUR_HOURS_SECONDS };
|
|
198
|
+
|
|
199
|
+
/** The lower and upper limits for the duration of an activity in minutes. */
|
|
200
|
+
export const ACTIVITY_DURATION_MINUTES_LIMITS: IInterval = { min: 1, max: ONE_HOUR_MINUTES };
|
|
201
|
+
/** The lower and upper limits of insulin sensitivity settings. */
|
|
202
|
+
export const INSULIN_SENSITIVITY_MMOL_LIMITS: IInterval = { min: 0.3, max: 10 };
|
|
203
|
+
/** The lower and upper limits of insulin-to-carbs ratio settings. */
|
|
204
|
+
export const INSULIN_TO_CARBS_RATIO_LIMITS: IInterval = { min: 1, max: 50 };
|
|
205
|
+
|
|
206
|
+
/** The lower and upper limits of the entered blood glucose level value in mmol/L. */
|
|
207
|
+
export const CURRENT_BGL_MMOL_LIMITS: IInterval = { min: 1.1, max: 33.3 };
|
|
208
|
+
/** The conversion factor to multiply a blood glucose value with to go from mmol/L to mg/dL. */
|
|
209
|
+
export const MMOLL_PER_MGDL_BGL: number = 0.0555;
|
|
210
|
+
/** The conversion factor to multiply a blood glucose value with to go from mg/dL to mmol/L. */
|
|
211
|
+
export const MGDL_PER_MMOLL_BGL: number = 1 / MMOLL_PER_MGDL_BGL;
|
|
212
|
+
|
|
213
|
+
/** The lower and upper limits of the entered blood ketones value in mmol/L. */
|
|
214
|
+
export const CURRENT_BKL_MMOL_LIMITS: IInterval = { min: 0, max: 8 };
|
|
215
|
+
/** The conversion factor to multiply a blood ketones value with to go from mmol/L to mg/dL. */
|
|
216
|
+
export const MMOLL_PER_MGDL_BKL: number = 0.096;
|
|
217
|
+
/** The conversion factor to multiply a blood ketones value with to go from mg/dL to mmol/L. */
|
|
218
|
+
export const MGDL_PER_MMOLL_BKL: number = 1 / MMOLL_PER_MGDL_BKL;
|
|
219
|
+
|
|
220
|
+
/** The lower and upper limits for a valid BGL target in mmol/L. */
|
|
221
|
+
export const TARGET_BGL_MMOL_LIMITS: IInterval = { min: 5, max: 13.9 };
|
|
222
|
+
/** The lower and upper limits for a valid activity BGL target in mmol/L. */
|
|
223
|
+
export const ACTIVITY_TARGET_BGL_MMOL_LIMITS: IInterval = { min: 5, max: 13.9 };
|
|
224
|
+
/** The lower and upper limits for how long the reminder notification timer may be. */
|
|
225
|
+
export const REMINDER_HOURS_LIMITS: IInterval = { min: 0, max: 6 };
|
|
226
|
+
/** The lower and upper limits for activity reduction. */
|
|
227
|
+
export const ACTIVITY_SETTINGS_INTERVAL_LIMITS: IInterval = { min: 0, max: 1 };
|
|
228
|
+
</pre></td></tr></table></pre>
|
|
229
|
+
|
|
230
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
231
|
+
</div><!-- /wrapper -->
|
|
232
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
233
|
+
Code coverage generated by
|
|
234
|
+
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
235
|
+
at Thu Sep 23 2021 09:47:17 GMT+0000 (Coordinated Universal Time)
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
<script src="../../prettify.js"></script>
|
|
239
|
+
<script>
|
|
240
|
+
window.onload = function () {
|
|
241
|
+
prettyPrint();
|
|
242
|
+
};
|
|
243
|
+
</script>
|
|
244
|
+
<script src="../../sorter.js"></script>
|
|
245
|
+
<script src="../../block-navigation.js"></script>
|
|
246
|
+
</body>
|
|
247
|
+
</html>
|
|
248
|
+
|