@hedia/recommendation-screen 2.1.33 → 2.1.34-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/ios/HediaRecommendationScreen.xcodeproj/project.pbxproj +2 -2
- package/ios/Podfile.lock +207 -207
- package/package.json +1 -1
- package/index.d.ts +0 -5
- package/index.js +0 -5
- package/src/RecommendationScreen.d.ts +0 -413
- package/src/RecommendationScreen.js +0 -493
- package/src/__tests__/RecommendationScreen.test.d.ts +0 -1
- package/src/__tests__/RecommendationScreen.test.js +0 -965
- package/src/__tests__/RecommendationUtils.test.d.ts +0 -1
- package/src/__tests__/RecommendationUtils.test.js +0 -216
- package/src/__tests__/Translate.test.d.ts +0 -1
- package/src/__tests__/Translate.test.js +0 -27
- package/src/__tests__/Utils.test.d.ts +0 -1
- package/src/__tests__/Utils.test.js +0 -66
- package/src/__tests__/Validations.test.d.ts +0 -1
- package/src/__tests__/Validations.test.js +0 -465
- package/src/__tests__/components/Activity.test.d.ts +0 -1
- package/src/__tests__/components/Activity.test.js +0 -86
- package/src/__tests__/components/Emotion.test.d.ts +0 -1
- package/src/__tests__/components/Emotion.test.js +0 -70
- package/src/__tests__/components/Header.test.d.ts +0 -1
- package/src/__tests__/components/Header.test.js +0 -36
- package/src/__tests__/components/InfoBars.test.d.ts +0 -1
- package/src/__tests__/components/InfoBars.test.js +0 -130
- package/src/__tests__/components/InvisibleNumberInput.test.d.ts +0 -1
- package/src/__tests__/components/InvisibleNumberInput.test.js +0 -160
- package/src/__tests__/components/LimitationMessage.test.d.ts +0 -1
- package/src/__tests__/components/LimitationMessage.test.js +0 -47
- package/src/__tests__/components/MoodIcon.test.d.ts +0 -1
- package/src/__tests__/components/MoodIcon.test.js +0 -30
- package/src/__tests__/components/RecommendationModal.test.d.ts +0 -1
- package/src/__tests__/components/RecommendationModal.test.js +0 -98
- package/src/__tests__/components/RecommendedCarbs.test.d.ts +0 -1
- package/src/__tests__/components/RecommendedCarbs.test.js +0 -120
- package/src/__tests__/components/RecommendedInsulin.test.d.ts +0 -1
- package/src/__tests__/components/RecommendedInsulin.test.js +0 -154
- package/src/__tests__/components/Remeasure.test.d.ts +0 -1
- package/src/__tests__/components/Remeasure.test.js +0 -78
- package/src/__tests__/components/TransferToLogbook.test.d.ts +0 -1
- package/src/__tests__/components/TransferToLogbook.test.js +0 -30
- package/src/__tests__/components/TwoOptionModal.test.d.ts +0 -1
- package/src/__tests__/components/TwoOptionModal.test.js +0 -65
- package/src/__tests__/utils.d.ts +0 -16
- package/src/__tests__/utils.js +0 -126
- package/src/components/Header.d.ts +0 -10
- package/src/components/Header.js +0 -75
- package/src/components/Icon.d.ts +0 -20
- package/src/components/Icon.js +0 -41
- package/src/components/InfoBars.d.ts +0 -103
- package/src/components/InfoBars.js +0 -129
- package/src/components/InvisibleNumberInput.d.ts +0 -89
- package/src/components/InvisibleNumberInput.js +0 -122
- package/src/components/LimitationMessage.d.ts +0 -14
- package/src/components/LimitationMessage.js +0 -31
- package/src/components/LineSeparator.d.ts +0 -10
- package/src/components/LineSeparator.js +0 -18
- package/src/components/RecentInsulin.d.ts +0 -17
- package/src/components/RecentInsulin.js +0 -94
- package/src/components/RecommendationModal.d.ts +0 -207
- package/src/components/RecommendationModal.js +0 -213
- package/src/components/RecommendedCarbs.d.ts +0 -94
- package/src/components/RecommendedCarbs.js +0 -251
- package/src/components/RecommendedInsulin.d.ts +0 -84
- package/src/components/RecommendedInsulin.js +0 -170
- package/src/components/Remeasure.d.ts +0 -49
- package/src/components/Remeasure.js +0 -125
- package/src/components/TransferToLogbook.d.ts +0 -34
- package/src/components/TransferToLogbook.js +0 -94
- package/src/components/TwoOptionModal.d.ts +0 -145
- package/src/components/TwoOptionModal.js +0 -148
- package/src/components/activity/Activity.d.ts +0 -26
- package/src/components/activity/Activity.js +0 -80
- package/src/components/activity/ActivityIcon.d.ts +0 -22
- package/src/components/activity/ActivityIcon.js +0 -58
- package/src/components/activity/ActivityIntensity.d.ts +0 -16
- package/src/components/activity/ActivityIntensity.js +0 -59
- package/src/components/mood/Emotion.d.ts +0 -38
- package/src/components/mood/Emotion.js +0 -65
- package/src/components/mood/MoodIcon.d.ts +0 -40
- package/src/components/mood/MoodIcon.js +0 -66
- package/src/locale/i18nUtils.d.ts +0 -18
- package/src/locale/i18nUtils.js +0 -39
- package/src/types/enum.d.ts +0 -122
- package/src/types/enum.js +0 -138
- package/src/types/types.d.ts +0 -17
- package/src/types/types.js +0 -1
- package/src/utils/AttentionMessages.d.ts +0 -96
- package/src/utils/AttentionMessages.js +0 -118
- package/src/utils/Constants.d.ts +0 -47
- package/src/utils/Constants.js +0 -47
- package/src/utils/RecommendationError.d.ts +0 -56
- package/src/utils/RecommendationError.js +0 -62
- package/src/utils/RecommendationUtils.d.ts +0 -100
- package/src/utils/RecommendationUtils.js +0 -199
- package/src/utils/Translations.d.ts +0 -9
- package/src/utils/Translations.js +0 -14
- package/src/utils/Utils.d.ts +0 -105
- package/src/utils/Utils.js +0 -141
- package/src/utils/Validations.d.ts +0 -250
- package/src/utils/Validations.js +0 -409
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Logbook } from "@hedia/types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare const MoodEnum: typeof Logbook.Enums.MoodEnum;
|
|
4
|
-
export interface IProps {
|
|
5
|
-
/** Indicates which mood if any that is currently selected. */
|
|
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
|
-
* */
|
|
11
|
-
moodSelected(mood: Logbook.Enums.MoodEnum | null): void;
|
|
12
|
-
}
|
|
13
|
-
/** The Emotion component displays a horizontally arranged set of icons representing various moods and allows the user to select one. */
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
32
|
-
mappedMoods: () => Array<JSX.Element>;
|
|
33
|
-
/**
|
|
34
|
-
* @returns JSX element to display the mood icons from mappedMoods() in a horizontal arrangement.
|
|
35
|
-
*/
|
|
36
|
-
render(): JSX.Element;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Logbook } from "@hedia/types";
|
|
2
|
-
import { t } from "@lingui/macro";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Dimensions, StyleSheet, Text, View } from "react-native";
|
|
5
|
-
import { i18n } from "../../locale/i18nUtils";
|
|
6
|
-
import MoodIcon from "./MoodIcon";
|
|
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. */
|
|
9
|
-
export default class Emotion extends React.Component {
|
|
10
|
-
constructor() {
|
|
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
|
-
*/
|
|
20
|
-
this.handleIconPress = (selected, toggle) => {
|
|
21
|
-
this.props.moodSelected(toggle ? selected : null);
|
|
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
|
-
*/
|
|
31
|
-
this.mappedMoods = () => {
|
|
32
|
-
const values = Object.values(MoodEnum).filter((val) => isNaN(Number(val)));
|
|
33
|
-
return values.map((key) => {
|
|
34
|
-
const moodValue = MoodEnum[key];
|
|
35
|
-
return (<MoodIcon onPress={(toggle) => this.handleIconPress(moodValue, toggle)} active={moodValue === this.props.currentMood} mood={moodValue} key={moodValue}/>);
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* @returns JSX element to display the mood icons from mappedMoods() in a horizontal arrangement.
|
|
41
|
-
*/
|
|
42
|
-
render() {
|
|
43
|
-
return (<View style={emotionStyles.container}>
|
|
44
|
-
<View style={emotionStyles.feelingContainer}>
|
|
45
|
-
<Text style={emotionStyles.feelingText}>{i18n._(t `How are you feeling?`)}</Text>
|
|
46
|
-
</View>
|
|
47
|
-
<View style={emotionStyles.moodIconContainer}>{this.mappedMoods()}</View>
|
|
48
|
-
</View>);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
const emotionStyles = StyleSheet.create({
|
|
52
|
-
container: {
|
|
53
|
-
flex: 1,
|
|
54
|
-
},
|
|
55
|
-
feelingContainer: {
|
|
56
|
-
marginVertical: `3%`,
|
|
57
|
-
},
|
|
58
|
-
feelingText: {
|
|
59
|
-
textAlign: `center`,
|
|
60
|
-
color: `white`,
|
|
61
|
-
fontWeight: `bold`,
|
|
62
|
-
fontSize: Dimensions.get(`screen`).width / 26,
|
|
63
|
-
},
|
|
64
|
-
moodIconContainer: { flex: 1, flexDirection: `row`, justifyContent: `center` },
|
|
65
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Logbook } from "@hedia/types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { ImageURISource } from "react-native";
|
|
4
|
-
export interface IProps {
|
|
5
|
-
/** Which mood the mood component should represent. */
|
|
6
|
-
mood: Logbook.Enums.MoodEnum;
|
|
7
|
-
/** Boolean indicating whether the mood component represents the currently active mood. */
|
|
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
|
-
*/
|
|
14
|
-
onPress(toggle: boolean): void;
|
|
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. */
|
|
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
|
-
*/
|
|
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
|
-
*/
|
|
37
|
-
handleOnPress: () => void;
|
|
38
|
-
/** JSX element to display the mood icon retrieved using the getMoodIcon() method. */
|
|
39
|
-
render(): JSX.Element;
|
|
40
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Logbook } from "@hedia/types";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { Dimensions, Image, StyleSheet, TouchableOpacity } from "react-native";
|
|
4
|
-
const MoodEnum = Logbook.Enums.MoodEnum;
|
|
5
|
-
/** Mapping from {@link Logbook.Enums.MoodEnum} to corresponding image resources */
|
|
6
|
-
export const MOODS_INACTIVE = {
|
|
7
|
-
1: require(`../../assets/mood/sad.png`),
|
|
8
|
-
2: require(`../../assets/mood/semi_sad.png`),
|
|
9
|
-
3: require(`../../assets/mood/neutral.png`),
|
|
10
|
-
4: require(`../../assets/mood/semi_happy.png`),
|
|
11
|
-
5: require(`../../assets/mood/happy.png`),
|
|
12
|
-
};
|
|
13
|
-
/** Mapping from {@link Logbook.Enums.MoodEnum} to corresponding image resources */
|
|
14
|
-
export const MOODS_ACTIVE = {
|
|
15
|
-
1: require(`../../assets/mood/sad_active.png`),
|
|
16
|
-
2: require(`../../assets/mood/semi_sad_active.png`),
|
|
17
|
-
3: require(`../../assets/mood/neutral_active.png`),
|
|
18
|
-
4: require(`../../assets/mood/semi_happy_active.png`),
|
|
19
|
-
5: require(`../../assets/mood/happy_active.png`),
|
|
20
|
-
};
|
|
21
|
-
/** Component to display a mood icon base on its props. */
|
|
22
|
-
export default class MoodIcon extends React.Component {
|
|
23
|
-
constructor() {
|
|
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
|
-
*/
|
|
33
|
-
this.getMoodIcon = () => {
|
|
34
|
-
if (this.props.active) {
|
|
35
|
-
return MOODS_ACTIVE[this.props.mood];
|
|
36
|
-
}
|
|
37
|
-
return MOODS_INACTIVE[this.props.mood];
|
|
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
|
-
*/
|
|
45
|
-
this.handleOnPress = () => {
|
|
46
|
-
this.props.onPress(!this.props.active);
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
/** JSX element to display the mood icon retrieved using the getMoodIcon() method. */
|
|
50
|
-
render() {
|
|
51
|
-
const { mood, active } = this.props;
|
|
52
|
-
const label = `${MoodEnum[mood]}_${active}`;
|
|
53
|
-
return (<TouchableOpacity style={moodIconStyles.container} onPress={this.handleOnPress} accessibilityLabel={label}>
|
|
54
|
-
<Image style={moodIconStyles.icon} source={this.getMoodIcon()}/>
|
|
55
|
-
</TouchableOpacity>);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const moodIconStyles = StyleSheet.create({
|
|
59
|
-
container: {
|
|
60
|
-
marginHorizontal: `1%`,
|
|
61
|
-
},
|
|
62
|
-
icon: {
|
|
63
|
-
width: Dimensions.get(`screen`).width / 8,
|
|
64
|
-
height: Dimensions.get(`screen`).width / 8,
|
|
65
|
-
},
|
|
66
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Languages } from "@hedia/types";
|
|
2
|
-
import { I18n } from "@lingui/core";
|
|
3
|
-
import "moment/min/locales";
|
|
4
|
-
/** Internalisation object containing the translations. Call changeLanguage in order to change the language. */
|
|
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
|
-
*/
|
|
18
|
-
export declare function changeLanguage(language: Languages): I18n;
|
package/src/locale/i18nUtils.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Languages } from "@hedia/types";
|
|
2
|
-
import { setupI18n } from "@lingui/core";
|
|
3
|
-
import moment from "moment";
|
|
4
|
-
// tslint:disable-next-line:no-import-side-effect
|
|
5
|
-
import "moment/min/locales";
|
|
6
|
-
const languageMap = {
|
|
7
|
-
[Languages.da]: require(`./da/messages.js`),
|
|
8
|
-
[Languages.en]: require(`./en/messages.js`),
|
|
9
|
-
[Languages.de]: require(`./de/messages.js`),
|
|
10
|
-
[Languages.es]: require(`./es/messages.js`),
|
|
11
|
-
[Languages.fr]: require(`./fr/messages.js`),
|
|
12
|
-
[Languages.it]: require(`./it/messages.js`),
|
|
13
|
-
};
|
|
14
|
-
/** Internalisation object containing the translations. Call changeLanguage in order to change the language. */
|
|
15
|
-
export const i18n = setupI18n({
|
|
16
|
-
language: Languages.en,
|
|
17
|
-
catalogs: languageMap,
|
|
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
|
-
*/
|
|
31
|
-
export function changeLanguage(language) {
|
|
32
|
-
languageMap[language] ? i18n.activate(language) : i18n.activate(Languages.en);
|
|
33
|
-
// Temporary way of setting the moment locale to en-gb since we currently identify GB English with "en".
|
|
34
|
-
const languagesValues = Object.values(Languages);
|
|
35
|
-
const keyOfLanguage = Object.keys(Languages)[languagesValues.indexOf(language)];
|
|
36
|
-
const linguiLocale = language === Languages.en ? `en-gb` : keyOfLanguage;
|
|
37
|
-
moment.locale(linguiLocale);
|
|
38
|
-
return i18n;
|
|
39
|
-
}
|
package/src/types/enum.d.ts
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
/** Namespace containing data required by component testing */
|
|
2
|
-
export declare namespace Testing {
|
|
3
|
-
/** Namespace containing data about the testing ids for certain components in order to test their expected behaviour */
|
|
4
|
-
namespace Id {
|
|
5
|
-
enum RecommendationScreenTestIds {
|
|
6
|
-
RecommendationScrollView = "recommendation-screen-scroll-view"
|
|
7
|
-
}
|
|
8
|
-
enum ActivityTestIds {
|
|
9
|
-
ActivityReduction = "activity-reduction-percentage"
|
|
10
|
-
}
|
|
11
|
-
enum HeaderTestIds {
|
|
12
|
-
ExitCalculation = "exit-calculation-button"
|
|
13
|
-
}
|
|
14
|
-
enum LimitationMessageTestIds {
|
|
15
|
-
OkButton = "limitation-message-ok-button"
|
|
16
|
-
}
|
|
17
|
-
enum RecentInsulinTestIds {
|
|
18
|
-
No = "recent-insulin-no",
|
|
19
|
-
Yes = "recent-insulin-yes"
|
|
20
|
-
}
|
|
21
|
-
enum RecommendedCarbsTestIds {
|
|
22
|
-
RecommendedCarbs = "recommended-carbs",
|
|
23
|
-
EditRecommendedCarbs = "edit-recommended-carbs",
|
|
24
|
-
InvisibleCarbInput = "invisible-recommended-carbs-input",
|
|
25
|
-
EnteredCarbs = "entered-carbs",
|
|
26
|
-
RemoveRecommendation = "remove-carb-recommendation",
|
|
27
|
-
TotalCarbs = "total-carbs"
|
|
28
|
-
}
|
|
29
|
-
enum RecommendedInsulinTestIds {
|
|
30
|
-
EditRecommendedInsulin = "edit-recommended-insulin",
|
|
31
|
-
InvisibleInsulinInput = "invisible-recommended-insulin-input",
|
|
32
|
-
ShownInsulinText = "shown-insulin-text"
|
|
33
|
-
}
|
|
34
|
-
enum RecommendationModalTestIds {
|
|
35
|
-
DeclineCarbs = "recommendation-modal-decline-carbs",
|
|
36
|
-
AcceptCarbs = "recommendation-modal-accept-carbs",
|
|
37
|
-
OkButton = "recommendation-modal-ok-button",
|
|
38
|
-
SuggestedCarbs = "recommendation-modal-suggested-carbs"
|
|
39
|
-
}
|
|
40
|
-
enum RemeasureTestIds {
|
|
41
|
-
RemeasureSlider = "remeasure-slider"
|
|
42
|
-
}
|
|
43
|
-
enum TransferToLogbookTestIds {
|
|
44
|
-
TransferButton = "transfer-to-logbook-button"
|
|
45
|
-
}
|
|
46
|
-
enum TwoOptionModalTestIds {
|
|
47
|
-
ExitButton = "exit-two-option-modal",
|
|
48
|
-
FirstOption = "first-option-button",
|
|
49
|
-
SecondOption = "second-option-button"
|
|
50
|
-
}
|
|
51
|
-
/** Namespace containing ids for the InfoBars component value, lavel and unit fields */
|
|
52
|
-
namespace InfoBarTestIds {
|
|
53
|
-
enum Value {
|
|
54
|
-
BloodGlucose = "BloodGlucoseValue",
|
|
55
|
-
BloodKetone = "BloodKetoneValue",
|
|
56
|
-
ActiveInsulin = "ActiveInsulinValue"
|
|
57
|
-
}
|
|
58
|
-
enum Label {
|
|
59
|
-
BloodKetone = "BloodKetoneLabel",
|
|
60
|
-
BloodGlucose = "BloodGlucoseLabel",
|
|
61
|
-
ActiveInsulin = "ActiveInsulinLabel"
|
|
62
|
-
}
|
|
63
|
-
enum Unit {
|
|
64
|
-
BloodKetone = "BloodKetoneUnit",
|
|
65
|
-
BloodGlucose = "BloodGlucoseUnit",
|
|
66
|
-
ActiveInsulin = "ActiveInsulinUnit"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/** Namespace containing all the TestIdEnum keys */
|
|
71
|
-
namespace Types {
|
|
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;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Indicator of which error has happened.
|
|
77
|
-
* See the corresponding RecommendationError {@link RecommendationError} for details.
|
|
78
|
-
*/
|
|
79
|
-
export declare enum RecommendationErrorEnum {
|
|
80
|
-
ActivityDuration = 0,
|
|
81
|
-
ActivityTargetBGL = 1,
|
|
82
|
-
ActivitySettings = 2,
|
|
83
|
-
ActivityDate = 3,
|
|
84
|
-
ActivityIntensity = 4,
|
|
85
|
-
ActivityType = 5,
|
|
86
|
-
BolusInsulinDose = 6,
|
|
87
|
-
BolusInsulinSecondsPassed = 7,
|
|
88
|
-
RecentBolus = 8,
|
|
89
|
-
CarbohydrateLimit = 9,
|
|
90
|
-
InsulinSensitivity = 10,
|
|
91
|
-
InsulinToCarbsRatio = 11,
|
|
92
|
-
LatestLogbook6HoursBGL = 12,
|
|
93
|
-
CurrentBGL = 13,
|
|
94
|
-
CurrentBKL = 14,
|
|
95
|
-
TargetBGL = 15,
|
|
96
|
-
UserReminder = 16,
|
|
97
|
-
Language = 17,
|
|
98
|
-
InjectionMethod = 18,
|
|
99
|
-
BloodKetoneUnit = 19,
|
|
100
|
-
BloodGlucoseUnit = 20,
|
|
101
|
-
BloodKetoneProps = 21
|
|
102
|
-
}
|
|
103
|
-
/** Indicates the category of the user’s blood glucose level. */
|
|
104
|
-
export declare enum BgLevel {
|
|
105
|
-
SevereHypoglycemia = 0,
|
|
106
|
-
Hypoglycemia = 1,
|
|
107
|
-
MildHypoglycemia = 2,
|
|
108
|
-
Normoglycemia = 3,
|
|
109
|
-
NormoglycemiaUnder5MMOL = 4,
|
|
110
|
-
MildHyperglycemia = 5,
|
|
111
|
-
Hyperglycemia = 6,
|
|
112
|
-
SevereHyperglycemia = 7,
|
|
113
|
-
UnsupportedBGLevel = 8,
|
|
114
|
-
BGLevelNotProvided = 9
|
|
115
|
-
}
|
|
116
|
-
/** The possible initial recommendation times with values in hours. */
|
|
117
|
-
export declare enum RecommendationReminders {
|
|
118
|
-
ReminderOff = 0,
|
|
119
|
-
Reminder15Minutes = 0.25,
|
|
120
|
-
Reminder60Minutes = 1,
|
|
121
|
-
HediaReminderDefault = 1.5
|
|
122
|
-
}
|
package/src/types/enum.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/** Namespace containing data required by component testing */
|
|
2
|
-
export var Testing;
|
|
3
|
-
(function (Testing) {
|
|
4
|
-
/** Namespace containing data about the testing ids for certain components in order to test their expected behaviour */
|
|
5
|
-
let Id;
|
|
6
|
-
(function (Id) {
|
|
7
|
-
let RecommendationScreenTestIds;
|
|
8
|
-
(function (RecommendationScreenTestIds) {
|
|
9
|
-
RecommendationScreenTestIds["RecommendationScrollView"] = "recommendation-screen-scroll-view";
|
|
10
|
-
})(RecommendationScreenTestIds = Id.RecommendationScreenTestIds || (Id.RecommendationScreenTestIds = {}));
|
|
11
|
-
let ActivityTestIds;
|
|
12
|
-
(function (ActivityTestIds) {
|
|
13
|
-
ActivityTestIds["ActivityReduction"] = "activity-reduction-percentage";
|
|
14
|
-
})(ActivityTestIds = Id.ActivityTestIds || (Id.ActivityTestIds = {}));
|
|
15
|
-
let HeaderTestIds;
|
|
16
|
-
(function (HeaderTestIds) {
|
|
17
|
-
HeaderTestIds["ExitCalculation"] = "exit-calculation-button";
|
|
18
|
-
})(HeaderTestIds = Id.HeaderTestIds || (Id.HeaderTestIds = {}));
|
|
19
|
-
let LimitationMessageTestIds;
|
|
20
|
-
(function (LimitationMessageTestIds) {
|
|
21
|
-
LimitationMessageTestIds["OkButton"] = "limitation-message-ok-button";
|
|
22
|
-
})(LimitationMessageTestIds = Id.LimitationMessageTestIds || (Id.LimitationMessageTestIds = {}));
|
|
23
|
-
let RecentInsulinTestIds;
|
|
24
|
-
(function (RecentInsulinTestIds) {
|
|
25
|
-
RecentInsulinTestIds["No"] = "recent-insulin-no";
|
|
26
|
-
RecentInsulinTestIds["Yes"] = "recent-insulin-yes";
|
|
27
|
-
})(RecentInsulinTestIds = Id.RecentInsulinTestIds || (Id.RecentInsulinTestIds = {}));
|
|
28
|
-
let RecommendedCarbsTestIds;
|
|
29
|
-
(function (RecommendedCarbsTestIds) {
|
|
30
|
-
RecommendedCarbsTestIds["RecommendedCarbs"] = "recommended-carbs";
|
|
31
|
-
RecommendedCarbsTestIds["EditRecommendedCarbs"] = "edit-recommended-carbs";
|
|
32
|
-
RecommendedCarbsTestIds["InvisibleCarbInput"] = "invisible-recommended-carbs-input";
|
|
33
|
-
RecommendedCarbsTestIds["EnteredCarbs"] = "entered-carbs";
|
|
34
|
-
RecommendedCarbsTestIds["RemoveRecommendation"] = "remove-carb-recommendation";
|
|
35
|
-
RecommendedCarbsTestIds["TotalCarbs"] = "total-carbs";
|
|
36
|
-
})(RecommendedCarbsTestIds = Id.RecommendedCarbsTestIds || (Id.RecommendedCarbsTestIds = {}));
|
|
37
|
-
let RecommendedInsulinTestIds;
|
|
38
|
-
(function (RecommendedInsulinTestIds) {
|
|
39
|
-
RecommendedInsulinTestIds["EditRecommendedInsulin"] = "edit-recommended-insulin";
|
|
40
|
-
RecommendedInsulinTestIds["InvisibleInsulinInput"] = "invisible-recommended-insulin-input";
|
|
41
|
-
RecommendedInsulinTestIds["ShownInsulinText"] = "shown-insulin-text";
|
|
42
|
-
})(RecommendedInsulinTestIds = Id.RecommendedInsulinTestIds || (Id.RecommendedInsulinTestIds = {}));
|
|
43
|
-
let RecommendationModalTestIds;
|
|
44
|
-
(function (RecommendationModalTestIds) {
|
|
45
|
-
RecommendationModalTestIds["DeclineCarbs"] = "recommendation-modal-decline-carbs";
|
|
46
|
-
RecommendationModalTestIds["AcceptCarbs"] = "recommendation-modal-accept-carbs";
|
|
47
|
-
RecommendationModalTestIds["OkButton"] = "recommendation-modal-ok-button";
|
|
48
|
-
RecommendationModalTestIds["SuggestedCarbs"] = "recommendation-modal-suggested-carbs";
|
|
49
|
-
})(RecommendationModalTestIds = Id.RecommendationModalTestIds || (Id.RecommendationModalTestIds = {}));
|
|
50
|
-
let RemeasureTestIds;
|
|
51
|
-
(function (RemeasureTestIds) {
|
|
52
|
-
RemeasureTestIds["RemeasureSlider"] = "remeasure-slider";
|
|
53
|
-
})(RemeasureTestIds = Id.RemeasureTestIds || (Id.RemeasureTestIds = {}));
|
|
54
|
-
let TransferToLogbookTestIds;
|
|
55
|
-
(function (TransferToLogbookTestIds) {
|
|
56
|
-
TransferToLogbookTestIds["TransferButton"] = "transfer-to-logbook-button";
|
|
57
|
-
})(TransferToLogbookTestIds = Id.TransferToLogbookTestIds || (Id.TransferToLogbookTestIds = {}));
|
|
58
|
-
let TwoOptionModalTestIds;
|
|
59
|
-
(function (TwoOptionModalTestIds) {
|
|
60
|
-
TwoOptionModalTestIds["ExitButton"] = "exit-two-option-modal";
|
|
61
|
-
TwoOptionModalTestIds["FirstOption"] = "first-option-button";
|
|
62
|
-
TwoOptionModalTestIds["SecondOption"] = "second-option-button";
|
|
63
|
-
})(TwoOptionModalTestIds = Id.TwoOptionModalTestIds || (Id.TwoOptionModalTestIds = {}));
|
|
64
|
-
/** Namespace containing ids for the InfoBars component value, lavel and unit fields */
|
|
65
|
-
let InfoBarTestIds;
|
|
66
|
-
(function (InfoBarTestIds) {
|
|
67
|
-
let Value;
|
|
68
|
-
(function (Value) {
|
|
69
|
-
Value["BloodGlucose"] = "BloodGlucoseValue";
|
|
70
|
-
Value["BloodKetone"] = "BloodKetoneValue";
|
|
71
|
-
Value["ActiveInsulin"] = "ActiveInsulinValue";
|
|
72
|
-
})(Value = InfoBarTestIds.Value || (InfoBarTestIds.Value = {}));
|
|
73
|
-
let Label;
|
|
74
|
-
(function (Label) {
|
|
75
|
-
Label["BloodKetone"] = "BloodKetoneLabel";
|
|
76
|
-
Label["BloodGlucose"] = "BloodGlucoseLabel";
|
|
77
|
-
Label["ActiveInsulin"] = "ActiveInsulinLabel";
|
|
78
|
-
})(Label = InfoBarTestIds.Label || (InfoBarTestIds.Label = {}));
|
|
79
|
-
let Unit;
|
|
80
|
-
(function (Unit) {
|
|
81
|
-
Unit["BloodKetone"] = "BloodKetoneUnit";
|
|
82
|
-
Unit["BloodGlucose"] = "BloodGlucoseUnit";
|
|
83
|
-
Unit["ActiveInsulin"] = "ActiveInsulinUnit";
|
|
84
|
-
})(Unit = InfoBarTestIds.Unit || (InfoBarTestIds.Unit = {}));
|
|
85
|
-
})(InfoBarTestIds = Id.InfoBarTestIds || (Id.InfoBarTestIds = {}));
|
|
86
|
-
})(Id = Testing.Id || (Testing.Id = {}));
|
|
87
|
-
})(Testing || (Testing = {}));
|
|
88
|
-
/**
|
|
89
|
-
* Indicator of which error has happened.
|
|
90
|
-
* See the corresponding RecommendationError {@link RecommendationError} for details.
|
|
91
|
-
*/
|
|
92
|
-
export var RecommendationErrorEnum;
|
|
93
|
-
(function (RecommendationErrorEnum) {
|
|
94
|
-
RecommendationErrorEnum[RecommendationErrorEnum["ActivityDuration"] = 0] = "ActivityDuration";
|
|
95
|
-
RecommendationErrorEnum[RecommendationErrorEnum["ActivityTargetBGL"] = 1] = "ActivityTargetBGL";
|
|
96
|
-
RecommendationErrorEnum[RecommendationErrorEnum["ActivitySettings"] = 2] = "ActivitySettings";
|
|
97
|
-
RecommendationErrorEnum[RecommendationErrorEnum["ActivityDate"] = 3] = "ActivityDate";
|
|
98
|
-
RecommendationErrorEnum[RecommendationErrorEnum["ActivityIntensity"] = 4] = "ActivityIntensity";
|
|
99
|
-
RecommendationErrorEnum[RecommendationErrorEnum["ActivityType"] = 5] = "ActivityType";
|
|
100
|
-
RecommendationErrorEnum[RecommendationErrorEnum["BolusInsulinDose"] = 6] = "BolusInsulinDose";
|
|
101
|
-
RecommendationErrorEnum[RecommendationErrorEnum["BolusInsulinSecondsPassed"] = 7] = "BolusInsulinSecondsPassed";
|
|
102
|
-
RecommendationErrorEnum[RecommendationErrorEnum["RecentBolus"] = 8] = "RecentBolus";
|
|
103
|
-
RecommendationErrorEnum[RecommendationErrorEnum["CarbohydrateLimit"] = 9] = "CarbohydrateLimit";
|
|
104
|
-
RecommendationErrorEnum[RecommendationErrorEnum["InsulinSensitivity"] = 10] = "InsulinSensitivity";
|
|
105
|
-
RecommendationErrorEnum[RecommendationErrorEnum["InsulinToCarbsRatio"] = 11] = "InsulinToCarbsRatio";
|
|
106
|
-
RecommendationErrorEnum[RecommendationErrorEnum["LatestLogbook6HoursBGL"] = 12] = "LatestLogbook6HoursBGL";
|
|
107
|
-
RecommendationErrorEnum[RecommendationErrorEnum["CurrentBGL"] = 13] = "CurrentBGL";
|
|
108
|
-
RecommendationErrorEnum[RecommendationErrorEnum["CurrentBKL"] = 14] = "CurrentBKL";
|
|
109
|
-
RecommendationErrorEnum[RecommendationErrorEnum["TargetBGL"] = 15] = "TargetBGL";
|
|
110
|
-
RecommendationErrorEnum[RecommendationErrorEnum["UserReminder"] = 16] = "UserReminder";
|
|
111
|
-
RecommendationErrorEnum[RecommendationErrorEnum["Language"] = 17] = "Language";
|
|
112
|
-
RecommendationErrorEnum[RecommendationErrorEnum["InjectionMethod"] = 18] = "InjectionMethod";
|
|
113
|
-
RecommendationErrorEnum[RecommendationErrorEnum["BloodKetoneUnit"] = 19] = "BloodKetoneUnit";
|
|
114
|
-
RecommendationErrorEnum[RecommendationErrorEnum["BloodGlucoseUnit"] = 20] = "BloodGlucoseUnit";
|
|
115
|
-
RecommendationErrorEnum[RecommendationErrorEnum["BloodKetoneProps"] = 21] = "BloodKetoneProps";
|
|
116
|
-
})(RecommendationErrorEnum || (RecommendationErrorEnum = {}));
|
|
117
|
-
/** Indicates the category of the user’s blood glucose level. */
|
|
118
|
-
export var BgLevel;
|
|
119
|
-
(function (BgLevel) {
|
|
120
|
-
BgLevel[BgLevel["SevereHypoglycemia"] = 0] = "SevereHypoglycemia";
|
|
121
|
-
BgLevel[BgLevel["Hypoglycemia"] = 1] = "Hypoglycemia";
|
|
122
|
-
BgLevel[BgLevel["MildHypoglycemia"] = 2] = "MildHypoglycemia";
|
|
123
|
-
BgLevel[BgLevel["Normoglycemia"] = 3] = "Normoglycemia";
|
|
124
|
-
BgLevel[BgLevel["NormoglycemiaUnder5MMOL"] = 4] = "NormoglycemiaUnder5MMOL";
|
|
125
|
-
BgLevel[BgLevel["MildHyperglycemia"] = 5] = "MildHyperglycemia";
|
|
126
|
-
BgLevel[BgLevel["Hyperglycemia"] = 6] = "Hyperglycemia";
|
|
127
|
-
BgLevel[BgLevel["SevereHyperglycemia"] = 7] = "SevereHyperglycemia";
|
|
128
|
-
BgLevel[BgLevel["UnsupportedBGLevel"] = 8] = "UnsupportedBGLevel";
|
|
129
|
-
BgLevel[BgLevel["BGLevelNotProvided"] = 9] = "BGLevelNotProvided";
|
|
130
|
-
})(BgLevel || (BgLevel = {}));
|
|
131
|
-
/** The possible initial recommendation times with values in hours. */
|
|
132
|
-
export var RecommendationReminders;
|
|
133
|
-
(function (RecommendationReminders) {
|
|
134
|
-
RecommendationReminders[RecommendationReminders["ReminderOff"] = 0] = "ReminderOff";
|
|
135
|
-
RecommendationReminders[RecommendationReminders["Reminder15Minutes"] = 0.25] = "Reminder15Minutes";
|
|
136
|
-
RecommendationReminders[RecommendationReminders["Reminder60Minutes"] = 1] = "Reminder60Minutes";
|
|
137
|
-
RecommendationReminders[RecommendationReminders["HediaReminderDefault"] = 1.5] = "HediaReminderDefault";
|
|
138
|
-
})(RecommendationReminders || (RecommendationReminders = {}));
|
package/src/types/types.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Activity } from "@hedia/types";
|
|
2
|
-
/** Interface used to describe a numerical interval. It is assumed that min < max. */
|
|
3
|
-
export interface IInterval {
|
|
4
|
-
/** The lower bound of the interval. */
|
|
5
|
-
min: number;
|
|
6
|
-
/** The upper bound of the interval. */
|
|
7
|
-
max: number;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Represents the properties needed to show the user visual information about the physical activity.
|
|
11
|
-
*/
|
|
12
|
-
export interface IActivityDisplayProps {
|
|
13
|
-
/** Title of the physical activity */
|
|
14
|
-
activityTitle: string | null;
|
|
15
|
-
/** Type of the physical activity */
|
|
16
|
-
activityType: Activity.Enums.ActivityEnum | null;
|
|
17
|
-
}
|
package/src/types/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/** Provides methods for getting variants of attention messages */
|
|
2
|
-
export declare const AttentionMessage: {
|
|
3
|
-
/**
|
|
4
|
-
* @return Concatenation of:
|
|
5
|
-
* {@link Messages.VeryLowBGL} +
|
|
6
|
-
* {@link Messages.Reminder15Minutes}
|
|
7
|
-
*/
|
|
8
|
-
SevereHypoglycemia: () => string;
|
|
9
|
-
/**
|
|
10
|
-
* @return Concatenation of:
|
|
11
|
-
* {@link Messages.LowBGL} +
|
|
12
|
-
* {@link Messages.Reminder15Minutes}
|
|
13
|
-
*/
|
|
14
|
-
Hypoglycemia: () => string;
|
|
15
|
-
/** @return The value of: {@link Messages.Reminder15Minutes} */
|
|
16
|
-
MildHypoglycemia: () => string;
|
|
17
|
-
/** @return The value of: {@link Messages.PostponePhysicalActivityUnder5MMOL} */
|
|
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
|
-
*/
|
|
26
|
-
HyperglycemiaActivity: () => string;
|
|
27
|
-
/**
|
|
28
|
-
* @return Concatenation of:
|
|
29
|
-
* {@link Messages.HighBGL} +
|
|
30
|
-
* {@link Messages.InsulinKetones}
|
|
31
|
-
*/
|
|
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
|
-
*/
|
|
40
|
-
SevereHyperglycemiaActivity: () => string;
|
|
41
|
-
/** no message provided for this level */
|
|
42
|
-
BGLevelNotProvided: null;
|
|
43
|
-
/** no message provided for this level*/
|
|
44
|
-
Hyperglycemia: null;
|
|
45
|
-
/** no message provided for this level */
|
|
46
|
-
MildHyperglycemia: null;
|
|
47
|
-
/** no message provided for this level */
|
|
48
|
-
Normoglycemia: null;
|
|
49
|
-
/** no message provided for this level */
|
|
50
|
-
NormoglycemiaUnder5MMOL: null;
|
|
51
|
-
/** no message provided for this level */
|
|
52
|
-
UnsupportedBGLevel: null;
|
|
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
|
-
*/
|
|
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. */
|
|
66
|
-
export declare class Messages {
|
|
67
|
-
/** Inform the user that their BGL is very low and what they should do about it. */
|
|
68
|
-
static VeryLowBGL: () => string;
|
|
69
|
-
/** Inform the user that their BGL is very low. */
|
|
70
|
-
static LowBGL: () => string;
|
|
71
|
-
/** Inform the user that they will be reminded to remeasure their BGL soon. */
|
|
72
|
-
static Reminder15Minutes: () => string;
|
|
73
|
-
/** Encourages the user to postpone exercise. Specifically when their BGL is high. */
|
|
74
|
-
static PostponePhysicalActivity: () => string;
|
|
75
|
-
/** Encourages the user to postpone exercise. Specifically when their BGL is low. */
|
|
76
|
-
static PostponePhysicalActivityUnder5MMOL: () => string;
|
|
77
|
-
/** Inform about high BGL. */
|
|
78
|
-
static HighBGL: () => string;
|
|
79
|
-
/** Encourage user to measure ketones. */
|
|
80
|
-
static InsulinKetones: () => string;
|
|
81
|
-
/** Inform the user that their insulin recommendation was limited for safety. */
|
|
82
|
-
static RecommendationWasLimited: () => string;
|
|
83
|
-
/** Inform the user that their insulin recommendation was limited for safety in combination with an activity. */
|
|
84
|
-
static RecommendationWasLimitedActivity: (activityReduction: number) => string;
|
|
85
|
-
/** Inform the user that the insulin amount they entered is above HDA’s safety limit. */
|
|
86
|
-
static InsulinInputWasLimited: (activityReduction: number | null) => string;
|
|
87
|
-
/** Title for the modal that informs the user that their calculation is too old. */
|
|
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
|
-
*/
|
|
93
|
-
static TimeoutRecommendationNotVisible: () => string;
|
|
94
|
-
/** Inform the user that their recommendation calculation is too old. */
|
|
95
|
-
static TimeoutRecommendationVisible: (date: Date) => string;
|
|
96
|
-
}
|