@hedia/recommendation-screen 2.1.15 → 2.1.16
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 +586 -588
- package/coverage/coverage-final.json +27 -27
- package/coverage/lcov-report/index.html +7 -7
- package/coverage/lcov-report/src/RecommendationScreen.tsx.html +979 -10
- package/coverage/lcov-report/src/__tests__/index.html +1 -1
- package/coverage/lcov-report/src/__tests__/utils.tsx.html +29 -8
- package/coverage/lcov-report/src/components/Header.tsx.html +13 -4
- package/coverage/lcov-report/src/components/InfoBars.tsx.html +86 -2
- package/coverage/lcov-report/src/components/InvisibleNumberInput.tsx.html +196 -4
- package/coverage/lcov-report/src/components/LimitationMessage.tsx.html +20 -2
- package/coverage/lcov-report/src/components/LineSeparator.tsx.html +12 -3
- package/coverage/lcov-report/src/components/RecentInsulin.tsx.html +30 -3
- package/coverage/lcov-report/src/components/RecommendationModal.tsx.html +184 -4
- package/coverage/lcov-report/src/components/RecommendedCarbs.tsx.html +205 -7
- package/coverage/lcov-report/src/components/RecommendedInsulin.tsx.html +187 -19
- package/coverage/lcov-report/src/components/Remeasure.tsx.html +114 -3
- package/coverage/lcov-report/src/components/TransferToLogbook.tsx.html +67 -4
- package/coverage/lcov-report/src/components/TwoOptionModal.tsx.html +34 -10
- package/coverage/lcov-report/src/components/activity/Activity.tsx.html +58 -7
- package/coverage/lcov-report/src/components/activity/ActivityIcon.tsx.html +42 -3
- package/coverage/lcov-report/src/components/activity/ActivityIntensity.tsx.html +30 -6
- package/coverage/lcov-report/src/components/activity/index.html +1 -1
- package/coverage/lcov-report/src/components/index.html +10 -10
- package/coverage/lcov-report/src/components/mood/Emotion.tsx.html +78 -3
- package/coverage/lcov-report/src/components/mood/MoodIcon.tsx.html +80 -5
- package/coverage/lcov-report/src/components/mood/index.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/locale/i18nUtils.ts.html +41 -2
- package/coverage/lcov-report/src/locale/index.html +1 -1
- package/coverage/lcov-report/src/utils/AttentionMessages.tsx.html +231 -3
- package/coverage/lcov-report/src/utils/Constants.ts.html +71 -2
- package/coverage/lcov-report/src/utils/RecommendationError.tsx.html +89 -2
- package/coverage/lcov-report/src/utils/RecommendationUtils.ts.html +306 -9
- package/coverage/lcov-report/src/utils/Translations.ts.html +27 -3
- package/coverage/lcov-report/src/utils/Utils.ts.html +278 -2
- package/coverage/lcov-report/src/utils/Validations.ts.html +716 -14
- package/coverage/lcov-report/src/utils/index.html +1 -1
- package/coverage/lcov.info +1158 -1164
- package/ignore-git.sh +1 -0
- package/ignore-publish.sh +1 -0
- package/package.json +5 -3
- package/src/RecommendationScreen.d.ts +323 -6
- package/src/RecommendationScreen.js +234 -1
- package/src/__tests__/RecommendationScreen.test.js +1 -1
- package/src/__tests__/utils.d.ts +5 -5
- package/src/__tests__/utils.js +1 -1
- package/src/components/Header.d.ts +4 -43
- package/src/components/Header.js +3 -1
- package/src/components/Icon.d.ts +9 -2
- package/src/components/Icon.js +6 -1
- package/src/components/InfoBars.d.ts +28 -0
- package/src/components/InfoBars.js +23 -0
- package/src/components/InvisibleNumberInput.d.ts +66 -3
- package/src/components/InvisibleNumberInput.js +53 -0
- package/src/components/LimitationMessage.d.ts +6 -0
- package/src/components/LimitationMessage.js +4 -0
- package/src/components/LineSeparator.d.ts +4 -2
- package/src/components/LineSeparator.js +2 -0
- package/src/components/RecentInsulin.d.ts +10 -2
- package/src/components/RecentInsulin.js +7 -0
- package/src/components/RecommendationModal.d.ts +61 -3
- package/src/components/RecommendationModal.js +45 -0
- package/src/components/RecommendedCarbs.d.ts +71 -4
- package/src/components/RecommendedCarbs.js +56 -0
- package/src/components/RecommendedInsulin.d.ts +66 -4
- package/src/components/RecommendedInsulin.js +51 -5
- package/src/components/Remeasure.d.ts +38 -2
- package/src/components/Remeasure.js +31 -0
- package/src/components/TransferToLogbook.d.ts +23 -3
- package/src/components/TransferToLogbook.js +18 -0
- package/src/components/TwoOptionModal.d.ts +12 -1
- package/src/components/TwoOptionModal.js +3 -3
- package/src/components/activity/Activity.d.ts +21 -5
- package/src/components/activity/Activity.js +14 -0
- package/src/components/activity/ActivityIcon.d.ts +15 -0
- package/src/components/activity/ActivityIcon.js +14 -1
- package/src/components/activity/ActivityIntensity.d.ts +11 -4
- package/src/components/activity/ActivityIntensity.js +7 -0
- package/src/components/mood/Emotion.d.ts +26 -1
- package/src/components/mood/Emotion.js +20 -0
- package/src/components/mood/MoodIcon.d.ts +28 -2
- package/src/components/mood/MoodIcon.js +20 -2
- package/src/locale/i18nUtils.d.ts +13 -0
- package/src/locale/i18nUtils.js +13 -0
- package/src/types/enum.d.ts +10 -0
- package/src/types/enum.js +9 -0
- package/src/types/types.d.ts +9 -7
- package/src/utils/AttentionMessages.d.ts +65 -0
- package/src/utils/AttentionMessages.js +65 -1
- package/src/utils/Constants.d.ts +23 -0
- package/src/utils/Constants.js +23 -0
- package/src/utils/RecommendationError.d.ts +29 -0
- package/src/utils/RecommendationError.js +29 -0
- package/src/utils/RecommendationUtils.d.ts +98 -6
- package/src/utils/RecommendationUtils.js +92 -0
- package/src/utils/Translations.d.ts +7 -0
- package/src/utils/Translations.js +7 -0
- package/src/utils/Utils.d.ts +92 -0
- package/src/utils/Utils.js +92 -0
- package/src/utils/Validations.d.ts +232 -9
- package/src/utils/Validations.js +225 -2
- package/typedoc.json +13 -0
|
@@ -3,9 +3,16 @@ import React from "react";
|
|
|
3
3
|
import { Dimensions, StyleSheet, Text, View } from "react-native";
|
|
4
4
|
import { ActivityIntensityTranslations } from "../../utils/Translations";
|
|
5
5
|
import { infoStyles } from "../InfoBars";
|
|
6
|
+
/** Component used to display the users's physical activity intensity on its corresponding background color */
|
|
6
7
|
export default class ActivityIntensity extends React.Component {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(...arguments);
|
|
10
|
+
/**
|
|
11
|
+
* Steps:
|
|
12
|
+
* 1. Set intensity to the activityIntensity prop.
|
|
13
|
+
* 2. Set the style variable to the style that correspond to the intensity.
|
|
14
|
+
* @returns JSX element that displays the intensity of the user’s activity along with the associated color coding
|
|
15
|
+
*/
|
|
9
16
|
this.render = () => {
|
|
10
17
|
const intensity = this.props.activityIntensity;
|
|
11
18
|
const style = activityIntensityStyles[intensity];
|
|
@@ -1,13 +1,38 @@
|
|
|
1
1
|
import { Logbook } from "@hedia/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
declare const MoodEnum: typeof Logbook.Enums.MoodEnum;
|
|
4
|
-
interface IProps {
|
|
4
|
+
export interface IProps {
|
|
5
|
+
/** Indicates which mood if any that is currently selected. */
|
|
5
6
|
currentMood: Logbook.Enums.MoodEnum | null;
|
|
7
|
+
/**
|
|
8
|
+
* Callback function to call when the selected icon changes. Takes a single optional argument, mood, which is a {@link Logbook.Enums.MoodEnum} | null.
|
|
9
|
+
* Doesn’t have a return value.
|
|
10
|
+
* */
|
|
6
11
|
moodSelected(mood: Logbook.Enums.MoodEnum | null): void;
|
|
7
12
|
}
|
|
13
|
+
/** The Emotion component displays a horizontally arranged set of icons representing various moods and allows the user to select one. */
|
|
8
14
|
export default class Emotion extends React.Component<IProps> {
|
|
15
|
+
/**
|
|
16
|
+
* Handle what should happen when the user picks taps on one of the mood icons.
|
|
17
|
+
*
|
|
18
|
+
* Steps:
|
|
19
|
+
* 1. Call the moodSelected prop callback function with selected as argument if toggle is true and null as argument otherwise.
|
|
20
|
+
* @param selected Integer number that represents the icon that was tapped.
|
|
21
|
+
* @param toggle Boolean indicating whether the icon should be deselected.
|
|
22
|
+
*/
|
|
9
23
|
handleIconPress: (selected: Logbook.Enums.MoodEnum, toggle: boolean) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Compose a sequence of MoodIcons
|
|
26
|
+
*
|
|
27
|
+
* Steps:
|
|
28
|
+
* 1. Make a sequence of MoodEnum values from the properties of the MoodEnum object and save the sequence as a variable named values.
|
|
29
|
+
* 2. Map each of the elements of the values sequence to a MoodIcon.
|
|
30
|
+
* @returns JSX Element consisting of an array of MoodIcon components.
|
|
31
|
+
*/
|
|
10
32
|
mappedMoods: () => Array<JSX.Element>;
|
|
33
|
+
/**
|
|
34
|
+
* @returns JSX element to display the mood icons from mappedMoods() in a horizontal arrangement.
|
|
35
|
+
*/
|
|
11
36
|
render(): JSX.Element;
|
|
12
37
|
}
|
|
13
38
|
export {};
|
|
@@ -5,12 +5,29 @@ import { Dimensions, StyleSheet, Text, View } from "react-native";
|
|
|
5
5
|
import { i18n } from "../../locale/i18nUtils";
|
|
6
6
|
import MoodIcon from "./MoodIcon";
|
|
7
7
|
const MoodEnum = Logbook.Enums.MoodEnum;
|
|
8
|
+
/** The Emotion component displays a horizontally arranged set of icons representing various moods and allows the user to select one. */
|
|
8
9
|
export default class Emotion extends React.Component {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
12
|
+
/**
|
|
13
|
+
* Handle what should happen when the user picks taps on one of the mood icons.
|
|
14
|
+
*
|
|
15
|
+
* Steps:
|
|
16
|
+
* 1. Call the moodSelected prop callback function with selected as argument if toggle is true and null as argument otherwise.
|
|
17
|
+
* @param selected Integer number that represents the icon that was tapped.
|
|
18
|
+
* @param toggle Boolean indicating whether the icon should be deselected.
|
|
19
|
+
*/
|
|
11
20
|
this.handleIconPress = (selected, toggle) => {
|
|
12
21
|
this.props.moodSelected(toggle ? selected : null);
|
|
13
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Compose a sequence of MoodIcons
|
|
25
|
+
*
|
|
26
|
+
* Steps:
|
|
27
|
+
* 1. Make a sequence of MoodEnum values from the properties of the MoodEnum object and save the sequence as a variable named values.
|
|
28
|
+
* 2. Map each of the elements of the values sequence to a MoodIcon.
|
|
29
|
+
* @returns JSX Element consisting of an array of MoodIcon components.
|
|
30
|
+
*/
|
|
14
31
|
this.mappedMoods = () => {
|
|
15
32
|
const values = Object.values(MoodEnum).filter((val) => isNaN(Number(val)));
|
|
16
33
|
return values.map((key) => {
|
|
@@ -19,6 +36,9 @@ export default class Emotion extends React.Component {
|
|
|
19
36
|
});
|
|
20
37
|
};
|
|
21
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* @returns JSX element to display the mood icons from mappedMoods() in a horizontal arrangement.
|
|
41
|
+
*/
|
|
22
42
|
render() {
|
|
23
43
|
return (<View style={emotionStyles.container}>
|
|
24
44
|
<View style={emotionStyles.feelingContainer}>
|
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
import { Logbook } from "@hedia/types";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { ImageURISource } from "react-native";
|
|
4
|
-
interface IProps {
|
|
4
|
+
export interface IProps {
|
|
5
|
+
/** Which mood the mood component should represent. */
|
|
5
6
|
mood: Logbook.Enums.MoodEnum;
|
|
7
|
+
/** Boolean indicating whether the mood component represents the currently active mood. */
|
|
6
8
|
active: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Callback function to be called when the mood icon is pressed.
|
|
11
|
+
* The function has no return value.
|
|
12
|
+
* @param toggle Boolean value to indicate whether the icon should be turned on (if true) or off (if false).
|
|
13
|
+
*/
|
|
7
14
|
onPress(toggle: boolean): void;
|
|
8
15
|
}
|
|
16
|
+
/** Mapping from {@link Logbook.Enums.MoodEnum} to corresponding image resources */
|
|
17
|
+
export declare const MOODS_INACTIVE: Record<number, ImageURISource>;
|
|
18
|
+
/** Mapping from {@link Logbook.Enums.MoodEnum} to corresponding image resources */
|
|
19
|
+
export declare const MOODS_ACTIVE: Record<number, ImageURISource>;
|
|
20
|
+
/** Component to display a mood icon base on its props. */
|
|
9
21
|
export default class MoodIcon extends React.Component<IProps> {
|
|
22
|
+
/**
|
|
23
|
+
* Get the icon image resource that should be displayed for the mood icon.
|
|
24
|
+
*
|
|
25
|
+
* Steps:
|
|
26
|
+
* 1. If the active prop is true, return the value from the MOODS_ACTIVE constant that corresponds to the value of the mood prop.
|
|
27
|
+
* 2. (Only reached if the active prop is false) Return the value from the MOODS_INACTIVE constant that corresponds to the value of the mood prop.
|
|
28
|
+
* @returns Image resource that should be displayed for the mood icon.
|
|
29
|
+
*/
|
|
10
30
|
getMoodIcon: () => ImageURISource;
|
|
31
|
+
/**
|
|
32
|
+
* Handle what happens when the mood icon is pressed.
|
|
33
|
+
*
|
|
34
|
+
* Steps:
|
|
35
|
+
* 1. Call the onPress prop callback function with the toggle argument set to the inverse value of the active prop.
|
|
36
|
+
*/
|
|
11
37
|
handleOnPress: () => void;
|
|
38
|
+
/** JSX element to display the mood icon retrieved using the getMoodIcon() method. */
|
|
12
39
|
render(): JSX.Element;
|
|
13
40
|
}
|
|
14
|
-
export {};
|
|
@@ -2,33 +2,51 @@ import { Logbook } from "@hedia/types";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Dimensions, Image, StyleSheet, TouchableOpacity } from "react-native";
|
|
4
4
|
const MoodEnum = Logbook.Enums.MoodEnum;
|
|
5
|
-
|
|
5
|
+
/** Mapping from {@link Logbook.Enums.MoodEnum} to corresponding image resources */
|
|
6
|
+
export const MOODS_INACTIVE = {
|
|
6
7
|
1: require(`../../assets/mood/sad.png`),
|
|
7
8
|
2: require(`../../assets/mood/semi_sad.png`),
|
|
8
9
|
3: require(`../../assets/mood/neutral.png`),
|
|
9
10
|
4: require(`../../assets/mood/semi_happy.png`),
|
|
10
11
|
5: require(`../../assets/mood/happy.png`),
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
/** Mapping from {@link Logbook.Enums.MoodEnum} to corresponding image resources */
|
|
14
|
+
export const MOODS_ACTIVE = {
|
|
13
15
|
1: require(`../../assets/mood/sad_active.png`),
|
|
14
16
|
2: require(`../../assets/mood/semi_sad_active.png`),
|
|
15
17
|
3: require(`../../assets/mood/neutral_active.png`),
|
|
16
18
|
4: require(`../../assets/mood/semi_happy_active.png`),
|
|
17
19
|
5: require(`../../assets/mood/happy_active.png`),
|
|
18
20
|
};
|
|
21
|
+
/** Component to display a mood icon base on its props. */
|
|
19
22
|
export default class MoodIcon extends React.Component {
|
|
20
23
|
constructor() {
|
|
21
24
|
super(...arguments);
|
|
25
|
+
/**
|
|
26
|
+
* Get the icon image resource that should be displayed for the mood icon.
|
|
27
|
+
*
|
|
28
|
+
* Steps:
|
|
29
|
+
* 1. If the active prop is true, return the value from the MOODS_ACTIVE constant that corresponds to the value of the mood prop.
|
|
30
|
+
* 2. (Only reached if the active prop is false) Return the value from the MOODS_INACTIVE constant that corresponds to the value of the mood prop.
|
|
31
|
+
* @returns Image resource that should be displayed for the mood icon.
|
|
32
|
+
*/
|
|
22
33
|
this.getMoodIcon = () => {
|
|
23
34
|
if (this.props.active) {
|
|
24
35
|
return MOODS_ACTIVE[this.props.mood];
|
|
25
36
|
}
|
|
26
37
|
return MOODS_INACTIVE[this.props.mood];
|
|
27
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Handle what happens when the mood icon is pressed.
|
|
41
|
+
*
|
|
42
|
+
* Steps:
|
|
43
|
+
* 1. Call the onPress prop callback function with the toggle argument set to the inverse value of the active prop.
|
|
44
|
+
*/
|
|
28
45
|
this.handleOnPress = () => {
|
|
29
46
|
this.props.onPress(!this.props.active);
|
|
30
47
|
};
|
|
31
48
|
}
|
|
49
|
+
/** JSX element to display the mood icon retrieved using the getMoodIcon() method. */
|
|
32
50
|
render() {
|
|
33
51
|
const { mood, active } = this.props;
|
|
34
52
|
const label = `${MoodEnum[mood]}_${active}`;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { Languages } from "@hedia/types";
|
|
2
2
|
import { I18n } from "@lingui/core";
|
|
3
3
|
import "moment/min/locales";
|
|
4
|
+
/** Internalisation object containing the translations. Call changeLanguage in order to change the language. */
|
|
4
5
|
export declare const i18n: I18n;
|
|
6
|
+
/**
|
|
7
|
+
* Change the language that is used to display text on the recommendation screen.
|
|
8
|
+
*
|
|
9
|
+
* Steps:
|
|
10
|
+
* 1. If the given language is in the language catalog:
|
|
11
|
+
* - Call the i18n package’s activate function with language as argument.
|
|
12
|
+
* 2. Else:
|
|
13
|
+
* - Call the i18n activate function with "English" as argument.
|
|
14
|
+
* 3. Return the i18n object.
|
|
15
|
+
* @param language The language to switch to.
|
|
16
|
+
* @returns Object that represents a i18n configuration for the given language.
|
|
17
|
+
*/
|
|
5
18
|
export declare function changeLanguage(language: Languages): I18n;
|
package/src/locale/i18nUtils.js
CHANGED
|
@@ -11,10 +11,23 @@ const languageMap = {
|
|
|
11
11
|
[Languages.fr]: require(`./fr/messages.js`),
|
|
12
12
|
[Languages.it]: require(`./it/messages.js`),
|
|
13
13
|
};
|
|
14
|
+
/** Internalisation object containing the translations. Call changeLanguage in order to change the language. */
|
|
14
15
|
export const i18n = setupI18n({
|
|
15
16
|
language: Languages.en,
|
|
16
17
|
catalogs: languageMap,
|
|
17
18
|
});
|
|
19
|
+
/**
|
|
20
|
+
* Change the language that is used to display text on the recommendation screen.
|
|
21
|
+
*
|
|
22
|
+
* Steps:
|
|
23
|
+
* 1. If the given language is in the language catalog:
|
|
24
|
+
* - Call the i18n package’s activate function with language as argument.
|
|
25
|
+
* 2. Else:
|
|
26
|
+
* - Call the i18n activate function with "English" as argument.
|
|
27
|
+
* 3. Return the i18n object.
|
|
28
|
+
* @param language The language to switch to.
|
|
29
|
+
* @returns Object that represents a i18n configuration for the given language.
|
|
30
|
+
*/
|
|
18
31
|
export function changeLanguage(language) {
|
|
19
32
|
languageMap[language] ? i18n.activate(language) : i18n.activate(Languages.en);
|
|
20
33
|
// Temporary way of setting the moment locale to en-gb since we currently identify GB English with "en".
|
package/src/types/enum.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** Namespace containing data required by component testing */
|
|
1
2
|
export declare namespace Testing {
|
|
3
|
+
/** Namespace containing data about the testing ids for certain components in order to test their expected behaviour */
|
|
2
4
|
namespace Id {
|
|
3
5
|
enum RecommendationScreenTestIds {
|
|
4
6
|
RecommendationScrollView = "recommendation-screen-scroll-view"
|
|
@@ -46,6 +48,7 @@ export declare namespace Testing {
|
|
|
46
48
|
FirstOption = "first-option-button",
|
|
47
49
|
SecondOption = "second-option-button"
|
|
48
50
|
}
|
|
51
|
+
/** Namespace containing ids for the InfoBars component value, lavel and unit fields */
|
|
49
52
|
namespace InfoBarTestIds {
|
|
50
53
|
enum Value {
|
|
51
54
|
BloodGlucose = "BloodGlucoseValue",
|
|
@@ -64,10 +67,15 @@ export declare namespace Testing {
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
}
|
|
70
|
+
/** Namespace containing all the TestIdEnum keys */
|
|
67
71
|
namespace Types {
|
|
68
72
|
type TestIdEnum = Id.ActivityTestIds | Id.HeaderTestIds | Id.LimitationMessageTestIds | Id.RecentInsulinTestIds | Id.RecommendedCarbsTestIds | Id.RecommendedInsulinTestIds | Id.RecommendationModalTestIds | Id.RemeasureTestIds | Id.TransferToLogbookTestIds | Id.TwoOptionModalTestIds | Id.InfoBarTestIds.Unit | Id.InfoBarTestIds.Value | Id.InfoBarTestIds.Label;
|
|
69
73
|
}
|
|
70
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Indicator of which error has happened.
|
|
77
|
+
* See the corresponding RecommendationError {@link RecommendationError} for details.
|
|
78
|
+
*/
|
|
71
79
|
export declare enum RecommendationErrorEnum {
|
|
72
80
|
ActivityDuration = 0,
|
|
73
81
|
ActivityTargetBGL = 1,
|
|
@@ -92,6 +100,7 @@ export declare enum RecommendationErrorEnum {
|
|
|
92
100
|
BloodGlucoseUnit = 20,
|
|
93
101
|
BloodKetoneProps = 21
|
|
94
102
|
}
|
|
103
|
+
/** Indicates the category of the user’s blood glucose level. */
|
|
95
104
|
export declare enum BgLevel {
|
|
96
105
|
SevereHypoglycemia = 0,
|
|
97
106
|
Hypoglycemia = 1,
|
|
@@ -104,6 +113,7 @@ export declare enum BgLevel {
|
|
|
104
113
|
UnsupportedBGLevel = 8,
|
|
105
114
|
BGLevelNotProvided = 9
|
|
106
115
|
}
|
|
116
|
+
/** The possible initial recommendation times with values in hours. */
|
|
107
117
|
export declare enum RecommendationReminders {
|
|
108
118
|
ReminderOff = 0,
|
|
109
119
|
Reminder15Minutes = 0.25,
|
package/src/types/enum.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/** Namespace containing data required by component testing */
|
|
1
2
|
export var Testing;
|
|
2
3
|
(function (Testing) {
|
|
4
|
+
/** Namespace containing data about the testing ids for certain components in order to test their expected behaviour */
|
|
3
5
|
let Id;
|
|
4
6
|
(function (Id) {
|
|
5
7
|
let RecommendationScreenTestIds;
|
|
@@ -59,6 +61,7 @@ export var Testing;
|
|
|
59
61
|
TwoOptionModalTestIds["FirstOption"] = "first-option-button";
|
|
60
62
|
TwoOptionModalTestIds["SecondOption"] = "second-option-button";
|
|
61
63
|
})(TwoOptionModalTestIds = Id.TwoOptionModalTestIds || (Id.TwoOptionModalTestIds = {}));
|
|
64
|
+
/** Namespace containing ids for the InfoBars component value, lavel and unit fields */
|
|
62
65
|
let InfoBarTestIds;
|
|
63
66
|
(function (InfoBarTestIds) {
|
|
64
67
|
let Value;
|
|
@@ -82,6 +85,10 @@ export var Testing;
|
|
|
82
85
|
})(InfoBarTestIds = Id.InfoBarTestIds || (Id.InfoBarTestIds = {}));
|
|
83
86
|
})(Id = Testing.Id || (Testing.Id = {}));
|
|
84
87
|
})(Testing || (Testing = {}));
|
|
88
|
+
/**
|
|
89
|
+
* Indicator of which error has happened.
|
|
90
|
+
* See the corresponding RecommendationError {@link RecommendationError} for details.
|
|
91
|
+
*/
|
|
85
92
|
export var RecommendationErrorEnum;
|
|
86
93
|
(function (RecommendationErrorEnum) {
|
|
87
94
|
RecommendationErrorEnum[RecommendationErrorEnum["ActivityDuration"] = 0] = "ActivityDuration";
|
|
@@ -107,6 +114,7 @@ export var RecommendationErrorEnum;
|
|
|
107
114
|
RecommendationErrorEnum[RecommendationErrorEnum["BloodGlucoseUnit"] = 20] = "BloodGlucoseUnit";
|
|
108
115
|
RecommendationErrorEnum[RecommendationErrorEnum["BloodKetoneProps"] = 21] = "BloodKetoneProps";
|
|
109
116
|
})(RecommendationErrorEnum || (RecommendationErrorEnum = {}));
|
|
117
|
+
/** Indicates the category of the user’s blood glucose level. */
|
|
110
118
|
export var BgLevel;
|
|
111
119
|
(function (BgLevel) {
|
|
112
120
|
BgLevel[BgLevel["SevereHypoglycemia"] = 0] = "SevereHypoglycemia";
|
|
@@ -120,6 +128,7 @@ export var BgLevel;
|
|
|
120
128
|
BgLevel[BgLevel["UnsupportedBGLevel"] = 8] = "UnsupportedBGLevel";
|
|
121
129
|
BgLevel[BgLevel["BGLevelNotProvided"] = 9] = "BGLevelNotProvided";
|
|
122
130
|
})(BgLevel || (BgLevel = {}));
|
|
131
|
+
/** The possible initial recommendation times with values in hours. */
|
|
123
132
|
export var RecommendationReminders;
|
|
124
133
|
(function (RecommendationReminders) {
|
|
125
134
|
RecommendationReminders[RecommendationReminders["ReminderOff"] = 0] = "ReminderOff";
|
package/src/types/types.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { Activity
|
|
1
|
+
import { Activity } from "@hedia/types";
|
|
2
|
+
/** Interface used to describe a numerical interval. It is assumed that min < max. */
|
|
2
3
|
export interface IInterval {
|
|
4
|
+
/** The lower bound of the interval. */
|
|
3
5
|
min: number;
|
|
6
|
+
/** The upper bound of the interval. */
|
|
4
7
|
max: number;
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Represents the properties needed to show the user visual information about the physical activity.
|
|
11
|
+
*/
|
|
6
12
|
export interface IActivityDisplayProps {
|
|
13
|
+
/** Title of the physical activity */
|
|
7
14
|
activityTitle: string | null;
|
|
15
|
+
/** Type of the physical activity */
|
|
8
16
|
activityType: Activity.Enums.ActivityEnum | null;
|
|
9
17
|
}
|
|
10
|
-
export declare type IActivityParams = BolusCalculator.Types.IActivityParams;
|
|
11
|
-
export declare type logbookEntry = Logbook.Types.ILogbookEntry;
|
|
12
|
-
export declare type IRecommendationParams = BolusCalculator.Types.IRecommendationParams;
|
|
13
|
-
export declare type ReductionType = Activity.Types.ReductionType;
|
|
14
|
-
export declare type ActivitySettings = Activity.Types.ActivitySettings;
|
|
15
|
-
export declare type IRecentBolus = BolusCalculator.Types.IRecentBolus;
|
|
@@ -1,31 +1,96 @@
|
|
|
1
|
+
/** Provides methods for getting variants of attention messages */
|
|
1
2
|
export declare const AttentionMessage: {
|
|
3
|
+
/**
|
|
4
|
+
* @return Concatenation of:
|
|
5
|
+
* {@link Messages.VeryLowBGL} +
|
|
6
|
+
* {@link Messages.Reminder15Minutes}
|
|
7
|
+
*/
|
|
2
8
|
SevereHypoglycemia: () => string;
|
|
9
|
+
/**
|
|
10
|
+
* @return Concatenation of:
|
|
11
|
+
* {@link Messages.LowBGL} +
|
|
12
|
+
* {@link Messages.Reminder15Minutes}
|
|
13
|
+
*/
|
|
3
14
|
Hypoglycemia: () => string;
|
|
15
|
+
/** @return The value of: {@link Messages.Reminder15Minutes} */
|
|
4
16
|
MildHypoglycemia: () => string;
|
|
17
|
+
/** @return The value of: {@link Messages.PostponePhysicalActivityUnder5MMOL} */
|
|
5
18
|
NormoglycemiaActivityUnder5MMOL: () => string;
|
|
19
|
+
/**
|
|
20
|
+
* @return Concatenation of:
|
|
21
|
+
* {@link Messages.HighBGL} +
|
|
22
|
+
* {@link Messages.InsulinKetones} +
|
|
23
|
+
* {@link Messages.Reminder15Minutes} +
|
|
24
|
+
* {@link Messages.PostponePhysicalActivity}
|
|
25
|
+
*/
|
|
6
26
|
HyperglycemiaActivity: () => string;
|
|
27
|
+
/**
|
|
28
|
+
* @return Concatenation of:
|
|
29
|
+
* {@link Messages.HighBGL} +
|
|
30
|
+
* {@link Messages.InsulinKetones}
|
|
31
|
+
*/
|
|
7
32
|
SevereHyperglycemia: () => string;
|
|
33
|
+
/**
|
|
34
|
+
* @return Concatenation of:
|
|
35
|
+
* {@link Messages.HighBGL} +
|
|
36
|
+
* {@link Messages.InsulinKetones} +
|
|
37
|
+
* {@link Messages.Reminder15Minutes} +
|
|
38
|
+
* {@link Messages.PostponePhysicalActivity}
|
|
39
|
+
*/
|
|
8
40
|
SevereHyperglycemiaActivity: () => string;
|
|
41
|
+
/** no message provided for this level */
|
|
9
42
|
BGLevelNotProvided: null;
|
|
43
|
+
/** no message provided for this level*/
|
|
10
44
|
Hyperglycemia: null;
|
|
45
|
+
/** no message provided for this level */
|
|
11
46
|
MildHyperglycemia: null;
|
|
47
|
+
/** no message provided for this level */
|
|
12
48
|
Normoglycemia: null;
|
|
49
|
+
/** no message provided for this level */
|
|
13
50
|
NormoglycemiaUnder5MMOL: null;
|
|
51
|
+
/** no message provided for this level */
|
|
14
52
|
UnsupportedBGLevel: null;
|
|
15
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* @param message The message to append the {@link Messages.PostponePhysicalActivityUnder5MMOL} to
|
|
56
|
+
* @returns The initial messaged concatenated with the {@link Messages.PostponePhysicalActivityUnder5MMOL}
|
|
57
|
+
*/
|
|
16
58
|
export declare function addPostponeActivityMessageUnder5MMOL(message: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* Calculate the limited insulin value based on the physical activity reduction value
|
|
61
|
+
* @param reduction The reduction percentage an activity reduce the total insulin intake
|
|
62
|
+
* @returns The limited insulin value.
|
|
63
|
+
*/
|
|
64
|
+
export declare function getLimitedValue(reduction: number): number;
|
|
65
|
+
/** Provides methods for getting strings for composing attention messages and other important communications to the user. */
|
|
17
66
|
export declare class Messages {
|
|
67
|
+
/** Inform the user that their BGL is very low and what they should do about it. */
|
|
18
68
|
static VeryLowBGL: () => string;
|
|
69
|
+
/** Inform the user that their BGL is very low. */
|
|
19
70
|
static LowBGL: () => string;
|
|
71
|
+
/** Inform the user that they will be reminded to remeasure their BGL soon. */
|
|
20
72
|
static Reminder15Minutes: () => string;
|
|
73
|
+
/** Encourages the user to postpone exercise. Specifically when their BGL is high. */
|
|
21
74
|
static PostponePhysicalActivity: () => string;
|
|
75
|
+
/** Encourages the user to postpone exercise. Specifically when their BGL is low. */
|
|
22
76
|
static PostponePhysicalActivityUnder5MMOL: () => string;
|
|
77
|
+
/** Inform about high BGL. */
|
|
23
78
|
static HighBGL: () => string;
|
|
79
|
+
/** Encourage user to measure ketones. */
|
|
24
80
|
static InsulinKetones: () => string;
|
|
81
|
+
/** Inform the user that their insulin recommendation was limited for safety. */
|
|
25
82
|
static RecommendationWasLimited: () => string;
|
|
83
|
+
/** Inform the user that their insulin recommendation was limited for safety in combination with an activity. */
|
|
26
84
|
static RecommendationWasLimitedActivity: (activityReduction: number) => string;
|
|
85
|
+
/** Inform the user that the insulin amount they entered is above HDA’s safety limit. */
|
|
27
86
|
static InsulinInputWasLimited: (activityReduction: number | null) => string;
|
|
87
|
+
/** Title for the modal that informs the user that their calculation is too old. */
|
|
28
88
|
static TimeoutPrompTitle: () => string;
|
|
89
|
+
/**
|
|
90
|
+
* Inform the user that their recommendation calculation is too old.
|
|
91
|
+
* Variant to show when they didn’t see the actual insulin recommendation because they didn’t tell whether they injected insulin recently.
|
|
92
|
+
*/
|
|
29
93
|
static TimeoutRecommendationNotVisible: () => string;
|
|
94
|
+
/** Inform the user that their recommendation calculation is too old. */
|
|
30
95
|
static TimeoutRecommendationVisible: (date: Date) => string;
|
|
31
96
|
}
|
|
@@ -2,51 +2,115 @@ import { BolusCalculator } from "@hedia/types";
|
|
|
2
2
|
import { t } from "@lingui/macro";
|
|
3
3
|
import moment from "moment";
|
|
4
4
|
import { i18n } from "../locale/i18nUtils";
|
|
5
|
+
/** Provides methods for getting variants of attention messages */
|
|
5
6
|
export const AttentionMessage = {
|
|
7
|
+
/**
|
|
8
|
+
* @return Concatenation of:
|
|
9
|
+
* {@link Messages.VeryLowBGL} +
|
|
10
|
+
* {@link Messages.Reminder15Minutes}
|
|
11
|
+
*/
|
|
6
12
|
SevereHypoglycemia: () => `${Messages.VeryLowBGL()}${`\n`}${Messages.Reminder15Minutes()}`,
|
|
13
|
+
/**
|
|
14
|
+
* @return Concatenation of:
|
|
15
|
+
* {@link Messages.LowBGL} +
|
|
16
|
+
* {@link Messages.Reminder15Minutes}
|
|
17
|
+
*/
|
|
7
18
|
Hypoglycemia: () => `${Messages.LowBGL()}${`\n`}${Messages.Reminder15Minutes()}`,
|
|
19
|
+
/** @return The value of: {@link Messages.Reminder15Minutes} */
|
|
8
20
|
MildHypoglycemia: () => Messages.Reminder15Minutes(),
|
|
21
|
+
/** @return The value of: {@link Messages.PostponePhysicalActivityUnder5MMOL} */
|
|
9
22
|
NormoglycemiaActivityUnder5MMOL: () => Messages.PostponePhysicalActivityUnder5MMOL(),
|
|
23
|
+
/**
|
|
24
|
+
* @return Concatenation of:
|
|
25
|
+
* {@link Messages.HighBGL} +
|
|
26
|
+
* {@link Messages.InsulinKetones} +
|
|
27
|
+
* {@link Messages.Reminder15Minutes} +
|
|
28
|
+
* {@link Messages.PostponePhysicalActivity}
|
|
29
|
+
*/
|
|
10
30
|
HyperglycemiaActivity: () => `${Messages.HighBGL()}${`\n`}${Messages.InsulinKetones()}${`\n`}${Messages.Reminder15Minutes()}${`\n`}${Messages.PostponePhysicalActivity()}`,
|
|
31
|
+
/**
|
|
32
|
+
* @return Concatenation of:
|
|
33
|
+
* {@link Messages.HighBGL} +
|
|
34
|
+
* {@link Messages.InsulinKetones}
|
|
35
|
+
*/
|
|
11
36
|
SevereHyperglycemia: () => `${Messages.HighBGL()}${`\n`}${Messages.InsulinKetones()}${`\n`}`,
|
|
37
|
+
/**
|
|
38
|
+
* @return Concatenation of:
|
|
39
|
+
* {@link Messages.HighBGL} +
|
|
40
|
+
* {@link Messages.InsulinKetones} +
|
|
41
|
+
* {@link Messages.Reminder15Minutes} +
|
|
42
|
+
* {@link Messages.PostponePhysicalActivity}
|
|
43
|
+
*/
|
|
12
44
|
SevereHyperglycemiaActivity: () => `${Messages.HighBGL()}${`\n`}${Messages.InsulinKetones()}${`\n`}${Messages.Reminder15Minutes()}${`\n`}${Messages.PostponePhysicalActivity()}`,
|
|
45
|
+
/** no message provided for this level */
|
|
13
46
|
BGLevelNotProvided: null,
|
|
47
|
+
/** no message provided for this level*/
|
|
14
48
|
Hyperglycemia: null,
|
|
49
|
+
/** no message provided for this level */
|
|
15
50
|
MildHyperglycemia: null,
|
|
51
|
+
/** no message provided for this level */
|
|
16
52
|
Normoglycemia: null,
|
|
53
|
+
/** no message provided for this level */
|
|
17
54
|
NormoglycemiaUnder5MMOL: null,
|
|
55
|
+
/** no message provided for this level */
|
|
18
56
|
UnsupportedBGLevel: null,
|
|
19
57
|
};
|
|
58
|
+
/**
|
|
59
|
+
* @param message The message to append the {@link Messages.PostponePhysicalActivityUnder5MMOL} to
|
|
60
|
+
* @returns The initial messaged concatenated with the {@link Messages.PostponePhysicalActivityUnder5MMOL}
|
|
61
|
+
*/
|
|
20
62
|
export function addPostponeActivityMessageUnder5MMOL(message) {
|
|
21
63
|
return `${message}${`\n`}${Messages.PostponePhysicalActivityUnder5MMOL()}`;
|
|
22
64
|
}
|
|
23
65
|
const SAFETY_INSULIN_LIMIT = BolusCalculator.Constants.SAFETY_INSULIN_LIMIT;
|
|
24
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Calculate the limited insulin value based on the physical activity reduction value
|
|
68
|
+
* @param reduction The reduction percentage an activity reduce the total insulin intake
|
|
69
|
+
* @returns The limited insulin value.
|
|
70
|
+
*/
|
|
71
|
+
export function getLimitedValue(reduction) {
|
|
25
72
|
return SAFETY_INSULIN_LIMIT - SAFETY_INSULIN_LIMIT * reduction;
|
|
26
73
|
}
|
|
74
|
+
/** Provides methods for getting strings for composing attention messages and other important communications to the user. */
|
|
27
75
|
export class Messages {
|
|
28
76
|
}
|
|
77
|
+
/** Inform the user that their BGL is very low and what they should do about it. */
|
|
29
78
|
Messages.VeryLowBGL = () => i18n._(t `Your blood glucose level is very low. Take glucagon or eat carbohydrates if possible. Seek medical attention.`);
|
|
79
|
+
/** Inform the user that their BGL is very low. */
|
|
30
80
|
Messages.LowBGL = () => i18n._(t `Your blood glucose level is very low.`);
|
|
81
|
+
/** Inform the user that they will be reminded to remeasure their BGL soon. */
|
|
31
82
|
Messages.Reminder15Minutes = () => i18n._(t `You will be reminded to measure your blood glucose level in 15 min.`);
|
|
83
|
+
/** Encourages the user to postpone exercise. Specifically when their BGL is high. */
|
|
32
84
|
Messages.PostponePhysicalActivity = () => i18n._(t `If it is possible, postpone your planned exercise.`);
|
|
85
|
+
/** Encourages the user to postpone exercise. Specifically when their BGL is low. */
|
|
33
86
|
Messages.PostponePhysicalActivityUnder5MMOL = () => i18n._(t `Consider not to initiate physical activity before your blood glucose level is within the recommended ranges prior to physical activity.`);
|
|
87
|
+
/** Inform about high BGL. */
|
|
34
88
|
Messages.HighBGL = () => i18n._(t `You have a high blood glucose level.`);
|
|
89
|
+
/** Encourage user to measure ketones. */
|
|
35
90
|
Messages.InsulinKetones = () => i18n._(t `You should take rapid-acting insulin and measure ketones.`);
|
|
91
|
+
/** Inform the user that their insulin recommendation was limited for safety. */
|
|
36
92
|
Messages.RecommendationWasLimited = () => i18n._(t `Your recommendation would have been higher than ${SAFETY_INSULIN_LIMIT} units of insulin, but it has been limited for safety reasons.
|
|
37
93
|
Hedia never recommends more than ${SAFETY_INSULIN_LIMIT} units of insulin per calculation.`);
|
|
94
|
+
/** Inform the user that their insulin recommendation was limited for safety in combination with an activity. */
|
|
38
95
|
Messages.RecommendationWasLimitedActivity = (activityReduction) => i18n._(t `Your recommendation would have been higher than ${getLimitedValue(activityReduction)}
|
|
39
96
|
units of insulin, but it has been limited for safety reasons.${`\n\n`}
|
|
40
97
|
Hedia never recommends more than ${SAFETY_INSULIN_LIMIT}
|
|
41
98
|
units of insulin per calculation, but because of the physical activity
|
|
42
99
|
you entered it has been further reduced by ${(activityReduction * 100).toFixed(0)}% to
|
|
43
100
|
${getLimitedValue(activityReduction)}.`);
|
|
101
|
+
/** Inform the user that the insulin amount they entered is above HDA’s safety limit. */
|
|
44
102
|
Messages.InsulinInputWasLimited = (activityReduction) => activityReduction
|
|
45
103
|
? i18n._(t `Hedia doesn't support more than ${SAFETY_INSULIN_LIMIT} units of insulin per calculation, but because of the physical activity you entered it has been further reduced by
|
|
46
104
|
${(activityReduction * 100).toFixed(0)}% to ${getLimitedValue(activityReduction)} units for this calculation.`)
|
|
47
105
|
: i18n._(t `Hedia does not support more than ${SAFETY_INSULIN_LIMIT} units of insulin per calculation.`);
|
|
106
|
+
/** Title for the modal that informs the user that their calculation is too old. */
|
|
48
107
|
Messages.TimeoutPrompTitle = () => i18n._(t `More than 15 minutes has passed since this calculation was started.`);
|
|
108
|
+
/**
|
|
109
|
+
* Inform the user that their recommendation calculation is too old.
|
|
110
|
+
* Variant to show when they didn’t see the actual insulin recommendation because they didn’t tell whether they injected insulin recently.
|
|
111
|
+
*/
|
|
49
112
|
Messages.TimeoutRecommendationNotVisible = () => i18n._(t `Please go through the calculation steps with new measurements to ensure a safe recommendation.`);
|
|
113
|
+
/** Inform the user that their recommendation calculation is too old. */
|
|
50
114
|
Messages.TimeoutRecommendationVisible = (date) => {
|
|
51
115
|
const day = moment(date).format(`LL`);
|
|
52
116
|
const time = moment(date).format(`HH:mm`);
|
package/src/utils/Constants.d.ts
CHANGED
|
@@ -1,24 +1,47 @@
|
|
|
1
1
|
import { IInterval } from "../types/types";
|
|
2
|
+
/** Reusable color definition. */
|
|
2
3
|
export declare const BACKGROUND_COLOUR_PURPLE = "rgba(27, 31, 72, 1)";
|
|
4
|
+
/** Reusable color definition. */
|
|
3
5
|
export declare const BORDER_COLOUR_GREY = "rgba(74, 91, 134, 1)";
|
|
6
|
+
/** Reusable color definition. */
|
|
4
7
|
export declare const BORDER_COLOUR_TEAL = "rgba(1, 255, 252, 0.8)";
|
|
8
|
+
/** The threshold above which hyperglycemia is considered to be severe in mmol/L */
|
|
5
9
|
export declare const SEVERE_HYPERGLYCEMIA_START_MMOL = 15;
|
|
10
|
+
/** The number of seconds in four hours. */
|
|
6
11
|
export declare const FOUR_HOURS_SECONDS = 14400;
|
|
12
|
+
/** The number of minutes in one hour. */
|
|
7
13
|
export declare const ONE_HOUR_MINUTES = 60;
|
|
14
|
+
/** Extra time before an activity starts or stops. */
|
|
8
15
|
export declare const ACTIVITY_BUFFER_MINUTES = 10;
|
|
16
|
+
/** The lower and upper limits for the amount of carbohydrates in grams. */
|
|
9
17
|
export declare const CARBOHYDRATES_LIMTS: IInterval;
|
|
18
|
+
/** 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. */
|
|
10
19
|
export declare const INSULIN_DOSE_LIMITS: IInterval;
|
|
20
|
+
/** The lower and upper limits for the age of boluses that gets taken into account for calculating insulin on board. */
|
|
11
21
|
export declare const BOLUS_SECONDS_PASSED_LIMITS: IInterval;
|
|
22
|
+
/** The lower and upper limits for the duration of an activity in minutes. */
|
|
12
23
|
export declare const ACTIVITY_DURATION_MINUTES_LIMITS: IInterval;
|
|
24
|
+
/** The lower and upper limits of insulin sensitivity settings. */
|
|
13
25
|
export declare const INSULIN_SENSITIVITY_MMOL_LIMITS: IInterval;
|
|
26
|
+
/** The lower and upper limits of insulin-to-carbs ratio settings. */
|
|
14
27
|
export declare const INSULIN_TO_CARBS_RATIO_LIMITS: IInterval;
|
|
28
|
+
/** The lower and upper limits of the entered blood glucose level value in mmol/L. */
|
|
15
29
|
export declare const CURRENT_BGL_MMOL_LIMITS: IInterval;
|
|
30
|
+
/** The conversion factor to multiply a blood glucose value with to go from mmol/L to mg/dL. */
|
|
16
31
|
export declare const MMOLL_PER_MGDL_BGL: number;
|
|
32
|
+
/** The conversion factor to multiply a blood glucose value with to go from mg/dL to mmol/L. */
|
|
17
33
|
export declare const MGDL_PER_MMOLL_BGL: number;
|
|
34
|
+
/** The lower and upper limits of the entered blood ketones value in mmol/L. */
|
|
18
35
|
export declare const CURRENT_BKL_MMOL_LIMITS: IInterval;
|
|
36
|
+
/** The conversion factor to multiply a blood ketones value with to go from mmol/L to mg/dL. */
|
|
19
37
|
export declare const MMOLL_PER_MGDL_BKL: number;
|
|
38
|
+
/** The conversion factor to multiply a blood ketones value with to go from mg/dL to mmol/L. */
|
|
20
39
|
export declare const MGDL_PER_MMOLL_BKL: number;
|
|
40
|
+
/** The lower and upper limits for a valid BGL target in mmol/L. */
|
|
21
41
|
export declare const TARGET_BGL_MMOL_LIMITS: IInterval;
|
|
42
|
+
/** The lower and upper limits for a valid activity BGL target in mmol/L. */
|
|
22
43
|
export declare const ACTIVITY_TARGET_BGL_MMOL_LIMITS: IInterval;
|
|
44
|
+
/** The lower and upper limits for how long the reminder notification timer may be. */
|
|
23
45
|
export declare const REMINDER_HOURS_LIMITS: IInterval;
|
|
46
|
+
/** The lower and upper limits for activity reduction. */
|
|
24
47
|
export declare const ACTIVITY_SETTINGS_INTERVAL_LIMITS: IInterval;
|